* * Licence GPL * * Version 0.1 dév 3 * * TODO : * - ajouter une imagette par défaut s'il n'y en a pas de spécifiée * * Changelog * - Version 0.1 dev 3 : * - correction de MicroBlogPost en MicroblogPost * - correction de l'URL de validation de la page en commentaire * - i18n * - Version 0.1 dev 2 : correction : ne renvoie rien si pas de paramètre &date * - Version 0.1 dev 3 : correction : suppression du caractère non UTF-8 dans le commentaire This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Les données utilisées par l'implémentation actuelle de SMOB sont à regarder dans la requête SPARQL ici : http://smob.googlecode.com/svn/trunk/server/data.php $q = " PREFIX sioc: PREFIX sioct: PREFIX foaf: PREFIX rdf: PREFIX dct: select distinct ?post ?date ?content ?maker ?name ?depiction where { ?post rdf:type sioct:MicroBlogPost ; foaf:maker ?maker ; sioc:content ?content ; dct:created ?date . ?maker foaf:name ?name . { ?maker foaf:img ?depiction } union { ?maker foaf:depiction ?depiction } union { ?maker foaf:thumbnail ?depiction } } ORDER BY DESC(?date) LIMIT 200 "; */ // Vérification de sécurité if (!defined("WIKINI_VERSION")) { die ("accès direct interdit"); } if ($HasAccessRead=$this->HasAccess("read") && isset($_GET["date"])) { header("Content-type: application/rdf+xml; charset=UTF-8"); // $_GET["date"] doit être sous la forme 2008-05-27T22:38:22 $date = str_replace("T", " ", $_GET["date"]); $sql = 'SELECT * FROM ' . $this->GetConfigValue('table_prefix') . 'triples ' . 'WHERE resource = "' . addslashes($this->tag) . '" ' . 'AND property = "' . addslashes("http://www.wikini.net/_vocabulary/smobContent") . '" ' . 'AND time = "' . $date . '"'; //echo $sql; $result = $this->LoadSingle($sql); //print_r($result); /* Array ( [id] => 53 [time] => 2008-05-27 22:38:22 [user] => CharlesNepote [resource] => CharlesNepote [property] => http://www.wikini.net/_vocabulary/smobContent [value] => Test de message [lang] => [comment] => )*/ // URL du fichier SIOC. http://example.org/wakka.php?wiki=TelUser/smob&date=2008-05-29T16%3A42%3A23 $primaryTopic = $this->Href("smob", $this->tag) . "&date=" . urlencode($_GET["date"]); //"http://apassant.net/smob/data/2008-05-22T13:41:43-07:00"; // Calcul de la date. Par exemple : 2008-05-29T16:42:23+01:00 $dateSMOB = str_replace(" ", "T", $result["time"]); $dateSMOB = $dateSMOB . "+01:00"; // Titre du message (en l'occurence, la date) $title = $dateSMOB; // Information sur l'auteur $siocUser = $this->Href("", $this->tag); // Page de l'utilisateur. Ex. "http://apassant.net/smob/user/alex" $seeAlsoSiocUser = $this->Href("userdata", $this->tag); // "type=user&user_id=alex"; $foafMaker = $this->Href("userdata", $this->tag) . "#me"; // URI de l'auteur. Ex. "http://apassant.net/alex" $seeAlsoFoafMaker = $this->Href("userdata", $this->tag); // URL du fichier FOAF de l'auteur. Ex. "http://apassant.net/foaf.rdf" // Contenu du message $content = $result["value"]; // Calcul de l'adresse de validation du fichier $validation_url = urlencode($this->Href("smob") . "&date=" . $_GET["date"]); // Le fichier produit est à l'image de // http://apassant.net/smob/data/2008-05-22T13:41:43-07:00.rdf echo ''; ?> Profil SIOC pour "" SIOC profile for "" Un profil SIOC décrit en RDF la structure et les contenus d'un site web communautaire (par exemple, un blog). Pour plus d'information : <a href="http://rdfs.org/sioc">le site officiel du projet SIOC</a> A SIOC profile describes the structure and contents of a community site (e.g., weblog) in a machine processable form. For more information refer to the <a href="http://rdfs.org/sioc">SIOC project page</a>