Forums | Mahara Community
Developers
/
Adding item to drag and drop content on the view page
04 November 2011, 4:31
Hi
I created an artefact plugin and I am trying to make it available on the view blocks so users can add it to their page content (like the Journals - blogs - or Profile), but for some reason it is not showing up as a tab. Have missed a step somewhere? I've got Mahara 1.4 installed and I basically need to make my plugin name appear on the drag and drop content blocks?
Thanks,
Regards,
Dantina
06 November 2011, 12:50
Hello Dantina,
Take a look at the My CPD plugin at https://wiki.mahara.org/index.php/Plugins This plugin is an artefact plugin and a block plugin. It will put a menu item into the Content tab.
Cheers
Kristina
06 November 2011, 22:00
Thanks Kristina.
This is a great example but what I'd like to do is achieve the same result and add an icon for my plugin to the General tab so it can be dragged into a Page view - but so far I can't figure out how.
Thanks again for your help.
Regards,
Dan
07 November 2011, 4:49
Hello Dan,
The CPD plugin does add a block icon to drag into the page. You could also check out any of Gregor's plugins for that (on the same wiki page).
You may also find some more information at https://wiki.mahara.org/index.php/Developer_Area/Plugins especially by following the tutorial link.
Cheers
Kristina
07 November 2011, 5:46
Thank you so much Kristina.
Just found my plugin icon has now shown up on the tabs after I installed the CPD plugin. Can only guess the plugin fixed the problem (probably what you were trying to tell me all along :)).
Anyway, really appreciate your help.
Regards,
Dan
07 November 2011, 14:01
Hello Dan,
Mhh. You shouldn't really have to install another plugin so that your icon shows up in Mahara. I was suggesting to adapt the code of an existing plugin which places the icon properly.
What does your artefact plugin do? Would you be willing to share it with other Mahara users? You could add a link to it yourself on the plugins page in the wiki as your mahara.org login works there as well.
Cheers
Kristina
08 November 2011, 3:06
Hi Kristina,
That's what I thought and I did start by adapting another plugin to get where I am now. I've no idea why it is suddenly working but I am sure I probably fixed a bug somewhere without knowing what it is.
I'd be happy to share but I am not sure it is going to be useful to the community or in context. It is a a food and exercise diary with a calorie analysis tool. I guess it could be an example of how Mahara may be used (and customised) in other contexts which is not exactly rooted in education.
I'll give the idea some thought but it is still work in progress.
Dan
08 November 2011, 14:04
Hello Dan,
Great when bugs get fixed on the way.
Plugins are not put into Mahara core. Therefore, they can really be anything. Not everybody needs all the ones that are currently on the Plugins page, but they are probably all used by a few.
The more diverse plugins people create the more the flexibility of the system is seen.
Cheers
Kristina
10 August 2013, 3:40
Hi Dan,
Could you care explaining me how you did that. I am stuck in this particular place.
Cheers,
Aarif
15 August 2013, 18:55
Hi Aarif,
Which part of the block development process are you stuck on? Getting it to show up as an icon on the sidebar?
If you've defined a block with a get_categories() method, I believe it should just show up. You may need to go to your site's admin/extensions/plugins.php page and click the "install" link next to your plugin first. Check out Gregor's (somewhat old) Block plugin tutorial for more info: https://wiki.mahara.org/index.php/Developer_Area/Development_Tutorials/Basic_blocktype_plugin
I have been meaning to update the developer documentation for a while now.
Cheers,
Aaron