= picoBlog = picoBlog est un outil de blog en PHP 5 très simple et léger (20Ko, HTML5 et CSS compris) fait pour bloguer des petites entrées rapidement. == Fonctionnalités == * Ajout, édition et suppression d'articles * Permaliens * Flux RSS des 20 dernières entrées ou par tag * Ordre des billets chronologique / anté-chronologique * Pagination de la liste des billets * Nombre de billets par page configurable * Léger, rapide et inter-opérable : stockage des données en JSON * Accès admin par login/mot de passe configurable * Envoi d'article depuis la ligne de commande * CSS personnalisable facilement * BBCode, HTML ou [[SkrivML|http://markup.skriv.org/]] dans les billets * API REST ! Post de billet depuis la ligne de commande avec CURL == Pré-requis == * Pour la version 2 : PHP 5.4 ou supérieur. * Pour la version 1 : PHP 5.0 ou supérieur. == Installation == * Télécharger le fichier [[index.php|http://svn.kd2.org/svn/misc/apps/picoblog/index.php]] * L'enregistrer à la racine d'un répertoire vierge de votre hébergement web. * Se rendre sur l'URL du répertoire. * C'est tout ! Facultatif pour bénéficier de la syntaxe SkrivML : * Télécharger et copier le fichier [[SkrivLite.php|http://fossil.kd2.org/kd2fw/doc/trunk/src/lib/kd2/SkrivLite.php]] dans le même répertoire que **index.php** == Exemple == Le blog KD2.org: http://kd2.org/blog/ == Mise à jour vers la version 2 == Normalement il n'y a rien à faire, la mise à jour se fera automatiquement. Attention les billets au format HTML ne sont plus permis, le HTML sera donc affiché tel quel sur le blog. == API REST : Poster depuis la ligne de commande == Simple ! Écrivez votre post dans un fichier texte et uploadez-le avec : curl -T mon_post.txt -u login http://monsite.tld/picoblog/index.php N'oubliez pas d'utiliser votre propre login et URL dans l'exemple :) Curl vous demandera votre mot de passe, et l'adresse de votre nouveau post sera affichée. == Installation version 1 (PHP 5.0 à PHP 5.3) == * Télécharger le fichier [[index.php|http://svn.kd2.org/svn/misc/apps/picoblog/picoblog_1_php_5_0_index.php]] * L'enregistrer à la racine d'un répertoire vierge de votre hébergement web sous le nom **index.php** * Se rendre sur l'URL du répertoire. = English = picoBlog is a simple and lightweight (20K of code including xhtml and css) blogging tool written in PHP5 to write easily and fastly new entries. === Features === * Permalink * RSS feed of 20 last entries * Chronological order of entries or reversed order * Pagination of entry list * Number of entries by page could be configured * Fast and lightweight data storage (JSON file) * Admin access by login and password, can be configured * User CSS is possible * BBCode or SkrivML markup in posts * REST API! Post to blog from command-line with curl! == Requirements == * PHP 5.4+ for version 2 * PHP 5.0+ for version 1 === Installation === * Download the file: [[index.php|http://svn.kd2.org/svn/misc/apps/picoblog/index.php]] * Save it at the root of an empty directory in your web hosting. * Go to the URL of this directory. * It's ready! Optional to enable the SkrivML syntax in posts: * Download and copy the [[SkrivLite.php|http://fossil.kd2.org/kd2fw/doc/trunk/src/lib/kd2/SkrivLite.php]] file in the same directory as **index.php** === Upgrading === Updates are made by just replacing the old index.php file with the new one. == REST API: create new post from command line == Easy! Just write your post content in a text file and upload it using: curl -T my_post.txt -u login http://mywebsite.tld/picoblog/index.php Don't forget to use your own login and URL. CURL will ask for your password, and after that it will return the URL of the newly created post. == Changelog == === 2.0.0 - january 2016 === * Now storing data as JSON instead of PHP array * Titles in posts! * Nice URIs based on post title * Automatic save of post content while writing a new post (needs Javascript enabled) * BBcode or SkrivML markup * HTML markup is no longer allowed in entries * REST API === 1.0.4 - september 2013 === * Bug fix in permalinks URL * factoring of some of the code to be faster === 1.0.3 - december 2007 === * Automatic URL detection, like you type your url http... and it appears as a link * Wikipedia link shortcuts, just type wp:Article to get a link to Article, try also wp:fr:Article, it creates a link to 'Article' * New hint about CSS edition in configuration * You can now set the constant FROM_EXTERNAL to true before including index.php, it will just load picoBlog methods and datas, to enable your picoblog entries to your own website == Forks == KriSS blog is based on picoBlog: [[https://github.com/tontof/kriss_blog]]