vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - Innovative Ads After First Post (Or any post!) (https://vborg.vbsupport.ru/showthread.php?t=249274)

TheLastSuperman 08-24-2010 10:00 PM

Innovative Ads After First Post (Or any post!)
 
1 Attachment(s)
Innovative Ads After First Post

By:
https://vborg.vbsupport.ru/external/2010/08/16.png

I decided to make this while creating another modification as I have seen this requested many times, I Google'd it finding details on what template to edit plus I searched here on vbulletin.org and only found old "modifications" which were actually just tutorials and none were actual products that did most of the work for you :p.

Description:

Ad after first post on very page or as some describe it, Ad after first post in a thread - This modification places two ads in a post like container below the first post on every page in a thread. Fully customizable to allow all sorts of ad codes such as Google Adsense, OpenX Ads, and various others along with the possibility for the user to design his own images and link them to the appropriate content. Users can also customize CSS or remove the DIV codes to use show only one ad or any sort of advertisement and display any form of content other than ads!

Quote:

Originally Posted by TheLastSuperman
  • Please see post #'s 6 & 7 for codes to display this after a certain post on each page not simply after the first post!
  • More information on vB4 Conditionals can be found here: https://vborg.vbsupport.ru/showthread.php?t=231525 Special thanks should go to BBR-APBT for taking the time to write that article.

Features:
  • Enable or Disable via Settings in vBulletin Options.
  • Fully Customizable.
  • Auto-template.

Required Changes:
(Manual i.e. "To Do")
  • Edit the new template postbit_legacy_ads_after_firstpost and simply add in your scripts or codes to show them which is very simple as I included commented out code to show you exactly where to place it. *This shows in Postbit AND Postbit_Legacy depending on what you have enabled.
(Optional i.e. If you need to adjust the css to make it match your style better if using a custom Fixed width etc.)
  • Edit the new template adsafterfirstpost.css and adjust the css as desired!

(Automatic)
  • Templates to add: 2 ('postbit_legacy_ads_after_firstpost','adsafterfir stpost.css')
  • Phrases to add: 3

Difficulty:
Easy, Time to install: Around 1 Minute - Installer is included simply import the product;
AdminCP > Plugins & Products > Manage Products > *Now click the [ADD/IMPORT PRODUCT] link to import from your computer (download below). Adding in your own codes and customizing if you see fit takes a few more minutes.

History:
8.24.2010: Version 1.0 Created

IMPORTANT:
In the postbit_legacy_ads_after_firstpost template please find:
Code:

<div id="innovativeadleft">
<vb:comment> Left Ad Code Below this Commented out line </vb:comment>
Left Ad Image/Code 1 needs to be placed here, no larger than 260 pixels in height.
<vb:comment> Left Ad Code Above this Commented out line </vb:comment>
</div>
<div id="innovativeadright">
<vb:comment> Right Ad Code Below this Commented out line </vb:comment>
Right Ad Image/Code 2 needs to be placed here, no larger than 260 pixels in height.
<vb:comment> Right Ad Code Above this Commented out line </vb:comment>
</div>

As you can see I have added in commented code to let you know where your custom ads codes need to be placed, very simple.

*Remember to enable the mod after installing otherwise it won't show!
AdminCP > Settings > Options > Innovative Ads After First Post and set to Yes.

*Attention- Please view the first page as the 2nd and 3rd (Added: Post #'s 6 & 7 also contain info on how to customize!) posts were reserved and contain additional information to help you customize this in various ways.

What can you expect in the next version?
  • No template edits, Ads codes will be entered into the admin control panel area where the mod is currently enabled/disabled. If you have a custom style CSS changes will still be required if you notice any position issues etc.

TheLastSuperman :rolleyes:
http://www.innovationbyinstinct.com

https://vborg.vbsupport.ru/external/2010/08/17.png


TheLastSuperman 08-25-2010 02:21 AM

How to Customize the Template:
I will update this as questions are posted.

Currently the mod shows these Ads to Guest and Members, to show this only to Members OR Guest edit the template postbit_legacy_ads_after_firstpost and find:

Code:

<vb:if condition="$show['guest'] OR $show['member']">
Remove the $show['guest'] and the OR to show this to Members only.
Remove the OR and the $show['member'] to show this to Guest only.

Currently the mod has a link to REGISTER on your site as the post title per say, to change this link if your NOT showing this to Guest Only edit the same template as above and find:

Code:

<span class="innovativetitle"><a href="register.php">Register to remove these Ads!</a></span>
Replace the <a href="register.php">Register to remove these Ads!</a> with your link OR text.
  • Please see post #'s 6 & 7 for codes to display this after a certain post on each page not simply after the first post!
  • More information on vB4 Conditionals can be found here: https://vborg.vbsupport.ru/showthread.php?t=231525 Special thanks should go to BBR-APBT for taking the time to write that article.
How to locate the templates:

AdminCP > Styles & Templates > Style Manager > *Select Edit Templates in the drop-down for your style. While scrolling through the templates some are titles for a group of templates so we have added two new templates by installing this mod and they are located within the CSS Templates and the Posbit Templates "Families".

In the Postbit Templates find the template postbit_legacy_ads_after_firstpost to paste your AD codes or well.. anything!
In CSS Templates find the template adsafterfirstpost.css to adjust the CSS as desired.

Additional Info to add these ads after any post or before the last

Quote:

Originally Posted by karlm (Post 2089165)
Good stuffs, Clark. Can it be set so as you can choose which post # the ads go to? i.e. atm, they're forced after post #1... but What if I wanted it to be on post #9 instead?

Quote:

Originally Posted by TheLastSuperman (Post 2089168)
Hmm you should be able to, open the template postbit_legacy_ads_after_firstpost and find:

Code:

<vb:if condition="!$GLOBALS['FIRSTPOSTID']">
Replace with:

Code:

<vb:if condition="$post['postcount'] % $vboptions['maxposts'] == ?">
Replace the ? mark with the post number you want the Ads to show after and DO NOT include a trailing </vb:if> as it's already near the bottom ;).

Let me know if that works :D.

Quote:

Originally Posted by karlm (Post 2089166)
Oooooor, I might want it so it's always the 'last but one' post..?

Quote:

Originally Posted by TheLastSuperman (Post 2089170)
Well that depends on your post per page settings:

AdminCP > settings > Options > Thread Display Options (showthread) > Maximum Displayed Posts Before Page Split



So if you have that set to 20 posts per page before the split simply use the code I just posted above and change the ? mark to 19 ;).

Example:

Code:

<vb:if condition="$post['postcount'] % $vboptions['maxposts'] == 19">


TheLastSuperman 08-25-2010 02:24 AM

How to Customize the CSS:
I will update this as questions are posted.

In CSS Templates find the template adsafterfirstpost.css to adjust the CSS as desired.

*The Height and Width of the Ad container and the inner Left and Right Ad containers even though it shows in the screenshot and says max height of 260, can all be adjusted in the CSS template ;).
*You can fully customize the template to show something other than ads, be creative and post if you have questions!

karlm 08-25-2010 03:06 AM

Good stuffs, Clark. Can it be set so as you can choose which post # the ads go to? i.e. atm, they're forced after post #1... but What if I wanted it to be on post #9 instead?

karlm 08-25-2010 03:07 AM

Oooooor, I might want it so it's always the 'last but one' post..?

TheLastSuperman 08-25-2010 03:11 AM

Quote:

Originally Posted by karlm (Post 2089165)
Good stuffs, Clark. Can it be set so as you can choose which post # the ads go to? i.e. atm, they're forced after post #1... but What if I wanted it to be on post #9 instead?

Hmm you should be able to, open the template postbit_legacy_ads_after_firstpost and find:

Code:

<vb:if condition="!$GLOBALS['FIRSTPOSTID']">
Replace with:

Code:

<vb:if condition="$post['postcount'] % $vboptions['maxposts'] == ?">
Replace the ? mark with the post number you want the Ads to show after and DO NOT include a trailing </vb:if> as it's already near the bottom ;).

Let me know if that works :D.

TheLastSuperman 08-25-2010 03:15 AM

Quote:

Originally Posted by karlm (Post 2089166)
Oooooor, I might want it so it's always the 'last but one' post..?

Well that depends on your post per page settings:

AdminCP > settings > Options > Thread Display Options (showthread) > Maximum Displayed Posts Before Page Split

Quote:

Maximum Displayed Posts Before Page Split
The number of posts to display on a thread page in linear or hybrid mode before splitting it over multiple pages.

Note: This number must be at least 1.
So if you have that set to 20 posts per page before the split simply use the code I just posted above and change the ? mark to 19 ;).

Example:

Code:

<vb:if condition="$post['postcount'] % $vboptions['maxposts'] == 19">

hardfm 08-25-2010 09:06 AM

and if I wish to have this every 2 posts? so after 2nd, 4th and 6th and so on?

karlm 08-25-2010 09:54 AM

Quote:

Originally Posted by hardfm (Post 2089261)
and if I wish to have this every 2 posts? so after 2nd, 4th and 6th and so on?

You'd get a lot of very annoyed viewers...

TheLastSuperman 08-25-2010 10:03 AM

Quote:

Originally Posted by hardfm (Post 2089261)
and if I wish to have this every 2 posts? so after 2nd, 4th and 6th and so on?

Then do the same thing I posted above i.e.

Quote:

Originally Posted by TheLastSuperman (Post 2089168)
Hmm you should be able to, open the template postbit_legacy_ads_after_firstpost and find:

Code:

<vb:if condition="!$GLOBALS['FIRSTPOSTID']">
Replace with:

Code:

<vb:if condition="$post['postcount'] % $vboptions['maxposts'] == ?">
Replace the ? mark with the post number you want the Ads to show after and DO NOT include a trailing </vb:if> as it's already near the bottom ;).

Let me know if that works :D.

If you meant show the ads after the 2nd, 4th, and 6th then karlm is speaking the truth imo, they will spite you most likely and tbo if I ever go to a site with ads after the post 2, 4, 6, 8, 10, 12 I'll never register in fact I'll run away from that site in the opposite direction as fast as humanly possible :p. If you MARK AS INSTALLED I'll be happy to provide the code but head our "warnings" per say and make an informed decision ;).

Quote:

Originally Posted by karlm (Post 2089279)
You'd get a lot of very annoyed viewers...

I think you're correct here but to each his own so if anyone wants something custom simply mark as installed!


All times are GMT. The time now is 11:44 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.01286 seconds
  • Memory Usage 1,790KB
  • 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
  • (11)bbcode_code_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete