Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #361  
Old 04 May 2013, 20:29
GameOverViper GameOverViper is offline
 
Join Date: Jun 2011
Originally Posted by Lynne View Post
It would actually be like this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Thanks a lot Lynne! It worked. I appreciate it!
Reply With Quote
  #362  
Old 23 Jun 2013, 17:45
Kirk93 Kirk93 is offline
 
Join Date: Apr 2013
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.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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.
Reply With Quote
  #363  
Old 23 Jun 2013, 18:09
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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=....

Last edited by kh99; 23 Jun 2013 at 18:43.
Reply With Quote
  #364  
Old 23 Jun 2013, 20:26
Kirk93 Kirk93 is offline
 
Join Date: Apr 2013
What should I add after <vb:else />?
Reply With Quote
  #365  
Old 23 Jun 2013, 21:34
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
Originally Posted by Kirk93 View Post
What should I add after <vb:else />?
Well, I was just answering where you said you couldn't get any "else" to work. But I guess you'd do something like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

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?
Reply With Quote
  #366  
Old 23 Jun 2013, 21:50
Kirk93 Kirk93 is offline
 
Join Date: Apr 2013
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.
Reply With Quote
  #367  
Old 23 Jun 2013, 22:02
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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?
Reply With Quote
  #368  
Old 24 Jun 2013, 09:39
Kirk93 Kirk93 is offline
 
Join Date: Apr 2013
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.
Reply With Quote
  #369  
Old 24 Jun 2013, 15:22
kh99 kh99 is offline
 
Join Date: Aug 2009
Real name: Kevin
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:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #370  
Old 24 Jun 2013, 16:12
Kirk93 Kirk93 is offline
 
Join Date: Apr 2013
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.
Reply With Quote
  #371  
Old 24 Oct 2013, 06:20
dougdirac's Avatar
dougdirac dougdirac is offline
 
Join Date: Nov 2011
What's the conditional to check if a user is a member of a particular social group?
Reply With Quote
  #372  
Old 24 Oct 2013, 07:26
tbworld tbworld is offline
 
Join Date: Oct 2008
Originally Posted by dougdirac View Post
What's the conditional to check if a user is a member of a particular social group?
What template are you going to use this conditional on? A variable for the conditional may not exist for a particular template.

Last edited by tbworld; 25 Oct 2013 at 00:43.
Reply With Quote
  #373  
Old 25 Oct 2013, 00:29
dougdirac's Avatar
dougdirac dougdirac is offline
 
Join Date: Nov 2011
Hmm... Which templates can it work on?
Reply With Quote
  #374  
Old 25 Oct 2013, 00:41
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Real name: Chris
Something like this.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Change the groupid to what you want.
Reply With Quote
  #375  
Old 26 Feb 2014, 00:55
GameOverViper GameOverViper is offline
 
Join Date: Jun 2011
Originally Posted by Lynne View Post
It would actually be like this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
This doesn't work in the sidebar. How could I hide an ad in the sidebar?
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 15:55.

Layout Options | Width: Wide Color: