Welcome to The Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads

[Vb4.x] - Registration Field.


Priceless
 Share

Recommended Posts

Hello, im currently running a vb 4.2.0 forum for testing, I was wondering how could I add a deacent registration field with mysql integration where the field is "steamid" (required). I'm pretty awefull in php, but its for a test project in the sourcemod scripts I build really. (mysql field needs to be in vbuser obviously)

 

Could anyone provide a sample or link a place I can find this out?

Link to comment
Share on other sites

Guest The_Monkey

What Enigmo posted should work. VB is supposed to add the field to the database for you. Failure to let it will result in the data not being saved.

Link to comment
Share on other sites

Yes, but I am trying to add the field into the user table, not another table. In my sourcemod scrpit I'm trying to "SELECT group FROM WHERE steamid='%s'".. aka, I need it to stay in the same table.

 

Priceless, You have to do it the following way in order for your members to be able to edit their Steamid in the Profile Settings.

 

After you add the User Profile Field doing what Enigmo said

This should be what you're looking for to add another field to the registration form... http://www.vbulletin...add_single_line

 

You well be using the database table named `userfield` for your sourcemod queries and you will have to inner join the `user` table by `userid` column.

 

Example:

SELECT user.*, userfield.fieldID as steamid FROM `user` INNER JOIN `userfield` ON (userfield.userid=user.userid) WHERE userfield.fieldID = '%s'

Note you must edit where I put fieldID to what your actual field ID is after you add the User Profile Field. Just look in phpmyadmin in table `userfield` for the field ID where the steamid is saving when you save one in your Profile Settings.

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share