| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
embedding php/xml banner slideshow... | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() while i'm sure there are some better ways to do this, for the sake of what i thought would have been simplicity i just want to use an existing php/xml setup to display rotating banners and images.
well, when i go to drop it all in there i get a smarty error, and i have no idea how the heck to fix this. i will post all code in case anyone wants to use something like this. so, to start... this is the main php. it was in the head of the old pages, but it could go in it's own php file correct? Code:
then, in the page itself, you have the elements to display our rotating banner ads/slideshow... Code:
lastly, add all the images into an XML file names banners.xml or features.xml which contains this... <banners> <banner src="images/banner_2.jpg"> <banner src="images/banner_24.gif"> <banner src="images/banner_25.gif" href="IF YOU WANT TO LINK" /> <banner src="images/banner_26.gif"> <banner src="images/banner_27.gif"> </banners> <features> <feature src="images/image.jpg" href="link" title="title"/> <feature src="images/image.jpg" href="link" title="title"/> </features> questions.... when i embed the code into the page, do you embed it with the <? and ?> ? why am i getting this error? Error: Smarty error: [in today_news.tpl line 22]: syntax error: unrecognized tag: $v['SRC'] (Smarty_Compiler.class.php, line 436) in /htdocs/www/store/Smarty-2.6.12/Smarty.class.php on line 1095 and why are these characters displaying? $i) \"> i know it has to do with the print function, and that you have to tell the code to display corrrectly so you tell it to not read or print what's after the \ but i'm just not figuring out what i need to do to get this working. anyone have any ideas? thanks,
__________________
X-Cart version 4.1.7 - PHP 5.2. - MySQL server 5.0.41-community-nt - MySQL client 5.0.22 - Web server Apache/2.2.4 (Win32) - PHP/5.2.2 |
|||||||
#2
|
|||||||
|
|||||||
![]() well, i just found a random image mod, and will have to test it, but it would be great to see a solution to this. it seems like a relatively easy fix, as it looks like it's just not recognizing SRC, or maybe something else.
This random image generation with the XML is a really simple thing, since all you have to do is add an image src to the XML file and you're done. i think it would be great for some of the other folks in here that aren't as comfortable or lack the knowledge to implement a lot of these mods. this could be used without having to patch/upgrade, or modify bunch of different files. call it a begginer mod. ![]() thanks
__________________
X-Cart version 4.1.7 - PHP 5.2. - MySQL server 5.0.41-community-nt - MySQL client 5.0.22 - Web server Apache/2.2.4 (Win32) - PHP/5.2.2 |
|||||||
|
|||
X-Cart forums © 2001-2020
|