Mantis

Where are the tutorials?

Posted by blastthisinferno 
Where are the tutorials?
July 16, 2008 04:57PM
I've been looking around for a howto or a tutorial on how to make a plugin for Mantis, but cannot find a decent one. Does anyone know of a good tutorial for a Mantis beginner?

I think I know how to set the environment up, but don't know where all the logic behind the plugin goes. Also I don't know how to make the plugin environment into a mantis.pkg file.

Any direction would be appreciated.
Re: Where are the tutorials?
July 16, 2008 05:11PM
That's hidden in the Wiki winking smiley

PS: The webserver could be hard to reach (so try again).

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Re: Where are the tutorials?
July 16, 2008 06:18PM
I've been to that page, but from what I gathered it shows me how to setup the plugin environment, not actually start on a plugin. I'll try looking again.

As for my packaging problem...here's a picture of showing what my Plugin Manager page looks like. I don't see how to package a plugin that I'm developing.

[img.photobucket.com]
Re: Where are the tutorials?
July 16, 2008 06:45PM
According to what I saw, you didn't start your plugin. The following page will help you to generate the required files to enable the packager on your plugin.

You can try by making an empty plugin, create the directory, use the previous link to generate the files and then go in the Plugins page (you'll see some changes).

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Re: Where are the tutorials?
July 16, 2008 08:39PM
My problem was that I copied a core.php file from another plugin and it had some require statements for files that didn't exist. That was making Mantis throw me HTTP 500 Internal Server Errors. I simply removed those require statements, and I now have the option to package my plugin. Thank you.

Now on to implementation, I'm assuming I put all my functions and logic I may need in index.php?
Re: Where are the tutorials?
July 16, 2008 10:31PM
The index.php of your plugin is called when you click on your plugin name in the Plugins page.
Generally I put the plugin configuration in the index.php page but you can put everything you want in this file (keep in mind that this is the file called from yhe Plugins page).
The index.php is called only if the user has the required level (by default administrator), so if you want to build a page with no access level check, you should make another page.

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Re: Where are the tutorials?
July 17, 2008 06:32PM
Could you help me understand this a bit better? The following bit of code is in index.php for pluginmanager:

<!-- Check Version -->
<tr <?php echo helper_alternate_class() ?>>
<td class="category" width="30%">
<span class="required">*</span><?php echo lang_get( &#039;plugins_pluginmanager_check_version&#039; ) ?>
</td>
<td width="70%">
<input type="checkbox" name="check_version"<?php check_checked( config_get( &#039;plugins_pluginmanager_check_version&#039;, PLUGINS_PLUGINMANAGER_CHECK_VERSION_DEFAULT ), ON ) ?> />
</td>
</tr>

1. Where is this helper_alternate_class()?
2. Where is lang_get and config_get?
3. How does name="check_version" work?
4. I noticed that &#039;plugins_pluginmanager_check_version&#039; is very close to $s_plugins_pluginmanager_check_version in strings_english.txt, how does "Check Version" get displayed?

If there is a link that I can go to in order to find this information out, please let me know.
Re: Where are the tutorials?
July 17, 2008 07:19PM
You should take a look in the MANTIS_ROOT/core directory to understand how Mantis works before starting a plugin.

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Re: Where are the tutorials?
July 18, 2008 04:28PM
Thank you Vincent, as weird as it sounds, sometimes I need someone to state the obvious. To answer my own questions in case some other poor soul finds this thread useful:

1. in MANTIS_ROOT/core/helper_api.php.
2. lang_get is in MANTIS_ROOT/core/lang_api.php
config_get is in MANTIS_ROOT/core/config_api.php
3. I don&#039;t know how this works in relation to Mantis.
4. lang_get() calls another function named lang_load() which then inserts an &#039;s_&#039; to the beginning of the string, and adds it to $g_lang_strings.

If I&#039;m wrong in any way, don&#039;t hesitate in correcting me.
Re: Where are the tutorials?
July 18, 2008 04:37PM
Quote
blastthisinferno
3. I don&#039;t know how this works in relation to Mantis.

That&#039;s HTML. It is not related to Mantis.

Vincent


Mantis: 1.1.0, 1.1.5, 1.1.1
PHP: 5.0.4
SQL: MySQL 5.0.19
OS: Linux

Please complete your signature with your environment informations.
Enable skype notification here
Sorry, only registered users may post in this forum.

Click here to login



Online Users

Guests: 17
Record Number of Users: 1 on April 02, 2023
Record Number of Guests: 115 on November 09, 2023
Top Users
Hébergeur : Morinie.Fr