Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Newbie struggling with images

Newbie struggling with images

Locked

Views: 612

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
5 Mar 2009, 8:15 PM
#1
rilken27 avatar

rilken27

New Zenner

Join Date:
Mar 2009
Posts:
43
Plugin Contributions:
0

Newbie struggling with images

I have searched through the FAQ and forum for guidance but am still struggling. **I want to add a rollover image inplace of the text that is in the sidebox header (**Categories, Information, Search, etc.) When I followed the tutorial for adding an image in the header portion of the sidebox nothing went right.

INSTRUCTIONS FROM TUTORIAL:
In your includes/languages/CUSTOM/english.php find this line of code:

define('BOX_HEADING_CATEGORIES', 'Categories');

You can change it as follows:

define('BOX_HEADING_CATEGORIES', 'your_graphic_image.???');
My image is dots.gif. so would this be the correct replacement?
define('BOX_HEADING_CATEGORIES', dots.gif');

INSTRUCTIONS FROM TUTORIAL:
Now in includes/modules/sideboxes/CUSTOM/categories.php Find this:

$title = BOX_HEADING_CATEGORIES;

and change it to:

$title = zen_image($template->get_template_dir(BOX_HEADING_CATEGORIES, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . BOX_HEADING_CATEGORIES, HEADER_ALT_TEXT);

I did that as well. But when I uploaded the files I got a blank box where the image should be and then the image actually ended up within the header of the page and not the sidebox. ????

Is there something I'm missing? Or is there an easier way to replace the sidebox header text with an image?

Thank you for your help!

5 Mar 2009, 10:17 PM
#2
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Newbie struggling with images

When editing things like this, the details are vitally important. You said...

My image is dots.gif. so would this be the correct replacement?
define('BOX_HEADING_CATEGORIES', dots.gif');

Nope. you deleted an important detail. There should be a single quote mark in front of the image name, to match the one just after the image name. Won't work without it.

Check the other edit to make sure only the editable parts were actually edited, and that all quote marks are where they should be and occur in matched pairs.

As for an easier way, there is a mod in the Free Software Add Ons (link, top-left) called, I think, Categories Dressing, that offers many options for making your sideboxes look more interesting, including the use of images in headers.

Rob

5 Mar 2009, 10:24 PM
#3
rilken27 avatar

rilken27

New Zenner

Join Date:
Mar 2009
Posts:
43
Plugin Contributions:
0

Re: Newbie struggling with images

Thank you for your response. The single quotation was actually there. I just forgot to add it in this forum.

I really wanted to use the Category Dressing but the instructions were a little over my head. I did a search for it within the forum hoping to find better (or easier) step-by-step instructions. However, the only post I found had 100s of posts within. Do you know where I can find a tutorial or more instructions on how to apply the category dressing?

5 Mar 2009, 10:35 PM
#4
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Newbie struggling with images

That mod is definitely the way to go.

I think the best thing to do is to just start working with it, then ask whatever questions you need to ask in that thread you mentioned. That's why it's there and why it's so long.

Of course, I wouldn't do that on a live site, but on your working copy of the site. You do have a working copy, right? :smile:

Rob