SlideShare a Scribd company logo
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 &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.
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] = &quot;http://pv3world.com/labs/PV3interactive/pv3world_cube.swf&quot;;  $loadswf[1] = &quot;http://pv3world.com/labs/rays/rays.swf&quot;;  $loadswf[2] = &quot;http://pv3world.com/labs/PV3Galaxy/galaxy_cubes_interactive.swf&quot;; $loadswf[3] = &quot;http://pv3world.com/labs/graffitiplane/graffiti_plane2.swf&quot;;  $displayswf.= &quot;<center>&quot;; $displayswf.= &quot;<embed src=\&quot;$loadswf[$num]\&quot; &quot;; $displayswf.= &quot;width =\&quot;300\&quot; height=\&quot;250\&quot; bgcolor=\&quot;#000000\&quot; border=\&quot;0\&quot;/>&quot;; $displayswf.= &quot;</a>&quot;; 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  [email_address]   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  [email_address] 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 [email_address] Founder of PHUG – Open Source Culture http://www.phug.ca

More Related Content

PPT
PHUG - Open Source Culture
PPTX
Giving back to WordPress - no code needed!
PDF
Agile Wordpress
PPTX
Basic Wordpress PPT
PPTX
Advantages & Disadvantages of Wordpress
PPTX
Professional WordPress Workflow - WPDay 2015
PPTX
Manage custom options pages in Wordpress
PPTX
Drupal vs wordpess
PHUG - Open Source Culture
Giving back to WordPress - no code needed!
Agile Wordpress
Basic Wordpress PPT
Advantages & Disadvantages of Wordpress
Professional WordPress Workflow - WPDay 2015
Manage custom options pages in Wordpress
Drupal vs wordpess

What's hot (20)

PPT
Word Press
ODP
Jared Whitlock Open Source In The Enterprise Plone @ Novell
PDF
Introduction to Drupal for Absolute Beginners
PDF
WordPress what is Wordpress
PDF
Introduction to Wordpress
PDF
Francesco Ciriaci Get Plone To Business!
PPTX
WordPress for Education PPT
PDF
Darci Hanning Top Ten Ways To Get Involved With The Plone Community
PPTX
Introduction to WordPress 2016
PDF
Apache Flex and the imperfect Web
PDF
Introduction to WordPress Class 1
ODP
KEY
A Beginner's Guide to WordPress - WordCamp Montreal 2012
PDF
Episode 1 mozilla contribution
PDF
wp cli- don’t fear the command line
KEY
A Beginner's Guide to Wordpress - WordCamp Montreal 2011
PPTX
NamesCon 2015 Wordpress Beginner Session
PPTX
WORDPRESS
PPTX
What are the advantages and disadvantages of wordpress
PPT
Pimp my Blog - Wordpress für Fortgeschrittene
Word Press
Jared Whitlock Open Source In The Enterprise Plone @ Novell
Introduction to Drupal for Absolute Beginners
WordPress what is Wordpress
Introduction to Wordpress
Francesco Ciriaci Get Plone To Business!
WordPress for Education PPT
Darci Hanning Top Ten Ways To Get Involved With The Plone Community
Introduction to WordPress 2016
Apache Flex and the imperfect Web
Introduction to WordPress Class 1
A Beginner's Guide to WordPress - WordCamp Montreal 2012
Episode 1 mozilla contribution
wp cli- don’t fear the command line
A Beginner's Guide to Wordpress - WordCamp Montreal 2011
NamesCon 2015 Wordpress Beginner Session
WORDPRESS
What are the advantages and disadvantages of wordpress
Pimp my Blog - Wordpress für Fortgeschrittene
Ad

Viewers also liked (20)

PDF
Cancer Gene Prioritization
PPS
T I P S P A R A D I S F R U T A R T U V I D A Mafalda
PDF
Encouraging Curriculum Change in the Netherlands
PDF
Portfolio PlusAnimations 2009 NL
PPT
2007 11 07 Presentazione Ir In Asm
DOCX
La graviola
DOCX
Sample data and other ur ls
ODP
Juc paris olivier lamy talk
PPTX
Web Science, SADI, and the Singularity
PDF
Eindadvies over-de-vernieuwing-van-de-examenprogrammas-maatschappijwetenschap...
PDF
Resultaten project lerarentekort Rotterdam juni 2011
PDF
Artikel opleiden in de school in Rotterdam
PPS
Menos errores en finanzas personales
KEY
Migrate, Grow, and Cultivate your Community
PPS
Recomenzar
PPT
An Introduction to Vanilla Forums - FSOSS 2010
PDF
Experiment Search
PPTX
Web Science - ISoLA 2012
PPS
¡LA BELLEZA DE LOS ARBOLES!
Cancer Gene Prioritization
T I P S P A R A D I S F R U T A R T U V I D A Mafalda
Encouraging Curriculum Change in the Netherlands
Portfolio PlusAnimations 2009 NL
2007 11 07 Presentazione Ir In Asm
La graviola
Sample data and other ur ls
Juc paris olivier lamy talk
Web Science, SADI, and the Singularity
Eindadvies over-de-vernieuwing-van-de-examenprogrammas-maatschappijwetenschap...
Resultaten project lerarentekort Rotterdam juni 2011
Artikel opleiden in de school in Rotterdam
Menos errores en finanzas personales
Migrate, Grow, and Cultivate your Community
Recomenzar
An Introduction to Vanilla Forums - FSOSS 2010
Experiment Search
Web Science - ISoLA 2012
¡LA BELLEZA DE LOS ARBOLES!
Ad

Similar to Making the Most of Plug-ins - WordCamp Toronto 2008 (20)

PPT
WordPress Plugin Development- Rich Media Institute Workshop
KEY
Intro to WordPress Plugins
PDF
15 Essential WordPress Plugins (and 5 That Will Just Blow Your Mind)
PPT
WordPress 2.5 Overview - Rich Media Institute
PDF
WordPress Plug-ins
PPT
WordPress Plugins You Cannot Live Without
PDF
Wordpress Plugin Development Short Tutorial
PDF
eMusic: WordPress in the Enterprise
PPTX
Plug Ins For the People
PPT
Wordpress Beyond A Blog Word Camp Toronto08
PPTX
Finding Useful Plugins: How To Extend WordPress Past a Simple Blog
PDF
36 WordPress Visual Design Plugins
PPTX
From WordPress With Love
PDF
WordPress + Flash = Lovers
PDF
Write your first WordPress plugin
PPT
WordPress plugins
PDF
WordPress Plugins (WordCamp Utah)
PDF
Bending word press to your will
PDF
Jason Tucker Wordpress 3rd Party Web Services
PPT
WordPress Websites: Making and Marketing with Jupiter Jim
WordPress Plugin Development- Rich Media Institute Workshop
Intro to WordPress Plugins
15 Essential WordPress Plugins (and 5 That Will Just Blow Your Mind)
WordPress 2.5 Overview - Rich Media Institute
WordPress Plug-ins
WordPress Plugins You Cannot Live Without
Wordpress Plugin Development Short Tutorial
eMusic: WordPress in the Enterprise
Plug Ins For the People
Wordpress Beyond A Blog Word Camp Toronto08
Finding Useful Plugins: How To Extend WordPress Past a Simple Blog
36 WordPress Visual Design Plugins
From WordPress With Love
WordPress + Flash = Lovers
Write your first WordPress plugin
WordPress plugins
WordPress Plugins (WordCamp Utah)
Bending word press to your will
Jason Tucker Wordpress 3rd Party Web Services
WordPress Websites: Making and Marketing with Jupiter Jim

More from Brendan Sera-Shriar (16)

PDF
How to A/B Test with WordPress: Conversions Aren’t Just for Landing Pages
PDF
Build a Responsive WordPress Theme with Zurbs Foundation Framework
PDF
SEO Is Dead. Long Live SEO - SEO Camp Montreal 2013
KEY
The Evolution of Live Preview Environment Design
KEY
Building a Mega Community with PressWork
KEY
Building a community around your blog v3
KEY
Building a Community Around your Blog 2 - Let the Comments be your Content!
KEY
Building a Community Around your Blog
PPT
Adding Vanilla to WordPress
PDF
It’s a WIN, WIN: ‘WordPress On Windows’
PPT
WordPress Development Confoo 2010
PPT
Wordpress To Go Democamp Mtl2009
PPT
Make Web, Not War - Open Source Microsoft Event
PPT
Red5 - PHUG Workshops
PPT
WordPress Theme Design - Rich Media Institute Workshop
PPT
Open Source Design - FSOSS 2008
How to A/B Test with WordPress: Conversions Aren’t Just for Landing Pages
Build a Responsive WordPress Theme with Zurbs Foundation Framework
SEO Is Dead. Long Live SEO - SEO Camp Montreal 2013
The Evolution of Live Preview Environment Design
Building a Mega Community with PressWork
Building a community around your blog v3
Building a Community Around your Blog 2 - Let the Comments be your Content!
Building a Community Around your Blog
Adding Vanilla to WordPress
It’s a WIN, WIN: ‘WordPress On Windows’
WordPress Development Confoo 2010
Wordpress To Go Democamp Mtl2009
Make Web, Not War - Open Source Microsoft Event
Red5 - PHUG Workshops
WordPress Theme Design - Rich Media Institute Workshop
Open Source Design - FSOSS 2008

Recently uploaded (20)

PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Encapsulation theory and applications.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Approach and Philosophy of On baking technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
KodekX | Application Modernization Development
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Network Security Unit 5.pdf for BCA BBA.
MYSQL Presentation for SQL database connectivity
Reach Out and Touch Someone: Haptics and Empathic Computing
Understanding_Digital_Forensics_Presentation.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
NewMind AI Monthly Chronicles - July 2025
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Encapsulation_ Review paper, used for researhc scholars
Encapsulation theory and applications.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Machine learning based COVID-19 study performance prediction
Approach and Philosophy of On baking technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
Review of recent advances in non-invasive hemoglobin estimation
KodekX | Application Modernization Development
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Chapter 3 Spatial Domain Image Processing.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
How UI/UX Design Impacts User Retention in Mobile Apps.pdf

Making the Most of Plug-ins - WordCamp Toronto 2008

  • 1. Making the Most of Plug-ins Brendan Sera-Shriar BackSpaceStudios.com
  • 2. 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
  • 3. 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.
  • 4. 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 &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.
  • 5. 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?
  • 6. 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 */  
  • 7. 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');
  • 8. 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');
  • 9. Writing WordPress Plug-ins Continued… Random Flash Function function randomflashloader(){ srand(microtime() *1000000); $num= rand (0,3); $loadswf = array(); $loadswf[0] = &quot;http://pv3world.com/labs/PV3interactive/pv3world_cube.swf&quot;; $loadswf[1] = &quot;http://pv3world.com/labs/rays/rays.swf&quot;; $loadswf[2] = &quot;http://pv3world.com/labs/PV3Galaxy/galaxy_cubes_interactive.swf&quot;; $loadswf[3] = &quot;http://pv3world.com/labs/graffitiplane/graffiti_plane2.swf&quot;; $displayswf.= &quot;<center>&quot;; $displayswf.= &quot;<embed src=\&quot;$loadswf[$num]\&quot; &quot;; $displayswf.= &quot;width =\&quot;300\&quot; height=\&quot;250\&quot; bgcolor=\&quot;#000000\&quot; border=\&quot;0\&quot;/>&quot;; $displayswf.= &quot;</a>&quot;; echo($displayswf); }  
  • 14. BackSpaceStudios Extended/Custom Plug-Ins Custom Admin – Current Post View
  • 15. BackSpaceStudios Extended/Custom Plug-Ins Custom Admin – DashView
  • 16. BackSpaceStudios Extended/Custom Plug-Ins 1 WordPress Install, 2 designs – Custom MU
  • 17. 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
  • 18. 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
  • 19. 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 [email_address] Launching soon http://www.flashpress.ca and http://www.flashpressdevelopers.com Another Great PHUG Project! Major contributors: Alex Nasser and Logan Aube of BNOTIONS.
  • 20. 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
  • 21. 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
  • 22. 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 [email_address] http://www.phug.ca
  • 23. 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
  • 24. 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
  • 25. Thank You Making the Most of Plug-ins Brendan Sera-Shriar, Owner BackSpaceStudios http://www.backspacestudios.com [email_address] Founder of PHUG – Open Source Culture http://www.phug.ca