website diff lib/fb/index.php @ rev 1245
typo
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Jan 07 22:28:17 2015 +0100 (2015-01-07) |
parents | 28f1deaca1b4 |
children | 8a07223a2644 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/lib/fb/index.php Wed Jan 07 22:28:17 2015 +0100 1.3 @@ -0,0 +1,99 @@ 1.4 +<?php 1.5 +// 1.6 +// SliTaz Social applications for Facebook. Just a tiny tool to help 1.7 +// spread and follow SliTaz activity. 1.8 +// 1.9 +// SliTaz FB page: http://facebook.com/slitaz 1.10 +// SliTaz SO URL : http://apps.facebook.com/slitaz-so/ 1.11 +// 1.12 +// NOTE: Any ideas for this app are welcome. We could have a comment box 1.13 +// to let users post to the official SliTaz Facebook wall. 1.14 +// 1.15 +function get_feed($feed_url) { 1.16 + $content = file_get_contents($feed_url); 1.17 + $x = new SimpleXmlElement($content); 1.18 + echo "<ul>"; 1.19 + foreach($x->channel->item as $entry) { 1.20 + echo " 1.21 + <li> 1.22 + <strong><a href='$entry->link' target='_TOP' 1.23 + title='$entry->title'>" . $entry->title . "</a></strong> 1.24 + </li>"; 1.25 + } 1.26 + echo "</ul>"; 1.27 +} 1.28 +?> 1.29 +<html> 1.30 +<head> 1.31 + <title>SliTaz SO Canvas</title> 1.32 + <script type="text/javascript" src="http://connect.facebook.net/en_US/all.js"></script> 1.33 + <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> 1.34 + <style type="text/css"> 1.35 + body { font: 13px sans-serif, vernada, arial; } 1.36 + h1 { color: #444; font-size: 150%; } 1.37 + h2 { color: #b64b22; font-size: 130%; } 1.38 + ul { color: #666; } 1.39 + </style> 1.40 +</head> 1.41 +<body> 1.42 + 1.43 +<!-- Facebook settings --> 1.44 +<div id="fb-root"></div> 1.45 +<script> 1.46 + FB.init({ appId:'123696844365041', cookie:true, xfbml:true }); 1.47 + FB.Canvas.setSize({ width: 700, height: 900 }); 1.48 +</script> 1.49 + 1.50 +<h1>SliTaz SO</h1> 1.51 +<p> 1.52 + Welcome to the SliTaz Social application for Facebook. 1.53 +</p> 1.54 + 1.55 +<h2>SliTaz on Facebook</h2> 1.56 +<p> 1.57 + To let you show your appreciation for the SliTaz project, we have an official 1.58 + <a href="http://facebook.com/slitaz" target="_TOP">Facebook page</a> 1.59 + where you can meet us and share stuff about SliTaz. Like the page to help 1.60 + spread the project! 1.61 +</p> 1.62 +<fb:like 1.63 + href="http://www.facebook.com/slitaz" 1.64 + show_faces="true" width="700"> 1.65 +</fb:like> 1.66 + 1.67 +<h2>SliTaz on Twitter</h2> 1.68 +<p> 1.69 + We have an official Twitter account providing small news about the 1.70 + project. Twitter posts are relayed on the official Facebook page to 1.71 + let you follow us from your favorite platform. Twitter news can also 1.72 + be read on the <a href="http://www.slitaz.org/" target="_TOP">SliTaz website</a> 1.73 + which is a central place for all SliTaz activity. You can use this 1.74 + button to Tweet about the SliTaz website: 1.75 +</p> 1.76 +<!-- Twitter Button --> 1.77 +<a href="http://twitter.com/share" class="twitter-share-button" 1.78 + data-url="http://www.slitaz.org/" 1.79 + data-text="SliTaz GNU/Linux" 1.80 + data-count="horizontal" 1.81 + data-via="slitaz">Tweet</a> 1.82 + 1.83 +<h2>SliTaz Community Network</h2> 1.84 +<p> 1.85 + The SliTaz Community Network aka 1.86 + <a href="http://scn.slitaz.org/" target="_TOP">SCN</a> is the place 1.87 + where SliTaz users and contributors share things about the project. We 1.88 + provide a fully featured social platform with stuff such as Blogs, 1.89 + Status updates and Artwork. Here are the latest posts on SCN: 1.90 +</p> 1.91 +<div> 1.92 + <?php 1.93 + echo "<div>\n"; 1.94 + get_feed("http://scn.slitaz.org/rss.xml"); 1.95 + echo "<p>Latest Status Updates</p>\n"; 1.96 + get_feed("http://scn.slitaz.org/statuses/recent/feed"); 1.97 + echo "</div>\n"; 1.98 + ?> 1.99 +</div> 1.100 + 1.101 +</body> 1.102 +</html>