Firefox PHP

Module for rating posts

Posted by Mensler 
Re: Module for rating posts
August 19, 2006 11:35PM
module for rating users would be cool! :)
Re: Module for rating posts
August 20, 2006 03:51AM
Thanks again, this is a nice mod.

As for the function to hide messages with a certain amount of negative posts, would it be possible to strip some of the code from this earlier module to use for that purpose?

[www.phorum.org]


This mod could branch out into other things as well. There's lots of potential. Things like a page like 'toprated.tpl' listing the top 10 users with the most positive feedback. A similar page for the most positive voted threads. Likewise, there could be a page generating a list of the least positive users from the votes.

Would that be possible? It would be great if so since it would encourage responsible use of a forum.



Edited 1 time(s). Last edit at 08/20/2006 04:01AM by M@AATW.
Re: Module for rating posts
August 20, 2006 04:03AM
I don't think so.
this would mean that the ratings need to be stored for the user too and as the data is usually in the meta-data there is no easy way to select it through a sorting query.
I'm not saying its impossible, just a lot of work.


Thomas Seifert
Re: Module for rating posts
August 20, 2006 04:35AM
ok I suppose that would be a seperate module as loot suggested.
Re: Module for rating posts
August 20, 2006 08:13AM
Quote
M@AATW
As for the function to hide messages with a certain amount of negative posts, would it be possible to strip some of the code from this earlier module to use for that purpose?

Of course hiding this way would be possible, but I would prefer a method where just the body is hidden and the subject is shown (together with the indicator image). The user can click on the subject to show the whole message.
Maybe a custom profile field would be good where the user can set a value for his own, which messages should be hidden. Of course that would require template changes and more work for installation.

Quote

Things like a page like 'toprated.tpl' listing the top 10 users with the most positive feedback. A similar page for the most positive voted threads. Likewise, there could be a page generating a list of the least positive users from the votes.

As Thomas said, sorting by the ratings is difficult.
But at least we could save each rating in the author's meta-data too and show the indicator image in the user's profile...

Greetings,
Clemens

--
Clemens Weiß
Webplain.de
Re: Module for rating posts
August 20, 2006 08:49AM
Yep those are good ideas - I especially like the idea of the image on the profile page.

I think what you are suggesting for hiding messages is quite similar to the 'Ignore User Module' - [www.phorum.org]

Like I said this is a good 'starting point' kind of module with lots of potential for development in different ways. I'm sure there are other ways to use this that we haven't thought of yet!

Thank you for your work on it Clemens.



Edited 1 time(s). Last edit at 08/20/2006 08:51AM by M@AATW.
Re: Module for rating posts
August 21, 2006 11:29AM
Quote
M@AATW
Yep those are good ideas - I especially like the idea of the image on the profile page.

OK, I added this one. See the initial post of this thread.
Again you need to disable/enable the module after updating.
I wrote a little update script that can be used to count the messages that are already rated and add the value to the author's profile data. Simply upload update_user_ratings.php in your Phorum folder and call it in your browser. Don't forget to backup your database before calling it and to delete the script afterwards.

Quote

I think what you are suggesting for hiding messages is quite similar to the 'Ignore User Module' - [www.phorum.org]

Yeah, that's not bad. I'll take a look.

Quote

Thank you for your work on it Clemens.

You're welcome :-)

Greetings,
Clemens

--
Clemens Weiß
Webplain.de



Edited 1 time(s). Last edit at 08/23/2006 06:09AM by Mensler.
Attachments:
open | download - update_user_ratings.php (1.6 KB)
Re: Module for rating posts
August 21, 2006 02:18PM
Hmmm....I can't get this to work.

I added

{IF PROFILE->mod_rating_img}
<tr>
<td nowrap="nowrap">{LANG->mod_rating->UserRating}:&nbsp;</td>
<td><img src="mods/rating/images/{PROFILE->mod_rating_img}.png" alt="{PROFILE->mod_rating_img_title}" title="{PROFILE->mod_rating_img_title}" /></td>
</tr>
{/IF}

but I got nothing. Do I need to add a custom field for this?
Re: Module for rating posts
August 21, 2006 02:29PM
ok I got it working now ;-)

Fantastic!

Although the update script didn't work for me.



Edited 1 time(s). Last edit at 08/21/2006 02:34PM by M@AATW.
Re: Module for rating posts
August 21, 2006 08:03PM
Quote
M@AATW
ok I got it working now ;-)

What was wrong? Is there something that should be mentioned?
The custom field should be generated the first time it is needed.

Quote

Although the update script didn't work for me.

Was there an error or is it just not counting the user ratings of already rated messages?

--
Clemens Weiß
Webplain.de
Sorry, only registered users may post in this forum.

Click here to login