vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Signature postbit edit? (https://vborg.vbsupport.ru/showthread.php?t=190863)

dupont24 09-14-2008 02:04 AM

Signature postbit edit?
 
I am trying to place adsense in my signature (on my board). I found this code works well...except only I can see it and no other user groups can. I really only want it to show in the first post and to guests and registered groups. I would prefer it not visible to myself so I do not drive up impressions.Any help would be appreciated.


Code:

<if condition="$post[postcount] == 1 AND $bbuserinfo[userid] == 1">
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
Adsense Code Here</if>


Shishir 09-14-2008 03:37 AM

You have used code $bbuserinfo which is the Current User Browsing the forum, which is you as the ID is 1. To use the code in the first post only and to Guest and Registered user then use this instead. is_member_of($bbuseruserinfo, 12)

Code:

<if condition="$post[postcount] == 1 AND is_member_of($bbuserinfo, 0,2)">
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
Adsense Code Here</if>

I guess it would work. Not checked though.
Shishir

SEOvB 09-14-2008 04:03 AM

If you're using the latest release I do beleive there is an ad_location template for the first post now as well.

dupont24 09-14-2008 11:24 AM

Quote:

Originally Posted by FRDS (Post 1621697)
If you're using the latest release I do beleive there is an ad_location template for the first post now as well.

Thanks for your help. I have seen that however IMHO I think in the sig looks so much cleaner than actually a post like adsense.


Quote:

Originally Posted by Shishir (Post 1621688)
You have used code $bbuserinfo which is the Current User Browsing the forum, which is you as the ID is 1. To use the code in the first post only and to Guest and Registered user then use this instead. is_member_of($bbuseruserinfo, 12)

Code:

<if condition="$post[postcount] == 1 AND is_member_of($bbuserinfo, 0,2)">
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
Adsense Code Here</if>

I guess it would work. Not checked though.
Shishir

This worked perfectly showing to the groups I want to.

I would however like to achieve that this sig is only attached to admins post.

The first post works perfect, however my test registered accounts also show the adsense sig and thus anyone who starts a thread would also have an adsense sig.

I want to control this so adsense only shows in threads that I start or other admins start.

Shishir 09-14-2008 10:04 PM

I guess to do so, just add post usergroupid check.

Code:

<if condition="$post[postcount] == 1 AND is_member_of($bbuserinfo, 0,2) AND $post[usergroupid] == 6">
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
Adsense Code Here</if>

Shishir

dupont24 09-14-2008 10:35 PM

Thank you so much it worked perfect..... I wish i new how to make it a real mod as I am sure some peeps would like to use it.

One last question I am using the rss feed manager and the signatures do not show I have to run a query to update and show the signature. If I post manually the sig shows perfectly.


All times are GMT. The time now is 11:26 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.00981 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
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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