Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Replacing Links with Images

Replacing Links with Images

Locked

Views: 2,911

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
13 Sep 2006, 1:34 AM
#1
bfwdesigns avatar

bfwdesigns

Zen Follower

Join Date:
Feb 2005
Posts:
199
Plugin Contributions:
0

Replacing Links with Images

If I wanted to remove the text "Category", "Information" etc...

My understanding is that I need to go to /languages/english.php and change this line:

// categories box text in sideboxes/categories.php
define('BOX_HEADING_CATEGORIES', 'Categories');

to:

// categories box text in sideboxes/categories.php
define('BOX_HEADING_CATEGORIES', '<img src="../images/categories.gif">');

I tried that but it just shows my image as broken. I am using the latest version of zen, classic, override system... my image is uploaded under my override folder under images...

I had another question:
Do I also need to copy the folder "languages" and add it to my template folder to use the override system????

Thanks in advance!

13 Sep 2006, 2:45 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Replacing Links with Images

Second question first. Check the wiki here in the top nav bar and the override forum and the first/only sticky on overrides. For each dir that the classic dir exists in you can create a your_template dir that will receive inly the edited files that exist in this area. move to another dir and see the classis, then those files there can edited and placed in your own dir.

For your other item, upload images to includes/templates/your_template/images

and try this code:

define('BOX_HEADING_CATEGORIES', 'url(..images/categories.gif">');
13 Sep 2006, 1:48 PM
#3
bfwdesigns avatar

bfwdesigns

Zen Follower

Join Date:
Feb 2005
Posts:
199
Plugin Contributions:
0

Re: Replacing Links with Images

Kobra,

that does not work.. now instead of the broken image box, it shows this text with no image url(..images/categories.gif">

Now, I see there is only 1 " should it be like this:

define('BOX_HEADING_CATEGORIES', 'url(..images/"categories.gif">');

Either way, I tried them both and it does not work...

13 Sep 2006, 4:20 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Replacing Links with Images

My :oops:

Where did that "> come from??? sorry should be:

define('BOX_HEADING_CATEGORIES', 'url(..images/categories.gif)');

Oh, now I see...I picked it up from your original post and just replaced the relative link info...I need to watch it.

If this does not produce the image, also try loading the image it to the /images at the base of your Zen Cart install. I am relatively positive that Zen will look to the template image dir.

13 Sep 2006, 4:52 PM
#5
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,607
Plugin Contributions:
0

Re: Replacing Links with Images

Put your new image in the templates/YOUR_TEMPLATE/images/ directory and use the correct relative path: includes/templates/YOUR_TEMPLATE/images/YOUR_IMAGE.gif

13 Sep 2006, 4:53 PM
#6
bfwdesigns avatar

bfwdesigns

Zen Follower

Join Date:
Feb 2005
Posts:
199
Plugin Contributions:
0

Re: Replacing Links with Images

I got it to work on another site awhile back, but for the life of me, I just cant remember how I did it... I tried what you said and it just shows the text on the page in place of the "word category", it shows url(images....) no image or red broken image box...

I tried reuploading the image like you said, but it is not regonizing it in the code, there is something missing...

13 Sep 2006, 4:56 PM
#7
bfwdesigns avatar

bfwdesigns

Zen Follower

Join Date:
Feb 2005
Posts:
199
Plugin Contributions:
0

Re: Replacing Links with Images

ok so all i need to do is this:

define('BOX_HEADING_CATEGORIES', 'url(includes/templates/MY_TEMPLATE/images/categories.gif)');

13 Sep 2006, 4:58 PM
#8
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,607
Plugin Contributions:
0

Re: Replacing Links with Images

No - use:

define('BOX_HEADING_CATEGORIES', '<img src="includes/templates/MY_TEMPLATE/images/categories.gif" />;

13 Sep 2006, 5:05 PM
#9
bfwdesigns avatar

bfwdesigns

Zen Follower

Join Date:
Feb 2005
Posts:
199
Plugin Contributions:
0

Re: Replacing Links with Images

using that code, i get this error:

Parse error: parse error, unexpected T_STRING in
includes/languages/english.php on line 81

13 Sep 2006, 5:23 PM
#10
patski avatar

patski

Zen Follower

Join Date:
Nov 2004
Location:
Deal, Kent, UK
Posts:
325
Plugin Contributions:
0

Re: Replacing Links with Images

Umm I hate to correct the maestro :shocking: but shouldn't it be:

define('BOX_HEADING_CATEGORIES', '<img src="includes/templates/MY_TEMPLATE/images/categories.gif" />');

13 Sep 2006, 5:30 PM
#11
bfwdesigns avatar

bfwdesigns

Zen Follower

Join Date:
Feb 2005
Posts:
199
Plugin Contributions:
0

Re: Replacing Links with Images

That Worked! Thank You All!

14 Sep 2006, 12:14 AM
#12
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,607
Plugin Contributions:
0

Re: Replacing Links with Images

:laugh: YIKES! My syntax was bad... sorry ... shoulda' cleaned my glasses.