Julien of Webinventif has created a shortcode generator for WordPress. Shortcode is like BBcode in that it provides the ability to use shortcuts to execute a block of code, rather than having to write out the block of code time and time again. Julien has made use of the new API calls within WordPress and with his shortcode generator, makes it easy as 1,2,3 to create your own custom shortcode. Although everything has been written in French, this generator looks promising. If anyone could translate this generator into English, I think there would be many WordPresser’s who would be grateful.
Here is a screencast showcasing the generator in action.
Shortcode generator from WebInventif.fr on Vimeo
Jeffro, That looks like a really easy way to create Shortcodes. I have updated my plugin generator to include shortcodes; it adds the hooks and function calls but it does expect a bit more knowledge to use than this tool as it leaves the developer to fill in the details themselves.
The wordpress shortcodes will work only by default on posts and pages. You could add this statement add_filter(‘widget_text’, ‘do_shortcode’); to your wordpress themes functions.php file to make the shortcodes work in the Text Widget. You will need to replace “do_shortcode” with the name of your shortcode function.
To use your shortcodes outside of posts, pages, and the text widget, you could always call your shortcode function directly like this:
[code]
$text = yourShortCodeFunction(‘[your shortcode tag here]’);
echo $text;
[/code]
The above code will allow you to use wordpress shortcodes anywhere in your blog. I’m not sure if the code will display here, always have problems posting code.
Very informative blog, lots of information.
Thanks a lot for this tip. I use shortcodes when im programming in C#, all you do is press tab twice and it prints out the rest of the code. I usually use it for loops and such but when i want to do a segment of BBCode this will come in handy.
Which would be better, this or Stumbleupon’s su.pr plugin?