Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 07 Sep 2010, 22:08
Cool Dog's Avatar
Cool Dog Cool Dog is offline
 
Join Date: Sep 2009
Lightbulb Message only certian usergroups can see?

Hello,

I have advertisements on my VB that only certain usergroups can see. Is there a code out there that I can use which will put text behind the ads, so when a certain usergroup has the ability to not see the ads they see the message instead? Much thanks!
Reply With Quote
  #2  
Old 08 Sep 2010, 02:34
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
If you're using <if> conditionals to show ads you can use <else> to show alternate data to people not seeing the ads...

<if condition == "your condition">
AD HTML
<else />
Alternate Info
</if>
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #3  
Old 10 Sep 2010, 05:08
Cool Dog's Avatar
Cool Dog Cool Dog is offline
 
Join Date: Sep 2009
Hi, thanks for the message!

Right now I am using the code "$google_adsense_for_search" to list the ad via product. where would I put that into the condition?

I just thought of something... I heard hiding text is a bad idea (google doesn't like it) or is that pertaining to something else?

Last edited by Cool Dog; 10 Sep 2010 at 08:22.
Reply With Quote
  #4  
Old 10 Sep 2010, 17:25
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Originally Posted by Cool Dog View Post
Hi, thanks for the message!

Right now I am using the code "$google_adsense_for_search" to list the ad via product. where would I put that into the condition?

I just thought of something... I heard hiding text is a bad idea (google doesn't like it) or is that pertaining to something else?
You'd put in like this:


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

Also this is fine, you need to make sure the content you show to google is the same you show to any other visitor- this doesn't change that. You can have different content for registered users, and most people do.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #5  
Old 11 Sep 2010, 00:35
Cool Dog's Avatar
Cool Dog Cool Dog is offline
 
Join Date: Sep 2009
Originally Posted by BirdOPrey5 View Post
You'd put in like this:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Hello again, thank you for your help. Sorry I'm rather new at this but what do I put into "your condition"? I tried to leave it how it is but it did not work.

Also when I copied that code I got this message

The conditional on line 27 appears to be missing its beginning tag (<if>). This may cause unexpected behavior.
Reply With Quote
  #6  
Old 11 Sep 2010, 04:08
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
 
Join Date: Jun 2008
Real name: Joe D.
Sorry I thought you knew what condition you wanted already... you need something like this:



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

That will show the ad to usergroups 5, 6, and 7 and show "Alternate Info" to everyone else.
__________________
-Joe
Former vb.org Moderator. Retired.

@BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic
Note - I no longer making new VB mods, sorry.
Reply With Quote
  #7  
Old 12 Sep 2010, 05:19
Cool Dog's Avatar
Cool Dog Cool Dog is offline
 
Join Date: Sep 2009
Thanks a lot! Works beautifully
Reply With Quote
Reply



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

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 17:27.

Layout Options | Width: Wide Color: