Posted: Thu Oct 12, 2006 9:54 am Post subject: BBToNuke: Confirmation Code
Getting the confirmation code to work on
modules.php ?name=Forums&file=profile&mode=register
Make sure first that your forums template has the confirmation code in profile_add_body.tpl
Next, we need usercp_confirm.php in its correct path. Move it out of modules/Forums/usercp_confirm.php into includes/usercp_confirm.php
Finally it tries to load the phpNuke template around the page when the image is called. To get it to work, we have to modify
includes/sessions.php
Code:
in function append_sid
FIND
if ($userdata['user_level'] > 1) {
BEFORE, ADD
if (stristr($url,'file=profile&mode=confirm')) $url .= "&popup=1";
Activate the confirmation code in your Forums Configuration and it should display now _________________ Evaders99 Webmaster Administrator Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -
Finally, if you are getting the error
"Could not delete stale confirm data"
you need to create the nuke_confirm table
Run this in phpMyAdmin:
Code:
CREATE TABLE `nuke_bbconfirm` (
`confirm_id` char(32) NOT NULL default '',
`session_id` char(32) NOT NULL default '',
`code` char(6) NOT NULL default '',
PRIMARY KEY (`session_id`,`confirm_id`)
) ENGINE=MyISAM;
Or this sql.php script from your Nuke root:
(place code between the opening PHP tags)
Code:
include_once('mainfile.php');
$result = $db->sql_query("CREATE TABLE `" . $prefix . "_bbconfirm` (
`confirm_id` char(32) NOT NULL default '',
`session_id` char(32) NOT NULL default '',
`code` char(6) NOT NULL default '',
PRIMARY KEY (`session_id`,`confirm_id`)
) ENGINE=MyISAM;");
if (!$result) { echo "Cannot create ".$prefix."_bbconfirm table (likely already exists, which is fine)<br><br>\n"; } else { echo "Created ".$prefix."_bbconfirm table<br><br>\n"; }
_________________ Evaders99 Webmaster Administrator Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -
If the confirmation code does not display on the Forums Register screen, it may not be activated in the Forums Config. Otherwise, it is a template issue
in your template file
modules/Forums/templates/YOURTEMPLATE/profile_add_body.tpl
_________________ Evaders99 Webmaster Administrator Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -
I just setup a site using 7.6 np to 3.3 and the latest bbtonuke patches.
latest Approve membership hack.
mysql 5.0.81-
PHP4
Just so this doesn't get too confusing, My question is, I want to disable any forum registrations and if someone tries, I don't want them to be able to see my database info or debug info. I have tried turning off the debug in the constants.php file and it just keeps on showing it.
The code i used to do that.
Code:
// Debug Level
//define('DEBUG', 1); // Debugging on
define('DEBUG', 1); // Debugging off
I get the 'nuke_bbconfirm' debug error when trying to register through the forums registration link, when the "Enable Visual Confirmation" is enabled in the forums admin section. When i disabled it i don't get that error but upon submitting the new registration, I get a new error saying,
2.8 I get "Missing parameters" errors, what can I do?
Here are a few points to check:
In config.inc.php, try to leave the $cfg['PmaAbsoluteUri'] directive empty. See also FAQ 4.7.
Maybe you have a broken PHP installation or you need to upgrade your Zend Optimizer. See http://bugs.php.net/bug.php?id=31134.
If you are using Hardened PHP with the ini directive varfilter.max_request_variables set to the default (200) or another low value, you could get this error if your table has a high number of columns. Adjust this setting accordingly. (Thanks to Klaus Dorninger for the hint).
In the php.ini directive arg_separator.input, a value of ";" will cause this error. Replace it with "&;".
If you are using Hardened-PHP, you might want to increase request limits.
The directory specified in the php.ini directive session.save_path does not exist or is read-only.
I tried adding the following code to the usercp_register.php file in order to stop spammers from registeriing through the forum link but I could still register a test user.
The code I used to do that.
Code:
if ($mode == "register") {
Header("Location: modules.php?name=Your_Account&op=new_user");
die();
}
I was going to post in the nuke 7.6 forum at ravens but its locked for some reason and Nukecops wont send me an verification email so i can post my question there.
I'm kind of at my wits end (what little there is of it).
Your help is much appreciated.
"Failed sending message" seems to be that your SMTP server is not being set correctly
For "Missing parameter" - I'm not sure why it is not letting you create that table. What script are you using? Have your tried directly in phpMyAdmin?
I don't have any answer for the register code at the moment. It did work when I wrote and tested it. Not sure why it wouldn't work now _________________ Evaders99 Webmaster Administrator Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -
"Failed sending message" seems to be that your SMTP server is not being set correctly
For "Missing parameter" - I'm not sure why it is not letting you create that table. What script are you using? Have your tried directly in phpMyAdmin?
I don't have any answer for the register code at the moment. It did work when I wrote and tested it. Not sure why it wouldn't work now
Ok, that did the trick as far as turning off debugging.
My forums/admin has the smtp email server set to OFF.
I just use the local mail function to send the activation emails.
Thats not a big problem anyway i just mentioned it in case it had something to do with peeps being able to register through the forums link.
Yes, I was using phpMYadmin when trying to create that database.
[edit]
Your going to love this, I had this problem once before when trying to create another table and i found the answer for myself and posted it another web site to help someone else. I just found my old post and its due to some type of browser bug. Apparently i had tried IE6,IE7 & firefox with no luck and and then i tried Opera and it let me create the table.
This time i tried Opera, IE6,IE7 & IE8 with no luck until i tried firefox and then i could install the table. How strange.
So now that the table has been created, anyone can just use the forums registration link to create an account .
This is what i did.
I just installed bbantispam and killed several birds with one script.
With bbantispam installed and the confirmation code enabled in my forums/admin area, when a user tries to register through the forums they get rejected because there is no way for them to enter the forums confirmation code because bbantispam is asking them for a word not a code.
When a user tries to register the correct way (through nuke), bbantispam then makes them confirm themselves as being human twice.
Sorry for making your eyes bleed with all my posting, But if i find and answer to something, I like to make it clear what solved the problem just incase someone else needs the fix.
So far this problem is solved and works great.
Thanks for your help Evaders99.
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