Author |
Message |
jib_intelli
Hangin' Around
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Aug 17, 2004
Posts: 43
|
Posted:
Tue Aug 17, 2004 9:32 pm |
|
Is there an autoactivation mod for phpnuke 7.3, the one on this site doesnt seem to work, atleast not for me. Could someone please test it, and help me. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
GeekyGuy
Client
![](modules/Forums/images/avatars/455145a540d60199e57fd.gif)
Joined: Jun 03, 2004
Posts: 302
Location: Huber Heights Ohio
|
Posted:
Tue Aug 17, 2004 9:35 pm |
|
What is your site, I'll test it? You can private message me if you want |
_________________ "The Daytona 500 is ours! We won it, we won it, we won it!", Dale Earnhardt, February 15th, 1998, Daytona 500 |
|
![ICQ Number ICQ Number](themes/RavenIce/forums/images/lang_english/icon_icq_add.gif) |
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
Site Admin/Owner
![](modules/Forums/images/avatars/45030c033f18773153cd2.gif)
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Tue Aug 17, 2004 9:58 pm |
|
It's on my list to check and update, if needed. I haven't had time to check it out. Soon - I hope ![ROTFL](modules/Forums/images/smiles/rotfl.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jib_intelli
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Aug 19, 2004 6:43 pm |
|
Raven please please please do it! Make it work with phpnuke v 7.3 I am getting desperate. I am losing visitors and members because of this. Please help me! ![Bang Head](modules/Forums/images/smiles/banghead.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
GeekyGuy
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Aug 19, 2004 6:49 pm |
|
jib_intelli,
I have the autoactivate working on my site, and I am using Raven's 7.3. It works fine.
Could you have missed something in the install? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jib_intelli
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Aug 19, 2004 8:27 pm |
|
Do you mean the autoactivate mod, in which we have to change the funtion finishuser? or something else? I was trying to use this one, in which we had to change the function finishuser and when I tried to test it, the new user was not even added to the waiting users list!!
If you are using another one, please let me know.
Thanks Geeky. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jib_intelli
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Aug 19, 2004 8:29 pm |
|
I mean this one.
Quote: |
function finishNewUser($username, $user_email, $user_password, $random_num, $gfx_check) {
global $stop, $EditedMessage, $adminmail, $sitename, $Default_Theme, $user_prefix, $db, $storyhome, $module_name, $nukeurl;
include_once("header.php");
include("config.php");
userCheck($username, $user_email);
$user_regdate = date("M d, Y");
if (!isset($stop)) {
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
if (extension_loaded("gd") AND $code != $gfx_check) {
Header("Location: modules.php?name=$module_name");
die();
}
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$check_num = mt_rand(0, $maxran);
$check_num = md5($check_num);
$time = time();
$finishlink = "$nukeurl/modules.php?name=$module_name&op=activate&username=$username&check_num=$check_num";
$new_password = md5($user_password);
$db->sql_query("INSERT INTO ".$user_prefix."_users_temp (user_id, username, user_email, user_password, user_regdate, check_num, time) VALUES (NULL, '$username', '$user_email', '$new_password', '$user_regdate', '$check_num', '$time')");
if(!$result) {
echo ""._ERROR."<br>";
} else {
////
global $db, $user_prefix, $module_name, $language;
$past = time()-86400;
$db->sql_query("DELETE FROM ".$user_prefix."_users_temp WHERE time < $past");
$sql = "SELECT * FROM ".$user_prefix."_users_temp WHERE username='$username' AND check_num='$check_num'";
$result = $db->sql_query($sql);
if ($db->sql_numrows($result) == 1) {
$row = $db->sql_fetchrow($result);
if ($check_num == $row[check_num]) {
$db->sql_query("INSERT INTO ".$user_prefix."_users (user_id, username, user_email, user_password, user_avatar, user_regdate, user_lang) VALUES (NULL, '$row[username]', '$row[user_email]', '$row[user_password]', 'gallery/blank.gif', '$row[user_regdate]', '$language')");
$db->sql_query("DELETE FROM ".$user_prefix."_users_temp WHERE username='$username' AND check_num='$check_num'");
// include_once("header.php");
title(""._ACTIVATIONYES."");
// OpenTable();
echo "<center><b>$row[username]:</b> "._ACTMSG."</center>";
// CloseTable();
// include("footer.php");
// die();
} else {
// include("header.php");
title(""._ACTIVATIONERROR."");
// OpenTable();
echo "<center>"._ACTERROR1."</center>";
// CloseTable();
// include("footer.php");
// die();
}
} else {
// include("header.php");
title(""._ACTIVATIONERROR."");
// OpenTable();
echo "<center>"._ACTERROR2."</center>";
// CloseTable();
// include("footer.php");
die();
}
////
}
} else {
echo "$stop";
}
include("footer.php");
}
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
GeekyGuy
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Aug 19, 2004 8:40 pm |
|
I used the one I got here:
Only registered users can see links on this board! Get registered or login!
I hope this helps ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
chatserv
Member Emeritus
![](modules/Forums/images/avatars/Risque/fhf215.jpg)
Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico
|
Posted:
Thu Aug 19, 2004 9:50 pm |
|
The following is a mix of Raven's original code, what little changes in 7.3 and a line or two from Nuke Patched 2.5, let me know if it works for you as i haven't tested it.
Code:function finishNewUser($username, $user_email, $user_password, $random_num, $gfx_check) {
global $stop, $EditedMessage, $adminmail, $sitename, $Default_Theme, $user_prefix, $db, $storyhome, $module_name, $nukeurl;
include_once("header.php");
include("config.php");
userCheck($username, $user_email);
$user_regdate = date("M d, Y");
if (!isset($stop)) {
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
if (extension_loaded("gd") AND $code != $gfx_check AND ($gfx_chk == 3 OR $gfx_chk == 4 OR $gfx_chk == 6 OR $gfx_chk == 7)) {
Header("Location: modules.php?name=$module_name");
die();
}
mt_srand ((double)microtime()*1000000);
$maxran = 1000000;
$check_num = mt_rand(0, $maxran);
$check_num = md5($check_num);
$time = time();
$finishlink = "$nukeurl/modules.php?name=$module_name&op=activate&username=$username&check_num=$check_num";
$new_password = md5($user_password);
$username = check_html($username, nohtml);
$user_email = check_html($user_email, nohtml);
$result = $db->sql_query("INSERT INTO ".$user_prefix."_users_temp (user_id, username, user_email, user_password, user_regdate, check_num, time) VALUES (NULL, '$username', '$user_email', '$new_password', '$user_regdate', '$check_num', '$time')");
if(!$result) {
echo ""._ERROR."<br>";
} else {
global $db, $user_prefix, $module_name, $language;
$past = time()-86400;
$db->sql_query("DELETE FROM ".$user_prefix."_users_temp WHERE time < $past");
$sql = "SELECT * FROM ".$user_prefix."_users_temp WHERE username='$username' AND check_num='$check_num'";
$result = $db->sql_query($sql);
if ($db->sql_numrows($result) == 1) {
$row = $db->sql_fetchrow($result);
if ($check_num == $row[check_num]) {
$db->sql_query("INSERT INTO ".$user_prefix."_users (user_id, username, user_email, user_password, user_avatar, user_regdate, user_lang) VALUES (NULL, '$row[username]', '$row[user_email]', '$row[user_password]', 'gallery/blank.gif', '$row[user_regdate]', '$language')");
$db->sql_query("DELETE FROM ".$user_prefix."_users_temp WHERE username='$username' AND check_num='$check_num'");
title(""._ACTIVATIONYES."");
echo "<center><b>$row[username]:</b> "._ACTMSG."</center>";
} else {
title(""._ACTIVATIONERROR."");
echo "<center>"._ACTERROR1."</center>";
}
} else {
title(""._ACTIVATIONERROR."");
echo "<center>"._ACTERROR2."</center>";
die();
}
}
} else {
echo "$stop";
}
include("footer.php");
}
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
chatserv
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Aug 19, 2004 9:55 pm |
|
If the code works, it can be used with 7.4 as well. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
GeekyGuy
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Aug 19, 2004 10:03 pm |
|
chatserv,
It seemed to work on my local testsite, no problems at all.
I hope jib_intelli comes on soon so he can test it also |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
chatserv
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Aug 19, 2004 10:10 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
jib_intelli
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Aug 20, 2004 12:36 am |
|
Ok I tested it on my local server. I got an _ERROR, so after the line about the _ERROR, I inserted an echo mysql_error(); and got the following>>
Quote: | _ERROR
Table 'nuke.potter_users_temp' doesn't exist |
Now the name of the table is wrong here! The table is named nuke_users_temp and my database is nuke, on the local machine. On the server, the database is potter_nuke and table is nuke_users_temp.
So any suggestions? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
chatserv
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Aug 20, 2004 4:57 am |
|
Make sure your $user_prefix matches $prefix on config.php |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|