Pregunta

I want to create an custom table in the /administrator (back-end) with my plugin (or component/module, if plug-ins cannot do it for me), so I can populate it with some data that administrator can manage.

By table, I mean the table with form and default buttons (like filter ect). The example of such table added by VirtueMark2 component to Joomla: enter image description here

I have noticed some common elements of all such tables in Joomla back-end (like e.g. filter, sorting, same buttons, style, html structure), so I guess they are not written "from hand", but by some special commands/functions/methods called by plugin/component/module.

I already know how to add custom fields to my plugin, via XML file of that plugin, like:enter image description here

¿Fue útil?

Solución

Joomla supports a variety of extension types, Components, Modules and Plugins being the most commonly considered extensions. Other extension types supported by the Joomla Extension Manager are Templates and Libraries.

A Joomla Component provides "the main functional units of Joomla!; they can be seen as mini-applications". The Joomla Doc's website has a Component Development Portal that includes all the relevant tutorials for version 2.5.x of Joomla and the newer 3.x versions.

From your screenshots you're using Joomla 2.5.x.

When creating an extension, the Joomla installer will look for an install SQL file in which you can define the creation of your table and any standard records. Additionally, it will look for a PHP script to execute as part of the installation/update, called script.php which allows you to execute methods on, first install(), or subsequent update()'s and to run a preflight() check or a postflight() clean up. There's even an uninstall() method you can use to clean-up after the user decides to uninstall your extension.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top