[Chameleon] Empty buttons - fixed

Paul Spencer pagameba at magma.ca
Thu Jun 3 08:39:21 EDT 2004


Sorry, I missed commenting on most of this thread ... for some reason I 
didn't get the messages until late last night :(

I'm glad you've got the problem resolved.

There is a definite documentation issue here, but I also think that some 
useful error messages could be generated that would have pointed you in 
the right direction, I'll work on the error messages (bug 434). 
Documentation is underway but it'll be a while.

Chameleon will search for images relative to the following locations:

application path: the location of your index.phtml file
chameleon path: the location of your chameleon.php file

In addition, you can add search paths called 'skins' using the 
registerSkin function.

So when it searches for an image, it will try to determine if the image 
is an absolute or relative path.  If absolute, it will simply using it 
as-is.  If relative, it will check all skin paths relative to the 
application path, then just relative to the application path, then all 
skin paths relative to the chameleon path, then the default skin 
distributed with chameleon, then relative to chameleon.

So if you register two skins called 'skins/blue' and 'skins/red', and an 
image attribute refered to icons/icon_zoomin.png then the following 
would be searched:

<application>/skins/red/icons/icon_zoomin.png
<application>/skins/blue/icons/icon_zoomin.png
<application>/icons/icon_zoomin.png
<chameleon>/skins/red/icons/icon_zoomin.png
<chameleon>/skins/blue/icons/icon_zoomin.png
<chameleon>/skins/default/icons/icon_zoomin.png
<chameleon>/icons/icon_zoomin.png

You don't need to register the default skin unless you have a copy of 
the default skin in your application and you want to use it before the 
default skin in chameleon.

Once we have all this documented, the defacto standard for creating and 
naming images will be the conventions adopted for the default skin in 
chameleon.  This would mean that you could re-skin your application by 
installing a new skin in your application (skins/myskin for instance) 
that had different images but all named the same as the default skin, 
and registering 'skins/myskin' in the application file.  Oh, depending 
on the skin chosen, there may be some changes required to the style 
SharedResources (for automagically generated buttons ...) to accomodate 
different widths and fonts etc.  I hope that every skin will be 
distributed with one or more example SharedResource snippets that can be 
dropped in with the skin.

It is not necessary to maintain the same names, but it will be the way 
we do it for our skins to make our applications more standardized.

We will be covering this in the advanced chameleon workshop at OSGIS for 
those attending.

Cheers,

Paul

Delfos, Jacob wrote:

> Sorry, it's fixed now.
> 
> I didn't realize the sample templates made use of things that are not
> available in the default skin. Which one is better to use? The 'sample'
> skin?
> Instead of changing sample to default, I copied the 'sample' skin to my
> htdocs folder.
> 
> Jacob
> 
> -----Original Message-----
> From: Delfos, Jacob [mailto:jacob.delfos at maunsell.com] 
> Sent: Thursday, 3 June 2004 4:35 PM
> To: chameleon at lists.maptools.org
> Subject: RE: [Chameleon] Empty buttons
> 
> 
> Although it wasn't set correctly (sample, rather than default), changing it
> hasn't fixed the problem. The apache error suggests it is the buttenizer
> that cannot read the image in C:\chameleon\roe7\htdocs/skins/default/. Is it
> the slash and backslash problem? Why does it mix these?
> 
> Thanks,
> 
> Jacob
> 
> -----Original Message-----
> From: bartvde at xs4all.nl [mailto:bartvde at xs4all.nl] 
> Sent: Thursday, 3 June 2004 4:11 PM
> To: Delfos, Jacob
> Cc: chameleon at lists.maptools.org
> Subject: Re: [Chameleon] Empty buttons
> 
> 
> Hi Jacob,
> 
> did you copy the skins/default folder into the htdocs directory of your
> application? This is the default skin used if no skin is registered in the
> app.
> 
> The sample apps register a different skin in their index.phtml through:
> $oApp->registerSkin( 'skins/sample' );
> 
> Best regards,
> Bart
> 
> 
>>Hi All,
>>
>>I have a problem with certain buttons, in the sense that their content
>>doesn't show up. E.g. the compasspoint buttons, and the tab-sheet 
>>buttons. It works in the sample, but not in the site I set up myself. 
>>I checked all my paths, but I can't find anything. I suspect it has to 
>>do with a warning that PHP shows. Can someone explain this to me?
>>
>>[03-Jun-2004 15:39:19] PHP Warning:
>>imagecreatefrompng(C:\chameleon\roe7\htdocs/skins/default/): failed to
>>open
>>stream: Permission denied in 
>>C:\chameleon\roe7\htdocs\common\buttonizer\buttonizer.php on line 412 
>>[03-Jun-2004 15:39:19] PHP Warning:  imagecolortransparent(): supplied 
>>argument is not a valid Image resource in 
>>C:\chameleon\roe7\htdocs\common\buttonizer\buttonizer.php on line 413 
>>[03-Jun-2004 15:39:19] PHP Warning:  imagesx(): supplied argument is 
>>not a valid Image resource in 
>>C:\chameleon\roe7\htdocs\common\buttonizer\buttonizer.php on line 414 
>>[03-Jun-2004 15:39:19] PHP Warning:  imagesy(): supplied argument is 
>>not a valid Image resource in 
>>C:\chameleon\roe7\htdocs\common\buttonizer\buttonizer.php on line 415 
>>[03-Jun-2004 15:39:19] PHP Warning:  imagecopy(): supplied argument is 
>>not a valid Image resource in
>>C:\chameleon\roe7\htdocs\common\buttonizer\buttonizer.php on line 442
>>[03-Jun-2004 15:39:19] PHP Warning:  imagedestroy(): supplied argument is
>>not a valid Image resource in
>>C:\chameleon\roe7\htdocs\common\buttonizer\buttonizer.php on line 447
>>
>>
>>
>>JACOB DELFOS
>>SPATIAL INFORMATION ANALYST
>>Maunsell Australia Pty Ltd
>>629 Newcastle Street
>>PO Box 81
>>Leederville 6902
>>Western Australia
>>ABN 20 093 846 925
>>
>>Tel     + 61 8 9281 6185
>>Fax    + 61 8 9281 6297
>>jacob.delfos at maunsell.com
>>
>>_______________________________________________
>>Chameleon mailing list
>>Chameleon at lists.maptools.org
>>http://lists.maptools.org/mailman/listinfo/chameleon
>>
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 

-- 
  -----------------------------------------------------------------
|Paul Spencer                           pspencer at dmsolutions.ca   |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
  -----------------------------------------------------------------



More information about the Chameleon mailing list