Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.3
Author Message
jib_intelli
Hangin' Around



Joined: Aug 17, 2004
Posts: 43

PostPosted: Tue Aug 17, 2004 9:32 pm Reply with quote

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.
 
View user's profile Send private message
GeekyGuy
Client



Joined: Jun 03, 2004
Posts: 302
Location: Huber Heights Ohio

PostPosted: Tue Aug 17, 2004 9:35 pm Reply with quote

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 
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Tue Aug 17, 2004 9:58 pm Reply with quote

It's on my list to check and update, if needed. I haven't had time to check it out. Soon - I hope ROTFL
 
View user's profile Send private message
jib_intelli







PostPosted: Thu Aug 19, 2004 6:43 pm Reply with quote

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! RavensScripts Sad Sad Sad Confused Confused Crying or Very sad Crying or Very sad Crying or Very sad Crying or Very sad Bang Head
 
GeekyGuy







PostPosted: Thu Aug 19, 2004 6:49 pm Reply with quote

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?
 
jib_intelli







PostPosted: Thu Aug 19, 2004 8:27 pm Reply with quote

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.
 
jib_intelli







PostPosted: Thu Aug 19, 2004 8:29 pm Reply with quote

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");
}
 
GeekyGuy







PostPosted: Thu Aug 19, 2004 8:40 pm Reply with quote

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
 
chatserv
Member Emeritus



Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico

PostPosted: Thu Aug 19, 2004 9:50 pm Reply with quote

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");
}
 
View user's profile Send private message Visit poster's website
chatserv







PostPosted: Thu Aug 19, 2004 9:55 pm Reply with quote

If the code works, it can be used with 7.4 as well.
 
GeekyGuy







PostPosted: Thu Aug 19, 2004 10:03 pm Reply with quote

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
 
chatserv







PostPosted: Thu Aug 19, 2004 10:10 pm Reply with quote

Good to hear.
 
jib_intelli







PostPosted: Fri Aug 20, 2004 12:36 am Reply with quote

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?
 
chatserv







PostPosted: Fri Aug 20, 2004 4:57 am Reply with quote

Make sure your $user_prefix matches $prefix on config.php
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.3

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©