PDA

View Full Version : option for users to turn off some code?


Craig Ross
05-18-2010, 08:50 AM
Hi first off i hope this is the right board to post this. sorry if it isn't :(

I have a code on my forum homepage, lets for example sake say its

<script> some code here </script>

how would i go about having that on by default but enable members who it is causing problems for the option to remover it via thier settings page something like

script name: hide O see O

with the default being see.

i am guessing this is some kind of <vb: if feild# kinda thing but i have no idea of the whole setting for hide or see in the if code and making it default see.

hope that makes sense ??? i am using vb 4.0.3.

--------------- Added 1274180822 at 1274180822 ---------------

ok done a bit of reading and i'm almost there.

i have created a radio button in the usercp

code name option: show O hide O

i have made the default radio button show.

then i added this code to my footer of my forum

<vb:if condition="$bbuserinfo['filed20']== 'show'">
Code to show or hide
</vb:if>

the field is correct being 20 but no matter what i choose in the user profile it still dosn't show any code.

where am i going wrong?

--------------- Added 1274181820 at 1274181820 ---------------

found the problem the code i copied had a typo in it, it should read field20 and not filed20 as above :erm: