Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-04-2007, 01:54 AM
osayidan osayidan is offline
 
Join Date: Sep 2006
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default help locating register function

Hi,
I'm very close to successfully integrating a game server with VB, i am only missing one tiny little thing which i thought would have been the easiest, but is turning out to be the hardest to find

I am looking for the registration function that actually adds the user inputed data into the database (username, pass, email...) so that i can modify it to add 2 new bits of data into 2 new columns in my table.

I have looked in /register.php and seem to have found everything except for the usual MySQL query i'm used to seeing in these situations.

Is VB making use of some other method of writing the data to MySQL (i'm not very experienced in php but i usually manage to find my way around) or is it in some other document?

Thanks.
Reply With Quote
  #2  
Old 09-04-2007, 07:18 AM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you are including the vB backend you can make use of the datamanager

https://vborg.vbsupport.ru/showthread.php?t=82836

I think you can add extra fields by something like this:
PHP Code:
// $userdm = data...bla...bla...
$userdm->validfields['fieldname'] = array(TYPE_STRREQ_NO);
$userdm->set... 
Although not directly link to you original question there is more info on adding a field to a datamanager here: https://vborg.vbsupport.ru/showthread.php?t=119376

Someone might need to verify it but its worth a try
Reply With Quote
  #3  
Old 09-05-2007, 02:48 PM
osayidan osayidan is offline
 
Join Date: Sep 2006
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Opserty View Post
If you are including the vB backend you can make use of the datamanager

https://vborg.vbsupport.ru/showthread.php?t=82836

I think you can add extra fields by something like this:
PHP Code:
// $userdm = data...bla...bla...
$userdm->validfields['fieldname'] = array(TYPE_STRREQ_NO);
$userdm->set... 
Although not directly link to you original question there is more info on adding a field to a datamanager here: https://vborg.vbsupport.ru/showthread.php?t=119376

Someone might need to verify it but its worth a try
I don't know what to do with that
I don't know if i add that into the register.php, or if i have to make a new register page?

What i have is the following:

register.php template is edited to have a dropdown to chose Male or Female gender (to affect the gender of the game character). The values in the html are M and F.

Along with all the regular VBulletin data, i need the gender values of either M or F to be inserted into the "user" table (same table as the username, pass, email and so on) into the column "sex".

I only know how to do this using a MySQL query such as, for example:
PHP Code:
$create_account mysql_query("INSERT INTO user (username,  sex) VALUES ('$username', '$sex')"); 
And i see nothing like this in register.php, so i am completely lost
Reply With Quote
  #4  
Old 09-05-2007, 02:57 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why are you not using a User Profile Field to let them enter their sex? No need to modify anything for that.
Reply With Quote
  #5  
Old 09-05-2007, 03:35 PM
Opserty Opserty is offline
 
Join Date: Apr 2007
Posts: 4,103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

doh *slaps self*
Reply With Quote
  #6  
Old 09-05-2007, 03:38 PM
osayidan osayidan is offline
 
Join Date: Sep 2006
Posts: 64
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Marco van Herwaarden View Post
Why are you not using a User Profile Field to let them enter their sex? No need to modify anything for that.
With that is it possible to put the values of "M" or "F" into the user table under the column "sex"? i checked custom fields before trying this and all i see is the ability to add extra options that would go into their profile, and nothing to let me decide what table and column it goes into (which is vital, since the game is programed to look for the users sex in the table "user" under column "sex").
Reply With Quote
  #7  
Old 09-05-2007, 03:42 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope that is not possible, it will be stored in a seperate table.
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 05:35 PM.


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.03945 seconds
  • Memory Usage 2,225KB
  • Queries Executed 13 (?)
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
  • (3)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete