bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

Plugin: BB-Ads

(9 posts)
  • Started 1 year ago by wittmania
  • Latest reply from dheerajsingh2109
  • This topic is not resolved
  1. This is my first attempt at a plugin, so be gentle! :)

    This plugin allows you to display custom ads/messages anywhere on your site, including the front page, profile pages, forum pages, and even between posts.

    The plugin randomly selects a file from a pre-determined directory, or you can specify a specific file to display. File types include .php, .html, .htm, or you can add custom file types as needed.

    The files themselves can include links, images, PHP functions, and CSS stylization. You can customize the ads/messages however you want.

    You can get the 0.1 version here:
    http://blog.wittmania.com/bb-ads

    PLEASE feel free to let me know if you find any bugs. I'm also extremely open to suggestions for future revisions, as my PHP skills are only slightly better than my bow hunting skills, which are pretty pathetic.

    Enjoy!

    Posted 1 year ago #
  2. That's pretty cool. Are there screenshots, is there anywhere running it so we can see what it's like?
    You've submitted it to the plugin db too, haven't you? :)

    Posted 1 year ago #
  3. Screenshots here:

    An ad between posts on a topic page:
    http://www.wittmania.com/images/bb-ads-1.gif

    An ad on the front page, text-only (w/ CSS):
    http://www.wittmania.com/images/bb-ads-2.gif

    An ad on a Forum page, with an image in it:
    http://www.wittmania.com/images/bb-ads-3.gif

    I don't have it up and running on my own forum yet b/c I am still building the ads for it. I haven't submitted it yet, but I'll look into how to do that right away.

    Posted 1 year ago #
  4. UPDATE: The sample ad file now includes the code necessary to display different ads based on the context. For example, if it is a topics page, it will display one ad and if it is a forum page, it will display a different one.

    The code is something like this:

    <?php
    if ( strpos($_SERVER['REQUEST_URI'], 'topic.php') ) { ?>
    <div>An ad for a topics/posts page</div>
    <?php
    } elseif { another specific page;
    } else { default ad;
    }  ?>

    The sample file includes elseif checks for topic.php, forum.php, profile.php, and a "default" if none of the above pages are detected.

    This would allow you to have one file per sponsor/advertiser, with a different context-based ad for each situation.

    Posted 1 year ago #
  5. I have launched an "Area 51" forum to test and display the effects of my plugins. You can see bb-Ads in action here:

    http://blog.wittmania.com/bbpress/

    Also, I have now tested this plugin with pretty links, and it does work. The only changes to be made in the coding as given in ad1.php is that you have to delete the .php from the strpos check. This will just look for the words in the link instead of the actual .php file names.

    Posted 1 year ago #
  6. bubblebla
    Member

    hi..

    wittmania, i installed your plugin. it works well with php or html formated ads but it crushed my .gif ads.. basically i followed all your instructions.. hmm... i added this line in bb-ads.php -->

    $extList['gif'] = 'image/gif';
    $extList['jpg'] = 'image/jpeg';
    $extList['png'] = 'image/png';

    so, how do i fix it?

    Posted 4 months ago #
  7. bubblebla
    Member

    the ads shows up something like this --->

    GIF87a�����������f��f��0�����p������pp������� �����������fff��f��3������� @���@f����0��P������f3�����p���@�0�� ����p�����P�p��P�� �̙�p@�������ffp�33f��pp���f3p������f��00����33�@@

    Posted 4 months ago #
  8. Great job, what else need to be version 1.0 ?

    Thanks

    Posted 4 months ago #
  9. Thanks I am using this for my website http://forums.mbapursuit.com however the ad is displayed only once after the third post .

    I wantes something like this

    post1
    post2
    post3
    AD
    post4
    post5
    post6
    AD

    and so on... how to achieve this

    Posted 1 month ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.