![]() |
| Join Us | Members List | Today's Posts | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||
| This is an updated list of conditionals with the syntax used in vBulletin 4. A preview of the syntax was ... |
| Welcome to the AdminAddict. |
![]() Hello and welcome to AdminAddict! The one-stop resource for forum and community administrators. |
![]() |
| | Share | Thread Tools | Search this Thread |
| | #1 | ||||
![]()
Posts: 7,156
| This is an updated list of conditionals with the syntax used in vBulletin 4. A preview of the syntax was made available on Wayne Luke's site, vBCodex and is the basis from which I have formed this list. As of writing, vB 4 isn't even out yet (it's in Alpha testing) so this won't be of use to you just yet, but at least you know it's here and we have it. Might as well add it to your bookmarks now so you have it when you need it. ![]() ------ Viewer is a guest Code: <vb:if condition="$show['guest']"> </vb:if> Code: <vb:if condition="$show['member']"> </vb:if> Code: <vb:if condition="$is_member_of($bbuserinfo,6)" /></vb:if> Code: <vb:if condition="$bbuserinfo['userid'] == X"> </vb:if> This list will be updated and maintained as time goes on and more information becomes available. ![]() | Best Regards, Nick Support AdminAddict // Purchase from the following reputable vendors: HostGator / Liquid Web / DriveThruOnline - Professional vBulletin Products / NameCheap Domains Compare Hosting Plans VPS • Dedicated Servers ![]() | | 2 out of 2 members found this post helpful. |

| | #3 | |||
| Grand Master | any reason why the moved from the easy format of <if condition="$show[member]"> to the new syntax? Is the <vb: part of it, so it can be broken down to application specific sections? Like their new CMS <cms: if condition="$show['guest']"> </cms:if> | Looking for web hosting? Look no further than Web Hosting Review Shop be sure to leave your hosting experience as well. Personal Blog of BS
Last edited by David McHenry; September 7th, 2009 at 06:24 PM..
| | |
| | #4 | |
| Zealot
Posts: 1,668
Join Date: May 2009 Experience: Advanced Forums Admin/Mod: 2 Software: vBulletin Forum: Puberty ![]() ![]() ![]() ![]() ![]() | Quote:
![]() | |
| | |
| | #5 | ||||||
![]()
Posts: 7,156
| Quote:
Quote:
| Best Regards, Nick Support AdminAddict // Purchase from the following reputable vendors: HostGator / Liquid Web / DriveThruOnline - Professional vBulletin Products / NameCheap Domains Compare Hosting Plans VPS • Dedicated Servers ![]() | | |

| | #6 |
| So in order to help those that can't do the job right, we get stuck with more complicated templates. NOT good | |
| | |
| | #7 | |
| Grand Master
Posts: 512
Join Date: Jun 2009 Location: 0HI0 Experience: Intermediate Forums Admin/Mod: 4 Software: vBulletin 3.7.x Forum: TuneMyToyota.com ![]() ![]() | waynes site is an amazing thing... thanks for this mane!! | |
| | |
| | #8 | |
| Grand Master
Posts: 784
Join Date: Jul 2009 Experience: Advanced Forums Admin/Mod: 1 Software: vBulletin 3.8.x Forum: DS Ultimate ![]() ![]() ![]() ![]() | Thanks for the list Nick. This should help anyone who wants to start converting the simpler modifications on their forum to vBulletin 4 versions. | |
| DS Ultimate Forums- A Nintendo DS forum -cheat-master30; Someone who probably posts way more on forums than anyone ever should. | ||
| | |
| | #9 | ||||
| Champion ![]()
Posts: 325
Location: California Experience: Advanced Forums Admin/Mod: 2 Software: vBulletin 3.8.x Forum: The Traders' Den | | | | |
| | #10 |
| Zealot
Posts: 1,668
Join Date: May 2009 Experience: Advanced Forums Admin/Mod: 2 Software: vBulletin Forum: Puberty ![]() ![]() ![]() ![]() ![]() | I think adding anything extra to the code which is already there may make it more daunting for beginners to look at. The normal ifs when I first seen them looked really hard to use and with adding vb: or other prefixes it may make the first look of them even more daunting to beginners to the software. |
| | |

| | #11 | |
| This means something... ![]()
Posts: 885
Join Date: Sep 2009 Location: MN Experience: Intermediate Forums Admin/Mod: 3 Software: vBulletin 3.8.x Forum: Sci-Fi Scapes ![]() ![]() ![]() ![]() ![]() ![]() ![]() | I both like this and dislike this. I think it'll be cool to be able to add PHP into your templates, but then again, having PHP and HTML separate (gently merged) in vB's current form is one of the things that makes it so easy to edit. (Ever templated a Zen-Cart site??? )As long as the code remains somewhat portable within the site, I'm sure I'll get used to it. ![]() | |
| | |
| | #12 | |||
| | The problem is the current syntax is invalid and causes validation to fail if you check just a template. However by adding a namespace, you can get around that and it is the proper way to code it. The most important part though is that is modular and expandable. The new system allows the use of loops in templates as well as special variable syntax for parsing things like dates, times, and numbers within the templates instead of the PHP Code. This allows you to present more customized experiences to your end users as an administrator without worrying about the PHP code. It allows programmers to give you more tools through addons to customize it even more. I doubt there will be PHP in the templates and the new syntax is less PHP-like than before. You'll need to keep your PHP in plugins where it belongs. | vBCodex - Get help building your vBulletin community. Get Gravatar support for your vBulletin community. -- Please do not contact me via PM for vBulletin Support. | | |
| | #13 | ||||
| Grand Master | Quote:
Thanks for the update on why the change occurred. I personally don't find it any more difficult to stick vb in front of a condition. | Looking for web hosting? Look no further than Web Hosting Review Shop be sure to leave your hosting experience as well. Personal Blog of BS | | |
| | #14 |
| | #15 | ||||
| Grand Master | Quote:
From the looks of it, they aren't really changing over current conditionals. I'd imagine there maybe some new ones, and some small changes/tweaks to the current ones, but for the most part it seems its simply a new syntax to prefix the conditional with <vb: | Looking for web hosting? Look no further than Web Hosting Review Shop be sure to leave your hosting experience as well. Personal Blog of BS | | |

![]() |
| Tags |
| conditionals, List, template, vBulletin |
| > vBulletin 4 Template Conditionals List |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| |