Forums / Templates, Stylesheets, Page Layout / how to change text links to images

how to change text links to images

Locked

Views: 4,955

Results 21 to 28 of 28
This thread is locked. New replies are disabled.
4 May 2007, 7:25 AM
#21
mellonade avatar

mellonade

New Zenner

Join Date:
Apr 2007
Posts:
69
Plugin Contributions:
0

how to change text links to images

glenn- thanks for following up on your suggestion. i tried your code and it worked as well.

for anyone else in the future who reads this thread, here's a quick summary of what ended up working:

in includes/languages/my_template/english.php, i replaced this

  define('MORE_INFO_TEXT','... more info');

with either of the following, as both work:

option 1: ```php
define('MORE_INFO_TEXT', zen_image_button('moreinfo.jpg'));


option 2: ```php
define('MORE_INFO_TEXT', '<img src="' . HTTP_SERVER . DIR_WS_TEMPLATE . 'images/moreinfo.jpg">');  

thanks to both of you for all of your help!!

4 May 2007, 3:30 PM
#22
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: how to change text links to images

Hey, great thanks for the update.

If you take this code

define('MORE_INFO_TEXT', zen_image_button('moreinfo.jpg'));  
```


and turn it into this code:

define('MORE_INFO_TEXT', zen_image_buttonCOLOR=#007700);
[/COLOR]

">
There is a more_info.gif in the button folder with that name so there is no need for an new image button and or name.


Play with it long enough and you will break it.
16 May 2007, 5:13 PM
#23
herghost avatar

herghost

New Zenner

Join Date:
May 2007
Posts:
30
Plugin Contributions:
0

Re: how to change text links to images

Just a quick one, where are you button images? Im not sure where to put them!

Should i create a folder in includes/templates/mytemplate?

Thanks

17 May 2007, 1:06 AM
#24
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: how to change text links to images

If you use:

zen_image(DIR_WS_IMAGES.'more_info.gif')

It will call for the image with the name of more_info.gif in your template/images

'MORE_INFO_TEXT' zen_image(DIR_WS_IMAGES.'more_info.gif')

I do not change the text to image in the english file, I change it for the modules folder, but whatever works best for you.


Play with it long enough and you will break it.
17 May 2007, 7:51 PM
#25
herghost avatar

herghost

New Zenner

Join Date:
May 2007
Posts:
30
Plugin Contributions:
0

Re: how to change text links to images

Thanks managed to change the text to images for the ages in information, do you know how to do it for the category headings too?

8 Jul 2007, 4:32 PM
#26
shirster avatar

shirster

Zen Follower

Join Date:
Sep 2005
Location:
Hong Kong
Posts:
301
Plugin Contributions:
0

Re: how to change text links to images

herghost:

Thanks managed to change the text to images for the ages in information, do you know how to do it for the category headings too?

Do you mean :

define('BOX_HEADING_CATEGORIES', '<img src="' . HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_TEMPLATE . 'images/categoryheading.gif">');

?

9 Jul 2007, 1:41 AM
#27
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: how to change text links to images

I worked up a generic mod for this recently in the Hiding the sidebox heading fonts/links.... thread. It will replace sidebox header text with an image for any header image file that exists, and leave the original text as is if the image is not found.