|
|
| Author |
Message |
duncan4000 Corporal

Joined: 30 Aug 2006 Posts: 18
|
Posted: Wed Aug 30, 2006 1:27 am Post subject: Confirmation email is not sent |
|
|
|
i installed phpnuke and it does not send out email conformation
my web page is with freehostia and they said that i cant use mail ()
is there a module a can use to atomatlicly activate people
or is there another host i can go to
thanks for any help
also im using phpnuke 7.8 |
|
| Back to top |
|
 |
Floren President


Joined: 08 Mar 2006 Posts: 1318 Location: USA
|
|
| Back to top |
|
 |
duncan4000 Corporal

Joined: 30 Aug 2006 Posts: 18
|
Posted: Wed Aug 30, 2006 3:06 am Post subject: |
|
|
|
| yea but most of them dont work with 7.8 |
|
| Back to top |
|
 |
arnoldkrg President

Joined: 29 Jun 2003 Posts: 1576 Location: United Kingdom
|
Posted: Wed Aug 30, 2006 2:02 pm Post subject: AutoActivate mod |
|
|
|
I have updated an auto activate mod to work with Nuke 7.8. This script was written by Gaylen Fraley from http://www.ravenphpscripts.com. The credit is due to him and the copyright in the mods remains with him. I have only updated it.
| Quote: | This modification should allow your users to Instantly register and activate. It is experimental only right now. Let me know if it works or not.
Backup modules/Your_Account/index.php
Edit modules/Your_Account/index.php
Find the function finishNewUser()
Replace it with this one
That's it!
Gaylen Fraley
raven@ravenphpscripts.com |
And here is my modified finishNewUser function.
| 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, $language;
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 {
////
$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_avatar_type, user_regdate, user_lang) VALUES (NULL, '$row[username]', '$row[user_email]', '$row[user_password]', 'gallery/blank.gif', 3, '$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");
} |
I have tested this and it works fine on an unpatched PHP-Nuke 7.8 site.
It should be noted that the copy/paste process may add invisible blank characters to the ends of code lines. These MUST be removed using a decent text editor before uploading to your site. I use Crimson Editor _________________

Last edited by arnoldkrg on Sat Jan 20, 2007 5:17 pm; edited 2 times in total |
|
| Back to top |
|
 |
duncan4000 Corporal

Joined: 30 Aug 2006 Posts: 18
|
Posted: Thu Aug 31, 2006 1:37 am Post subject: |
|
|
|
it works thank u very much
another question
if some1 forgets there password is there another way other than email |
|
| Back to top |
|
 |
sgtrok Sergeant

Joined: 07 Aug 2006 Posts: 21
|
Posted: Wed Sep 06, 2006 9:45 am Post subject: |
|
|
|
Arnold your a genius. Your update worked like a charm. Do you know how to make the "link" a different color or more pronounced?
I wish I found out what my e-mail link was but this works.
Thank You! |
|
| Back to top |
|
 |
sgtrok Sergeant

Joined: 07 Aug 2006 Posts: 21
|
Posted: Wed Sep 06, 2006 10:55 am Post subject: |
|
|
|
when I auto-registered as a test people are still advised that they will get an e-mail although by clicking register they finish the process..this will seem to confuse people.
looking at another site theirs just says this::
-----------------------------------------------------------------------------------
User Registration/Login
New User Registration: Final Step
joe, please check the following information. If all is correct you can proceed with the registration by clicking on "Finish" button, otherwise "Go Back" and change whatever information is needed.
Username: joe
Email: joe@aol.com
--------------------------------------------------------------------------------
how do I get my site to just say this? |
|
| Back to top |
|
 |
arnoldkrg President

Joined: 29 Jun 2003 Posts: 1576 Location: United Kingdom
|
Posted: Thu Sep 07, 2006 10:27 am Post subject: messages |
|
|
|
in modules/Your_Account/index.php find in the confirmNewUser function
| Code: | ."<tr><td><b>"._EMAIL.":</b> $user_email</td></tr></table><br><br>"
."<center><b>"._NOTE."</b> "._YOUWILLRECEIVE.""; |
and change to:
| Code: | | ."<tr><td><b>"._EMAIL.":</b> $user_email</td></tr></table>"; |
_________________
 |
|
| Back to top |
|
 |
abadtooth Lance Corporal

Joined: 07 Sep 2006 Posts: 6
|
Posted: Thu Sep 07, 2006 1:43 pm Post subject: |
|
|
|
Lol.
I use freehostia too....
I simply set up the smtp server in the pbpbb forums admin panel and it works fine for me now...only thing is I have a plan with freehostia.
If you use a free account they dont let you use smtp  |
|
| Back to top |
|
 |
sgtrok Sergeant

Joined: 07 Aug 2006 Posts: 21
|
Posted: Thu Sep 07, 2006 2:25 pm Post subject: |
|
|
|
| Once again it worked! Thanks man your awesome! |
|
| Back to top |
|
 |
|
|
 |
|
|