A plugin for Joomla

145 views
Skip to first unread message

Poornima Alexander

unread,
Jul 24, 2012, 5:02:28 AM7/24/12
to joomla-...@googlegroups.com
Hi, can someone please explain me what does the xml file does in a plugin? What parts are mandatory in coding?

Thank you very much...

MOHAMED AKRAM

unread,
Jul 24, 2012, 5:05:57 AM7/24/12
to joomla-...@googlegroups.com
<?xml version="1.0" encoding="utf-8"?>
<extension version="2.5" type="plugin" group="search">
    <name>plg_search_scanpdf</name> //here plg is prefix and after plg_ u have to define the plugin group, _and then name of the plugin

    <author>Lankacom Services</author>
    <creationDate>July 2012</creationDate>
    <copyright>Copyright (C) 2012 - 2020 . All rights reserved.</copyright>
    <license>Commercial; see LICENSE.txt</license>
    <authorEmail>ak...@lankacom.net</authorEmail>
    <authorUrl>www.lankacom.net</authorUrl>
    <version>2.5.0</version>
    <description>Extends Default Search option</description>
    <files>
        <filename plugin="scanpdf">scanpdf.php</filename>
        <filename>index.html</filename>
    </files>

</extension>

On Tue, Jul 24, 2012 at 2:32 PM, Poornima Alexander <poorni...@gmail.com> wrote:
Hi, can someone please explain me what does the xml file does in a plugin? What parts are mandatory in coding?

Thank you very much...

--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-cms/-/Nflh5tyB8r4J.
To post to this group, send an email to joomla-...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-cm...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-cms?hl=en-GB.

Poornima Alexander

unread,
Jul 24, 2012, 5:32:28 AM7/24/12
to joomla-...@googlegroups.com
Mohamed Akram
Are only these need to be made mandatory? 

Thank you very much... 

MOHAMED AKRAM

unread,
Jul 24, 2012, 5:36:49 AM7/24/12
to joomla-...@googlegroups.com
if you want you can add plugin parameters in the following way, this is a example

    <config>
        <fields name="params">
            <fieldset name="basic">
                <field name="enabled" type="radio" default="0" label="Enable" description="If you enable this, make sure you have added a password. You will not be able to access the /administrator folder without your password!">
                    <option value="1">JYES</option>
                    <option value="0">JNO</option>
                </field>
                <field name="password" type="password" size="50" default="" label="Password" description="This is your password. You will use it to access your /administrator folder. Dont Forget It" />
                <field name="mode" type="radio" default="0" label="Mode" description="This is the authentication mode. If you use PHP as an Apache module, use the HTTP Authentication (more security). ">
                    <option value="1">HTTP Authentication</option>
                    <option value="0">URL Hashkey</option>
                </field>
            </fieldset>
        </fields>
        </config>


--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-cms/-/cIE39K1VvhUJ.

Poornima Alexander

unread,
Jul 24, 2012, 5:37:49 AM7/24/12
to joomla-...@googlegroups.com
@  Mohamed Akram 
I have seen that most of the xml files of plugins and modules contain a tag called <config>. Please tell me what that is...

Thank you very much...

Poornima Alexander

unread,
Jul 24, 2012, 5:42:12 AM7/24/12
to joomla-...@googlegroups.com
@  Mohamed Akram 
I am new to developing plugins for Joomla. This is the first time that i am going to develop a plugin.
Can you please give me a brief description for params for a plugin?

Thank you very much...

On Tuesday, July 24, 2012 9:02:28 AM UTC, Poornima Alexander wrote:

MOHAMED AKRAM

unread,
Jul 24, 2012, 5:47:50 AM7/24/12
to joomla-...@googlegroups.com
Here is an example for a search plugin in joomla documentation,
http://docs.joomla.org/Creating_a_search_plugin

actually you can define any number of params for any joomla extension, assume, you want develop a search plugin where you want allow the administrator to define the search limit, and based on the defined limit via the back end you can show the result,

in your php code you can get the params set for a plugin like this,

$plugin = JPluginHelper::getPlugin('system', 'yourplugin name');
$this->params = new JParameter($plugin->params);

$search_limit = $this->params->get('search_limit')


--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-cms/-/dElmZuMbN88J.

MOHAMED AKRAM

unread,
Jul 24, 2012, 5:48:33 AM7/24/12
to joomla-...@googlegroups.com

MOHAMED AKRAM

unread,
Jul 24, 2012, 5:49:36 AM7/24/12
to joomla-...@googlegroups.com
$plugin = JPluginHelper::getPlugin('plugin_group', 'yourplugin name');

and here is another tutariol for plugin development
http://www.informit.com/articles/article.aspx?p=1858258&seqNum=7

fornandakishore

unread,
Jul 24, 2012, 5:49:23 AM7/24/12
to joomla-...@googlegroups.com
Hello Poornima,

I suggest you to have a look on this tutorial :

In this everything has been explain clear and nice. I learned from this document and build some plug-ins.

Hope this will help you.
 
---------------------

Nanda Kishore. M

Software Engineer 

http://php-desk.blogspot.com

Mobile: + 91 98499 71144 




On Tue, Jul 24, 2012 at 3:12 PM, Poornima Alexander <poorni...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.

Poornima Alexander

unread,
Jul 24, 2012, 6:16:50 AM7/24/12
to joomla-...@googlegroups.com
The plugin i intend to develop is like this.
User is allowed to select videos or audios from a list of items. Once the user selects one item the video/audio is played inside the site. (without redirecting to youtube or any other site). I hope to facilitate the user to upload such videos and audios into the database also.
Yet i still cannot decide where should i start. 
Can you please give me an idea on how to start this?

Thank you very much...

On Tuesday, 24 July 2012 09:02:28 UTC, Poornima Alexander wrote:

b2z

unread,
Jul 24, 2012, 3:14:40 PM7/24/12
to joomla-...@googlegroups.com
Hi Alexander.

I think that for such tasks you will need not a plugin, but a component. And the best way to start is to take a paper and write down some base ideas how it should work, what db schemas will it use and so on.

Also look at docs.joomla.org in Developers section, there is a tutorial of creating basic component.

Best regards,
Dmitry.

b2z

unread,
Jul 24, 2012, 3:15:07 PM7/24/12
to joomla-...@googlegroups.com

Nick Savov

unread,
Jul 24, 2012, 7:44:10 PM7/24/12
to joomla-...@googlegroups.com
Hi guys,

Sorry, but this list is for Joomla Core CMS developer and discussion of
how to improve the CMS, therefore this discussion is off-topic.

You should instead ask this question on the Joomla General Developer list.
Here's the direct link to it:
https://groups.google.com/forum/?fromgroups#!forum/joomla-dev-general

Hope this helps!

Kind regards,
Nick

> Hi, can someone please explain me what does the xml file does in a plugin?
> What parts are mandatory in coding?
>
> Thank you very much...
>
> --
> You received this message because you are subscribed to the Google Groups
> "Joomla! CMS Development" group.
> To view this discussion on the web, visit
> https://groups.google.com/d/msg/joomla-dev-cms/-/Nflh5tyB8r4J.

fornandakishore

unread,
Jul 25, 2012, 12:11:07 AM7/25/12
to joomla-...@googlegroups.com
I hope to achieve your task you need to create a component or else you need to use an existing components and customize .



 
---------------------

Nanda Kishore. M

Software Engineer 

http://php-desk.blogspot.com

Mobile: + 91 98499 71144 




--
You received this message because you are subscribed to the Google Groups "Joomla! CMS Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-cms/-/kyrXf75Sj_sJ.
Reply all
Reply to author
Forward
0 new messages