View Full Version : Select on/off in user CP?
Ember
01-26-2003, 02:09 PM
Hey, for the other admins to let me implement my pet hack on Area 51, they want users to be able to turn viewing the hack in the postbit on or off, like the signature.
My question is, how do I do this?
I figured I have to create a new field in the "user" table, and then have a field in the modify options template...
I need to have an "if" arguement in functions.php, but what will it look like?
Anyone help?
JulianD
01-26-2003, 02:25 PM
Simply add a new field to the user table, and then you have to modify the modifyoptions template and the file member.php to modify the query that updates the user profile.... It's very simple, just go to UserCP > Options and you will have a bunch of yesno options..... Take one of those for example, and you should be able to code something similar for your hack.
Ember
01-26-2003, 02:28 PM
Yah, I know what I have to do, I just cant do it.
I cant find what I have to add in member.php - as all of those go on if stuff is enabled in the admin CP... its confusing.
Xenon
01-27-2003, 01:49 PM
you can also make a new profilefield say they have to enter no if they don't want to see it, and in functions just use if($post[fieldX]!="no") { bla..
Ember
01-27-2003, 01:55 PM
I still dont get how to show it or not show it using that code :(
Would it just be
if($post[fieldX]!="no") {
all pet hack stuff here
}
else
{
}
??? :confused:
Xenon
01-27-2003, 06:44 PM
exactly like that..
Ember
01-28-2003, 06:03 AM
Thanks Xenon :) I will try that out!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.