Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[sts] $templatedir$ in infoboxes + calling a php-script in template-folder


Recommended Posts

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

 

:)

Link to comment
Share on other sites

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).

 

 

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

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 by jumping-blueberry
Link to comment
Share on other sites

 

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"

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...