[Chameleon] Moving custom widget/skin files'

McGraw, Joanne mcgrawj at AGR.GC.CA
Mon Jan 24 11:46:13 EST 2005


Hello all,

 

I have a follow up question to the information provided in the message
at:

 

http://lists.maptools.org/pipermail/chameleon/2004-June/000955.html

 

I have established a directory of /ms4w/apps/custom/widgets and
/ms4w/apps/custom/skins, so that I can move our custom widgets and skins
out of the chameleon sub-directory entirely. In the index.phtml for the
application, I have the following two lines of code to accommodate this:

 

$oApp->registerSkin('/ms4w/apps/custom/skins/aafc');

$oApp->CWCExecute(array('/ms4w/apps/custom/widgets'));

 

As a result, the custom/widgets are found, but the custom/skins/aafc are
not. I looked at the chameleon.php findFile() function and found it does
not accommodate the occurrence of the skin path being absolute as the
widgets appear to do. Any info why this is the case? That is, if I just
edit the foreach() loop in chameleon.php's findFile() as below, it works
and I'm wondering if changing that is bad idea.

 

Cheers,

jtm

 

        foreach( array_reverse($this->maszSkinSearchPath) as $szPath )

        {

            //echo "searching registered skin path $szPath<BR>\n";

            $szTempPath = $this->resolvePath2( $szFilePath,
$_SESSION['gszAppPath'].'/'.$szPath."/" );

            //echo "resolved search path to $szTempPath<BR>\n";

            clearstatcache();

            if ($szTempPath != "" && file_exists($szTempPath))

            {

                //echo "found in registered skin: $szTempPath<BR>\n";

                return $szTempPath;

            }

 

            $szTempPath = $this->resolvePath2( $szFilePath, $szPath."/"
);

            //echo "resolved search path to $szTempPath<BR>\n";

            clearstatcache();

            if ($szTempPath != "" && file_exists($szTempPath))

            {

                //echo "found in registered skin: $szTempPath<BR>\n";

                return $szTempPath;

            }

 

        }

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20050124/cb63fd41/attachment.html


More information about the Chameleon mailing list