this is not work too with me :(
Code:
<vb:if condition="$forum[forumid] == x">Show this if forum id is x</vb:if> |
Quote:
Do you know if there is any work around? |
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...? |
What would the code be to only show on forumhome?
|
Quote:
|
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 |
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:
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 |
lol Wish I would have saw this before. Oh well, I figured it out :P Thanks for this though!
|
Quote:
|
Try this;
Code:
<vb:if condition="in_array($foruminfo[forumid], array(x,y,z))"> |
:erm: errrmmm... hi
how about showing something here to a thread starter but not to his first post....is there any conditional on this please? appreciate any help thanks and best regards... :p |
Is there anything that I can pull the date of the last post of a thread?
$thread['lastpostdate'] or something like that. I'm trying to see if the last post date is older than 90 days and if so - output a custom phrase. Thanks. |
I'm trying to use a conditional to color code certain forums in the What's New and Search Results.
In search_threadbit I've tried the following, with no success (only the else shows for threads in these forums too.) Code:
<vb:if condition="in_array($foruminfo[forumid],array(26,29,56,25,27))"> I read here about assigning a variable to a template, so tried creating a new plugin to do so, but can't seem to make that work either. One question is that the template is labeled search_threadbit but that's not a choice in the add plugin screen for a hook location - only search_results_threabit which doesn't seem to exist as a template. So I'm a bit lost there. Any guidance? Many thanks. (new to VB4 today) |
Quote:
Is it possible to put the condition in the plugin? |
Quote:
|
Is there an "at least this" conditional?
I have this conditional to list just the blogs from a specific category: PHP Code:
Any help? =) |
Hi, how would you direct guests to login with <if condition>?
|
I have a custom template being called at the template hook in the postbit called postbit_userinfo_right_after_posts which works fine with static text from the template outside of conditionals, however when I try to use text in a conditional or pull a field such as {vb:var post.fieldX}, nothing happens...
I am able to call conditionals in the postbit template without any problems, just not in the custom template. The conditional and field I'm trying to use is:- Code:
<vb:if condition="$post['fieldX']"><dt>Field Title</dt> <dd>{vb:var post.fieldX}</dd></vb:if> |
What about a conditional to have an ad appear after every 2 posts? used to be easy in vb 3.8, not now! :( :(
|
Hello,
I would like to show different size ads for memvers and guests, someone can help me to see if this code it's correct? Quote:
|
is there any conditional list to show something only if the said member is offline?
it means the below code belong to the user...so i want to hide it when they are online... it can only be seen once that they are offline...is that possible guys? Code:
<vb:if condition="$post['lastactivity']"> thanks and best regards... :o |
Quote:
hmmm...:rolleyes: |
Bump!-Bump!-Bump!
:mad: |
It seems simple enough.. I wish I could help. Unfortunately I'm not familar in that area. Hopefully my response will help in attracting attention to your question. ;)
|
TalkVirginia...thanks a lot but i guess and notice that most of well experienced coder are not quite there anymore or interested of replying to any message who needs help regarding code like this or product...we have still some around but not paying or giving attention to post message like this...but if you post it to paid forum...they are quite fast and your pm box is full in a minute or 2....:p well thats my own opinion only...well i am not like that or tryin not to be like that...as long as i can...i am willing always to share my knowledge...or anything that i know...without any single cents...thanks is quite enough...
anyway hope someone who is more experienced coder someday will go reply here and share his knowledge...i might share him too some cents...;) best regards to all :p |
I think most want us to do as much research on our own, provide our analysis and findings before they offer any input. Granted, this is important to do but sometimes we need a knudge in the right direction... sometimes. :) Off the top of my head I would say you might be able to find something already existing in postbit and/or postbit_legacy where it shows the online status icon. I'll have to go back and re-read the thread I guess in case that's not what you are looking for.
--------------- Added [DATE]1269596340[/DATE] at [TIME]1269596340[/TIME] --------------- Quote:
|
I'd like to add that you can use AND & OR for example
Code:
<vb:if condition="$show['member'] AND THIS_SCRIPT == 'calendar'">show text</vb:if> |
What about show to users having one post? Please? Thank you in advance! :)
|
Crystal clear - Subscribed.... thank you
|
I'm trying this in the css files stored among the templates. Anyone care to tell me whats wrong ? :)
Quote:
|
is there a way to get this to work in a CMS article? or maybe with bbcode?
|
Can we set conditional to ONLY show if user has filled in Profile Field ? Otherwise it is blank
|
I've been working with some of the code provided here to show Adsense ads to non members only.
I found that using <vb:if condition... gave an error when trying to save the code. Missing if statment relative to the </vb:if> The following worked Code:
<if condition="in_array($bbuserinfo['usergroupid'], array(1,3,4,8))"> |
Wow thanks for this greatly appreciated; I have dedicated this entire day to me to fix up all the little things on my site such as all of the template edits, permissions and most importantly all of the conditionals and so this thread and the time taken to create it is greatly appreciated.
|
Quote:
What did work was: Code:
<if condition="!in_array($GLOBALS[forumid], array(1,2,3))">Show this to forum 1, 2 and 3</vb:if> |
Can someone tell me if this is right to put in our footer to not have something show on the CMS and to not show it to guests:
Code:
<vb:if condition="THIS_SCRIPT != 'CMS'"><vb:if condition="is_member_of($bbuserinfo, 1,2,3)">Code here!</vb:if></vb:if> |
The correct this_script for CMS is
HTML Code:
<vb:if condition="THIS_SCRIPT == 'vbcms'"></vb:if> |
****UPDATE***
Ok, finally figured it out, had to pass in usergroups in the $show variable from the plugin. So in the plugin: $show[gm_ugs] = explode(',', trim($vbulletin->options['gm_user_groups_allowed'])); and in the template, the condition is: <vb:if condition="is_member_of($bbuserinfo, $show[gm_ugs])"> I'm sure that's obvious to most of you, but... just incase someone else has the same question, hopefully that helps. -------------------------- How do you check multiple usergroups in a template? Such as: <vb:if condition="is_member_of($bbuserinfo, $usergroups)"> where $usergroups = "6,15,10" Specifically: <vb:if condition="is_member_of($bbuserinfo, array($vboptions['gm_user_groups_allowed']))"> Is what I am trying, but it only seems to work if $vboptions['gm_user_groups_allowed'] is not an array and is a single value. |
Quote:
I have profile field 8 with radio single selection as the type. It's set with options of yes and no. It seems to be working. Code:
<vb:if condition="in_array($bbuserinfo['field8'], array(yes))"> |
Quote:
Code:
<vb:if condition="$bbuserinfo[field8] == 'yes'"> |
All times are GMT. The time now is 02:46 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 | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|