The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Advertising poster on phpbb3

2 posters

Go down

Solved Advertising poster on phpbb3

Post by pkw Sun 2 Oct 2011 - 12:17

I've seen this https://help.forumotion.com/t97416-advertising-poster-on-punbb
by MrMario. And i'm curious that can this work in phpbb 3 or a slight editing needed for it to be used?
pkw
pkw
New Member

Male Posts : 13
Reputation : 0
Language : English
Location : Malaysia

Back to top Go down

Solved Re: Advertising poster on phpbb3

Post by Guest Sun 2 Oct 2011 - 12:57

Creating something similar in phpBB3 would require javascipt, and it would be much simpler than the template-based method in the tutorial. And less buggy.

In its basic form, the script would look something like:

Code:
$(function() {
    $('.post').last().after('<div class="post"><div class="postbody">Ad Text Info</div><div class="postprofile">Ad Poster Info</div></div>');
});
You could make the "fake" post as "official" as you wanted by adding all the fields of a normal post.
avatar
Guest
Guest


Back to top Go down

Solved Re: Advertising poster on phpbb3

Post by Guest Sun 2 Oct 2011 - 14:39

dion, not work your code. Smile
avatar
Guest
Guest


Back to top Go down

Solved Re: Advertising poster on phpbb3

Post by Guest Mon 3 Oct 2011 - 2:18

I did say "something like". Razz

Actually the $.last() traversing function requires jQuery 1.4, so it wouldn't work on forumotion boards. So instead, we can use the :last selector. The following will work on forumotion phpBB3 boards, and just for "Gassy", I added a background and the rounded corners to make it look like a real post:

Code:
$(function() {
    $('.post:last').after('<div class="post" style="background:#ddd"><span class="corners-top"><span></span></span><div class="postbody">Ad Text Info</div><div class="postprofile">Ad Poster Info</div><span class="corners-bottom"><span></span></span></div>');
});
avatar
Guest
Guest


Back to top Go down

Solved Re: Advertising poster on phpbb3

Post by pkw Mon 3 Oct 2011 - 11:23

Thanks mate, it works Smile
pkw
pkw
New Member

Male Posts : 13
Reputation : 0
Language : English
Location : Malaysia

Back to top Go down

Solved Re: Advertising poster on phpbb3

Post by Sanket Mon 3 Oct 2011 - 14:04

Since this thread appears to be solved, I will lock this thread and mark it as solved.
Advertising poster on phpbb3 2j4t5a8

Sanket Smile

Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum