Widgets: Making Your Site Great and Letting Others Help
Who Am I?
What is a Widget?
Why Bother with Widgets – Part 1 They let you put interesting things in your side bar.  Whoppee!!  Re-usable User-Friendly...
What do I need to start the fun?
Built In Widgets The Text Widget
Extending the Text Widget
Adding AdSense? Use a Widget!
Built In Widgets  The RSS Widget
Installing New Widgets Zip File
Favorite Widgets Twitter Tools ( http://alexking.org/projects/wordpress ) Twitter Tracker ( http://wordpress.org/extend/pl...
Why Use/Make a Widget?
Case Study - SuperPages.com
SuperPages.com – Widget Options
SuperPages.com Search Results
Case Study - Constant-Content Personalized Dynamic Content Search Engine  Friendly Text link
You Could Have a Widget!
Badges and Dynamic Content Basic Widget = one link, one picture <a href=' http://www.reddotcampaign.ca '> <img src=' http:...
When Should I Build a  Wordpress Widget Best Times For a Widget: <ul><ul><ul><li>When you want it to be super easy for peo...
When you need server side processing
When you want access to Data in other pieces of data in your blog </li></ul></ul></ul>
Build Your Own Widget A widget can consist of just one file “my-widget.php” File has five basic section: <ul><ul><ul><li>I...
Install Section
Uninstall Section
Control Section
Display Section  </li></ul></ul></ul>
Build Your Own Widget Initialization Section  <ul><ul><ul><li>Register The Installation Code so that Wordpress knows how t...
Upcoming SlideShare
Loading in …5
×

Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria

1,325 views
1,255 views

Published on

A brief presentation that works through the basics of Wordpress Widgets, looks into the benefits of widgets and then transitions to how to start building your own widget.

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,325
On SlideShare
0
From Embeds
0
Number of Embeds
31
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • We&apos;re all here cause we&apos;re interested in Wordpress, but wordpress is just a communication platform. What is the underlying reason why you&apos;re interested in Wordpress? What is the message that you&apos;re trying to communicate? What do you hope to be able to accomplish by using Wordpress?
  • I was trained up as a Mechanical Engineer at Uvic, I&apos;ve been in Victoria ever since, which adds up to 11 years. I now spend my days managing Constant-Content, which is a consignment shop for freelance writers, where people looking to purchase content can find unique, original un-indexed content. If you&apos;re a freelance writer or a publisher I&apos;d encourage you to check it out! Constant-Content is a department of RevenueWire Inc. which is an affiliate network that specializes in facilitating online publishers sell download-able products. So I also spend a good portion of my time working on improving the ways that we help affiliates sell products online. When I first heard there was going to be a WordCamp in Victoria, Paul originally suggested that I speak on monetizing your blog, but we&apos;ll have to save that for next time ;-) Who can guess where this picture was taken? Prize – Swag Bag?
  • Widgets are a lot like plugins, the key difference is that they have always have a display section that fits automatically Widgets are installed in the same way as plugins.
  • There are a lot of avenues for you to hack on. Show of hands how many of you have started hacking on a wordpress template and started adding things into the sidebar because it seems like the easiest way to make changes? I&apos;ve done it! If you&apos;re coming from a position of being comfortable with HTML it makes sense to you to just get in there and start hacking things together. Using Widgets is much better. Widgets are reusable, they nicely transfer from one theme to another. If all of your widebar information is in Widgets than when your mood changes and it&apos;s time for a new look for your blog. All the information that you&apos;ve stored in widgets will nicely transfer from one template to the next.
  • There definitely two aspects to this talk, one is for the people who are looking to make their sites more interesting and add things to their site that they want to promote. And then there&apos;s the side of presentation dedicated to you who have something to promote. For the people
  • Widget Went live on July 13th, 2009 and at this point we&apos;ve got over a hundred results showing up each with a link to our home page. One time time involved in creating the widget but once we had created it we basically have free ride as people find and install the widget Good example of a you project where both parties win. The users win because they get to have easy access to their information and are in fact advertising for themselves and us. And secondarily we win because we get a whole slew of new links to our site from a variety of different domains.
  • Send people brainstorming about what they have on their site that they could share. What part of their hopes for their site do they hope to share?
  • Do&apos;s Provide Widget on the same site it is linking to. Create Widgets thematically related to site where possible. Provide clear legal terms stating links are included. Provide layout/color options. Keep your branding minimal. Provide easy-to-install code. Promote Widgets. Don&apos;ts Don’t hide links. Don’t link to some other website. Don’t bury mentions of link in hard-to-read legalease. Don’t include ads, popups. Don’t force webpages to redirect or hijack sites.
  • Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria

    1. 1. Widgets: Making Your Site Great and Letting Others Help
    2. 2. Who Am I?
    3. 3. What is a Widget?
    4. 4. Why Bother with Widgets – Part 1 They let you put interesting things in your side bar. Whoppee!! Re-usable User-Friendly It's Harder to Break Your Site
    5. 5. What do I need to start the fun?
    6. 6. Built In Widgets The Text Widget
    7. 7. Extending the Text Widget
    8. 8. Adding AdSense? Use a Widget!
    9. 9. Built In Widgets The RSS Widget
    10. 10. Installing New Widgets Zip File
    11. 11. Favorite Widgets Twitter Tools ( http://alexking.org/projects/wordpress ) Twitter Tracker ( http://wordpress.org/extend/plugins/twitter-tracker/ ) FlickrRSS ( http://eightface.com/wordpress/flickrrss/ )
    12. 12. Why Use/Make a Widget?
    13. 13. Case Study - SuperPages.com
    14. 14. SuperPages.com – Widget Options
    15. 15. SuperPages.com Search Results
    16. 16. Case Study - Constant-Content Personalized Dynamic Content Search Engine Friendly Text link
    17. 17. You Could Have a Widget!
    18. 18. Badges and Dynamic Content Basic Widget = one link, one picture <a href=' http://www.reddotcampaign.ca '> <img src=' http://www.reddotcampaign.ca/badge.png ' alt='Red Dot Campaign' /> </a> Dynamic Widget = Personalized Dynamic Content There's no limit to how sophisticated your widget can be Check out www.widgetbox.com for some ideas! <script type=&quot;text/javascript&quot; src=&quot;http://cdn.widgetserver.com/syndication/subscriber/InsertWidget.js&quot;></script><script>if (WIDGETBOX) WIDGETBOX.renderWidget('1e046775-132f-4fbe-8c64-f8b5b8529ffe');</script><noscript>Get the <a href=&quot;http://www.widgetbox.com/widget/eco-calculator&quot;>Eco-Calculator</a> widget and many other <a href=&quot;http://www.widgetbox.com/&quot;>great free widgets</a> at <a href=&quot;http://www.widgetbox.com&quot;>Widgetbox</a>! Not seeing a widget? (<a href=&quot;http://docs.widgetbox.com/using-widgets/installing-widgets/why-cant-i-see-my-widget/&quot;>More info</a>)</noscript>
    19. 19. When Should I Build a Wordpress Widget Best Times For a Widget: <ul><ul><ul><li>When you want it to be super easy for people
    20. 20. When you need server side processing
    21. 21. When you want access to Data in other pieces of data in your blog </li></ul></ul></ul>
    22. 22. Build Your Own Widget A widget can consist of just one file “my-widget.php” File has five basic section: <ul><ul><ul><li>Initialization
    23. 23. Install Section
    24. 24. Uninstall Section
    25. 25. Control Section
    26. 26. Display Section </li></ul></ul></ul>
    27. 27. Build Your Own Widget Initialization Section <ul><ul><ul><li>Register The Installation Code so that Wordpress knows how to install the widget
    28. 28. Register The Uninstallation Code so that Wordpress knows how to remove the widget
    29. 29. Register the Initialization Code so that Wordpress knows what to do when a widget is needed by the front end or backend. </li></ul></ul></ul>
    30. 30. Build Your Own Widget Installation Section <ul><ul><ul><li>If your plugin requires that some data be saved in the database, like a user name, you can add the parts that you want to save as name-value pairs
    31. 31. add_option(&quot;vic_user_id&quot;, '', '', 'yes');
    32. 32. Beautifully simple :-) </li></ul></ul></ul>
    33. 33. Build Your Own Widget Uninstallation Section <ul><ul><ul><li>Clean up after yourself!
    34. 34. Remove the name-value pairs that you created
    35. 35. delete_option(&quot;vic_user_id&quot;, '', '', 'yes');
    36. 36. Beautifully simple :-) </li></ul></ul></ul>
    37. 37. Build Your Own Widget Control Section <ul><ul><ul><li>This is the portion where we build the interface for administration
    38. 38. This allows you to alter the values stored in the database name value pairs.
    39. 39. Usually it consists of a form that is displayed and some code to save the new values.
    40. 40. update_option(&quot;vic_user_id&quot;, $_POST['vic_id']); </li></ul></ul></ul>
    41. 41. Build Your Own Widget The Display Section <ul><ul><ul><li>Grab the necessary data from the database
    42. 42. Do what ever processing you need to do
    43. 43. Echo out the HTML
    44. 44. get_option(&quot;vic_user_id&quot;);
    45. 45. ...coding magic...
    46. 46. echo $HTMLCode; </li></ul></ul></ul>
    47. 47. This is Really Quite Easy Announcing the Victoria Wordcamp Plugin! Get it at : http://www.jrichards.ca/labs/victoria-wordcamp.zip
    48. 48. Thank You! Photo Credits: - ducks.jpg by andyp uk - sharing.jpg by jonathan mcintosh - symbiotic.jpg by Picture Taker 2 - easy.jpg by Jason Gulledge

    ×