Announcement

Collapse
No announcement yet.

Integrate open-x advertisements

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Marvin Hlavac
    replied
    Dan, for some reason this just simply doesn't display ads for me. It should, but it doesn't. I don't know why. But a workable solution was found in the following thread: http://www.vbulletin.org/forum/showt...53#post1664612

    Thanks, Dan.

    Leave a comment:


  • danglund
    replied
    First of all make sure you have some ads, websites and zones in OpenX. Then use OpenX Admin GUI to get the invocation code:

    1. Inventory -> Zones -> [select a zone] -> Invocation code
    2. Choose type of banner invocation: Local mode tag

    You should then have something like this:

    Code:
    <?php
      //<!--/* OpenX Local Mode Tag v2.6.0 */-->
    
      define('MAX_PATH', '/www/example.com/openx-2.6.0');
      if (@include_once(MAX_PATH . '/www/delivery/alocal.php')) {
        if (!isset($phpAds_context)) {
          $phpAds_context = array();
        }
        $phpAds_raw = view_local('', 5, 0, 0, '', '', '0', $phpAds_context, '');
      }
      echo $phpAds_raw['html'];
    ?>
    Then in vBulletin, find somewhere in your template to paste your invocation code. In VBulletin Admin GUI do:

    1. Styles & Templates -> Search in templates: ad_forumdisplay_afterthreads
    2. Paste your invocation code from above in here
    3. Refresh the forum and you should retrieve some ads

    Leave a comment:


  • Marvin Hlavac
    replied
    Dan, I installed openx, and now I'm trying to figure out how to make the ads appear somewhere under my header on each page. Openx generated the two pieces of code for me. The first piece of code I placed to my header template, as I believe that is what the instruction was telling me, but I have no idea where to place the second piece of code.

    Would you mind giving me a hint, or a link to a thread, etc.

    Thx.

    Leave a comment:


  • danglund
    replied
    I could not actually get the PHP-hook to work, but I went with the JavaScript-hook solution and never looked back. It works like a charm.

    Dan
    --

    Leave a comment:


  • chamberinternet
    replied
    Originally posted by danglund View Post
    I have been looking at open-x (openx.org) as an advertising solution for our forum. It seems great and it gives me a PHP-hook which will display ads from my inventory. --
    Dan,

    Did you manage to get this working ok?

    Thanks

    Shafiq :sK

    Leave a comment:


  • Steve Machol
    replied
    Please see these instructions for including PHP, TXT or HTML in a template:

    http://www.vbulletin.com/docs/html/t..._externalfiles
    http://www.vbulletin.com/forum/showt...18#post1066718

    Leave a comment:


  • danglund
    started a topic Integrate open-x advertisements

    Integrate open-x advertisements

    Hi

    I have been looking at open-x (openx.org) as an advertising solution for our forum. It seems great and it gives me a PHP-hook which will display ads from my inventory. I need to add the following hook to my vBulletin-template (never min the local paths from my test system):

    Code:
    <?php
      //<!--/* OpenX Local Mode Tag v2.6.0 */-->
    
      define('MAX_PATH', 'J:\wamp\www\openx-2.6.0\openx-2.6.0');
      if (@include_once(MAX_PATH . '/www/delivery/alocal.php')) {
        if (!isset($phpAds_context)) {
          $phpAds_context = array();
        }
        $phpAds_raw = view_local('', 1, 0, 0, '', '', '0', $phpAds_context, '');
      }
      echo $phpAds_raw['html'];
    ?>
    I tried modifying the footer in my template and add something simple like

    Code:
    <?php echo "test"; ?>
    but that didn't output test as expected. That means the banner-hook won't work either. How can I embed these PHP-hooks in my template?

    Dan
    --
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X