vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   registration image on register,php image goes not refresh (https://vborg.vbsupport.ru/showthread.php?t=196582)

Frank H. Shaw 11-18-2008 01:35 AM

registration image on register,php image goes not refresh
 
I have taken it upon my self to change the name of the register.php page and I changed all references to the page in the templets by seraching through the all templets looking for the text string register.php. {to stop spam}

Everything seems to work just fine except the registration image which when you click on the link under the registration image you get the little spin indactor spinning but the actual image never gets changed. It seems the ony way to change the registration image text in the registration image box or window on the page is to refresh the register.php in the browser.

Please note I change the register.php to something like registerxx.php.

I am using version VB 3.6.8 with PHP 5.2.3 and MYSQL 5.0.45

THANKS

Frank H. Shaw

SEOvB 11-18-2008 01:36 AM

Instead of going thru all that trouble as i'm sure you'll need to change items on the register.php page, and inside javascript files, install more spam prevention measures such as reCaptcha, isBot and/or other methods to stop spam dead in its tracks

Frank H. Shaw 11-18-2008 01:43 AM

I have everything working but the image refreshing what does the image use to refresh its self can you explain where one will look for that information?

THANKS

SEOvB 11-18-2008 01:44 AM

I'm not sure where, but I'd imagine its some where in one of the javascript files (inside the clientscript folder) that handles the refreshing of the image since it seems to be handled via ajax

Frank H. Shaw 11-18-2008 02:07 AM

I found the file in clientscript folder vbulletin_ajax_imagereg and looked through it looking for a reference to the register.php but did not find any such reference. I did see the refresh part in the ajax - so what i think i am looking for is how does the register.php keep track of the current page so when the refresh happens it updates the register.php.

is it stored in some header or what?

Maybe in a session varable but i do not know how vb tracks these things I hope someone has a idea as to where I might find this information?

For example the "forumhome" i see that a .php is added to the end of this in register.php so one can ask how does that value get loaded or set in the first place if I changed the name of the file and if the image uses the formhome when it does a refresh the value in the forumhome would not reflex the name of the file being changed.

This I would think might be related to the problem i might be seeing - so i need to ask how is this value set in what script might i find this and how is this used?

THANKS

Frank H. Shaw

THANKS

Lynne 11-18-2008 03:06 AM

Did you leave the line at the top of the register.php page where THIS_SCRIPT is defined alone? If you changed that, you may have some other problems too.

Frank H. Shaw 11-18-2008 03:09 AM

I will list the changes I made in the templetes and maybe you have some other places I might have missed in my lack of knowledge of VB as whole.

Activateform
<form action="registerxx.php?do=activate" method="post">

<phrase 1="registerxx.php?$session[sessionurl]do=requestemail">$vbphrase[you_lost_activation_code_or_username]</phrase>

activate_requestemail

<form action="registerxx.php?do=emailcode" method="post">

FORUMHOME
<phrase 1="faq.php$session[sessionurl_q]" 2="registerxx.php$session[sessionurl_q]">$vbphrase[first_visit_message]</phrase>

Modifyprofile
<form action="registerxx.php?do=coppaform" method="post">

Navbar

<td class="vbmenu_control"><a href="registerxx.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>

Register

<form action="registerxx.php?do=addmember" name="register" method="post" onsubmit="return verify_passwords(password, passwordconfirm);">

register_rules

<form action="registerxx.php?do=register" method="post">

<phrase 1="$vboptions[bbtitle]" 2="$vboptions[forumhome].php$session[sessionurl_q]" 3="registerxx.php?$session[sessionurl]do=coppaform" 4="$vboptions[webmasteremail]">$vbphrase[coppa_rules_description]</phrase>

register_verify_age

<form action="registerxx.php?do=checkdate" method="post" onsubmit="return checkform(this)">

STANDARD_ERROR

<div class="smallfont"><phrase 1="registerxx.php?$session[sessionurl]do=signup">$vbphrase[admin_required_register]</phrase></div>

STANDARD_ERROR_LITE

<div class="smallfont"><phrase 1="registerxx.php?$session[sessionurl]do=signup">$vbphrase[admin_required_register]</phrase></div>

STANDARD_ERROR_LOGIN

<div class="smallfont"><phrase 1="registerxx.php?$session[sessionurl]do=signup">$vbphrase[admin_required_register]</phrase></div>

Looking above did I have to change any place other then what i have done above

THANKS

Frank H. Shaw

--------------- Added [DATE]1226985269[/DATE] at [TIME]1226985269[/TIME] ---------------

Quote:

Originally Posted by Lynne (Post 1667868)
Did you leave the line at the top of the register.php page where THIS_SCRIPT is defined alone? If you changed that, you may have some other problems too.

I did change this line to

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'registerxx');

What does this line do I have tried changing this line back to the way it was

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'register');

It does not fix the image verification problem - either way i set it?

what does this do?

--------------- Added [DATE]1226985664[/DATE] at [TIME]1226985664[/TIME] ---------------

Until I know more about the

define('THIS_SCRIPT', 'register');

I will keep it set to the orginal script

So what kind of problems can i have if i change that line?

what does it do?

THANKS

Lynne 11-18-2008 03:21 AM

I'll assume you got all the places in the templates - it's pretty easy to do a search of those files. However, 'register.php' is used several times in the php files (6 times in 3.7.3) and then 'register' is also used several times (223 times). Those are going to be the harder ones to track down because in some places they are talking about the name of the php page, other times the word defined as THIS_SCRIPT, other times it's a switch that may or may not be related to the page name, and who knows what the other times are. You will need to go through most of those and figure out if you need to change it or not.

Frank H. Shaw 11-18-2008 03:26 AM

Are any related to the image verifation because that is the only thing that does not work ?

It is the refreshing of the actaul image that i can not figure out the rest of my register.php under a another name works just fine as I tested it every place i could find.

Lynne 11-18-2008 03:26 AM

I have no idea. I wasn't about to go through all of them.

Frank H. Shaw 11-18-2008 03:38 AM

I am sorry I was not asking for that!

But should I keep the

define('THIS_SCRIPT', 'register');

or

define('THIS_SCRIPT', 'registerxx');

is it safe to change?

please explain?

SEOvB 11-18-2008 03:56 AM

You should be able to keep the script named as 'register'

That's only used for conditionals, however if you changed anything that looked like "THIS_SCRIPT == register" to "THIS_SCRIPT == registerxx" then you'll also need to update the define function at the top of the register.php to registerxx

Also, you can use a free program such as Crimson Editor, that will search thru all the vBulletin files, for any reference to "register" and tell you the file and line number it appears on, that may help you some as well.

After that, I've honestly not much idea if changing the javascript around didn't help :(

Frank H. Shaw 11-18-2008 03:57 PM

Thank you for both the information the Crimson Editor and the

"THIS_SCRIPT == register" that will be a big help in understanding.

Now about the session verables or what would be used when the image refreshes its self.

registration image or force a refresh on the page it that point when the user selects the link.

THANKS

Frank H. Shaw

Lynne 11-18-2008 05:27 PM

These are the lines listed in the source code on that page in regards to the image:
HTML Code:

<script type="text/javascript" src="clientscript/vbulletin_ajax_imagereg.js?v=373"></script>
<script type="text/javascript">
<!--
vB_AJAX_ImageReg_Init();
//-->

</script>

So, you will have to look at the javascript for it.

Frank H. Shaw 11-18-2008 05:50 PM

This call the image code which I have not touched in any way but what cause the refresh of the image or refresh of the page? What file in the above script did you get this code since this line

vB_AJAX_ImageReg_Init();

is not in register.php file - what file did you get this from if you do not mind me asking?

I can only assume itis a return from a function.

One could ask is there a place where the link you select on under the image triggers a call to update the image.

Also as I said before the refesh of the page {register.php} seems to cause the image to allso change its letters in the image.

If i could understand that the place where the register.php calls whet maybe I might be closer to answreing my questions may self. But up to now I do not see where that is happening?

THANKS

Frank H. Shaw

Lynne 11-18-2008 06:56 PM

What I posted was what is on my 3.7.3 board page source (I don't have access to yours, so I have to look at mine). Its from the 'humanverify_image' template. (Darn, I just noticed you are using 3.6.8. - just look in your page source near where it says "Refresh Image" and see what is under there.)

(edit: It's the same on my 3.6.8 board.)

Frank H. Shaw 11-19-2008 02:47 AM

(edit: It's the same on my 3.6.8 board.)

What source did you find the script you posted?

<script type="text/javascript" src="clientscript/vbulletin_ajax_imagereg.js?v=373"></script>
<script type="text/javascript">
<!--
vB_AJAX_ImageReg_Init();
//-->
</script>

Give me the file name so that I can look at the source around the code my self?

THANKS

Lynne 11-19-2008 03:13 AM

It's not in a file, it's in a template:
Quote:

Originally Posted by Lynne (Post 1668243)
What I posted was what is on my 3.7.3 board page source (I don't have access to yours, so I have to look at mine). Its from the 'humanverify_image' template. (Darn, I just noticed you are using 3.6.8. - just look in your page source near where it says "Refresh Image" and see what is under there.)

(edit: It's the same on my 3.6.8 board.)


Frank H. Shaw 11-19-2008 10:42 AM

If I have any more questions stay tuned

THANKS For Now!

Frank H. Shaw

Frank H. Shaw 11-22-2008 07:07 PM

The line 37 in the file includes - md5_sums_vbulletion.php

The following:

$md5_sums = array(
'/' => array(
'register.php' => 'e789eb3131e27e2cdf90e9c9687f9f86',
),

What is happing here and can i change the file to registerxx.php - if i did what woud the impact happen to be ?

THANKS

Frank H. Shaw

Dismounted 11-23-2008 02:53 AM

That file contains the MD5 checksums of all files within vBulletin. It is used what you use the "Suspect File Versions" feature to check the integrity of all the files within the vBulletin directory.

Frank H. Shaw 11-23-2008 03:44 AM

So if I go ahead and change the name to registerxx.php the system will not work because of the fact the integrity of all the files within the vBulletin directory will have changed. Is that the case or can I change the name and it will not matter. I did change the name of the file physial so my link to it is registerxx.php in the /forums folder this is so that if someone knows that I am using vb that will not be able to get it. and i went through the files in that folder and changed all references to the file the new name - but when i can to the line in the includes - md5_sums_vbulletion.php following lines:

$md5_sums = array(
'/' => array(
'register.php' => 'e789eb3131e27e2cdf90e9c9687f9f86',
),

I did not know if changing this line the filename and not the check sum which i could never figure out what it should be any how -

'registerxx.php' => 'e789eb3131e27e2cdf90e9c9687f9f86',

The question is this a safe thing to do or should i just leave it a alone and just change all references except this one?

THANKS

Frank H. Shaw

PS the register.php to registerxx.php is not the actaul name i used and did not want to post the actual changed name on the this site for security reasons.

Lynne 11-23-2008 05:06 PM

All it means is that if you do Suspect File Version, registerxx will show up as not a recognized file. That's all. Don't worry about that.

Dismounted 11-24-2008 04:23 AM

You shouldn't need to touch any of the md5_sums_*.php files, they do not affect any functionality apart from the "Suspect File Versions" feature - which not many people use.

Frank H. Shaw 11-26-2008 01:48 AM

Looking at this part of the script what is haopening here below and what should or will happen if I change this the case to registerxx.php unstaed?

includes - functions_online.php - 1390

switch($filename)
{
case 'register.php':
if ($values['do'] == 'requestemail' OR $values['do'] == 'emailcode')
{
$userinfo['activity'] = 'requestemail';
}
else if ($values['a'] == 'ver' OR $values['do'] == 'activate' OR $values['a'] == 'act')
{
$userinfo['activity'] = 'activate';
}

else
{
$userinfo['activity'] = 'register';
}
break;
default:

$userinfo['activity'] = 'unknown';
($hook = vBulletinHook::fetch_hook('online_location_process ')) ? eval($hook) : false;
}
return $userinfo;

and this line above $userinfo['activity'] = 'register';
what is happen here should this get changed to registerxx

THANKS

Frank H. Shaw

Lynne 11-26-2008 01:50 AM

You may change that if you'd like. All those lines do is define what is listed as a users location on the online.php page.

Frank H. Shaw 11-26-2008 01:54 AM

the email sent to the user part of the email i want to change is below


To complete your registration, please visit this url:
http://www.xxxxxxxxx.org/forums/regi...103&i=66646180

<a href="http://www.xxxxxxxx.org/forums/register.php?a=act&u=1103&i=66646180">America Online Users Please Visit Here to be Activated</a>

I want to change it to this

To complete your registration, please visit this url:
http://www.xxxxxxxx.org/forums/regis...103&i=66646180

<a href="http://www.xxxxxxxx.org/forums/registerxx.php?a=act&u=1103&i=66646180">America Online Users Please Visit Here to be Activated</a>

Where do i find this to make the modifiaction to it.

THANKS

Frank H. SHaw

--------------- Added [DATE]1227672167[/DATE] at [TIME]1227672167[/TIME] ---------------

I would like to stop the allowing of a email address from the domain @mail.ru
which will stop at least that type of spam - i hope that is.

I am using version 3.6.8. - so what can I do in this version - please give me the exact steps to do this.

THANKS

Frank H. Shaw

Lynne 11-26-2008 03:25 AM

I think the first is a phrase. Do a search in phrases for some of that email and see what comes up.

The second is under vboptions > user banning options > banned email addresses.

Frank H. Shaw 11-26-2008 10:06 PM

I want to create a question and field that must be filled out correctly for the registration process to happen. I want this field to be before the image verifation part and have to have this a required field. My question is what do i need to do for this to happen what files do I need to modify to put this field and question in.

If someone could help guide me and explain what has to happen that would be really helpful in my understand of this process and quick i hope modifation.

THANKS

Frank H. Shaw

Lynne 11-26-2008 11:02 PM

You may find this of interest - Add an extra question to the registration to prevent bot registrations
I think there may be mods also, but I'm not sure.

Frank H. Shaw 11-26-2008 11:30 PM

I do not understand the profile field not required but display at registration - what does this mean - How does the registartion process use profile fields?

Field Required: No, but display at registration

Field Editable by User: Only at registration

Private Field: Yes

Now I have created in the past some profile fields - in this case I want to force the registration system to not proceed with out the correct answer so how would I force this to happen.

Please explain THANKS

Frank H. Shaw

Lynne 11-26-2008 11:40 PM

I have never used that sort of profile field, so I really can't go in to any detail regarding it. From the description, it's a field that may only be used/answered at registration, after that the user will never see it again. The best thing to do is to try it and see.

Frank H. Shaw 11-27-2008 12:50 AM

I understand that the field is only avaiable durn registeration - but my question pertains to this how does one not only make the field required which acording to the wording in the following Field Required: No, but display at registration you would flip the No to a Yes - but I need to go one step further and that is to take the value in the field look at what is type for a answer to a question if answer is correct move on and allow the script to process the registration but if the answer is wrong throw a error like if the user type the wrong text string in the image verification.

But where do i put the required code / script to make this happen.

Better said where should i make the hook so as not to cause problems in the registration system.

May hook needs to somehow work with the new profile field I have setup so that the field and the text type must be the correct answer. How do I attach my script to the profile field.



THANKS

Frank H. Shaw

--------------- Added [DATE]1227757394[/DATE] at [TIME]1227757394[/TIME] ---------------

These are the settings are exactly what you said they should be - so the only thing i need to ask is the following - Regular Expression You may require the input field to match a regular expression.

Please explain if I wanted to vaildatate a peice of text type in by user it is my guess i can set it here - for example if the answer to my question i ask is Truth so what type of regular expression will cause this to be only allowable answer to be typed in the field and the case matters Cap on the T and rest lower case only.

Or the regular expression will not work and i need to write some script to do the valadation ?

THANKS

Frank H. Shaw

--------------- Added [DATE]1227758773[/DATE] at [TIME]1227758773[/TIME] ---------------

I my case the field needs to be after the password field and email field but before image verfication - I have no problem creating a new field in the profile but how do i get this field to show up where i want it to?

I have still not had the last question answered - about the regular expression or creating a vaildation script the answer to my question. Which is the best way to do this type of thing.

THANKS

Frank H. Shaw

Lynne 11-27-2008 02:26 AM

I can't answer any of those questions regarding the extra question. I'm unfamiliar with using that method to stop bot registrations since I use other methods. As for regular expressions, right under that input field title, it says:
You may require the input field to match a regular expression (PCRE).

Click on the link and look at the examples and you'll learn a bit about them. Or google it. I am not good at writing them, so you'll have to have someone else help with that.

Frank H. Shaw 11-27-2008 03:43 AM

Change the folowing:

Yes required field at regerstration and updating profile

and then had to set the next field to only at registration

This seems right

Then wrote the following reg exp

The regular exp was set to this ^[S-U][q-s][t-v][s-u][g-i] to only allow the word Truth

This should work I will start testing these settings and see

THANKS

Frank H. Shaw

--------------- Added [DATE]1227766152[/DATE] at [TIME]1227766152[/TIME] ---------------

I see that at the point that I have the user press the Complete Registration button at the bottom of the form - would have been a over kill.

Additional Required Information (profile)

This works as far as placement is in a special section - When I type the value in to the field and press the enter key the reg exp does reject a bad answer.

This is the reg exp I used

^[S-U][q-s][t-v][s-u][g-i]

The answer is Truth and needs to be correct first letter cap rest lower case.

I type the answer see and press enter and ever thing tests out fine

THANKS

Frank H. Shaw


All times are GMT. The time now is 05:18 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02009 seconds
  • Memory Usage 1,842KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (35)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete