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
Post Rating plugin : could that be modified ?
Avatar
Hellequin
Rookie
Free Members
sp_UserOfflineSmall Offline
Feb 12, 2012 - 6:24 am

Hello all,

 

I have a simple question : I have actually set up the Post Rating plugin on my Simple Press forum, it works like a charm.

 

But I want to know something : is it possible to modify the php code ? I mean... I just want to make the Post Rating only available for the first post in all the topics and not available for all the posts... 

 

I need your help ! embarassed Sorry for my bad english (french fag)

 

Thx !! 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 12, 2012 - 11:30 am

well its a post rating plugin, not a topic rating...  but you could just allow rating of the first post... and no changes to the plugin needed... just adjust your sp theme and only show the rating on the first post... but what about topics with multiple pages of posts?  one would not see the rating on the first post which might be on a different page...  in this case, on the first post on any given page wouldnt make sense since it wouldnt correlate with first post of other pages...

Avatar
Hellequin
Rookie
Free Members
sp_UserOfflineSmall Offline
Feb 12, 2012 - 11:56 am

Yeah, that's what i want indeed, a "topic rating"... As a matter of fact, my members will be allowed to post texts, poetry, etc... on their own, and I just want to allow a rate on the first post (the post where would be the texts) and not the others (reply, commentaries, etc)

 

How can I configure that on the sp theme ? Mine is default, 5.0 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 12, 2012 - 2:08 pm

well, again, will look most odd on multi page topics, but maybe in spTopicView template tag, find

      if (function_exists('sp_PostIndexRatePost')) sp_PostIndexRatePost('tagClass=spLabelBordered spPostRating spRight');

and change it to

      if (function_exists('sp_PostIndexRatePost') && $spThisPost->post_index == 1) sp_PostIndexRatePost('tagClass=spLabelBordered spPostRating spRight');

and see if that does what you want...  obviously, untested...

Avatar
Hellequin
Rookie
Free Members
sp_UserOfflineSmall Offline
Feb 13, 2012 - 11:33 am

Hello Mr Papa,

 

I've just modified the spTopicView and it works !!! The rate is only available on the first post and it's not odd on multi page topics !

 

Thank you so much.

 

Maybe i'm gonna annoying you with a last question : actually, when a subscriber's voting, the rate is fixed and cannot be changed. Is it possible to make the rate unfixed, so the subscriber could change his rate according to his mood ?

 

If not, that's not a big deal, cuz i'm already happy with that "custom topic rating" wink 

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 13, 2012 - 7:38 pm

do you mean let a rater change the value of their previous rating?  if so, no, that would not be easy to do in its current form.  The rating is not stored, only the aggregate...

Avatar
Hellequin
Rookie
Free Members
sp_UserOfflineSmall Offline
Feb 14, 2012 - 10:40 am

Yeah, that's what i mean. If it's not possible, that's ok... Not a big deal anyway, i'll just have to tell my raters.

 

Well, again... Thank you very much.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Feb 14, 2012 - 8:21 pm

np. glad we could help.

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: 17362
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625