vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   <IF CONDITION= not working (https://vborg.vbsupport.ru/showthread.php?t=185331)

SLR722 07-14-2008 07:54 PM

<IF CONDITION= not working
 
Hey

I am trying to make a modification for vB.org and for my client. I am trying to declare a function and some HTML through vB's template conditions and its not working. In basic, I could not find a developer documentation for the following conditions, but none of them are working with else, and if else combinations.

PHP Code:

<if condition="in_array($bbuserinfo['usergroupid'], array(1,3,4))">
stuff here
<else />
other stuff here
</if> 

And
PHP Code:

<if condition="in_array($bbuserinfo['usergroupid'], array(1))">
stuff here
<else />
other stuff here
</if> 

And
PHP Code:

<if condition="$show['guest']"

<if 
condition="$show['member']"



Anyone have an idea to achieve this.
Code:

IF user->guest SHOW
        Hey guest
ELSE
        Welcome back
END IF


veenuisthebest 07-14-2008 08:13 PM

For usergroup:-

HTML Code:

<if condition="is_member_of($vbulletin->userinfo, 1, 2, 3)">

</if>

For guest:-

HTML Code:

<if condition="$show['guest']">

</if>


SLR722 07-14-2008 08:32 PM

Still not working

Dismounted 07-15-2008 09:40 AM

They will work - if you are implementing them properly.

SLR722 07-15-2008 06:36 PM

Hey

I am doing a Welcome Panel. And have done it in the ForumHome template. It displays when the user is logged in only, and not for the guest.

The code is being called in the FORUMHOME_WELCOMEPANEL

Opserty 07-15-2008 07:40 PM

<a href="http://www.vbulletin.com/docs/html/main/template_conditionals" target="_blank">Template Conditionals</a> See if maybe you can get something from there that works. Also use <else /> instead of two seperate <if>s

SLR722 07-15-2008 08:41 PM

Its working. I managed to place the guest information in the navigation bar and its fixed it!


All times are GMT. The time now is 09:23 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.01043 seconds
  • Memory Usage 1,727KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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