[Cartoweb-users] Query Result Display

Oliver Christen oliver.christen at camptocamp.com
Mon Aug 27 03:27:58 EDT 2007


Hi Paul

if you need help with basic php, there are countless tutorial on the web.

About Cartoweb, the most important thing is to understand clearly the flow 
of operations in cartoweb, see this shema : 
http://www.cartoweb.org/doc/misc/plugins_diagram.pdf
this show what functions are called in ALL enabled plugin when an action is 
triggered (this is a bit simplified but I wont get into details here)

preInitialize and initialize stage are usualy used to read .ini file and 
execute some preparatory specific code.
handleInit allow to trigger some action on the server side BEFORE map 
generation and before the core part on the client side is executed, for 
example when one need mapfile data (which can be accessed only from server 
side) on the client side very early in the execution flow.
Then you have the session handling function, used to create/load session for 
each sessionable plugin.
Then the filterPost/GetRequest and handleHttpPost/GetRequest where 
parameters returned by the users are recovered.
At that point, the map generation request is prepared on the client side and 
sent to the server side.
The request is then treated, with various stages depending of the plugins.
Once the map has been generated, a result is sent back to the client side.
Finally the tools (in the web interface) are prepared (getTools) , the 
interface HTML is finally generated (renderForm) and the session saved.
Once the content is displayed in the user's browser, the (complex) 
javascript handling all actions is initialised. Many plugin trigger 
javascript action(s).

You will find more or less the same flow in each and every plugin in 
Cartoweb. All the key functions have the same names.
Some plugins are more difficult to understand then other, but there is 
little i can do about that.

We have a few HowTo in the wiki which show/explain some basic example of 
implementation and usage of the various functions I told you above.
http://www.cartoweb.org/cwiki/HowTo

If you want to change the way something is displayed in the interface, you 
most certainly need to have to touch the renderForm part of the plugin.
Also, you will probably need to touch up the javascrip for that plugin (the 
outline popup form for example)

About ini file:
public function handleInit($pluginInit)

this function receive automaticaly the content of the corresponding .ini 
file for the plugin (if the file exist).
simply do a print_r($pluginInit);
You can do then what you want with it.

I hope this help you

Regards
Oliver

----- Original Message ----- 
From: "Paul Shapley" <p.shapley at gmail.com>
To: <cartoweb-users at lists.maptools.org>
Sent: Friday, August 24, 2007 9:31 PM
Subject: [Cartoweb-users] Query Result Display


> Hello Users,
>
> I'd just like to echo Guillaumes' point. I have a similar problem to
> solve having been a user of Cartoweb and customising the
> data/layers/scale/titles etc of the demo project.
>
> I'm new to php and would like to customise and resolve to make the
> outline plugin bring up a html form but do not know where to start.
> The Cartoweb Documentation outlines the principle but does not give an
> example of how the php code would read and what other files and
> dependencies would need changing.
>
> Is there a good php tutorial you would recommend?. What i'm having
> real trouble with is understanding the way the php files relate to the
> .ini files.
>
> How do i get started with developing the software beyond simple changes.
>
>
>
> -- 
> Paul J. Shapley
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
> 



More information about the Cartoweb-users mailing list