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.
The forum of the forums
2 posters

    Advertising poster on phpbb3

    pkw
    pkw
    New Member


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

    Solved Advertising poster on phpbb3

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

    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?
    avatar
    Guest
    Guest


    Solved Re: Advertising poster on phpbb3

    Post by Guest 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.
    avatar
    Guest
    Guest


    Solved Re: Advertising poster on phpbb3

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

    dion, not work your code. Smile
    avatar
    Guest
    Guest


    Solved Re: Advertising poster on phpbb3

    Post by Guest 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>');
    });
    pkw
    pkw
    New Member


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

    Solved Re: Advertising poster on phpbb3

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

    Thanks mate, it works Smile
    Sanket
    Sanket
    ForumGuru


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

    Solved Re: Advertising poster on phpbb3

    Post by Sanket October 3rd 2011, 9:04 am

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

    Sanket Smile


      Current date/time is September 23rd 2024, 8:30 pm