vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Help requied with a "If Condition" (https://vborg.vbsupport.ru/showthread.php?t=224603)

GamerzWorld 10-05-2009 08:36 AM

Help requied with a "If Condition"
 
Hi all,

I'm looking to setup a simple script that if a player selects "Hide" in their profile options, a new addon (a toolbar along the bottom of the page) will not appear.

So far I've:
  • Setup a Custom User Profile field, with the options "Show" and "Hide".
  • Edited the line in the footer template to show <if condition="$vbulletin->userinfo[field43]=='Show'">
    <script src='http://toolbar.wibiya.com/toolbarLoader.php?toolbarId=11852' type='text/javascript'></script></if>

Unfortunately, even though the profile field option is supposed to set "Show" as default, the addon is hiding by default. Furthermore it isn't showing for unregistered users (obviously because there is no mention in the code to handle this).

Can anyone help in editing the code so that (a) it shows by default to users and (b) shows to all unregistered users?

Thanks!

HMBeaty 10-05-2009 01:27 PM

Try this
HTML Code:

<if condition="$show[guest]" OR "$bbuserinfo['field43'] = 'Show'">
<script src='http://toolbar.wibiya.com/toolbarLoader.php?toolbarId=11852' type='text/javascript'></script>
</if>


Lynne 10-05-2009 04:36 PM

Too many quotes there, Brooks. :)

HTML Code:

<if condition="$show[guest] OR $bbuserinfo['field43'] = 'Show'">
<script src='http://toolbar.wibiya.com/toolbarLoader.php?toolbarId=11852' type='text/javascript'></script>
</if>


HMBeaty 10-05-2009 04:39 PM

Quote:

Originally Posted by Lynne (Post 1895189)
Too many quotes there, Brooks. :)

HTML Code:

<if condition="$show[guest] OR $bbuserinfo['field43'] = 'Show'">
<script src='http://toolbar.wibiya.com/toolbarLoader.php?toolbarId=11852' type='text/javascript'></script>
</if>


True, haha. It was too early for me when I wrote that :)


All times are GMT. The time now is 11:22 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
  • Page Generation 0.01830 seconds
  • Memory Usage 1,720KB
  • 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
  • (3)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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