![]() |
Select on/off in user CP?
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? |
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.
|
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. |
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..
|
I still dont get how to show it or not show it using that code :(
Would it just be PHP Code:
|
exactly like that..
|
Thanks Xenon :) I will try that out!
|
All times are GMT. The time now is 02:36 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|