When you have new user registration , sometime you need more details like Yahoo MSN or ethnic , age , sex etc. This is a small hack for Your_Account for phpNUKE6.0-7.0 , let's try
-
open modules/Your_Account/index.php
***********
search for
function new_user() {
..........
.........
}
(just above function pass_lost() {)
*************
and replace with
function new_user() {
global $my_headlines, $module_name, $db, $gfx_chk;
if (!is_user($user)) {
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$random_num = mt_rand(0, $maxran);
include("header.php");
OpenTable();
echo "<center><font class="title"><b>"._USERREGLOGIN."</b></font></center>
";
CloseTable();
echo "<br>
";
OpenTable();
echo "<form action="modules.php?name=$module_name" method="post">
"
."<b>"._REGNEWUSER."</b> ("._ALLREQUIRED.")<br><br>
"
."<table cellpadding="0" cellspacing="10" border="0">
"
."<tr><td>"._NICKNAME.":</td><td><input type="text" name="username" size="30" maxlength="25"><font class="tiny">"._REQUIRED."</font> </td></tr>
"
."<tr><td>"._EMAIL.":</td><td><input type="text" name="user_email" size="30" maxlength="255"><font class="tiny">"._REQUIRED."</font> </td></tr>
"
//mod
."<tr><td>"._ICQ.":</td><td><input type="text" name="user_icq" size="20" maxlength="20"></td></tr>
"
."<tr><td>"._AIM.":</td><td><input type="text" name="user_aim" size="20" maxlength="20"></td></tr>
"
."<tr><td>"._YIM.":</td><td><input type="text" name="user_yim" size="20" maxlength="20"></td></tr>
"
."<tr><td>"._MSNM.":</td><td><input type="text" name="user_msnm" size="20" maxlength="20"></td></tr>
"
."<tr><td>"._LOCATION.":</td><td><input type="text" name="user_from" size="25" maxlength="60" value="USA"></td></tr>
"
."<tr><td>"._OCCUPATION.":</td><td><input type="text" name="user_occ" size="25" maxlength="60"></td></tr>
"
."<tr><td>"._INTERESTS.":</td><td><input type="text" name="user_intrest" size="25" maxlength="255"></td></tr>
"
."<tr><td>"._OPTION.":</td><td><INPUT TYPE="CHECKBOX" NAME="user_viewemail" VALUE="1"> "._ALLOWEMAILVIEW."</td></tr>
"
."<tr><td>"._SIGNATURE.":</td><td><TEXTAREA NAME="user_sig" ROWS="6" COLS="45"></TEXTAREA></td></tr>
"
//end
."<tr><td>"._PASSWORD.":</td><td><input type="password" name="user_password" size="11" maxlength="40"><font class="tiny">"._REQUIRED."</font> </td></tr>
"
."<tr><td>"._RETYPEPASSWORD.":</td><td><input type="password" name="user_password2" size="11" maxlength="40"><br><font class="tiny">("._BLANKFORAUTO.")</font></td></tr>
";
if (extension_loaded("gd") AND ($gfx_chk == 3 OR $gfx_chk == 4 OR $gfx_chk == 6 OR $gfx_chk == 7)) {
echo "<tr><td>"._SECURITYCODE.":</td><td><img src='modules.php?name=$module_name&op=gfx&random_num=$random_num' border='1' alt='"._SECURITYCODE."' title='"._SECURITYCODE."'></td></tr>
"
."<tr><td>"._TYPESECCODE.":</td><td><input type="text" NAME="gfx_check" SIZE="7" MAXLENGTH="6"></td></tr>
"
."<input type="hidden" name="random_num" value="$random_num">
";
}
echo "<tr><td colspan='2'>
"
."<input type="hidden" name="op" value="new user">
"
."<input type="submit" value=""._NEWUSER."">
"
."</td></tr></table>
"
."</form>
"
."<br>
"
.""._YOUWILLRECEIVE."<br><br>
"
.""._COOKIEWARNING."<br>
"
.""._ASREGUSER."<br>
"
."<ul>
"
."<li>"._ASREG1."
"
."<li>"._ASREG2."
"
."<li>"._ASREG3."
"
."<li>"._ASREG4."
"
."<li>"._ASREG5."
";
$handle=opendir('themes');
while ($file = readdir($handle)) {
if ((!ereg("[.]",$file) AND file_exists("themes/$file/theme.php"))) {
$thmcount++;
}
}
closedir($handle);
if ($thmcount > 1) {
echo "<li>"._ASREG6."
";
}
$sql = "SELECT custom_title FROM ".$prefix."_modules WHERE active='1' AND view='1' AND inmenu='1'";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$custom_title = $row[custom_title];
if ($custom_title != "") {
echo "<li>"._ACCESSTO." $custom_title
";
}
}
$sql = "SELECT title FROM ".$prefix."_blocks WHERE active='1' AND view='1'";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
$b_title = $row[title];
if ($b_title != "") {
echo "<li>"._ACCESSTO." $b_title
";
}
}
if (is_active("Journal")) {
echo "<li>"._CREATEJOURNAL."
";
}
if ($my_headlines == 1) {
echo "<li>"._READHEADLINES."
";
}
echo "<li>"._ASREG7."
"
."</ul>
"
.""._REGISTERNOW."<br>
"
.""._WEDONTGIVE."<br><br>
"
."<center><font class="content">[ <a href="modules.php?name=$module_name">"._USERLOGIN."</a> | <a href="modules.php?name=$module_name&op=pass_lost">"._PASSWORDLOST."</a> ]</font></center>
";
CloseTable();
include("footer.php");
} elseif (is_user($user)) {
global $cookie;
cookiedecode($user);
userinfo($cookie[1]);
}
}
--comments-->61--8948--17