MyBB Community Forums

Full Version: Test Plugin for new developers
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
(2011-12-23, 04:35 PM)euantor Wrote: [ -> ]
(2011-12-23, 04:08 PM)Dylan M. Wrote: [ -> ]I missed Pavemen was talking about core templates there. What I was talking about would be fore custom templates. Like frostschultz, I prefer to keep such core template edits to a minimum. I normally just add a variable, and then have my template code in a custom template that I eval into that var.

Isn't that the suggested method? I've never been one to insert tons of new stuff into existing templates - instead preferring to create new templates. The only problem then, however, is that most plugins just use the Global Templates set (my own included) which makes the template listing become quite un-neat. If we could agree some kind of template naming convention (such as {plugin_name}_{template_name}), then maybe we could group templates in the Global Templates set by plugin name to make finding templates easier?

You can already do this. Yet another thing that we just need documentation for!
(2011-12-23, 05:57 PM)Dylan M. Wrote: [ -> ]
(2011-12-23, 04:35 PM)euantor Wrote: [ -> ]
(2011-12-23, 04:08 PM)Dylan M. Wrote: [ -> ]I missed Pavemen was talking about core templates there. What I was talking about would be fore custom templates. Like frostschultz, I prefer to keep such core template edits to a minimum. I normally just add a variable, and then have my template code in a custom template that I eval into that var.

Isn't that the suggested method? I've never been one to insert tons of new stuff into existing templates - instead preferring to create new templates. The only problem then, however, is that most plugins just use the Global Templates set (my own included) which makes the template listing become quite un-neat. If we could agree some kind of template naming convention (such as {plugin_name}_{template_name}), then maybe we could group templates in the Global Templates set by plugin name to make finding templates easier?

You can already do this. Yet another thing that we just need documentation for!

Really? I had no idea. We definitely need that documented as I could definitely use it!
(2011-12-23, 07:01 PM)euantor Wrote: [ -> ]
(2011-12-23, 05:57 PM)Dylan M. Wrote: [ -> ]
(2011-12-23, 04:35 PM)euantor Wrote: [ -> ]
(2011-12-23, 04:08 PM)Dylan M. Wrote: [ -> ]I missed Pavemen was talking about core templates there. What I was talking about would be fore custom templates. Like frostschultz, I prefer to keep such core template edits to a minimum. I normally just add a variable, and then have my template code in a custom template that I eval into that var.

Isn't that the suggested method? I've never been one to insert tons of new stuff into existing templates - instead preferring to create new templates. The only problem then, however, is that most plugins just use the Global Templates set (my own included) which makes the template listing become quite un-neat. If we could agree some kind of template naming convention (such as {plugin_name}_{template_name}), then maybe we could group templates in the Global Templates set by plugin name to make finding templates easier?

You can already do this. Yet another thing that we just need documentation for!

Really? I had no idea. We definitely need that documented as I could definitely use it!

Well, I recently created my first template that does this. I use sid = -2 (which means the templates are actually inserted into each theme instead of into global templates) and added my own templategroup. It works as expected. In addition this leaves "modified" templates there, so if you do your templates the way I did in my plugin... it'll rule Big Grin

I'll write a short user tut for this soon as well.
Yay for insomnia (Since I wrote the first plugin using this method when I couldn't sleep) Toungue
http://community.mybb.com/thread-87205.html
Thanks Dylan. I already replied to it with my own commentary :-)

Cheers Dylan. I kind of cheated already though by looking at pavemen's MyShowcase plugin to see how he was doing things (hope you don't mind pavemen).
not at all, i welcome driving innovation ;-)
Pages: 1 2 3 4