Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to insert ads other than google ads

  • Hello,

    so i’m VERY new to bbpress so i need all the help i can get. I’m trying to find a way to insert ads (NOT google ads) in my forum but every ad plugin i see on here seems to be designed for google ads. Can someone please tell me which plugin to use to get my ads to work in the forums? I already have ad codes from OPENX, all i need is the right plugin to use.

    thanks a bunch!

Viewing 9 replies - 1 through 9 (of 9 total)
  • You could put the HTML for your ads directly in your themes? That’s what I do at least…


    chrishajer
    Participant

    @chrishajer

    If the plugin is for google ads, just change that portion to your ad code. All the plugins do is embed code wherever you want (depending on the plugin.) If you want to use some other ad code, just change or configure the plugin to do that.

    If you are using OpenX, just insert the code into your templates wherever you want to see the ads, as johnhiler suggests.

    i downloaded the plugins ADSENSE FOR BBPRESS and GOOGLE ADSENSE CONFIGURATION. The former gives an option to insert codes but when i put in my OpenX code nothing shows up. The latter, however, displays my OpenX ads, only problem is it shows up in the footer when i want it in the header and between posts. i tried inserting the html codes directly in my themes but it shows as html codes and not as an ad. am i doing something wrong? please let me know.

    Also, can any of you please help me configure it to not only show up in the footer? here’s the coding for that plugin:

    <?php

    /*

    Plugin Name: Simple Google Adsense

    Plugin URI: http://www.strapontins.org/people/rentendre/simple-google-adsense-bbpress/

    Description: Add Google Adsense code in your bbPress forum, in the footer :) All users are welcome to improve on it :p

    Author: Frédéric Petit

    Author URI: http://www.strapontins.org/

    Version: 0.2

    License: CC-GNU-GPL http://creativecommons.org/licenses/GPL/2.0/

    */

    add_action(‘bb_admin_menu_generator’, ‘bb_gad_configuration_page_add’);

    add_action(‘bb_admin-header.php’, ‘bb_gad_configuration_page_process’);

    function bb_gad_configuration_page_add() {

    bb_admin_add_submenu(__(‘Google Adsense Configuration’), ‘use_keys’, ‘bb_gad_configurtion_page’);

    }

    function bb_gad_configurtion_page(){?>

    <h2><?php _e(‘Google Adsense Configuration’); ?></h2>

    <form class=”options” method=”post” action=””>

    <fieldset>

    <label for=”ga_key”>

    <?php _e(‘Google Adsense User Id:’) ?>

    </label>

    <div>

    <textarea class=”text” name=”ga_key” id=”ga_key” value=”<?php bb_form_option(‘ga_key’); ?>” ></textarea>

    <?php _e(‘Put your adsense code, without the code of the script pagead2.googlesyndication.com/pagead/show_ads.js’); ?>

    </div>

    </fieldset>

    <fieldset>

    <?php bb_nonce_field( ‘ga-configuration’ ); ?>

    <input type=”hidden” name=”action” id=”action” value=”update-ga-configuration” />

    <div class=”spacer”>

    <input type=”submit” name=”submit” id=”submit” value=”<?php _e(‘Update Configuration »’) ?>” />

    </div>

    </fieldset>

    </form>

    <?php

    }

    function bb_gad_configuration_page_process() {

    if ($_POST == ‘update-ga-configuration’) {

    bb_check_admin_referer(‘ga-configuration’);

    if ($_POST) {

    $value = stripslashes_deep( trim( $_POST ) );

    if ($value) {

    bb_update_option(‘ga_key’, $value);

    } else {

    bb_delete_option(‘ga_key’ );

    }

    } else {

    bb_delete_option(‘ga_key’);

    }

    $goback = add_query_arg(‘ga-updated’, ‘true’, wp_get_referer());

    bb_safe_redirect($goback);

    }

    if ($_GET) {

    bb_admin_notice( __(‘Configuration saved.’) );

    }

    }

    // Bail here if no key is set

    if (!bb_get_option( ‘ga_key’ ))

    return;

    function createGAdCode($accountId) {

    $code .= ‘<div class=’bbpress_adsense’>’ . “n”;

    $code .= ‘ ‘ . $accountId . ‘ ‘ . “n”;

    $code .= ‘<script type=’text/javascript’ src=’http://pagead2.googlesyndication.com/pagead/show_ads.js’></script>&#8217; . “n”;

    $code .= ‘</div>’ . “n”;

    return $code;

    }

    function insertGAdCode() {

    $accountId = bb_get_option(‘ga_key’);

    if ($accountId != ”) {

    echo createGAdCode($accountId);

    }

    }

    add_action(‘bb_foot’, ‘insertGAdCode’);

    ?>

    Birdy, can you link to the plugin page instead? If you want to show code, you have to put it between backticks (and when I figure out how to post them without zooming into code formatting…)

    oh and in your response you’d mentioned something about wanting to show codes…no, i don’t want to show the codes. All i want is for the ads to show on the pages i want them to.

    thanks!!

    I meant show code in the forums.

    This is code, it's preformatted
    so that I can space things out funny.

    AdSense For bbPress seems to be broken with bb 1.0.1, but seeing as the plugin tells you to edit your theme, you’re probably going to be best off just putting in your codes into your theme template files.

    How to Win With Google AdWords???

    Google AdWords enables you to implement precisely

    targeted advertising. If you want be surprised just

    visit the site below.

    ___________________________________________________

    http://greatgoogleads.blogspot.com/


    georggeorg
    Participant

    @georggeorg

    Thanks for sharing http://greatgoogleads.blogspot.com// , I found the examples very useful!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to insert ads other than google ads’ is closed to new replies.
Skip to toolbar