Log in

View Full Version : Mini Mods - Advertisement Inside First Post In A Thread


indiancinema
02-02-2010, 10:00 PM
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

<vb:if condition="$show['postedited']">

Above it add this 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>

djbaxter
02-03-2010, 02:19 AM
This is already a built-in option in 4.x.

Alecsmith
02-03-2010, 03:53 AM
Tagged for my next forum :)

trilOByte
02-03-2010, 07:44 AM
This is already a built-in option in 4.x.

Where?

trilOByte
02-03-2010, 07:48 AM
This is useful, thanks. :)

How would I modify the conditional to make this appear only in certain formid's?

civil78
02-03-2010, 01:10 PM
Where?

ADMINCP --> Advertising --> Add New Ad

and from dropdown Page select Thread

This is useful, thanks. :)

How would I modify the conditional to make this appear only in certain formid's?

From VB4 Adv system you can set a lot of rules where and when something appears.

djbaxter
02-03-2010, 03:19 PM
This is already a built-in option in 4.x.

Where?

ADMINCP --> Advertising --> Add New Ad

and from dropdown Page select Thread

That or using the Ad templates introduced in version 3.8.

indiancinema
02-03-2010, 07:17 PM
That or using the Ad templates introduced in version 3.8.

I dont see anything where we can add the advertisement inside the first post, All You can add is after the first post.

djbaxter
02-04-2010, 12:56 AM
I dont see anything where we can add the advertisement inside the first post, All You can add is after the first post.


Admin CP | Advertising | Manage Ads => Thread


Choice of inside first post or second post or both.




Admin CP | Styles & Templates | Edit Templates =>


ad_showthread_firstpost_start
ad_thread_first_post_content
ad_showthread_firstpost_sig

KevinGupta
02-06-2010, 07:13 AM
Admin CP | Advertising | Manage Ads => Thread


Choice of inside first post or second post or both.




Admin CP | Styles & Templates | Edit Templates =>


test ad_showthread_firstpost_start
test ad_thread_first_post_content
test ad_showthread_firstpost_sig



but when I ad any code using vB inbuilt option, e.g. Adbrite code it gives me an error at the top of the page:

Parse error: syntax error, unexpected '[' in /home/public_html/--/forum/includes/class_core.php(4029) : eval()'d code on line 9

TheSupportForum
02-06-2010, 11:00 PM
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

djbaxter
02-06-2010, 11:29 PM
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.

KevinGupta
02-07-2010, 01:23 AM
Works great with the tags :)
thanks

djbaxter
02-07-2010, 01:33 AM
Glad to hear that. :)

ndut
02-08-2010, 10:57 PM
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??

PjDaBadMan
02-21-2010, 12:44 AM
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?

kingMOB
02-24-2010, 11:08 AM
Could this code be adapted to be used in the cms? Like, after the third article print a banner, or insert a widget?

Dr.osamA
03-17-2010, 02:09 AM
goood work

installed

5 stars

thanxxxx

Sancipa
04-02-2010, 12:17 PM
this mod only works if you have edited the post


you got put it wrong...

try this

Put this script:

<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:

{vb:raw template_hook.postbit_end}

Sancipa
04-11-2010, 06:31 PM
Not working on 4.0.3 need little help here...

marshal_ramdev
04-21-2010, 04:59 AM
thank you ...

dzinerfusion
07-29-2010, 03:20 AM
Sorry, again, but does anyone know how to limit to certain threads or boards?

ShawneyJ
08-02-2010, 01:06 PM
spot on the same code as i have been using, altho i place my ads at the top of the content. actually i posted this code somewhere on vb.org. not saying you stole it ;) just was going to make my own thread but you beat me to it.

Daman Kirklin
08-04-2010, 01:26 AM
Is there any way to set up the ad to show up only by 1 thread or a single announcement?

Drache
09-15-2010, 10:22 AM
https://vborg.vbsupport.ru/attachment.php?attachmentid=111569&d=1265162860
How can I get the ad to show under the text instead of showing at the right side of the post?

I added 2nd ad using <vb:literal>... </vb:literal>

but it's showing under the first ad on the right side that are limited 300 pixels. can't get it to show under the text on left side.

please help. thanks.

Naijasite
09-30-2012, 11:35 PM
pleasehow do i make the advert to be at the middle of the first post?

jokergameth
11-08-2016, 07:51 AM
Thank you. Works with vb 4.2.1 Patch Level 1