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
Rating Plugin: How to ONLY display the rating for the topic (not the internal posts)
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
May 13, 2013 - 6:26 pm

good to hear!  thanks for the update...

Avatar
Andy B
Member
Free Members
sp_UserOfflineSmall Offline
Oct 29, 2013 - 6:44 pm

This should help you do what you want...  Only allows the first post in a topic to be rated... and thus the averages will only be for the first post... however, it wont (and cannot) go back and take care of already cast votes... so you may want to consider starting the ratings over...  if so, just go to forum - options - display settings and switch the rating style to the other and back... that will reset all rating data...

add_filter('sph_PostIndexRatePost', 'my_rating_check');
function my_rating_check($out) {
    global $spThisPost;
    if ($spThisPost->post_index != 1) $out = '';
    return $out;
}

this code would go in the spFunctions.php file of your sp theme...

 

 

This is a good idea. I just made this adjustment too. Might be nice to add a toggle 'on/off' in the settings screen.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 29, 2013 - 10:18 pm

only problem is thats another option...  we have too many options now...  we tend to follow the wp mantra of decisions not options...  folks tend to get lost in the options..  but we do like to provide the hooks so that users can tweak if desired...

Avatar
Andy B
Member
Free Members
sp_UserOfflineSmall Offline
Oct 30, 2013 - 8:41 am

Good point. I suppose there is a risk that the forum options menu becomes overwhelming with hundreds of different settings that could be made.

With this ratings tweak - is there a risk that with any forum/plugin updates that the 'tweak' becomes lost/broken or worse that it could cause some corruption?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Oct 30, 2013 - 12:06 pm

slim to no chance of losing the change...  Since the tweak uses hooks, there is no modification of the core code so it update proof (except for that very slim chance we have to change the hook structure, but we almost never do that because backwards compat is paramount)...

of course, since you modified spFunctions.php in the sp theme, its assumed that you are already using your own sp theme and not modifying one of our delivered themes...

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