[Chameleon] PopUp window - Changing core web path to new application path

Paul Spencer pspencer at dmsolutions.ca
Thu May 12 09:20:28 EDT 2005


you are right, there is a problem with using popups from custom widgets 
that are not part of the chameleon tree.

You will need to edit the widget files rather than the Popup.php file 
and change any lines that set $this->moPopup->mszLink to be the correct 
URL for your custom widgets.  For instance, assuming you have a custom 
widget named Query in your application, you could do the following in 
your custom Query.widget.php file:

$this->moPopup->mszLink = 

the way this works is that Popup.php will only use gszCoreWebPath if 
$this->mszLink starts with 'widgets' or './widgets' ... otherwise it 
will leave the link alone, assuming you have set the right thing.

Also, I don't think you would need a copy of chameleon.php in your 
application.  You can tell Chameleon to use your custom widgets by 
specifying a path to a folder containing custom widgets in the call to 
$oApp->CWCExecute by passing:

$oApp->CWCExecute( array( dirname(__FILE__)."/widgets" );

this will tell chameleon to search a widgets directory in your 
application first.  Then you can copy and Chameleon widgets that you 
need to customize into your application/htdocs/widgets directory and 
make the change above to have it use the popup files from the custom 
version rather than the core version.

You may run into other problems with specific widget files but I think 
most of them use relative paths so it shouldn't be too bad.



Rajan Man Bajracharya wrote:
> Dear All,
> I've recently installed newer version of Chameleon for the very first 
> time. Actually,I wanted to do some customizations with popup windows 
> like query results. To do this I've copied files such as chameleon.php 
> and associated folders (widgets, etc) to my application folder. But 
> popup windows are still using http://myserver/chameleon instead of my 
> application folder path. I suppose this is handle through gszCoreWebPath 
> Session variable (??) in popup.php. How do I initialize the path that 
> changes to my newly created applications folders path?    
> I've tried editing Popup.php but could not succeed. Any help is highly 
> appreciated.
> Thanking you in advance.
> Regards,
> -rajan
> _______________________________________________
> 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