Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Advertisement Inside First Post In A Thread Details »»
Advertisement Inside First Post In A Thread
Version: 1.00, by indiancinema indiancinema is offline
Developer Last Online: Jan 2014 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.0.1 Rating:
Released: 02-02-2010 Last Update: Never Installs: 17
Template Edits
 
No support by the author.

Many People were asking for this Mod, This will add advertisement inside your first post

728 x 90 or 468 x 60 advertisement

Open Postbit or Postbit_legacy Template, which ever you are using

Look for this code

Code:
<vb:if condition="$show['postedited']">
Above it add this code

Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')">
  <div class="body">
  <div style="width: 100%">

Your Advertisement Code here...

</div>
</div>
</vb:if>

Screenshots

File Type: jpg mod.jpg (46.4 KB, 0 views)

Show Your Support

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

Comments
  #12  
Old 02-06-2010, 11:00 PM
TheSupportForum TheSupportForum is offline
 
Join Date: Jan 2007
Posts: 1,158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you are getting message becuase vb4 already has an ad program integrated
you cant parse the same function more than once

your add function does
Reply With Quote
  #13  
Old 02-06-2010, 11:29 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by simonhind View Post
you are getting message becuase vb4 already has an ad program integrated
you cant parse the same function more than once

your add function does
No that's not it.

But you could try adding <vb:literal>... </vb:literal> tags around the code.
Reply With Quote
  #14  
Old 02-07-2010, 01:23 AM
KevinGupta KevinGupta is offline
 
Join Date: Dec 2006
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great with the tags
thanks
Reply With Quote
  #15  
Old 02-07-2010, 01:33 AM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad to hear that.
Reply With Quote
  #16  
Old 02-08-2010, 10:57 PM
ndut ndut is offline
 
Join Date: Sep 2007
Location: Indonesia
Posts: 335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by civil78 View Post
ADMINCP --> Advertising --> Add New Ad

and from dropdown Page select Thread



From VB4 Adv system you can set a lot of rules where and when something appears.
when i click advertising, why there is DATABASE ERROR??
Reply With Quote
  #17  
Old 02-21-2010, 12:44 AM
PjDaBadMan PjDaBadMan is offline
 
Join Date: Jan 2010
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have installed this to my site.
I have one question though, How come the ads randomly appear?

Let me explain more. I will click on a thread and under the first post there will be an ad. I will backspace after and go to another thread then the ad does not appear under the first post on the new thread.
So basically the ads randomly appear on and off under the first posts.

Any advice?
Reply With Quote
  #18  
Old 02-24-2010, 11:08 AM
kingMOB kingMOB is offline
 
Join Date: Nov 2007
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could this code be adapted to be used in the cms? Like, after the third article print a banner, or insert a widget?
Reply With Quote
  #19  
Old 03-17-2010, 02:09 AM
Dr.osamA's Avatar
Dr.osamA Dr.osamA is offline
 
Join Date: Aug 2004
Location: Syrie
Posts: 979
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

goood work

installed

5 stars

thanxxxx
Reply With Quote
  #20  
Old 04-02-2010, 12:17 PM
Sancipa Sancipa is offline
 
Join Date: Apr 2008
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this mod only works if you have edited the post


you got put it wrong...

try this

Put this script:
Code:
<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')">
  <div class="body">
  <div style="width: 100%">

Your Advertisement Code here...

</div>
</div>
</vb:if>

After this:
Code:
{vb:raw template_hook.postbit_end}
Reply With Quote
  #21  
Old 04-11-2010, 06:31 PM
Sancipa Sancipa is offline
 
Join Date: Apr 2008
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not working on 4.0.3 need little help here...
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 11:56 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.06303 seconds
  • Memory Usage 2,329KB
  • Queries Executed 26 (?)
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
  • (4)bbcode_code
  • (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
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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