Forums / Addon Templates / Zen Cart Button Construction Kit 1.6.5 and up..

Zen Cart Button Construction Kit 1.6.5 and up..

Started by torvista on 21 May 2010, 6:56 AM · Views: 47,915

Results 1 to 20 of 108
21 May 2010, 6:56 AM
#1
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Zen Cart Button Construction Kit 1.6.5 and up..

Hi,
the current version is 1.6.5. from here
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=743
does not work with php 5.3.

I have it working now with 5.3 so it can generate english (non-accented) text on buttons, but there is a deeper problem for the accented characters that I will not have time to look at in the near future. It should not be too difficult for the brains in this forum though...

If anyone wants a copy of the changes I have done or even better have a go at fixing it, I have put it here:
http://zencartbuttonco.svn.sourceforge.net/viewvc/zencartbuttonco/

(Use "Download GNU tarball")

direct download
http://zencartbuttonco.svn.sourceforge.net/viewvc/zencartbuttonco.tar.gz?view=tar

Steve

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

7 Sep 2010, 2:53 AM
#2
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Zen Cart Button Construction Kit 1.6.5 and up..

Hi

I have fixed the accents and special characters in all languages they all seem to be working for me now in php 5.3, Spanish buttons are showing accents as well as most other languages are showing their characters correctly, except swedish which doesn't seem to work at all and didn't work in the original version I downloaded from your site when tried om php 5.3 (can't test it on anything else either)

I can send you the fix, its only one file that needed replacing

Webzings Design
Semi retired from Web Design

7 Sep 2010, 3:27 AM
#3
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Zen Cart Button Construction Kit 1.6.5 and up..

and I am back again

Ok

I have uploaded a fixed file to your sourceforge project page, it fixes all the accents except swedish

Swedish fails to generate because there is no "swedish" folder in the buttons directory, you need to add one and that fixes swedish,

I am just currently trying to track down the correct chars for the swedish translation

Webzings Design
Semi retired from Web Design

17 Sep 2010, 10:39 PM
#4
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Zen Cart Button Construction Kit 1.6.5 and up..

Is your version (working in php 5.3) displaying the two button previews correctly?

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

18 Sep 2010, 12:03 AM
#5
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Zen Cart Button Construction Kit 1.6.5 and up..

yes go to the site in the link I sent earlier where you can see it working, that is running on 5.3, and the accents work, obviously I had changed them to entities

heres the link again

http://grumpykiwi.com/zen_buttons/zen_bck/

ps you are the globe trotter aren't you, i was sure you were in spain

Webzings Design
Semi retired from Web Design

18 Sep 2010, 3:11 AM
#6
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Zen Cart Button Construction Kit 1.6.5 and up..

i was sure you were in spain
oh, that was last week!

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

19 Sep 2010, 3:36 AM
#7
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Zen Cart Button Construction Kit 1.6.5 and up..

I have now updated (and uploaded) this mod to v1.6.6 which works with php 5.3 (for me...), it may not be available in the downloads for a couple of weeks so if you want it now send me a pm with your email address.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

19 Sep 2010, 7:17 AM
#8
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Zen Cart Button Construction Kit 1.6.5 and up..

Wanted to applaud you both for your great work (as usual).. One question.. Any plans for getting this module to generate images with transparent background (PNGs).. I always liked this module but the only "missing" feature for was the inability to generate buttons with transparent backgrounds..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

19 Sep 2010, 8:13 AM
#9
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Zen Cart Button Construction Kit 1.6.5 and up..

As usual with the mods I install then improve, I don't know how the innards work, I just spend embarrassing amounts of time fixing obvious minor problems. The non-obvious problems were fixed by Nigel.

So, no plans for png improvement on my part..over to the experts for that one.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

19 Sep 2010, 1:25 PM
#10
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Zen Cart Button Construction Kit 1.6.5 and up..

torvista:

As usual with the mods I install then improve, I don't know how the innards work, I just spend embarrassing amounts of time fixing obvious minor problems. The non-obvious problems were fixed by Nigel.

So, no plans for png improvement on my part..over to the experts for that one.
Cool.. :cool: Kudos to you both!!!:clap:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

19 Sep 2010, 7:22 PM
#11
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Zen Cart Button Construction Kit 1.6.5 and up..

Its not something i am currently looking at either, mainly as the sites i look after still have at least 30% ie6 usage, although it is dropping rapidly now, I will probably have a look at it again later in the year, but looking at the code it shouldn't be too difficult, it's just it isn't my code and i have got to get my head around all the code before making changes

So for me just using a jpeg and setting the background colour to match the content background is all i need

Webzings Design
Semi retired from Web Design

19 Sep 2010, 10:27 PM
#12
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Zen Cart Button Construction Kit 1.6.5 and up..

Version 1.6.6 (for php5.3) now available for download
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=743

for those with 1.6.5 working on php 5.2 this version does not offer anything extra.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

19 Sep 2010, 10:36 PM
#13
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Zen Cart Button Construction Kit 1.6.5 and up..

torvista:

Version 1.6.6 (for php5.3) now available for download
http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=743

for those with 1.6.5 working on php 5.2 this version does not offer anything extra.

I hate to be a party pooper

You missed the buttons/swedish folder

which means the swedish buttons won't generate

Webzings Design
Semi retired from Web Design

19 Sep 2010, 11:00 PM
#14
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Zen Cart Button Construction Kit 1.6.5 and up..

which means the swedish buttons won't generate
I always miss something, this time I can blame it on jet lag instead of the kids.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

20 Sep 2010, 2:06 AM
#15
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Zen Cart Button Construction Kit 1.6.5 and up..

nigelt74:

Its not something i am currently looking at either, mainly as the sites i look after still have at least 30% ie6 usage, although it is dropping rapidly now, I will probably have a look at it again later in the year, but looking at the code it shouldn't be too difficult, it's just it isn't my code and i have got to get my head around all the code before making changes

So for me just using a jpeg and setting the background colour to match the content background is all i needAgain no worries.. Just would be nice if this generated PNG buttons.. I have a great javascript I use to make them (PNGs) obey on IE6 that works very well.. For some designs I need buttons with transparent backgrounds.. I have a great graphics person I work with who does 'em for me in those instances..

Anyway if you decide to give this feature a looksee, I'll look forward to seeing that improvement..:smile: I'll still keep this tool in my arsenal as I do find it very useful for some designs.. Am I following this thread correctly in that there is one more modification and re-submission in the works??

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

20 Sep 2010, 2:20 AM
#16
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Zen Cart Button Construction Kit 1.6.5 and up..

DivaVocals:

Am I following this thread correctly in that there is one more modification and re-submission in the works??

the only mod needed is to add a folder called swedish in the buttons directory, I assume torvista is already on to it or sleeping depending on where in the world he is at the moment

Webzings Design
Semi retired from Web Design

20 Sep 2010, 3:57 AM
#17
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Zen Cart Button Construction Kit 1.6.5 and up..

nigelt74:

the only mod needed is to add a folder called swedish in the buttons directory, I assume torvista is already on to it or sleeping depending on where in the world he is at the moment
Got it!!:laugh: will update my current install..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

20 Sep 2010, 1:15 PM
#18
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,876
Plugin Contributions:
7

Re: Zen Cart Button Construction Kit 1.6.5 and up..

Thanks to a pointer from nigel, this bit of code makes png backgrounds transparent, but that includes the text - some of the background seeps through. I think this is easy to fix but I have no time now, someone please investigate imagefilledrectangle etc..

in class.zen_bck.php line 91

		imagefill($btn_body, 0, 0, $bgcolor);

change to

		imagefill($btn_body, 0, 0, $bgcolor);
		imagecolortransparent($btn_body, $bgcolor);

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

20 Sep 2010, 8:47 PM
#19
nigelt74 avatar

nigelt74

Totally Zenned

Join Date:
Sep 2005
Location:
Waikato, New Zealand
Posts:
1,558
Plugin Contributions:
1

Re: Zen Cart Button Construction Kit 1.6.5 and up..

torvista:

Thanks to a pointer from nigel, this bit of code makes png backgrounds transparent, but that includes the text - some of the background seeps through. I think this is easy to fix but I have no time now, someone please investigate imagefilledrectangle etc..
yep thats about as far as I got

provided you set the background colour to something almost the polar opposite of the font colour, i got virtually no bleed through, or at least none i noticed, its just a halo of background colour around the button that bugs me.
see here
http://grumpykiwi.com/zen_buttons/zen_bck/
select "transparent test" in the defaults looks good on the red background, but when you actually create the buttons you see the red halo, provided you set the back ground colour to something similar to your site background, the buttons will fit in a heck of a lot better with the above hack, than they previously did

I am looking at imagefilledrectangle, but, todays is my eldests 4th birthday so the will be a sugar crazed midget terrorist stopping me for the next few days

Webzings Design
Semi retired from Web Design

20 Sep 2010, 11:03 PM
#20
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Zen Cart Button Construction Kit 1.6.5 and up..

Thanks to both of you.. Ya'll are the BEST!!!:clap: Will certainly give all of this a try this weekend (provided I can get folks to leave me alone with my geek toys..)

Nigel are you familiar with the Super Sleight script?? I have had EXCELLENT success making PNGs in IE6 behave with this script in place.. No more blue halos..

```
var supersleight=function(){var root=false; var applyPositioning=true; var shim='images/x.gif'; var shim_pattern=/x.gif$/i; var fnLoadPngs=function(){if(root){root=document.getElementById(root);}else{root=document;} for(var i=root.all.length-1,obj=null;(obj=root.all[i]);i--){if(obj.currentStyle.backgroundImage.match(/.png/i)!==null){bg_fnFixPng(obj);} if(obj.tagName=='IMG'&&obj.src.match(/.png$/i)!==null){el_fnFixPng(obj);} if(applyPositioning&&(obj.tagName=='A'||obj.tagName=='INPUT')&&obj.style.position===''){obj.style.position='relative';}}};var bg_fnFixPng=function(obj){var mode='scale';var bg=obj.currentStyle.backgroundImage;var src=bg.substring(5,bg.length-2);if(obj.currentStyle.backgroundRepeat=='no-repeat'){mode='crop';} obj.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='"+mode+"')";obj.style.backgroundImage='url('+shim+')';};var el_fnFixPng=function(img){var src=img.src;img.style.width=img.width+"px";img.style.height=img.height+"px";img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='scale')";img.src=shim;};var addLoadEvent=function(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldonload){oldonload();} func();};}};return{init:function(){addLoadEvent(fnLoadPngs);},limitTo:function(el){root=el;},run:function(){fnLoadPngs();}};}();supersleight.init();

> **nigelt74:**
>
> yep thats about as far as I got
> 
> provided you set the background colour to something almost the polar opposite of the font colour, i got virtually no bleed through, or at least none i noticed, its just a halo of background colour around the button that bugs me.
> see here
> <http://grumpykiwi.com/zen_buttons/zen_bck/>
> select "transparent test" in the defaults looks good on the red background, but when you actually create the buttons you see the red halo, provided you set the back ground colour to something similar to your site background, the buttons will fit in a heck of a lot better with the above hack, than they previously did
> 
> I am looking at imagefilledrectangle, but, todays is my eldests 4th birthday so the will be a sugar crazed midget terrorist stopping me for the next few days

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.