Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
plugins-topic
How is Hotness calculated?
Avatar
Graham Tappenden
Member
Free Members
sp_UserOfflineSmall Offline
May 30, 2013 - 7:52 pm

I have been trying out the "hot topics" function in the template tag plug-in this evening and following the instructions in the Codex:

http://codex.simple-press.com/.....ot-topics/

What I'm missing in the documentation is how the "hotness" is calculated.  Is the formula available anywhere?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 31, 2013 - 12:07 am

Its in the plugin... ;)

it uses the formula: 

score = log($days - $post->delta)

where $days is passed into the template function (default is 30) and delta is the difference between current date and the post date...

there is a filter on the score, so you can replace it with your own calculation if you like...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17363
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625