vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   I can't get this to work... (https://vborg.vbsupport.ru/showthread.php?t=121777)

vBulletin THEN DAYLIGHT 07-21-2006 07:13 PM

I can't get this to work...
 
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

PHP Code:

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 07:48 PM

You ned to use double == in php

You also have a typo in your code
Code:

$vbulletin->options['allobbimagecode'] = 0;
should be
Code:

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

Paul M 07-21-2006 07:53 PM

Actually == is for comparisons, not assigning variables, it's the spelling mistake that's breaking it.

PHP Code:

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

should be

PHP Code:

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


vBulletin THEN DAYLIGHT 07-22-2006 12: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 01:44 PM

No worries, I solved it by running a SQL query.


All times are GMT. The time now is 11:17 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02607 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete