Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Ordering a specific forum topics by votes and thanks ( by default )
Avatar
Yehonal
Member
sp_UserOfflineSmall Offline
Feb 15, 2016 - 6:20 am

As title says, is it any way ( via settings or hooks ) to have a specific forum ordered by quantity of votes ( and eventually "thanks" ) , as default order ?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Feb 15, 2016 - 12:03 pm

I would tentatively say, and this really is very tentative, that yes it could be done. I would need to spend time trying ti out to see how it might work.

But - and it is a most important but - it would probably be horrendously slow. Items like 'quantity of votes' are calculated when needed - they are not stored anywhere. So for each topic you would have to join in new data to the sql query and then calculate results one topic at a time. That is nasty and expensive.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 15, 2016 - 7:24 pm

If you are really interested in doing it as a custom plugin, please let us know and we can work up a quote...  might could even offer multiple ways to sort your forum based on user actions...  but as Andy says, would have to research...

Avatar
Yehonal
Member
sp_UserOfflineSmall Offline
Feb 15, 2016 - 7:39 pm

Mr Papa said
If you are really interested in doing it as a custom plugin, please let us know and we can work up a quote...  might could even offer multiple ways to sort your forum based on user actions...  but as Andy says, would have to research...

Yes would be nice to have a plugin for it!

However i need a fast solution through hooks or code changing for now if is it possible since i need to create a "feedback system" understanding which is the most voted topics for that specific forum. 

I need an help. 

Thank you all. 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 15, 2016 - 7:48 pm

we can point in the right direction, but its a detailed customization beyond what we can do in the support forum...

so assuming you mean topic view (list of forum posts), then you can look at sp-topic-view-class.php...

you will need to filter the db query via the hook 'sph_topicview_query' and adjust it as you desire...

then you 'may' need to filter the results and adjust if required by your db query changes...  those would be 'sph_topicview_topic_record' and 'sph_topicview_post_records' and 'sph_topicview_combined_data'....  though cannot say for sure without your db query changes...

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: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626