TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

April 21, 2024, 10:08:00 AM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,165
  • Total Topics: 21,219
  • Online today: 114
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 47
  • Total: 48
  • @rjen

Request: Top topics by number of views

Started by jernatety, September 03, 2018, 05:20:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jernatety

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!

lurkalot

You could use SSI.  Stick this in a php block, though you might want to try and style it as necessary

ssi_topTopicsViews();

jernatety

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.

lurkalot

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.

Mick

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);