![]() |
|
|
|||||||
| vBulletin Forum Software Get help with vBulletin settings, permissions or general configuration issues here. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Jun 2005
Posts: 89
|
Saving options from custom page
So I've got a custom vBulletin powered vBulletin page. Doesn't contain anything real interesting.
i've got an option lets call it "Opt in email updates" :lol: I've got the checkbox displaying, the text displaying, on my custom page no problem. But whenever someone checks or unchecks the box its not saving properly. I've lookedd through probably 6-7 different modifications tonight trying to figure out how they've done it and for some reason, I just can't wrap my head around it
|
|
|
|
|
|
#2 |
|
Administrator
|
You don't supply enough information. Are you trying to set a user option or setting for a member?
__________________
Computers and Accessories Computer Manuals Riderinfo Connect for Bikers Ad Revenue - Sell link space on your website and profit. |
|
|
|
|
|
#3 |
|
Member
Join Date: Jun 2005
Posts: 89
|
Just an individual setting from a profile field.\
I tried taking code from register.php that looked like it was used for displaying profile fields and saving them, but didnt work, and i can't find any resources or tutorials for it >.< |
|
|
|
|
|
#4 |
|
Administrator
|
To save one setting, you have to hook in and fetch all the user info, depending where you are, into the DM. The hook is usually right before save is called. So if the userdata is all set and you hook just before save, set your setting, thell the DM it is allowed, and then let the script continue to the save. If it's a new field that is not usually in the user table, you have to tell the data manager it is allowed before saving the settings.
To do an option, the easiest way is the data manager. To do a new field in the user table like the eznl field, you could do a query. But that usually adds a query. On the other side though, once it's in the table, you can read it from $vbulletin->userinfo. You have to do the above with hooks at any place you want that setting to be available to update it. On the display side have a hook to place and configure your input box or whatever input you use or you edit a temaplate. On the save side you have to get it from the $_POST array through the GPC cleaner, tell the DM it is allowed, set it and let the script continue on to save.
__________________
Computers and Accessories Computer Manuals Riderinfo Connect for Bikers Ad Revenue - Sell link space on your website and profit. |
|
|
|
|
|
#5 |
|
Member
Join Date: Jun 2005
Posts: 89
|
Thanks Greg With your help and tips i've got custom profile fields showing up and saving properly
![]() Now off to get it to save the EZNL check box |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|