Gossamer Forum
Quote Reply
datessearch plugin
Hi,

I wrote a plugin for advanced datesearch (see attachment) but I cannot get it to work. It is hard to debug, because there is not much documentation available about writing plugins. I used the wizard to create it and used the XML plugin to copy some ideas.

Here is the problem: at the end of the subroutine, I added the line
Code:
$IN->param( "datesearch_debug" => 'hoi' );

As all input variables are passed as tags to the resulting template, I would expect the tag <%datesearch_debug%> to be replaced by hoi, but instead, I get the message that the tag is unknown. So it seems that my plugin (or at least the subroutine) is not executed at all.

What am I doing wrong?

Thanks, Jasper

http://www.bookings.org

Last edited by:

jaspercram: Nov 5, 2002, 3:32 AM
Quote Reply
Re: [jaspercram] datessearch plugin In reply to
Hi,

I found out what I did wrong. I should have used
Code:
$home->{cgi}->{datesearch_debug} = 'hoi';
instead of the code that I mentioned in the previous post. I don't know why, but it seems to work now.

Now I can start debugging my plugin.....

Keep you informed, Jasper

http://www.bookings.org
Quote Reply
Re: [jaspercram] datessearch plugin In reply to
Here is the first version of my first plugin: DateSearch. some limitations:
- I only tested the tags that I am using myself
- The documentation is limited to the list with supported tags
- It doesn't handle times yet.

If someone (GT?) would like to work on the limitations (documentation, testing and/or new features), you are welcome to do so. Please contact me first, so we are not doing any double work.

Have fun, Jasper

http://www.bookings.org
Quote Reply
Re: [jaspercram] datessearch plugin In reply to
How can I use it?

I tried to see the help in the plugins page, but it gets an error

I have a field for date in the following format

<input type="hidden" name="data_cadastro" value="2004-04-06">

By this

<input type="hidden" name="data_cadastro" value="<%GT::Date::date_get()%>">

How can I search this field? like to show records from a month ou from a 2 months?

Thanks