0
Embed Mobypicture videos using [shortcodes]




      a small walkthrough in building [shortcodes] into plugins
About me


                   Timan Rebel

                       Entrepreneur
              Social Media Consultant (Rebe...
Moby allows you to..
Using any phone
Maxime Verhagen
   Dutch Minister
 of foreign affairs
Ilse de Lange
Dutch Singer &
     Songwriter
Sharing is part of everyday life
Moby can send media to Wordpress




but sometimes you just want to embed an image, video or audio file
Wrote a plugin for that




and to demonstrate [shortcodes] at #wordcampnl
Wrote a plugin for that




      You've Been Hit By
Wrote a plugin for that




     You've Been Struck By
Wrote a plugin for that




      A Smooth Criminal
Wrote a plugin for that




and to demonstrate [shortcodes] at #wordcampnl
Tip: Use Google Analytics Campaign vars




http://wordpress.rebelic.nl/<plugin name>?
utm_source=wordpress&
utm_medium=pl...
What are shortcodes?
Embed a Moby video
Embed a Moby video




See my Moby video
Request video through Moby API




Don’t use Snoopy class, it’s deprecated
Don’t use curl, it might not be available
• postMedia                   • postComment
    • postMediaUrl                • getComments

    • getThumb               ...
REST API (get/post)

k (api key)

t (tiny url code)

action=getMediaInfo

format=xml
<?xml version="1.0"?>

<media>
   <type>video</type>
   <url_thumbnail>http://vid.mobypicture.com/ccb3b610aa3eade07bef239a...
<?xml version="1.0"?>




Try not to use PHP5+ only functions
Hard with XML, but simple parsing can be done with regexp
Almost finished, let’s return
Custom width and height




[mobyvideo width=1900 height=1080]http://moby.to/c69r6t[/mobyvideo]
Custom width and height
Done!
Thank you for sharing
Timan Rebel
                 @timanrebel

presentation and plugin code on Mobypicture.com
Wordcampnl - Embed Mobypicture using shortcodes
Upcoming SlideShare
Loading in...5
×

Wordcampnl - Embed Mobypicture using shortcodes

1,497

Published on

Presentation I gave at #wordcampnl about a plugin I wrote for embedding Mobypicture content into a blogpost/page by using shortcodes

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

  • Be the first to like this

No Downloads
Views
Total Views
1,497
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Transcript of "Wordcampnl - Embed Mobypicture using shortcodes"

    1. 1. Embed Mobypicture videos using [shortcodes] a small walkthrough in building [shortcodes] into plugins
    2. 2. About me Timan Rebel Entrepreneur Social Media Consultant (Rebelic) Business Development and technical assistance for Mobypicture WordPress fanatic plugin and theme development (TheNextWeb, TechCrunch, FeedForward and my own)
    3. 3. Moby allows you to..
    4. 4. Using any phone
    5. 5. Maxime Verhagen Dutch Minister of foreign affairs
    6. 6. Ilse de Lange Dutch Singer & Songwriter
    7. 7. Sharing is part of everyday life
    8. 8. Moby can send media to Wordpress but sometimes you just want to embed an image, video or audio file
    9. 9. Wrote a plugin for that and to demonstrate [shortcodes] at #wordcampnl
    10. 10. Wrote a plugin for that You've Been Hit By
    11. 11. Wrote a plugin for that You've Been Struck By
    12. 12. Wrote a plugin for that A Smooth Criminal
    13. 13. Wrote a plugin for that and to demonstrate [shortcodes] at #wordcampnl
    14. 14. Tip: Use Google Analytics Campaign vars http://wordpress.rebelic.nl/<plugin name>? utm_source=wordpress& utm_medium=plugin& utm_campaign=<plugin name>
    15. 15. What are shortcodes?
    16. 16. Embed a Moby video
    17. 17. Embed a Moby video See my Moby video
    18. 18. Request video through Moby API Don’t use Snoopy class, it’s deprecated Don’t use curl, it might not be available
    19. 19. • postMedia • postComment • postMediaUrl • getComments • getThumb • searchPosts • getThumbUrl • getMediaInfo • createUser • checkCredentials Request API key at api.mobypicture.com
    20. 20. REST API (get/post) k (api key) t (tiny url code) action=getMediaInfo format=xml
    21. 21. <?xml version="1.0"?> <media> <type>video</type> <url_thumbnail>http://vid.mobypicture.com/ccb3b610aa3eade07bef239a487f0dd5_thumbnail <url_square>http://vid.mobypicture.com/ccb3b610aa3eade07bef239a487f0dd5_square.jpg</u <url_full>http://vid.mobypicture.com/ccb3b610aa3eade07bef239a487f0dd5_full.jpg</url_full> <url_video>http://vid.mobypicture.com/ccb3b610aa3eade07bef239a487f0dd5.mp4</url_video <original_width>848</original_width> <original_height>480</original_height> <processing>0</processing> </media>
    22. 22. <?xml version="1.0"?> Try not to use PHP5+ only functions Hard with XML, but simple parsing can be done with regexp
    23. 23. Almost finished, let’s return
    24. 24. Custom width and height [mobyvideo width=1900 height=1080]http://moby.to/c69r6t[/mobyvideo]
    25. 25. Custom width and height
    26. 26. Done!
    27. 27. Thank you for sharing
    28. 28. Timan Rebel @timanrebel presentation and plugin code on Mobypicture.com
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×