Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How i can make "images" folder for boxes "dynamic"


dcginex

Recommended Posts

Hi, i'm trying to make images folder for infoboxes dynamic. with this when i add a new template i drop a new folder into "sts_templates" and all is done, but to do this i need to know the template path.

 

Easy (i think ...), this is saved in a var called $sts->template['templatepath']

 

i've tried this code:

 

replace this

 

$template = str_replace('$headertext', $headertext, $template);

$template = str_replace('$right_arrow', $right_arrow, $template);

echo $template;

 

with this

 

$template = str_replace('$headertext', $headertext, $template);

$template = str_replace('$right_arrow', $right_arrow, $template);

$template = str_replace('$ul',$sts->template['templatepath'] . 'boxes/images/', $template);

echo $template;

 

in boxes.php

 

and replace this

 

<tr>

<td width="20" class="infoBoxHeading>

<img src="images/infobox/gomma.gif" width="30" height="30">

</td>

 

with this

<tr>

<td width="20" class="infoBoxHeading" background="$ul/ul.gif">

<!--<img src="images/infobox/gomma.gif" width="30" height="30">-->

</td>

 

in infobox_header.php.html

 

but when the code parse the template i get this

 

<tr>

<td width="20" class="infoBoxHeading" background="boxes/images//ul.gif">

<!--<img src="images/infobox/gomma.gif" width="30" height="30">-->

</td>

 

the $sts->template['templatepath'] var is empty.

 

anyone can help me pls, i'm not a php guru.

 

Thanks in advance.

 

Claudio Ginex

Edited by dcginex
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...