PDA

View Full Version : Message only certian usergroups can see?


Cool Dog
09-07-2010, 08:08 PM
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
09-08-2010, 12:34 AM
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
09-10-2010, 03:08 AM
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
09-10-2010, 03:25 PM
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:

<if condition == "your condition">
$google_adsense_for_search
<else />
Alternate Info
</if>

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
09-10-2010, 10:35 PM
You'd put in like this:

<if condition == "your condition">
$google_adsense_for_search
<else />
Alternate Info
</if>



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.

BirdOPrey5
09-11-2010, 02:08 AM
Sorry I thought you knew what condition you wanted already... you need something like this:



<if condition = "is_member_of($bbuserinfo, 5,6,7)">
$google_adsense_for_search
<else />
Alternate Info
</if>


That will show the ad to usergroups 5, 6, and 7 and show "Alternate Info" to everyone else.

Cool Dog
09-12-2010, 03:19 AM
Thanks a lot! Works beautifully :)