Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION Another plugin example needed please
#1
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
Reply
#2
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.
Reply
#3
(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  
Reply
#4
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/sma...olkit/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-...nents/487/
http://get-simple.info/extend/plugin/sa-...suite/418/

There's also a redux of the example ("Hello World") plugin:
http://get-simple.info/forums/showthread.php?tid=7451
Reply
#5
Thanks, will take a look

Cheers
Reply
#6
I have added the hello world plugin to put github unittests repo
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#7
What are unit tests?
Reply
#8
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
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#9
@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.
Reply




Users browsing this thread: 1 Guest(s)