You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 134 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - autoActivateMod blank page [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
riki
Nuke Soldier
Nuke Soldier


Joined: Jul 10, 2003
Posts: 16


PostPosted: Tue Jul 29, 2003 5:03 am Reply with quoteBack to top

I want to allow to new users to register without sending comfirmation email, just let them register instantly clicking on the new registrations line.
I downloaded hack "autoActivateMod".
I changed in modules/Your_account/ index.php for autoActivateMod exactly what was required but when I try to click on the new registrations line I get blank page, as well as clicking on the Your account link.

I was loking for the similar problem in the forum, but with no luck.

Did anybody have such problem and how to solve it out please?
Find all posts by rikiView user's profileSend private message
riki
Nuke Soldier
Nuke Soldier


Joined: Jul 10, 2003
Posts: 16


PostPosted: Tue Jul 29, 2003 5:04 am Reply with quoteBack to top

I am using Php-Nuke 6.5
Find all posts by rikiView user's profileSend private message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Tue Jul 29, 2003 5:24 am Reply with quoteBack to top

Did you try my auto activation mod http://gaylenandmargie.com/nuke/html/modules.php?name=Downloads&d_op=viewdownloaddetails&lid=58

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
riki
Nuke Soldier
Nuke Soldier


Joined: Jul 10, 2003
Posts: 16


PostPosted: Tue Jul 29, 2003 5:54 am Reply with quoteBack to top

Yes
Find all posts by rikiView user's profileSend private message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Tue Jul 29, 2003 6:11 am Reply with quoteBack to top

Well, I know it works Wink and so do over 1,000 others. If it is not working then something else is wrong or yoy did not install it correctly.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
riki
Nuke Soldier
Nuke Soldier


Joined: Jul 10, 2003
Posts: 16


PostPosted: Tue Jul 29, 2003 6:20 am Reply with quoteBack to top

I am not saying that it is wrong. I do know it is a perfect hack. What I am trying to find out why it does not work for me, where could be mistake on my site. Smile
Find all posts by rikiView user's profileSend private message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Tue Jul 29, 2003 6:59 am Reply with quoteBack to top

Sorry, that wasn't my intent. I know your weren't saying that. And it's not perfect Rolling Eyes Laughing

Do you have other mods installed or is this the only one?

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
riki
Nuke Soldier
Nuke Soldier


Joined: Jul 10, 2003
Posts: 16


PostPosted: Tue Jul 29, 2003 7:40 am Reply with quoteBack to top

There is only one. I did it first time and Php-nuke 6.5 is installed fresh new only a few weeks. I am trying just get all working together.
What I did was:
I did open modules>Your_Account> index.php and found the line with function finishNewUser() then I copied whole script from finishNewUser.php file and did paste it in to the place in index.php

Then I went to browser to my site to make a new user, but after clicking on the link to create new user ... I got blank page.

Was it correct?
Find all posts by rikiView user's profileSend private message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Tue Jul 29, 2003 7:57 am Reply with quoteBack to top

Were you able to create a new user before you did the mod? If so, then the mod should not matter as it uses 100% the same code that is already in the index.php. So, I would guess that something didn't get copied exactly right. If you never tried the new user function before you tried the mod, restore your original index.php and try adding a new user to see if you still get the blank page. If that works ok, then try the copy and paste again. Make sure that you completely overlay/delete the original finishNewUser function in your index.php. You need to end up with only one function called finishNewUser.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
riki
Nuke Soldier
Nuke Soldier


Joined: Jul 10, 2003
Posts: 16


PostPosted: Wed Jul 30, 2003 1:57 am Reply with quoteBack to top

Before I had no problem create new user with email comfirmation.

Please have a look on this index.php code after replacing required lines with autoActivateMod. Maybe there is something I did not do properly.

------------------------------------------------------------------------------------
Code:

<?php

/************************************************************************/
/* PHP-NUKE: Web Portal System                                          */
/* ===========================                                          */
/*                                                                      */
/* Copyright (c) 2002 by Francisco Burzi                                */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
   die ("You can't access this file directly...");
}

require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
get_lang($module_name);
$userpage = 1;

include("modules/$module_name/navbar.php");

function userCheck($username, $user_email) {
    global $stop, $user_prefix, $db;
    if ((!$user_email) || ($user_email=="") || (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,6}$",$user_email))) $stop = "<center>"._ERRORINVEMAIL."</center><br>";
    if (strrpos($user_email,' ') > 0) $stop = "<center>"._ERROREMAILSPACES."</center>";
    if ((!$username) || ($username=="") || (ereg("[^a-zA-Z0-9_-]",$username))) $stop = "<center>"._ERRORINVNICK."</center><br>";
    if (strlen($username) > 25) $stop = "<center>"._NICK2LONG."</center>";
    if (eregi("^((root)|(adm)|(linux)|(webmaster)|(admin)|(god)|(administrator)|(administrador)|(nobody)|(anonymous)|(anonimo)|(anónimo)|(operator))$",$username)) $stop = "<center>"._NAMERESERVED."";
    if (strrpos($username,' ') > 0) $stop = "<center>"._NICKNOSPACES."</center>";
    if ($db->sql_numrows($db->sql_query("SELECT username FROM ".$user_prefix."_users WHERE username='$username'")) > 0) $stop = "<center>"._NICKTAKEN."</center><br>";
    if ($db->sql_numrows($db->sql_query("SELECT username FROM ".$user_prefix."_users_temp WHERE username='$username'")) > 0) $stop = "<center>"._NICKTAKEN."</center><br>";
    if ($db->sql_numrows($db->sql_query("SELECT user_email FROM ".$user_prefix."_users WHERE user_email='$user_email'")) > 0) $stop = "<center>"._EMAILREGISTERED."</center><br>";
    if ($db->sql_numrows($db->sql_query("SELECT user_email FROM ".$user_prefix."_users_temp WHERE user_email='$user_email'")) > 0) $stop = "<center>"._EMAILREGISTERED."</center><br>";
    return($stop);
}

function makePass() {
    $cons = "bcdfghjklmnpqrstvwxyz";
    $vocs = "aeiou";
    for ($x=0; $x < 6; $x++) {
   mt_srand ((double) microtime() * 1000000);
   $con[$x] = substr($cons, mt_rand(0, strlen($cons)-1), 1);
   $voc[$x] = substr($vocs, mt_rand(0, strlen($vocs)-1), 1);
    }
    $makepass = $con[0] . $voc[0] .$con[2] . $con[1] . $voc[1] . $con[3] . $voc[3] . $con[4];
    return($makepass);
}

function confirmNewUser($username, $user_email, $user_password, $user_password2, $random_num, $gfx_check) {
    global $stop, $EditedMessage, $sitename, $module_name, $minpass;
    include("header.php");
    include("config.php");
    filter_text($username);
    $username = $EditedMessage;
    $user_viewemail = "0";
    userCheck($username, $user_email);
    if (!$stop) {
   $datekey = date("F j");
   $rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $_POST[random_num] . $datekey));
   $code = substr($rcode, 2, 6);
   if (extension_loaded("gd") AND $code != $gfx_check) {
       title(""._NEWUSERERROR."");
       OpenTable();
       echo "<center><b>"._SECCODEINCOR."</b><br><br>"
      .""._GOBACK."</center>";
       CloseTable();
       include("footer.php");
       die();
   }
   if ($user_password == "" AND $user_password2 == "") {
       $user_password = makepass();
   } elseif ($user_password != $user_password2) {
       title(""._NEWUSERERROR."");
       OpenTable();
       echo "<center><b>"._PASSDIFFERENT."</b><br><br>"._GOBACK."</center>";
       CloseTable();
       include("footer.php");
       die();
   } elseif ($user_password == $user_password2 AND strlen($user_password) < $minpass) {
       title(""._NEWUSERERROR."");
       OpenTable();
       echo "<center>"._YOUPASSMUSTBE." <b>$minpass</b> "._CHARLONG."<br><br>"._GOBACK."</center>";
       CloseTable();
       include("footer.php");
       die();
   }
   title("$sitename: "._USERREGLOGIN."");
   OpenTable();
   echo "<center><b>"._USERFINALSTEP."</b><br><br>$username, "._USERCHECKDATA."</center><br><br>"
       ."<table align='center' border='0'>"
       ."<tr><td><b>"._UUSERNAME.":</b> $username<br></td></tr>"
       ."<tr><td><b>"._EMAIL.":</b> $user_email</td></tr></table><br><br>"
       ."<center><b>"._NOTE."</b> "._YOUWILLRECEIVE."";
   echo "<form action=\"modules.php?name=$module_name\" method=\"post\">"
       ."<input type=\"hidden\" name=\"random_num\" value=\"$random_num\">"
       ."<input type=\"hidden\" name=\"gfx_check\" value=\"$gfx_check\">"
       ."<input type=\"hidden\" name=\"username\" value=\"$username\">"
       ."<input type=\"hidden\" name=\"user_email\" value=\"$user_email\">"
       ."<input type=\"hidden\" name=\"user_password\" value=\"$user_password\">"
       ."<input type=\"hidden\" name=\"op\" value=\"finish\"><br><br>"
       ."<input type=\"submit\" value=\""._FINISH."\"> &&"._GOBACK."</form></center>";
   CloseTable();
    } else {
   OpenTable();
   echo "<center><font class=\"title\"><b>Registration Error!</b></font><br><br>";
   echo "<font class=\"content\">$stop<br>"._GOBACK."</font></center>";
   CloseTable();
    }
    include("footer.php");
}

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

?>
Find all posts by rikiView user's profileSend private message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Wed Jul 30, 2003 2:58 am Reply with quoteBack to top

This isn't all of index.php is it? I mean you only replace the 1 function (finishNewUser) but you have to leave all the code after that.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
riki
Nuke Soldier
Nuke Soldier


Joined: Jul 10, 2003
Posts: 16


PostPosted: Fri Aug 01, 2003 4:18 am Reply with quoteBack to top

I am sorry, I did not paste the code properly. This was the only problem. You was right. Now it is OK. Thank you very much.

There is only small problem (but this was before as well)

After creating new user, user can gets only

_ACTIVATIONYES

xxxxx: _ACTMSG

what is fine, but it can makes user confusing what to do next. There is not coming welcome text. I thing it can be language conflict ( I do use Slovak language) because in English is everything going well.
I do not know how to make it working.
Find all posts by rikiView user's profileSend private message
Raven
General
General


Joined: Mar 22, 2003
Posts: 5233

Location: USA

PostPosted: Fri Aug 01, 2003 4:32 am Reply with quoteBack to top

Edit the Your_Account/language/lang-slovak.php file and add those DEFINES. Also, check the slovenian.php.

_________________
Those who hear not the music think the dancers mad.
Raven Web Hosting|My Scripts & Stuff
Find all posts by RavenView user's profileSend private messageVisit poster's website
riki
Nuke Soldier
Nuke Soldier


Joined: Jul 10, 2003
Posts: 16


PostPosted: Fri Aug 01, 2003 5:25 am Reply with quoteBack to top

Thank you for your advice. I changed it and works perfectly. Very Happy

I would like you ask for last advice. There is fantastic possibility to make the articles to be printed out using on age button. But I would need it to have it in new window (pop up) (with no links back to the articel or main index page if this is possible ). How could I do this.
Find all posts by rikiView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.271 Seconds - 302 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::