Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Making the Most of Plug-ins - WordCamp Toronto 2008


Published on

Exploring the power and benefits of using WordPress plugins, how to build a WordPress plugin in a few simple steps, plus a good solid list of plugin resources.

Published in: Technology, Art & Photos
  • Be the first to comment

  • Be the first to like this

Making the Most of Plug-ins - WordCamp Toronto 2008

  1. 1. Making the Most of Plug-ins Brendan Sera-Shriar
  2. 2. Making the Most of Plug-ins <ul><ul><ul><ul><ul><li>Extending WordPress </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Customizing WordPress Plug-ins </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Tips On Writing WordPress Plug-ins </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Writing WordPress Plug-ins </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Essential WordPress Plug-ins </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>FlashPress by PHUG </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>WordPress Plug-in Competition </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Resources </li></ul></ul></ul></ul></ul>
  3. 3. Extending WordPress <ul><li>“ Plug-ins can extend WordPress to do almost anything you can imagine.” </li></ul><ul><li> </li></ul><ul><li>Well almost! There is a limit to what a plug-in can do. Quite often in order to achieve the desired functionality there is some customization of code required. </li></ul><ul><li>WordPress plug-ins help enhance and simplify the blogging experience of advanced users , especially web developers and designers. </li></ul>
  4. 4. Customizing WordPress Plug-ins <ul><li>Not all plug-ins work out of the box! A good majority of powerful and essential plug-ins will require some customization. This means CODE! </li></ul><ul><ul><li>A blogger with basic to expert knowledge of HTML/CSS, and for a lot plugins, PHP and MySQL experience is highly recommended. </li></ul></ul><ul><ul><li>A blogger who needs to display complex content in posts and pages like displaying and colorizing code snippets, running custom scripts only on certain posts or pages, incorporating custom web forms, etc. </li></ul></ul><ul><ul><li>A blogger who knows what they’re doing - The default configuration of WordPress is too &quot;fool-proof&quot;. For example, with the visual editor turned on, it will add unexpected indents and line breaks even inside <pre> tags. Additionally, it blocks you from adding <div> tags, automatically &quot;sanitizing&quot; them into <p> tags. </li></ul></ul>
  5. 5. Tips On Writing WordPress Plug-ins <ul><li>When all else fails! You don’t have to be a PHP or WordPress expert, anyone can create useful WordPress plug-ins without being a hacker. </li></ul><ul><ul><li>Check out the Source of Plug-ins </li></ul></ul><ul><ul><li>One of the most helpful ways to improve your coding is by checking out the other plug-ins source code. Each plug-in author has a completely unique style of coding, and this can vary from super-advanced like the Google Sitemap Generator plug-in to the incredibly-simple like the AskApache Search Engine Verify plug-in. </li></ul></ul><ul><ul><li>Research with a Purpose </li></ul></ul><ul><ul><li>Instead of just picking plug-ins at random to reverse-engineer, surf the WordPress plug-in repository for unique plug-ins that perform a specific function or feature. For example; If you wanted to learn about MySQL search and replace code for WordPress, check out the source code of the excellent Search Regex plugin. </li></ul></ul><ul><ul><li>Use a plug-in Template </li></ul></ul><ul><ul><li>Any good Web Developer knows the extreme value of using modular, templateable code. CSS, XHTML, javascript, and PHP, all are geared towards templates. WordPress is one of the mack-daddies of templates, so why not use a template for plug-in files? </li></ul></ul>
  6. 6. Writing WordPress Plug-ins <ul><li>Conventions </li></ul><ul><li>For each new plug-in I create a folder in the /wp-content/plugins/pluginname/ and then in that folder I create the main plug-in file with the same name as the folder + .php so the plug-in file is /wp-content/plugins/pluginname/pluginname.php. </li></ul><ul><li>randomflashloader.php header stuff </li></ul><ul><li><?php </li></ul><ul><li>/* </li></ul><ul><li>Plugin Name: RandomFlashLoader </li></ul><ul><li>Plugin URI: </li></ul><ul><li>Description: Randomly loads a flash file from your wp-content/plugins/randomflashloader/swf direcotry </li></ul><ul><li>Version: 1.0 </li></ul><ul><li>Author: GeoffPalin, Brendan Sera-Shriar </li></ul><ul><li>Author URI: </li></ul><ul><li>*/   </li></ul>
  7. 7. Writing WordPress Plug-ins <ul><li>Continued… </li></ul><ul><li>/* </li></ul><ul><li>== Installation ==   </li></ul><ul><li>Put Your Steps Here </li></ul><ul><li>/* </li></ul><ul><li>/* </li></ul><ul><li>Add GPL License Here </li></ul><ul><li>*/ </li></ul><ul><li>Add Option Menu </li></ul><ul><li>add_action('admin_menu', 'random_flash_loader_options_setup'); </li></ul>
  8. 8. Writing WordPress Plug-ins <ul><li>Continued… </li></ul><ul><li>Setup the Options Page </li></ul><ul><li>function random_flash_loader_options_setup() </li></ul><ul><li>{ </li></ul><ul><li>global $random_flash_loader_data; </li></ul><ul><li>add_options_page($random_flash_loader_data['Name'], 'RandomFlashLoader', 8, basename(__FILE__), 'random_flash_loader_page'); </li></ul><ul><li>} </li></ul><ul><li>Register the Activation and Deactivation Hooks </li></ul><ul><li>register_deactivation_hook(__FILE__, 'random_flash_loader_deactivate'); </li></ul><ul><li>register_activation_hook(__FILE__, 'random_flash_loader_activate'); </li></ul>
  9. 9. Writing WordPress Plug-ins <ul><li>Continued… </li></ul><ul><ul><li>Random Flash Function </li></ul></ul><ul><ul><li>function randomflashloader(){ </li></ul></ul><ul><ul><li>srand(microtime() *1000000); </li></ul></ul><ul><ul><li>$num= rand (0,3); </li></ul></ul><ul><ul><li>$loadswf = array(); </li></ul></ul><ul><ul><li>$loadswf[0] = &quot;;; </li></ul></ul><ul><ul><li>$loadswf[1] = &quot;;; </li></ul></ul><ul><ul><li>$loadswf[2] = &quot;;; </li></ul></ul><ul><ul><li>$loadswf[3] = &quot;;; </li></ul></ul><ul><ul><li>$displayswf.= &quot;<center>&quot;; </li></ul></ul><ul><ul><li>$displayswf.= &quot;<embed src=&quot;$loadswf[$num]&quot; &quot;; </li></ul></ul><ul><ul><li>$displayswf.= &quot;width =&quot;300&quot; height=&quot;250&quot; bgcolor=&quot;#000000&quot; border=&quot;0&quot;/>&quot;; </li></ul></ul><ul><ul><li>$displayswf.= &quot;</a>&quot;; </li></ul></ul><ul><ul><li>echo($displayswf); </li></ul></ul><ul><ul><li>}   </li></ul></ul>
  10. 10. BackSpaceStudios Extended/Custom Plug-Ins Custom Logins
  11. 11. BackSpaceStudios Extended/Custom Plug-Ins Login Redirect
  12. 12. BackSpaceStudios Extended/Custom Plug-Ins Random Flash Loader
  13. 13. BackSpaceStudios Extended/Custom Plug-Ins Event Calendar
  14. 14. BackSpaceStudios Extended/Custom Plug-Ins Custom Admin – Current Post View
  15. 15. BackSpaceStudios Extended/Custom Plug-Ins Custom Admin – DashView
  16. 16. BackSpaceStudios Extended/Custom Plug-Ins 1 WordPress Install, 2 designs – Custom MU
  17. 17. Essential WordPress Plug-ins <ul><li>Ad Rotator - </li></ul><ul><li>Advanced Random Post - </li></ul><ul><li>AFD Admin Theme - </li></ul><ul><li>Akismet - </li></ul><ul><li>All in One SEO Pack - </li></ul><ul><li>Article Templates - </li></ul><ul><li>Audio player - </li></ul><ul><li>Blogroll Page - </li></ul><ul><li>Different Posts Per Page - </li></ul><ul><li>Disable WordPress Core Update - </li></ul><ul><li>Executable PHP widget - </li></ul><ul><li>Kimili Flash Embed - </li></ul><ul><li>Lightbox 2 - </li></ul><ul><li>Maintenance Mode - </li></ul><ul><li>myStatus - </li></ul><ul><li>NextGEN Gallery - </li></ul>
  18. 18. Essential WordPress Plug-ins <ul><li>Continued… </li></ul><ul><li>p2pConverter - </li></ul><ul><li>Post2pdf - </li></ul><ul><li>PXS Mail Form - </li></ul><ul><li>QuickTime Embed - </li></ul><ul><li>Random Featured Post - </li></ul><ul><li>Riffly Video/Audio Comments - </li></ul><ul><li>Role Manager - </li></ul><ul><li>Widget Logic - </li></ul><ul><li>WordPress Database Backup - </li></ul><ul><li>Wordpress Download Monitor - </li></ul><ul><li>WP Cache - </li></ul><ul><li>WP e-commerce - </li></ul><ul><li>WP Polls - </li></ul><ul><li>WP SpamFree - </li></ul><ul><li>WP-Sticky - </li></ul><ul><li>WP Shopping Cart - </li></ul>
  19. 19. <ul><li>Bridging Two Worlds! </li></ul><ul><li>FlashPress is an extension to WordPress, which allows Flash designers/developers to use the WordPress engine to communicate with a Flash site. The use of the WordPress CMS in Flash overcomes many obstacles involved with maintaining and updating a Flash site. </li></ul><ul><li>The FlashPress development thread is restricted to contributors of this group. If you would like to contribute to this project please contact us at [email_address] </li></ul><ul><li>Launching soon and </li></ul><ul><li>Another Great PHUG Project! </li></ul><ul><li>Major contributors: Alex Nasser and Logan Aube of BNOTIONS. </li></ul>
  20. 20. WordPress Plug-in Competition <ul><li>Time to break out that old code! </li></ul><ul><li>One of the important rules that we have is that the plug-ins should be new, i.e. no updates to already existing plug-ins. One great place to get inspired is WordPress Ideas ( ). WordPress Ideas is a place where the people from the WordPress Community, both users and developers vote for what they would like included in WordPress. Some have been implemented, while some may actually appear in future versions and still others that may not be. So, why not make a plug-in to accommodate for the latter two? </li></ul><ul><li> </li></ul>
  21. 21. <ul><li>FREE PHUG Workshops </li></ul><ul><li>Current Scheduled Workshops: </li></ul><ul><li>FlashPress – Flash management Solutions by PHUG </li></ul><ul><li>Tuesday Oct 14 2008 @ 630pm </li></ul><ul><li>Drupal </li></ul><ul><li>James walker </li></ul><ul><li>Tuesday Oct 28 2008 @ 630pm </li></ul><ul><li>Papervision3D - Using Papervision3D and Parallax to build environments </li></ul><ul><li>Ryan Andal - Owner/Technical Director, Zero Pattern </li></ul><ul><li>Tuesday Nov 5 2008 @ 630pm </li></ul><ul><li>Firefox UI Design </li></ul><ul><li>Mike Connor – Mozilla Firefox </li></ul><ul><li>Tuesday Nov 18 2008 @ 630pm </li></ul><ul><li> </li></ul>
  22. 22. <ul><li>Look forward to these other great presentations: </li></ul><ul><li>Flash Media Server and BeatMaker </li></ul><ul><li>Dan Zen – Inventor and Professor at Sheridan College </li></ul><ul><li>Open Source in the Real World </li></ul><ul><li>Rick Mason - Now Magazine </li></ul><ul><li>Adopting Opens Source Commercially </li></ul><ul><li>Geoff Whitlock - Owner of Lifecapture Interactive Inc. </li></ul><ul><li>We would like to thank some of our sponsors and affiliates: </li></ul><ul><li>PHUG, Lifecapture Interactive Inc., BackSpaceStudios, Mozilla Firefox,,, </li></ul><ul><li>BNOTIONS, FITC ( Flash In The Can ), RMI ( Rich Media Institute ) </li></ul><ul><li>If you would like to present or no someone who does we are still taking applications. Please send us an </li></ul><ul><li>email at [email_address] </li></ul><ul><li> </li></ul>
  23. 23. <ul><li>WordPress2.5 with Brendan Sera-Shriar </li></ul><ul><li>A Full day of WordPress2.5, focused on design and development. </li></ul><ul><li>We'll cover the essentials of setup, installation, and management. </li></ul><ul><li>We'll learn how to build custom themes using CSS, PHP, and image </li></ul><ul><li>architecture. We'll also jump into custom code and template files, best </li></ul><ul><li>practices for design and management, integrating Flash, and how to build </li></ul><ul><li>and install WP and custom plug-ins. Time: 10:00am - 6:00pm (~8 classroom hours) </li></ul><ul><li>Price: $99 </li></ul><ul><li>Location: Toronto </li></ul><ul><li> </li></ul>
  24. 24. Resources <ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul><ul><ul><li> </li></ul></ul>
  25. 25. Thank You <ul><li>Making the Most of Plug-ins </li></ul><ul><li>Brendan Sera-Shriar, Owner BackSpaceStudios </li></ul><ul><li> </li></ul><ul><li>[email_address] </li></ul><ul><li>Founder of PHUG – Open Source Culture </li></ul><ul><li> </li></ul>