![]() |
|
Article Options |
#361
|
||||
|
||||
Originally Posted by Lynne
Thanks a lot Lynne! It worked. I appreciate it! ![]()
![]() No members have liked this post.
|
#362
|
||||
|
||||
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.
Can someone tell me EXACTLY how to do this? The usergroup ID for subscribed members is "11". ![]() I can't seem to add an ELSE statement of any kind because all I get is an "Invalid Nesting" error. No members have liked this post.
|
#363
|
|||
|
|||
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=.... No members have liked this post.
Last edited by kh99; 23 Jun 2013 at 18:43. |
#364
|
|||
|
|||
What should I add after <vb:else />?
![]() No members have liked this post.
|
#365
|
||||
|
||||
Well, I was just answering where you said you couldn't get any "else" to work. But I guess you'd do something like:
so if there's nothing that you want the other groups to see, you don't need an "else". Do you have it working at all yet? No members have liked this post.
|
#366
|
|||
|
|||
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. No members have liked this post.
|
#367
|
|||
|
|||
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?
No members have liked this post.
|
#368
|
|||
|
|||
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.
No members have liked this post.
|
#369
|
||||
|
||||
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:
No members have liked this post.
|
#370
|
|||
|
|||
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. No members have liked this post.
|
#371
|
||||
|
||||
What's the conditional to check if a user is a member of a particular social group?
__________________
Tesla Motors Club - Enthusiasts & Owners Forum No members have liked this post.
|
#372
|
|||
|
|||
What template are you going to use this conditional on? A variable for the conditional may not exist for a particular template.
No members have liked this post.
Last edited by tbworld; 25 Oct 2013 at 00:43. |
#373
|
||||
|
||||
Hmm... Which templates can it work on?
__________________
Tesla Motors Club - Enthusiasts & Owners Forum No members have liked this post.
|
#374
|
||||
|
||||
Something like this.
Change the groupid to what you want. No members have liked this post.
|
#375
|
||||
|
||||
Originally Posted by Lynne
This doesn't work in the sidebar. How could I hide an ad in the sidebar?
![]()
No members have liked this post.
|
![]() |
«
Previous Article
|
Next Article
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Article Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 15:55.