Author Topic: [MOD REQ] Rate comments - good / bad  (Read 37244 times)

0 Members and 1 Guest are viewing this topic.

Offline Lucifix

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
    • http://www.slo-foto.net
Re: [MOD REQ] Rate comments - good / bad
« Reply #15 on: January 08, 2009, 01:18:04 PM »
Can you please give me link where I can find demo just to see how it's working?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD REQ] Rate comments - good / bad
« Reply #16 on: January 08, 2009, 01:27:06 PM »
... e.g. ... here ... for a image comment ...
... or ... here ... for a guestbook comment ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline alekinna

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
    • Gallery of cross-stitching
Re: [MOD REQ] Rate comments - good / bad
« Reply #17 on: January 08, 2009, 02:19:21 PM »
here my changings ...

1. in the file details.php
after your ...
Code: [Select]
$comment_rank .= "+".$comment_row[$i]['is_good']." ".$comrate_good." ".$comrate_bad." ".$comment_row[$i]['is_bad']."-";

I added this...
Code: [Select]
$site_template->register_vars("comment_rank", $comment_rank);

Thank you mawenzi, I forgot to add this step.

Quote
... I think, you should post your [MOD] Rate Comments in a new thread in Mods & Plugins (Requests & Discussions) ...
... and then we will move this thread to Mods & Plugins (Releases & Support) ...

Am I need to create a new topic?

Also I think will be more interesting if some function will based on comment_rank.
For example:
user rate comment -> comment's author karma +point (or -point)
when comment's author will get karma = 20, he will allowed to download/upload more images
his karma can be again < 20, so it's good motivation for user to be an active member.

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [MOD REQ] Rate comments - good / bad
« Reply #18 on: January 08, 2009, 03:07:21 PM »
wow! thank you very much for this!
one question: where can i see who rate the comment?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD REQ] Rate comments - good / bad
« Reply #19 on: January 08, 2009, 03:22:00 PM »
Am I need to create a new topic?

... I think ... yes ... as a right MOD-Thread, that started with a full and complet mod installations description ...
... and there you can also update the mod-code or -description if it is necessary ...
... I mean ... this thread is only for testing ... then the most users can't find the right way for installation between all the code snippets here ... ;)

Also I think will be more interesting if some function will based on comment_rank.
... ok ... it can also used e.g. in Egly's [MOD] Small Credit System ...
... so we wait for your new thread ...  :mrgreen:
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD REQ] Rate comments - good / bad
« Reply #20 on: January 08, 2009, 03:29:41 PM »
@ Loda ...  8O ... f.u.g.n.J. ... ;)

... da in der Tab-Zeile "who_rated" die User-IDs gespeichert werden, sollte das auch möglich sein ...
... die Frage ist nur : In welcher Form soll das angezeigt werden ? ... und ... Für wen wir das angezeigt ? ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [MOD REQ] Rate comments - good / bad
« Reply #21 on: January 08, 2009, 03:59:30 PM »
@mawenzi... f.u.g.n.J. ..., too (ich lebe noch!)

...angezeigt für den admin!? zB.
.. und kann ich im profil auslesen, wie viele gute bzw. schlechte kommentare der user bekommen hat?

PS: bei dir hat sich ein fehler eingeschlichen: "...schlechten kommentar.." und nicht "schlachten"  :wink:

Offline om6acw

  • Full Member
  • ***
  • Posts: 187
    • View Profile
    • My Animal's World
Re: [MOD REQ] Rate comments - good / bad
« Reply #22 on: January 08, 2009, 06:41:24 PM »
great mod, would be nice to have this mod without page reloading ;)
« Last Edit: January 08, 2009, 09:40:11 PM by om6acw »

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD REQ] Rate comments - good / bad
« Reply #23 on: January 08, 2009, 09:08:20 PM »
one question: where can i see who rate the comment?
... and ...
Quote from: Loda
...angezeigt für den admin!? zB.

... a very fast solution ... ;)
... you can see who has rated but you can't edit who has rated ... in ACP via  website Commet-Admin-Link  ...

1. in admin/comments.php on the top find ...
Code: [Select]
$sql = "SELECT comment_id, image_id, user_id, user_name, comment_headline
and add after ...
Code: [Select]
, is_good, is_bad, who_rated

2. in admin/comments.php in section if ($action == "editcomment") find ...
Code: [Select]
show_form_footer($lang['save_changes'], $lang['reset'], 2);
and add above ...
Code: [Select]
//----
  show_input_row("Bewertung: Gut <span class=\"smalltext\">(nicht editierbar)</span>", "is_good", $comment['is_good'], $textinput_size);
  show_input_row("Bewertung: Schlecht <span class=\"smalltext\">(nicht editierbar)</span>", "is_bad", $comment['is_bad'], $textinput_size);
  show_input_row("Bewertung: Wer (User-ID) ? <span class=\"smalltext\">(nicht editierbar)</span>", "who_rated", $comment['who_rated'], $textinput_size);
//----

... for editing you need some more changes ... ;)
« Last Edit: January 08, 2009, 09:22:17 PM by mawenzi »
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD REQ] Rate comments - good / bad
« Reply #24 on: January 09, 2009, 04:09:55 AM »
@alekinna:
You forgot include permission check, so members can vote only for comments they allowed to view.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline alekinna

  • Jr. Member
  • **
  • Posts: 51
    • View Profile
    • Gallery of cross-stitching
Re: [MOD REQ] Rate comments - good / bad
« Reply #25 on: January 09, 2009, 08:14:41 AM »
V@no, I don't understand.. If an user not allowed to view comment, how he can to rate it (how he will see the rate-images).

Also I forgot one important thing - users can't rate for their own comments.
So I changed step 1.2 and added line in step 2.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD REQ] Rate comments - good / bad
« Reply #26 on: January 09, 2009, 08:38:01 AM »
by using direct link, i.e.:
details.php?action=comrate_bad&id=1
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD REQ] Rate comments - good / bad
« Reply #27 on: January 09, 2009, 01:02:42 PM »
@  alekinna

... for permission check I added in step 1 on the top the following ...
Code: [Select]
$allow_read_comments = (check_permission("auth_readcomment", $cat_id));
... and in step 1 I use this sql extension 2 times ...
Code: [Select]
if (($user_info['user_level'] != GUEST) and ($allow_read_comments == 1)) {
... and after tests ... I can say it works incl. error message if user has no permission to read the comments ...

@V@no
... any mistakes or hints ... ?
« Last Edit: January 09, 2009, 03:40:48 PM by mawenzi »
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [MOD REQ] Rate comments - good / bad
« Reply #28 on: January 09, 2009, 02:35:04 PM »
... a very fast solution ... ;)
... you can see who has rated but you can't edit who has rated ... in ACP via  website Commet-Admin-Link  ...

thank you very much, mawenzi!

Offline Loda

  • Sr. Member
  • ****
  • Posts: 353
    • View Profile
    • Fotosucht Schweiz
Re: [MOD REQ] Rate comments - good / bad
« Reply #29 on: January 09, 2009, 02:58:03 PM »
Also I forgot one important thing - users can't rate for their own comments.
So I changed step 1.2 and added line in step 2.

...i cannot see any changes? please can you show me what you've change? thank you.