News: July 9th, 2018, The Tinyportal team is pleased to announce the release of ~~ TinyPortal 1.5.1! GET IT NOW!!!

Login  |  Register
* * *
TinyPortal on Twitter
Welcome, Guest. Please login or register.
Did you miss your activation email?
September 19, 2018, 06:30:15 AM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 185057
  • Total Topics: 20531
  • Online Today: 33
  • Online Ever: 383
  • (January 02, 2015, 05:58:49 AM)
Users Online
Users: 1
Guests: 20
Total: 21

Skinz





amazon.com

Author Topic: Request: Top topics by number of views  (Read 695 times)

0 Members and 1 Guest are viewing this topic.

Offline jernatety

  • Full Member
  • ***
  • Posts: 151
Request: Top topics by number of views
« on: September 03, 2018, 10:20:14 AM »
I currently have my top topics list block on the right side bar, but it's html I wrote. Is there a code I could use instead that allows me to select the number of top topics by number of views? And it automatically updates when a newer one with a lot of views shows up?

Thanks!

Offline lurkalot

  • Administrator
  • *
  • Posts: 4960
    • Camera Craniums
Re: Request: Top topics by number of views
« Reply #1 on: September 03, 2018, 10:50:04 AM »
You could use SSI.  Stick this in a php block, though you might want to try and style it as necessary

Code: [Select]
ssi_topTopicsViews();

Offline jernatety

  • Full Member
  • ***
  • Posts: 151
Re: Request: Top topics by number of views
« Reply #2 on: September 03, 2018, 10:52:13 AM »
Hi Mick, what is SSI? And is there any way to limit the number of top topics? That is what I want though, I just tested it.

Offline lurkalot

  • Administrator
  • *
  • Posts: 4960
    • Camera Craniums
Re: Request: Top topics by number of views
« Reply #3 on: September 03, 2018, 10:56:07 AM »
Hi Mick, what is SSI?

They are functions built right into SMF for you to use. ;) https://www.simplemachines.org/community/ssi_examples.php

Click throught the menu on the left of that page and it will show examples of the output.

Offline Mick

  • Sr. Member
  • ****
  • Posts: 312
  • I use SMF 2.0.15
    • idesignSMF.com
Re: Request: Top topics by number of views
« Reply #4 on: September 04, 2018, 02:34:27 PM »
Hi Mick, what is SSI? And is there any way to limit the number of top topics? That is what I want though, I just tested it.

Change the 5 to whatever amount of top topic you want.
Code: [Select]
ssi_topTopicsViews(5);