vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Message only certian usergroups can see? (https://vborg.vbsupport.ru/showthread.php?t=250131)

Cool Dog 09-07-2010 08:08 PM

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

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:

Code:

<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

Quote:

Originally Posted by BirdOPrey5 (Post 2096283)
You'd put in like this:

Code:

<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

Quote:

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:


Code:

<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 :)


All times are GMT. The time now is 11:38 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01039 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete