The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Hiding content in the CMS with certain conditions.
I have a custom form in a static page in the CMS, as well as some text.
In total I will have 3 forms but two of them I don't want to be seen by unregistered users and registered users must have 5 posts or more to be able to see the form. As the form is in a static page is there any code I can wrap around the form to do what I want? I don't really want to have to go down the route of faffing about creating a new usergroup and promotions and stuff, plus I don't want to block the whole page just the specific form bit so they can't submit untill they are registered with 5 posts or more! I know I need to us vb conditionals but what? As I have no idea what they are. |
#2
|
|||
|
|||
I don't think you can use template vb:if tags in a static html page. But instead of putting html in the big text area you can leave it blank and just change the template name to a template you want to use (see this article: https://vborg.vbsupport.ru/showthread.php?t=236245).
|
#3
|
|||
|
|||
I've sorted it thanks Using a vb condition.
|
#4
|
|||
|
|||
Did you put a condition right in an html static page? I thought I tried that and it didn't work.
|
#5
|
|||
|
|||
Na I made a copy of the template it calls and renamed it, and put this around {vb:raw $pagetext}
Code:
<vb:if condition="$show['member'] AND $bbuserinfo['posts'] >= 5"> {vb:raw $pagetext} <vb:else /> <b>Sorry you must be logged in and have at least 5 posts to view this form.</b> </vb:if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|