Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
kmarion
Regular
Regular



Joined: Nov 23, 2003
Posts: 64

PostPosted: Tue Nov 25, 2003 9:37 pm Reply with quote

I am having trouble trying to decifer where to paste the text from the file finishnewuser.php. I have grabbed the file from modules/Your_Account/index.php.. however i am having a hard time finding exaclty where I need to make the changes. I see the text finishNewUser but I am not exactly sure where I need to paste..Sorry if the wasn't very descriptive...looking at code all day makes a man loopy. Thanks for your help
 
View user's profile Send private message Visit poster's website MSN Messenger
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Tue Nov 25, 2003 9:58 pm Reply with quote

It's a 1 for 1 swap. You replace the finishNewUer() function in the index.php with the one from my mod.
 
View user's profile Send private message
kmarion







PostPosted: Tue Nov 25, 2003 10:40 pm Reply with quote

I have replaced the functions saved the index.php file and uploaded it back into the modules>your account folder via [ Only registered users can see links on this board! Get registered or login! ] created a test account..and for some reason it still wants a confirmation in the email provided when registering.. as if nothing has changed.. seemend simple enough..sheesh. I have seen this in action at another site so I must be cursed Twisted Evil
 
Raven







PostPosted: Tue Nov 25, 2003 10:51 pm Reply with quote

When you say it wants a confirmation email, how do you know this? If you are going by the message on the screen, that is just a message and as I state in the installation notes, you will need to change the language file for the message. If you have replaced the function, there is no way that a confirmation email is required.
 
kmarion







PostPosted: Tue Nov 25, 2003 11:26 pm Reply with quote

Absolutely nothing is changing.. I am copying the function all the way and pasting it all the way in the original finishnewuser area of the original. I have tried this on 2 seperate domians I have " [ Only registered users can see links on this board! Get registered or login! ]" [ Only registered users can see links on this board! Get registered or login! ]". with same results.. I even re-downloaded the mod from your site to ensure I had a good copy of it... I am totaly blown away by this simple mod.. uugg ..I am recieving no error messages as well. Just when I go to try user name and pass its says incorrect login"as if I did not confirm email
 
Raven







PostPosted: Tue Nov 25, 2003 11:30 pm Reply with quote

I just tested it and you have something wrong in your index.php file or you have installed some other mod that has altered the user table. Check your error log to see if there are any errors being written.
 
kmarion







PostPosted: Tue Nov 25, 2003 11:39 pm Reply with quote

What am I mising here?
Should this not be the alteration ?

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







PostPosted: Tue Nov 25, 2003 11:40 pm Reply with quote

Please check you server and/or php error logs.
 
kmarion







PostPosted: Wed Nov 26, 2003 12:44 am Reply with quote

On 2 different servers?
I will check logs and I will stop spamming ur site now..lol.
I appreciate your time and have a good holiday Gaylen
- Kerry
 
Raven







PostPosted: Wed Nov 26, 2003 12:46 am Reply with quote

Kerry,

Try disabling the default login block. I don't think the 2 can coexist.
 
xantique
New Member
New Member



Joined: Aug 30, 2003
Posts: 22
Location: Istanbul

PostPosted: Sun Dec 21, 2003 7:33 am Reply with quote

Raven wrote:
.. you will need to change the language file for the message. If you have replaced the function, there is no way that a confirmation email is required.

Hi Raven ,
I resolved or bypassed my new-user-mail-link-activation-error* problem with your AutoActivate Mod for Nuke v7.0..

But on the page opened during the 1st stage of registration, is still marked that a confirmation mail will be sended to their adress....

Where to change this paradoxal language file for the message...

Thanks in advence and have a good holiday .

Nejat

*After upgrading from nuke 6.0 to 7.0 ,news users mail activation link were dead/hanged just after beeng reached back the site without any error code..
So new users were unable to reach their accounts via activation link sended to their adress...
Since two weeks I am digging MySql tables and applying all kind of solution proposals in nukecops forums but it dosn't worked .
 
View user's profile Send private message Visit poster's website
Raven







PostPosted: Sun Dec 21, 2003 7:37 am Reply with quote

Then you haven't set it up correctly Smile. Did you remember to change the setting
$autoActivate = FALSE;
to
$autoActivate = TRUE?
 
xantique







PostPosted: Sun Dec 21, 2003 7:38 am Reply with quote

Ok. I found it ..I t was just above..!! Laughing
Have a good holiday again..
Nejat
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

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 ©