Also willst du etwas an der JoinUs ändern hierfür zumindest was Frontend angeht bräuchten wir die Dateien joinus.htm, joinus.php und de.php.
Fangen wir mal mit der joinus.htm an diese finden wir in den Ordner include/templates/joinus.htm.
<form action="index.php?joinus" method="POST">
<fieldset>
<legend><b>{_lang_yourdata}:</b></legend>
<label style="float:left; width:100px; ">{_lang_joininfo}</label>{_lang_plsfilloutallfields}<br />
<label style="float:left; width:100px; ">{_lang_name}</label><input name="name"{readonly} maxlength="15" value="{name}" /><br />
<label style="float:left; width:100px; ">{_lang_skill}?</label><select name="skill">{skill}</select><br />
<label style="float:left; width:100px; ">{_lang_icqnumber}</label><input type="text" name="icqnumber" value="{icqnumber}" /><br />
<label style="float:left; width:100px; ">{_lang_favmap}</label><input type="text" name="favmap" value="{favmap}" /><br />
<label style="float:left; width:100px; ">{_lang_mail}</label><input type="text" name="mail" value="{mail}" /><br />
<label style="float:left; width:100px; ">{_lang_age}</label><input type="text" name="age" value="{age}" /><br />
<label style="float:left; width:100px; ">{_lang_hometown}</label><input type="text" name="hometown" value="{hometown}" /><br />
<label style="float:left; width:100px; ">{_lang_squad}</label><select name="squad">{squad}</select /><br />
<label style="float:left; width:100px; ">{_lang_ground}</label><textarea name="ground" cols="40" rows="5">{ground}</textarea><br />
{EXPLODE}
<label style="float:left; width:100px; ">{_lang_rules}</label><input type="checkbox" name="rules" value="{_lang_yes}" />{_lang_rulzreaded}<br />
{EXPLODE}
{RULES}
{EXPLODE}<br />
{ANTISPAM}
<label style="float:left; width:100px; "> </label><input type="submit" name="sub" value="{_lang_formsub}" /><br />
</fieldset>
</form>
Nun wollen wir ja ICQ-Nummer, fav. Map und Wohnort löschen.
Hier mal der Original joinus.htm Code mit Markierten stellen die wir entfernen wollen.
<form action="index.php?joinus" method="POST">
<fieldset>
<legend><b>{_lang_yourdata}:</b></legend>
<label style="float:left; width:100px; ">{_lang_joininfo}</label>{_lang_plsfilloutallfields}<br />
<label style="float:left; width:100px; ">{_lang_name}</label><input name="name"{readonly} maxlength="15" value="{name}" /><br />
<label style="float:left; width:100px; ">{_lang_skill}?</label><select name="skill">{skill}</select><br />
<label style="float:left; width:100px; ">{_lang_icqnumber}</label><input type="text" name="icqnumber" value="{icqnumber}" /><br />
<label style="float:left; width:100px; ">{_lang_favmap}</label><input type="text" name="favmap" value="{favmap}" /><br />
<label style="float:left; width:100px; ">{_lang_mail}</label><input type="text" name="mail" value="{mail}" /><br />
<label style="float:left; width:100px; ">{_lang_age}</label><input type="text" name="age" value="{age}" /><br />
<label style="float:left; width:100px; ">{_lang_hometown}</label><input type="text" name="hometown" value="{hometown}" /><br />
<label style="float:left; width:100px; ">{_lang_squad}</label><select name="squad">{squad}</select /><br />
<label style="float:left; width:100px; ">{_lang_ground}</label><textarea name="ground" cols="40" rows="5">{ground}</textarea><br />
{EXPLODE}
<label style="float:left; width:100px; ">{_lang_rules}</label><input type="checkbox" name="rules" value="{_lang_yes}" />{_lang_rulzreaded}<br />
{EXPLODE}
{RULES}
{EXPLODE}<br />
{ANTISPAM}
<label style="float:left; width:100px; "> </label><input type="submit" name="sub" value="{_lang_formsub}" /><br />
</fieldset>
</form>
Danach schaut die joinus.htm folgendermaßen aus.
<form action="index.php?joinus" method="POST">
<fieldset>
<legend><b>{_lang_yourdata}:</b></legend>
<label style="float:left; width:100px; ">{_lang_joininfo}</label>{_lang_plsfilloutallfields}<br />
<label style="float:left; width:100px; ">{_lang_name}</label><input name="name"{readonly} maxlength="15" value="{name}" /><br />
<label style="float:left; width:100px; ">{_lang_skill}?</label><select name="skill">{skill}</select><br />
<label style="float:left; width:100px; ">{_lang_mail}</label><input type="text" name="mail" value="{mail}" /><br />
<label style="float:left; width:100px; ">{_lang_age}</label><input type="text" name="age" value="{age}" /><br />
<label style="float:left; width:100px; ">{_lang_squad}</label><select name="squad">{squad}</select /><br />
<label style="float:left; width:100px; ">{_lang_ground}</label><textarea name="ground" cols="40" rows="5">{ground}</textarea><br />
{EXPLODE}
<label style="float:left; width:100px; ">{_lang_rules}</label><input type="checkbox" name="rules" value="{_lang_yes}" />{_lang_rulzreaded}<br />
{EXPLODE}
{RULES}
{EXPLODE}<br />
{ANTISPAM}
<label style="float:left; width:100px; "> </label><input type="submit" name="sub" value="{_lang_formsub}" /><br />
</fieldset>
</form>
Somit hätten wir den ersten teil geschafft und müssen uns nun an der joinus.php machen diese finden wir im Ordner include/contents/joinus.php
<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
$title = $allgAr['title'].' :: Joinus';
$hmenu = 'Joinus';
$design = new design ( $title , $hmenu );
$design->header();
if ( 0 == db_count_query("SELECT COUNT(*) FROM prefix_groups WHERE show_joinus = 1") ) {
echo $lang['noteamthere'];
$design->footer();
exit ();
}
$skill_ar = array (
1 => $lang['verybad'],
2 => $lang['bad'],
3 => $lang['middle'],
4 => $lang['good'],
5 => $lang['verygood'],
);
$far = array (
'name',
'skill',
'icqnumber',
'favmap',
'mail',
'age',
'hometown',
'squad',
'ground',
'rules'
);
$x = 0;
foreach ($far as $v) {
if (!empty($_POST[$v])) {
$$v = escape($_POST[$v], 'string');
$x++;
} else {
$$v = '';
}
}
$xname = escape_nickname($name);
$ch_name = false;
if (loggedin()) {
$ch_name = true;
} elseif (isset($_POST['sub']) AND $name == $xname AND !empty($name)
AND 0 == db_result(db_query("SELECT COUNT(*) FROM prefix_user WHERE name = BINARY '".$name."'"),0)) {
$ch_name = true;
}
if (count($far) <> $x OR $ch_name == false OR !chk_antispam('joinus')) {
$tpl = new tpl ( 'joinus.htm' );
$skill = arlistee ($skill, $skill_ar);
$squad = '<option value="0">choose</option>';
$squad .= dblistee ($squad, "SELECT id,name FROM prefix_groups WHERE show_joinus = 1 ORDER BY pos");
if (loggedin()) { $name = $_SESSION['authname']; }
foreach($far as $v) {
if ($x > 0 AND empty($_POST[$v])) {
echo 'missing: '.$lang[$v].'<br />';
}
$tpl->set ($v, $$v);
}
if ($x > 0 AND $name != $xname) {
echo $lang['wrongnickname'].'<br />';
} elseif ($x > 0 AND $ch_name == false) {
echo $lang['namealreadyinuse'].'<br />';
}
$name = $xname;
$tpl->set('readonly', (loggedin()?' readonly': ''));
$tpl->out(0);
if ($allgAr['joinus_rules'] != 1) {
$tpl->out(1);
} else {
$rules = '<h2>'.$lang['rules'].'</h2>';
$rerg = db_query('SELECT zahl,titel,text FROM `prefix_rules` ORDER BY zahl');
while ($rrow = db_fetch_row($rerg)) {
$rules .= '<table width="100%" border="0" cellpadding="5" cellspacing="1" class="border">';
$rules .= '<tr class="Cmite"><td><b>§'.$rrow[0].'. '.$rrow[1].'</b></td></tr>';
$rules .= '<tr class="Cnorm"><td>'.bbcode($rrow[2]).'</td></tr>';
$rules .= '</table><br />';
}
$rules .= '<input type="checkbox" name="rules" value="'.$lang['yes'].'" />'.str_replace(array('<a target="_blank" href="index.php?rules">','</a>'),'',$lang['rulzreaded']).'<br />';
$tpl->set_out('RULES',$rules,2);
}
$tpl->set('ANTISPAM', get_antispam('joinus', 100));
$tpl->out(3);
} else { # eintragen
$name = $xname;
$userreg = $lang['no'];
if (!loggedin() AND $allgAr['forum_regist'] <> 0) {
$x = user_regist ($name,$mail,genkey(8));
$userreg = $lang['yes'];
}
db_query("INSERT INTO prefix_usercheck (`check`,name,datime,ak,groupid) VALUES ('".genkey(8)."','".$name."',NOW(),4,$squad)");
$squad = escape($squad, 'integer');
$abf = "SELECT `mod1`, `mod2`, `mod4`, name FROM prefix_groups WHERE id = ".$squad;
$erg = db_query($abf);
$row = db_fetch_assoc($erg);
$rulz = (isset($_POST['rules'])?$_POST['rules']:$lang['no']);
$skill = $skill_ar[$skill];
# bitte in der richtigen reihenfolge angeben, sonst das nicht gehen tun, kann.
$mailtxt = sprintf ($lang['joinusprivmsg'],
$name,
$row['name'],
$skill,
$mail,
$hometown,
$age,
$icqnumber,
$favmap,
$ground,
$rulz,
$userreg
);
# pm an den leader
sendpm ($_SESSION['authid'], $row['mod1'], 'Joinus Anfrage',$mailtxt, -1);
# Wenn Co Leader != Leader
if ($row['mod2'] != $row['mod1']){
sendpm ($_SESSION['authid'], $row['mod2'], 'Joinus Anfrage',$mailtxt, -1);
}
if ($row['mod4'] != $row['mod1'] AND $row['mod2'] != $row['mod4']){
sendpm ($_SESSION['authid'], $row['mod4'], 'Joinus Anfrage',$mailtxt, -1);
}
if (!loggedin() AND $allgAr['forum_regist'] <> 0) {
echo $lang['amailhasbeensenttoyouwithmailandpass'].'<br /><br />';
}
echo sprintf($lang['leaderofxalert'], $row['name']);
}
$design->footer();
?>
Hier müssen wir nun schauen wo er icqnumber, favmap und hometown alles verwendet und dementsprechend entfernen.
<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
$title = $allgAr['title'].' :: Joinus';
$hmenu = 'Joinus';
$design = new design ( $title , $hmenu );
$design->header();
if ( 0 == db_count_query("SELECT COUNT(*) FROM prefix_groups WHERE show_joinus = 1") ) {
echo $lang['noteamthere'];
$design->footer();
exit ();
}
$skill_ar = array (
1 => $lang['verybad'],
2 => $lang['bad'],
3 => $lang['middle'],
4 => $lang['good'],
5 => $lang['verygood'],
);
$far = array (
'name',
'skill',
'icqnumber',
'favmap',
'mail',
'age',
'hometown',
'squad',
'ground',
'rules'
);
$x = 0;
foreach ($far as $v) {
if (!empty($_POST[$v])) {
$$v = escape($_POST[$v], 'string');
$x++;
} else {
$$v = '';
}
}
$xname = escape_nickname($name);
$ch_name = false;
if (loggedin()) {
$ch_name = true;
} elseif (isset($_POST['sub']) AND $name == $xname AND !empty($name)
AND 0 == db_result(db_query("SELECT COUNT(*) FROM prefix_user WHERE name = BINARY '".$name."'"),0)) {
$ch_name = true;
}
if (count($far) <> $x OR $ch_name == false OR !chk_antispam('joinus')) {
$tpl = new tpl ( 'joinus.htm' );
$skill = arlistee ($skill, $skill_ar);
$squad = '<option value="0">choose</option>';
$squad .= dblistee ($squad, "SELECT id,name FROM prefix_groups WHERE show_joinus = 1 ORDER BY pos");
if (loggedin()) { $name = $_SESSION['authname']; }
foreach($far as $v) {
if ($x > 0 AND empty($_POST[$v])) {
echo 'missing: '.$lang[$v].'<br />';
}
$tpl->set ($v, $$v);
}
if ($x > 0 AND $name != $xname) {
echo $lang['wrongnickname'].'<br />';
} elseif ($x > 0 AND $ch_name == false) {
echo $lang['namealreadyinuse'].'<br />';
}
$name = $xname;
$tpl->set('readonly', (loggedin()?' readonly': ''));
$tpl->out(0);
if ($allgAr['joinus_rules'] != 1) {
$tpl->out(1);
} else {
$rules = '<h2>'.$lang['rules'].'</h2>';
$rerg = db_query('SELECT zahl,titel,text FROM `prefix_rules` ORDER BY zahl');
while ($rrow = db_fetch_row($rerg)) {
$rules .= '<table width="100%" border="0" cellpadding="5" cellspacing="1" class="border">';
$rules .= '<tr class="Cmite"><td><b>§'.$rrow[0].'. '.$rrow[1].'</b></td></tr>';
$rules .= '<tr class="Cnorm"><td>'.bbcode($rrow[2]).'</td></tr>';
$rules .= '</table><br />';
}
$rules .= '<input type="checkbox" name="rules" value="'.$lang['yes'].'" />'.str_replace(array('<a target="_blank" href="index.php?rules">','</a>'),'',$lang['rulzreaded']).'<br />';
$tpl->set_out('RULES',$rules,2);
}
$tpl->set('ANTISPAM', get_antispam('joinus', 100));
$tpl->out(3);
} else { # eintragen
$name = $xname;
$userreg = $lang['no'];
if (!loggedin() AND $allgAr['forum_regist'] <> 0) {
$x = user_regist ($name,$mail,genkey(8));
$userreg = $lang['yes'];
}
db_query("INSERT INTO prefix_usercheck (`check`,name,datime,ak,groupid) VALUES ('".genkey(8)."','".$name."',NOW(),4,$squad)");
$squad = escape($squad, 'integer');
$abf = "SELECT `mod1`, `mod2`, `mod4`, name FROM prefix_groups WHERE id = ".$squad;
$erg = db_query($abf);
$row = db_fetch_assoc($erg);
$rulz = (isset($_POST['rules'])?$_POST['rules']:$lang['no']);
$skill = $skill_ar[$skill];
# bitte in der richtigen reihenfolge angeben, sonst das nicht gehen tun, kann.
$mailtxt = sprintf ($lang['joinusprivmsg'],
$name,
$row['name'],
$skill,
$mail,
$hometown,
$age,
$icqnumber,
$favmap,
$ground,
$rulz,
$userreg
);
# pm an den leader
sendpm ($_SESSION['authid'], $row['mod1'], 'Joinus Anfrage',$mailtxt, -1);
# Wenn Co Leader != Leader
if ($row['mod2'] != $row['mod1']){
sendpm ($_SESSION['authid'], $row['mod2'], 'Joinus Anfrage',$mailtxt, -1);
}
if ($row['mod4'] != $row['mod1'] AND $row['mod2'] != $row['mod4']){
sendpm ($_SESSION['authid'], $row['mod4'], 'Joinus Anfrage',$mailtxt, -1);
}
if (!loggedin() AND $allgAr['forum_regist'] <> 0) {
echo $lang['amailhasbeensenttoyouwithmailandpass'].'<br /><br />';
}
echo sprintf($lang['leaderofxalert'], $row['name']);
}
$design->footer();
?>
Danach schaut die joinus.php folgendermaßen aus.
<?php
# Copyright by: Manuel
# Support: www.ilch.de
defined ('main') or die ( 'no direct access' );
$title = $allgAr['title'].' :: Joinus';
$hmenu = 'Joinus';
$design = new design ( $title , $hmenu );
$design->header();
if ( 0 == db_count_query("SELECT COUNT(*) FROM prefix_groups WHERE show_joinus = 1") ) {
echo $lang['noteamthere'];
$design->footer();
exit ();
}
$skill_ar = array (
1 => $lang['verybad'],
2 => $lang['bad'],
3 => $lang['middle'],
4 => $lang['good'],
5 => $lang['verygood'],
);
$far = array (
'name',
'skill',
'mail',
'age',
'squad',
'ground',
'rules'
);
$x = 0;
foreach ($far as $v) {
if (!empty($_POST[$v])) {
$$v = escape($_POST[$v], 'string');
$x++;
} else {
$$v = '';
}
}
$xname = escape_nickname($name);
$ch_name = false;
if (loggedin()) {
$ch_name = true;
} elseif (isset($_POST['sub']) AND $name == $xname AND !empty($name)
AND 0 == db_result(db_query("SELECT COUNT(*) FROM prefix_user WHERE name = BINARY '".$name."'"),0)) {
$ch_name = true;
}
if (count($far) <> $x OR $ch_name == false OR !chk_antispam('joinus')) {
$tpl = new tpl ( 'joinus.htm' );
$skill = arlistee ($skill, $skill_ar);
$squad = '<option value="0">choose</option>';
$squad .= dblistee ($squad, "SELECT id,name FROM prefix_groups WHERE show_joinus = 1 ORDER BY pos");
if (loggedin()) { $name = $_SESSION['authname']; }
foreach($far as $v) {
if ($x > 0 AND empty($_POST[$v])) {
echo 'missing: '.$lang[$v].'<br />';
}
$tpl->set ($v, $$v);
}
if ($x > 0 AND $name != $xname) {
echo $lang['wrongnickname'].'<br />';
} elseif ($x > 0 AND $ch_name == false) {
echo $lang['namealreadyinuse'].'<br />';
}
$name = $xname;
$tpl->set('readonly', (loggedin()?' readonly': ''));
$tpl->out(0);
if ($allgAr['joinus_rules'] != 1) {
$tpl->out(1);
} else {
$rules = '<h2>'.$lang['rules'].'</h2>';
$rerg = db_query('SELECT zahl,titel,text FROM `prefix_rules` ORDER BY zahl');
while ($rrow = db_fetch_row($rerg)) {
$rules .= '<table width="100%" border="0" cellpadding="5" cellspacing="1" class="border">';
$rules .= '<tr class="Cmite"><td><b>§'.$rrow[0].'. '.$rrow[1].'</b></td></tr>';
$rules .= '<tr class="Cnorm"><td>'.bbcode($rrow[2]).'</td></tr>';
$rules .= '</table><br />';
}
$rules .= '<input type="checkbox" name="rules" value="'.$lang['yes'].'" />'.str_replace(array('<a target="_blank" href="index.php?rules">','</a>'),'',$lang['rulzreaded']).'<br />';
$tpl->set_out('RULES',$rules,2);
}
$tpl->set('ANTISPAM', get_antispam('joinus', 100));
$tpl->out(3);
} else { # eintragen
$name = $xname;
$userreg = $lang['no'];
if (!loggedin() AND $allgAr['forum_regist'] <> 0) {
$x = user_regist ($name,$mail,genkey(8));
$userreg = $lang['yes'];
}
db_query("INSERT INTO prefix_usercheck (`check`,name,datime,ak,groupid) VALUES ('".genkey(8)."','".$name."',NOW(),4,$squad)");
$squad = escape($squad, 'integer');
$abf = "SELECT `mod1`, `mod2`, `mod4`, name FROM prefix_groups WHERE id = ".$squad;
$erg = db_query($abf);
$row = db_fetch_assoc($erg);
$rulz = (isset($_POST['rules'])?$_POST['rules']:$lang['no']);
$skill = $skill_ar[$skill];
# bitte in der richtigen reihenfolge angeben, sonst das nicht gehen tun, kann.
$mailtxt = sprintf ($lang['joinusprivmsg'],
$name,
$row['name'],
$skill,
$mail,
$age,
$ground,
$rulz,
$userreg
);
# pm an den leader
sendpm ($_SESSION['authid'], $row['mod1'], 'Joinus Anfrage',$mailtxt, -1);
# Wenn Co Leader != Leader
if ($row['mod2'] != $row['mod1']){
sendpm ($_SESSION['authid'], $row['mod2'], 'Joinus Anfrage',$mailtxt, -1);
}
if ($row['mod4'] != $row['mod1'] AND $row['mod2'] != $row['mod4']){
sendpm ($_SESSION['authid'], $row['mod4'], 'Joinus Anfrage',$mailtxt, -1);
}
if (!loggedin() AND $allgAr['forum_regist'] <> 0) {
echo $lang['amailhasbeensenttoyouwithmailandpass'].'<br /><br />';
}
echo sprintf($lang['leaderofxalert'], $row['name']);
}
$design->footer();
?>
Nun zum schluss müssen wir noch die de.php bearbeiten da der
mailtext die angaben an die de.php
joinusprivmsg weitergibt bzw die Angaben dorthin übergibt und dann verwendet.
Diese Datei finden wir im Ordner include/includes/lang/de.php.
Dort finden wir bei joinusprivmsg folgendes
'joinusprivmsg' => "Hallo,\n%s möchte %s beitreten.\n\nFolgende Angaben hat er gemacht:\nSkill: %s\neMail: %s\nWohnort: %s\nAlter: %s\nICQ: %s\nFav.Map: %s\nGrund: %s\n\nEr hat die Regeln akzeptiert: %s\n\nWurde direkt als User registriert: %s\nWenn dort nein steht dann war er zum Zeitpunkt der Anfrage schon User.\n\nIm Adminmenu unter Teams kannst du ihn freischalten, oder die Anfrage löschen. Wenn er als User registriert wurde, muss er die Registrierung jenach Einstellung erst bestätigen.",
Hier müssen wir ICQ, Fav.Map und Wohnort natürlich auch herausnehmen.
Dort steht es als Wohnort: %s\n, ICQ: %s\n und Fav.Map: %s\n
Geändert müsste es dann so ausschauen.
'joinusprivmsg' => "Hallo,\n%s möchte %s beitreten.\n\nFolgende Angaben hat er gemacht:\nSkill: %s\neMail: %s\nAlter: %s\nGrund: %s\n\nEr hat die Regeln akzeptiert: %s\n\nWurde direkt als User registriert: %s\nWenn dort nein steht dann war er zum Zeitpunkt der Anfrage schon User.\n\nIm Adminmenu unter Teams kannst du ihn freischalten, oder die Anfrage löschen. Wenn er als User registriert wurde, muss er die Registrierung jenach Einstellung erst bestätigen.",
Nun hoffe ich aber das du es dir genau anschaust den immer vom Kopieren und Einfügen der fertigen Lösung lernt man es nicht