Support Forum
Hi, I'm trying to use the post rating in a bit of a different way, not thumbs up or down, but love this and sorry to hear that kind of thing. I've been able to change the words shown and the icons, however I'd love to get rid of the -2 and just show the total for the "thumbs down". Is there any way to display the numbers in the positive? I know it will be a negative in database but thought there might be a way to show only the number.
Thanks for any help with this.
you didnt say which display of posting rating you wanted to change (forum view or topic view)... so assuming its topic view, you can use the filter 'sph_PostIndexRatePost' to affect the display and strip and minus (-) signs... If you meant forum view, the filter would be 'sph_spTopicIndexRating'
Visit Cruise Talk Central and Mr Papa's World
can you share what you did? maybe we can help... when you filter, you would want to strip or replace the - sign with php function str_replace()...
or maybe I am not understanding what you want to do... I understood you to say you wanted to remove the - sign from negative numbers...
Visit Cruise Talk Central and Mr Papa's World
I did try a replacement, and it replaced the - in the image url as well so that didn't work. I also tried to return the absolute value, but that didn't work at all. So unless there is a way to apply the replacement more specifically or possibly I didn't do the abs correctly, and that's why it returned nothing, I don't think it will work.
I don't fully understand php so it's possible I didn't code it correctly.
I couldn't find anyway to actually change the text without manually changing it in the code of the plugin. What I was trying to do is remove the - (minus) sign, and the + (plus) sign from the number, so it would just show the number.
We have a very personal site and people share, so we really didn't want thumbs up or down, but; I love this, and In support. I've changed the icons to a heart and a candle. I was able to do all of that. But would now like the "votes" to just show as whole numbers. I know in actuality the candle or thumbs down is a negative, but would like it to show up without the - (minus) in front of it. The plus sign doesn't really matter.
So in effect I've changed the text from reading Rate this post up to Love this and Rate this post down to sending support
I've changed the thumb up icon to a heart and the thumbs down to a candle.
Now when people have used the candle and someone looks at the topic it says current post -2 I'd prefer to remove the - from that.
So in effect we are not really using this as a rating system, but more like a facebook like, we wanted to also include the "in support" which is something people ask for all the time on facebook too. When you read someone has lost someone, you don't really want to click their like button, but want to send them a thinking of you, or in support type thing. That's what we are trying to do with your ratings plug in.
I know I'm using the plugin completely outside of the way it's intended. I know that I'm "hacking" it. Because I don't really know or understand php, I don't know what is easy versus what is difficult. It looks like a fairly complex plugin. Because I never know what is easy, I ask if something can be done. It seems like this isn't so I appreciate you're trying to help me out.
I am thinking however that this might be something to think about for the future . For quite a few of the forums I run we would prefer something more like this, then a standard rating system. Where people can say they like what was written, or that they are sorry to read what was written. It's more or less saying to the person that wrote the post, I read this even through I didn't respond in writing. So possibly taking this plugin and editing the thumbs part for easily manipulation via hooks, and only showing whole number. So there, you now have my wishlist for this plugin
I appreciate all that all of you do, and am just happy to have SimplePress and this forum.
Thanks!
something like this:
add_filter('sph_PostIndexRatePost', 'my_rating_filter', 10, 2); function my_rating_filter($out, $a) { $out = str_replace('>-', '>', $out); return $out; }
should do the trick... if you find its changing other things, we can change the str_replace() to a preg_replace() for better pattern matching...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)