Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-24-2002, 06:15 AM
mishkan's Avatar
mishkan mishkan is offline
 
Join Date: Jun 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default register.php

Please forgive me if this post is in the wrong place. Mods, please move to the appropriate forum. Thanks!

I want to display these variables in the error_moderateuser template.
- custom user field # 5
- custom user field # 6
- the user's email address

By doing a lot of searching and reading, I now understand that I must edit one of my php files. Specifically, I need to change the register.php file, according to the "vBulletin 2.0 Template Reference" in the members area.

Question is... exactly what changes do I make to register.php?

Thanks for any help!
Reply With Quote
  #2  
Old 11-24-2002, 02:54 PM
mishkan's Avatar
mishkan mishkan is offline
 
Join Date: Jun 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just clarifying... the only change I need to make to register.php is just so I can access those particular variables from within the error_moderateuser template. I'm guessing this is something really simple, like from a "php 101" class... LOL... but I'm truly a newbie. So, thanks for any help!
Reply With Quote
  #3  
Old 11-24-2002, 03:02 PM
JulianD's Avatar
JulianD JulianD is offline
 
Join Date: Jan 2002
Posts: 455
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can edit the template and use variables like:

$bbuserinfo[email] for the email address.
$bbuserinfo[field5] for the field 5
$bbuserinfo[field6] for the field 6.

Is that what you want?
Reply With Quote
  #4  
Old 11-24-2002, 03:25 PM
mishkan's Avatar
mishkan mishkan is offline
 
Join Date: Jun 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Julian, thanks for your response! I tried putting the following code into the error_moderateuser template, to see what would happen...

field 5 = $bbuserinfo[field5] < br>
field 6 = $bbuserinfo[field6] < br>
email = $bbuserinfo[email] < br>


But, it didn't work. The following output was displayed on the screen...

field 5 =
field 6 =
email =


The variables didn't work. Anyone know how to hack the register.php file, in order to make those variables accessible in the error_moderateuser template? Thanks again for any help!
Reply With Quote
  #5  
Old 11-24-2002, 03:49 PM
JulianD's Avatar
JulianD JulianD is offline
 
Join Date: Jan 2002
Posts: 455
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh. Now I understand.

It doesn't work with the above variables because those variables aren't created when the user signup.

Instead, you must use the variables submitted by the registration form...

Like this

Field 5 = $field5
Field 6 = $field6
email = $email

Hope this helps.
Reply With Quote
  #6  
Old 11-24-2002, 04:09 PM
mishkan's Avatar
mishkan mishkan is offline
 
Join Date: Jun 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope, still didn't work.

Here's the code I put into the error_moderateuser template...

Field 5 = $field5 < br>
Field 6 = $field6 < br>
email = $email < br>


And, I'm attaching a photo of what the output looks like.
Please keep the ideas coming, though! Thanks!
Attached Images
File Type: gif vb_variables_in_error_moderateuser.gif (1.1 KB, 0 views)
Reply With Quote
  #7  
Old 11-24-2002, 04:52 PM
JulianD's Avatar
JulianD JulianD is offline
 
Join Date: Jan 2002
Posts: 455
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK. Let's take a look:

Do you have email verification activated?
Reply With Quote
  #8  
Old 11-24-2002, 07:51 PM
mishkan's Avatar
mishkan mishkan is offline
 
Join Date: Jun 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry, I was out doing chores, and I have to run out again. Do you mean you want to try registering on my board? It's a private board, so I can't post the URL.

Can you try putting that code in your error_moderateuser template? Or is there another way I can help you troubleshoot?
Reply With Quote
  #9  
Old 11-24-2002, 10:06 PM
JulianD's Avatar
JulianD JulianD is offline
 
Join Date: Jan 2002
Posts: 455
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, I don't want to register on your board.

The problem is that the solution above won't work if you have email verification activated. To get the custom profile fields in error_moderateuser, you will have to hack register.php a little.

Try this:


Find this:

PHP Code:
            $DB_site->query("UPDATE user SET usergroupid=4$dotitle WHERE userid='$u'"); 
After it, add:

PHP Code:
            $userprofile $DB_site->query_first("SELECT * FROM useractivation WHERE userid='$u'"); 
Now in error_moderateuser, to display the email you can use $userinfo[email] and for the custom profile fields, use $userprofile[field6], $userprofile[field7], etc....

Tell me if it works.
Reply With Quote
  #10  
Old 11-25-2002, 01:14 AM
mishkan's Avatar
mishkan mishkan is offline
 
Join Date: Jun 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's the new code in the register.php file.
PHP Code:
 $username $userinfo['username'];
$DB_site->query("UPDATE user SET usergroupid=4$dotitle WHERE userid='$u'");
$userprofile $DB_site->query_first("SELECT * FROM useractivation WHERE userid='$u'");
eval(
"standarderror(\"".gettemplate("error_moderateuser")."\");"); 
Here's the code I put into the error_moderateuser template.
PHP Code:
 field 5 $bbuserinfo[field5] <br>
field 6 $bbuserinfo[field6] <br>
username $bbuserinfo[username] <br>
email $bbuserinfo[email] <br>
================== <
br>
field 5 $field5 <br>
field 6 $field6 <br>
email $email <br>
================== <
br>
field 5 $userprofile[field5] <br>
field 6 $userprofile[field6] <br>
email $userinfo[email] <br>
================== <
br
<
br>
Thank you for registering$username
And here's what was displayed by the error_moderateuser template.

[color=sky blue] field 5 = Jane Doe
field 6 = 123
username = test
email = my-email-address@my-domain.com
==================
field 5 =
field 6 =
email =
==================
field 5 =
field 6 =
email = my-email-address@my-domain.com
==================

Thank you for registering, test.
[/color]



In summary, these variables worked.
  • field 5 = $bbuserinfo[field5]
  • field 6 = $bbuserinfo[field6]
  • username = $bbuserinfo[username]
    username = $username
  • email = $bbuserinfo[email]
    email = $userinfo[email]

As long as the data is being displayed correctly,
does it matter which variables I use?

BTW, thanks for all your help.
It's such a great feeling to be making progress!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:48 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.08378 seconds
  • Memory Usage 2,293KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete