SimplePortal

Customization => Custom Coding => Topic started by: superj707 on July 30, 2014, 01:49:37 PM

Title: Custom block with trending / hot topics
Post by: superj707 on July 30, 2014, 01:49:37 PM
This would need some kind of algorithm that gives certain topics weight based on several factors. 
-number of views in last 7 days
-number of attachments in last 7 days
-number of replies in last 7 days
-is at least 1 day old

or something like this. Then a custom block to display HOT TOPICS (Trending topics on mysite)


anybody have anything similar to this?
Title: Re: Custom block with trending / hot topics
Post by: popupsteve on August 14, 2015, 01:32:03 PM
Don't you hate it when no-one replies? :(

I think this would be a handy block to have. Did you ever write this script?
Title: Re: Custom block with trending / hot topics
Post by: ♦ Ninja ZX-10RR ♦ on August 14, 2015, 05:16:35 PM
Don't you hate it when no-one replies? :(
Everyone here is a volunteer so please, please don't say it like that, because what it does is discouraging replies even more I'm afraid.

I think this would be a handy block to have. Did you ever write this script?
Having a look at it, coding such a query could potentially kill the server, or at least cut down its resources a LOT, because it would have to query up a loooot of things to do what you ask (also depends on how busy the site is). I'd totally discourage this in the first place, even if I can be wrong of course.

Apart from that, the "number of views" is potentially the most useless function in SMF, because it counts spiders, and they can do *thousands* of views in literally *seconds*, which totally invalidates the result.

Regards
Title: Re: Custom block with trending / hot topics
Post by: popupsteve on September 03, 2015, 01:13:23 PM
Sorry, Did not mean to knock the support staff with my levity.

As far as service resources, I would think this would not be a "Real Time" block. It could be a block which shows the results of a once a day function (3am run).

Always thought the view count was only updated when a forum member views a topic.
Title: Re: Custom block with trending / hot topics
Post by: ♦ Ninja ZX-10RR ♦ on September 03, 2015, 02:08:57 PM
Sorry, Did not mean to knock the support staff with my levity.
That's alright, I just needed to tell you it did sound rather bad.

Always thought the view count was only updated when a forum member views a topic.
Eh no, in fact it's probably the most bogus value in the whole SMF software. There are also mods to increase it etc... Doesn't worth any effort to do anything about it.

You could actually use built-in blocks to display like recent images/attachments/replies though :) And the "Top topics" block to display... Well, top topics :P
SimplePortal 2.3.8 © 2008-2024, SimplePortal