august 10th, 2009 dave ross word press

18
External Search Dave Ross Fox Valley Computing Professionals

Upload: straight-north

Post on 19-May-2015

883 views

Category:

Technology


2 download

DESCRIPTION

Fox Valley Computing Professionals Presentation Series, Social Networks for Business, Part 2

TRANSCRIPT

Page 1: August 10th, 2009 Dave Ross Word Press

External SearchDave Ross

Fox Valley Computing Professionals

Page 2: August 10th, 2009 Dave Ross Word Press

Dave RossLead Developer at Xeno

Media

WordPress plugin developer

davidmichaelross.com

Page 3: August 10th, 2009 Dave Ross Word Press

Client wanted aportal site for

annualtrade show

Page 4: August 10th, 2009 Dave Ross Word Press

Built using

Page 5: August 10th, 2009 Dave Ross Word Press

Live from the show floor!

•Twitter

•Flickr photos

•YouTube videos

•Department’s blog

•Daily blog updates

Page 6: August 10th, 2009 Dave Ross Word Press
Page 7: August 10th, 2009 Dave Ross Word Press

Even had a mobile version

Page 8: August 10th, 2009 Dave Ross Word Press

Everything was great.

Except search.

Page 9: August 10th, 2009 Dave Ross Word Press

WordPress searchonly searches

WordPress content

Page 10: August 10th, 2009 Dave Ross Word Press

[gallery]

Page 11: August 10th, 2009 Dave Ross Word Press

Dave’s External Search

Page 12: August 10th, 2009 Dave Ross Word Press
Page 13: August 10th, 2009 Dave Ross Word Press
Page 14: August 10th, 2009 Dave Ross Word Press

How it works:

Page 15: August 10th, 2009 Dave Ross Word Press

Flickr API

• $response = file_get_contents(“http://api.flickr.com/services/rest/?method=flickr.photos.search&format=php_serial&api_key=HGS5JH8HDQQJKC3&user_id=1234567@99&text=cat&per_page=6”);

• $results = unserialize($response)

• $photos = $results['photos']['photo'];

• foreach($photos as $index=>$photo)

Page 16: August 10th, 2009 Dave Ross Word Press

YouTube & Twitter APIs

• YouTube uses RSS, Twitter uses ATOM

• Use Magpie RSS (comes with WordPress)

• $feedURL = “http://gdata.youtube.com/feeds/api/users/username/uploads?q=cat”

• $feedURL = “http://search.twitter.com/search.atom?q=cat%20from%3Ausername”

• $feed = fetch_rss($feedURL);

• foreach($feed->items as $item)

• Twitter has an API limit

Page 17: August 10th, 2009 Dave Ross Word Press

Cache searches topreserve resources.

Be a good citizen.

Page 18: August 10th, 2009 Dave Ross Word Press

Available soonhttp://wordpress.org/extend/plugins/daves-external-search/