GetSimple Support Forum
QUESTION Another plugin example needed please - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8)
+--- Thread: QUESTION Another plugin example needed please (/showthread.php?tid=8328)



Another plugin example needed please - cobber - 2016-04-12

Morning all

Just read the documentation for the creation of a plugin (hello world)

I think I get general idea, however it would be good to download and play with other simple examples so I can get a better grasp.

In the hello world example it says that a I add a menu to the side bar using the following.

Code:
# add a link in the admin tab 'theme'
add_action('theme-sidebar','createSideMenu',array($thisfile,'Hello World description'));

however no menu item appears, or have I misunderstood?

many thanks


RE: Another plugin example needed please - datiswous - 2016-04-12

Works for me. When you activate the plugin, you see a sidemenu item called "Hello World description" under section Theme. Btw. that code part is not in the example file when you download it from the wiki page, which is a bit strange.


RE: Another plugin example needed please - cobber - 2016-04-13

(2016-04-12, 22:55:52)datiswous Wrote: Works for me. When you activate the plugin, you see a sidemenu item called "Hello World description" under section Theme. Btw. that code part is not in the example file when you download it from the wiki page, which is a bit strange.

you're right. I misunderstood. 
I thought a button link would appear within the plugins section on the right hand side. Doh!

Do you know of any good resources to learn plugin development as I'm just learning?

Thanks for taking the time to reply. Blush  


RE: Another plugin example needed please - datiswous - 2016-04-13

Not really. My plan is to first learn programming. Javascript and then php. Then maybe make some plugins. (yeah, long term plans)

If you already program, you might be interested in some of the plugin frameworks/toolkits that have been made over the years. Also, there are some other potential helpfull plugins.

Plugin frameworks/toolkits:
http://get-simple.info/extend/plugin/small-plugin-toolkit/531/
http://get-simple.info/extend/plugin/itemmanager/936/

Other useful plugins for development:
http://get-simple.info/extend/plugin/plugin-insight/13/
http://get-simple.info/extend/plugin/sa-hook-components/487/
http://get-simple.info/extend/plugin/sa-development-suite/418/

There's also a redux of the example ("Hello World") plugin:
http://get-simple.info/forums/showthread.php?tid=7451


RE: Another plugin example needed please - cobber - 2016-04-15

Thanks, will take a look

Cheers


RE: Another plugin example needed please - shawn_a - 2016-04-15

I have added the hello world plugin to put github unittests repo


RE: Another plugin example needed please - datiswous - 2016-04-15

What are unit tests?


RE: Another plugin example needed please - shawn_a - 2016-04-16

unit tests are predefined tests for testing code, we do not have a unit tester but I just use the same repo for now to stick stuff in, it has sample plugins , user.xml files etc

all our repos are here
https://github.com/GetSimpleCMS

There are some forks of our dependancies for testing and bug patching, you can ignore them


RE: Another plugin example needed please - lokothodida - 2016-04-20

@cobber: Can you give examples of what things you think should/want to be explained in plugin development? I've tried writing tutorials for plugin development in the past, but they lost focus pretty quickly because I wasn't sure what needs explaining first, what need explaining the most, and how much programming knowledge to assume. Also, different plugin authors have different ways of structuring their plugin, and I'm not entirely sure whose is best to emulate.