| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Need help putting code into .tpl file - php rss2 | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() Okay,
I've seen RSS discussions before (there are mods for sale out there) but I thought I might try to do some tweeking myself based off some code another person wrote. I think I've got a pretty hot idea that could work but I'm missing one or two small details that I hope you guys can help me with. Please take a look at: http://madhatterrgames.com/rss2html.php?XMLFILE=http://madhatterrgames.com/phpBB3/generate_feed.php%3fcont...tml&MAXITEMS=1 That's what the feed will look like at the top of my center/right area on this page (and, because of where I'm putting it in the home.tpl file, all my pages) http://www.madhatterrgames.com/home.php ... on the home.php page it would appear just above the category images. The code I'd like to put into the home.tpl would look something like this (I think): Code:
or Code:
Initially I tried putting the first in without the <?php tag and the ?> end tag. No dice. Second I tried the same with the second and then with putting { } around hte include command making sure to try it with a space before and after the include command. All three attempts failed and produced errors. I'm pretty sure I should be able to make this appear in the home.tpl ... I'm just failing in the execution of it. LOL Could someone please give me a hand with this one. I promise eternal gratitude and cookies if we ever meet face to face. *wink* -Dee ![]()
__________________
DeAnna Ross http://madhatterrgames.com [v.4.1.8] Fashion Template http://www.hortonstores.com [v.4.1.12] Fashion Mosaic Skin http://teststore.hortonstores.com [v.4.2.2] Fashion Mosaic Skin TEST STORE - NOT FOR ACTUAL SHOPPING! |
|||||||||
#2
|
|||||||||
|
|||||||||
![]() *polite bump*
__________________
DeAnna Ross http://madhatterrgames.com [v.4.1.8] Fashion Template http://www.hortonstores.com [v.4.1.12] Fashion Mosaic Skin http://teststore.hortonstores.com [v.4.2.2] Fashion Mosaic Skin TEST STORE - NOT FOR ACTUAL SHOPPING! |
|||||||||
#3
|
|||||||||
|
|||||||||
![]() Smarty was designed to divide HTML markup and PHP script. So it is not convinient to put PHP scripts into template.
But it is possible Wrap the PHP code with tags HTML Code:
__________________
Regards, Victor Dubiniuk X-Cart Skins Store ![]() - twenty two different skins for 4.1.x and 4.2.x; - 4.3.x compatible versions are available; - refresh you store now! Smart menu X-Cart add-on for 4.1.8 - 4.3.x Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x |
|||||||||
#4
|
|||||||||
|
|||||||||
![]() So it should look like this?
Code:
__________________
DeAnna Ross http://madhatterrgames.com [v.4.1.8] Fashion Template http://www.hortonstores.com [v.4.1.12] Fashion Mosaic Skin http://teststore.hortonstores.com [v.4.2.2] Fashion Mosaic Skin TEST STORE - NOT FOR ACTUAL SHOPPING! |
|||||||||
#5
|
|||||||||
|
|||||||||
![]() Okay I'm fiddling still (thanks btw for replying!) here's what I've gotten so far in trial and error.
When I put it in like this Code:
I get this: Parse error: syntax error, unexpected '<' in /.../public_html/var/templates_c/%%5A^5A2^5A22702C%%home.tpl.php on line 206 When I put it in like this: Code:
I get this: Parse error: syntax error, unexpected '<' in /.../public_html/var/templates_c/%%5A^5A2^5A22702C%%home.tpl.php on line 206 When I put it in like this: Code:
I get this: Parse error: syntax error, unexpected '<' in /.../public_html/var/templates_c/%%5A^5A2^5A22702C%%home.tpl.php on line 206 When I put it in like this: Code:
I get this: Warning: include() [function.include]: URL file-access is disabled in the server configuration in /.../public_html/var/templates_c/%%5A^5A2^5A22702C%%home.tpl.php on line 206
__________________
DeAnna Ross http://madhatterrgames.com [v.4.1.8] Fashion Template http://www.hortonstores.com [v.4.1.12] Fashion Mosaic Skin http://teststore.hortonstores.com [v.4.2.2] Fashion Mosaic Skin TEST STORE - NOT FOR ACTUAL SHOPPING! |
|||||||||
#6
|
|||||||||
|
|||||||||
![]() HTML Code:
should not work due to security reasons You have to specify not the URL of the file, but path to it from the directory where your store is located Cleanup templates cache with HTML Code:
HTML Code:
if rss2html.php is located in the folder with your store.
__________________
Regards, Victor Dubiniuk X-Cart Skins Store ![]() - twenty two different skins for 4.1.x and 4.2.x; - 4.3.x compatible versions are available; - refresh you store now! Smart menu X-Cart add-on for 4.1.8 - 4.3.x Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x |
|||||||||
#7
|
|||||||||
|
|||||||||
![]() Thank You SOOO MUCH for taking your time to help me out with this.
![]() I did as you instructed and got the following error: Quote:
Any other help you can give is greatly appriciated. -Dee
__________________
DeAnna Ross http://madhatterrgames.com [v.4.1.8] Fashion Template http://www.hortonstores.com [v.4.1.12] Fashion Mosaic Skin http://teststore.hortonstores.com [v.4.2.2] Fashion Mosaic Skin TEST STORE - NOT FOR ACTUAL SHOPPING! |
|||||||||
#8
|
|||||||||
|
|||||||||
![]() it's like poking all around without access to your server
![]() One more try: Place rss2html.php in the root of your webserver and the add just one more slash: HTML Code:
__________________
Regards, Victor Dubiniuk X-Cart Skins Store ![]() - twenty two different skins for 4.1.x and 4.2.x; - 4.3.x compatible versions are available; - refresh you store now! Smart menu X-Cart add-on for 4.1.8 - 4.3.x Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x |
|||||||||
#9
|
|||||||||
|
|||||||||
![]() LOL, the things we go through for better seo and content.
![]() Alright, tried the above and got this error: Quote:
As for your mention of access to our website, any chance you'd be willing to nose around? If so I'd be willing to drop you the information, it might be quicker than this guess work based off my replies (since you seem willing to assist us until we get it right ... did I mention how VERY much I appriciate this?) Anyway, even if you're not willing... thanks and hopefully we'll get this figured out soon. I'm sure it will be a ton better for our site than the iframe solution I'm using right now. -Dee
__________________
DeAnna Ross http://madhatterrgames.com [v.4.1.8] Fashion Template http://www.hortonstores.com [v.4.1.12] Fashion Mosaic Skin http://teststore.hortonstores.com [v.4.2.2] Fashion Mosaic Skin TEST STORE - NOT FOR ACTUAL SHOPPING! |
|||||||||
#10
|
|||||||||
|
|||||||||
![]() For those looking to put an rss feed reader on their page, here's a GREAT & FREE solution: http://www.xcartmods.co.uk/x-cart-rss-feeds-displayer-v4x-x-cart-mods-pr-17.html
Victor, thanks ever so much for your help but it seems someone beat me to the answer on how to do it! ![]() YAY!!! ![]() -Dee
__________________
DeAnna Ross http://madhatterrgames.com [v.4.1.8] Fashion Template http://www.hortonstores.com [v.4.1.12] Fashion Mosaic Skin http://teststore.hortonstores.com [v.4.2.2] Fashion Mosaic Skin TEST STORE - NOT FOR ACTUAL SHOPPING! |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|