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