[Chameleon] having skins in a custom directory

Paul Spencer pspencer at dmsolutions.ca
Fri Mar 17 08:09:25 EST 2006


Bart,

you could register an absolute path to the skins directory, this  
should be the first (and fastest) case resolved.  Or you could  
register a relative path that gets caught earlier, like relative to  
your application directory.

I'm not sure moving that 4th case up would be the right solution, its  
been a long time since I looked at that code and it seems to me that  
it would cause problems but I am not sure how :)

Cheers

Paul

On 17-Mar-06, at 7:42 AM, Eijnden, B. van den (Bart) wrote:

> Hi list,
>
> I have my skin directory positioned under a custom directory
> (apps/geoservices/htdocs/skins), and most of the Chameleon  
> functionality
> works fine.
>
> There is however a problem with the Ruler widget, since  
> fileSystemToURL does
> not seem to be able to deal with such a situation.
>
>         $szRulerPix = $oApp->findFile( "images/ruler_pix.gif" );
>         $szRulerPix = $oApp->fileSystemToURL( $szRulerPix );
>
> The outcome of this is:
>
> http://145.50.148.45:82/data/geoservices-50/apps/geoservices/htdocs/ 
> skins/ge
> oservices/images/ruler_pix.gif
>
> which is the file path (/data/geoservices-50) appended to the ip:port
> combination.
>
> What is the correct way to deal with this kind of situation?
>
> One way to solve it is to move up case 4 in the findFile routine so  
> this
> will be the first option checked by Chameleon (since the ruler  
> images are
> also under /chameleon/htdocs/images):
>
>         /* case 4 - relative to chameleon */
>         $szTempPath = $this->resolvePath2( $szFilePath,
> $_SESSION['gszCorePath'] );
>         clearstatcache();
>         if ($szTempPath != "" && file_exists($szTempPath))
>         {
>             //echo "found: $szTempPath<BR>\n";
>             return $szTempPath;
>         }
>
> However, I cannot foresee if this will have unwanted side effects  
> (what is
> the use of chameleon/htdocs/images anyway compared to the skins/ 
> images ?).
>
> Thanks in advance.
>
> Best regards,
> Bart
>
>
> Disclaimer
> ********************************************************************** 
> **
> Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
> uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
> hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te
> informeren. Wij adviseren u om bij twijfel over de juistheid of de
> volledigheid van de mail contact met afzender op te nemen.
>
> This message shall not constitute any rights or obligations.
> This message is intended solely for the addressee.
> If you have received this message in error, please delete it and
> notify the sender immediately. When in doubt whether this message
> is correct or complete, please contact the sender.
> ********************************************************************** 
> **
>
> _______________________________________________
> 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