jumping-blueberry Posted July 21, 2010 Posted July 21, 2010 Hello communtity, I'm running the latest version of osCommerce with the latest Version of STS. Generally I am very happy with the whole system. Especially STS makes it very easy to create a good shop with a modern layout. Now my problem: I want a grafical header for the boxes by refering to a script that lies within the template's folder. (Different problem with this ... see below) So I wanted to use the placeholder $templatedir$ within the img-tag: <img src="$templatedir$/button.php?bildstring=$headertext&hgfarbe=000000&schriftfarbe=ffffff" /> However $templatdir$ isn't replaced into the directory's path. May I have forgotten something when installing STS or is it just not possible? If it wouldn't be possible I'd have to change the classes in the includes/classes/boxes.php I added this after the other replacements and now it works: $template = str_replace('$templatedir$', STS_TEMPLATE_DIR, $template); But I don't want to make any useless changes. It seems like a "quick&dirty"-solution to me. I just want to know, if it should usually work... I have another very strange problem: For my grafical header I need a script, which I have used many times before. To keep everything as clean as possible, I wanted to put it into my template's folder. But for some reason I cannot call php-scripts that are inside this directory. Outside they work of course. I can't see why... There is no .htaccess or anything that could cause this. Has anyone else had this problem before? Thanks in advance for your help :) Quote
jumping-blueberry Posted July 21, 2010 Author Posted July 21, 2010 I solved the second problem: In the sts_templates-folder you need a .htaccess-file with the following content: <Files *.php> Order Deny,Allow Allow from all </Files> Quote
bkellum Posted July 21, 2010 Posted July 21, 2010 The $templatedir$ issue was resolved in STSv4.6. It does however, require that you use the stop end character for all of your variables in each of your templates. See you in the STSv4 Forum (link in my signature below). Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
jumping-blueberry Posted July 21, 2010 Author Posted July 21, 2010 (edited) I used $templatedir$ with a dollar at the start an the beginning. But before my "hack" it didn't work. I use STS4.6 So you say it should work in the infoboxes-template? Could you tell me which code in which file resolved the issue, so I check if I may have forgotten copying something. The forum link only leads to one thread in this forum. Should I post problems with STS there? Isn't it a bit unclear to post every issue in one thread? Edited July 21, 2010 by jumping-blueberry Quote
bkellum Posted July 24, 2010 Posted July 24, 2010 Should I post problems with STS there? Isn't it a bit unclear to post every issue in one thread? Nope. All STS related questions SHOULD be in one thread so that all STS users can benefit. You can then search the thread to find what you need. Here are some Google search tips: Search the specific STS version 4 support thread: site:www.oscommerce.com/forums [Contribution] sts v4 site:www.oscommerce.com/forums [Contribution] sts v4 $templatedir Search the entire osCommerce forum: site:www.oscommerce.com/forums sts site:www.oscommerce.com/forums "insert your search text here without the quotes" Search the contributions: site:http://www.oscommerce.com/community/contributions simple template system site:http://www.oscommerce.com/community/contributions "insert the search contribution name here without the quotes" Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.