Fellow Wordpress enthusiasts,
I have written several Wordpress plugins for a client over the last few weeks. Through these, I have gained some techniques for creating widgets which work as non-widgets, and also have their own options pages. With this newfound knowledge, I have created a generic plugin template. It includes all the framework necessary for a displayable plugin (Something which will show up in a sidebar, template, or anywhere in a post using a token such as <!-- someplugin -->). The template is full of comments, so you shouldn’t have trouble figuring it out. You can download it here: Wordpress Plugin Template
11 Comments
does this work on pages like blogspot pages?
Dan,
This is totally different from the blogger idea of a template.
Trevor, you have commented out the portion declaring
$pluginpath.Please check and confirm.
hello,
I would be interested in something different, but still similar
I have several plugins that are not widgetized and as I am using wpmu not wp, meaning I don’t want to give users access to widgets that allow execution of php, I would love to find a widget template, where I could lets say insert the php code that should be executed in the sidebar (aka hardcoded) so I could make a widget for all those widgetless plugins…
I hope you understand my explanations and if you could help that would be great, if not thx anyway
Thanks dude – I’ve been meaning to getting around to writing one for fun. This is a great starting point.
thx for the mail but that was not really what I was looking for
I’ll try again:
in my former comment I said: `I am using wpmu not wp, meaning I don’t want to give users access to widgets that allow execution of php`
wpmu means, anybody can sign up for a blog and get his own blog. therefore I don’t want to use widgets that allows execution of php as any user could affect my whole system by executing dangerous php. Note that on the widget that executes php it says:
`Also note that this is isn’t exactly safe, as it’s just doing an eval() on whatever you put in there, so you have complete and full access, as does anybody else who can get to your admin screen.`
I am looking for an easy way to widgetize a plugin, lets say a certain plugin is activated and I need to put something like in my sidebar template to get its output, I’d like to be able to input/hardcode this into a “simple” widget, rename this widget to useful_function widget and make it available to my blog users so everybody can use this plugin which originally did not provide a widget.
I hope that was more clear this time and if you want to try this for yourself, go sign up for a testblog her: http://zice.ro but please delete it when finished with tests.
regards
ovidiu
This looks like fun
Thanks for taking the time to do this, it will help me a lot
Thanks for the translator. easy to implement and so far works like gangbusters.
Great Work, Trevor! This template really helps me. I have a question – does this template work with WP2.7.1?
hey. thanks alot for this, its proving very very helpful. there is one thing though, not sure if anyone has written this already already, but i think you need a “global $pluginpath;” in your header function.
Can you provide more information on other wordpress plugins, or do you have some resources you can share with us where we can find such useful stuff? Thanks.
8 Trackbacks/Pingbacks
[...] Wordpress Plugin Template (tags: wordpress plugin) [...]
[...] Wordpress Plugin Template includes all the framework necessary for a displayable plugin (Something which will show up in a sidebar, template, or anywhere in a post using a token such as ) [...]
[...] Trev’s Travels: …a generic plugin template. It includes all the framework necessary for a displayable plugin [...]
[...] Trev’s Travels » Blog » Wordpress Plugin Template (tags: wordpress plugin) [...]
[...] hideous it’s somehow cool’ navigation on his site, Trevor Creech has built just that. A straightforward template wordpress plugin with which to build any “I have created a generic plugin template. It includes all the [...]
[...] Wordpress Plugin Template includes all the framework necessary for a displayable plugin (Something which will show up in a sidebar, template, or anywhere in a post using a token such as ) [...]
[...] Wordpress Plugin Template includes all the framework necessary for a displayable plugin (Something which will show up in a sidebar, template, or anywhere in a post using a token such as ) [...]
[...] While working on the new Wrestling Addix Beta site, I was recently charged with the task to create a new wordpress plugin for the “Featured Videos” section of the site. When I realized that I needed to do this, I was a bit overwhelmed. I thought that making Wordpress plugins was for the real rockstar wordpress developers, but it turns out that almost anyone can do it. I found a nice site that had a wordpress plugin template already worked out for you (complete with admin backend!), so that made it a lot easier to get things done. If you’re interested, the site can be found here. [...]
Post a Comment