Page Index Toggle Pages: [1] 2 3  Send TopicPrint
Very Hot Topic (More than 25 Replies) [DONE-UPDATED] Enhanced Report to Moderator - v1.3 (Read 18383 times)
snYpir
New Member
*
Offline


Yo' all

Posts: 48
Joined: Apr 17th, 2002
[DONE-UPDATED] Enhanced Report to Moderator - v1.3
Apr 17th, 2002 at 10:29am
Print Post  
Report to Moderator v1.3 SP

Download

Download version 1.1 here.

Download version 1.3 (recommended) here. Make sure you fully uninstall earlier versions and re-install this version with boardmod!

Download the upgrade from v1.1/v1.2 to v1.3 here.

To upgrade from v1.1 run the mod using boardmod, then upload AdminEdit.pl, english.lng, Display.pl and ReportToMod.pl (in the zip) to your server.

To upgrade from v1.2 download the above zip and simply copy ReportToMod.pl up to your server. Wink

About

For YaBB SP 1.1

This mod allows members to report posts to moderators, global moderators or administrators depending on settings you select in 'Forum Preferences and Settings'.

Features
  • 'Report' link added to top right of posts.
  • User confirmation required to send the report.
  • Large area for comment on post.
  • Verbose emails sent to moderators/global mods/admins.
  • Configurable via the admin center. Options available include:

    'Use The Chain Of Command When Sending Reports To Moderators' (default)

    - Reports will be sent to the first level of the chain of command that is available. For example, if a report is sent and moderators exist for the board in question, then the moderators for that board will receive the message. If not, the report will be sent to global mods. If there are no global mods then administrators will receive the report.

    'Always Send Reports To Moderators'

    - Reports will always be sent to the moderators of the board in question.

    'Always Send Reports To Global Moderators'

    - Reports will always be sent to global moderators.

    'Always Send Reports To Administrators'

    - Reports will always be sent to administrators.

    Any combination of the four is acceptable, but it makes sense to either have option 1 on and 2, 3 and 4 off or option 1 off and either 2, 3 or 4 on.

    For example, if on my board I only wanted reports to be sent to admins. I would deselect options 1, 2 and 3 and select option 4.

    If I wanted reports to only be sent to moderators (and never hassle global mods or admins) i would set option 2.

    If I wanted reports to be sent up the chain of command, but always to admins, I would select options 1 and 4.

    get it? Grin

    History

    1.3 SP: text formating in confirmation screen improved
    1.3 SP: updated ReportToMod.pl (no boardmod changes) to correctly handle users with display names different from user names

    1.2 SP: added some settings to 'Forum Preferences and Settings', under 'Send Mails using'. See the readme file for more info.
    1.2 SP: reporting on guest posts fixed. previously when reporting on guest posts guest name and email was not sent in email.

    1.1 SP: nicer confirmation display thanks to Gekko. Slight code changes to links.

    1.0 SP: better support for boards without moderators added. if there are no moderators, the script sends emails to global mods (if there are any) or admins automatically.

    0.7 SP: allows for bigger comments (text area instead of normal input)
    0.7 SP: bug when sending emails fixed (sent two emails to moderators now only sends one)
    0.7 SP: confirmation added prior to submitting comment
    0.7 SP: confirmation screen added (after reports sent out to moderators)
    0.7 SP: location of 'Report' link changed to top right of posts
    0.7 SP: 'Report' link given an icon
    0.7 SP: subs now located in seperate file -> ReportToMod.pl

    0.6 SP: made compatible with Service Pack (Jalapeno)
    0.6: Bugs fixed (thanks to Lost!)

    0.5: First release

    Compatibility

    No compatibility issues have been found. This mod seems compatible with most other popular mods.

    Comments!

    Unless there are any bug reports or improvement suggestions this version is final Grin yeah!

    Please let me know here if there are any problems (features not working, or suggestions). Especially any to do with text formatting (in version 1.3)...
  • « Last Edit: Apr 23rd, 2002 at 12:17am by snYpir »  

    Report_to_mod_v_0_7.zip ( 3 KB | 133 Downloads )
    Back to top
    WWW  
    IP Logged
     
    Pointers
    Junior Member
    **
    Offline


    I love an correctly running
    YaBB ...

    Posts: 75
    Joined: Jan 17th, 2002
    Gender: Male
    Re: [BETA] Enhanced Report to Moderator Mod
    Reply #1 - Apr 18th, 2002 at 2:04pm
    Print Post  
    hoi,
    i tested this mod on my board... can't find any errors... good job Smiley
      

    Back to top
    WWW  
    IP Logged
     
    snYpir
    New Member
    *
    Offline


    Yo' all

    Posts: 48
    Joined: Apr 17th, 2002
    Re: [DONE] Enhanced Report to Moderator Mod
    Reply #2 - Apr 19th, 2002 at 11:48pm
    Print Post  
    *bump*

    just one bump only... will send this to the database unless anyone suggests improvements.

    thanks for your reply Pointers! Cheesy
      
    Back to top
    WWW  
    IP Logged
     
    mercator
    New Member
    *
    Offline



    Posts: 25
    Joined: Dec 20th, 2001
    Re: [DONE] Enhanced Report to Moderator Mod
    Reply #3 - Apr 20th, 2002 at 10:07am
    Print Post  
    could you change it a bit, so it only sends a mail to the admin?
    I don't want to give my moderators too much work.
      
    Back to top
     
    IP Logged
     
    snYpir
    New Member
    *
    Offline


    Yo' all

    Posts: 48
    Joined: Apr 17th, 2002
    Re: [DONE] Enhanced Report to Moderator Mod
    Reply #4 - Apr 20th, 2002 at 10:19am
    Print Post  
    strange, my moderators are there to do all my work... ;)

    i won't make those changes, because most people would want a 'report to moderators' mod to report to moderators...

    but the change is very easy for you to make. Open ReportToMod.pl, and find:

    [code]      # reload moderator info from scratch
         fopen(FILE, "$boardsdir/$currentboard.dat");
         @yyBoardInfo =<FILE>;
         fclose(FILE);

         chomp @yyBoardInfo;

       # loop through all moderators for current board
         foreach(split(/\|/,$yyBoardInfo[2])) {
               if (-e "$memberdir/$_.dat") {
                     fopen(MODERATOR, "$memberdir/$_.dat");
                     @modprop = <MODERATOR>;
                     fclose(MODERATOR);
                     chomp($modprop[2]);

                     # send mail to modprop
                     &sendmail($modprop[2],"$mailsub","$mailtext");

                     # update message
                     $sentto .= qq~<b>$modprop[1]</b><br>~;
                     $mailto = qq~$rtm{'23'}:~;
               }
         }[/code]

    and now delete it. now only global mods and administrators will be sent the email.

    sweet?
      
    Back to top
    WWW  
    IP Logged
     
    mercator
    New Member
    *
    Offline



    Posts: 25
    Joined: Dec 20th, 2001
    Re: [DONE] Enhanced Report to Moderator Mod
    Reply #5 - Apr 20th, 2002 at 11:00am
    Print Post  
    thanks for the great mod!
      
    Back to top
     
    IP Logged
     
    Mork
    Junior Member
    **
    Offline


    > clickety click <

    Posts: 99
    Joined: Aug 19th, 2001
    Gender: Male
    Re: [DONE] Enhanced Report to Moderator Mod
    Reply #6 - Apr 20th, 2002 at 12:33pm
    Print Post  
    and what about send them thingies to both ?

    to the proper moderators AND the admin ?
      

    ..::: A computer without windows is like a cake without mustard :::..
    Back to top
    WWW  
    IP Logged
     
    snYpir
    New Member
    *
    Offline


    Yo' all

    Posts: 48
    Joined: Apr 17th, 2002
    Re: [DONE] Enhanced Report to Moderator Mod
    Reply #7 - Apr 20th, 2002 at 12:42pm
    Print Post  
    i was sort of trying to use the chain of command...

    moderators moderate, right? do admins want to be notified if there is a out-of-line post somewhere? maybe they do...

    i was thinking of a check box where the member selects 'send to admin as well' or something but i think that would lead to members selecting it every time.

    what i'll do is put an option in the admin center, something like 'Notify administrators of reported posts', which when selected will cause the script to email administrators as well as moderators when a report is made.

    i don't have time tonight... if you want it'll take two seconds to make the script automatically email administrators.

    open ReportToMod.pl and find:

    [code]      # no global moderators found? try administrators
         if ($sentto eq "") {
               foreach $curentry (@members) {
                     &LoadUser($curentry);
                     if( $userprofile{$curentry}->[7] eq "Administrator" ) {
                           $sentto .= qq~<b>$userprofile{$curentry}->[1]</b><br>~;
                           &sendmail($userprofile{$curentry}->[2],"$mailsub","$mailtext");
                           $mailto = qq~$rtm{'25'}:~;
                     }
               }
         }[/code]

    replace it with:

    [code]      # email to administrators also
         fopen(FILE, "$memberdir/memberlist.txt");
         @members = <FILE>;
         fclose(FILE);
         chomp @members;      
         foreach $curentry (@members) {
               &LoadUser($curentry);
               if( $userprofile{$curentry}->[7] eq "Administrator" ) {
                     $sentto .= qq~<b>$userprofile{$curentry}->[1]</b><br>~;
                     &sendmail($userprofile{$curentry}->[2],"$mailsub","$mailtext");
               }
         }[/code]

    and that should do it. it will now send to admins as well as the moderators of the board.

    i didn't test this, but it should work ok.
      
    Back to top
    WWW  
    IP Logged
     
    snYpir
    New Member
    *
    Offline


    Yo' all

    Posts: 48
    Joined: Apr 17th, 2002
    Re: [DONE] Enhanced Report to Moderator Mod
    Reply #8 - Apr 20th, 2002 at 12:46pm
    Print Post  
    or just upload this version (one i prepared earlier) Wink

    cancel that - download the one down a bit Wink
    « Last Edit: Apr 21st, 2002 at 8:38am by snYpir »  

    reporttomod.zip ( 1 KB | 141 Downloads )
    Back to top
    WWW  
    IP Logged
     
    Gekko
    Full Member
    ***
    Offline



    Posts: 231
    Joined: Aug 21st, 2001
    Gender: Male
    Re: [DONE] Enhanced Report to Moderator Mod
    Reply #9 - Apr 20th, 2002 at 1:26pm
    Print Post  
    @snYpir

    Well done!

    I remove some \n on "# send mail to modprop" and changed twice

    $cgi&action=display&num=$FORM{'thread'}&start=$FORM{'id'}
    to
    $cgi&action=display&num=$FORM{'thread'}&start=$FORM{'id'}#$FORM{'id'}

    I also changed:

    Code
    Select All
    	my $offender = $FORM{'poster'};
    
    	$yymain .= qq~
    <table border=0 width="65%" cellspacing=1 bgcolor="$color{'bordercolor'}" class="bordercolor" align="center" cellpadding="4">
      <tr>
        <td class="titlebg" bgcolor="$color{'titlebg'}"><font size=2 class="text1" color="$color{'titletext'}"><b>$rtm{'7'}:</b></font></td>
      </tr>
      <tr>
        <td class="windowbg" bgcolor="$color{'windowbg'}" align="left">
    ~;
    
    	# find email addy of offending poster 
    
    
    Code
    Select All
    $yymain .= qq~$sentto<br><a m{'21'}</a></td></tr></table>~; 
    
    


    cu Gekko
      
    Back to top
     
    IP Logged
     
    Pointers
    Junior Member
    **
    Offline


    I love an correctly running
    YaBB ...

    Posts: 75
    Joined: Jan 17th, 2002
    Gender: Male
    Re: [DONE] Enhanced Report to Moderator Mod
    Reply #10 - Apr 20th, 2002 at 1:43pm
    Print Post  
    i'll tested your changes... no errors... your mod is again a good work... 8)
      

    Back to top
    WWW  
    IP Logged
     
    snYpir
    New Member
    *
    Offline


    Yo' all

    Posts: 48
    Joined: Apr 17th, 2002
    Re: [DONE] Enhanced Report to Moderator Mod
    Reply #11 - Apr 20th, 2002 at 2:04pm
    Print Post  
    Cheers Gekko! I have made the changes, and re-zipped it all.

    Smiley
      
    Back to top
    WWW  
    IP Logged
     
    mercator
    New Member
    *
    Offline



    Posts: 25
    Joined: Dec 20th, 2001
    Re: [DONE] Enhanced Report to Moderator Mod
    Reply #12 - Apr 20th, 2002 at 8:37pm
    Print Post  
    snYpir, if I leave the part away like you suggested, I get an error that there are no global moderators or admins on my board.

    How to fix that?
      
    Back to top
     
    IP Logged
     
    snYpir
    New Member
    *
    Offline


    Yo' all

    Posts: 48
    Joined: Apr 17th, 2002
    Re: [DONE] Enhanced Report to Moderator Mod
    Reply #13 - Apr 20th, 2002 at 11:52pm
    Print Post  
    ok attached is a working version for you mercator. i tested it this time... just upload over your current reporttomod.pl file... 8)
      

    Back to top
    WWW  
    IP Logged
     
    kreatiV
    Junior Member
    **
    Offline


    I love YaBB 1G - SP1!

    Posts: 70
    Joined: Mar 26th, 2002
    Re: [DONE] Enhanced Report to Moderator Mod
    Reply #14 - Apr 21st, 2002 at 7:46am
    Print Post  
    NIce mod!

    Tested it on my board. I also used the "mail admin and mods" Version.

    Whats weird is that in some forums it mails only the mod, in others it mails the admins and the mods. I am not sure why it does this though  Sad
      
    Back to top
     
    IP Logged
     
    Page Index Toggle Pages: [1] 2 3 
    Send TopicPrint