Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
New Ad Location - Below Postbit Signature Details »»
New Ad Location - Below Postbit Signature
Version: 1.00, by TalkVirginia TalkVirginia is offline
Developer Last Online: Mar 2013 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.8.1 Rating:
Released: 03-27-2009 Last Update: Never Installs: 12
Template Edits
Re-useable Code Code Changes  
No support by the author.

What it does?
Have you wanted to add a new Ad Location below the signature in each Postbit where you can place text ads or banner ads?

File Edits: 2
Template Edits: 2
New Templates: 1


*** This has only been tested with vBulletin 3.8.1. ***

Instructions

1. Make a backup of your Class_Postbit.php and your Showthread.php.

2. Open the Class_Postbit.php in your forum includes folder and look for:

PHP Code:
 
  
if ($post['isfirstshown'])
  {
   eval(
'$ad_location[\'ad_showthread_firstpost_start\'] = "' fetch_template('ad_showthread_firstpost_start') . '";');
   eval(
'$ad_location[\'ad_showthread_firstpost_sig\'] = "' fetch_template('ad_showthread_firstpost_sig') . '";');
  } 
(Note: The ending "}" should be on or around line 300.)

2. Add the following code below it:

PHP Code:
 
eval('$ad_location[\'ad_showthread_below_sig\'] = "' fetch_template('ad_showthread_below_sig') . '";'); 
3. Save the file.

4. Log into your AdminCP, and go to:
Styles & Templates => Styles Manager => Master Style => Add New Template

Product: vbulletin

Title: ad_showthread_below_sig

Template:

HTML Code:
 
<br />
<div align="center" class="smallfont">
This is a test ad below everyone's signature<br />
<a href="http://www.mydomain.com/register.php" target="_self">Sign Up Now To Remove These Ads</a>
</div>
 
 
 
 
Note: I had to add the new template to the Master Style in order to get it to show up under existing "Ad Locations Template" group.

5. Save your new template.


6. Now, make the following edit to your Postbit and Postbit Legacy templates:

Find:

Code:
 
            $template_hook[postbit_signature_end]
7. Add the following below:

Code:
 
            $ad_location[ad_showthread_below_sig]
8. Save template and do the same in Postbit_legacy.

9. Open showthread.php in the forum root folder and look for:
PHP Code:
 
// pre-cache templates used by all actions
$globaltemplates = array(
    
'ad_showthread_beforeqr',
    
'ad_showthread_firstpost',
    
'ad_showthread_firstpost_start',
    
'forumdisplay_loggedinuser',
    
'forumrules',
    
'im_aim',
    
'im_icq'
9. Insert "'ad_showthread_below_sig', in between
"'ad_showthread_firstpost_start'," and "'forumdisplay_loggedinuser',"

which should look like this when done:
PHP Code:
 
// pre-cache templates used by all actions
$globaltemplates = array(
    
'ad_showthread_beforeqr',
    
'ad_showthread_firstpost',
    
'ad_showthread_firstpost_start',
                
'ad_showthread_firstpost_sig',
                
'ad_showthread_below_sig',
    
'forumdisplay_loggedinuser',
    
'forumrules',
    
'im_aim',
    
'im_icq'
10. Save the file.

11. Upload your edited showthread.php to your forum's root folder, and
class_postbit.php file to your forum's includes folder overwriting the existing file.

Optional: If you use an ad rotation system such as OpenX, you may need to create a new plugin using the "postbit_display_start" hook for the ad to show up.

If you have questions, let me know and I'll try to help as much as I can.

Make sure you Click Install if you use this!!!

Screenshots

File Type: jpg postbitAdBelowSig.jpg (88.7 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 03-29-2009, 09:50 PM
TalkVirginia's Avatar
TalkVirginia TalkVirginia is offline
 
Join Date: Oct 2008
Location: Virginia
Posts: 545
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Loco.M View Post
It would be nice if it was default, but seems like a lot of work when you could just add the banner code in the postbit template, or openX


Keep up the good work
I guess if it seems like a lot of work, then you probably don't need it.

but thank you!
Reply With Quote
  #13  
Old 03-30-2009, 12:05 PM
ahmed-samara ahmed-samara is offline
 
Join Date: Dec 2004
Location: egypt
Posts: 178
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

now is working great thanks too much
installed
Reply With Quote
  #14  
Old 04-16-2009, 10:48 AM
KevinGupta KevinGupta is offline
 
Join Date: Dec 2006
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry.. how do I exactly put in a banner/text ad.. could you please give me step by step guide to it?

and what type of banner links can I put in... Can I just put in a URL e.g. www.domain.com/pic.gif ?
Reply With Quote
  #15  
Old 04-16-2009, 12:56 PM
TalkVirginia's Avatar
TalkVirginia TalkVirginia is offline
 
Join Date: Oct 2008
Location: Virginia
Posts: 545
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KevinGupta View Post
Sorry.. how do I exactly put in a banner/text ad.. could you please give me step by step guide to it?

and what type of banner links can I put in... Can I just put in a URL e.g. www.domain.com/pic.gif ?
Once you make the edits as instructed above, you should be able to put any html code including image or text banners, and template conditionals in the new template as you would the other ad locations.
Reply With Quote
  #16  
Old 04-16-2009, 12:58 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tagged, will check out later & Thanks
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 06:10 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04476 seconds
  • Memory Usage 2,297KB
  • Queries Executed 21 (?)
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
  • (2)bbcode_code
  • (1)bbcode_html
  • (4)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (1)postbit_attachment
  • (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_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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete