Rotating ads integration issue

This is a discussion on Rotating ads integration issue within the 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 > HTML, CSS, and Design Help

 
LinkBack Thread Tools Display Modes
  #1  
Old 06-14-2006, 02:00 PM
Junior Member
 
Join Date: Jun 2006
Posts: 8
Rep Power: 0
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.

Reply With Quote
  #2  
Old 06-14-2006, 02:08 PM
Moderator
 
Join Date: Mar 2006
Posts: 3,630
Rep Power: 89
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.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Reply With Quote
  #3  
Old 06-14-2006, 02:23 PM
Junior Member
 
Join Date: Jun 2006
Posts: 8
Rep Power: 0
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.
Reply With Quote
  #4  
Old 06-14-2006, 10:29 PM
Moderator
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,132
Rep Power: 57
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}


__________________
Regards,

John


�By perseverance, study, and eternal desire, any man can become great.� George S. Patton

Last edited by juven14; 06-14-2006 at 10:32 PM.
Reply With Quote
  #5  
Old 06-15-2006, 04:36 AM
Junior Member
 
Join Date: Jun 2006
Posts: 8
Rep Power: 0
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.
Reply With Quote
  #6  
Old 06-16-2006, 08:10 AM
Member
 
Join Date: Mar 2006
Location: Sweden
Posts: 62
Rep Power: 13
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
Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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
Email issue.. free2take v3.0 Questions & Support 40 06-28-2006 10:25 AM
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 12:05 AM.


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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22