250 likes | 388 Views
Making the Most of Plug-ins Brendan Sera-Shriar BackSpaceStudios.com. Making the Most of Plug-ins. Extending WordPress Customizing WordPress Plug-ins Tips On Writing WordPress Plug-ins Writing WordPress Plug-ins Essential WordPress Plug-ins FlashPress by PHUG
E N D
Making the Most of Plug-ins Brendan Sera-Shriar BackSpaceStudios.com
Making the Most of Plug-ins Extending WordPress Customizing WordPress Plug-ins Tips On Writing WordPress Plug-ins Writing WordPress Plug-ins Essential WordPress Plug-ins FlashPress by PHUG WordPress Plug-in Competition Resources
Extending WordPress “Plug-ins can extend WordPress to do almost anything you can imagine.” -WordPress.org 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. WordPress plug-ins help enhance and simplify the blogging experience of advanced users, especially web developers and designers.
Customizing WordPress Plug-ins 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! • A blogger with basic to expert knowledge of HTML/CSS, and for a lot plugins, PHP and MySQL experience is highly recommended. • 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. • A blogger who knows what they’re doing - The default configuration of WordPress is too "fool-proof". 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 "sanitizing" them into <p> tags.
Tips On Writing WordPress Plug-ins 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. • Check out the Source of Plug-ins 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. • Research with a Purpose 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. • Use a plug-in Template 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?
Writing WordPress Plug-ins Conventions 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. randomflashloader.php header stuff <?php /* Plugin Name: RandomFlashLoader Plugin URI: http://www.backspacestudois.com/ Description: Randomly loads a flash file from your wp-content/plugins/randomflashloader/swf direcotry Version: 1.0 Author: GeoffPalin, Brendan Sera-Shriar Author URI: http://www.backspacestudios.com */
Writing WordPress Plug-ins Continued… /* == Installation == Put Your Steps Here /* /* Add GPL License Here */ Add Option Menu add_action('admin_menu', 'random_flash_loader_options_setup');
Writing WordPress Plug-ins Continued… Setup the Options Page function random_flash_loader_options_setup() { global $random_flash_loader_data; add_options_page($random_flash_loader_data['Name'], 'RandomFlashLoader', 8, basename(__FILE__), 'random_flash_loader_page'); } Register the Activation and Deactivation Hooks register_deactivation_hook(__FILE__, 'random_flash_loader_deactivate'); register_activation_hook(__FILE__, 'random_flash_loader_activate');
Writing WordPress Plug-ins Continued… Random Flash Function function randomflashloader(){ srand(microtime() *1000000); $num= rand (0,3); $loadswf = array(); $loadswf[0] = "http://pv3world.com/labs/PV3interactive/pv3world_cube.swf"; $loadswf[1] = "http://pv3world.com/labs/rays/rays.swf"; $loadswf[2] = "http://pv3world.com/labs/PV3Galaxy/galaxy_cubes_interactive.swf"; $loadswf[3] = "http://pv3world.com/labs/graffitiplane/graffiti_plane2.swf"; $displayswf.= "<center>"; $displayswf.= "<embed src=\"$loadswf[$num]\" "; $displayswf.= "width =\"300\" height=\"250\" bgcolor=\"#000000\" border=\"0\"/>"; $displayswf.= "</a>"; echo($displayswf); }
BackSpaceStudios Extended/Custom Plug-Ins Custom Logins
BackSpaceStudios Extended/Custom Plug-Ins Login Redirect
BackSpaceStudios Extended/Custom Plug-Ins Random Flash Loader
BackSpaceStudios Extended/Custom Plug-Ins Event Calendar
BackSpaceStudios Extended/Custom Plug-Ins Custom Admin – Current Post View
BackSpaceStudios Extended/Custom Plug-Ins Custom Admin – DashView
BackSpaceStudios Extended/Custom Plug-Ins 1 WordPress Install, 2 designs – Custom MU
Essential WordPress Plug-ins • Ad Rotator - http://kpumuk.info/projects/wordpress-plugins/ad-rotator • Advanced Random Post - http://www.danielesalamina.it/advanced-random-post • AFD Admin Theme - http://aenonfiredesign.com/blog/afd-wordpress2-admin-theme • Akismet - http://akismet.com/ • All in One SEO Pack - http://semperfiwebdesign.com • Article Templates - http://www.bin-co.com/tools/wordpress/plugins/article_templates • Audio player - http://www.1pixelout.net/code/audio-player-wordpress-plugin • Blogroll Page - http://www.byte-me.org • Different Posts Per Page - http://www.maxblogpress.com/plugins/dppp • Disable WordPress Core Update - http://lud.icro.us/disable-wordpress-core-update • Executable PHP widget - http://wordpress.org/extend/plugins/php-code-widget • Kimili Flash Embed - http://www.kimili.com/plugins/kml_flashembed • Lightbox 2 - http://www.stimuli.ca/lightbox • Maintenance Mode - http://sw-guide.de/wordpress/plugins/maintenance-mode/ • myStatus - http://eightface.com/code/wp-mystatus • NextGEN Gallery - http://alexrabe.boelinger.com/?page_id=80
Essential WordPress Plug-ins Continued… • p2pConverter - http://www.briandgoad.com/blog/p2pConverter • Post2pdf - http://wordpress.org/extend/plugins/post2pdf • PXS Mail Form - http://www.phrixus.co.uk/pxsmail • QuickTime Embed - http://www.channel-ai.com/blog/plugins/quicktime-embed • Random Featured Post - http://www.mydollarplan.com/random-featured-post-plugin • Riffly Video/Audio Comments - http://riffly.com • Role Manager - http://www.im-web-gefunden.de/wordpress-plugins/role-manager • Widget Logic - http://freakytrigger.co.uk/wordpress-setup • WordPress Database Backup - http://www.ilfilosofo.com/blog/wp-db-backup • Wordpress Download Monitor - http://wordpress.org/extend/plugins/download-monitor • WP Cache - http://mnm.uib.es/gallir/wp-cache-2 • WP e-commerce - http://www.instinct.co.nz/e-commerce • WP Polls - http://lesterchan.net/portfolio/programming/php • WP SpamFree - http://www.hybrid6.com/webgeek/plugins/wp-spamfree • WP-Sticky - http://lesterchan.net/portfolio/programming/php • WP Shopping Cart - http://www.instinct.co.nz
Bridging Two Worlds! 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. The FlashPress development thread is restricted to contributors of this group. If you would like to contribute to this project please contact us at info@phug.ca Launching soon http://www.flashpress.ca and http://www.flashpressdevelopers.com Another Great PHUG Project! Major contributors: Alex Nasser and Logan Aube of BNOTIONS.
WordPress Plug-in Competition Time to break out that old code! 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 ( http://wordpress.org/extend/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? http://weblogtoolscollection.com/pluginblog
FREE PHUG Workshops Current Scheduled Workshops: FlashPress – Flash management Solutions by PHUG Tuesday Oct 14 2008 @ 630pm Drupal James walker Tuesday Oct 28 2008 @ 630pm Papervision3D - Using Papervision3D and Parallax to build environments Ryan Andal - Owner/Technical Director, Zero Pattern Tuesday Nov 5 2008 @ 630pm Firefox UI Design Mike Connor – Mozilla Firefox Tuesday Nov 18 2008 @ 630pm http://www.phug.ca
Look forward to these other great presentations: Flash Media Server and BeatMaker Dan Zen – Inventor and Professor at Sheridan College Open Source in the Real World Rick Mason - Now Magazine Adopting Opens Source Commercially Geoff Whitlock - Owner of Lifecapture Interactive Inc. We would like to thank some of our sponsors and affiliates: PHUG, Lifecapture Interactive Inc., BackSpaceStudios, Mozilla Firefox, WordPress.org, Drupal.org, BNOTIONS, FITC ( Flash In The Can ), RMI ( Rich Media Institute ) If you would like to present or no someone who does we are still taking applications. Please send us an email at workshops@phug.ca. http://www.phug.ca
WordPress2.5 with Brendan Sera-Shriar A Full day of WordPress2.5, focused on design and development. We'll cover the essentials of setup, installation, and management. We'll learn how to build custom themes using CSS, PHP, and image architecture. We'll also jump into custom code and template files, best practices for design and management, integrating Flash, and how to build and install WP and custom plug-ins.Time: 10:00am - 6:00pm (~8 classroom hours) Price: $99 Location: Toronto http://richmediainstitute.com/wordpress2.5_2
Resources • http://www.backspacestudios.com • http://www.phug.ca • http://wordpress.org/extend/plugins/about • http://codex.wordpress.org/Writing_a_Plugin • http://www.ndesign-studio.com • http://www.webdesignerwall.com • http://bloggingsquared.com • http://automattic.com • http://www.blog.spoongraphics.co.uk • http://www.45royale.com/blog • http://www.webappers.com • http://www.wppotential.com • http://opensource.org/licenses/gpl-license.php • http://www.gnu.org/copyleft/gpl.html • http://creativecommons.org
Thank You Making the Most of Plug-ins Brendan Sera-Shriar, Owner BackSpaceStudios http://www.backspacestudios.com brendan@backspacestudios.com Founder of PHUG – Open Source Culture http://www.phug.ca