Support Forums

Rotating ads integration issue

This is a discussion on Rotating ads integration issue within the Templates, HTML, CSS, and Design Help forums, part of the General category; I'm running V3.1.3 Developer and trying to insert a code generated by phpnewads into my listing.tpl.php site. I looked at ...


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

Reply
 
Thread Tools Display Modes
Old 06-14-2006, 02:00 PM   #1
Junior Member
 
Join Date: Jun 2006
Posts: 8
Rep Power: 0
mfarah01 is on a distinguished road
Default Rotating ads integration issue

I'm running V3.1.3 Developer and trying to insert a code generated by phpnewads into my listing.tpl.php site. I looked at another post and the answer this was to put this directly under {include file=$body}.

I have tried doing this and when I re-upload the listing file, I get the following error;

Quote:
Fatal error: Smarty error: [in layout.tpl.php line 59]: syntax error: unidentified token '=' (Smarty_Compiler.class.php, line 1396) in /home/telerot1/public_html/adultads/includes/classes/smarty/Smarty.class.php on line 1095
The code i'm trying to insert looks like this;

PHP Code:
    if (@include(getenv('DOCUMENT_ROOT').'/phpads/phpadsnew.inc.php')) {
        if (!isset(
$phpAds_context)) $phpAds_context = array();
        
$phpAds_raw view_raw ('zone:1'0'''''0'$phpAds_context);
        echo 
$phpAds_raw['html'];
    } 
I would appreciate any help.
mfarah01 is offline   Reply With Quote
Old 06-14-2006, 02:08 PM   #2
Coder
 
Join Date: Mar 2006
Posts: 4,695
Rep Power: 114
Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light Lhotch is a glorious beacon of light
Default

php code if in a template needs to be escaped by smarties {php}{/php} tags. Been some time since I set my phpadsnew up but I beleive I used the javascript code for easier integration.
__________________
Larry
Lhotch is offline   Reply With Quote
Old 06-14-2006, 02:23 PM   #3
Junior Member
 
Join Date: Jun 2006
Posts: 8
Rep Power: 0
mfarah01 is on a distinguished road
Default

Quote:
Originally Posted by Lhotch
php code if in a template needs to be escaped by smarties {php}{/php} tags. Been some time since I set my phpadsnew up but I beleive I used the javascript code for easier integration.
Hi, I did actually enclose with the smarties. I just did not include in my example.
mfarah01 is offline   Reply With Quote
Old 06-14-2006, 10:29 PM   #4
Moderator
 
juven14's Avatar
 
Join Date: Mar 2006
Location: Texas
Posts: 1,961
Rep Power: 57
juven14 is a jewel in the rough
Default

Try it from the core file your are trying to display it on (viewlisting.php, index.php, etc):

PHP Code:
if(@include(getenv('DOCUMENT_ROOT').'/phpads/phpadsnew.inc.php')) 
{
    if (!isset(
$phpAds_context)) $phpAds_context = array();
    {
        
$phpAds_raw view_raw ('zone:1'0'''''0'$phpAds_context);
        
//echo $phpAds_raw['html'];
        
$phpadsnew $phpAds_raw['html'];
        
$class_tpl->assign('phpadsnew'$phpadsnew);
    }



Then at the template add this where you want it to display (viewlisting.tpl.php or etc):
Code:
{$phpadsnew}


__________________
John Snyder
PHP Developer

Last edited by juven14; 06-14-2006 at 10:32 PM.
juven14 is offline   Reply With Quote
Old 06-15-2006, 04:36 AM   #5
Junior Member
 
Join Date: Jun 2006
Posts: 8
Rep Power: 0
mfarah01 is on a distinguished road
Default

Quote:
Originally Posted by juven14
Try it from the core file your are trying to display it on (viewlisting.php, index.php, etc):

PHP Code:
if(@include(getenv('DOCUMENT_ROOT').'/phpads/phpadsnew.inc.php')) 
{
    if (!isset(
$phpAds_context)) $phpAds_context = array();
    {
        
$phpAds_raw view_raw ('zone:1'0'''''0'$phpAds_context);
        
//echo $phpAds_raw['html'];
        
$phpadsnew $phpAds_raw['html'];
        
$class_tpl->assign('phpadsnew'$phpadsnew);
    }



Then at the template add this where you want it to display (viewlisting.tpl.php or etc):
Code:
{$phpadsnew}


Tried this too and no joy, have no used javascript which works fine. Thanks for your help guys.
mfarah01 is offline   Reply With Quote
Old 06-16-2006, 08:10 AM   #6
Member
 
Join Date: Mar 2006
Location: Sweden
Posts: 6
Rep Power: 0
quickbiz will become famous soon enough
Default phpadsnews

Hi

Look at my page and the kode at www.helsingborgsmarknad.se its full of kodes from diferent adsservers and it works fine with iFrame-kodes.

Regards

Bosse
quickbiz is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paypal Payment Issue bgordon v3.1 Questions & Support 1 09-19-2006 10:10 AM
coupon issue calvinbrownjr v3.1 Questions & Support 4 07-04-2006 01:24 PM
maybe a new issue in 'contact us' form frommarcq v3.1 Questions & Support 2 06-27-2006 11:15 AM
Drop Down Search Issue CB v3.1 Questions & Support 2 06-23-2006 01:04 AM


All times are GMT -4. The time now is 01:24 PM.


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