return; } $link_attributes = $xml->channel->link->attributes(); if ($link_attributes['rel'] == 'hub') { $hub_url = $link_attributes['href']; } $callback_url = urlencode(SMOB_ROOT . "callback"); $feed = urlencode($remote_user_feed); $result = SMOBTools::do_curl($hub_url, $postfields = "hub.mode=unsubscribe&hub.verify=async&hub.callback={$callback_url}&hub.topic={$feed}"); // all good -- anything in the 200 range if (substr($result[2], 0, 1) == "2") { error_log("DEBUG: Successfully unsubscribed to topic {$remote_user_feed} using hubsub {$hub_url}", 0); } error_log("DEBUG: Server answer: " . join(' ', $result), 0); //print "<a href='$remote_user'>$remote_user</a> was deleted from your following list and your subscription was removed"; SMOBTemplate::footer(); } header("Location: " . SMOB_ROOT . "{$t}s"); } elseif ($t == 'rss_owner') { header("Content-type: text/xml"); //$tweet = new SMOBFeed(); //$tweet->rss(); error_log("DEBUG: rssfilepath: " . FEED_FILE_PATH); if (!file_exists(FEED_FILE_PATH)) { error_log("DEBUG: initial RSS file does not exists", 0); SMOBTools::initial_rss_file(); } $rssfile = fopen(FEED_FILE_PATH, 'r'); $rss = fread($rssfile, filesize(FEED_FILE_PATH)); fclose($rssfile); echo $rss;
public function go() { SMOBTemplate::header(''); print $this->core(); SMOBTemplate::footer(); }
private function followers() { return SMOBTemplate::users($this->type, SMOBTools::followers()); }
public function header($publisher, $reply_of = null, $ismap = null) { global $type; //if(!defined('SMOB_ROOT')) { if (!defined(SMOB_ROOT)) { define('SMOB_ROOT', ''); } if ($publisher) { list($form_js, $form) = SMOBTemplate::publisher_header($reply_of); } if ($ismap) { // GMap hack - FIXME !! echo '<br/>'; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:ctag="http://commontag.org/ns#" xmlns:opo="http://online-presence.net/opo/ns#" xmlns:smob="http://smob.me/ns#" xmlns:moat="http://moat-project.org/ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:rev="http://purl.org/stuff/rev#" xml:lang="fr"> <head profile="http://ns.inria.fr/grddl/rdfa/"> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>SMOB</title> <link rel="icon" type="image/png" href="<?php echo SMOB_ROOT; ?> img/smob-icon.png" /> <link rel="stylesheet" type="text/css" href="<?php echo SMOB_ROOT; ?> css/style.css" /> <link type="text/css" href="http://jqueryui.com/latest/themes/base/jquery.ui.all.css" rel="stylesheet" /> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1.4.1"); google.load("jqueryui", "1.7.2"); </script> <script type="text/javascript" src="<?php echo SMOB_ROOT; ?> js/jquery.timers-1.2.js"></script> <script type="text/javascript" src="<?php echo SMOB_ROOT; ?> js/jquery.autocomplete-min.js"></script> <script type="text/javascript" src="<?php echo SMOB_ROOT; ?> js/jquery.rating.js"></script> <script type="text/javascript" src="<?php echo SMOB_ROOT; ?> js/smob.js"></script> <base href="<?php echo $root; ?> " /> <script type="text/javascript"> var state = 0; var maxstate = 6; $(function() { $("#step").click(function () { process(); }); }); $(function() { $("#np").everyTime(10000,function(i) { getnews(); }); }); $(document).ready(function(){ $("#tabs").tabs(); <?php if ($ismap) { echo "\n\nmap();"; } ?> }); </script> <?php echo $form_js; ?> </head> <body about="<?php echo SMOB_ROOT; ?> " typeof="smob:Hub sioct:Microblog"> <div id="full"> <div id="header"> <h1><a href="<?php echo SMOB_ROOT; ?> ">SMOB</a></h1> <h2><span class="smob">S</span>emantic-<span class="smob">M</span>icr<span class="smob">OB</span>logging</h2> </div> <div id="main"> <div class="left"> <?php echo $form; ?> <?php }