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