Quote:
Originally Posted by JohnMcClane
I'm planning on building a new feature for my forum which requires members to turn it on via a profile field in the usercp. Is there a way I can display a link elsewhere on my forum that members can click that will change the profile field?
For example-
"Click Here to Enable xxxxx" or "Click Here to Disable xxxxx"
Many thanks!
John
|
You can use an if statement on the user profile field to display code.
It will depend on what you are trying to achieve and where exactly. Have a look at this:
http://www.vbulletin.com/forum/showt...-Profile-Field recent discussion about it.
Off the top of my head I suspect you want something like inserted into the forumhome or some such template
Code:
<vb:if condition="$post['fieldx'] == y"> HTML CODE YOU WANT TO EXECUTE </vb:if>
Where 'x' is the id number for user profile field and 'y' is what you want it to be equal to.
--------------- Added [DATE]1271435003[/DATE] at [TIME]1271435003[/TIME] ---------------
Not sure what level your coding is at so I apologise if this is stuff you already know, but remember with code conditions that;
== means "if equal to".
= means "set value"
!= means "if NOT equal to".