Advertisement under first post of all posts
4 posters
Page 1 of 1
Advertisement under first post of all posts
Hello,
I want to add an advertisement box under all first posts. I have one but that one appears only when you have 2 pages. I want it to be visible under all first posts even if you have only the topic.
I want to add an advertisement box under all first posts. I have one but that one appears only when you have 2 pages. I want it to be visible under all first posts even if you have only the topic.
Topic post1 |
Advertisement |
Post2 |
Post3... |
Re: Advertisement under first post of all posts
Hello MrMind,
Have you tried the following tutorial here at Forumotion English Support Forum?
https://help.forumotion.com/t97416-advertising-poster-on-punbb-phpbb2
It was written for PunBB forums so try it out and see if it works.
Hope this helps answer your question.
-James
Have you tried the following tutorial here at Forumotion English Support Forum?
https://help.forumotion.com/t97416-advertising-poster-on-punbb-phpbb2
It was written for PunBB forums so try it out and see if it works.
Hope this helps answer your question.
-James
Guest- Guest
Re: Advertisement under first post of all posts
I've seen the tutorial. I don't want a poster. I only need a box where i can write my advertisements.
I don't want it under every post. Only after the first post of each thread.
I don't want it under every post. Only after the first post of each thread.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Advertisement under first post of all posts
Add this in your Javascript Codes
Title: Advertisement
Placement : In the topics
Demo -> http://matiforum.forumotion.net/t36-posting-contest
Title: Advertisement
Placement : In the topics
- Code:
$(function(){$('.post:first').after('<div id="Advertisement" style="border-radius: 3px; background: #eee; border: 1px solid #ccc; font-size: 13px; margin-bottom: 10px; padding: 10px; margin-top: 10px; text-align:center;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum nibh urna, euismod ut ornare non, volutpat vel tortor. Integer laoreet placerat suscipit. Sed sodales scelerisque commodo. Nam porta cursus lectus. Proin nunc erat, gravida a facilisis quis, ornare id lectus. Proin consectetur nibh quis urna gravida mollis.</div>')});
Demo -> http://matiforum.forumotion.net/t36-posting-contest
Re: Advertisement under first post of all posts
Hello Mati,
That code seemed ok but as i looked to 2-3 posts, it looks ok if the post has several pages and/or if the post has only one reply in it. Check out this one that has just one reply in the topic.
http://informationforumgr.forumgreek.com/t4353-topic#9860
That code seemed ok but as i looked to 2-3 posts, it looks ok if the post has several pages and/or if the post has only one reply in it. Check out this one that has just one reply in the topic.
http://informationforumgr.forumgreek.com/t4353-topic#9860
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Advertisement under first post of all posts
Bumping time!
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Advertisement under first post of all posts
I think there is either an error in your template or code because the first post is wrapping the next posts making them its children. That makes using :first or :eq(0) useless you write $('.post .post:first').before('content')
Re: Advertisement under first post of all posts
.
Last edited by azwiz on November 18th 2014, 12:44 am; edited 2 times in total (Reason for editing : unintentional link post and posted in wrong forum , it is gone , in my block)
Re: Advertisement under first post of all posts
Welcome to Forumotion, azwiz.azwiz wrote:It's taken me 4 days to get to this point , given the option to post . I have been trying to contact buttercup . I need every kind of help possible . I just acquired an awesome forum from its founder . I am very excited but don't know the first thing about forums . Especially the lingo interpretation for the forumotion formats . I need to learn everything about managing my forum . Also need to know the proper protocol for becoming the founder . Please and thank you .
http://littlemunks.forumotion.co.uk/
This is my new forum.
By the way forum of the forums would not accept my forum username and password . They are two different identities now .I don't know if that is good or not . I don't like it .
As you're new, here are some topics that you might find helpful :
• Forum rules
• Frequently Asked Questions
• Tips and tricks
You can also check my signature for additional links.
As this is MrMind's support topic, I advise you to create your own topic under one of the categories in the Support Section.
Thank you and have a nice day.
Re: Advertisement under first post of all posts
Ange because i will have a series of events on my forum, i would like the advertise box to be visible below all posts. So if i have to make some serious changes such as removing the wrapping bar i will do it.Ange Tuteur wrote:I think there is either an error in your template or code because the first post is wrapping the next posts making them its children. That makes using :first or :eq(0) useless you write $('.post .post:first').before('content')
I need to have everything ready to do that.
If you can please tell me what i have to do to achieve the wanted result!
Thank you!
Re: Advertisement under first post of all posts
If you want it after every post use this :
Just replace content with what you want.
- Code:
$(function() {
$('.post').after('content');
});
Just replace content with what you want.
Re: Advertisement under first post of all posts
Sorry for my wrong phrase. I meant that i want the ad box to be below the first post of all topics. If for example the topic has the author post only to be displayed below it and if it has 1 reply to also have it in between. If the topic has 2 replies then the ad box to be below the author post etc.
Thanks for your time.
Thanks for your time.
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Advertisement under first post of all posts
See if this works for your forum :
- Code:
$(function() {
$('.post > .postmain:eq(0)').after('content');
});
Re: Advertisement under first post of all posts
Yes it works!
How can i style it though?
How can i style it though?
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Re: Advertisement under first post of all posts
Wrap your content with a HTML tag that either has the classname or ID attribute. For example :
Then css for style :
- Code:
$(function() {
$('.post > .postmain:eq(0)').after('<div class="addBox">content</div>');
});
Then css for style :
- Code:
.addBox {
background:#EEE;
border:1px solid #CCC;
}
Re: Advertisement under first post of all posts
Υeap! That's what i wanted! Thank you very much! Have a nice day!
Topic Solved!
Topic Solved!
Forum of the Forums Forumotion Rules | Tips & Tricks | FAQ | Did you forget your password? |
*** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
No support via PM!
Similar topics
» New Post / Latest Posts
» Splitting one post into more posts within the same topic
» I can't write posts or post topics
» Removing post count rank Text in posts
» New post appearing above old posts in thread
» Splitting one post into more posts within the same topic
» I can't write posts or post topics
» Removing post count rank Text in posts
» New post appearing above old posts in thread
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum