thanks, any idea how I could get the button type used in the search sidebox, or is it a gif too?
thanks, any idea how I could get the button type used in the search sidebox, or is it a gif too?
Beau
You can use a GIF, JPG or PNG image
Please do not PM for support issues: a private solution doesn't benefit the community.
Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.
Newbie question time: How do you figure out the path to a graphic. I have tried <img src="free.gif" /> with the free.gif in the images folder in the same level as the sidebox folder that has the sidebox php file with the code and I see nothing. As you can see in the code below I'm using the Blank Sidebox as a starting point.
Code:<?php /** * blank sidebox - allows a blank sidebox to be added to your site * * @package templateSystem * @copyright 2007 Kuroi Web Design * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ */ $content = ''; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">'; $content .= '<a href="http://audiobookstownsquare.yuku.com"><img src="free.gif" /></a>'; $content .= '</div>'; ?>
Beau
You'll need the path in the img tag. A relative path would be: <img src="../images/free.gif"> That's two dots before the slash. You can also put in the entire path (http:// etc.), but you can run into problems on secured pages that way.
And that (../images/free.gif) would be the path to an image in the correct template image folder, /includes/templates/your_template/images/free.gif.
The /images/ folder in the root of the Zen Cart installation is intended mainly for product images, while template-specific images go in the template folder.
It is the browser that resolves the relative URL reference, so:
from the page at www.example.com/zencart/index.php?some-parameters the reference "../images/free.gif" points to www.example.com/images/free.gif.
and
from the page at www.example.com/index.php?some-parameters the reference "../images/free.gif" points to www.example.com/../images/free.gif.
Neither of those are what you want.
I can't stress enough that simply linking to images using "/zencart/images/free.gif" and "/images/free.gif" references with a leading slash simplifies everything instantly.
In that case, template images are referred to using "/zencart/includes/templates/your_template/images/free.gif" and "/includes/templates/your_template/images/free.gif" references.