├── .gitignore ├── .gitmodules ├── .travis.yml ├── CHANGELOG.txt ├── CONTRIBUTING.md ├── CONTRIBUTORS ├── LICENSE.txt ├── README.md ├── VERSION ├── addons └── README.md ├── admin ├── _dragndrop.ajax.php ├── _rmfichier.ajax.php ├── _rss.ajax.php ├── addon-settings.php ├── addons.php ├── articles.php ├── auth.php ├── commentaires.php ├── ecrire.php ├── feed.php ├── fichiers.php ├── inc │ ├── addons.php │ ├── auth.php │ ├── boot.php │ ├── filesystem.php │ ├── form.php │ ├── index.php │ ├── lang │ │ ├── en_en.php │ │ ├── fr_fr.php │ │ └── index.php │ ├── links.php │ ├── sqli.php │ └── tpl.php ├── index.php ├── install.php ├── links.php ├── logout.php ├── maintenance.php ├── preferences.php ├── style │ ├── filetypes │ │ ├── android-apk.png │ │ ├── archive.png │ │ ├── ebook.png │ │ ├── executable.png │ │ ├── html-xml.png │ │ ├── image.png │ │ ├── index.php │ │ ├── music.png │ │ ├── other.png │ │ ├── pdf.png │ │ ├── presentation.png │ │ ├── spreadsheet.png │ │ ├── text-code.png │ │ ├── text_document.png │ │ └── video.png │ ├── formatx2.png │ ├── icon.woff │ ├── index.php │ ├── javascript.js │ ├── logo.png │ ├── roboto-300.woff │ ├── roboto-300.woff2 │ ├── roboto-400.woff │ ├── roboto-400.woff2 │ ├── roboto-500.woff │ ├── roboto-500.woff2 │ ├── roboto-700.woff │ ├── roboto-700.woff2 │ ├── style-addons.css │ ├── style-articles.css │ ├── style-auth.css │ ├── style-commentaires.css │ ├── style-ecrire.css │ ├── style-graphs.css │ ├── style-liens.css │ ├── style-miniatures-files.css │ ├── style-mobile-lt1100px.css │ ├── style-mobile-lt700px.css │ ├── style-mobile-lt850px.css │ ├── style-preferences.css │ ├── style-rss.css │ ├── style-style.css │ └── style.css.php └── update │ ├── index.php │ └── update-to-3.7.php ├── atom.php ├── favatar.php ├── feed.php ├── inc ├── addons.php ├── boot.php ├── conv.php ├── filesystem.php ├── form.php ├── hook.php ├── html.php ├── index.php ├── lang │ ├── en_en.php │ ├── fr_fr.php │ └── index.php ├── sqli.php ├── them.php └── util.php ├── index.php ├── preview.png ├── rss.php └── themes ├── .gitignore └── default ├── format.png ├── header-bg.jpg ├── list.html ├── roboto-300.woff ├── roboto-400.woff ├── roboto-700.woff ├── sprites.png ├── style.css └── template ├── article.html ├── commentaire.html ├── link.html └── post.html /.gitignore: -------------------------------------------------------------------------------- 1 | bt_backup/ 2 | .cache/ 3 | config/ 4 | databases/ 5 | files/ 6 | img/ 7 | .htaccess 8 | themes/default/avatars/*.png 9 | admin/cache/favicons/*.png 10 | admin/cache/avatars/*.png 11 | *.phar 12 | var/ 13 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlogoText/blogotext/fa2a4497e76aeb295db1a9d1aa8b7594c7484365/.gitmodules -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | dist: trusty 4 | 5 | php: 6 | - 5.5 7 | - 5.6 8 | - 7.0 9 | - 7.1 10 | - 7.2 11 | - 7.3 12 | - nightly 13 | 14 | install: 15 | #- curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar 16 | - curl -OL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.6.2/phpcs.phar 17 | #- curl -OL https://github.com/squizlabs/PHP_CodeSniffer/releases/download/2.8.1/phpcs.phar 18 | 19 | script: 20 | - php phpcs.phar --standard=PSR2 -np --tab-width=4 --encoding=utf-8 . 21 | -------------------------------------------------------------------------------- /CHANGELOG.txt: -------------------------------------------------------------------------------- 1 | # Changelog for BlogoText 2 | # 3 | # note : each changes will be start with status : 4 | # - upd, for update or modification 5 | # - add, for addition 6 | # - del, for deletion 7 | # - fix, like an upd but just for fixing an error 8 | # note : each note will be start with "note :" 9 | # note : 1 note by subject 10 | 11 | [3.7.6] 12 | note : issue #318, thanks to @chb9 13 | - fix XSS issue in comments 14 | 15 | [3.7.5] 16 | - fix feed aggregator multiple errors on pages navigation 17 | - fix feed aggregator filter for 4 bytes char 18 | - fix admin settings page, wrong behavior for themes listing 19 | 20 | [3.7.4] 21 | - fix wrong behavior on link (title) from feed aggregator 22 | - fix for PHP 5.5 compat 23 | 24 | [3.7.3] 25 | note : This update is about bug fix, no need to update if 3.7.1 already installed and ok 26 | - add support for php without the PHP intl extension 27 | - fix feed aggregator 28 | 29 | [3.7.2] 30 | note : This update is about bug fix, no need to update if 3.7.1 already installed and ok 31 | note : A bug with the feed aggregator is known, we are working on it, new update will go live soon! 32 | - upd install and update to add intl test and message 33 | - upd boot to add intl test and message 34 | 35 | [3.7.1] 36 | note : This update is about bug fix 37 | - fix function return_byte(), format the value before math 38 | - fix errors with (int) when PHP_INT_MAX is too low 39 | 40 | [3.7] 41 | note : This changelog file will not be complete due to the consequent number of changes and the 42 | late implementation of this changelog 43 | note : The 3.7 is the first release after the change of maintainer 44 | note : GitHub moved to https://github.com/BoboTiG/blogotext/ 45 | note : GitHub moved to https://github.com/BlogoText/blogotext/ 46 | note : you will notice some performance improvement due to the partial rewrite/reorder of the core 47 | note : custom templates don't need any update to stay fonctional, but if you want to use addons, you 48 | must add some addons tags 49 | - add public template tag {tpl_class} wich return content type and informations 50 | - add addon system 51 | - add public template tag {includes.css} and {includes.js} for addons support 52 | - add first release for a log error system 53 | - add favatar.php, will manage external favicon and gravatar 54 | - add valias support 55 | - add vhost partial support 56 | - add some 404 headers, public side 57 | - add updater for an easy transition from 3.4.7 to 3.7 58 | - add new notification system, partially implemented (JS)(admin side) 59 | - add new loader animation, partially implemented (JS)(admin side) 60 | - add new boot system 61 | - add hook system (public side) 62 | - add Send mail to author at new comment 63 | - upd cache folder moved to var/{domain.tld}/cache 64 | - upd cache folder for favicon and gravatar moved to var/cache 65 | - upd rewrite and reorder a lot of file, function (...) in the core (PSR-2 and "english" compliancy) 66 | - upd database scheme, add some fields in database 67 | - upd some security improvement (ini file > php file ...) 68 | - upd auth password hash improvement 69 | - upd for pubilc feeds, rss.php and atom.php merged into feed.php 70 | - upd langs file have been splitted public/admin 71 | - upd add custom user agent for BlogoText 72 | - upd improve performance and fonctionnality for admin feed reader 73 | - upd default template 74 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | **All PR are welcome :)** 2 | 3 | 4 | ### In a few steps 5 | 1. clone the repo with `git clone --branch dev git@github.com:BlogoText/blogotext.git` 6 | 2. create a new branch `git checkout -b branch-name` 7 | 3. do your work 8 | 4. check your code (see below) 9 | 5. `git push` 10 | 6. Go to your github repository, and create a pull request from your branch to `dev` main repo. 11 | 12 | ### Few rules 13 | 14 | Always work on a dedicated branch: 15 | 16 | git checkout -b branch-name 17 | 18 | Before modifying code **and** pushing changes, stay up to date with the `dev` branch: 19 | 20 | // Add blogotext to upstream source 21 | git remote add upstream https://github.com/BlogoText/blogotext.git 22 | 23 | // Now, you can refresh your fork from the souce 24 | git pull --squash upstream dev 25 | 26 | You can found some documentation on [help.github.com / syncing-a-fork](https://help.github.com/articles/syncing-a-fork/) 27 | 28 | ### Check your code 29 | 30 | Travis CI will do it for you, but to prevent errors you can test yourself the code: 31 | 32 | # Download the tool 33 | curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar 34 | 35 | # Usage 36 | php phpcs.phar --standard=PSR2 -np --tab-width=4 --encoding=utf-8 . 37 | 38 | If you are stuck with a **lot of errors**, use this tool which can refactor the code for you: 39 | 40 | # Download the tool 41 | curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar 42 | 43 | # Usage 44 | php phpcbf.phar --standard=PSR2 -np --tab-width=4 --encoding=utf-8 . 45 | 46 | ! phpcbf.phar can not work with window (require diff, path...) you can add ` --no-patch` 47 | -------------------------------------------------------------------------------- /CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # Many thanks to all those who helped :) 2 | # (chronologically sorted) 3 | 4 | # Nickname, fullname or both 5 | # GitHub or equivalent 6 | # personnal website 7 | 8 | 9 | Mickaël 'Tiger-222' Schoentgen 10 | https://github.com/BoboTiG 11 | http://www.tiger-222.fr 12 | 13 | Kris 14 | https://github.com/krisxoofoo 15 | https://xoofoo.org 16 | 17 | Christophe 'Sbgodin' Henry 18 | https://github.com/Sbgodin 19 | http://sbgodin.fr 20 | 21 | Thuban 22 | https://github.com/B4rb3rouss 23 | http://yeuxdelibad.net/Blog 24 | 25 | RemRem 26 | https://github.com/remrem 27 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | +-=======================================================================-+ 2 | | B L O G O T E X T | 3 | +-=======================================================================-+ 4 | | BlogoText is a lightweight PHP-only Blog engine. | 5 | | | 6 | | (c) 2006 Frederic Nassar. | 7 | | (c) 2010-2016 Timo van Neerden, AKA Le Hollandais Volant | 8 | | (c) 2016-.... Mickaël 'Tiger-222' Schoentgen and the community | 9 | | | 10 | | BlogoText is redistributed under the terms of the X11 / MIT Licence | 11 | | http://opensource.org/licenses/MIT | 12 | | | 13 | | BlogoText is based upon others ressources, that are listed below. | 14 | | | 15 | +-------------------------------------------------------------------------+ 16 | | LINX | 17 | +-------------------------------------------------------------------------+ 18 | | http://lehollandaisvolant.net/tout/linx/ | 19 | | | 20 | | Linx is an ultra-lightweight SQLite-based "delicous-like" url-saver. | 21 | | | 22 | | (c) March 2011 Timo van Neerden, AKA Le Hollandais Volant | 23 | | | 24 | | Linx is redistributed under the terms of the WTFPL. | 25 | | | 26 | +-------------------------------------------------------------------------+ 27 | | GOOGLE MATERIAL DESIGN ICONS | 28 | +-------------------------------------------------------------------------+ 29 | | https://github.com/google/material-design-icons | 30 | | | 31 | | "HTML5 Drag and Drop Multiple File Uploader" is a file uploade script. | 32 | | | 33 | | (c) 2014 Google Inc | 34 | | | 35 | | The ressource is included according to the CC-BY-4.0 license | 36 | | | 37 | +-------------------------------------------------------------------------+ 38 | |   GOOGLE ROBOTO FONTS | 39 | +-------------------------------------------------------------------------+ 40 | | https://www.google.com/fonts/specimen/Roboto | 41 | | | 42 | | Roboto is free font set for material design | 43 | | | 44 | | (c) 2014 Google Inc | 45 | | | 46 | | These fonts are licensed under a Apache License and included in | 47 | | BlogoText accordingly. | 48 | | | 49 | +-------------------------------------------------------------------------+ 50 | |   FAENZA ICONS | 51 | +-------------------------------------------------------------------------+ 52 | | http://tiheum.deviantart.com/art/Faenza-Icons-173323228 | 53 | | | 54 | | Faenza icons is a set of icons, free for non-commercial use | 55 | | | 56 | | (c) 2010 Tiheum | 57 | | | 58 | | These icons are licensed under a Creative Commons | 59 | | Attribution 3.0 License. | 60 | | http://creativecommons.org/licenses/by/3.0/ | 61 | | | 62 | +-------------------------------------------------------------------------+ 63 | | ~ | 64 | +-------------------------------------------------------------------------+ 65 | | | 66 | | As we enjoy great advantages from the inventions of others, we should | 67 | | be glad of an opportunity to serve others by any invention of ours, | 68 | | and this we should do freely and generously. | 69 | | | 70 | | − Benjamin Franklin | 71 | |   | 72 | +-------------------------------------------------------------------------+ 73 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BlogoText 2 | 3 | [![Build status](https://travis-ci.org/BlogoText/blogotext.svg?branch=dev)](https://travis-ci.org/BlogoText/blogotext) 4 | 5 | This is BlogoText, the lightweight SQLite Blog-Engine. 6 | 7 | --- 8 | 9 | ## Features 10 | * Blog with comments and RSS feeds 11 | * Links sharing 12 | * RSS Reader 13 | * Images/Files uploading and sharing 14 | * JSON/ZIP/HTML import-export; WordPress import 15 | * Support [Addons](https://github.com/BlogoText/blogotext-addons) 16 | 17 | ![BlogoText screenshot](https://raw.githubusercontent.com/BlogoText/blogotext/dev/preview.png) 18 | 19 | --- 20 | 21 | ## Requirements 22 | * PHP > 5.5 23 | * SQLite or MySQL with PDO support 24 | * A CSS3 / HTML5 / ES6 compatible Browser, for the admin panel (Firefox, Chrome…) 25 | * min 2 Mo disk space (more data = more space needed) 26 | 27 | ## Recommended PHP libraries 28 | * GD (for comments icons / favicons); 29 | * cURL (for RSS reader, links sharing, comments icons) 30 | * LibXML (for RSS reader) 31 | * GZip (for zip exporting function) 32 | * [Intl](http://php.net/manual/book.intl.php) 33 | * [mbstring](http://php.net/manual/book.mbstring.php) 34 | 35 | ## Installation 36 | * Download [the lastest release](https://github.com/BlogoText/blogotext/releases) 37 | * Upload folder to your site (eg: to `https://example.com/blog`) 38 | * Use your browser to go to your site 39 | * Follow the few steps 40 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 3.7.7 2 | -------------------------------------------------------------------------------- /addons/README.md: -------------------------------------------------------------------------------- 1 | # BlogoText/addons/ 2 | Your addons must be placed in this folder. 3 | 4 | ### Where to find the addons? 5 | 6 | Take a look at : 7 | * https://github.com/BlogoText/blogotext-addons 8 | 9 | ### And ? 10 | 11 | * Download the addons that suits you 12 | * Place them in the addons folder of your BlogoText 13 | * Go to the admin interface of your BlogoText ;) 14 | http://-your blog URL-/admin/addons.php -------------------------------------------------------------------------------- /admin/_dragndrop.ajax.php: -------------------------------------------------------------------------------- 1 | $file) { 28 | $files[] = $file['bt_id']; 29 | } 30 | 31 | if (isset($_FILES['fichier'])) { 32 | $time = time(); 33 | $file = init_post_fichier(); 34 | 35 | // avoid ID collisions 36 | while (in_array($file['bt_id'], $files)) { 37 | $time--; 38 | $file['bt_id'] = date('YmdHis', $time); 39 | } 40 | $errors = valider_form_fichier($file); 41 | 42 | if (!$errors) { 43 | $newFile = bdd_fichier($file, 'ajout-nouveau', 'upload', $_FILES['fichier']); 44 | $file = ($newFile === null) ? $file : $newFile; 45 | die(printf($json, 'fichiers.php?file_id='.$file['bt_id'].'&edit', 'success', new_token())); 46 | } 47 | } elseif ($token && check_token($token)) { 48 | // If the file is not sent (size limit from the JS side for instance) 49 | // but the token is good, we keep going with next files. 50 | die(printf($json, 0, 'failure', new_token())); 51 | } 52 | 53 | // Problem with file and token: abort, Captain, my Captain!! 54 | die(printf($json, 0, 'failure', 0)); 55 | -------------------------------------------------------------------------------- /admin/_rmfichier.ajax.php: -------------------------------------------------------------------------------- 1 | false, 33 | 'message' => $erreurs['0'], 34 | 'token' => new_token() 35 | ) 36 | )); 37 | } 38 | 39 | $process = addon_ajax_button_action_process(htmlspecialchars($_POST['addon_id']), htmlspecialchars($_POST['button_id'])); 40 | die(json_encode( 41 | array( 42 | 'success' => false, 43 | 'message' => $erreurs, 44 | 'token' => new_token() 45 | ) 46 | )); 47 | } 48 | 49 | // traitement d’une action sur le module 50 | if (isset($_POST['_verif_envoi']) && isset($_POST['action_type'])) { 51 | if ($_POST['action_type'] == 'settings') { 52 | $form_process = addon_form_edit_settings_proceed($_GET['addon']); 53 | } elseif ($_POST['action_type'] == 'buttons') { 54 | $form_process = addon_buttons_action_process($_GET['addon']); 55 | } 56 | } 57 | 58 | 59 | /** 60 | * echo 61 | */ 62 | 63 | echo tpl_get_html_head($GLOBALS['lang']['mesmodules']); 64 | 65 | echo ''; 71 | 72 | echo '
'; 73 | echo '
'; 74 | 75 | echo addon_form_buttons($_GET['addon']); 76 | echo addon_form_edit_settings($_GET['addon']); 77 | 78 | echo ''; 79 | echo ''; 83 | ?> 84 | 85 | 143 | 144 | htmlspecialchars($_POST['addon_id']), 34 | 'status' => (isset($_POST['statut']) and $_POST['statut'] == 'on') ? 1 : 0, 35 | ); 36 | $erreurs = addon_ajax_check_request($module['addon_id'], 'mod_activer'); 37 | if (!isset($module['status'])) { 38 | $erreurs[] = $GLOBALS['lang']['err_addon_status']; 39 | } 40 | if (isset($_POST['mod_activer'])) { 41 | if ($erreurs) { 42 | die('Error'.implode("\n", $erreurs)); 43 | } 44 | addon_ajax_switch_enabled_proceed($module); 45 | } else { 46 | $erreurs = addon_ajax_switch_enabled_proceed($module); 47 | } 48 | } 49 | 50 | 51 | $filtre = (!empty($_GET['filtre'])) ? htmlspecialchars($_GET['filtre']) : ''; 52 | 53 | if ($filtre == 'disabled') { 54 | $tableau = addons_list_disabled(); 55 | } else if ($filtre == 'enabled') { 56 | $tableau = addons_list_enabled(); 57 | } else { 58 | $tableau = addons_list_all(); 59 | } 60 | 61 | 62 | /** 63 | * echo 64 | */ 65 | 66 | echo tpl_get_html_head($GLOBALS['lang']['mesmodules']); 67 | 68 | echo ''; 74 | 75 | echo '
'; 76 | echo '
'; 77 | 78 | echo erreurs($erreurs); 79 | // Subnav 80 | echo ''; 86 | 87 | echo addons_html_get_list_addons($tableau, $filtre); 88 | 89 | echo ''; 90 | echo ''; 95 | 96 | echo tpl_get_footer($begin); 97 | -------------------------------------------------------------------------------- /admin/articles.php: -------------------------------------------------------------------------------- 1 | '; 24 | foreach ($arr as $post) { 25 | $out .= ' date('YmdHis')) ? ' class="planned"' : '').'>'; 26 | $title = trim(htmlspecialchars(mb_substr(strip_tags(((empty($post['bt_abstract'])) ? $post['bt_content'] : $post['bt_abstract'])), 0, 249), ENT_QUOTES)).'…'; 27 | $out .= ''.''.$post['bt_title'].''.''; 28 | $out .= ''.date_formate($post['bt_date']).', '.heure_formate($post['bt_date']).''; 29 | $out .= ''.$post['bt_nb_comments'].''; 30 | $out .= ''; 31 | $out .= ''; 32 | } 33 | $out .= ''."\n\n"; 34 | } else { 35 | $out = info($GLOBALS['lang']['note_no_article']); 36 | } 37 | $out .= ''.$GLOBALS['lang']['titre_ecrire'].''; 38 | 39 | echo $out; 40 | } 41 | 42 | 43 | /** 44 | * process 45 | */ 46 | 47 | $tableau = array(); 48 | $query = (string)filter_input(INPUT_GET, 'q'); 49 | $filter = (string)filter_input(INPUT_GET, 'filtre'); 50 | if ($query) { 51 | $arr = parse_search($query); 52 | $sqlWhere = implode(array_fill(0, count($arr), '( bt_content || bt_title ) LIKE ?'), 'AND'); // AND operator between words 53 | $query = ' 54 | SELECT * 55 | FROM articles 56 | WHERE '.$sqlWhere.' 57 | ORDER BY bt_date DESC'; 58 | $tableau = liste_elements($query, $arr, 'articles'); 59 | } elseif ($filter) { 60 | // for "tags" the requests is "tag.$search" : here we split the type of search and what we search. 61 | $type = substr($filter, 0, -strlen(strstr($filter, '.'))); 62 | $search = htmlspecialchars(ltrim(strstr($filter, '.'), '.')); 63 | 64 | if (preg_match('#^\d{6}(\d{1,8})?$#', $filter)) { 65 | $query = ' 66 | SELECT * 67 | FROM articles 68 | WHERE bt_date LIKE ? 69 | ORDER BY bt_date DESC'; 70 | $tableau = liste_elements($query, array($filter.'%'), 'articles'); 71 | } elseif ($filter == 'draft' or $filter == 'pub') { 72 | $query = ' 73 | SELECT * 74 | FROM articles 75 | WHERE bt_statut = ? 76 | ORDER BY bt_date DESC'; 77 | $tableau = liste_elements($query, array((($filter == 'draft') ? 0 : 1)), 'articles'); 78 | } elseif ($type == 'tag' and $search != '') { 79 | $query = ' 80 | SELECT * 81 | FROM articles 82 | WHERE bt_tags LIKE ? 83 | OR bt_tags LIKE ? 84 | OR bt_tags LIKE ? 85 | OR bt_tags LIKE ? 86 | ORDER BY bt_date DESC'; 87 | $tableau = liste_elements($query, array($search, $search.',%', '%, '.$search, '%, '.$search.', %'), 'articles'); 88 | } else { 89 | $query = ' 90 | SELECT * 91 | FROM articles 92 | ORDER BY bt_date DESC LIMIT 0, '.$GLOBALS['max_bill_admin']; 93 | $tableau = liste_elements($query, array(), 'articles'); 94 | } 95 | } else { 96 | $query = ' 97 | SELECT * 98 | FROM articles 99 | ORDER BY bt_date DESC LIMIT 0, '.$GLOBALS['max_bill_admin']; 100 | $tableau = liste_elements($query, array(), 'articles'); 101 | } 102 | 103 | 104 | /** 105 | * echo 106 | */ 107 | 108 | echo tpl_get_html_head($GLOBALS['lang']['mesarticles']); 109 | 110 | echo ''; 117 | 118 | echo '
'; 119 | echo ''; 125 | 126 | echo '
'; 127 | 128 | afficher_liste_articles($tableau); 129 | 130 | echo << 132 | 136 | EOS; 137 | 138 | echo tpl_get_footer($begin); 139 | -------------------------------------------------------------------------------- /admin/auth.php: -------------------------------------------------------------------------------- 1 | '; 82 | echo '
'; 83 | echo '

'.BLOGOTEXT_NAME.'

'; 84 | echo '
'; 85 | echo '
'; 86 | echo '

'; 87 | echo '

'; 88 | echo '

'; 89 | echo ''; 90 | echo ''; 91 | echo '
'; 92 | echo '
'; 93 | 94 | echo ''; 95 | echo tpl_get_footer(); 96 | -------------------------------------------------------------------------------- /admin/commentaires.php: -------------------------------------------------------------------------------- 1 | (filter_input(INPUT_POST, 'com_activer') !== null), 19 | 'com_supprimer' => (filter_input(INPUT_POST, 'com_supprimer') !== null), 20 | '_verif_envoi' => (filter_input(INPUT_POST, '_verif_envoi') !== null), 21 | 'comment_article_id' => (string)filter_input(INPUT_POST, 'comment_article_id'), 22 | 'post_id' => (string)filter_input(INPUT_GET, 'post_id'), 23 | 'filtre' => (string)filter_input(INPUT_GET, 'filtre'), 24 | 'q' => (string)filter_input(INPUT_GET, 'q'), 25 | ); 26 | 27 | 28 | /** 29 | * process 30 | */ 31 | 32 | $postTitle = ''; 33 | $errorsForm = array(); 34 | if ($vars['_verif_envoi']) { 35 | if ($vars['com_supprimer'] || $vars['com_activer']) { 36 | $commentAction = (($vars['com_supprimer']) ? $vars['com_supprimer'] : $vars['com_activer']); 37 | $errorsForm = valider_form_commentaire_ajax((int)$commentAction); 38 | if ($errorsForm) { 39 | die(implode("\n", $errorsForm)); 40 | } 41 | traiter_form_commentaire($commentAction, 'admin'); 42 | } else { 43 | $comment = init_post_comment($vars['comment_article_id'], 'admin'); 44 | $errorsForm = valider_form_commentaire($comment, 'admin'); 45 | if (!$errorsForm) { 46 | traiter_form_commentaire($comment, 'admin'); 47 | } 48 | } 49 | } 50 | 51 | // if article ID is given in query string 52 | if (preg_match('#\d{14}#', $vars['post_id'])) { 53 | $paramMakeup['menu_theme'] = 'for_article'; 54 | $sql = ' 55 | SELECT c.*, a.bt_title 56 | FROM commentaires AS c, articles AS a 57 | WHERE c.bt_article_id = ? 58 | AND c.bt_article_id = a.bt_id 59 | ORDER BY c.bt_id'; 60 | $comments = liste_elements($sql, array($vars['post_id']), 'commentaires'); 61 | $postTitle = ($comments) ? $comments[0]['bt_title'] : get_entry($GLOBALS['db_handle'], 'articles', 'bt_title', $vars['post_id'], 'return'); 62 | $paramMakeup['show_links'] = 0; 63 | } else { 64 | // else, no ID 65 | $paramMakeup['menu_theme'] = 'for_comms'; 66 | if ($vars['filtre']) { 67 | // for "authors" the requests is "auteur.$search": here we split the type of search and what we search. 68 | $type = substr($vars['filtre'], 0, -strlen(strstr($vars['filtre'], '.'))); 69 | $search = htmlspecialchars(ltrim(strstr($vars['filtre'], '.'), '.')); 70 | if (preg_match('#^\d{6}(\d{1,8})?$#', $vars['filtre'])) { 71 | $sql = ' 72 | SELECT c.*, a.bt_title 73 | FROM commentaires c 74 | LEFT JOIN articles a 75 | ON a.bt_id = c.bt_article_id 76 | WHERE c.bt_id LIKE ? 77 | ORDER BY c.bt_id DESC'; 78 | $comments = liste_elements($sql, array($vars['filtre'].'%'), 'commentaires'); 79 | } elseif ($vars['filtre'] == 'draft') { 80 | $sql = ' 81 | SELECT c.*, a.bt_title 82 | FROM commentaires c 83 | LEFT JOIN articles a 84 | ON a.bt_id = c.bt_article_id 85 | WHERE c.bt_statut = 0 86 | ORDER BY c.bt_id DESC'; 87 | $comments = liste_elements($sql, array(), 'commentaires'); 88 | } elseif ($vars['filtre'] == 'pub') { 89 | $sql = ' 90 | SELECT c.*, a.bt_title 91 | FROM commentaires c 92 | LEFT JOIN articles a 93 | ON a.bt_id = c.bt_article_id 94 | WHERE c.bt_statut = 1 95 | ORDER BY c.bt_id DESC'; 96 | $comments = liste_elements($sql, array(), 'commentaires'); 97 | } elseif ($type == 'auteur' && $search != '') { 98 | $sql = ' 99 | SELECT c.*, a.bt_title 100 | FROM commentaires c 101 | LEFT JOIN articles a 102 | ON a.bt_id = c.bt_article_id 103 | WHERE c.bt_author = ? 104 | ORDER BY c.bt_id DESC'; 105 | $comments = liste_elements($sql, array($search), 'commentaires'); 106 | } else { 107 | $sql = ' 108 | SELECT c.*, a.bt_title 109 | FROM commentaires c 110 | LEFT JOIN articles a 111 | ON a.bt_id = c.bt_article_id 112 | ORDER BY c.bt_id DESC 113 | LIMIT '.$GLOBALS['max_comm_admin']; 114 | $comments = liste_elements($sql, array(), 'commentaires'); 115 | } 116 | } elseif ($vars['q']) { 117 | $arr = parse_search($vars['q']); 118 | $sqlWhere = implode(array_fill(0, count($arr), 'c.bt_content LIKE ?'), 'AND'); 119 | $sql = ' 120 | SELECT c.*, a.bt_title 121 | FROM commentaires c 122 | LEFT JOIN articles a 123 | ON a.bt_id = c.bt_article_id 124 | WHERE '.$sqlWhere.' 125 | ORDER BY c.bt_id DESC'; 126 | $comments = liste_elements($sql, $arr, 'commentaires'); 127 | } else { 128 | // No filter, so list'em all 129 | $sql = ' 130 | SELECT c.*, a.bt_title 131 | FROM commentaires c 132 | LEFT JOIN articles a 133 | ON a.bt_id = c.bt_article_id 134 | ORDER BY c.bt_id DESC 135 | LIMIT '.$GLOBALS['max_comm_admin']; 136 | $comments = liste_elements($sql, array(), 'commentaires'); 137 | } 138 | $numberOfComments = liste_elements_count('SELECT count(*) AS nbr FROM commentaires', array()); 139 | $paramMakeup['show_links'] = 1; 140 | } 141 | 142 | function display_comment($comment, $withLink) 143 | { 144 | afficher_form_commentaire($comment['bt_article_id'], 'admin', '', $comment); 145 | echo '
'; 146 | echo '
'; 147 | echo '
'; 148 | echo ''; 149 | echo ''.date_formate($comment['bt_id']).''.heure_formate($comment['bt_id']).'' ; 150 | 151 | echo 'Reply '; 152 | echo (!empty($comment['bt_webpage'])) ? ''.$comment['bt_webpage'].'' : ''; 153 | echo (!empty($comment['bt_email'])) ? '' : ''; 154 | echo '
'; 155 | echo '
'; 156 | 157 | echo '
'; 158 | 159 | echo '
'; 160 | 161 | echo '
'; 162 | echo ''.$comment['bt_author'].' :'; 163 | echo '
'; 164 | 165 | echo ($withLink == 1 && !empty($comment['bt_title'])) ? ' '.$GLOBALS['lang']['sur'].' '.$comment['bt_title'].'' : ''; 166 | 167 | echo '
'; 168 | echo '
    '; 169 | echo '
  • '.$GLOBALS['lang']['editer'].'
  • '; 170 | echo '
  • '.$GLOBALS['lang'][((!$comment['bt_statut']) ? '' : 'des').'activer'].'
  • '; 171 | echo '
  • '.$GLOBALS['lang']['supprimer'].'
  • '; 172 | echo '
'; 173 | echo '
'; 174 | 175 | echo '
'; 176 | 177 | echo '
'; 178 | echo $comment['bt_content']; 179 | echo '
'; 180 | echo $GLOBALS['form_commentaire']; 181 | 182 | echo '
'; 183 | echo '
'; 184 | } 185 | 186 | 187 | /** 188 | * echo 189 | */ 190 | 191 | echo tpl_get_html_head($GLOBALS['lang']['titre_commentaires']. (($postTitle) ?' | '.$postTitle : '')); 192 | 193 | echo ''; 200 | 201 | echo '
'; 202 | 203 | // Subnav 204 | echo ''; 220 | 221 | echo '
'; 222 | 223 | // Comments 224 | if ($comments) { 225 | echo '
'; 226 | $token = new_token(); 227 | foreach ($comments as $comment) { 228 | $comment['comm-token'] = $token; 229 | display_comment($comment, $paramMakeup['show_links']); 230 | } 231 | echo '
'; 232 | } else { 233 | echo info($GLOBALS['lang']['note_no_commentaire']); 234 | } 235 | 236 | if ($paramMakeup['menu_theme'] == 'for_article') { 237 | echo '
'; 238 | afficher_form_commentaire($vars['post_id'], 'admin', $errorsForm, ''); 239 | echo '

'.$GLOBALS['lang']['comment_ajout'].'

'; 240 | echo $GLOBALS['form_commentaire']; 241 | echo '
'; 242 | } 243 | 244 | echo ''; 245 | echo ''; 249 | 250 | echo tpl_get_footer($begin); 251 | -------------------------------------------------------------------------------- /admin/inc/auth.php: -------------------------------------------------------------------------------- 1 | $value) { 31 | $_SESSION['BT-post-'.$key] = $value; 32 | } 33 | 34 | if (strrpos($_SERVER['REQUEST_URI'], '/logout.php') != strlen($_SERVER['REQUEST_URI']) - strlen('/logout.php')) { 35 | $_SESSION['BT-saved-url'] = $_SERVER['REQUEST_URI']; 36 | } 37 | redirection('auth.php'); 38 | } 39 | 40 | /** 41 | * 42 | */ 43 | function get_ip() 44 | { 45 | $ipAddr = (string)$_SERVER['REMOTE_ADDR']; 46 | if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { 47 | $ipAddr .= '_'.$_SERVER['HTTP_X_FORWARDED_FOR']; 48 | } 49 | 50 | return htmlspecialchars($ipAddr); 51 | } 52 | 53 | /** 54 | * check som stuff about the session 55 | */ 56 | function auth_check_session() 57 | { 58 | // bug fix for PHP 7.2 59 | if (session_status() == PHP_SESSION_NONE) { 60 | ini_set('session.cookie_httponly', true); 61 | session_set_cookie_params(365 * 24 * 60 * 60); 62 | @session_start(); 63 | } 64 | 65 | // Check old cookie 66 | $newUid = uuid(); 67 | if (isset($_COOKIE['BT-admin-stay-logged'])) { 68 | if ($_COOKIE['BT-admin-stay-logged'] == $newUid) { 69 | $_SESSION['user_id'] = $newUid; 70 | // session_set_cookie_params(365 * 24 * 60 * 60); 71 | session_regenerate_id(true); 72 | return true; 73 | } 74 | return false; 75 | } 76 | 77 | // No "stay-logged" cookie: check session 78 | if (isset($_SESSION['user_id']) && $_SESSION['user_id'] == $newUid) { 79 | return true; 80 | } 81 | 82 | return false; 83 | } 84 | 85 | /** 86 | * This will look if session expired and kill it, otherwise restore it. 87 | */ 88 | function auth_ttl() 89 | { 90 | if (!auth_check_session()) { 91 | auth_kill_session(); 92 | } 93 | 94 | // Restore data lost if possible 95 | foreach ($_SESSION as $key => $value) { 96 | if (substr($key, 0, 8) === 'BT-post-') { 97 | $_POST[substr($key, 8)] = $value; 98 | unset($_SESSION[$key]); 99 | } 100 | } 101 | } 102 | 103 | /** 104 | * Sanitinze the login. 105 | */ 106 | function auth_format_login($login) 107 | { 108 | return addslashes(clean_txt(htmlspecialchars($login))); 109 | } 110 | 111 | /** 112 | * Check if login and password match with the registered ones. 113 | */ 114 | function auth_is_valid($login, $pass) 115 | { 116 | if (!password_verify(hash_pass($pass, true), USER_PWHASH)) { 117 | return false; 118 | } 119 | if (auth_format_login($login) !== USER_LOGIN) { 120 | return false; 121 | } 122 | 123 | return true; 124 | } 125 | 126 | /** 127 | * Save identification values to write /config/user.php. 128 | */ 129 | function auth_write_user_login_file($login, $pass) 130 | { 131 | $login = auth_format_login($login); 132 | $pass = (empty($pass)) ? USER_PWHASH : hash_pass($pass); 133 | 134 | $content = '; '."\n"; 135 | $content .= '; This file contains user login + password hash.'."\n\n"; 136 | $content .= 'USER_LOGIN = \''.$login.'\''."\n"; 137 | $content .= 'USER_PWHASH = \''.$pass.'\''."\n"; 138 | 139 | return (file_put_contents(FILE_USER, $content, LOCK_EX) !== false); 140 | } 141 | 142 | /** 143 | * Password hashing process. 144 | * Inspired from https://blogs.dropbox.com/tech/2016/09/how-dropbox-securely-stores-your-passwords/ 145 | */ 146 | function hash_pass($password, $checking = false) 147 | { 148 | // Bypass 72 chars limitation instored by bcrypt 149 | $hash = hash('sha512', $password); 150 | 151 | if ($checking) { 152 | return $hash; 153 | } 154 | 155 | return password_hash($hash, PASSWORD_BCRYPT); 156 | } 157 | 158 | /** 159 | * Generate a uniq hash for cookie. 160 | */ 161 | function uuid() 162 | { 163 | $ipAddr = (USE_IP_IN_SESSION) ? get_ip() : date('m'); 164 | $hash = USER_LOGIN.hash('sha256', USER_PWHASH.$_SERVER['HTTP_USER_AGENT'].$ipAddr); 165 | 166 | return md5($hash); 167 | } 168 | 169 | /** 170 | * Write access log. 171 | */ 172 | function auth_write_access($status, $username = null) 173 | { 174 | $output = DIR_CONFIG.'xauthlog.php'; 175 | $content = ''; 176 | if (!is_file($output)) { 177 | $content .= ''.$label.''; 86 | $form .= ''; 91 | return $form; 92 | } 93 | 94 | /** 95 | * 96 | */ 97 | function form_select_no_label($name, $choix, $defaut) 98 | { 99 | $form = ''; 104 | return $form; 105 | } 106 | 107 | /** 108 | * 109 | */ 110 | function form_categories_links($where, $postTags) 111 | { 112 | $tags = list_all_tags($where, false); 113 | $html = ''; 114 | if ($tags) { 115 | $html = ''; 116 | foreach ($tags as $tag => $i) { 117 | $html .= ''; 120 | } 121 | $html .= '
    '; 122 | $listTags = explode(',', $postTags); 123 | 124 | // remove diacritics and reindexes so that "ééé" does not passe after "zzz" 125 | foreach ($listTags as $i => $tag) { 126 | $listTags[$i] = array('t' => trim($tag), 'tt' => diacritique(trim($tag))); 127 | } 128 | $listTags = array_reverse(tri_selon_sous_cle($listTags, 'tt')); 129 | 130 | foreach ($listTags as $i => $tag) { 131 | if ($tag['t']) { 132 | $html .= '
  • '.trim($tag['t']).'×
  • '; 133 | } 134 | } 135 | $html .= '
'; 136 | return $html; 137 | } 138 | 139 | /** 140 | * Posts forms 141 | */ 142 | function afficher_form_filtre($type, $filtre) 143 | { 144 | $ret = '
'; 145 | $ret .= '
'; 146 | $ret .= filtre($type, $filtre); 147 | $ret .= '
'; 148 | $ret .= '
'; 149 | echo $ret; 150 | } 151 | 152 | /** 153 | * 154 | */ 155 | function form_checkbox($name, $checked, $label) 156 | { 157 | $checked = ($checked) ? 'checked ' : ''; 158 | $form = '' ; 159 | $form .= ''; 160 | return $form; 161 | } 162 | 163 | 164 | /** 165 | * FOR COMMENTS : RETUNS nb_com per author 166 | */ 167 | function nb_entries_as($table, $what) 168 | { 169 | $query = " 170 | SELECT count($what) AS nb, $what 171 | FROM $table 172 | GROUP BY $what 173 | ORDER BY nb DESC"; 174 | 175 | return $GLOBALS['db_handle']->query($query)->fetchAll(PDO::FETCH_ASSOC); 176 | } 177 | 178 | /** 179 | * 180 | */ 181 | function filtre($type, $filtre) 182 | { 183 | // WARNING: this is a resources heavy consuming function. 184 | $listTypes = array(); 185 | $ret = ' '; 296 | 297 | return $ret; 298 | } 299 | -------------------------------------------------------------------------------- /admin/inc/index.php: -------------------------------------------------------------------------------- 1 | prepare(' 21 | INSERT INTO articles 22 | ( bt_type, 23 | bt_id, 24 | bt_date, 25 | bt_title, 26 | bt_abstract, 27 | bt_link, 28 | bt_notes, 29 | bt_content, 30 | bt_wiki_content, 31 | bt_tags, 32 | bt_keywords, 33 | bt_allow_comments, 34 | bt_nb_comments, 35 | bt_statut 36 | ) 37 | VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'); 38 | return $req->execute(array( 39 | 'article', 40 | $post['bt_id'], 41 | $post['bt_date'], 42 | $post['bt_title'], 43 | $post['bt_abstract'], 44 | $post['bt_link'], 45 | $post['bt_notes'], 46 | $post['bt_content'], 47 | $post['bt_wiki_content'], 48 | $post['bt_tags'], 49 | $post['bt_keywords'], 50 | $post['bt_allow_comments'], 51 | 0, 52 | $post['bt_statut'] 53 | )); 54 | } elseif ($what == 'modifier-existant') { 55 | $req = $GLOBALS['db_handle']->prepare(' 56 | UPDATE articles 57 | SET bt_date = ?, 58 | bt_title = ?, 59 | bt_link = ?, 60 | bt_abstract = ?, 61 | bt_notes = ?, 62 | bt_content = ?, 63 | bt_wiki_content = ?, 64 | bt_tags = ?, 65 | bt_keywords = ?, 66 | bt_allow_comments = ?, 67 | bt_statut = ? 68 | WHERE ID = ?'); 69 | return $req->execute(array( 70 | $post['bt_date'], 71 | $post['bt_title'], 72 | $post['bt_link'], 73 | $post['bt_abstract'], 74 | $post['bt_notes'], 75 | $post['bt_content'], 76 | $post['bt_wiki_content'], 77 | $post['bt_tags'], 78 | $post['bt_keywords'], 79 | $post['bt_allow_comments'], 80 | $post['bt_statut'], 81 | (int)filter_input(INPUT_POST, 'ID') 82 | )); 83 | } elseif ($what == 'supprimer-existant') { 84 | $req = $GLOBALS['db_handle']->prepare('DELETE FROM articles WHERE ID = ?'); 85 | return $req->execute(array((int)filter_input(INPUT_POST, 'ID'))); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /admin/inc/tpl.php: -------------------------------------------------------------------------------- 1 | '; 24 | $html .= ''; 37 | $html .= '
'; 38 | 39 | $html .= '

'.$titre.'

'; 40 | 41 | $html .= ''; 49 | return $html; 50 | } 51 | 52 | /** 53 | * 54 | */ 55 | function tpl_show_msg() 56 | { 57 | // Success message 58 | $msg = (string)filter_input(INPUT_GET, 'msg'); 59 | if ($msg) { 60 | if (array_key_exists(htmlspecialchars($msg), $GLOBALS['lang'])) { 61 | $nbnew = (string)filter_input(INPUT_GET, 'nbnew'); 62 | $suffix = ($nbnew) ? htmlspecialchars($nbnew).' '.$GLOBALS['lang']['rss_nouveau_flux'] : ''; // nb new RSS 63 | confirmation($GLOBALS['lang'][$msg].$suffix); 64 | } 65 | } 66 | 67 | // Error message 68 | $errmsg = (string)filter_input(INPUT_GET, 'errmsg'); 69 | if ($errmsg) { 70 | if (array_key_exists($errmsg, $GLOBALS['lang'])) { 71 | no_confirmation($GLOBALS['lang'][$errmsg]); 72 | } 73 | } 74 | } 75 | 76 | /** 77 | * 78 | */ 79 | function tpl_show_preview($article) 80 | { 81 | if (isset($article)) { 82 | $apercu = '

'.$article['bt_title'].'

'; 83 | if (empty($article['bt_abstract'])) { 84 | $article['bt_abstract'] = mb_substr(strip_tags($article['bt_content']), 0, 249).'…'; 85 | } 86 | $apercu .= '
'.$article['bt_abstract'].'
'; 87 | $apercu .= '
'.rel2abs_admin($article['bt_content']).'
'; 88 | echo '
'.$apercu.'
'; 89 | } 90 | } 91 | 92 | /** 93 | * 94 | */ 95 | function tpl_get_html_head($title) 96 | { 97 | $html = ''; 98 | $html .= ''; 99 | $html .= ''; 100 | $html .= ''; 101 | $html .= ''; 102 | $html .= ''; 103 | $html .= ''.$title.' | '.BLOGOTEXT_NAME.''; 104 | $html .= ''; 105 | $html .= ''; 106 | return $html; 107 | } 108 | 109 | /** 110 | * 111 | */ 112 | function tpl_get_footer($begin_time = '') 113 | { 114 | $msg = ''; 115 | if ($begin_time != '') { 116 | $dt = round((microtime(true) - $begin_time), 6); 117 | $msg = ' - '.$GLOBALS['lang']['rendered'].' '.$dt.' s '.$GLOBALS['lang']['using'].' '.DBMS; 118 | } 119 | 120 | $html = '
'; 121 | $html .= '
'; 122 | $html .= ''; 123 | $html .= ''; 124 | $html .= ''; 125 | return $html; 126 | } 127 | 128 | /** 129 | * 130 | */ 131 | function confirmation($message) 132 | { 133 | echo '
'.$message.'
'; 134 | } 135 | 136 | /** 137 | * 138 | */ 139 | function no_confirmation($message) 140 | { 141 | echo '
'.$message.'
'; 142 | } 143 | 144 | /** 145 | * 146 | */ 147 | function info($message) 148 | { 149 | return '

'.$message.'

'; 150 | } 151 | 152 | /** 153 | * 154 | */ 155 | function question($message) 156 | { 157 | echo '

'.$message.'

'; 158 | } 159 | 160 | /** 161 | * 162 | */ 163 | function php_lang_to_js($a) 164 | { 165 | $frontend_str = array(); 166 | $frontend_str['maxFilesSize'] = min(return_bytes(ini_get('upload_max_filesize')), return_bytes(ini_get('post_max_size'))); 167 | $frontend_str['rssJsAlertNewLink'] = $GLOBALS['lang']['rss_jsalert_new_link']; 168 | $frontend_str['rssJsAlertNewLinkFolder'] = $GLOBALS['lang']['rss_jsalert_new_link_folder']; 169 | $frontend_str['confirmFeedClean'] = $GLOBALS['lang']['confirm_feed_clean']; 170 | $frontend_str['confirmCommentSuppr'] = $GLOBALS['lang']['confirm_comment_suppr']; 171 | $frontend_str['activer'] = $GLOBALS['lang']['activer']; 172 | $frontend_str['desactiver'] = $GLOBALS['lang']['desactiver']; 173 | $frontend_str['errorPhpAjax'] = $GLOBALS['lang']['error_phpajax']; 174 | $frontend_str['errorCommentSuppr'] = $GLOBALS['lang']['error_comment_suppr']; 175 | $frontend_str['errorCommentValid'] = $GLOBALS['lang']['error_comment_valid']; 176 | $frontend_str['questionQuitPage'] = $GLOBALS['lang']['question_quit_page']; 177 | $frontend_str['questionCleanRss'] = $GLOBALS['lang']['question_clean_rss']; 178 | $frontend_str['questionSupprComment'] = $GLOBALS['lang']['question_suppr_comment']; 179 | $frontend_str['questionSupprArticle'] = $GLOBALS['lang']['question_suppr_article']; 180 | $frontend_str['questionSupprFichier'] = $GLOBALS['lang']['question_suppr_fichier']; 181 | 182 | $sc = 'var BTlang = '.json_encode($frontend_str).';'; 183 | 184 | if ($a == 1) { 185 | $sc = ''; 186 | } 187 | return $sc; 188 | } 189 | 190 | /** 191 | * 192 | */ 193 | function rel2abs_admin($article) 194 | { 195 | // if relative URI in path, make absolute paths (since /admin/ panel is 1 lv deeper) for href/src. 196 | $article = preg_replace('#(src|href)=\"(?!(/|[a-z]+://))#i', '$1="../', $article); 197 | return $article; 198 | } 199 | -------------------------------------------------------------------------------- /admin/index.php: -------------------------------------------------------------------------------- 1 | $value) { 32 | $return[] = array('nb' => $value, 'nb_scale' => floor($value / $ratio), 'date' => $key); 33 | } 34 | 35 | return $return; 36 | } 37 | 38 | /** 39 | * Count the number of items into the DTB for the Nth last months. 40 | * Return an associated array: YYYYMM => number 41 | */ 42 | function get_tableau_date($dataType) 43 | { 44 | $showMin = 12; // (int) minimal number of months to show 45 | $showMax = 36; // (int) maximal number of months to show 46 | $tableMonths = array(); 47 | 48 | // Uniformize date format. YYYYMMDDHHIISS where DDHHMMSS is 00000000 (to match with the ID format which is \d{14}) 49 | $min = date('Ym', mktime(0, 0, 0, date('m') - $showMax, 1, date('Y'))).'01000000'; 50 | $max = date('Ymd').'235959'; 51 | 52 | $btDate = ($dataType == 'articles') ? 'bt_date' : 'bt_id'; 53 | 54 | $sql = ' 55 | SELECT substr('.$btDate.', 1, 6) AS date, count(*) AS idbydate 56 | FROM '.$dataType.' 57 | WHERE '.$btDate.' BETWEEN '.$min.' AND '.$max.' 58 | GROUP BY date 59 | ORDER BY date'; 60 | 61 | $req = $GLOBALS['db_handle']->prepare($sql); 62 | $req->execute(); 63 | $tab = $req->fetchAll(PDO::FETCH_ASSOC); 64 | 65 | foreach ($tab as $i => $month) { 66 | $tableMonths[$month['date']] = $month['idbydate']; 67 | } 68 | 69 | // Fill empty months 70 | for ($i = $showMin; $i >= 0; $i--) { 71 | $month = date('Ym', mktime(0, 0, 0, date('m') - $i, 1, date('Y'))); 72 | if (!isset($tableMonths[$month])) { 73 | $tableMonths[$month] = 0; 74 | } 75 | } 76 | 77 | // order 78 | ksort($tableMonths); 79 | 80 | return $tableMonths; 81 | } 82 | 83 | /** 84 | * Display one graphic. 85 | */ 86 | function display_graph($arr, $title, $cls) 87 | { 88 | $txt = '
'; 89 | $txt .= '
'.ucfirst($title).'
'; 90 | $txt .= '
'; 91 | $txt .= ''; 92 | $txt .= '
'; 93 | $txt .= '
'; 94 | foreach ($arr as $data) { 95 | $txt .= ''; 97 | } 98 | $txt .= '
'; 99 | $txt .= '
'; 100 | $txt .= '
'; 101 | 102 | echo $txt; 103 | } 104 | 105 | 106 | /** 107 | * Process 108 | */ 109 | 110 | $query = (string)filter_input(INPUT_GET, 'q'); 111 | if ($query) { 112 | $query = htmlspecialchars($query); 113 | $numberOfPosts = liste_elements_count('SELECT count(ID) AS nbr FROM articles WHERE ( bt_content || bt_title ) LIKE ?', array('%'.$query.'%')); 114 | $numberOfLinks = liste_elements_count('SELECT count(ID) AS nbr FROM links WHERE ( bt_content || bt_title || bt_link ) LIKE ?', array('%'.$query.'%')); 115 | $numberOfComments = liste_elements_count('SELECT count(ID) AS nbr FROM commentaires WHERE bt_content LIKE ?', array('%'.$query.'%')); 116 | $numberOfFeeds = liste_elements_count('SELECT count(ID) AS nbr FROM rss WHERE ( bt_content || bt_title ) LIKE ?', array('%'.$query.'%')); 117 | $numberOfFiles = sizeof(liste_base_files('recherche', urldecode($query), '')); 118 | } else { 119 | $numberOfPosts = liste_elements_count('SELECT count(ID) AS nbr FROM articles', array()); 120 | $numberOfLinks = liste_elements_count('SELECT count(ID) AS nbr FROM links', array()); 121 | $numberOfComments = liste_elements_count('SELECT count(ID) AS nbr FROM commentaires', array()); 122 | 123 | $posts = scaled_size(get_tableau_date('articles'), 150); 124 | $posts = array_reverse($posts); 125 | $links = scaled_size(get_tableau_date('links'), 150); 126 | $links = array_reverse($links); 127 | $comments = scaled_size(get_tableau_date('commentaires'), 150); 128 | $comments = array_reverse($comments); 129 | } 130 | 131 | 132 | /** 133 | * echo 134 | */ 135 | 136 | echo tpl_get_html_head($GLOBALS['lang']['label_resume']); 137 | 138 | echo ''; 145 | 146 | echo '
'; 147 | echo '
'; 148 | echo '
'; 149 | 150 | if ($query) { 151 | // Show search results 152 | echo '
'; 153 | echo '
'.$GLOBALS['lang']['recherche'].'  '.$query.'
'; 154 | echo ''; 161 | echo '
'; 162 | } else { 163 | // Main Dashboard 164 | if ($numberOfPosts) { 165 | display_graph($posts, $GLOBALS['lang']['label_articles'], 'posts'); 166 | } 167 | if ($numberOfComments) { 168 | display_graph($comments, $GLOBALS['lang']['label_commentaires'], 'comments'); 169 | } 170 | if ($numberOfLinks) { 171 | display_graph($links, $GLOBALS['lang']['label_links'], 'links'); 172 | } 173 | if (!max($numberOfPosts, $numberOfComments, $numberOfLinks)) { 174 | echo info($GLOBALS['lang']['note_no_article']); 175 | } 176 | } 177 | 178 | echo '
'; 179 | echo << 181 | 203 | EOS; 204 | 205 | echo tpl_get_footer($begin); 206 | -------------------------------------------------------------------------------- /admin/links.php: -------------------------------------------------------------------------------- 1 | (string)filter_input(INPUT_POST, 'token'), 20 | 'bt_id' => (string)filter_input(INPUT_POST, 'bt_id'), 21 | 'fichier' => (string)filter_input(INPUT_POST, 'fichier'), 22 | 23 | 'url' => (string)filter_input(INPUT_GET, 'url'), 24 | 'id' => (string)filter_input(INPUT_GET, 'id'), 25 | 'filtre' => (string)filter_input(INPUT_GET, 'filtre'), 26 | 'q' => (string)filter_input(INPUT_GET, 'q'), 27 | ); 28 | $vars['_verif_envoi'] = (filter_input(INPUT_POST, '_verif_envoi') !== null); 29 | $vars['is_it_edit'] = (filter_input(INPUT_POST, 'is_it_edit') !== null); 30 | $vars['add_to_files'] = (filter_input(INPUT_POST, 'add_to_files') !== null); 31 | $vars['ajout'] = (filter_input(INPUT_GET, 'ajout') !== null); 32 | 33 | 34 | function validate_form_link() 35 | { 36 | global $vars; 37 | $errors = array(); 38 | 39 | if (!check_token($vars['token'])) { 40 | $errors[] = $GLOBALS['lang']['err_wrong_token']; 41 | } 42 | if (!preg_match('#^\d{14}$#', $vars['bt_id'])) { 43 | $errors[] = $GLOBALS['lang']['err_wrong_id']; 44 | } 45 | 46 | return $errors; 47 | } 48 | 49 | // Traitment 50 | $errorsForm = array(); 51 | $step = (!$vars['url']) ? 1 : 2; 52 | if (preg_match('#^\d{14}$#', $vars['id'])) { 53 | $step = 'edit'; 54 | } 55 | 56 | if ($vars['_verif_envoi']) { 57 | $link = init_post_link2(); 58 | $errorsForm = validate_form_link($link); 59 | $step = 'edit'; 60 | if (!$errorsForm) { 61 | // URL est un fichier !html !js !css !php ![vide] && téléchargement de fichiers activé : 62 | if (!$vars['is_it_edit'] && $GLOBALS['dl_link_to_files'] >= 1) { 63 | // dl_link_to_files : 0 = never ; 1 = always ; 2 = ask with checkbox 64 | if ($vars['add_to_files']) { 65 | $vars['fichier'] = $link['bt_link']; 66 | $file = init_post_fichier(); 67 | $errors = valider_form_fichier($file); 68 | 69 | $GLOBALS['liste_fichiers'] = open_serialzd_file(FILES_DB); 70 | bdd_fichier($file, 'ajout-nouveau', 'download', $link['bt_link']); 71 | } 72 | } 73 | traiter_form_link($link); 74 | } 75 | } 76 | 77 | $arr = array(); 78 | if (!$vars['url'] && !$vars['ajout']) { 79 | if ($vars['filtre']) { 80 | // for "tags" the requests is "tag.$search" : here we split the type of search and what we search. 81 | $type = substr($vars['filtre'], 0, -strlen(strstr($vars['filtre'], '.'))); 82 | $search = htmlspecialchars(ltrim(strstr($vars['filtre'], '.'), '.')); 83 | 84 | if (preg_match('#^\d{6}(\d{1,8})?$#', $vars['filtre'])) { 85 | $sql = ' 86 | SELECT * 87 | FROM links 88 | WHERE bt_id LIKE ? 89 | ORDER BY bt_id DESC'; 90 | $arr = liste_elements($sql, array($vars['filtre'].'%'), 'links'); 91 | } elseif ($vars['filtre'] == 'draft' || $vars['filtre'] == 'pub') { 92 | $sql = ' 93 | SELECT * 94 | FROM links 95 | WHERE bt_statut = ? 96 | ORDER BY bt_id DESC'; 97 | $arr = liste_elements($sql, array((int)($vars['filtre'] == 'draft')), 'links'); 98 | } elseif ($type == 'tag' && $search) { 99 | $sql = ' 100 | SELECT * 101 | FROM links 102 | WHERE bt_tags LIKE ? 103 | OR bt_tags LIKE ? 104 | OR bt_tags LIKE ? 105 | OR bt_tags LIKE ? 106 | ORDER BY bt_id DESC'; 107 | $arr = liste_elements($sql, array($search, $search.',%', '%, '.$search, '%, '.$search.', %'), 'links'); 108 | } else { 109 | $sql = ' 110 | SELECT * 111 | FROM links 112 | ORDER BY bt_id DESC 113 | LIMIT '.($GLOBALS['max_linx_admin'] + 0); 114 | $arr = liste_elements($sql, array(), 'links'); 115 | } 116 | } elseif ($vars['q']) { 117 | $arr = parse_search($vars['q']); 118 | $sqlWhere = implode(array_fill(0, count($arr), '(bt_content || bt_title || bt_link) LIKE ?'), 'AND'); 119 | $sql = ' 120 | SELECT * 121 | FROM links 122 | WHERE '.$sqlWhere.' 123 | ORDER BY bt_id DESC'; 124 | $arr = liste_elements($sql, $arr, 'links'); 125 | } elseif ($vars['id']) { 126 | $sql = ' 127 | SELECT * 128 | FROM links 129 | WHERE bt_id = ?'; 130 | $arr = liste_elements($sql, array($vars['id']), 'links'); 131 | } else { 132 | $sql = ' 133 | SELECT * 134 | FROM links 135 | ORDER BY bt_id DESC 136 | LIMIT '.($GLOBALS['nb_list_linx'] + 0); 137 | $arr = liste_elements($sql, array(), 'links'); 138 | } 139 | } 140 | 141 | 142 | echo tpl_get_html_head($GLOBALS['lang']['mesliens']); 143 | 144 | echo ''; 151 | 152 | echo '
'; 153 | 154 | // Subnav 155 | echo ''; 163 | 164 | echo '
'; 165 | 166 | if ($step == 'edit' && $arr[0]) { 167 | echo afficher_form_link($step, $errorsForm, $arr[0]); 168 | } elseif ($step == 2) { 169 | echo afficher_form_link($step, $errorsForm); 170 | } else { 171 | echo afficher_form_link(1, $errorsForm); 172 | echo ''; 180 | } 181 | 182 | echo ''; 183 | echo ''; 195 | 196 | echo tpl_get_footer($begin); 197 | -------------------------------------------------------------------------------- /admin/logout.php: -------------------------------------------------------------------------------- 1 | li { 11 | max-width: 100%; 12 | padding: 10px 20px; 13 | min-height: 50px; 14 | display: flex; 15 | align-items: center; 16 | border-bottom: 1px solid rgba(0, 0, 0, .1); 17 | } 18 | 19 | #modules > li:hover { 20 | background-color: #eee; 21 | } 22 | 23 | #modules > li:hover + div, 24 | #modules > li + div:hover { 25 | transition: box-shadow 0.5s ease 0s; 26 | position: relative; 27 | box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.19), 0px 8px 17px 0px rgba(0, 0, 0, 0.2); 28 | } 29 | 30 | #modules > li a { 31 | color: inherit; 32 | text-decoration: none; 33 | vertical-align: middle; 34 | } 35 | 36 | #modules > li > span:nth-of-type(1) { 37 | display: inline-block; 38 | flex: 0 0 70px; 39 | margin-top: -3px; 40 | } 41 | 42 | #modules > li > span:nth-of-type(2) { 43 | flex: 1 1 auto; 44 | } 45 | 46 | #modules > li + div { 47 | padding: 10px 20px; 48 | background: rgba(0, 0, 0, .05); 49 | } 50 | 51 | #modules > li + div > p:nth-of-type(1){ 52 | margin: 1.4em 0; 53 | } 54 | 55 | #modules > li + div > p:nth-of-type(2){ 56 | display:flex; 57 | flex-wrap: wrap; 58 | margin-bottom: 0.2em; 59 | padding-top: 0.7em; 60 | /* border-top: 1px solid rgba(0,0,0,0.03); */ 61 | } 62 | #modules > li + div > p a { 63 | text-decoration:none; 64 | } 65 | #modules > li + div > p:nth-of-type(2) span{ 66 | flex: 1 0 50%; 67 | } 68 | @media (max-width: 500px) { 69 | #modules > li + div > p:nth-of-type(2) span:nth-of-type(1){ 70 | margin-bottom:8px; 71 | } 72 | #modules > li + div > p:nth-of-type(2) span{ 73 | flex: 1 0 100%; 74 | } 75 | } 76 | #modules > li + div > p:nth-of-type(2) span:nth-of-type(2){ 77 | text-align: right; 78 | } 79 | 80 | #modules > li + div code { 81 | display: inline-block; /* for easy double-clic selection */ 82 | border: 1px outset #eee; 83 | padding: 2px 5px; 84 | margin-right: 10px; 85 | font-size: .8em; 86 | } 87 | 88 | #modules > li + div code:hover{ 89 | cursor: help; 90 | } 91 | 92 | #modules > li + div:not(last-child) { 93 | border-bottom: 1px solid rgba(0, 0, 0, .1); 94 | } 95 | 96 | .expandable_arrow{ 97 | font-weight:bold; 98 | font-size:2em; 99 | padding:0 16px; 100 | cursor:pointer; 101 | color: #AEAEAE; 102 | transform : rotate(-90deg); 103 | } 104 | 105 | #modules > li:hover .expandable-arrow{ 106 | color: #A4A4A4; 107 | } 108 | -------------------------------------------------------------------------------- /admin/style/style-articles.css: -------------------------------------------------------------------------------- 1 | /* TABLE LISTE BILLETS 2 | --------------------------------------------------------------------------- */ 3 | 4 | #billets { 5 | padding: 0; 6 | margin: auto; 7 | list-style: none; 8 | } 9 | 10 | #billets a:not(:hover), 11 | #billets > li > span:nth-of-type(3) a:hover, 12 | #billets > li > span:nth-of-type(4) a:hover { 13 | text-decoration: none; 14 | } 15 | 16 | #billets > li { 17 | padding: 10px 20px; 18 | min-height: 50px; 19 | display: flex; 20 | align-items: center; 21 | border-bottom: 1px solid rgba(0, 0, 0, .1); 22 | } 23 | 24 | #billets > li:hover { 25 | transition: box-shadow 0.5s ease 0s; 26 | position: relative; 27 | box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.19), 0px 8px 17px 0px rgba(0, 0, 0, 0.2); 28 | } 29 | 30 | #billets > li.planned { 31 | background: #f0f0f0; 32 | } 33 | 34 | #billets > li > span:nth-of-type(1)::before, 35 | #billets > li > span:nth-of-type(2)::before, 36 | #billets > li > span:nth-of-type(3) a::before, 37 | #billets > li > span:nth-of-type(4) a::before { 38 | font-size: 1.4em; 39 | margin-right: 5px; 40 | color: rgba(0, 0, 0, .5); 41 | } 42 | 43 | #billets > li > span:nth-of-type(1)::before { 44 | font-size: 1.9em; 45 | margin-right: 20px; 46 | } 47 | 48 | #billets > li > span:nth-of-type(1).on::before { 49 | content: "\e91c"; 50 | color: rgba(101, 234, 143, 1); 51 | } 52 | 53 | #billets > li > span:nth-of-type(1).off::before { 54 | content: "\e917"; 55 | color: rgba(252, 101, 101, 1); 56 | } 57 | 58 | #billets > li > span:nth-of-type(1) { /*title*/ 59 | flex: 1; 60 | padding: 0 10px 0 0; 61 | } 62 | 63 | #billets > li > span:nth-of-type(n+2) { 64 | opacity: .5; 65 | font-size: .9em; 66 | } 67 | #billets > li:hover > span:nth-of-type(n+2) { 68 | opacity: 1; 69 | } 70 | 71 | #billets > li > span:nth-of-type(1), 72 | #billets > li > span:nth-of-type(1) a { 73 | white-space: nowrap; 74 | overflow: hidden; 75 | text-overflow: ellipsis; 76 | } 77 | 78 | #billets > li > span:nth-of-type(2) { /*date*/ 79 | text-align: center; 80 | } 81 | #billets > li > span:nth-of-type(2)::before { 82 | content: "\e918"; 83 | } 84 | 85 | #billets > li > span:nth-of-type(3) { /*comms*/ 86 | padding: 0 0 0 12px; 87 | margin: 0 15px 0 10px; 88 | } 89 | #billets > li > span:nth-of-type(3) a { 90 | } 91 | #billets > li > span:nth-of-type(3) a::before { 92 | content: "\e91b"; 93 | } 94 | 95 | 96 | #billets > li > span:nth-of-type(4) a::before { /* prev */ 97 | content: "\e902"; 98 | } 99 | 100 | 101 | #billets > li > span:nth-of-type(1) a, 102 | #billets > li > span:nth-of-type(2) a, 103 | #billets > li > span:nth-of-type(3) a { 104 | color: inherit; 105 | } 106 | -------------------------------------------------------------------------------- /admin/style/style-auth.css: -------------------------------------------------------------------------------- 1 | /* AUTH 2 | -------------------------------------------------------------------------------- */ 3 | 4 | #pageauth { 5 | font-size: 1em; 6 | display: block; 7 | clear: both; 8 | margin: auto; 9 | text-align: center; 10 | } 11 | 12 | #auth, 13 | #install { 14 | width: 320px; 15 | margin: auto; 16 | box-sizing: border-box; 17 | } 18 | 19 | #auth p { 20 | display: flex; 21 | justify-content: center; 22 | padding: 5px 0; 23 | } 24 | 25 | #install p { 26 | width: 240px; 27 | text-align: left; 28 | margin: 15px auto; 29 | } 30 | 31 | #auth p label:not([for="stay_logged"]) { 32 | width: 24px; 33 | height: 1.7em; 34 | box-sizing: border-box; 35 | overflow: hidden; 36 | display: inline-block; 37 | color: rgba(0, 0, 0, .5); 38 | font-size: 1.7em; 39 | } 40 | 41 | #auth p label:not([for="stay_logged"])::before { 42 | height: 1.7em; 43 | line-height: 1.7em; 44 | } 45 | 46 | #install p label, 47 | #install p input.text { 48 | min-height: 30px; 49 | box-sizing: border-box; 50 | display: inline-block; 51 | vertical-align: middle; 52 | } 53 | 54 | #install p label { 55 | display: block; 56 | text-align: left; 57 | line-height: 2em; 58 | } 59 | 60 | #auth input.text, 61 | #install input.text { 62 | width: 200px; 63 | padding: 0 5px; 64 | line-height: 1.7em; 65 | } 66 | 67 | #install input.text { 68 | width: 240px; 69 | padding: 0; 70 | } 71 | 72 | #install #mdp, 73 | #install #mysql_password { 74 | width: 210px; 75 | } 76 | #install .unveilmdp { 77 | vertical-align: middle; 78 | border: none; 79 | width: 30px; 80 | display: inline-block; 81 | height: 30px; 82 | background: none; 83 | padding: 0; 84 | border-bottom: 1px solid silver; 85 | } 86 | 87 | #install .unveilmdp::before { 88 | content: "\e91c"; 89 | font-size: 2em; 90 | } 91 | 92 | #install input[type="text"]+.unveilmdp::before { 93 | color: red; 94 | } 95 | 96 | #auth p label[for="user"]::before { content: "\e930"; } 97 | #auth p label[for="password"]::before { content: "\e93d"; } 98 | #auth p label[for="word"]::before { content: "\e93b"; } 99 | 100 | 101 | #auth .button-submit, 102 | #install .button-submit { 103 | width: 200px; 104 | line-height: 1.9em; 105 | margin-top: 20px; 106 | } 107 | 108 | #pageauth h1 { 109 | margin: 0 auto 25px; 110 | font-size: 2.7em; 111 | } 112 | 113 | #pageauth h1#step { /* install */ 114 | font-size: 1.8em; 115 | color: #999; 116 | } 117 | 118 | #freecap { 119 | border: 1px dashed silver; 120 | } 121 | 122 | #pageauth label { 123 | text-align: center; 124 | } 125 | 126 | #pageauth label[for="sgdb"] { 127 | display: inline; 128 | } 129 | -------------------------------------------------------------------------------- /admin/style/style-commentaires.css: -------------------------------------------------------------------------------- 1 | /* COMMENTAIRES */ 2 | 3 | #liste-commentaires { 4 | padding: .1px 0 0; /* firefix (parent + padding-top:0) + (child with margin-top) « bug » */ 5 | } 6 | 7 | .commentbloc, 8 | .linkbloc { 9 | position: relative; 10 | z-index: 1; 11 | color: #444; 12 | margin: 20px auto; 13 | padding: 0; 14 | page-break-inside: avoid; 15 | -webkit-column-break-inside: avoid; 16 | } 17 | 18 | .commentbloc { 19 | border-bottom: 1px solid #eee; 20 | margin: 0 0 25px 0; 21 | padding: 0; 22 | display: flex; 23 | } 24 | 25 | .commentbloc .comm-side-icon { 26 | flex: 0 0 160px; 27 | text-align: center; 28 | } 29 | 30 | .commentbloc:not(:last-of-type) .comm-side-icon::after { 31 | content: ""; 32 | background-color: rgba(0, 0, 0, .05); 33 | display: block; 34 | width: 6px; 35 | height: 20%; 36 | height: calc(100% - 101px); 37 | position: relative; 38 | margin: 0 auto; 39 | top: 10px; 40 | } 41 | .commentbloc .comm-side-icon img { 42 | display: block; 43 | margin: 5px auto 10px; 44 | border-radius: 48px; 45 | box-shadow: 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.24); 46 | width: 48px; 47 | } 48 | .commentbloc .comm-main-frame { 49 | position: relative; 50 | padding-bottom: 25px; 51 | flex: 1; 52 | min-width: 0; 53 | } 54 | 55 | .comm-main-frame::after, 56 | .linkbloc::after { 57 | content: ""; 58 | position: absolute; 59 | top: 0; left: 0; 60 | width: 100%; height: 100%; 61 | box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 8px 17px 0 rgba(0, 0, 0, 0.2); 62 | opacity: 0; 63 | transition: opacity 0.3s ease-in-out 0s; 64 | z-index: -1; 65 | } 66 | 67 | .commentbloc:hover .comm-main-frame::after, 68 | .linkbloc:hover::after { 69 | opacity: 1; 70 | } 71 | 72 | .commentbloc:hover, 73 | .linkbloc:hover { 74 | color: #333; 75 | z-index: 10; 76 | } 77 | 78 | .linkbloc .link-header, 79 | .linkbloc .link-content, 80 | .linkbloc .link-footer, 81 | .commentbloc .comm-header, 82 | .commentbloc .comm-comment { 83 | padding: 15px; 84 | } 85 | 86 | .commentbloc .comm-header, 87 | .linkbloc .link-header { 88 | display: flex; 89 | align-items: center; 90 | padding-right: 40px; 91 | border-bottom: 1px solid #eee; 92 | } 93 | 94 | .commentbloc .comm-header { 95 | padding: 5px 40px 10px 5px; 96 | border-bottom: 0; 97 | } 98 | 99 | .commentbloc .reply { 100 | cursor: pointer; 101 | } 102 | 103 | .commentbloc .webpage a, 104 | .commentbloc .email a, 105 | .commentbloc .reply { 106 | vertical-align: middle; 107 | text-decoration: none; 108 | display: inline-block; 109 | width: 20px; 110 | height: 20px; 111 | overflow: hidden; 112 | opacity: .1; 113 | } 114 | 115 | .commentbloc .webpage a::before, 116 | .commentbloc .email a::before, 117 | .commentbloc .reply::before { 118 | font-size: 20px; 119 | color: rgba(0, 0, 0, .5); 120 | } 121 | 122 | .commentbloc .reply::before { content: "\e920"; } 123 | .commentbloc .email a::before { content: "\e91e"; } 124 | .commentbloc .webpage a::before { content: "\e901"; } 125 | 126 | .commentbloc:hover .webpage a, 127 | .commentbloc:hover .email a, 128 | .commentbloc:hover .reply { 129 | opacity: 1; 130 | } 131 | 132 | .commentbloc .author { 133 | font-weight: bold; 134 | } 135 | 136 | .commentbloc .author a, 137 | .commentbloc .author a:hover, 138 | .commentbloc:hover .author a { 139 | color: inherit; 140 | text-decoration: none; 141 | } 142 | 143 | .commentbloc .comm-header .link-article, 144 | .linkbloc .date { 145 | flex: 1 1 auto; 146 | text-align: right; 147 | color: gray; 148 | font-style: italic; 149 | } 150 | 151 | .commentbloc .comm-side-icon .date { 152 | color: gray; 153 | display: block; 154 | font-size: .8em; 155 | } 156 | 157 | .commentbloc .comm-side-icon .date span { 158 | display: block; 159 | } 160 | .commentbloc .comm-edit-hidden-bloc { 161 | opacity: 0; 162 | height: 0; 163 | overflow: hidden; 164 | clear: both; 165 | } 166 | 167 | .commentbloc a { 168 | color: inherit; 169 | transition: color 0.3s ease-in-out 0s; 170 | } 171 | 172 | /* com options button */ 173 | .comm-options, 174 | .link-options { 175 | z-index: 1; 176 | position: absolute; 177 | right: 0; 178 | top: 0; 179 | padding: 10px; 180 | } 181 | .comm-options { 182 | padding: 15px; 183 | } 184 | 185 | .comm-options::before, 186 | .link-options::before { 187 | content: "\e924"; 188 | font-size: 1.7em; 189 | cursor: pointer; 190 | } 191 | 192 | .comm-options > ul, 193 | .link-options > ul { 194 | right: 9999px; 195 | position: absolute; 196 | top: -10px; 197 | background: white; 198 | margin: 0; 199 | padding: 4px 0; 200 | list-style: none; 201 | border-radius: 3px; 202 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.3); 203 | opacity: 0; 204 | transition: top .2s .3s ease-in, opacity .2s .3s ease-in, right ease-out 0s .5s; 205 | } 206 | 207 | .comm-options:hover ul, 208 | .link-options:hover ul { 209 | right: 5px; 210 | opacity: 1; 211 | top: 5px; 212 | transition: top .2s ease-in .05s, opacity .2s ease-in .05s, right 0s ease-out .05s; 213 | } 214 | 215 | .comm-options > ul > li, 216 | .link-options > ul > li { 217 | line-height: 35px; 218 | padding: 0 100px 0 40px; 219 | cursor: pointer; 220 | white-space: nowrap; 221 | } 222 | 223 | .link-options > ul > li:hover, 224 | .comm-options > ul > li:hover { 225 | background: #f5f5f5; 226 | } 227 | 228 | .commentbloc .comm-content { 229 | padding: 15px 5px; 230 | } 231 | 232 | /* desactivated comments */ 233 | .privatebloc .comm-main-frame { 234 | background: rgba(0, 0, 0, .03); 235 | } 236 | .privatebloc .comm-side-icon { 237 | filter: saturate(0) contrast(0.6) opacity(.6); 238 | } 239 | 240 | .privatebloc h3, .privatebloc h3 a { 241 | font-style: italic; 242 | } 243 | 244 | .privatebloc a, .privatebloc:hover a { 245 | color: black; 246 | } 247 | 248 | /* Commentbloc on Hover */ 249 | .commentbloc:hover a { 250 | color: #45a6ff; 251 | } 252 | 253 | /* Commentbloc on Edit */ 254 | .commentbloc.foreground .comm-edit-hidden-bloc { 255 | transition: opacity 1s cubic-bezier(0.175, 0.885, 0.32, 1); 256 | opacity: 1; 257 | height: auto; 258 | } 259 | 260 | .form-commentaire .formatbut { 261 | border: 1px solid silver; 262 | } 263 | 264 | .commentbloc.foreground .cl-edit { /* hide edit button if already on edit */ 265 | display: none; 266 | } 267 | 268 | /* textarea field in comments */ 269 | .form-commentaire .field { 270 | margin-top: 30px; 271 | } 272 | 273 | .form-commentaire textarea.text { 274 | border-left: 1px solid silver; 275 | border-right: 1px solid silver; 276 | } 277 | /*.form-commentaire textarea.text:not(:invalid) { 278 | border-bottom: 1px solid silver; 279 | }*/ 280 | 281 | .form-commentaire .infos { 282 | margin: 15px auto 0; 283 | max-width: 480px; 284 | } 285 | 286 | .form-commentaire .infos > span { 287 | display: flex; 288 | padding-top: 15px; 289 | } 290 | 291 | 292 | .form-commentaire span > input.text { 293 | flex: 1; 294 | padding: 0 0 0 1px; 295 | } 296 | 297 | .form-commentaire label:not(.activercomm) { 298 | padding: 0; 299 | width: 28px; 300 | height: 28px; 301 | overflow: hidden; 302 | color: rgba(0, 0, 0, .5) 303 | } 304 | 305 | .form-commentaire label:not(.activercomm)::before { 306 | font-size: 1.4em; 307 | display: inline-block; 308 | width: 28px; 309 | height: 28px; 310 | line-height: 28px; 311 | text-align: center; 312 | } 313 | 314 | .form-commentaire label[for^="auteur"]::before { content: "\e930"; } 315 | .form-commentaire label[for^="email"]::before { content: "\e91e"; } 316 | .form-commentaire label[for^="webpage"]::before { content: "\e901"; } 317 | 318 | .form-commentaire label.activercomm { 319 | text-align: left; 320 | display: inline-block; 321 | margin-left: 5px; 322 | vertical-align: middle; 323 | margin-top: 15px; 324 | padding-left: 24px; 325 | } 326 | 327 | 328 | /* New Comment */ 329 | #post-nv-commentaire { 330 | margin-top: 35px; 331 | } 332 | 333 | /* ajax loading animation */ 334 | .ajaxloading .comm-main-frame::before { 335 | content: ""; 336 | display: block; 337 | position: absolute; 338 | top: 0; left: 0; right: 0; bottom: 0; 339 | background: rgba(255, 255, 255, .5); 340 | } 341 | .ajaxloading .comm-main-frame::after { 342 | content: ""; 343 | z-index: +1; 344 | height: 20px; 345 | width: 20px; 346 | border: 4px solid rgba(0, 0, 0, .1); 347 | border-top-color: rgba(0, 0, 0, .5); 348 | border-radius: 50%; 349 | animation: spinnerLoading 0.6s infinite linear; 350 | top: calc(50% - 15px); 351 | box-shadow: none; 352 | left: calc(50% - 15px); 353 | } 354 | 355 | 356 | /* Ajax removing comment animation */ 357 | .deleteFadeOut { 358 | opacity: 1; 359 | animation: disapear .6s; 360 | -webkit-animation: disapear .6s; 361 | } 362 | -------------------------------------------------------------------------------- /admin/style/style-ecrire.css: -------------------------------------------------------------------------------- 1 | /* ECRIRE 2 | ---------------------------------------------------------------------------------- */ 3 | 4 | /* apercu */ 5 | #apercu, 6 | #form-ecrire { 7 | padding: 0 0 1px; 8 | clear: both; 9 | } 10 | 11 | #apercu { 12 | margin-bottom: 15px; 13 | } 14 | 15 | #apercu > h2 { 16 | background: #f0f0f0; 17 | border-radius: 3px 3px 0 0; 18 | padding: 10px 20px; 19 | border-bottom: 1px solid #ddd 20 | } 21 | 22 | #apercu > div { 23 | margin: 20px; 24 | } 25 | 26 | #apercu blockquote, 27 | .link-content blockquote, 28 | .commentbloc .comm-content blockquote { 29 | padding: 10px 10px 10px 15px; 30 | box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3); 31 | } 32 | 33 | #apercu pre, 34 | .link-content pre, 35 | .commentbloc .comm-content pre { 36 | padding: 0; 37 | white-space: pre-wrap; 38 | font-size: .8em; 39 | position: relative; 40 | display: flex; 41 | box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3); 42 | } 43 | 44 | #apercu pre[data-language]::before, 45 | .link-content pre[data-language]::before, 46 | .commentbloc .comm-content pre[data-language]::before { 47 | content: attr(data-language); 48 | display: block; 49 | padding: 15px 2px; 50 | background: rgba(0, 0, 0, .1); 51 | flex: 0 0 45px; 52 | text-align: center; 53 | } 54 | 55 | #apercu pre > code, 56 | .link-content pre > code, 57 | .commentbloc .comm-content pre > code { 58 | flex: 1 1 auto; 59 | display: block; 60 | padding: 15px; 61 | } 62 | 63 | #apercu img { 64 | padding: 2px; 65 | border: 1px solid #ddd; 66 | max-width: 100%; 67 | height: auto; 68 | } 69 | 70 | #form-ecrire { 71 | padding: 5px 5px 15px; 72 | } 73 | 74 | #form-ecrire textarea { 75 | resize: vertical; 76 | } 77 | 78 | #form-ecrire .main-form .text { 79 | width: 100%; 80 | } 81 | 82 | #titre { 83 | font-weight: bold; 84 | font-size: 1.15em; 85 | } 86 | 87 | #chapo_note { 88 | display: flex; 89 | } 90 | 91 | #chapo_note > textarea { 92 | width: auto; 93 | min-width: 0; 94 | } 95 | 96 | #form-ecrire #chapo { 97 | flex: 2 2 auto; 98 | border-right: 1px solid silver; 99 | } 100 | #form-ecrire #notes { 101 | flex: 1 2 auto; 102 | } 103 | 104 | #type_tags, 105 | #mots_cles { 106 | padding: 0 10px; 107 | } 108 | 109 | /* Boutons de formatage */ 110 | p.formatbut { 111 | line-height: 28px; 112 | margin: 0; padding: 0px 5px 2px; 113 | background: #f5f5f5; 114 | } 115 | 116 | .formatbut .but { 117 | padding: 0; 118 | display: inline-block; 119 | text-align: center; 120 | vertical-align: middle; 121 | background: rgba(0, 0, 0, 0); 122 | height: 24px; width: 24px; 123 | border: 1px solid transparent; 124 | border-radius: 4px; 125 | } 126 | 127 | .formatbut .but:hover { 128 | transition: border-color .3s; 129 | border-color: silver; 130 | } 131 | 132 | .formatbut .but:active { 133 | border-color: gray; 134 | background: #cde6ff; 135 | background: linear-gradient(to top, white, #d6d6d6); 136 | } 137 | 138 | .formatbut .but > span:nth-of-type(1) { 139 | display: inline-block; 140 | width: 24px; 141 | height: 24px; 142 | background: no-repeat transparent url(formatx2.png) 0 0 / 24px 492px; 143 | } 144 | 145 | .formatbut span.spacer { 146 | margin: 0 4px; 147 | border-left: 1px solid #e5e5e5; 148 | border-right: 1px solid #fafafa 149 | } 150 | 151 | /* buttons : works in comment form and in article form */ 152 | #button01 > span:nth-of-type(1) { background-position: 0px 0px; } /* bold */ 153 | #button02 > span:nth-of-type(1) { background-position: 0px -24px; } /* ital */ 154 | #button03 > span:nth-of-type(1) { background-position: 0px -48px; } /* underline */ 155 | #button04 > span:nth-of-type(1) { background-position: 0px -72px; } /* strike */ 156 | #button05 > span:nth-of-type(1) { background-position: 0px -168px; } /* left align */ 157 | #button06 > span:nth-of-type(1) { background-position: 0px -192px; } /* center align */ 158 | #button07 > span:nth-of-type(1) { background-position: 0px -216px; } /* right align */ 159 | #button08 > span:nth-of-type(1) { background-position: 0px -240px; } /* justify */ 160 | #button09 > span:nth-of-type(1) { background-position: 0px -336px; } /* link */ 161 | #button10 > span:nth-of-type(1) { background-position: 0px -360px; } /* quote */ 162 | #button11 > span:nth-of-type(1) { background-position: 0px -264px; } /* image */ 163 | #button12 > span:nth-of-type(1) { background-position: 0px -384px; } /* code */ 164 | #button13 > span:nth-of-type(1) { background-position: 0px -96px; } /* color edit */ 165 | #button14 > span:nth-of-type(1) { background-position: 0px -120px; } /* font size edit */ 166 | #button15 > span:nth-of-type(1) { background-position: 0px -144px; } /* unicode char insert */ 167 | #button16 > span:nth-of-type(1) { background-position: 0px -288px; } /* ul list */ 168 | #button17 > span:nth-of-type(1) { background-position: 0px -312px; } /* ol list */ 169 | 170 | .but-dropdown { 171 | position: relative; 172 | } 173 | 174 | .but-dropdown .list { 175 | display:none; 176 | padding: 3px; 177 | background-color: white; 178 | width: 140px; 179 | position: absolute; 180 | top: 24px; 181 | left: -1px; 182 | line-height: 20px; 183 | box-shadow: 0px 4px 8px rgba(0, 0, 0, .3); 184 | } 185 | 186 | .but-dropdown:hover .list { 187 | display: block; 188 | } 189 | 190 | /* list colors */ 191 | .but-dropdown .list-color button { 192 | display: inline-block; 193 | background: white; 194 | margin: 0 2px; 195 | width: 22px; 196 | height: 22px; 197 | padding: 3px; 198 | border: 1px solid transparent; 199 | } 200 | 201 | .but-dropdown .list-color button span { 202 | vertical-align: middle; 203 | border: 1px solid #ccc; 204 | margin: 0 auto; 205 | display: block; 206 | width: 12px; 207 | height: 12px; 208 | } 209 | 210 | .but-dropdown .list-color button:hover { 211 | background-color: #ddd; 212 | } 213 | .but-dropdown .list-color button:hover span { 214 | border-color: #888; 215 | } 216 | 217 | /* list sizes */ 218 | .but-dropdown .list-size { 219 | text-align: left; 220 | width: 160px; 221 | padding: 3px 0; 222 | } 223 | 224 | .but-dropdown .list-size button { 225 | color: black; 226 | padding: 2px; 227 | text-align: left; 228 | display: inline-block; 229 | background: white; 230 | margin: 0; 231 | width: 160px; 232 | height: 28px; 233 | margin-top: 3px; 234 | border: 1px solid transparent; 235 | } 236 | 237 | .but-dropdown .list-size button:first-of-type { 238 | height: 23px; 239 | } 240 | 241 | .but-dropdown .list-size button:last-of-type { 242 | height: 33px; 243 | } 244 | 245 | .but-dropdown .list-size button span { 246 | vertical-align: middle; 247 | margin: 0 auto; 248 | } 249 | 250 | .but-dropdown .list-size button:hover { 251 | background-color: #ddd; 252 | } 253 | 254 | /* list caractères unicodes */ 255 | 256 | .but-dropdown .list-spechr { 257 | text-align: left; 258 | width: 384px; 259 | height: 94px; 260 | padding: 3px; 261 | } 262 | 263 | .but-dropdown .list-spechr button { 264 | background: white; 265 | margin: 0 2px 2px 0; 266 | width: 22px; 267 | padding: 0; 268 | height: 22px; 269 | border: 1px solid #ddd; 270 | border-radius: 2px; 271 | text-align: center; 272 | } 273 | 274 | .but-dropdown .list-spechr button:hover { 275 | background-color: #ddd; 276 | } 277 | 278 | /* tags 279 | -------------------------------------------- */ 280 | #form-ecrire #wrap { 281 | padding: 0; 282 | margin: 0; 283 | } 284 | 285 | #tag_bloc { 286 | flex: 0; 287 | margin: 0; 288 | display: flex; 289 | } 290 | 291 | #selected { /*
    */ 292 | margin: 0; 293 | padding: 0; 294 | list-style-type: none; 295 | box-shadow: 0 -1px 0 #dadada inset, 1px 0 0 #dadada; 296 | } 297 | 298 | 299 | #selected > li { 300 | display:inline-block; 301 | padding: 0 10px 0 7px; 302 | color: #333; 303 | background: #eee; 304 | border: 0; 305 | margin: 0 -3px 0 0; 306 | box-shadow: 1px 0px 0 #dadada inset, 0px -1px 0px #dadada inset; 307 | height: 36px; 308 | line-height: 36px; 309 | box-sizing: border-box; 310 | 311 | } 312 | 313 | #selected > li > a { 314 | display: inline-block; 315 | color: inherit; 316 | margin: 0px 5px 0px 8px; 317 | text-decoration: none; 318 | font-weight: bold; 319 | } 320 | 321 | #type_tags { 322 | flex: 1 1 100px; 323 | justify-content: flex-start; 324 | height: 36px; 325 | } 326 | 327 | 328 | /* boutons d’options et date */ 329 | #date-and-opts { 330 | margin-top: 30px; 331 | margin-bottom: 40px; 332 | display: flex; 333 | } 334 | 335 | #date-and-opts > div { 336 | flex: 1 1 auto; 337 | } 338 | 339 | #formdate input, 340 | #formheure input { 341 | background: #FAFAFA; 342 | padding: 11px 5px; 343 | box-shadow: 0 0 2px rgba(0, 0, 0, .2); 344 | border: 0; 345 | text-align: center; 346 | margin-left: 3px; 347 | } 348 | 349 | #formdate input { 350 | width: 8ch; 351 | } 352 | 353 | #opts { 354 | text-align: right; 355 | } 356 | 357 | #formdate, 358 | #formheure, 359 | #formstatut, 360 | #formallowcomment { 361 | display: inline-block; 362 | /* vertical-align: middle;*/ 363 | margin: 2px 25px; 364 | min-height: 40px; 365 | } 366 | 367 | #formstatut label, 368 | #formallowcomment label { 369 | display: inline; 370 | } 371 | 372 | 373 | #formdate::before, 374 | #formheure::before, 375 | #formstatut::before, 376 | #formallowcomment::before { 377 | vertical-align: middle; 378 | font-family: "icon"!important; 379 | font-size: 1.4em; 380 | line-height: 1; 381 | } 382 | 383 | #formdate::before { 384 | content: "\e918"; 385 | color: rgba(252, 101, 101, 1); 386 | } 387 | 388 | #formheure::before { 389 | content: "\e908"; 390 | color: rgba(50, 50, 50, 1); 391 | } 392 | 393 | #formstatut::before { 394 | content: "\e904"; 395 | color: rgba(55, 110, 250, 1); 396 | } 397 | 398 | #formallowcomment::before { 399 | content: "\e91b"; 400 | color: rgba(101, 234, 143, 1); 401 | } 402 | -------------------------------------------------------------------------------- /admin/style/style-graphs.css: -------------------------------------------------------------------------------- 1 | /* GRAPHS */ 2 | 3 | #graphs .graph { 4 | padding-bottom: 20px; 5 | margin-bottom: 60px; 6 | margin-top: 40px; 7 | } 8 | 9 | #graphs .graph .form-legend { 10 | padding: 0; 11 | font-weight: 500; 12 | box-sizing: border-box; 13 | transform: translate(-15px, -50px); 14 | color: rgba(0, 0, 0, .5); 15 | } 16 | 17 | .graph-container { 18 | position: relative; 19 | height: 180px; 20 | margin: 30px 0 40px; 21 | } 22 | 23 | .graph-container > canvas { 24 | height: 150px; 25 | } 26 | 27 | .graph-container .graphique { 28 | position: relative; 29 | top: -180px; 30 | height: 180px; 31 | padding: 30px 0 0; 32 | text-align: center; 33 | line-height: 20px; 34 | direction: rtl; 35 | overflow: hidden; 36 | } 37 | 38 | .graph-container .graphique a { 39 | color: black; 40 | text-decoration: none; 41 | } 42 | 43 | .graph-container .month { 44 | vertical-align: bottom; 45 | display: inline-block; 46 | text-align: center; 47 | padding-bottom: 50px; 48 | width: 30px; 49 | position: relative; 50 | } 51 | 52 | .graph-container .month:first-of-type { 53 | background: red; 54 | width: 0px !important; 55 | } 56 | 57 | .graph-container .month::before { 58 | content: ''; 59 | border: 2px solid white; 60 | height: 5px; 61 | width: 5px; 62 | transform: translateX(5px) translateY(-5px); 63 | display: inline-block; 64 | position: absolute; 65 | border-radius: 50%; 66 | background: rgba(33,150,243,1); 67 | } 68 | 69 | .graph-container .month:first-of-type::before { 70 | content: none; 71 | } 72 | 73 | .graph-container .month-name { 74 | bottom: 0; 75 | display: block; 76 | white-space: pre; 77 | font-size: 80%; 78 | line-height: 100%; 79 | text-transform: capitalize; 80 | border: 1px solid transparent; 81 | border-radius: 2px; 82 | visibility:hidden; 83 | } 84 | @media (max-width: 480px) { 85 | .graph-container .month:nth-child(3n+1) .month-name { 86 | visibility: visible; 87 | } 88 | } 89 | @media (min-width: 480px) { 90 | .graph-container .month:nth-child(2n+1) .month-name { 91 | visibility: visible; 92 | } 93 | } 94 | 95 | .graph-container .month-nb { 96 | top: -25px; 97 | left: 0px; 98 | position: absolute; 99 | width: 100%; 100 | color: #777; 101 | font-weight: bold; 102 | } 103 | 104 | .graph-container .month:hover::before { 105 | border: 2px solid rgba(33,150,243,1); 106 | background: white; 107 | } 108 | 109 | /* Hover line */ 110 | .graph-container .month-bar { 111 | min-height: 1px; 112 | } 113 | .graph-container .month:hover .month-bar { 114 | background-image: linear-gradient(to right, rgba(33,150,243,1) 100%, transparent); 115 | background-size: 2px; 116 | background-position: 50%; 117 | background-repeat: no-repeat; 118 | } 119 | 120 | .graph-container .month:hover .month-name { 121 | font-weight: bold; 122 | border-color: currentColor; 123 | } 124 | 125 | /* global search results */ 126 | #graphs .legend > span { 127 | font-variant: none; 128 | text-decoration: underline 129 | } 130 | 131 | #resultat-recherche { 132 | list-style-type: none; 133 | padding-left: 10px; 134 | } 135 | 136 | #resultat-recherche li { 137 | display: inline-block; 138 | } 139 | #resultat-recherche a { 140 | text-decoration: none; 141 | color: inherit; 142 | display: inline-block; 143 | margin-right: 5px; 144 | vertical-align: middle; 145 | padding: 6px 12px; 146 | box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); 147 | border-radius: 2px; 148 | border: 0px solid transparent; 149 | } 150 | 151 | #resultat-recherche a:hover { 152 | background-color: rgba(0, 0, 0, .05); 153 | } 154 | -------------------------------------------------------------------------------- /admin/style/style-liens.css: -------------------------------------------------------------------------------- 1 | /* MES LIENS 2 | --------------------------------------------------------------------------- */ 3 | #list-link { 4 | -webkit-column-width: 700px; 5 | -moz-column-width: 700px; 6 | column-width: 700px; 7 | margin-top: 20px; 8 | -webkit-column-gap: 20px; 9 | -moz-column-gap: 20px; 10 | column-gap: 20px; 11 | } 12 | 13 | .linkbloc.privatebloc { 14 | border-left: 10px #555 solid; 15 | background: rgba(0, 0, 0, .02); 16 | } 17 | 18 | /* LINKS : Post new link 19 | ------------------------------------------------------*/ 20 | #post-new-lien { 21 | position: relative; 22 | z-index: 1; 23 | } 24 | 25 | #post-new-lien::after { 26 | content: ""; 27 | position: absolute; 28 | top: 0; left: 0; 29 | width: 100%; height: 100%; 30 | box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 0 17px 0 rgba(0, 0, 0, 0.2); 31 | opacity: 0; 32 | transition: opacity 0.5s ease-in-out 0s; 33 | z-index: -1; 34 | } 35 | 36 | #post-new-lien:hover::after { 37 | opacity: 1; 38 | } 39 | 40 | #post-new-lien:hover { 41 | color: #333; 42 | } 43 | 44 | #post-new-lien .contain-input { 45 | margin-top: 5px; 46 | display: flex; 47 | align-items: center; 48 | } 49 | 50 | #post-new-lien label[for="url"] { 51 | width: 24px; 52 | height: 24px; 53 | overflow: hidden; 54 | } 55 | 56 | #post-new-lien label[for="url"]::before { 57 | content: "\e910"; 58 | font-size: 1.3em; 59 | line-height: 24px; 60 | color: rgba(0, 0, 0, .5); 61 | } 62 | 63 | #post-new-lien #url { 64 | width: 100%; 65 | min-width: 0; 66 | } 67 | 68 | #post-new-lien .submit { 69 | margin-top: 20px; 70 | margin-left: 24px; 71 | } 72 | 73 | /* Form new link (title, descr, tags…) 74 | ------------------------------------------------------------*/ 75 | #post-lien { 76 | margin: auto; 77 | width: 650px; 78 | max-width: 100%; 79 | padding: 20px; 80 | box-shadow: 0 0 24px 0 rgba(0, 0, 0, 0.3); 81 | background: white; 82 | display: flex; 83 | flex-direction: column; 84 | resize: both; 85 | overflow: hidden; 86 | min-height: 200px; 87 | min-width: 200px; 88 | } 89 | 90 | #post-lien input.readonly-like { /* form nouveau lien (#2), le lien de l’URL */ 91 | color: #bbb; 92 | font-style: italic; 93 | padding-left: .2em; 94 | } 95 | 96 | #post-lien .text { 97 | padding: 14px 7px 2px 1px; 98 | margin: 5px 0 0 0; 99 | max-width: 100%; 100 | } 101 | 102 | 103 | #description-box { 104 | flex: 1; 105 | display: flex; 106 | } 107 | 108 | #description-box #img-container { 109 | height: 100%; 110 | max-width: 30%; 111 | background: #ddd; 112 | } 113 | #description-box .preview-img { 114 | max-width: 100%; 115 | height: auto; 116 | } 117 | 118 | #description-box #img-container+.description { 119 | padding-left: 10px; 120 | } 121 | 122 | #description-box .description { 123 | padding-top: 15px; 124 | flex: 1; 125 | } 126 | 127 | #post-lien textarea { 128 | min-height: 130px; 129 | resize: none; 130 | } 131 | 132 | /* LINKS : tags */ 133 | /* see also #tag_bloc+ in style-ecrire.css */ 134 | 135 | #post-lien #type_tags { 136 | padding-left: 5px; 137 | margin-top: 0; 138 | padding-top: 5px; 139 | } 140 | 141 | #post-lien #selected li:first-of-type { 142 | border-left-width: 1px; 143 | } 144 | 145 | /* LINKS : list of link-blocs (see also in 146 | "style-commentaires.css" for shared CSS with comments-blocs 147 | --------------------------------------------------------------*/ 148 | .linkbloc:first-of-type { 149 | margin-top: 0; 150 | 151 | } 152 | .linkbloc:first-of-type:last-of-type { 153 | display: inline-block; /* firefox bugfix for avoid collumn-break when single element */ 154 | } 155 | 156 | /* LINKS : link header 157 | --------------------------------*/ 158 | .linkbloc .titre-lien { 159 | text-decoration: none; 160 | font-weight: bold; 161 | color: #333; 162 | flex: 0 1 auto; 163 | display: block; 164 | } 165 | 166 | .linkbloc .titre-lien:hover { 167 | color: #888; 168 | } 169 | 170 | .linkbloc .date, 171 | .linkbloc .hard-link { 172 | font-size: .9em; 173 | color: #aaa; 174 | } 175 | 176 | .linkbloc .hard-link { 177 | word-break: break-all; 178 | } 179 | 180 | /* link options button */ 181 | /* see comm-options button */ 182 | 183 | .link-options > ul > li { 184 | padding: 0; 185 | } 186 | 187 | .link-options > ul > li > a { 188 | padding: 0 100px 0 40px; 189 | box-sizing: border-box; 190 | display: inline-block; 191 | width: 100%; 192 | color: inherit; 193 | text-decoration: none; 194 | } 195 | 196 | /* LINKS : link footer 197 | --------------------------------*/ 198 | .linkbloc .link-footer { 199 | /*display: flex;*//* display block for muti-collum layout */ 200 | display: block; 201 | align-items: center; 202 | background-color: rgba(0, 0, 0, .05); 203 | border-top: #eee; 204 | } 205 | 206 | .linkbloc .link-tags { 207 | flex: 1 0 auto; 208 | margin: 0; 209 | padding: 0; 210 | } 211 | 212 | .linkbloc .link-tags li { 213 | display: inline-block; 214 | padding: 3px 0; 215 | } 216 | 217 | .linkbloc .link-tags a { 218 | display: inline-block; 219 | margin-right: 3px; 220 | padding: 3px 6px; 221 | color: inherit; 222 | text-decoration: none; 223 | background: rgba(0, 0, 0, .05); 224 | border-radius: 3px; 225 | box-shadow: 0 0 1px rgba(0, 0, 0, .3) inset; 226 | } 227 | 228 | .linkbloc .link-tags a:hover { 229 | background: rgba(0, 0, 0, .1); 230 | } 231 | 232 | #post-lien #liste-tags { 233 | min-width: 400px; 234 | width: 50%; 235 | margin: 0 0 2px 25%; 236 | padding-left: 21px; 237 | line-height: 19px; 238 | } 239 | -------------------------------------------------------------------------------- /admin/style/style-mobile-lt1100px.css: -------------------------------------------------------------------------------- 1 | @media (max-width: 1100px) { 2 | /* top nav */ 3 | #top > #nav a { 4 | font-size: .85em; 5 | padding: 0 5px; 6 | } 7 | /* liste billets */ 8 | #billets { width: 100%; } 9 | /* slider images */ 10 | #slider-main-content.infos-on + #slider-infos { 11 | width: 330px; 12 | } 13 | #slider-main-content.infos-on #slider-nav-bar { 14 | right: 330px; 15 | } 16 | #slider-main-content.infos-on { 17 | margin-right: 330px; 18 | } 19 | /* préférences */ 20 | #preferences p { 21 | max-width: 100%; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /admin/style/style-mobile-lt700px.css: -------------------------------------------------------------------------------- 1 | @media (max-width: 700px) { 2 | #axe { 3 | padding: 10px; 4 | } 5 | #subnav form select { 6 | max-width: 35px; 7 | padding-right: 30px; 8 | margin-right: 0; 9 | position: relative; 10 | background: transparent; 11 | box-shadow: none; 12 | } 13 | 14 | #subnav form { 15 | flex: 0 0 50px; 16 | } 17 | 18 | #subnav #form-filtre { 19 | display: inline-block; 20 | background: #fafafa; 21 | margin-right: 5px; 22 | box-shadow: 0px 0px 2px rgba(0, 0, 0, .2); 23 | } 24 | 25 | #subnav #form-filtre::before { 26 | content: "\e941"; 27 | position: relative; 28 | font-size: 2em; 29 | display: inline-block; 30 | width: 0; 31 | left: 5px; 32 | } 33 | 34 | 35 | /* page billets */ 36 | #billets { 37 | } 38 | 39 | /* page écrire */ 40 | #tag_bloc, #date-and-opts { 41 | display: block; 42 | } 43 | #formdate, #formheure, #formstatut, #formallowcomment { 44 | display: block; 45 | margin: 8px 5px; 46 | } 47 | #opts { 48 | text-align: left; 49 | } 50 | 51 | .submit-bttns { 52 | padding: 0; 53 | } 54 | .button-delete, .button-submit, .button-cancel { 55 | min-width: 0; 56 | padding: 5px; 57 | } 58 | 59 | /* comms */ 60 | .commentbloc .comm-options, 61 | .commentbloc .webpage a, 62 | .commentbloc .email a, 63 | .commentbloc .reply { 64 | visibility: visible; 65 | } 66 | .commentbloc .comm-header { 67 | display: block; 68 | } 69 | .commentbloc .comm-side-icon { 70 | flex: 0 0 75px; 71 | } 72 | .commentbloc .comm-side-icon .date { 73 | font-size: .6em; 74 | } 75 | .commentbloc.foreground .comm-side-icon { 76 | display: none; 77 | } 78 | .commentbloc .comm-content blockquote { 79 | margin: auto 5px; 80 | } 81 | 82 | /* links */ 83 | .linkbloc .link-header, .linkbloc .link-footer { 84 | display: block; 85 | } 86 | /* file edit */ 87 | #fichier-meta-info { 88 | margin: 20px 0; 89 | word-wrap: break-word; 90 | word-break: break-all; 91 | } 92 | 93 | /* preferences */ 94 | #preferences p { 95 | display: block; 96 | } 97 | #preferences label { 98 | width: auto; 99 | text-align: left; 100 | } 101 | #preferences .text, 102 | #preferences textarea.text { 103 | width: 100%; 104 | display: block; 105 | } 106 | 107 | /* maintenance */ 108 | #maintenance-form fieldset { 109 | max-width: 100%; 110 | } 111 | #maintenance-form p > label { 112 | display: inline; 113 | width: auto; 114 | text-align: left; 115 | padding-right: 0; 116 | } 117 | 118 | 119 | /* paged des RSS */ 120 | #rss-menu { 121 | padding: 0 10px; 122 | } 123 | #post-list-title { 124 | padding: 5px; 125 | } 126 | #posts-menu { 127 | text-align: left; 128 | border-left: none; 129 | display: block; 130 | } 131 | #posts-menu ul { 132 | margin: 7px 0px; 133 | } 134 | #posts-menu button { 135 | margin: 0px; 136 | } 137 | #message-return { 138 | display: block; 139 | margin: 10px auto; 140 | } 141 | 142 | #feed-list { 143 | transform: translateX(-100%) translateX(10px); 144 | padding-right: 12px; 145 | position: absolute; 146 | z-index: 1; 147 | left: 0; 148 | max-width: 80%; 149 | overflow: visible; 150 | transition: transform .5s ease-in-out .15s; 151 | 152 | } 153 | #feed-list:hover { 154 | transform: translateX(0); 155 | } 156 | #rss-list { 157 | padding-right: 0%; 158 | padding-left: 25px; 159 | margin: auto 0; 160 | } 161 | #post-list > li { 162 | padding: 10px; 163 | } 164 | 165 | /* page fichiers */ 166 | #file-list td:nth-of-type(3), 167 | #file-list th:nth-of-type(3) { 168 | display: none; 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /admin/style/style-mobile-lt850px.css: -------------------------------------------------------------------------------- 1 | @media (max-width: 850px) { 2 | #subnav .nombre-elem { 3 | } 4 | select { 5 | max-width: 100%; 6 | } 7 | 8 | /* liste commentaires */ 9 | .commentbloc.foreground { 10 | margin: 5% 0; 11 | } 12 | .commentbloc .date > span { 13 | display: none; 14 | } 15 | 16 | /* liste fichiers */ 17 | #image-wall { 18 | text-align: center; 19 | padding: 10px; 20 | } 21 | #image-wall .image_bloc { 22 | width: 147px; 23 | height: 147px; 24 | line-height: 147px; 25 | } 26 | 27 | #file-list td { 28 | padding: 5px; 29 | } 30 | 31 | #file-list td:nth-of-type(4), 32 | #file-list th:nth-of-type(4) { 33 | display: none; 34 | } 35 | 36 | #file-list td img { 37 | vertical-align: middle; 38 | width: 20px; 39 | } 40 | 41 | #file-list tr td:nth-of-type(1) { 42 | padding-left: 10px; 43 | width: 20px; 44 | } 45 | 46 | #file-list tr td:nth-of-type(5), 47 | #file-list tr td:last-of-type { 48 | padding-left: 5px; 49 | } 50 | #file-list tr td:last-of-type { 51 | padding-right: 5px; 52 | } 53 | 54 | /* form post liens */ 55 | #post-lien { 56 | width: auto; 57 | } 58 | 59 | /* TOP 60 | ------------------------------------------------------*/ 61 | body { 62 | padding-top: 0; 63 | } 64 | #header { 65 | position: static; 66 | } 67 | #top { 68 | display: flex; 69 | box-sizing: border-box; 70 | padding: 0; 71 | } 72 | #top > #nav, 73 | #top > h1, 74 | #top > #search, 75 | #top > #nav-acc { 76 | box-sizing: border-box; 77 | height: 60px; 78 | line-height: 60px; 79 | vertical-align: middle; 80 | overflow: hidden; 81 | } 82 | 83 | #top > #nav > ul { 84 | padding-right: 0; 85 | } 86 | 87 | /* TOP > right nav bar 88 | ------------------------------------------------------*/ 89 | #top > #nav-acc > ul { 90 | top: -10px; 91 | } 92 | #top > #nav-acc:hover > ul { 93 | top: -00px; 94 | } 95 | 96 | /* TOP > Left nav bar 97 | ------------------------------------------------------*/ 98 | #top > #nav { 99 | flex: 0 0 60px; 100 | text-align: left; 101 | background-color: inherit; 102 | } 103 | 104 | #top > #nav::before { 105 | font-size: 2em; 106 | text-align: center; 107 | content: "\e906"; 108 | width: 60px; 109 | cursor: pointer; 110 | display: inline-block; 111 | } 112 | 113 | #top > #nav ul { 114 | position: absolute; 115 | line-height: 3; 116 | background-color: white; 117 | width: 250px; 118 | min-height: 100%; 119 | left: 0; 120 | transform: translate(-270px); 121 | top: 60px; 122 | box-shadow: 0px 14px 24px rgba(0, 0, 0, 0.6); 123 | z-index: 20; 124 | padding-top: 10px; 125 | transition: transform .4s ease-in-out; 126 | } 127 | 128 | #top > #nav:hover > ul { 129 | transform: translate(0); 130 | } 131 | 132 | #top > #nav > ul > li { 133 | display: block; 134 | margin: 0; 135 | } 136 | 137 | #top > #nav > ul > li > a { 138 | margin: 0; 139 | height: 45px; 140 | line-height: 45px; 141 | padding-left: 15px; 142 | display: block; 143 | text-decoration: none; 144 | color: rgba(0, 0, 0, .6); 145 | vertical-align: middle; 146 | } 147 | #top > #nav > ul > li > a:hover { 148 | background-color: rgba(0, 0, 0, .1); 149 | box-shadow: none; 150 | } 151 | 152 | #top > #nav >ul li a.current { 153 | box-shadow: none; 154 | background-color: rgba(0, 0, 0, .1); 155 | border: 0; 156 | color: #1e88e5; 157 | } 158 | 159 | #nav a:before { 160 | margin-right: 15px; 161 | font-size: 1.4em; 162 | } 163 | 164 | #nav #lien-index:before { content: "\e907"; } 165 | #nav #lien-liste:before { content: "\e90d"; } 166 | #nav #lien-nouveau:before { content: "\e903"; } 167 | #nav #lien-lscom:before { content: "\e91b"; } 168 | #nav #lien-fichiers:before { content: "\e921"; } 169 | #nav #lien-links:before { content: "\e910"; } 170 | #nav #lien-rss:before { content: "\e940"; } 171 | 172 | /* TOP > searchbar 173 | ------------------------------------------------------*/ 174 | #top > #search { 175 | order: 2; 176 | flex: 0 0 42px; 177 | position: static; 178 | } 179 | #top > #search #q { /* normal */ 180 | padding: 5px 20px; 181 | border-radius: 50%; 182 | box-sizing: border-box; 183 | height: 40px; 184 | width: 40px; 185 | z-index: 1; 186 | background-color: transparent; 187 | } 188 | #top #input-rechercher { 189 | background: transparent; 190 | position: relative; 191 | left: -40px; 192 | } 193 | 194 | #top > #search #q:focus, 195 | #top > #search #q[value=""]:focus, 196 | #top > #search #q:not([value=""]) { /* focus OR not empty (a search is done) */ 197 | position: absolute; 198 | border-radius: 3px; 199 | padding: 0 10px; 200 | width: 80%; 201 | width: calc(100% - 60px - 60px ); 202 | top: 10px; right: 60px; 203 | background: rgba(255, 255, 255, 1); 204 | } 205 | 206 | #top > #search:hover #input-rechercher:active, 207 | #top > #search #q:focus+#input-rechercher, 208 | #top > #search #q:not([value=""])+#input-rechercher { 209 | position: static; 210 | } 211 | 212 | 213 | #top > #search #q[value=""]:focus { /* onfocus */ 214 | animation: popup-search .4s; 215 | animation-fill-mode: forwards; 216 | } 217 | 218 | @keyframes popup-search { 219 | 0% { 220 | width: 50px; 221 | } 222 | 100% { 223 | width: 100%; 224 | width: calc(100% - 60px - 60px ); 225 | } 226 | } 227 | 228 | /* TOP > PageTitle 229 | ------------------------------------------------------*/ 230 | #top > h1 { 231 | display: block; 232 | order: 2; 233 | flex: 1 1 auto; 234 | height: 50px; 235 | padding: 0 2%; 236 | margin: 0; 237 | font-size: 1.3em; 238 | } 239 | #top > #search { 240 | order: 3; 241 | } 242 | #top > #nav-acc { 243 | order: 4; 244 | } 245 | 246 | /* liste des articles */ 247 | #billets > li { 248 | display: block; 249 | line-height: initial; 250 | text-align: right; 251 | padding: 0 10px; 252 | } 253 | #billets > li > span:nth-of-type(2), 254 | #billets > li > span:nth-of-type(3), 255 | #billets > li > span:nth-of-type(4) { 256 | font-size: .8em; 257 | } 258 | 259 | #billets > li > span:nth-of-type(1) { 260 | text-align: left; 261 | padding: 0; 262 | display: block; 263 | line-height: 50px; 264 | } 265 | #billets > li > span:nth-of-type(1)::before { 266 | margin-right: 10px; 267 | } 268 | 269 | #billets > li > span:nth-of-type(2) { 270 | padding: 10px 10px 10px 0; 271 | } 272 | #billets > li > span:nth-of-type(2) > a+span { 273 | display: none; 274 | } 275 | #billets > li > span:nth-of-type(3) { 276 | padding: 0; 277 | margin-left: 0; 278 | } 279 | 280 | #billets > li > span:nth-of-type(4) a::before { 281 | top: 2px; 282 | } 283 | 284 | /* les RSS */ 285 | #post-list > li .date > span { 286 | display: none; 287 | } 288 | #post-list > li .post-title { 289 | flex-wrap: wrap; 290 | } 291 | #post-list > li .post-title .site { 292 | display: none; 293 | } 294 | #post-list > li .post-title .date { 295 | flex: 1 0 auto; 296 | } 297 | 298 | #post-list > li .post-title > a { 299 | flex: 1 0 100%; 300 | } 301 | #post-list > li .post-title > a:hover { 302 | flex: 1 0 100%; 303 | } 304 | 305 | /* Slider */ 306 | #slider-main-content.infos-on + #slider-infos { 307 | width: 250px; 308 | } 309 | #slider-main-content.infos-on #slider-nav-bar { 310 | right: 250px; 311 | } 312 | #slider-main-content.infos-on { 313 | margin-right: 250px; 314 | } 315 | #slider-infos > #infos-details { 316 | padding-left: 40px; 317 | } 318 | 319 | } 320 | -------------------------------------------------------------------------------- /admin/style/style-preferences.css: -------------------------------------------------------------------------------- 1 | /* PRÉFÉRENCES 2 | ------------------------------------------------------------ */ 3 | #preferences { 4 | max-width: 900px; 5 | margin: auto; 6 | } 7 | 8 | /* field sets */ 9 | #preferences .pref { 10 | padding-bottom: 20px; 11 | margin-bottom: 60px; 12 | margin-top: 40px; 13 | } 14 | 15 | #preferences .form-legend { 16 | padding: 0; 17 | font-weight: 500; 18 | box-sizing: border-box; 19 | transform: translate(-15px, -50px); 20 | color: rgba(0, 0, 0, .5); 21 | } 22 | 23 | #preferences p { 24 | max-width: 100%; 25 | margin: 20px auto; 26 | display: flex; 27 | align-items: center; 28 | } 29 | 30 | #preferences label { 31 | text-align: right; 32 | padding-right: 5px; 33 | margin: 10px 0; 34 | flex: 0 1 45%; 35 | } 36 | 37 | #preferences label small{ 38 | color:#999; 39 | } 40 | 41 | #preferences .text { 42 | padding: 5px 5px 5px 1px; 43 | } 44 | 45 | #preferences textarea.text { 46 | padding-top: 1px; 47 | width: auto; 48 | } 49 | 50 | /* MAINTENANCE */ 51 | #maintenance-form form + form { 52 | margin-top: 30px; 53 | } 54 | 55 | #maintenance-form fieldset { 56 | padding-bottom: 20px; 57 | margin-bottom: 20px; 58 | margin: 0 auto; 59 | } 60 | 61 | #maintenance-form legend { 62 | font-weight: bold; 63 | color: #1e88e5; 64 | } 65 | 66 | #maintenance-form p { 67 | } 68 | 69 | #maintenance-form p > label { 70 | display: inline-block; 71 | width: 40%; 72 | text-align: right; 73 | padding-right: 5px; 74 | } 75 | 76 | #maintenance-form #nb-artic, 77 | #maintenance-form #nb-links { 78 | display: none; 79 | } 80 | 81 | #maintenance-form .submit-bttns { 82 | margin: 0px auto 15px; 83 | padding: 0px 20px; 84 | max-width: 700px; 85 | } 86 | -------------------------------------------------------------------------------- /admin/style/style.css.php: -------------------------------------------------------------------------------- 1 | 0) { 4 | ob_end_clean(); 5 | ob_start('ob_gzhandler'); 6 | } else { 7 | ob_start('ob_gzhandler'); 8 | } 9 | 10 | header('Content-type: text/css; charset: UTF-8'); 11 | 12 | /* FOR MAINTENANCE : CSS FILES ARE SPLITED IN MULTIPLE FILES 13 | -------------------------------------------------------------*/ 14 | 15 | echo '/* General styles (layout, forms, multi-pages elements…) */'."\n"; 16 | readfile('style-style.css'); 17 | 18 | echo '/* Auth page */'."\n"; 19 | readfile('style-auth.css'); 20 | 21 | echo '/* Home page, with graphs */'."\n"; 22 | readfile('style-graphs.css'); 23 | 24 | echo '/* Article lists page */'."\n"; 25 | readfile('style-articles.css'); 26 | 27 | echo '/* Write page: new article form */'."\n"; 28 | readfile('style-ecrire.css'); 29 | 30 | echo '/* Comments page: forms+comm list */'."\n"; 31 | readfile('style-commentaires.css'); 32 | 33 | echo '/* Images and files: form + listing */'."\n"; 34 | readfile('style-miniatures-files.css'); 35 | 36 | echo '/* Links page: form + listing. */'."\n"; 37 | readfile('style-liens.css'); 38 | 39 | echo '/* RSS page: listing + forms */'."\n"; 40 | readfile('style-rss.css'); 41 | 42 | echo '/* Prefs + maintainance pages */'."\n"; 43 | readfile('style-preferences.css'); 44 | 45 | echo '/* Add-ons managing page */'."\n"; 46 | readfile('style-addons.css'); 47 | 48 | echo '/* Media-queries < 1100px */'."\n"; 49 | readfile('style-mobile-lt1100px.css'); 50 | 51 | echo '/* Media-queries < 850px */'."\n"; 52 | readfile('style-mobile-lt850px.css'); 53 | 54 | echo '/* Media-queries < 700px */'."\n"; 55 | readfile('style-mobile-lt700px.css'); 56 | 57 | if (is_file('../../config/custom-styles.css')) { 58 | echo '/* User-Custom CSS */'."\n"; 59 | readfile('../../config/custom-styles.css'); 60 | } 61 | -------------------------------------------------------------------------------- /admin/update/index.php: -------------------------------------------------------------------------------- 1 | array( 59 | 'method' => "GET", 60 | 'header' => "Referer: $referer\r\n" 61 | ) 62 | ); 63 | 64 | $context = stream_context_create($opts); 65 | $remote = @fopen($url, 'r', false, $context); 66 | if (!$remote) { 67 | fclose($local_file); 68 | return false; 69 | } 70 | 71 | while (!feof($remote)) { 72 | fwrite($local_file, fread($remote, 8192)); 73 | } 74 | fclose($remote); 75 | fclose($local_file); 76 | 77 | return true; 78 | } 79 | 80 | 81 | /** 82 | * Download an avatar or a favicon. 83 | */ 84 | function favatar() 85 | { 86 | 87 | $what = (string)filter_input(INPUT_GET, 'w'); 88 | $query = (string)filter_input(INPUT_GET, 'q'); 89 | 90 | if (!$query && !in_array($what, array('avatar', 'favicon'))) { 91 | exit(base64_decode(WRONG_PNG)); 92 | } 93 | 94 | 95 | if ($what == 'favicon') { 96 | // Full URL given? 97 | $domain = parse_url($query, PHP_URL_HOST); 98 | // Or only domain name? 99 | if ($domain === null) { 100 | $domain = parse_url($query, PHP_URL_PATH); 101 | } 102 | // Or some unusable crap? 103 | if ($domain === null) { 104 | exit(base64_decode(WRONG_PNG)); 105 | } 106 | 107 | $targetDir = DIR_CACHE.'favicons/'; 108 | $sourceFile = 'https://www.google.com/s2/favicons?domain='.$domain; 109 | $targetFile = $targetDir.md5($domain).'.png'; 110 | } else { 111 | // Strip out anything that doesn't belong in a MD5 hash. 112 | // Still 32 characters? If no, given hash wasn't genuine. die. 113 | $hash = preg_replace('[^a-f0-9]', '', $query); 114 | if (strlen($hash) != 32) { 115 | exit(base64_decode(WRONG_PNG)); 116 | } 117 | 118 | // Try to get size 119 | $size = (int)filter_input(INPUT_GET, 's'); 120 | if (!$size) { 121 | $size = 48; 122 | } 123 | 124 | // Try to get substitute image 125 | $service = (string)filter_input(INPUT_GET, 'd'); 126 | if (!$service) { 127 | $service = 'monsterid'; 128 | } 129 | 130 | $targetDir = DIR_CACHE.'avatars/'; 131 | // We use the Libravatar service which will reditect to Gravatar if not found 132 | $sourceFile = 'http://cdn.libravatar.org/avatar/'.$hash.'?s='.$size.'&d='.$service; 133 | $targetFile = $targetDir.md5($hash).'.png'; 134 | } 135 | 136 | // No cached file or expired? 137 | if (!is_file($targetFile) || (time() - filemtime($targetFile)) > EXPIRE_PNG) { 138 | if (!is_dir($targetDir) && !create_folder($targetDir, true, true)) { 139 | exit(base64_decode(WRONG_PNG)); 140 | } 141 | 142 | // need a test/return false 143 | if (!download($sourceFile, $targetFile)) { 144 | exit(base64_decode(WRONG_PNG)); 145 | } 146 | } 147 | 148 | // Send file to browser 149 | header('Content-Length: '.filesize($targetFile)); 150 | header('Cache-Control: public, max-age='.EXPIRE_PNG); 151 | header('Last-Modified: '.gmdate('D, d M Y H:i:s', filemtime($targetFile)).' GMT'); 152 | exit(readfile($targetFile)); 153 | } 154 | 155 | favatar(); 156 | -------------------------------------------------------------------------------- /inc/boot.php: -------------------------------------------------------------------------------- 1 | ', $stack); 90 | 91 | // Anon paths (cleaner and smaller paths) 92 | $stack = str_replace(BT_ROOT, '', $stack); 93 | 94 | $log .= "\n".'Stack trace:'."\n".$stack; 95 | } 96 | 97 | error_log(addslashes($log)."\n", 3, $logFile); 98 | } 99 | } 100 | 101 | /** 102 | * Import several .ini config files with this function 103 | * and make ini var as a php constant 104 | * 105 | * @param string $file_path, the ini absolute path 106 | * @return bool 107 | */ 108 | function import_ini_file($file_path) 109 | { 110 | if (is_file($file_path) and is_readable($file_path)) { 111 | $options = parse_ini_file($file_path); 112 | foreach ($options as $option => $value) { 113 | if (!defined($option)) { 114 | define($option, $value); 115 | } 116 | } 117 | return true; 118 | } 119 | return false; 120 | } 121 | 122 | /** 123 | * dirty fix/message for install BT >= 3.7 && < 3.7.2 124 | */ 125 | define('PHP_INTL', function_exists('idn_to_ascii')); 126 | if (!PHP_INTL) { 127 | function idn_to_ascii($string) 128 | { 129 | // œ => oe ; æ => ae 130 | $sanitized = html_entity_decode($string, ENT_QUOTES, 'UTF-8'); 131 | $sanitized = htmlentities($sanitized, ENT_QUOTES, 'UTF-8'); // é => é 132 | $sanitized = preg_replace('#&(.)(acute|grave|circ|uml|cedil|tilde|ring|slash|caron);#', '$1', $sanitized); // é => e 133 | $sanitized = preg_replace('#&([a-z]{2})lig;#i', '$1', $sanitized); 134 | $sanitized = preg_replace("/[^a-z0-9-_\.\~]/", '', $sanitized); 135 | if (empty(preg_replace("/[^a-z0-9]/", '', $sanitized))) { 136 | $sanitized = substr(md5($string), 0, 12); 137 | } else if ($string != $sanitized) { 138 | $sanitized .= '-'.substr(md5($string), 0, 6); 139 | } 140 | return $sanitized; 141 | } 142 | } 143 | 144 | 145 | /** 146 | * @param string $http_host, like : example.tld || https://toto.example.tld/blog1/ 147 | * @return string||array, if array, see array['message'] for more information 148 | * if string, safe potential file or folder name like : 149 | * example-tld || toto-example-tld-blog1 150 | */ 151 | function secure_host_to_path($http_host) 152 | { 153 | if (empty($http_host)) { 154 | return array( 155 | 'success' => false, 156 | 'message' => 'Your HTTP HOST seem\'s to be empty oO' 157 | ); 158 | } 159 | 160 | // at least a.be 161 | if (strlen($http_host) < 3) { 162 | return array( 163 | 'success' => false, 164 | 'message' => 'Your HTTP HOST is not valid' 165 | ); 166 | } 167 | 168 | $http_host = htmlspecialchars($http_host, ENT_QUOTES); 169 | 170 | // add 'http://' for a valid parse_url 171 | if (strpos($http_host, 'http://') !== 0 && strpos($http_host, 'https://') !== 0) { 172 | $http_host = 'http://'. $http_host; 173 | } 174 | 175 | $exploded = parse_url($http_host); 176 | 177 | if (empty($exploded['path'])) { 178 | $exploded['path'] = ''; 179 | } 180 | 181 | // is admin url ? (remove the last "folder/") 182 | if (defined('IS_IN_ADMIN') && !empty($exploded['path'])) { 183 | $tmp = trim($exploded['path'], '/'); 184 | $tmp = explode('/', $tmp); 185 | array_pop($tmp); 186 | $exploded['path'] = '/'. implode('/', $tmp); 187 | } 188 | 189 | // domain can be idn 190 | // idn_to_ascii() fix found at https://github.com/thephpleague/uri/pull/106/files 191 | $bugged_idn = (PHP_VERSION_ID >= 70200); 192 | foreach ($exploded as $type => &$val) { 193 | if ($type == 'path') { 194 | $tmp = explode('/', $val); 195 | foreach ($tmp as &$v) { 196 | if (!empty($v)) { 197 | $v = ($bugged_idn) ? @idn_to_ascii($v) : idn_to_ascii($v); 198 | } 199 | } 200 | $val = implode('/', $tmp); 201 | } else { 202 | $val = ($bugged_idn) ? @idn_to_ascii($val) : idn_to_ascii($val); 203 | } 204 | } 205 | $path = $exploded['host'].$exploded['path']; 206 | 207 | // format, clean up, secure 208 | $path = strtolower($path); 209 | $path = trim($path); 210 | $path = preg_replace("/[^a-z0-9-_\.\~]/", '-', $path); 211 | // clean first and last char when - 212 | $path = trim($path, '-'); 213 | // clean first and last char when . (prevent toto.onion./addons) 214 | $path = trim($path, '.'); 215 | 216 | 217 | // empty or 218 | if (empty($path) || strlen($path) < 3) { 219 | return array( 220 | 'success' => false, 221 | 'message' => 'Your HTTP HOST haven\'t survive our HTTP_HOST security test !' 222 | ); 223 | } 224 | 225 | return $path; 226 | } 227 | 228 | // Constants: folders 229 | define('DIR_ADDONS', BT_ROOT.'addons/'); 230 | define('DIR_BACKUP', BT_ROOT.'bt_backup/'); 231 | define('DIR_CONFIG', BT_ROOT.'config/'); 232 | define('DIR_DATABASES', BT_ROOT.'databases/'); 233 | define('DIR_DOCUMENTS', BT_ROOT.'files/'); 234 | define('DIR_IMAGES', BT_ROOT.'img/'); 235 | define('DIR_THEMES', BT_ROOT.'themes/'); 236 | define('DIR_VAR', BT_ROOT.'var/'); 237 | define('DIR_LOG', DIR_VAR.'log/'); 238 | 239 | // Constants: databases 240 | define('FILES_DB', DIR_DATABASES.'files.php'); 241 | define('FEEDS_DB', DIR_DATABASES.'rss.php'); 242 | 243 | // Constants: installation configurations 244 | define('FILE_USER', DIR_CONFIG.'user.php'); 245 | define('FILE_SETTINGS', DIR_CONFIG.'settings.php'); 246 | define('FILE_SETTINGS_ADV', DIR_CONFIG.'settings-advanced.php'); 247 | define('FILE_MYSQL', DIR_CONFIG.'mysql.php'); 248 | 249 | // Constants: general 250 | define('BLOGOTEXT_NAME', 'BlogoText'); 251 | define('BLOGOTEXT_SITE', 'https://github.com/BlogoText/blogotext'); 252 | define('BLOGOTEXT_VERSION', '3.7.7'); 253 | define('MINIMAL_PHP_REQUIRED_VERSION', '5.5'); 254 | define('BLOGOTEXT_UA', 'Mozilla/5.0 (Windows NT 10; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0'); 255 | 256 | // more constants after advanced boot 257 | 258 | 259 | // system is installed 260 | if (!is_file(FILE_USER) || !is_file(FILE_SETTINGS)) { 261 | // if this is install script, dont redirect 262 | if (!defined('BT_RUN_INSTALL')) { 263 | if (defined('IS_IN_ADMIN')) { 264 | exit(header('Location: install.php')); 265 | } else { 266 | exit(header('Location: admin/install.php')); 267 | } 268 | } 269 | } 270 | 271 | /** 272 | * must run if : 273 | * - user will reset is password 274 | * - install after the set of FILE_SETTINGS 275 | * - normal use 276 | */ 277 | if (is_file(FILE_SETTINGS)) { 278 | $vhost = secure_host_to_path($_SERVER['HTTP_HOST']); 279 | 280 | if (is_array($vhost)) { 281 | die($vhost['message']); 282 | } 283 | 284 | // is it a valias ? 285 | if (is_file(DIR_VAR.$vhost.'/settings/valias.php')) { 286 | include DIR_VAR.$vhost.'/settings/valias.php'; 287 | if (!isset($vhost) || !isset($valias)) { 288 | log_error('Wrong VALIAS settings for '. $vhost, true); 289 | die('Wrong VALIAS settings'); 290 | } 291 | if (!is_dir(DIR_VAR.'/'.$vhost.'/')) { 292 | log_error('VHOST handler for '. $vhost .' doesn\'t exists', true); 293 | die('VHOST declared for this VALIAS doesn\'t exists :/'); 294 | } 295 | } 296 | 297 | // load prefs.php 298 | require_once FILE_SETTINGS; 299 | 300 | // check the http_host with $GLOBALS['racine'] 301 | if (strpos($GLOBALS['racine'], $_SERVER['HTTP_HOST']) === false) { 302 | die('Your HTTP HOST doesn\'t match the config of this BlogoText'); 303 | } 304 | 305 | define('DIR_VHOST', DIR_VAR.$vhost.'/'); 306 | define('DIR_VHOST_ADDONS', DIR_VHOST.'addons/'); 307 | // check the var/domain.tld/ exits 308 | if (!is_dir(DIR_VHOST_ADDONS)) { 309 | require_once BT_ROOT.'inc/filesystem.php'; 310 | if (!create_folder(DIR_VHOST_ADDONS, true, true)) { 311 | die('BlogoText can\'t create '. DIR_VHOST_ADDONS .', please check your file system rights for this folder.'); 312 | } 313 | } 314 | 315 | if (isset($valias)) { 316 | define('URL_ROOT', $valias . ((strrpos($valias, '/', -1) === false) ? '/' : '' )); 317 | } else { 318 | define('URL_ROOT', $GLOBALS['racine'] . ((strrpos($GLOBALS['racine'], '/', -1) === false) ? '/' : '' )); 319 | } 320 | 321 | // Timezone 322 | date_default_timezone_set($GLOBALS['fuseau_horaire']); 323 | 324 | // Constants: folders 325 | define('DIR_CACHE', DIR_VAR.'cache/'); 326 | define('DIR_VHOST_CACHE', DIR_VHOST.'cache/'); 327 | define('DIR_VHOST_DATABASES', DIR_VHOST.'databases/'); 328 | 329 | // Constants: databases 330 | define('ADDONS_DB', DIR_VHOST_DATABASES.'addons.php'); 331 | 332 | // Constants: HTTP URL 333 | define('URL_VAR', URL_ROOT); 334 | define('URL_DOCUMENTS', URL_VAR.'files/'); 335 | define('URL_IMAGES', URL_VAR.'img/'); 336 | } 337 | 338 | // init some vars 339 | $GLOBALS['addons'] = array(); 340 | $GLOBALS['form_commentaire'] = ''; 341 | 342 | // advanced 343 | import_ini_file(FILE_SETTINGS_ADV); 344 | 345 | // db 346 | import_ini_file(FILE_MYSQL); 347 | 348 | // user 349 | import_ini_file(FILE_USER); 350 | 351 | 352 | // regenerate captcha (always) 353 | if (!isset($GLOBALS['captcha'])) { 354 | $ua = (isset($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : ''; 355 | $GLOBALS['captcha']['x'] = rand(4, 9); 356 | $GLOBALS['captcha']['y'] = rand(1, 6); 357 | $GLOBALS['captcha']['hash'] = sha1($ua.($GLOBALS['captcha']['x']+$GLOBALS['captcha']['y'])); 358 | } 359 | 360 | // THEMES FILES and PATHS 361 | if (isset($GLOBALS['theme_choisi'])) { 362 | $GLOBALS['theme_style'] = str_replace(BT_ROOT, '', DIR_THEMES).$GLOBALS['theme_choisi']; 363 | $GLOBALS['theme_liste'] = $GLOBALS['theme_style'].'/list.html'; 364 | $GLOBALS['theme_post_artc'] = $GLOBALS['theme_style'].'/template/article.html'; 365 | $GLOBALS['theme_post_comm'] = $GLOBALS['theme_style'].'/template/commentaire.html'; 366 | $GLOBALS['theme_post_link'] = $GLOBALS['theme_style'].'/template/link.html'; 367 | $GLOBALS['theme_post_post'] = $GLOBALS['theme_style'].'/template/post.html'; 368 | $GLOBALS['rss'] = URL_ROOT.'rss.php'; 369 | } 370 | 371 | 372 | /** 373 | * main dependancys 374 | */ 375 | require_once BT_ROOT.'inc/conv.php'; 376 | require_once BT_ROOT.'inc/filesystem.php'; 377 | require_once BT_ROOT.'inc/form.php'; 378 | require_once BT_ROOT.'inc/hook.php'; 379 | require_once BT_ROOT.'inc/html.php'; 380 | require_once BT_ROOT.'inc/sqli.php'; 381 | require_once BT_ROOT.'inc/them.php'; 382 | require_once BT_ROOT.'inc/util.php'; 383 | 384 | /** 385 | * init lang 386 | */ 387 | lang_set_list(); 388 | lang_load_land(defined('IS_IN_ADMIN')); 389 | -------------------------------------------------------------------------------- /inc/filesystem.php: -------------------------------------------------------------------------------- 1 | $ctrl) { 52 | if ($make_htaccess && !is_file($path.'.htaccess')) { 53 | create_htaccess($path); 54 | } 55 | if (!is_file($path.'index.php')) { 56 | create_index_file($path); 57 | } 58 | $path = dirname($path).'/'; 59 | } 60 | 61 | return true; 62 | } 63 | 64 | /** 65 | * Prevent directory listing. 66 | */ 67 | function create_index_file($folder) 68 | { 69 | $content = "'."\n"; 81 | $content .= 'Order allow,deny'."\n"; 82 | $content .= 'Deny from all'."\n"; 83 | $content .= ''."\n"; 84 | $file = $folder.'/.htaccess'; 85 | 86 | return (file_put_contents($file, $content, LOCK_EX) !== false); 87 | } 88 | 89 | /** 90 | * 91 | */ 92 | function flux_refresh_cache_lv1() 93 | { 94 | create_folder(DIR_VHOST_CACHE, 1); 95 | $arr_a = liste_elements("SELECT * FROM articles WHERE bt_statut=1 ORDER BY bt_date DESC LIMIT 0, 20", array(), 'articles'); 96 | $arr_c = liste_elements("SELECT c.*, a.bt_title FROM commentaires AS c, articles AS a WHERE c.bt_statut=1 AND c.bt_article_id=a.bt_id ORDER BY c.bt_id DESC LIMIT 0, 20", array(), 'commentaires'); 97 | $arr_l = liste_elements("SELECT * FROM links WHERE bt_statut=1 ORDER BY bt_id DESC LIMIT 0, 20", array(), 'links'); 98 | return create_file_dtb(DIR_VHOST_CACHE.'cache1_feed.dat', array('c' => $arr_c, 'a' => $arr_a, 'l' => $arr_l)); 99 | } 100 | -------------------------------------------------------------------------------- /inc/form.php: -------------------------------------------------------------------------------- 1 | '."\n"; 22 | return $form; 23 | } 24 | 25 | 26 | /** 27 | * 28 | */ 29 | function valider_form_commentaire($commentaire, $mode) 30 | { 31 | $erreurs = array(); 32 | if (!strlen(trim($commentaire['bt_author']))) { 33 | $erreurs[] = $GLOBALS['lang']['err_comm_auteur']; 34 | } 35 | if (!empty($commentaire['bt_email']) or $GLOBALS['require_email'] == 1) { // if email is required, or is given, it must be valid 36 | if (!preg_match('#^[-\w!%+~\'*"\[\]{}.=]+@[\w.-]+\.[a-zA-Z]{2,6}$#i', trim($commentaire['bt_email']))) { 37 | $erreurs[] = $GLOBALS['lang']['err_comm_email'] ; 38 | } 39 | } 40 | if (!strlen(trim($commentaire['bt_content'])) or $commentaire['bt_content'] == "

    ") { // comment may not be empty 41 | $erreurs[] = $GLOBALS['lang']['err_comm_contenu']; 42 | } 43 | if (!preg_match('/\d{14}/', $commentaire['bt_article_id'])) { // comment has to be on a valid article_id 44 | $erreurs[] = $GLOBALS['lang']['err_comm_article_id']; 45 | } 46 | 47 | if (trim($commentaire['bt_webpage']) != "") { // given url has to be valid 48 | if (!preg_match('#^(https?://[\S]+)[a-z]{2,6}[-\#_\w?%*:.;=+\(\)/&~$,]*$#', trim($commentaire['bt_webpage']))) { 49 | $erreurs[] = $GLOBALS['lang']['err_comm_webpage']; 50 | } 51 | } 52 | if ($mode != 'admin') { // if public : tests captcha as well 53 | $ua = (isset($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : ''; 54 | if ($_POST['_token'] != sha1($ua.$_POST['captcha'])) { 55 | $erreurs[] = $GLOBALS['lang']['err_comm_captcha']; 56 | } 57 | } else { // mode admin : test token 58 | if (!( isset($_POST['token']) and check_token($_POST['token']))) { 59 | $erreurs[] = $GLOBALS['lang']['err_wrong_token']; 60 | } 61 | } 62 | return $erreurs; 63 | } 64 | 65 | /** 66 | * 67 | */ 68 | function valider_form_commentaire_ajax($commentaire) 69 | { 70 | $erreurs = array(); 71 | if (!is_numeric($commentaire)) { // comment has to be on a valid ID 72 | $erreurs[] = $GLOBALS['lang']['err_comm_article_id']; 73 | } 74 | // test token 75 | if (!( isset($_POST['token']) and check_token($_POST['token']))) { 76 | $erreurs[] = $GLOBALS['lang']['err_wrong_token']; 77 | } 78 | return $erreurs; 79 | } 80 | 81 | 82 | /** 83 | * 84 | */ 85 | function s_color($color) 86 | { 87 | return ''; 88 | } 89 | 90 | /** 91 | * 92 | */ 93 | function s_size($size) 94 | { 95 | return ''; 96 | } 97 | 98 | /** 99 | * 100 | */ 101 | function s_u($char) 102 | { 103 | return ''; 104 | } 105 | 106 | /** 107 | * 108 | */ 109 | function form_formatting_toolbar($extended = false) 110 | { 111 | $html = ''; 112 | $html .= '

    '."\n"; 113 | $html .= "\t".''."\n"; 114 | $html .= "\t".''."\n"; 115 | $html .= "\t".''."\n"; 116 | $html .= "\t".''."\n"; 117 | 118 | if ($extended) { 119 | $html .= "\t".''."\n"; 120 | // bouton des couleurs 121 | $html .= "\t".'' 122 | .s_color('black').s_color('gray').s_color('silver').s_color('white') 123 | .s_color('blue').s_color('green').s_color('red').s_color('yellow') 124 | .s_color('fuchsia').s_color('lime').s_color('aqua').s_color('maroon') 125 | .s_color('purple').s_color('navy').s_color('teal').s_color('olive') 126 | .s_color('#ff7000').s_color('#ff9aff').s_color('#a0f7ff').s_color('#ffd700') 127 | .''."\n"; 128 | 129 | // boutons de la taille de caractère 130 | $html .= "\t".'' 131 | .s_size('9').s_size('12').s_size('16').s_size('20') 132 | .''."\n"; 133 | 134 | // quelques caractères unicode 135 | $html .= "\t".'' 136 | .s_u('æ').s_u('Æ').s_u('œ').s_u('Œ').s_u('é').s_u('É').s_u('è').s_u('È').s_u('ç').s_u('Ç').s_u('ù').s_u('Ù').s_u('à').s_u('À').s_u('ö').s_u('Ö') 137 | .s_u('…').s_u('«').s_u('»').s_u('±').s_u('≠').s_u('×').s_u('÷').s_u('ß').s_u('®').s_u('©').s_u('↓').s_u('↑').s_u('←').s_u('→').s_u('ø').s_u('Ø') 138 | .s_u('☠').s_u('☣').s_u('☢').s_u('☮').s_u('★').s_u('☯').s_u('☑').s_u('☒').s_u('☐').s_u('♫').s_u('♬').s_u('♪').s_u('♣').s_u('♠').s_u('♦').s_u('❤') 139 | .s_u('♂').s_u('♀').s_u('☹').s_u('☺').s_u('☻').s_u('♲').s_u('⚐').s_u('⚠').s_u('☂').s_u('√').s_u('∑').s_u('λ').s_u('π').s_u('Ω').s_u('№').s_u('∞') 140 | .''."\n"; 141 | 142 | $html .= "\t".''."\n"; 143 | $html .= "\t".''."\n"; 144 | $html .= "\t".''."\n"; 145 | $html .= "\t".''."\n"; 146 | $html .= "\t".''."\n"; 147 | 148 | $html .= "\t".''."\n"; 149 | $html .= "\t".''."\n"; 150 | $html .= "\t".''."\n"; 151 | $html .= "\t".''."\n"; 152 | } 153 | 154 | $html .= "\t".''."\n"; 155 | $html .= "\t".''."\n"; 156 | $html .= "\t".''."\n"; 157 | $html .= "\t".''."\n"; 158 | 159 | $html .= '

    '; 160 | 161 | return $html; 162 | } 163 | -------------------------------------------------------------------------------- /inc/hook.php: -------------------------------------------------------------------------------- 1 | hook_check() 140 | * 141 | * if return false, that means tests have fail 142 | * 143 | * @param string $hook_name, the hook name, required 144 | * @param mixed ... , you can push all the params you want 145 | * @return false|array, the returns of the functions to call 146 | */ 147 | function hook_trigger_and_check($hook_name) 148 | { 149 | $args = func_get_args(); 150 | 151 | // prevent hook on admin side 152 | if (defined('IS_IN_ADMIN')) { 153 | return $args; 154 | } 155 | 156 | $tmp_hook = call_user_func_array('hook_trigger', $args); 157 | if (hook_check($hook_name, func_num_args(), $tmp_hook)) { 158 | return $tmp_hook; 159 | } 160 | 161 | return false; 162 | } 163 | -------------------------------------------------------------------------------- /inc/html.php: -------------------------------------------------------------------------------- 1 | '.$txt.''."\n"; 21 | } 22 | 23 | /** 24 | * 25 | */ 26 | function erreurs($erreurs) 27 | { 28 | $html = ''; 29 | if ($erreurs) { 30 | $html .= '
    '.''.$GLOBALS['lang']['erreurs'].' :' ; 31 | $html .= '
    • '; 32 | $html .= implode('
    • ', $erreurs); 33 | $html .= '
    '."\n"; 34 | } 35 | return $html; 36 | } 37 | 38 | /** 39 | * 40 | */ 41 | function erreur($message) 42 | { 43 | echo '

    '.$message.'

    '."\n"; 44 | } 45 | 46 | /** 47 | * 48 | */ 49 | function moteur_recherche() 50 | { 51 | $requete=''; 52 | if (isset($_GET['q'])) { 53 | $requete = htmlspecialchars(stripslashes($_GET['q'])); 54 | } 55 | $return = ''."\n\n"; 62 | return $return; 63 | } 64 | 65 | /** 66 | * 67 | */ 68 | function encart_commentaires() 69 | { 70 | $query = ' 71 | SELECT a.bt_title, c.bt_author, c.bt_id, c.bt_article_id, c.bt_content 72 | FROM commentaires c 73 | LEFT JOIN articles a 74 | ON a.bt_id = c.bt_article_id 75 | WHERE c.bt_statut = 1 76 | AND a.bt_statut = 1 77 | ORDER BY c.bt_id DESC 78 | LIMIT 5'; 79 | $tableau = liste_elements($query, array(), 'commentaires'); 80 | if (isset($tableau)) { 81 | $tableau = html_addon_protect($tableau, 'encode'); 82 | $listeLastComments = '
      '."\n"; 83 | foreach ($tableau as $i => $comment) { 84 | $comment['contenu_abbr'] = strip_tags($comment['bt_content']); 85 | // limits length of comment abbreviation and name 86 | if (strlen($comment['contenu_abbr']) >= 60) { 87 | $comment['contenu_abbr'] = mb_substr($comment['contenu_abbr'], 0, 59).'…'; 88 | } 89 | if (strlen($comment['bt_author']) >= 30) { 90 | $comment['bt_author'] = mb_substr($comment['bt_author'], 0, 29).'…'; 91 | } 92 | $listeLastComments .= '
    • '.$comment['bt_author'].' : '.$comment['contenu_abbr'].''.'
    • '."\n"; 93 | } 94 | $listeLastComments .= '
    '."\n"; 95 | return $listeLastComments; 96 | } else { 97 | return $GLOBALS['lang']['no_comments']; 98 | } 99 | } 100 | 101 | /** 102 | * 103 | */ 104 | function encart_categories($mode) 105 | { 106 | if ($GLOBALS['activer_categories'] == '1') { 107 | $where = ($mode == 'links') ? 'links' : 'articles'; 108 | $ampmode = ($mode == 'links') ? '&mode=links' : ''; 109 | 110 | $liste = list_all_tags($where, 1); 111 | 112 | // attach non-diacritic versions of tag, so that "é" does not pass after "z" and re-indexes 113 | foreach ($liste as $tag => $nb) { 114 | $liste[$tag] = array(diacritique(trim($tag)), $nb); 115 | } 116 | // sort tags according non-diacritics versions of tags 117 | $liste = array_reverse(tri_selon_sous_cle($liste, 0)); 118 | $uliste = '
      '."\n"; 119 | 120 | // create the
        with "tags (nb) " 121 | foreach ($liste as $tag => $nb) { 122 | if ($tag != '' and $nb[1] > 1) { 123 | $uliste .= "\t".'
      • '."\n"; 124 | } 125 | } 126 | $uliste .= '
      '."\n"; 127 | 128 | $uliste = html_addon_protect($uliste, 'encode'); 129 | return $uliste; 130 | } 131 | } 132 | 133 | /** 134 | * 135 | */ 136 | function lien_pagination() 137 | { 138 | if (!isset($GLOBALS['param_pagination']) or isset($_GET['d']) or isset($_GET['liste']) or isset($_GET['id'])) { 139 | return ''; 140 | } else { 141 | $nb_par_page = (int)$GLOBALS['param_pagination']['nb_par_page']; 142 | } 143 | 144 | $page_courante = (isset($_GET['p']) and is_numeric($_GET['p'])) ? (int)$_GET['p'] : 0; 145 | $qstring = remove_url_param('p'); 146 | if (!empty($qstring)) { 147 | $qstring .= '&'; 148 | } 149 | 150 | $db_req = ''; 151 | $db_params = array(); 152 | if (isset($_GET['mode']) && $_GET['mode'] == 'links') { 153 | $db_req = 'SELECT count(ID) AS nbr FROM links WHERE bt_statut=1'; 154 | } else { 155 | $db_req = 'SELECT count(ID) AS nbr FROM articles WHERE bt_date <= '.date('YmdHis').' and bt_statut=1'; 156 | } 157 | if (isset($_GET['tag'])) { 158 | $db_req .= ' and ( bt_tags LIKE ? OR bt_tags LIKE ? OR bt_tags LIKE ? OR bt_tags LIKE ? )'; 159 | $db_params = array( $_GET['tag'],$_GET['tag'].', %','%, '.$_GET['tag'].', %','%, '.$_GET['tag'] ); 160 | } 161 | $nb = (int)liste_elements_count($db_req, $db_params); 162 | 163 | $lien_precede = ''; 164 | $lien_suivant = ''; 165 | // -1 because ?p=0 is the first 166 | $total_page = (int)ceil($nb / $nb_par_page) - 1; 167 | 168 | // page sup ? 169 | if ($page_courante < 0) { 170 | $lien_suivant = ''; 171 | } else if ($page_courante < $total_page) { 172 | $lien_suivant = ''; 173 | } 174 | 175 | // page inf ? 176 | if ($page_courante > $total_page) { 177 | $lien_precede = ''; 178 | } else if ($page_courante <= $total_page && $page_courante > 0) { 179 | $lien_precede = ''; 180 | } 181 | 182 | return '

      '.$lien_precede.$lien_suivant.'

      '; 183 | } 184 | 185 | /** 186 | * 187 | */ 188 | function liste_tags($billet, $html_link) 189 | { 190 | $mode = ($billet['bt_type'] == 'article') ? '' : '&mode=links'; 191 | $liste = ''; 192 | if (!empty($billet['bt_tags'])) { 193 | $tag_list = explode(', ', $billet['bt_tags']); 194 | // remove diacritics, so that "ééé" does not passe after "zzz" and re-indexes 195 | foreach ($tag_list as $i => $tag) { 196 | $tag_list[$i] = array('t' => trim($tag), 'tt' => diacritique(trim($tag))); 197 | } 198 | $tag_list = array_reverse(tri_selon_sous_cle($tag_list, 'tt')); 199 | 200 | foreach ($tag_list as $tag) { 201 | $tag = trim($tag['t']); 202 | if ($html_link == 1) { 203 | $liste .= ''; 204 | } else { 205 | $liste .= $tag.' '; 206 | } 207 | } 208 | } 209 | return $liste; 210 | } 211 | -------------------------------------------------------------------------------- /inc/index.php: -------------------------------------------------------------------------------- 1 | 'en', 16 | // Navigation 17 | 'le' => 'the', 18 | 'remarque' => 'Notice', 19 | 'valider' => 'Submit', 20 | 'annuler' => 'Cancel', 21 | 'envoyer' => 'Send', 22 | 'preview' => 'Preview', 23 | 'editer' => 'Edit', 24 | 'activer' => 'Activate', 25 | 'desactiver' => 'Desactivate', 26 | 'voir' => 'See', 27 | 'partager' => 'Share', 28 | 'infos' => 'Infos', 29 | 'rechercher' => 'Search', 30 | 'filtrer' => 'Filter', 31 | 'oui' => 'Yes', 32 | 'non' => 'No', 33 | 'ouverts' => 'Open', 34 | 'fermes' => 'Closed', 35 | 'repondre' => 'answer', 36 | 'depuis' => 'since', 37 | 'sur' => 'on', 38 | 'patientez' => 'wait', 39 | 'secondes' => 'seconds', 40 | 'du' => 'on', 41 | 'et' => 'and', 42 | 'ou' => 'or', 43 | 'par' => 'by', 44 | 'ajoute' => 'addded', 45 | 'trouve' => 'found', 46 | 'using' => 'with', 47 | 'rendered' => 'generated in', 48 | 'recherche' => 'Search result for', 49 | // Boutons formatage commentaires 50 | 'bouton-gras' => 'Bold', 51 | 'bouton-ital' => 'Italic', 52 | 'bouton-soul' => 'Underline', 53 | 'bouton-barr' => 'Line-through', 54 | 'bouton-lien' => 'Insert a link', 55 | 'bouton-cita' => 'Insert a quote', 56 | 'bouton-imag' => 'Insert an image', 57 | 'bouton-code' => 'Insert formated code', 58 | 'bouton-left' => 'Left aligned', 59 | 'bouton-center' => 'Centred', 60 | 'bouton-right' => 'Right aligned', 61 | 'bouton-justify' => 'Justify', 62 | 'bouton-liul' => 'Insert a list', 63 | 'bouton-liol' => 'Insert a ordered list', 64 | // Labels 65 | 'label_article' => 'article', 66 | 'label_articles' => 'articles', 67 | 'label_commentaire' => 'comment', 68 | 'label_commentaires' => 'comments', 69 | 'label_link' => 'link', 70 | 'label_links' => 'links', 71 | 'label_feed_entry' => 'feed entry', 72 | 'label_feed_entrys' => 'feed entries', 73 | 'label_fichier' => 'file', 74 | 'label_fichiers' => 'files', 75 | 'label_precedent' => 'Newer entries', 76 | 'label_suivant' => 'Older entries', 77 | 'label_dp_pseudo' => 'Pseudo: ', 78 | 'label_dp_webpage' => 'Website (optionnal): ', 79 | 'label_dp_captcha' => 'Sum of: ', 80 | 'label_dp_email' => 'E-mail (optionnal): ', 81 | 'label_dp_email_required' => 'E-mail: ', 82 | // Commentaire 83 | 'aucun' => 'no', 84 | 'comment_ajout' => 'Write a comment', 85 | 'comment_cookie' => 'Use a cookie to remember these informations? ', 86 | 'comment_subscribe' => 'Get email notification by email? ', 87 | 'comment_not_allowed' => 'Comments are closed for this entry.', 88 | 'no_comments' => 'No comments yet.', 89 | 'comment_is_visible' => 'Comment is visible', 90 | 'comment_is_invisible' => 'Comment is hiddent', 91 | 'comment_need_validation' => 'Your comment will be visible after approbation by the webmaster.', 92 | // links 93 | 'link_is_public' => 'Link is public', 94 | 'link_is_private' => 'Link is private', 95 | // Titles - liens 96 | 'post_link' => 'See online', 97 | 'post_share' => 'Share', 98 | 'blog_link' => 'Watch online', 99 | 'go_to_pref' => 'Go to the settings to change description.', 100 | // Mois 101 | 'janvier' => 'January', 102 | 'fevrier' => 'February', 103 | 'mars' => 'March', 104 | 'avril' => 'April', 105 | 'mai' => 'May', 106 | 'juin' => 'June', 107 | 'juillet' => 'July', 108 | 'aout' => 'August', 109 | 'septembre' => 'September', 110 | 'octobre' => 'October', 111 | 'novembre' => 'November', 112 | 'decembre' => 'December', 113 | 'janv.' => 'Jan.', 114 | 'fev.' => 'Feb.', 115 | 'mars.' => 'Mar', 116 | 'avr.' => 'Apr', 117 | 'mai.' => 'May', 118 | 'juin.' => 'June', 119 | 'juil.' => 'July', 120 | 'aout.' => 'Aug', 121 | 'sept.' => 'Sept', 122 | 'oct.' => 'Oct', 123 | 'nov.' => 'Nov', 124 | 'dec.' => 'Dec', 125 | // Jours 126 | 'lu' => 'Mo', 127 | 'ma' => 'Tu', 128 | 'me' => 'We', 129 | 'je' => 'Th', 130 | 've' => 'Fr', 131 | 'sa' => 'Sa', 132 | 'di' => 'Su', 133 | // Jours 134 | 'lundi' => 'Monday', 135 | 'mardi' => 'Tuesday', 136 | 'mercredi' => 'Wednesday', 137 | 'jeudi' => 'Thursday', 138 | 'vendredi' => 'Friday', 139 | 'samedi' => 'Saturday', 140 | 'dimanche' => 'Sunday', 141 | 'aujourdhui' => 'Today', 142 | 'hier' => 'Yesterday', 143 | // Erreurs 144 | 'erreurs' => 'Error(s)', 145 | 'err_theme_introuvable' => 'Theme file is inreadable, not here or broken.', 146 | 'err_comm_auteur' => 'Author name is empty', 147 | 'err_comm_email' => 'Email is not correct', 148 | 'err_comm_contenu' => 'Comment is empty', 149 | 'err_comm_captcha' => 'Sum is wrong (use numbers)', 150 | 'err_comm_webpage' => 'URL is wrong', 151 | 'err_comm_article_id' => 'Article ID is wrong', 152 | 'err_wrong_token' => 'Security coin is wrong.', 153 | 'err_addon_name' => 'Invalid addon name.', 154 | 'err_addon_status' => 'No addon status given.', 155 | 'err_addon_enabled' => 'Could not enable the addon "%s", please check rights of the "'.DIR_ADDONS.'" folder and its children.', 156 | 'err_addon_disabled' => 'Could not disable the addon "%s", please check rights of the "'.DIR_ADDONS.'" folder and its children.', 157 | // Redirections 158 | 'retour_liste' => '« Articles list', 159 | // Titres des pages 160 | 'bienvenue' => 'Welcome', 161 | // module / addons 162 | 'addons_settings_legend' => 'Addon settings for : ', 163 | 'addons_settings_link_title' => 'Addon settings', 164 | 'addons_settings_confirm_reset' => 'Do you really want to delete your settings ?', 165 | 'addons_confirm_buttons_action' => 'This action can take some time, please, do not refresh or close your window before the end of the reload.', 166 | 'addons_clean_cache_label' => 'Clean the cache for this addon ?', 167 | // feed 168 | 'feed_article_comments_title' => 'Comments for ', 169 | // Notes 170 | 'note_no_article' => 'No articles :/', 171 | 'note_no_module' => 'No modules', 172 | 'note_no_commentaire' => 'No comments', 173 | 'note_comment_closed' => 'Comments are closed', 174 | 'note_no_link' => 'No links', 175 | 'note_no_image' => 'No images', 176 | 'note_no_fichier' => 'No files', 177 | 'note_no_feed' => 'No RSS feed', 178 | 'note_no_feed_entry' => 'No RSS entry', 179 | // placeholders 180 | 'placeholder_search' => 'Search', 181 | //Formulaire Images 182 | 'label_jusqua' => 'Up to', 183 | 'label_parfichier' => ' per file', 184 | 'label_codes' => 'Integration codes:', 185 | // vérifier les mises à jours 186 | 'succes' => 'Success', 187 | 'echec' => 'Fail', 188 | // Chiffres 0 à 9 pour captcha 189 | '0' => 'zero', 190 | '1' => 'one', 191 | '2' => 'two', 192 | '3' => 'three', 193 | '4' => 'four', 194 | '5' => 'five', 195 | '6' => 'six', 196 | '7' => 'seven', 197 | '8' => 'eight', 198 | '9' => 'nine', 199 | 'derniere_connexion_le' => 'Last connection from', 200 | 'cet_ordi' => 'this computer', 201 | ); 202 | -------------------------------------------------------------------------------- /inc/lang/fr_fr.php: -------------------------------------------------------------------------------- 1 | 'fr', 16 | // Navigation 17 | 'le' => 'le', 18 | 'remarque' => 'Remarque', 19 | 'valider' => 'Valider', 20 | 'annuler' => 'Annuler', 21 | 'envoyer' => 'Envoyer', 22 | 'preview' => 'Prévisualiser', 23 | 'editer' => 'Éditer', 24 | 'activer' => 'Activer', 25 | 'desactiver' => 'Désactiver', 26 | 'voir' => 'Voir', 27 | 'partager' => 'Partager', 28 | 'infos' => 'Infos', 29 | 'rechercher' => 'Rechercher', 30 | 'filtrer' => 'Filtrer', 31 | 'oui' => 'Oui', 32 | 'non' => 'Non', 33 | 'ouverts' => 'Autorisés', 34 | 'fermes' => 'Interdits', 35 | 'repondre' => 'répondre', 36 | 'depuis' => 'depuis', 37 | 'sur' => 'sur', 38 | 'patientez' => 'patientez', 39 | 'secondes' => 'secondes', 40 | 'du' => 'du', 41 | 'et' => 'et', 42 | 'ou' => 'ou', 43 | 'par' => 'par', 44 | 'ajoute' => 'ajouté(s)', 45 | 'trouve' => 'trouvé(s)', 46 | 'using' => 'avec', 47 | 'rendered' => 'généré en', 48 | 'recherche' => 'Les résultats de recherche pour', 49 | // Boutons formatage commentaires 50 | 'bouton-gras' => 'gras', 51 | 'bouton-ital' => 'italique', 52 | 'bouton-soul' => 'souligné', 53 | 'bouton-barr' => 'barré', 54 | 'bouton-lien' => 'Insérer un lien', 55 | 'bouton-cita' => 'Insérer une citation', 56 | 'bouton-imag' => 'Insérer une image', 57 | 'bouton-code' => 'Insérer du code formaté', 58 | 'bouton-left' => 'Aligner le texte à gauche', 59 | 'bouton-center' => 'Aligner le texte au center', 60 | 'bouton-right' => 'Aligner le texte à droite', 61 | 'bouton-justify' => 'Justifier le texte (aligner des deux côtés)', 62 | 'bouton-liul' => 'Insérer une liste à puce', 63 | 'bouton-liol' => 'Insérer une liste numérotée', 64 | // Labels 65 | 'label_article' => 'article', 66 | 'label_articles' => 'articles', 67 | 'label_commentaire' => 'commentaire', 68 | 'label_commentaires' => 'commentaires', 69 | 'label_link' => 'lien', 70 | 'label_links' => 'liens', 71 | 'label_feed_entry' => 'Entrée RSS', 72 | 'label_feed_entrys' => 'Entrées RSS', 73 | 'label_fichier' => 'fichier', 74 | 'label_fichiers' => 'fichiers', 75 | 'label_precedent' => 'éléments plus récents', 76 | 'label_suivant' => 'éléments plus anciens', 77 | 'label_dp_pseudo' => 'Pseudo : ', 78 | 'label_dp_webpage' => 'Site web (facultatif) : ', 79 | 'label_dp_captcha' => 'Somme de : ', 80 | 'label_dp_email' => 'E-mail (facultatif) : ', 81 | 'label_dp_email_required' => 'E-mail : ', 82 | // Commentaire 83 | 'aucun' => 'aucun', 84 | 'comment_ajout' => 'Ajouter un commentaire', 85 | 'comment_cookie' => 'Retenir ces informations avec un cookie ? ', 86 | 'comment_subscribe' => 'Recevoir des notifications de nouveaux commentaires par email ? ', 87 | 'comment_not_allowed' => 'Les commentaires sont fermés pour cet article', 88 | 'no_comments' => 'Il n’y a aucun commentaire pour le moment.', 89 | 'comment_is_visible' => 'Le commentaire est visible', 90 | 'comment_is_invisible' => 'Le commentaire n’est pas visible', 91 | 'comment_need_validation' => 'Votre commentaire sera visible après validation par le webmaster.', 92 | // links 93 | 'link_is_public' => 'Le lien est public', 94 | 'link_is_private' => 'Le lien est privée (invisible)', 95 | // Titles - liens 96 | 'post_link' => 'Voir en ligne', 97 | 'post_share' => 'Partager', 98 | 'blog_link' => 'Voir le blog', 99 | 'go_to_pref' => 'Allez dans les préférences pour changer le titre.', 100 | // Mois 101 | 'janvier' => 'janvier', 102 | 'fevrier' => 'février', 103 | 'mars' => 'mars', 104 | 'avril' => 'avril', 105 | 'mai' => 'mai', 106 | 'juin' => 'juin', 107 | 'juillet' => 'juillet', 108 | 'aout' => 'août', 109 | 'septembre' => 'septembre', 110 | 'octobre' => 'octobre', 111 | 'novembre' => 'novembre', 112 | 'decembre' => 'décembre', 113 | 'janv.' => 'janv.', 114 | 'fev.' => 'févr.', 115 | 'mars.' => 'mars', 116 | 'avr.' => 'avril', 117 | 'mai.' => 'mai', 118 | 'juin.' => 'juin', 119 | 'juil.' => 'juil.', 120 | 'aout.' => 'août', 121 | 'sept.' => 'sept.', 122 | 'oct.' => 'oct.', 123 | 'nov.' => 'nov.', 124 | 'dec.' => 'déc.', 125 | // Jours 126 | 'lu' => 'Lu', 127 | 'ma' => 'Ma', 128 | 'me' => 'Me', 129 | 'je' => 'Je', 130 | 've' => 'Ve', 131 | 'sa' => 'Sa', 132 | 'di' => 'Di', 133 | // Jours 134 | 'lundi' => 'lundi', 135 | 'mardi' => 'mardi', 136 | 'mercredi' => 'mercredi', 137 | 'jeudi' => 'jeudi', 138 | 'vendredi' => 'vendredi', 139 | 'samedi' => 'samedi', 140 | 'dimanche' => 'dimanche', 141 | 'aujourdhui' => 'aujourd’hui', 142 | 'hier' => 'hier', 143 | // Erreurs 144 | 'erreurs' => 'Erreur(s)', 145 | 'err_theme_introuvable' => 'Le fichier thème est introuvable, incomplet ou illisible.', 146 | 'err_comm_auteur' => 'Le nom de l’auteur est vide', 147 | 'err_comm_email' => 'L’adresse e-mail n’est pas valide', 148 | 'err_comm_contenu' => 'Le commentaire est vide', 149 | 'err_comm_captcha' => 'La somme est incorrecte (utiliser des chiffres)', 150 | 'err_comm_webpage' => 'L’URL n’est pas valide', 151 | 'err_comm_article_id' => 'L’ID Article n’est pas valide', 152 | 'err_wrong_token' => 'Le jeton de sécurité est expiré ou invalide.', 153 | 'err_addon_name' => 'Nom du module invalide.', 154 | 'err_addon_status' => 'Statut du module non renseigné.', 155 | 'err_addon_enabled' => 'Impossible d\'activer le module "%s", vérifiez les droits du dossier "'.DIR_ADDONS.'" et de ses sous-dossiers.', 156 | 'err_addon_disabled' => 'Impossible de désactiver le module "%s", vérifiez les droits du dossier "'.DIR_ADDONS.'" et de ses sous-dossiers.', 157 | // Redirections 158 | 'retour_liste' => '« Liste des articles', 159 | // Titres des pages 160 | 'bienvenue' => 'Bienvenue', 161 | // modules / addons 162 | 'addons_settings_legend' => 'Préférences du module : ', 163 | 'addons_settings_link_title' => 'Préférences du module', 164 | 'addons_settings_confirm_reset' => 'Êtes-vous sûr de vouloir effacer vos paramètres ?', 165 | 'addons_confirm_buttons_action' => 'Certaines actions peuvent prendre du temps à se terminer, veuillez ne pas fermer ou rafraîchir votre fenêtre jusqu\'au rechargement complet de la page.', 166 | 'addons_clean_cache_label' => 'Effacer le cache de ce module ?', 167 | // feed 168 | 'feed_article_comments_title' => 'Commentaires sur ', 169 | // Notes 170 | 'note_no_article' => 'Aucun article :/', 171 | 'note_no_module' => 'Aucun module', 172 | 'note_no_commentaire' => 'Aucun commentaire', 173 | 'note_comment_closed' => 'Commentaires fermés', 174 | 'note_no_link' => 'Aucun lien', 175 | 'note_no_image' => 'Aucune image', 176 | 'note_no_fichier' => 'Aucun fichier', 177 | 'note_no_feed' => 'Aucun flux RSS', 178 | 'note_no_feed_entry' => 'Aucune entrée RSS', 179 | // placeholders 180 | 'placeholder_search' => 'Rechercher', 181 | //Formulaire Images 182 | 'label_jusqua' => 'Jusqu’à ', 183 | 'label_parfichier' => ' par fichier', 184 | 'label_codes' => 'Codes d’intégration :', 185 | // vérifier les mises à jours 186 | 'succes' => 'Succès', 187 | 'echec' => 'Échec', 188 | // Chiffres 0 à 9 pour captcha 189 | '0' => 'zéro', 190 | '1' => 'un', 191 | '2' => 'deux', 192 | '3' => 'trois', 193 | '4' => 'quatre', 194 | '5' => 'cinq', 195 | '6' => 'six', 196 | '7' => 'sept', 197 | '8' => 'huit', 198 | '9' => 'neuf', 199 | 'derniere_connexion_le' => 'Dernière connexion depuis', 200 | 'cet_ordi' => 'cet ordinateur', 201 | ); 202 | -------------------------------------------------------------------------------- /inc/lang/index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {article_titre_page} {blog_nom} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {includes.css} 16 | 17 | 18 | 19 | 20 |
      21 | 22 |

      {blog_nom}

      23 | {recherche} 24 |
      25 | 26 |
      27 |
      28 | 36 | 40 | 44 | 48 |
      49 | 50 |
      51 |
      52 |

      {blog_description}

      53 |
      54 |
      55 | 56 | {BOUCLE_posts} 57 | // **** le texte que vous mettez ici (dans la "boucle") ne sera pas éxécuté ni affiché. **** 58 | {/BOUCLE_posts} 59 | 60 | {pagination} 61 |
      62 |
      63 |
      64 | 65 | 68 | 69 | {includes.js} 70 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /themes/default/roboto-300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlogoText/blogotext/fa2a4497e76aeb295db1a9d1aa8b7594c7484365/themes/default/roboto-300.woff -------------------------------------------------------------------------------- /themes/default/roboto-400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlogoText/blogotext/fa2a4497e76aeb295db1a9d1aa8b7594c7484365/themes/default/roboto-400.woff -------------------------------------------------------------------------------- /themes/default/roboto-700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlogoText/blogotext/fa2a4497e76aeb295db1a9d1aa8b7594c7484365/themes/default/roboto-700.woff -------------------------------------------------------------------------------- /themes/default/sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlogoText/blogotext/fa2a4497e76aeb295db1a9d1aa8b7594c7484365/themes/default/sprites.png -------------------------------------------------------------------------------- /themes/default/template/article.html: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /themes/default/template/commentaire.html: -------------------------------------------------------------------------------- 1 |
      2 |
      3 | avatar 4 | 5 |
      6 |
      7 |
      8 | {commentaire_auteur_lien} a dit : 9 |
      10 |
      11 | {commentaire_contenu} 12 |
      13 | 16 |
      17 |
      18 | -------------------------------------------------------------------------------- /themes/default/template/link.html: -------------------------------------------------------------------------------- 1 |
      2 |
      3 |

      #{lien_id} - {lien_titre}

      4 |
      5 |
      6 | 7 |
      8 | {lien_description} 9 |
      10 | 11 |
      12 | 13 |
      {lien_url}
      14 |
      15 |
      16 | -------------------------------------------------------------------------------- /themes/default/template/post.html: -------------------------------------------------------------------------------- 1 | 14 | 15 |
      16 |
      {nombre_commentaires}
      17 | {BOUCLE_commentaires} 18 |
      19 |
      20 | avatar 21 | 22 |
      23 |
      24 |
      25 | {commentaire_auteur_lien} a dit : 26 |
      27 |
      28 | {commentaire_contenu} 29 |
      30 | 33 |
      34 |
      35 | {/BOUCLE_commentaires} 36 |
      37 | 38 |
      39 | {formulaire_commentaire} 40 |
      41 | --------------------------------------------------------------------------------