Forums / Addon Sideboxes / new sidebox change text to *.gif

new sidebox change text to *.gif

Views: 2,368

Results 1 to 14 of 14
25 Jan 2011, 10:24 AM
#1
maxy007 avatar

maxy007

Zen Follower

Join Date:
Dec 2010
Posts:
248
Plugin Contributions:
0

new sidebox change text to *.gif

Hi there,
I've created a new sidebox called Good to know.
I've created a header (gif file) for it called goodtoknowhead.gif

How do I change the text currently displayed to use my custom image?

Hope this makes sense!!

Thanks

Maxy

Mitch B
www.lovetovape.com.au
love the Zen-Cart forums!!!

25 Jan 2011, 11:10 AM
#2
maxy007 avatar

maxy007

Zen Follower

Join Date:
Dec 2010
Posts:
248
Plugin Contributions:
0

Re: new sidebox change text to *.gif

Ok I got the image working for the good to know heading.
I forgot to add the image to my template file and update the stylesheet headings.php file.

Somehow the text "Good to Know" is below the sidebox image. Even though it's not visible it's there and it's making any page I place under the good to know heading be out of alignment.

Do you know how I can get rid of the text?
I was given instructions for a similar issue in another thread but this is really doing my head in. I just can't work it out.

please help!!

Maxy

Mitch B
www.lovetovape.com.au
love the Zen-Cart forums!!!

25 Jan 2011, 7:05 PM
#3
gjh42 avatar

gjh42

Black Belt

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

Re: new sidebox change text to *.gif

Use the Images for Titles mod from Free Addons for your sidebox heading. That automatically handles the headings where you have images properly named and leaves the rest alone.

Or you can change the define for your new sidebox title to be the image instead of text:```php
define('YOUR_SIDEBOX_TITLE', zen_image(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/your_sidebox_image.gif', 'Your Sidebox Heading'));

25 Jan 2011, 8:57 PM
#4
maxy007 avatar

maxy007

Zen Follower

Join Date:
Dec 2010
Posts:
248
Plugin Contributions:
0

Re: new sidebox change text to *.gif

gjh42:

Use the Images for Titles mod from Free Addons for your sidebox heading. That automatically handles the headings where you have images properly named and leaves the rest alone.

Or you can change the define for your new sidebox title to be the image instead of text:```php
define('YOUR_SIDEBOX_TITLE', zen_image(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/your_sidebox_image.gif', 'Your Sidebox Heading'));



Hi there,
where do i find define('YOUR_SIDEBOX_TITLE', zen_image(DIR_WS_TEMPLATE . 'buttons/' .  $_SESSION['language'] . '/your_sidebox_image.gif', 'Your Sidebox  Heading'))

I searched for zen_image(DIR_WS_TEMPLATE . 'buttons/' .  in Admin> dev tools but it didn't show up!!

Mitch B
www.lovetovape.com.au
love the Zen-Cart forums!!!

25 Jan 2011, 9:15 PM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: new sidebox change text to *.gif

You won't find it. You need to find the existing define for whatever the custom sidebox title is and change it similar to the example. I can't write it exactly for you because I don't know your sidebox id, image filename, etc.

Use Tools > Developers Toolkit to find the file where the current sidebox title text is defined.

25 Jan 2011, 9:18 PM
#6
maxy007 avatar

maxy007

Zen Follower

Join Date:
Dec 2010
Posts:
248
Plugin Contributions:
0

Re: new sidebox change text to *.gif

Thank you!!

I think I've found it :)

Mitch B
www.lovetovape.com.au
love the Zen-Cart forums!!!

26 Jan 2011, 6:32 AM
#7
maxy007 avatar

maxy007

Zen Follower

Join Date:
Dec 2010
Posts:
248
Plugin Contributions:
0

Re: new sidebox change text to *.gif

I used the images for titles mod and the text is still there.
I need to get rid of this.

Any other suggestions??

Thanks for reading :smile:

Mitch B
www.lovetovape.com.au
love the Zen-Cart forums!!!

26 Jan 2011, 6:48 AM
#8
maxy007 avatar

maxy007

Zen Follower

Join Date:
Dec 2010
Posts:
248
Plugin Contributions:
0

Re: new sidebox change text to *.gif

I changed the blank_sidebox_defines.php file from this

<?php /** * blank sidebox definitions - text for inclusion in a new blank sidebox * * @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 $ */ define('BOX_HEADING_BLANK_SIDEBOX', 'Good to Know'); define('TEXT_BLANK_SIDEBOX', '<a href="http://www.lovetovape.com.au/index.php?main_page=page&id=14">E-Juice</a>'); ?>

to this

<?php /** * blank sidebox definitions - text for inclusion in a new blank sidebox * * @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 $ */ define('GOOD_TO_KNOW_TITLE', zen_image(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/goodtoknowhead.gif', 'Good to Know')); define('TEXT_BLANK_SIDEBOX', '<a href="http://www.lovetovape.com.au/index.php?main_page=page&id=14">E-Juice</a>'); ?>

The text that was there has now changed to
BOX_HEADING_BLANK_SIDEBOX

I searched for that in admin and it came up with 4 matches
they are shown in the attached image.

Which one do I need to change?

Cheers,

Maxy

Mitch B
www.lovetovape.com.au
love the Zen-Cart forums!!!

26 Jan 2011, 6:52 AM
#9
gjh42 avatar

gjh42

Black Belt

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

Re: new sidebox change text to *.gif

There is no Images for Titles image there - it is still the background image. What filename did you use for the header image, and where exactly is it located?
You appear to have deleted the define for BOX_HEADING_BLANK_SIDEBOX, which is why that particular text is showing. If you find the language file where it should be and add

define('BOX_HEADING_BLANK_SIDEBOX', '');

you will get no actual text in that location.

The tpl_ or box file is still looking for BOX_HEADING_BLANK_SIDEBOX, not GOOD_TO_KNOW_TITLE, and since you have deleted it, it can only show the constant name.

26 Jan 2011, 7:07 AM
#10
maxy007 avatar

maxy007

Zen Follower

Join Date:
Dec 2010
Posts:
248
Plugin Contributions:
0

Re: new sidebox change text to *.gif

I changed the Blank_sidebox_defines.php file located here /includes/languages/english/extra_definitions.

now the text is showing as good to know again.

The file name is goodtoknowhead.gif and it's located in includes/templates/surfshop/buttons/english/

and also in includes/templates/template_default/buttons/english/

Cheers,

maxy

Mitch B
www.lovetovape.com.au
love the Zen-Cart forums!!!

26 Jan 2011, 7:26 AM
#12
maxy007 avatar

maxy007

Zen Follower

Join Date:
Dec 2010
Posts:
248
Plugin Contributions:
0

Re: new sidebox change text to *.gif

Hi glenn,
Hmmm now I've got 2 good to know headings!!

Cheers,

Maxy

Mitch B
www.lovetovape.com.au
love the Zen-Cart forums!!!

26 Jan 2011, 7:29 AM
#13
maxy007 avatar

maxy007

Zen Follower

Join Date:
Dec 2010
Posts:
248
Plugin Contributions:
0

Re: new sidebox change text to *.gif

I think we are almost there!!! :laugh:

Mitch B
www.lovetovape.com.au
love the Zen-Cart forums!!!

26 Jan 2011, 1:59 PM
#14
maxy007 avatar

maxy007

Zen Follower

Join Date:
Dec 2010
Posts:
248
Plugin Contributions:
0

Re: new sidebox change text to *.gif

Yayyyy!!!

I found it!!!
It was the stylesheet headings.php file!!

I had to change the image name in that file and also the name of the actual images to have boxhead- at the start.

thank you so much for all your help I really, really appreciate it!!

Cheers,

Maxy

Mitch B
www.lovetovape.com.au
love the Zen-Cart forums!!!