Support Forum

Post Rating plugin : could that be modified ?

HE Hellequin
Hellequin
Member

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 !! 

7 Answers

New Answer

MP Mr Papa
Mr Papa
Member

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…

HE Hellequin
Hellequin
Member

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 

MP Mr Papa
Mr Papa
Member

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…

HE Hellequin
Hellequin
Member

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 

MP Mr Papa
Mr Papa
Member

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…

HE Hellequin
Hellequin
Member

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.