[Chameleon] Language Functionality in 2.4
Julien-Samuel Lacroix
jlacroix at mapgears.com
Mon Jul 17 09:29:51 EDT 2006
Hi,
It seems that you mapfile was not read correctly...Did you changed you
MapServer version at the same time?
Julien
Pascoe,Tim [Burlington] wrote:
> I’m attempting to implement the MLT option in Chameleon 2.4. I have an
> application which has been successfully migrated to 2.4 for a while, but
> now requires both French and English. I looked at the bilingual example
> in the Chameleon samples, and modified my .phtml file accordingly.
> However, now get the following error when trying to open a map.
>
> PHP Fatal error: Call to a member function set() on a non-object in
> C:\Mapserver\chameleon\htdocs\widgets\KeyMap\KeyMap.widget.php on line 197
>
> Are there further changes I need to make to the map template as well, or
> am I missing something else? Any pointer to documentation on this would
> be great. I looked through the Chameleon pages on Maptools, but it’s
> pretty thin J
>
> The phtml file is below
>
> Thanks,
>
>
> <?php
>
> /*
>
> * this is a sample of a minimal application script required to
>
> * get a chameleon application running with a template and a
>
> * local map file. Most applications should actually just
>
> * copy this file and modify the template and mapfile
>
> * parts and should not need to do a lot more here.
>
> */
>
> $gszAppPath = dirname(__FILE__);
>
> include( "/Mapserver/chameleon/htdocs/chameleon.php" );
>
> $szMapFile = dirname(__FILE__)."/../map/cabinbase.map";
>
> class CabinApp extends Chameleon
>
> {
>
> function CabinApp()
>
> {
>
> parent::Chameleon();
>
> $this->moMapSession = new MapSession_RW;
>
> $this->moMapSession->setTempDir( getSessionSavePath());
>
> }
>
> }
>
> $oApp = new CabinApp();
>
> $oApp->mnMinimumMaturityLevel = MATURITY_ALPHA;
>
> $oApp->registerSkin( 'skins/sample' );
>
> /** Setting Variable for Return Page of Application
>
> */
>
> if( isset( $_REQUEST['txtreturnpage'] ) )
>
> $oApp->setVar( 'HISTORYPAGE', $_REQUEST['txtreturnpage'] );
>
> else {
>
> if( isset( $_REQUEST['historypage'] ) )
>
> $oApp->setVar( 'HISTORYPAGE', $_REQUEST['historypage'] );
>
> else
>
> $oApp->setVar( 'HISTORYPAGE', 'null' );
>
> }
>
> $oApp->CWCAddRegionalTemplate( 'en-CA',
> dirname(__FILE__).'/cabin_data_map_en.html',
> dirname(__FILE__).'/cabin_data_map_en.php' );
>
> $oApp->CWCAddRegionalTemplate( 'fr-CA',
> dirname(__FILE__).'/cabin_data_map_fr.html',
> dirname(__FILE__).'/cabin_data_map_fr.php' );
>
> $oApp->CWCInitialize( dirname(__FILE__).'/cabin_data_map_en.html',
> $szMapFile );
>
> $oApp->CWCExecute();
>
> ?>
>
> Timothy Pascoe
>
>
> Environment Canada / Environnement Canada
> Canada Centre for Inland Waters / Centre Canadien des Eaux Intérieures
> 867 Lakeshore Road / 867, chemin Lakeshore
> Burlington, Ontario / Burlington (Ontario)
>
> L7R 4A6
>
> Tel/Tél: (905) 336-6239
> Fax/Téléc: (905) 336-4699
> E-mail/C. élec: ___tim.pascoe at ec.gc.ca_ <mailto:tim.pascoe at ec.gc.ca>
> Government of Canada/Gouvernement du Canada
>
> /This e-mail represents the opinions and views solely held by its author
> and in no manner may be considered as representing those of his/her
> employer./
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
--
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
More information about the Chameleon
mailing list