The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Advertising poster on phpbb3

View previous topic View next topic Go down

Solved Advertising poster on phpbb3

Post by pkw on October 2nd 2011, 7:17 am

I've seen this http://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
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 on October 2nd 2011, 7:57 am

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.

Guest
Guest


Back to top Go down

Solved Re: Advertising poster on phpbb3

Post by Guest on October 2nd 2011, 9:39 am

dion, not work your code. Smile

Guest
Guest


Back to top Go down

Solved Re: Advertising poster on phpbb3

Post by Guest on October 2nd 2011, 9:18 pm

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>');
});

Guest
Guest


Back to top Go down

Solved Re: Advertising poster on phpbb3

Post by pkw on October 3rd 2011, 6:23 am

Thanks mate, it works Smile

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 on October 3rd 2011, 9:04 am

Since this thread appears to be solved, I will lock this thread and mark it as solved.


Sanket Smile


Sanket
ForumGuru

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

http://webartzforum.com

Back to top Go down

View previous topic View next topic Back to top


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