Support Forums

Need help inserting Openads.org button ads

This is a discussion on Need help inserting Openads.org button ads within the Templates, HTML, CSS, and Design Help forums, part of the General category; I set up a right hand column for Openads.org button ads. There is a bug with the software that won't ...


Go Back   68 Classifieds Forums > General > Templates, HTML, CSS, and Design Help

Reply
 
Thread Tools Display Modes
Old 09-12-2007, 12:30 PM   #1
Member
 
Join Date: Mar 2007
Posts: 51
Rep Power: 17
goose is on a distinguished road
Default Need help inserting Openads.org button ads

I set up a right hand column for Openads.org button ads. There is a bug with the software that won't let me use the javascript invocation code.

I was told I need to insert the Local Mode Tag into a PHP file which will deliver the output to the smarty template.

Anyone know how to put the code below into a php file to work with smarty?

Code:
<!--/* Openads Local Mode Tag v2.4.0 */-->
<?php
  // The MAX_PATH below should point to the base of your Openads installation
  define('MAX_PATH', '/home/public_html/advertising');
  if (@include_once(MAX_PATH . '/www/delivery/alocal.php')) {
    if (!isset($phpAds_context)) {
      $phpAds_context = array();
    }
    $phpAds_raw = view_local('', 2, 0, 0, '', '', '0', $phpAds_context);
    echo $phpAds_raw['html'];
  }
?>
goose is offline   Reply With Quote
Old 09-12-2007, 12:34 PM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,497
Rep Power: 132
Eric Barnes is just really nice Eric Barnes is just really nice
Default

I haven't tried this but I believe you can insert it directly into the template file with Smarty's php tag. For example:
Code:
{php}
// The MAX_PATH below should point to the base of your Openads installation
  define('MAX_PATH', '/home/public_html/advertising');
  if (@include_once(MAX_PATH . '/www/delivery/alocal.php')) {
    if (!isset($phpAds_context)) {
      $phpAds_context = array();
    }
    $phpAds_raw = view_local('', 2, 0, 0, '', '', '0', $phpAds_context);
    echo $phpAds_raw['html'];
  }
{/php}
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline   Reply With Quote
Old 09-12-2007, 12:44 PM   #3
Member
 
Join Date: Mar 2007
Posts: 51
Rep Power: 17
goose is on a distinguished road
Default

That did the trick.

Thanks for your help again.
goose is offline   Reply With Quote
Reply

Thread Tools
Display Modes



All times are GMT -4. The time now is 03:54 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0