vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=250131

Message only certian usergroups can see?
by Cool Dog
07 Sep 2010 21:08

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! :D

BirdOPrey5 08 Sep 2010 01:34

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>

Cool Dog 10 Sep 2010 04:08

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?

BirdOPrey5 10 Sep 2010 16:25

Quote:

Originally Posted by Cool Dog (Post 2096067)
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.

Cool Dog 10 Sep 2010 23:35

Quote:

Originally Posted by BirdOPrey5 (Post 2096283)
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

Quote:

The conditional on line 27 appears to be missing its beginning tag (<if>). This may cause unexpected behavior.

BirdOPrey5 11 Sep 2010 03:08

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.

Cool Dog 12 Sep 2010 04:19

Thanks a lot! Works beautifully :)


All times are GMT. The time now is 03:13.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.