Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-14-2008, 02:04 AM
dupont24 dupont24 is offline
 
Join Date: Oct 2003
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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>
Reply With Quote
  #2  
Old 09-14-2008, 03:37 AM
Shishir's Avatar
Shishir Shishir is offline
 
Join Date: Jul 2008
Location: Dhaka
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 09-14-2008, 04:03 AM
SEOvB's Avatar
SEOvB SEOvB is offline
 
Join Date: May 2007
Location: Indianapolis
Posts: 2,451
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you're using the latest release I do beleive there is an ad_location template for the first post now as well.
Reply With Quote
  #4  
Old 09-14-2008, 11:24 AM
dupont24 dupont24 is offline
 
Join Date: Oct 2003
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FRDS View Post
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 View Post
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.
Reply With Quote
  #5  
Old 09-14-2008, 10:04 PM
Shishir's Avatar
Shishir Shishir is offline
 
Join Date: Jul 2008
Location: Dhaka
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #6  
Old 09-14-2008, 10:35 PM
dupont24 dupont24 is offline
 
Join Date: Oct 2003
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 08:50 PM.


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.03592 seconds
  • Memory Usage 2,212KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete