website view lib/fb/index.php @ rev 1344

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