PDA

View Full Version : I can't get this to work...


vBulletin THEN DAYLIGHT
07-21-2006, 08:13 PM
I am trying to create a new user option, so each user can choose whether they would like to see images in peoples signatures or not without having to turn off signatures altogether.

I have created the profile field, and done all the basic checks like for the ID etc... but it won't work

I have.....

Product: vBulletin
Hook Location: global_start

if ($vbulletin->userinfo['field29'] == "Display")
{
$vbulletin->options['allowbbimagecode'] = 1;
}
else
{
$vbulletin->options['allobbimagecode'] = 0;
}

I have already tried true and false instead of 1 and 0. Any ideas on how I could get this to work???

Thanks
Rob :)

peterska2
07-21-2006, 08:48 PM
You ned to use double == in php

You also have a typo in your code$vbulletin->options['allobbimagecode'] = 0;should be$vbulletin->options['allowbbimagecode'] == 0;

Paul M
07-21-2006, 08:53 PM
Actually == is for comparisons, not assigning variables, it's the spelling mistake that's breaking it.

$vbulletin->options['allobbimagecode'] = 0;

should be

$vbulletin->options['allowbbimagecode'] = 0;

vBulletin THEN DAYLIGHT
07-22-2006, 01:54 PM
I am having problems with this now.

Despite the profile option settings suggesting otherwise, members are not having 'Yes' selected by default. And despite the menu reading 'Yes' in their options, it doesn't take effect until they next save changes.

Any ideas?

vBulletin THEN DAYLIGHT
07-23-2006, 02:44 PM
No worries, I solved it by running a SQL query.