Jump to content
InvisionCommunity.de - Der Deutsche Invision Community Support
Sign in to follow this  
craxelburger

Mindestens X Posts (Emaileinschränkung)

Recommended Posts

Wie passe ich diesen Mod an, damit er nicht nur die PM´s einschänkt, sondern auch die Emails? Möglichst mit zwei ACP Eingabefeldern. (User müssen mindestens X Posts haben.) Ich hoffe das das Emailsystem ähnlich beschränkt werden kann.

ALTER TABLE ibf_groups ADD g_posts_needed_pm int(5) default '20'
Open ./sources/Messenger.php from your root directory and find:  
if (empty($this->member['id'])) {

  $std->Error( array( 'LEVEL' => 1, 'MSG' => 'no_guests' ) );

 }
Add After:
       $post_sub = $this->member['g_posts_needed_pm'] - $info['MEMBER_POSTS']    = $this->member['posts'];

       if($post_sub > 0) {

  $std->Error( array( 'LEVEL' => 1, 'MSG' => 'posts_needed_low' ) );

       exit;

       }
Save and upload ./sources/Messenger.php Open ./sources/Admin/ad_groups.php and find:
'g_max_mass_pm'        => $IN['g_max_mass_pm'],
Add After
'g_posts_needed_pm'       => $IN['g_posts_needed_pm'],
Find
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Max. Number users allowed to mass PM?$guest_legend<br>(Enter 0 or leave blank to disable mass PM)" ,

             $SKIN->form_input("g_max_mass_pm", $group['g_max_mass_pm'] )

             )      );
Add After:  
$ADMIN->html .= $SKIN->add_td_row( array( "<b>Posts Needed to PM$guest_legend<br>(Enter a # or leave at default (20) )" ,

            $SKIN->form_input("g_posts_needed_pm", $group['g_posts_needed_pm'] )

            )      );
Save and upload ./sources/Admin/ad_groups.php Open ./lang/en/lang_error.php and find:
data_incorrect     => "One of the data fields contained the incorrect type of data, please double check the URL or data you entered into the form",

);

?>
Replace With:  
data_incorrect     => "One of the data fields contained the incorrect type of data, please double check the URL or data you entered into the form",

posts_needed_low     => "You Do not have the required amount of posts to use the PM system",

);

?>

Save and upload ./lang/en/lang_error.php

Edited by craxelburger

Share this post


Link to post

Mal eine Frage nebenbei, warum braucht man dazu einen Mod?

Du kannst doch mehrere Gruppen anlegen, bei der ersten Mitgliedergruppe den Zugriff aufs PM und Mail System deaktivieren und bei der zweiten aktivieren. Nun mit der Promo-Funktion einstellen, nach wievielen Posts die Mitglieder von Gruppe A nach Gruppe B geschoben werden.

Sollte doch auf das Gleiche hinauskommen. :)

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×