Re: Question about creating plugin

John Reese <[email protected]>
Newsgroups gmane.comp.bug-tracking.mantis.general
Message-ID <[email protected]>
Pablo Pedrosa wrote:
> Hi!,
> I´m developing a new plugin, i need to put 3 nested select tags in the 
> bug reporting. I´ve done it, and works perfectly, the problem is when i 
> want to save that data on the database, how could i capture the data to 
> save it in the database?.
> Any help would be appreciated.

[Copied from mantisbt-dev list]

Basically, you'll need two pages: one page contains the form to be submitted
with normal HTML, and the second page is the target of the form.  There are a
various functions in mantisbt/core/gpc_api.php which are designed to help with
extracting form data and cleaning it at the same time:

gpc_get_int("name") gets an integer, gpc_get_string("name") gets a string, etc.

There is more extensive documentation of how to build plugins in the developer's
guide, including an example form/page interaction, at:

http://docs.mantisbt.org/master/en/developers/index.html

Further, if you would like more extensive examples, there are multiple plugins
available at http://git.mantisforge.org that you can view.  A simple plugin to
look at might be Snippets.

Cheers


-- 
John Reese
LeetCode.net

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.