Gossamer Forum
Quote Reply
Plugin Attempt......
Hi,

Ive started a new plugin which needs to load a new template. I have successfully added the necessary code to the Install.pm file so that the html template is extracted from the tar file into the templates directory. Then I have a PRE hook that calls the template.

The problem is that the template loads, but when I press the submit button on the page, the next template to load (which is a standard links template) shows up below the original and doesn't open on a new page.

At the end of the sub that calls the new template I have STOP; rather than CONTINUE; could this be the problem?

Paul Wilson.
new - http://www.wiredon.net
Quote Reply
Re: Plugin Attempt...... In reply to
The problem is usually in the perl code itself.

You are loading both templates.

I got a lot of this trying to fix up the complicated templates for the login/success group of files.

Somewhere, you are still continuing to run code, and executing a second display template call. That's all.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://LinkSQL.com/FAQ


Quote Reply
Re: Plugin Attempt...... In reply to
:(

ok...here goes.....

I have a PRE LAST hook before user_add_link that calls a sub called confirm, the sub only loads one template called add_confirm.html and then uses return STOP; as I thought it had to stop at this point.

Then it shows the info that was submitted from add.html and the user is asked to press the confirm button. The form action is add.cgi and I have <input type="submit" name="add" value="Submit"> - therefore surely this should now just pass on the info to add_success.html and add it to the database ?

(I have hidden fields on the confirm page with all the field names and values).

Paul Wilson.
new - http://www.wiredon.net
Quote Reply
Re: Plugin Attempt...... In reply to
Look at the calling shell.

Usually the call to plugin dispatch occurs, and returns a result code.

That code is used to determine what to do after the routine is over -- either print a success or fail template.

You want to bypass that...or let those routines do the printing.

PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://LinkSQL.com/FAQ