vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   vB4 Template Conditionals List (https://vborg.vbsupport.ru/showthread.php?t=231525)

Skyrider 10-04-2015 10:37 AM

Anyone happen to know the condition (for mod/supers) that IF can view user profile?

Alan_SP 10-04-2015 12:36 PM

Do you mean this:

HTML Code:

<vb:if condition="can_moderate()">Show this to all moderators</vb:if>

itilm 03-06-2016 12:02 AM

hello sir i need to hide Adsense from 5 or 7 forums can you give me the code of hiding from several forums

--------------- Added [DATE]1457256110[/DATE] at [TIME]1457256110[/TIME] ---------------

Quote:

<vb:if condition="$GLOBALS['forumid'] != x">Show this if forum id is not x</vb:if>
Please modify this code for me to multiple forums

Alan_SP 03-06-2016 02:28 PM

For multiple forums use this:

HTML Code:

<if condition="!in_array($GLOBALS[forumid], array(1,2,3,4,5...))>
Numbers are forum ids. You can use as many as you want.

HM666 06-28-2016 08:39 PM

Quote:

Originally Posted by Alan_SP (Post 2566632)
For multiple forums use this:

HTML Code:

<if condition="!in_array($GLOBALS[forumid], array(1,2,3,4,5...))>
Numbers are forum ids. You can use as many as you want.

Sorry but this does not work. I get a PHP error & an error message when trying to change this. I want to have something NOT show in more than one forum at a time. Here is what I have from the post above but it does not work. Anyone know what I can use instead?

Code:

<vb:if condition="!in_array($GLOBALS['forumid'], array(1,2,3...))>
Thanks

Dragonsys 06-29-2016 02:03 PM

Quote:

Originally Posted by HM666 (Post 2572600)
Sorry but this does not work. I get a PHP error & an error message when trying to change this. I want to have something NOT show in more than one forum at a time. Here is what I have from the post above but it does not work. Anyone know what I can use instead?

Code:

<vb:if condition="!in_array($GLOBALS['forumid'], array(1,2,3...))>
Thanks

remove the ...
Code:

<vb:if condition="!in_array($GLOBALS['forumid'], array(1,2,3))>

HM666 06-29-2016 04:21 PM

Quote:

Originally Posted by Dragonsys (Post 2572620)
remove the ...
Code:

<vb:if condition="!in_array($GLOBALS['forumid'], array(1,2,3))>

Yes I know it still does not work. I put that to simulate that there would be more forum ID's. I did not want to put my actual forum ID's in the post. The code as it stands does not work.

MarkFL 06-29-2016 04:32 PM

You need to close the condition with a double quote:

HTML Code:

<vb:if condition="!in_array($GLOBALS['forumid'], array(1,2,3))">

HM666 06-29-2016 05:42 PM

Quote:

Originally Posted by MarkFL (Post 2572626)
You need to close the condition with a double quote:

HTML Code:

<vb:if condition="!in_array($GLOBALS['forumid'], array(1,2,3))">

Ah yeah, I should not attempt these things when I'm not awake LOL. I'll give that a try I'm sure that was the problem.

Edit: That worked, thanks Mark!

Stratis 02-05-2017 04:05 PM

I want to show image with link only in specific language and not to show in specific script.

This is my code: (works only with language) I see image in register.php

Code:

<vb:if condition="$bbuserinfo[languageid] == 2">
<vb:if condition="THIS_SCRIPT != 'register'">

<a href="register.php"><img src="images/register.png" alt="REGISTER" height="60" width="315" /></a>

</vb:if>
</vb:if>

Any help please :)


All times are GMT. The time now is 03:54 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.01490 seconds
  • Memory Usage 1,746KB
  • 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
  • (5)bbcode_code_printable
  • (5)bbcode_html_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete