[Chameleon] Help on extending QueryResults in the Query Widget

LITTLE Nelson nelson.little at tenix.com
Tue Sep 4 02:45:10 EDT 2007


William,

Thank you so much, this solved my problems!

Happy days are here again...

Cheers,
Nelson

-----Original Message-----
From: William Bronsema [mailto:wbronsema at dmsolutions.ca] 
Sent: Friday, 31 August 2007 9:52 PM
To: LITTLE Nelson; chameleon at lists.maptools.org
Subject: RE: [Chameleon] Help on extending QueryResults in the Query
Widget

Hi Nelson,

Are you passing the PHP session id (sid) to the test_query.phtml page?
When
you construct the URL to the test_query.phtml page you need to supply
the
sid.  

Something like:
<a href="test_query.phtml?sid=<?php echo session_id() ?>">My Query</a>

Cheers,
Bill


William Bronsema
Senior Applications Specialist
DM Solutions Group Inc.

___________________________________
http://www.dmsolutions.ca

-----Original Message-----
From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of LITTLE Nelson
Sent: Thursday, August 30, 2007 9:34 PM
To: William Bronsema; chameleon at lists.maptools.org
Subject: RE: [Chameleon] Help on extending QueryResults in the Query
Widget

William,

Thanks for your response. When I do this I get the following error
messages:

Warning: dl() [function.dl]: Unable to load dynamic library
'/ms4w/Apache/php/ext/' - The specified module could not be found. in
C:\ms4w\apps\chameleon\htdocs\widgets\session.inc.php on line 59

Fatal error: Call to a member function loadResource() on a non-object in
C:\ms4w\apps\chameleon\htdocs\widgets\session.inc.php on line 133

Line 59 of session.inc.php -> if (!extension_loaded("MapScript"))
dl($_SESSION['gszMapscriptModule']);

Line 133 of session.inc.php -> $oMLT->loadResource( 'common',
str_replace("\\", "/", $_SESSION['gszCorePath']) );

I am not sure how to progress past these errors.

Remember that the test_query.phtml page is opened via a hyperlink in the
QueryResults.phtml page (it's not a form with a submit button). The
errors seem to suggest that the _SESSION array is null? 

Cheers,
Nelson



-----Original Message-----
From: William Bronsema [mailto:wbronsema at dmsolutions.ca] 
Sent: Thursday, 30 August 2007 9:56 PM
To: LITTLE Nelson; chameleon at lists.maptools.org
Subject: RE: [Chameleon] Help on extending QueryResults in the Query
Widget

Hi Nelson,

You need to add the following to the top of the test_query.phtml page:

****************

// define the path to the chameleon root fold (include closing "/")
define( 'CHAMELEON_PATH', '/ms4w/apps/chameleon/htdocs/' );

// set the flag to setup the mapsession
if ( !defined("LOAD_MAPSESSION") )
    define("LOAD_MAPSESSION", 1);

include( CHAMELEON_PATH.'/widgets/session.inc.php' );
include_once( CHAMELEON_PATH."/widgets/CWC2ButtonCache.php" );

****************


This will let you add the style line:

<link href="<?php echo $szCSSFile; ?>" rel="stylesheet" type="text/css">

Hope that helps.

Cheers,
Bill


William Bronsema
Senior Applications Specialist
DM Solutions Group Inc.

___________________________________
http://www.dmsolutions.ca


-----Original Message-----
From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of LITTLE Nelson
Sent: Wednesday, August 29, 2007 9:23 PM
To: chameleon at lists.maptools.org
Subject: [Chameleon] Help on extending QueryResults in the Query Widget

Hi all,

Some background: 

I am trying to extend the Query widget by manipulating the formatValue()
function in QueryResults.phtml. Basically I search the $value for a
special value (eg "more_info://") and if that value is found I then
manipulate the $retVal to be something like:

<a ref="test_query.phtml?mac=blah" target="_new">link</a>

This allows for the above embedded link to appear in the Query Results
page which the user can now click to give more detailed results.

So far so good...

Problem:

I wish the test_query.phtml to have the same look and feel as the
QueryResults.phtml page for consistency. How do I go about this? I
notice that in the construction of the QueryResults.phtml page it uses
things like:

1. <title><?php echo $oMLT->get( 'QueryResults', '3', 'Query Results' );
?></title>

2. <link href="<?php echo $szCSSFile; ?>" rel="stylesheet"
type="text/css">

3. <script language="JavaScript" src="<?php echo
$_SESSION['gszCoreWebPath']; ?>/widgets/js/cwc_dhtml.js"
type="text/javascript"></script>

4. $szHTML .= makeButton( 'closeWindow', '', 'Query',
"images/icon_close.png", $oMLT->get( 'common', 'Close', 'Close' ),
$oMLT->get( 'common', 'CloseTip', 'Close Dialog' ), array( 'width' => 75
) );

How do I incorporate those things in my "test_query.phtml" page? 

Any help most gratefully appreciated.

-Nelson

Disclaimer :
The contents of this e-mail including any attachments are intended only
for the person or entity to which this e-mail is addressed.  If you are
not,
or believe you may not be, the intended recipient, please advise the
sender
immediately by return e-mail, delete this e-mail and destroy any copies.
Tenix does not warrant nor guarantee that this email communication is
free
from errors, virus, interception or interference.


_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon


Disclaimer :
The contents of this e-mail including any attachments are intended only
for the person or entity to which this e-mail is addressed.  If you are
not,
or believe you may not be, the intended recipient, please advise the
sender
immediately by return e-mail, delete this e-mail and destroy any copies.
Tenix does not warrant nor guarantee that this email communication is
free
from errors, virus, interception or interference.


_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon


Disclaimer :
The contents of this e-mail including any attachments are intended only
for the person or entity to which this e-mail is addressed.  If you are not,
or believe you may not be, the intended recipient, please advise the sender
immediately by return e-mail, delete this e-mail and destroy any copies.
Tenix does not warrant nor guarantee that this email communication is free
from errors, virus, interception or interference.




More information about the Chameleon mailing list