TinyPortal

Development => Block Codes => Topic started by: jernatety on September 03, 2018, 05:20:14 PM

Title: Request: Top topics by number of views
Post by: jernatety on September 03, 2018, 05:20:14 PM
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!
Title: Re: Request: Top topics by number of views
Post by: lurkalot on September 03, 2018, 05:50:04 PM
You could use SSI.  Stick this in a php block, though you might want to try and style it as necessary

ssi_topTopicsViews();
Title: Re: Request: Top topics by number of views
Post by: jernatety on September 03, 2018, 05:52:13 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.
Title: Re: Request: Top topics by number of views
Post by: lurkalot on September 03, 2018, 05:56:07 PM
Quote from: jernatety on September 03, 2018, 05:52:13 PM
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.
Title: Re: Request: Top topics by number of views
Post by: Mick on September 04, 2018, 09:34:27 PM
Quote from: jernatety on September 03, 2018, 05:52:13 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.
ssi_topTopicsViews(5);