SW:Rebellion NetworkHosted by the SW:Rebellion Network
Welcome to Evaders Squadron Coding [ESC]
Star Wars fans, Star Wars games, Star Wars community... did we mention Star Wars? The Star Wars Rebellion Network
Home Forums Nuke Patched Core Coding Services Webmaster Services Personal
  Login/Create an Account    

Forums
· Forums FAQ
· Search
· Usergroups
· Profile
· Private Messages

Support Us
This site runs with your support. Please donate:

User Info/Login
Welcome, Anonymous
Nickname
Password
Security Code: Security Code
Type Security Code

(Register)
Membership:
Latest: jester07
New Today: 0
New Yesterday: 1
Overall: 10348

People Online:
Visitors: 16
Members: 0
Total: 16

Link to Us

Evaders Squadron Coding [ESC] :: View topic - BBToNuke: Confirmation Code
BBToNuke: Confirmation Code

 
Post new topic   Reply to topic    Evaders Squadron Coding [ESC] Forum Index -> Coding Services
View previous topic :: View next topic  
Author Message
Evaders99



Joined: Jan 11, 2002
Posts: 3079
Location: USA

PostPosted: Thu Oct 12, 2006 9:54 am    Post subject: BBToNuke: Confirmation Code Reply with quote

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
SW:Rebellion Fans! Webmaster
Star Wars roleplaying community! Administrator

Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -

The cake is a lie.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Evaders99



Joined: Jan 11, 2002
Posts: 3079
Location: USA

PostPosted: Thu Oct 12, 2006 11:30 am    Post subject: Reply with quote

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
SW:Rebellion Fans! Webmaster
Star Wars roleplaying community! Administrator

Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -

The cake is a lie.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Evaders99



Joined: Jan 11, 2002
Posts: 3079
Location: USA

PostPosted: Thu Oct 12, 2006 11:37 am    Post subject: Reply with quote

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

or

themes/YOURTHEME/forums/profile_add_body.tpl


Code:

FIND (something like this...)

   <tr>
     <td class="row1"><span class="gen">{L_CONFIRM_PASSWORD}: * </span><br />
      <span class="gensmall">{L_PASSWORD_CONFIRM_IF_CHANGED}</span></td>
     <td class="row2">
      <input type="password" class="post" style="width: 200px" name="password_confirm" size="25" maxlength="32" value="{PASSWORD_CONFIRM}" />
     </td>
   </tr>

AFTER, ADD

   <!-- Visual Confirmation -->
   <!-- BEGIN switch_confirm -->
   <tr>
      <td class="row1" colspan="2" align="center"><span class="gensmall">{L_CONFIRM_CODE_IMPAIRED}</span><br /><br />{CONFIRM_IMG}<br /><br /></td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_CONFIRM_CODE}: * </span><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td>
     <td class="row2"><input type="text" class="post" style="width: 200px" name="confirm_code" size="6" maxlength="6" value="" /></td>
   </tr>
   <!-- END switch_confirm -->

_________________
Evaders99
SW:Rebellion Fans! Webmaster
Star Wars roleplaying community! Administrator

Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -

The cake is a lie.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
thebishop
Newbie
Newbie


Joined: Nov 09, 2005
Posts: 6

PostPosted: Sat Oct 24, 2009 11:10 pm    Post subject: Reply with quote

Hi Evaders99.

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,
Code:

Failed sending email : : PHP : :  Debug Mode line: 238 File : emailer.php

The test user is indeed created but not activated.

So i tried to create the nuke_bbconfirm table and mysql gives me an error and won't let me create that table.

import.php: Missing parameter: format (FAQ 2.Cool
import.php: Missing parameter: import_type (FAQ 2.Cool

Code:

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). Smile
Your help is much appreciated.
Back to top
View user's profile Send private message
Evaders99



Joined: Jan 11, 2002
Posts: 3079
Location: USA

PostPosted: Sun Oct 25, 2009 2:37 am    Post subject: Reply with quote

Try
Quote:

define('DEBUG', 0); // Debugging off


"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
SW:Rebellion Fans! Webmaster
Star Wars roleplaying community! Administrator

Fighting is terrible, but not as terrible as losing the will to fight.
- SW:Rebellion Network - Evaders Squadron Coding -

The cake is a lie.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
thebishop
Newbie
Newbie


Joined: Nov 09, 2005
Posts: 6

PostPosted: Sun Oct 25, 2009 3:41 am    Post subject: Reply with quote

Evaders99 wrote:
Try
Quote:

define('DEBUG', 0); // Debugging off


"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 Rolling Eyes.

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Evaders Squadron Coding [ESC] Forum Index -> Coding Services All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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

^Top
Home Your Account Forums Downloads F.A.Q. Submit News Hosting Contact Us

© 2005 - 2007 by Evaders99. All Rights Reserved.
All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters.
You can syndicate our news using the file backend.php
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL.
PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.46 Seconds