Priceless Posted March 17, 2013 Share Posted March 17, 2013 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? Quote Link to comment Share on other sites More sharing options...
--------- Posted March 18, 2013 Share Posted March 18, 2013 This should be what you're looking for to add another field to the registration form... http://www.vbulletin.com/docs/html/profile_add_single_line Quote Link to comment Share on other sites More sharing options...
Priceless Posted March 18, 2013 Author Share Posted March 18, 2013 Yes, but I tried that out, but it did not add userfield in mysql database, that's the issue. Thanks for the reply Quote Link to comment Share on other sites More sharing options...
Guest The_Monkey Posted March 18, 2013 Share Posted March 18, 2013 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. Quote Link to comment Share on other sites More sharing options...
Priceless Posted March 19, 2013 Author Share Posted March 19, 2013 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. Quote Link to comment Share on other sites More sharing options...
enigma# Posted March 19, 2013 Share Posted March 19, 2013 http://forums.alliedmods.net/showthread.php?t=139212 ??? 1 Quote Link to comment Share on other sites More sharing options...
Priceless Posted March 19, 2013 Author Share Posted March 19, 2013 Not what im looking for, any more suggestions please? Quote Link to comment Share on other sites More sharing options...
Guest The_Monkey Posted March 19, 2013 Share Posted March 19, 2013 If you need to add a field to the database, and aren't familiar enough with mysql to do so, install phpmyadmin. Quote Link to comment Share on other sites More sharing options...
Priceless Posted March 19, 2013 Author Share Posted March 19, 2013 I know my way around phpmyadmin and databases. But I dont know how to interact with vbulletin, what to look for to integrate this, so if anyone had a shortcut that includes what I was looking for was more my question, but thanks =) Quote Link to comment Share on other sites More sharing options...
Homer Posted March 20, 2013 Share Posted March 20, 2013 On 3/19/2013 at 1:17 AM, Priceless said: 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 On 3/18/2013 at 3:29 AM, 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. 2 Quote Link to comment Share on other sites More sharing options...
Priceless Posted March 20, 2013 Author Share Posted March 20, 2013 Yes, that would work! Thanks alot Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.