Quote:
|
This is driving me up the f*cking wall. Can someone help me?
I've created a custom forum block template that I want to use for advertisements only. Basically, I want the advertisements to display to everyone EXCEPT for our subscribers. I've tried variations of code but either the advertisements appear to all usergroups or to none. Code:
<vb if condition="is_member_of($bbuserinfo, 1,2,3,4,5,6,7,8,15,16,17)"> I can't seem to add an ELSE statement of any kind because all I get is an "Invalid Nesting" error. |
I think the problem might be caching. Try setting "Cache Time" to 0 and see if that works.
You should be able to use <vb:else /> to have an else section (but it needs the closing slash). ETA: also, your first line is missing a colon. It should start with <vb:if condition=.... |
What should I add after <vb:else />? :)
|
Quote:
Code:
<vb:if condition="is_member_of($bbuserinfo, 1, 2, 3)"> Do you have it working at all yet? |
I've got it how I described in the original post, except now with the colon. All groups can see the advert.
I'm trying to get it so that subscribers (11) don't see the advert, or the forum block for that matter. |
So how did you create it exactly? Did you choose "Custom HTML/PHP" block? And how did you fill in the rest of the form?
|
I copied the original block_html template and then made a new one named "adblock_html" with the same coding. I then added the conditionals (see above) and adjusted the settings for my Amazon advert block to use the "adblock_html" template.
|
That sounds good. Did you set the cache time to 0?
As Scanu posted in the other thread, something like this should work and it's a little shorter: Code:
<vb:if condition="!is_member_of($bbuserinfo, 11)"> |
What the...
I swear I did that yesterday. xD Ah well, that seems to have done the trick! Thank you very much mate! Gosh, all this stuff isn't very noob friendly haha. |
All times are GMT. The time now is 05:41 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:
|