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

MOD-CP FRAGE

Recommended Posts

Ich möchte nochmals nachfragen wie man folgendes macht.

Zur vereinfachung dieses Bild :

1.gif

Dort möchte ich noch ein Feld haben das man den User seine Gruppe bearbeiten kann , also von Member auf Banned oder so setzen kann. Ich weiss einige sagen wieder es geht vom ACP aber ich möchte dieses da haben ;)

so soll dieses denn aussehn ok da ist dieses in der Regestrierung eingebaut

Diese Auswahl der Gruppe möchte ich im Mod-CP /Manage Members haben

ich habe auch mal den code mit angehängt wie dieses da in der Registrierung gemacht wurde nur ich keinen Plan habe wie ich des ändere das ich das in der MOD-CP habe :(

Sorry wenn ich damit nerve aber ist wichtig ;)

/*-----------------------------*\

| Register Into Group of Choice |

\*-----------------------------*/


This Modification will let users register into any group they select when Registering.


You can set in the groups setting wether or not to let them register into that one, Any accounts with Admin CP are disabled by default 


Yes this will work for people who have Admin/Email validation.


First Step: Upload db_change.php to you're forums root directory (This is where index.php and admin.php are) wait for the OK Message then continue with the edits.


REMEMBER: ALWAYS backup you're files before installing a Modification.




Files Effected:


./sources/Register.php

./sources/Admin/ad_groups.php

./Skin/s#/skin_register.php

./lang/##/lang_register.php



Open ./sources/Register.php


-------------------------

Find:

-------------------------


    	$this->output    .= $this->html->ShowForm( array( 'TEXT'        => $ibforums->lang['std_text'],

                      'RULES'       => $ibforums->lang['click_wrap'],

                      'coppa_user'  => $coppa,

                )      );

                

-------------------------

Add Below:

-------------------------


    	$reg_intogroup = "<select name=\"reg_into_group\">\n";

  $DB->query("SELECT g_id,g_title FROM ibf_groups WHERE g_reg_choice=1 OR g_id='{$ibforums->vars['member_group']}' ORDER BY g_id DESC");

  while($r = $DB->fetch_row()) {

  	$selected = "";

  	if($r['g_id'] == $ibforums->vars['member_group']) {

    $selected = " selected";

  	}

  	$reg_intogroup .= "<option value=\"{$r['g_id']}\"".$selected.">".$r['g_title']."</option>\n";

  }      

  $reg_intogroup .= "<select>";

  $this->output = str_replace("<!--{REG.INTOGROUP}-->",$this->html->register_into($reg_intogroup),$this->output);


-------------------------

Find:

-------------------------

  //+--------------------------------------------

  //| Build up the hashes

  //+--------------------------------------------

  

  $mem_group = $ibforums->vars['member_group'];



-------------------------

Replace With:

-------------------------


  //+--------------------------------------------

  //| Build up the hashes

  //+--------------------------------------------

  

  $DB->query("SELECT g_id,g_title,g_access_cp FROM ibf_groups WHERE g_reg_choice=1 OR g_id='{$ibforums->vars['member_group']}' ORDER BY g_id DESC");

  $allowed_groups = array();

  while($r = $DB->fetch_row()) {

  	$allowed_groups[$r['g_id']] = 1;

  }

  if($allowed_groups[$ibforums->input['reg_into_group']]) {

  	$mem_group = $ibforums->input['reg_into_group'];

  } else {

  	// Bad people trying to register into a group they don't have permission to register into

  	$mem_group = $ibforums->vars['member_group'];

  }


-------------------------

Find:

-------------------------


	'real_group'  => $ibforums->vars['member_group'],

	'temp_group'  => $ibforums->vars['auth_group'],



-------------------------

Replace With:

-------------------------


	'real_group'  => $ibforums->input['reg_into_group'],

	'temp_group'  => $ibforums->vars['auth_group'],




Save and Open ./sources/Admin/ad_groups.php



-------------------------

Find:

-------------------------



  $ADMIN->html .= $SKIN->add_td_row( array( "<b>Hide this group from the member list?</b>" ,

              $SKIN->form_yes_no("g_hide_from_list", $group['g_hide_from_list'] )

              )      );


-------------------------

Add Below:

-------------------------



  $ADMIN->html .= $SKIN->add_td_row( array( "<b>Allow users to Register into this group?" ,

              $SKIN->form_yes_no("g_reg_choice", $group['g_reg_choice'] )

              )      );



-------------------------

Find:

-------------------------


	'g_email_limit'  => intval($IN['join_limit']).':'.intval($IN['join_flood']),



-------------------------

Add Below:

-------------------------



	'g_reg_choice'  	=> $IN['g_reg_choice'],  





Save and open ./Skin/s#/skin_register.php


-------------------------

Find:

-------------------------


<?php


class skin_register {


-------------------------

Add Below:

-------------------------



function register_into($groups) {

global $ibforums;

return <<<EOF

  <tr>

    <td class="pformleft"><b>{$ibforums->lang['reg_into_group']}</b><br />{$ibforums->lang['reg_intogroup_desc']}</td>

    <td class="pformright">{$groups}</td>

  </tr>

EOF;

}


-------------------------

Find:

-------------------------


  <!--{REQUIRED.FIELDS}-->


-------------------------

Add Above:

-------------------------



  <!--{REG.INTOGROUP}-->




Save and open ./lang/##/lang_register.php


-------------------------

Find:

-------------------------


<?php


$lang = array (


-------------------------

Add Below:

-------------------------


'reg_into_group'	=> "Please select group to Register into:",

'reg_intogroup_desc'	=> "This is the group you will be in after registering.",

     








Save and reupload all the files back to where you got them from.



After you will have to add the groups who the users can upgrade too.


By default the Members group included with Invision Power Board is the selected one.

Edited by webbi

Share this post


Link to post

Sorry wenn ich damit nerve aber ist wichtig ;)

Sorry, wenn Dir das erst mal nicht für den Mod weiter hilft, aber es hat Dich sicherlich auch schon jeder hier richtig verstanden ;)

Wenn aber noch niemand drauf geantwortet hat, dann hat entweder niemand Zeit, Lust oder sieht darin einen vernünftigen Sinn ;)

Daher beschleunigst Du es natürlich aúch nicht damit, daß Du die gleiche Frage nun in ein und dem selben Forum 2 mal postest ;)

Dies wollte ich nur mal kurz am rande los werden, und nun solltest Du Dich eben einfach mal gedulden, und evtl. nimmt sich ja dann Deiner mal jemand an ;)

Bedenke Bitte, daß hier jeder freiwillig hilft, kostenlos und aus freude am helfen, und daß es aber keine Garantie geben wird das immer und jeder seinen wünschen gerecht werden kann :)

Thx und viel Glück weiterhin....

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  

×