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)

egyptsons 02-04-2010 12:44 AM

this is not work too with me :(
Code:

<vb:if condition="$forum[forumid] == x">Show this if forum id is x</vb:if>
anyone can advice ??

isurua 02-04-2010 02:20 AM

Quote:

Originally Posted by flypaper (Post 1973788)
that

Yes well aren't I the ignorant one? Hahah

Do you know if there is any work around?

btotw 02-06-2010 08:59 PM

I have an idea.

I want to give someone control of their own thread. I figure that a good way to do that would be to duplicate the supermoderator group, calling it "threadModerator", then only display the "show admintools" dropdown IF the current user is both a threadAdmin AND is author of the current thread.

In other words, if the threadmoderator group is "100," How can I then say

If currently_logged_in_user is threadmoderator and
If currently_logged_in_user = thread_starter then
show admintools

I figure its something close to:

<vb:if condition="is_member_of($bbuserinfo, 100)">
<vb:if condition="is_author_of($thread)">
show admintools
</vb:if>
</vb:if>

It has to be something close to this...though I dont know how to query the system to find out the author of a thread...nor do I know how to reference the "show admintools" function...but I figure I've reasoned this out and given enough effort that one of you...who are MUCH better programmers than I...is willing to help me (and anyone that wants to use the code, giving myself and the person who cleans this up the credit).

How bout it people? Can someone help with this...?

mabersoft 02-09-2010 08:24 PM

What would the code be to only show on forumhome?

matthieugoua 02-10-2010 01:58 PM

Quote:

Originally Posted by egyptsons (Post 1974321)
this is not work too with me :(
Code:

<vb:if condition="$forum[forumid] == x">Show this if forum id is x</vb:if>
anyone can advice ??

not work for me

Adam H 02-11-2010 08:25 PM

Can any one tell me what i would have to use to get a sign to come up only when a thread is closed ?

So basically if a thread is closed i want a certain peace of HTML to show up

TheSupportForum 02-19-2010 08:16 AM

i need some help with the variables below to work with certian group and also an option not to show to certian groups can anyone help

so far i have this



Code:


<vb:if condition="is_member_of($bbuserinfo, {vb:raw vboptions.wmf_grp_perm})">
<vb:if condition="$vboptions['paypal_enable']">
 
 
 
<vb:else />
{vb:raw vboptions.wmf_closedreason}
</vb:if>

i need to where to add the section to not allow certain groups
i hope i got the code in the correct order so far

i wanna add {vb:raw vboptions.wmf_grp_noperm}

but not sure where to put it and if i need to add anything else to my exist code after the one i want inserted

AzzidReign 02-21-2010 03:16 PM

lol Wish I would have saw this before. Oh well, I figured it out :P Thanks for this though!

smartkidbk5 02-25-2010 03:41 AM

Quote:

Originally Posted by egyptsons (Post 1972657)
Thanks for your article

I want to add advertisement after the first post in some special forums
so I edit the "ad_showthread_firstpost" Template and add this

Code:

<vb:if condition="in_array($forum['forumid'], array(1,2,3))">Show this to forum 1, 2 and 3</vb:if>
But nothing change in the special forums and the ads not appear

also if I used this
Code:

<vb:if  condition="!in_array($forum[forumid], array(1,2,3))">Show this to forum 1, 2 and 3</vb:if>
it's appear in all forums not only the special (1,2,3)

Can you advice me plz ?

Best regards

Same with me. Anyone know the correct conditionals?

Alp Ozdemir 02-25-2010 11:52 AM

Try this;

Code:

<vb:if condition="in_array($foruminfo[forumid], array(x,y,z))">
code here!
</vb:if>



All times are GMT. The time now is 11:08 PM.

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

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02954 seconds
  • Memory Usage 1,744KB
  • 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
  • (6)bbcode_code_printable
  • (3)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