website annotate libs/fb/index.php @ rev 752
Add SliTaz SO for Facebook (tiny app/tool to help spread SliTaz)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Jan 24 00:08:58 2011 +0100 (2011-01-24) |
parents | |
children | 6155a05e7efe |
rev | line source |
---|---|
pankso@752 | 1 <?php |
pankso@752 | 2 // |
pankso@752 | 3 // SliTaz Social applications for Facebook. Just a tiny tools to help |
pankso@752 | 4 // spread and follow SliTaz activity. |
pankso@752 | 5 // |
pankso@752 | 6 // NOTE: Any ideas for this apps is welcome. We could have a comment box |
pankso@752 | 7 // to let users post to the official SliTaz Facebook wall. |
pankso@752 | 8 // |
pankso@752 | 9 function get_feed($feed_url) { |
pankso@752 | 10 $content = file_get_contents($feed_url); |
pankso@752 | 11 $x = new SimpleXmlElement($content); |
pankso@752 | 12 echo "<ul>"; |
pankso@752 | 13 foreach($x->channel->item as $entry) { |
pankso@752 | 14 echo " |
pankso@752 | 15 <li> |
pankso@752 | 16 <strong><a href='$entry->link' target='_TOP' |
pankso@752 | 17 title='$entry->title'>" . $entry->title . "</a></strong> |
pankso@752 | 18 </li>"; |
pankso@752 | 19 } |
pankso@752 | 20 echo "</ul>"; |
pankso@752 | 21 } |
pankso@752 | 22 ?> |
pankso@752 | 23 <html> |
pankso@752 | 24 <head> |
pankso@752 | 25 <title>SliTaz SO Canvas</title> |
pankso@752 | 26 <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> |
pankso@752 | 27 <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> |
pankso@752 | 28 <style type="text/css"> |
pankso@752 | 29 body { font: 13px sans-serif, vernada, arial; } |
pankso@752 | 30 h1 { color: #444; font-size: 150%; } |
pankso@752 | 31 h2 { color: #b64b22; font-size: 130%; } |
pankso@752 | 32 ul { color: #666; } |
pankso@752 | 33 </style> |
pankso@752 | 34 </head> |
pankso@752 | 35 <body> |
pankso@752 | 36 |
pankso@752 | 37 <!-- Facebook settings --> |
pankso@752 | 38 <div id="fb-root"></div> |
pankso@752 | 39 <script> |
pankso@752 | 40 FB.init({ appId:'123696844365041', cookie:true, xfbml:true }); |
pankso@752 | 41 FB.Canvas.setSize({ width: 700, height: 900 }); |
pankso@752 | 42 </script> |
pankso@752 | 43 |
pankso@752 | 44 <h1>SliTaz SO</h1> |
pankso@752 | 45 <p> |
pankso@752 | 46 Welcome to the SliTaz Social application for Facebook. |
pankso@752 | 47 </p> |
pankso@752 | 48 |
pankso@752 | 49 <h2>SliTaz on Facebook</h2> |
pankso@752 | 50 <p> |
pankso@752 | 51 To let you show you love for the SliTaz project, we have an official |
pankso@752 | 52 <a href="http://facebook.com/slitaz" target="_TOP">Facebook page</a> |
pankso@752 | 53 where you can meet us and share about SliTaz. Like the page to help |
pankso@752 | 54 spread the project! |
pankso@752 | 55 </p> |
pankso@752 | 56 <fb:like |
pankso@752 | 57 href="http://www.facebook.com/slitaz" |
pankso@752 | 58 show_faces="true" width="700"> |
pankso@752 | 59 </fb:like> |
pankso@752 | 60 |
pankso@752 | 61 <h2>SliTaz on Twitter</h2> |
pankso@752 | 62 <p> |
pankso@752 | 63 We have an official Twitter account providing small news about the |
pankso@752 | 64 project. Twitter posts are relayed on the official Facebook page to |
pankso@752 | 65 let you follow us from your favorite platform. Twitter news can also |
pankso@752 | 66 be read on the <a href="http://www.slitaz.org/" target="_TOP">SliTaz website</a> |
pankso@752 | 67 witch is a central place for all SliTaz activity. You can use this |
pankso@752 | 68 button to Tweet about SliTaz website: |
pankso@752 | 69 </p> |
pankso@752 | 70 <!-- Twitter Button --> |
pankso@752 | 71 <a href="http://twitter.com/share" class="twitter-share-button" |
pankso@752 | 72 data-url="http://www.slitaz.org/" |
pankso@752 | 73 data-text="SliTaz GNU/Linux" |
pankso@752 | 74 data-count="horizontal" |
pankso@752 | 75 data-via="slitaz">Tweet</a> |
pankso@752 | 76 |
pankso@752 | 77 <h2>SliTaz Community Network</h2> |
pankso@752 | 78 <p> |
pankso@752 | 79 The SliTaz Community Network aka |
pankso@752 | 80 <a href="http://scn.slitaz.org/" target="_TOP">SCN</a> is the place |
pankso@752 | 81 where SliTaz users and contributors share about the all project. We |
pankso@752 | 82 provide a full featured social platform with stuff such as Blogs, |
pankso@752 | 83 Statuses updates and Artwork. Here are the last post on SCN: |
pankso@752 | 84 </p> |
pankso@752 | 85 <div> |
pankso@752 | 86 <?php |
pankso@752 | 87 echo "<div>\n"; |
pankso@752 | 88 get_feed("http://scn.slitaz.org/rss.xml"); |
pankso@752 | 89 echo "<p>Latest Status Updates</p>\n"; |
pankso@752 | 90 get_feed("http://scn.slitaz.org/statuses/recent/feed"); |
pankso@752 | 91 echo "</div>\n"; |
pankso@752 | 92 ?> |
pankso@752 | 93 </div> |
pankso@752 | 94 |
pankso@752 | 95 </body> |
pankso@752 | 96 </html> |