├── .gitignore ├── .travis.yml ├── README.md ├── calendar ├── calendar.php └── style.css ├── contact ├── contact.css ├── contact.js └── contact.php ├── highlight ├── highlight.css ├── highlight.min.js ├── highlight.php └── start_highlight.js ├── hscroll ├── hscroll.css ├── hscroll.js └── hscroll.php ├── latex ├── auto-render.min.js ├── fonts │ ├── KaTeX_AMS-Regular.eot │ ├── KaTeX_AMS-Regular.ttf │ ├── KaTeX_AMS-Regular.woff │ ├── KaTeX_AMS-Regular.woff2 │ ├── KaTeX_Caligraphic-Bold.eot │ ├── KaTeX_Caligraphic-Bold.ttf │ ├── KaTeX_Caligraphic-Bold.woff │ ├── KaTeX_Caligraphic-Bold.woff2 │ ├── KaTeX_Caligraphic-Regular.eot │ ├── KaTeX_Caligraphic-Regular.ttf │ ├── KaTeX_Caligraphic-Regular.woff │ ├── KaTeX_Caligraphic-Regular.woff2 │ ├── KaTeX_Fraktur-Bold.eot │ ├── KaTeX_Fraktur-Bold.ttf │ ├── KaTeX_Fraktur-Bold.woff │ ├── KaTeX_Fraktur-Bold.woff2 │ ├── KaTeX_Fraktur-Regular.eot │ ├── KaTeX_Fraktur-Regular.ttf │ ├── KaTeX_Fraktur-Regular.woff │ ├── KaTeX_Fraktur-Regular.woff2 │ ├── KaTeX_Main-Bold.eot │ ├── KaTeX_Main-Bold.ttf │ ├── KaTeX_Main-Bold.woff │ ├── KaTeX_Main-Bold.woff2 │ ├── KaTeX_Main-Italic.eot │ ├── KaTeX_Main-Italic.ttf │ ├── KaTeX_Main-Italic.woff │ ├── KaTeX_Main-Italic.woff2 │ ├── KaTeX_Main-Regular.eot │ ├── KaTeX_Main-Regular.ttf │ ├── KaTeX_Main-Regular.woff │ ├── KaTeX_Main-Regular.woff2 │ ├── KaTeX_Math-BoldItalic.eot │ ├── KaTeX_Math-BoldItalic.ttf │ ├── KaTeX_Math-BoldItalic.woff │ ├── KaTeX_Math-BoldItalic.woff2 │ ├── KaTeX_Math-Italic.eot │ ├── KaTeX_Math-Italic.ttf │ ├── KaTeX_Math-Italic.woff │ ├── KaTeX_Math-Italic.woff2 │ ├── KaTeX_Math-Regular.eot │ ├── KaTeX_Math-Regular.ttf │ ├── KaTeX_Math-Regular.woff │ ├── KaTeX_Math-Regular.woff2 │ ├── KaTeX_SansSerif-Bold.eot │ ├── KaTeX_SansSerif-Bold.ttf │ ├── KaTeX_SansSerif-Bold.woff │ ├── KaTeX_SansSerif-Bold.woff2 │ ├── KaTeX_SansSerif-Italic.eot │ ├── KaTeX_SansSerif-Italic.ttf │ ├── KaTeX_SansSerif-Italic.woff │ ├── KaTeX_SansSerif-Italic.woff2 │ ├── KaTeX_SansSerif-Regular.eot │ ├── KaTeX_SansSerif-Regular.ttf │ ├── KaTeX_SansSerif-Regular.woff │ ├── KaTeX_SansSerif-Regular.woff2 │ ├── KaTeX_Script-Regular.eot │ ├── KaTeX_Script-Regular.ttf │ ├── KaTeX_Script-Regular.woff │ ├── KaTeX_Script-Regular.woff2 │ ├── KaTeX_Size1-Regular.eot │ ├── KaTeX_Size1-Regular.ttf │ ├── KaTeX_Size1-Regular.woff │ ├── KaTeX_Size1-Regular.woff2 │ ├── KaTeX_Size2-Regular.eot │ ├── KaTeX_Size2-Regular.ttf │ ├── KaTeX_Size2-Regular.woff │ ├── KaTeX_Size2-Regular.woff2 │ ├── KaTeX_Size3-Regular.eot │ ├── KaTeX_Size3-Regular.ttf │ ├── KaTeX_Size3-Regular.woff │ ├── KaTeX_Size3-Regular.woff2 │ ├── KaTeX_Size4-Regular.eot │ ├── KaTeX_Size4-Regular.ttf │ ├── KaTeX_Size4-Regular.woff │ ├── KaTeX_Size4-Regular.woff2 │ ├── KaTeX_Typewriter-Regular.eot │ ├── KaTeX_Typewriter-Regular.ttf │ ├── KaTeX_Typewriter-Regular.woff │ └── KaTeX_Typewriter-Regular.woff2 ├── katex-config.js ├── katex.min.css ├── katex.min.js └── latex.php ├── lazyload ├── echo.js ├── lazyload.css ├── lazyload.js └── lazyload.php ├── readmore ├── readmore.php └── style.css ├── relatedposts ├── relatedposts.php └── style.css ├── showrss ├── getrss.php ├── phpcs.phar └── showrss.php ├── sidelinks └── sidelinks.php ├── smileys ├── smileys.js └── smileys.php └── use_firefox ├── use_firefox.css ├── use_firefox.js ├── use_firefox.min.css ├── use_firefox.min.js └── use_firefox.php /.gitignore: -------------------------------------------------------------------------------- 1 | *.ini 2 | *.html 3 | cache/ 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | php: 3 | - 5.5 4 | - 5.6 5 | - 7.0 6 | - nightly 7 | 8 | install: 9 | - curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar 10 | 11 | script: 12 | - php phpcs.phar --standard=PSR2 -np --tab-width=4 --encoding=utf-8 . 13 | 14 | matrix: 15 | fast_finish: true 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Addons for [BlogoText](https://github.com/BlogoText/blogotext) 2 | 3 | ## How to use ? 4 | 5 | * [Download the zip](https://github.com/BlogoText/blogotext-addons/archive/master.zip) 6 | * Unzip into the addons folder of your BlogoText 7 | * Go to your admin / addons (http://example.com/admin/addons.php) 8 | 9 | 10 | ## Create your addon 11 | 12 | - Take a look to [this repository](https://github.com/BlogoText/blogotext-addons-example), you will find an example, some documentations ... 13 | - Fork this repo and create a branch for each of your addon (1 addon = 1 branch). 14 | - The master branch is for working and approved addons 15 | - The dev branch is when you need some review or help by the community. 16 | 17 | ## Update an addon 18 | 19 | - get your [addon/branch updated](https://github.com/BlogoText/blogotext/wiki/Contributing) 20 | - push to master or dev, depending on the addon status 21 | 22 | ## Update of your addon from the community 23 | 24 | Keep in mind that the community or maintainers can modify, delete (...) your addon when they are on this repo. So we can improve, debug, update your addon when needed. 25 | -------------------------------------------------------------------------------- /calendar/calendar.php: -------------------------------------------------------------------------------- 1 | 'calendar', 21 | 'name' => array( 22 | 'en' => 'Calendar', 23 | 'fr' => 'Calendrier', 24 | ), 25 | 'desc' => array( 26 | 'en' => 'Display a navigable HTML calendar.', 27 | 'fr' => 'Affiche un calendrier navigable.', 28 | ), 29 | 'version' => '1.0.0', 30 | 'compliancy' => '3.7', 31 | 'css' => 'style.css', 32 | ); 33 | 34 | function a_calendar() 35 | { 36 | // Get the post ID 37 | $date = date('Ym'); 38 | $postId = (string)filter_input(INPUT_GET, 'd'); 39 | if (preg_match('#^\d{4}(/\d{2}){5}#', $postId)) { 40 | $postId = (int)substr(str_replace('/', '', $postId), 0, 14); 41 | $date = substr(get_entry($GLOBALS['db_handle'], 'articles', 'bt_date', $postId, 'return'), 0, 8); 42 | $date = ($date <= date('Ymd')) ? $date : date('Ym'); 43 | } elseif (preg_match('#^\d{4}/\d{2}(/\d{2})?#', $postId)) { 44 | $date = str_replace('/', '', $postId); 45 | $date = (preg_match('#^\d{6}\d{2}#', $date)) ? substr($date, 0, 8) : substr($date, 0, 6); 46 | } elseif (preg_match('#^\d{14}#', $postId)) { 47 | $date = substr($postId, 0, 8); 48 | } 49 | // quick fix for #12 (http 500 when url modified) 50 | if (!is_int($date)) { 51 | $date = date('Ym'); 52 | } 53 | $year = substr($date, 0, 4); 54 | $thisMonth = substr($date, 4, 2); 55 | $thisDay = (strlen(substr($date, 6, 2)) == 2) ? substr($date, 6, 2) : ''; 56 | 57 | $mode = (string)filter_input(INPUT_GET, 'mode'); 58 | $qstring = ($mode != '') ? 'mode='.htmlspecialchars($mode).'&' : ''; 59 | 60 | $firstDay = mktime(0, 0, 0, $thisMonth, 1, $year); 61 | $daysInThisMonth = date('t', $firstDay); 62 | $dayOffset = date('w', $firstDay - 1); 63 | 64 | // We check if there is one or more posts/links/comments in the current month 65 | $datesList = array(); 66 | switch ($mode) { 67 | case 'comments': 68 | $where = 'commentaires'; 69 | break; 70 | case 'links': 71 | $where = 'links'; 72 | break; 73 | case 'blog': 74 | default: 75 | $where = 'articles'; 76 | break; 77 | } 78 | 79 | // We look for previous and next post dates 80 | list($previousPost, $nextPost) = a_calendar_prev_next_posts_($year, $thisMonth, $where); 81 | $previousMonth = '?'.$qstring.'d='.substr($previousPost, 0, 4).'/'.substr($previousPost, 4, 2); 82 | $nextMonth = '?'.$qstring.'d='.substr($nextPost, 0, 4).'/'.substr($nextPost, 4, 2); 83 | 84 | // List of days containing at least one post for this month 85 | $datesList = a_calendar_table_list_date_($year.$thisMonth, $where); 86 | 87 | // Calendar header 88 | $html = ''."\n"; 89 | $html .= ''."\n".''."\n"; 98 | 99 | // Calendar days 100 | if ($dayOffset > 0) { 101 | for ($i = 0; $i < $dayOffset; $i++) { 102 | $html .= ''; 103 | } 104 | } 105 | for ($day = 1; $day <= $daysInThisMonth; $day++) { 106 | $class = $day == ($thisDay) ? ' class="active"' : ''; 107 | $link = $day; 108 | if (in_array($day, $datesList)) { 109 | $link = ''.$day.''; 110 | } 111 | $html .= ''.$link.''; 112 | $dayOffset++; 113 | if ($dayOffset == 7) { 114 | $dayOffset = 0; 115 | $html .= ''; 116 | if ($day < $daysInThisMonth) { 117 | $html .= ''; 118 | } 119 | } 120 | } 121 | if ($dayOffset > 0) { 122 | for ($i = $dayOffset; $i < 7; $i++) { 123 | $html .= ''; 124 | } 125 | $html .= ''."\n"; 126 | } 127 | $html .= '
'; 90 | if ($previousPost !== null) { 91 | $html .= '« '; 92 | } 93 | $html .= ''.mois_en_lettres($thisMonth).' '.$year.''; 94 | if ($nextPost !== null) { 95 | $html .= ' »'; 96 | } 97 | $html .= '
'."\n"; 128 | 129 | return $html; 130 | } 131 | 132 | // Returns a list of days containing at least one post for a given month 133 | function a_calendar_table_list_date_($date, $table) 134 | { 135 | $return = array(); 136 | $column = ($table == 'articles') ? 'bt_date' : 'bt_id'; 137 | $query = ' 138 | SELECT DISTINCT SUBSTR('.$column.', 7, 2) AS date 139 | FROM '.$table.' 140 | WHERE bt_statut = 1 141 | AND '.$column.' LIKE "'.$date.'%"'.' 142 | AND '.$column.' <= '.date('YmdHis'); 143 | try { 144 | $req = $GLOBALS['db_handle']->query($query); 145 | while ($row = $req->fetch(PDO::FETCH_ASSOC)) { 146 | $return[] = $row['date']; 147 | } 148 | return $return; 149 | } catch (Exception $e) { 150 | return ((bool)DISPLAY_PHP_ERRORS) ? 'Error addon_calendar:a_calendar_table_list_date_(): '.$e->getMessage() : ''; 151 | } 152 | } 153 | 154 | // Returns dates of the previous and next visible posts 155 | function a_calendar_prev_next_posts_($year, $month, $table) 156 | { 157 | $column = ($table == 'articles') ? 'bt_date' : 'bt_id'; 158 | $date = new DateTime(); 159 | $date->setDate($year, $month, 1)->setTime(0, 0, 0); 160 | $dateMin = $date->format('YmdHis'); 161 | $date->modify('+1 month'); 162 | $dateMax = $date->format('YmdHis'); 163 | 164 | $query = ' 165 | SELECT 166 | (SELECT SUBSTR('.$column.', 0, 7) 167 | FROM '.$table.' 168 | WHERE bt_statut = 1 169 | AND '.$column.' < '.$dateMin.' 170 | ORDER BY '.$column.' DESC 171 | LIMIT 1), 172 | (SELECT SUBSTR('.$column.', 0, 7) 173 | FROM '.$table.' 174 | WHERE bt_statut = 1 175 | AND '.$column.' > '.$dateMax.' 176 | AND '.$column.' <= '.date('YmdHis').' 177 | ORDER BY '.$column.' ASC 178 | LIMIT 1)'; 179 | 180 | try { 181 | $req = $GLOBALS['db_handle']->query($query); 182 | return array_values($req->fetch(PDO::FETCH_ASSOC)); 183 | } catch (Exception $e) { 184 | return ((bool)DISPLAY_PHP_ERRORS) ? 'Error addon_calendar:a_calendar_prev_next_posts_(): '.$e->getMessage() : ''; 185 | } 186 | } 187 | -------------------------------------------------------------------------------- /calendar/style.css: -------------------------------------------------------------------------------- 1 | #calendar { 2 | margin: 0 auto; 3 | } 4 | 5 | #calendar, 6 | #calendar caption { 7 | background: rgba(0, 0, 0, .02); 8 | } 9 | 10 | #calendar caption { 11 | padding: 15px 0 20px; 12 | } 13 | 14 | #calendar caption > a { 15 | padding: 5px 10px; 16 | } 17 | 18 | #calendar td { 19 | width: 30px; 20 | height: 30px; 21 | border-radius: 3px; 22 | border: 1px solid transparent; 23 | empty-cells: hide; 24 | text-align: center; 25 | line-height: 30px; 26 | color: rgba(42, 42, 42, .3); 27 | position: relative; 28 | } 29 | 30 | #calendar td a { 31 | color: rgba(42, 42, 42, .8); 32 | display: inline-block; 33 | width: 100%; 34 | height: 100%; 35 | } 36 | 37 | #calendar td a:hover { 38 | color: #000; 39 | } 40 | 41 | #calendar td a::before { 42 | content: ""; 43 | background-color: #2196F3; 44 | position: absolute; 45 | width: 5px; 46 | height: 5px; 47 | border-radius: 50%; 48 | left: 14px; 49 | bottom: 2px; 50 | } 51 | -------------------------------------------------------------------------------- /contact/contact.css: -------------------------------------------------------------------------------- 1 | .contact_addon { 2 | padding: 15px; 3 | text-align: left; 4 | max-width: 640px; 5 | margin: auto; 6 | } 7 | 8 | .contact_form { 9 | display: block; 10 | } 11 | .contact_form.contact_hidden 12 | { 13 | display: none; 14 | } 15 | 16 | .contact_error { 17 | border: 1px solid red; 18 | text-align: center; 19 | padding: 3px; 20 | } 21 | .contact_success { 22 | color: green; 23 | } 24 | 25 | .contact_title { 26 | font-size: 1.3em; 27 | font-weight:bolder; 28 | } 29 | 30 | /* all labels */ 31 | .contact_form label { 32 | margin-right: 10px; 33 | } 34 | /*all parts */ 35 | .contact_form .contact_content, 36 | .contact_form .contact_email, 37 | .contact_form .contact_captcha { 38 | margin-top: 10px; 39 | } 40 | /* all input (- submit)+ textarea */ 41 | .contact_form .contact_content input, 42 | .contact_form .contact_email input, 43 | .contact_form .contact_captcha input, 44 | .contact_form textarea { 45 | width: 100%; 46 | } 47 | 48 | /* per input conf */ 49 | .contact_form .contact_captcha input { 50 | width: 4ch; 51 | max-width: 100px; 52 | } 53 | 54 | 55 | /* buttons */ 56 | 57 | /* button show/hide form and submit */ 58 | .contact_form .contact_submit input, 59 | .contact_addon_button button{ 60 | display: block; 61 | background: #2196F3; 62 | color: white; 63 | padding: 10px; 64 | width: 100%; 65 | max-width: 225px; 66 | margin: auto; 67 | text-align: center; 68 | border-radius: 5px; 69 | font-weight: bolder; 70 | border: 0; 71 | text-decoration: none; 72 | box-shadow: 1px 1px 2px rgba(100, 100, 100, 0.1); 73 | } 74 | 75 | .contact_form .contact_submit { 76 | text-align: center; 77 | margin: 20px auto; 78 | } 79 | .contact_form .contact_submit input:hover, 80 | .contact_addon_button button:hover { 81 | box-shadow: 1px 1px 2px rgba(100, 100, 100,0.5); 82 | } 83 | -------------------------------------------------------------------------------- /contact/contact.js: -------------------------------------------------------------------------------- 1 | function a_contact_showhide() 2 | { 3 | 'use strict'; 4 | 5 | var i, 6 | aForms = document.querySelectorAll('.contact_form'), 7 | aBtns = document.querySelectorAll('.contact_addon_button'); 8 | 9 | // show the form 10 | for (i = 0; i < aForms.length; ++i) { 11 | aForms[i].style.display = "block"; 12 | } 13 | // hide the button 14 | for (i = 0; i < aBtns.length; ++i) { 15 | aBtns[i].style.display = "none"; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /contact/contact.php: -------------------------------------------------------------------------------- 1 | 'contact', 31 | 32 | // the name, showed in admin/addon (required) 33 | 'name' => array( 34 | 'en' => 'Contact', 35 | 'fr' => 'Contact', 36 | ), 37 | 38 | // the desc, showed in admin/addon (required) 39 | 'desc' => array( 40 | 'en' => 'Add a contact form', 41 | 'fr' => 'Formulaire de contact', 42 | ), 43 | 44 | 'url' => 'https://yeuxdelibad.net', 45 | // the version, showed in admin/addon (required) 46 | 'version' => '1.0.6', 47 | 'compliancy' => '3.7', 48 | 'css' => 'contact.css', 49 | 'js' => 'contact.js', 50 | 'settings' => array( 51 | 'label' => array( 52 | 'type' => 'text', 53 | 'label' => array( 54 | 'en' => 'Label to display where the form should be.', 55 | 'fr' => 'Texte à afficher là où sera le formulaire de contact.' 56 | ), 57 | 'value' => '✉ Contact', 58 | ), 59 | 'title' => array( 60 | 'type' => 'text', 61 | 'label' => array( 62 | 'en' => 'title over the form', 63 | 'fr' => 'Titre au dessus du formulaire.' 64 | ), 65 | 'value' => 'Message à l\'auteur', 66 | ), 67 | ), 68 | ); 69 | 70 | 71 | 72 | /** 73 | * Cette fonction sert à vérifier la syntaxe d'un email 74 | * 75 | * @params $email string 76 | * @return bool 77 | */ 78 | function IsEmail($email) 79 | { 80 | $value = preg_match('/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/', $email); 81 | return (($value === 0) || ($value === false)) ? false : true; 82 | } 83 | 84 | function a_contact() 85 | { 86 | 87 | // form status 88 | // 'empty', 'tosend', 'error' 89 | $form_proceed = 'empty'; 90 | // random ids for html 91 | $random_ids = mt_rand(3, 5); 92 | 93 | // les données par défault 94 | $datas = array( 95 | 'from' => '', 96 | 'message' => '', 97 | 'captcha' => '', 98 | ); 99 | $errors = array( 100 | 'from' => '', 101 | 'message' => '', 102 | 'captcha' => '', 103 | ); 104 | 105 | require_once BT_ROOT.'/config/settings.php'; 106 | 107 | // Some translations 108 | $msgs = array( 109 | 'object' => 'New contact from your blog ' . $GLOBALS['nom_du_site'] . '.', 110 | 'error_mail' => 'Please enter your mail address.', 111 | 'error_message' => 'Please write something.', 112 | 'error_captcha' => 'Please check captcha', 113 | 'error' => 'An error occured ☹', 114 | 'success' => 'Your message has been send ☺', 115 | 'send' => 'Send ✓', 116 | ); 117 | if ($GLOBALS['lang']['id'] == "fr") { 118 | $msgs = array( 119 | 'object' => 'Nouveau message depuis votre blog ' . $GLOBALS['nom_du_site'] . '.', 120 | 'error_mail' => 'Entrez une adresse courriel valide svp', 121 | 'error_message' => 'Écriver un message svp', 122 | 'error_captcha' => 'Erreur de calcul?', 123 | 'error' => 'Une erreur est survenue ☹', 124 | 'success' => 'Votre message a bien été envoyé ☺', 125 | 'send' => 'Envoyer ✓', 126 | ); 127 | } 128 | 129 | if (isset($_POST['contact_envoi'])) { 130 | // let's believe it's ok 131 | $form_proceed = 'tosend'; 132 | $destinataire = $GLOBALS['email']; 133 | 134 | // get datas 135 | $datas['from'] = filter_input(INPUT_POST, 'a_contact_from', FILTER_SANITIZE_SPECIAL_CHARS); 136 | $datas['message'] = filter_input(INPUT_POST, 'a_contact_message', FILTER_SANITIZE_SPECIAL_CHARS); 137 | $datas['captcha'] = filter_input(INPUT_POST, 'a_contact_captcha', FILTER_SANITIZE_SPECIAL_CHARS); 138 | $datas['token'] = filter_input(INPUT_POST, 'a_contact_token', FILTER_SANITIZE_SPECIAL_CHARS); 139 | 140 | // check datas 141 | if (!IsEmail($datas['from'])) { 142 | $errors['from'] = $msgs['error_mail']; 143 | $form_proceed = 'error'; 144 | } 145 | if (empty($datas['message'])) { 146 | $errors['message'] = $msgs['error_message']; 147 | $form_proceed = 'error'; 148 | } 149 | if (empty($datas['captcha']) || empty($datas['token'])) { 150 | $errors['captcha'] = $msgs['error_captcha']; 151 | $form_proceed = 'error'; 152 | } else { 153 | $ua = (isset($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : ''; 154 | if ($datas['token'] != sha1($ua.$datas['captcha'])) { 155 | $errors['captcha'] = $msgs['error_captcha']; 156 | $form_proceed = 'error'; 157 | } 158 | } 159 | 160 | // send email if no error 161 | if ($form_proceed == 'tosend') { 162 | $datas['message'] = htmlspecialchars_decode($datas['message'], ENT_NOQUOTES); 163 | 164 | $headers = 'MIME-Version: 1.0' . "\r\n"; 165 | $headers .= 'From: <'.$datas['from'].'>' . "\r\n" . 166 | 'Reply-To:'.$datas['from']. "\r\n" . 167 | 'Content-Type: text/plain; charset="utf-8"; DelSp="Yes"; format=flowed '."\r\n" . 168 | 'Content-Disposition: inline'. "\r\n" . 169 | 'Content-Transfer-Encoding: 7bit'." \r\n" . 170 | 'X-Mailer:PHP/'.phpversion(); 171 | 172 | $ok = @mail($destinataire, $msgs['object'], $datas['message'], $headers); 173 | if (!$ok) { 174 | $form_proceed = 'error'; 175 | } 176 | } 177 | } 178 | 179 | // display form 180 | $html = '
'; 181 | 182 | // if succeed 183 | if ($form_proceed == 'tosend') { 184 | $html .= '
'; 185 | $html .= $msgs['success']; 186 | $html .= '
'; 187 | // end here HTML 188 | $html .= '
'; 189 | return $html; 190 | } 191 | 192 | // error 193 | if ($form_proceed == 'error') { 194 | $html .= '
'; 195 | $html .= '
'.$msgs['error'].'
'; 196 | foreach ($errors as $e) { 197 | if (!empty($e)) { 198 | $html .= '
'.$e.'
'; 199 | } 200 | } 201 | $html .= '
'; 202 | $html .= '
'; 203 | } 204 | 205 | if ($form_proceed == 'empty') { 206 | $html .= '
'; 207 | } 208 | 209 | $html .= '
'.addon_get_setting('contact', 'title').'
'; 210 | $html .= '
'; 211 | $html .= '
'; 212 | $html .= ''; 213 | $html .= ''; 214 | $html .= '
'; 215 | $html .= '
'; 216 | $html .= ''; 217 | $html .= ''; 218 | $html .= '
'; 219 | $html .= '
'; 220 | $html .= ''; 222 | $html .= '
'; 223 | $html .= hidden_input('a_contact_token', $GLOBALS['captcha']['hash']); 224 | $html .= '
'; 225 | $html .= ''; 226 | $html .= '
'; 227 | $html .= '
'; 228 | $html .= '
'; 229 | 230 | if ($form_proceed == 'empty') { 231 | $html .= '
'; 232 | $html .= ''; 235 | $html .= '
'; 236 | } 237 | $html .= '
'; 238 | $html .= '
'; 239 | 240 | return $html; 241 | } 242 | -------------------------------------------------------------------------------- /highlight/highlight.css: -------------------------------------------------------------------------------- 1 | 2 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#23241f}.hljs,.hljs-subst,.hljs-tag{color:#f8f8f2}.hljs-emphasis,.hljs-strong{color:#a8a8a2}.hljs-bullet,.hljs-link,.hljs-literal,.hljs-number,.hljs-quote,.hljs-regexp{color:#ae81ff}.hljs-code,.hljs-section,.hljs-selector-class,.hljs-title{color:#a6e22e}.hljs-strong{font-weight:700}.hljs-emphasis{font-style:italic}.hljs-attr,.hljs-keyword,.hljs-name,.hljs-selector-tag{color:#f92672}.hljs-attribute,.hljs-symbol{color:#66d9ef}.hljs-class .hljs-title,.hljs-params{color:#f8f8f2}.hljs-addition,.hljs-built_in,.hljs-builtin-name,.hljs-selector-attr,.hljs-selector-id,.hljs-selector-pseudo,.hljs-string,.hljs-template-variable,.hljs-type,.hljs-variable{color:#e6db74}.hljs-comment,.hljs-deletion,.hljs-meta{color:#75715e} 3 | -------------------------------------------------------------------------------- /highlight/highlight.min.js: -------------------------------------------------------------------------------- 1 | /*! highlight.js v9.9.0 | BSD3 License | git.io/hljslicense */ 2 | !function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs}))}(function(e){function t(e){return e.replace(/[&<>]/gm,function(e){return L[e]})}function r(e){return e.nodeName.toLowerCase()}function a(e,t){var r=e&&e.exec(t);return r&&0===r.index}function n(e){return C.test(e)}function i(e){var t,r,a,i,s=e.className+" ";if(s+=e.parentNode?e.parentNode.className:"",r=E.exec(s))return y(r[1])?r[1]:"no-highlight";for(s=s.split(/\s+/),t=0,a=s.length;a>t;t++)if(i=s[t],n(i)||y(i))return i}function s(e,t){var r,a={};for(r in e)a[r]=e[r];if(t)for(r in t)a[r]=t[r];return a}function c(e){var t=[];return function a(e,n){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?n+=i.nodeValue.length:1===i.nodeType&&(t.push({event:"start",offset:n,node:i}),n=a(i,n),r(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:n,node:i}));return n}(e,0),t}function o(e,a,n){function i(){return e.length&&a.length?e[0].offset!==a[0].offset?e[0].offset"}function c(e){u+=""}function o(e){("start"===e.event?s:c)(e.node)}for(var l=0,u="",d=[];e.length||a.length;){var b=i();if(u+=t(n.substring(l,b[0].offset)),l=b[0].offset,b===e){d.reverse().forEach(c);do o(b.splice(0,1)[0]),b=i();while(b===e&&b.length&&b[0].offset===l);d.reverse().forEach(s)}else"start"===b[0].event?d.push(b[0].node):d.pop(),o(b.splice(0,1)[0])}return u+t(n.substr(l))}function l(e){function t(e){return e&&e.source||e}function r(r,a){return new RegExp(t(r),"m"+(e.cI?"i":"")+(a?"g":""))}function a(n,i){if(!n.compiled){if(n.compiled=!0,n.k=n.k||n.bK,n.k){var c={},o=function(t,r){e.cI&&(r=r.toLowerCase()),r.split(" ").forEach(function(e){var r=e.split("|");c[r[0]]=[t,r[1]?Number(r[1]):1]})};"string"==typeof n.k?o("keyword",n.k):N(n.k).forEach(function(e){o(e,n.k[e])}),n.k=c}n.lR=r(n.l||/\w+/,!0),i&&(n.bK&&(n.b="\\b("+n.bK.split(" ").join("|")+")\\b"),n.b||(n.b=/\B|\b/),n.bR=r(n.b),n.e||n.eW||(n.e=/\B|\b/),n.e&&(n.eR=r(n.e)),n.tE=t(n.e)||"",n.eW&&i.tE&&(n.tE+=(n.e?"|":"")+i.tE)),n.i&&(n.iR=r(n.i)),null==n.r&&(n.r=1),n.c||(n.c=[]);var l=[];n.c.forEach(function(e){e.v?e.v.forEach(function(t){l.push(s(e,t))}):l.push("self"===e?n:e)}),n.c=l,n.c.forEach(function(e){a(e,n)}),n.starts&&a(n.starts,i);var u=n.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([n.tE,n.i]).map(t).filter(Boolean);n.t=u.length?r(u.join("|"),!0):{exec:function(){return null}}}}a(e)}function u(e,r,n,i){function s(e,t){var r,n;for(r=0,n=t.c.length;n>r;r++)if(a(t.c[r].bR,e))return t.c[r]}function c(e,t){if(a(e.eR,t)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?c(e.parent,t):void 0}function o(e,t){return!n&&a(t.iR,e)}function b(e,t){var r=v.cI?t[0].toLowerCase():t[0];return e.k.hasOwnProperty(r)&&e.k[r]}function p(e,t,r,a){var n=a?"":S.classPrefix,i='',i+t+s}function m(){var e,r,a,n;if(!N.k)return t(E);for(n="",r=0,N.lR.lastIndex=0,a=N.lR.exec(E);a;)n+=t(E.substring(r,a.index)),e=b(N,a),e?(M+=e[1],n+=p(e[0],t(a[0]))):n+=t(a[0]),r=N.lR.lastIndex,a=N.lR.exec(E);return n+t(E.substr(r))}function f(){var e="string"==typeof N.sL;if(e&&!k[N.sL])return t(E);var r=e?u(N.sL,E,!0,x[N.sL]):d(E,N.sL.length?N.sL:void 0);return N.r>0&&(M+=r.r),e&&(x[N.sL]=r.top),p(r.language,r.value,!1,!0)}function g(){C+=null!=N.sL?f():m(),E=""}function _(e){C+=e.cN?p(e.cN,"",!0):"",N=Object.create(e,{parent:{value:N}})}function h(e,t){if(E+=e,null==t)return g(),0;var r=s(t,N);if(r)return r.skip?E+=t:(r.eB&&(E+=t),g(),r.rB||r.eB||(E=t)),_(r,t),r.rB?0:t.length;var a=c(N,t);if(a){var n=N;n.skip?E+=t:(n.rE||n.eE||(E+=t),g(),n.eE&&(E=t));do N.cN&&(C+=B),N.skip||(M+=N.r),N=N.parent;while(N!==a.parent);return a.starts&&_(a.starts,""),n.rE?0:t.length}if(o(t,N))throw new Error('Illegal lexeme "'+t+'" for mode "'+(N.cN||"")+'"');return E+=t,t.length||1}var v=y(e);if(!v)throw new Error('Unknown language: "'+e+'"');l(v);var w,N=i||v,x={},C="";for(w=N;w!==v;w=w.parent)w.cN&&(C=p(w.cN,"",!0)+C);var E="",M=0;try{for(var L,R,A=0;;){if(N.t.lastIndex=A,L=N.t.exec(r),!L)break;R=h(r.substring(A,L.index),L[0]),A=L.index+R}for(h(r.substr(A)),w=N;w.parent;w=w.parent)w.cN&&(C+=B);return{r:M,value:C,language:e,top:N}}catch($){if($.message&&-1!==$.message.indexOf("Illegal"))return{r:0,value:t(r)};throw $}}function d(e,r){r=r||S.languages||N(k);var a={r:0,value:t(e)},n=a;return r.filter(y).forEach(function(t){var r=u(t,e,!1);r.language=t,r.r>n.r&&(n=r),r.r>a.r&&(n=a,a=r)}),n.language&&(a.second_best=n),a}function b(e){return S.tabReplace||S.useBR?e.replace(M,function(e,t){return S.useBR&&"\n"===e?"
":S.tabReplace?t.replace(/\t/g,S.tabReplace):void 0}):e}function p(e,t,r){var a=t?x[t]:r,n=[e.trim()];return e.match(/\bhljs\b/)||n.push("hljs"),-1===e.indexOf(a)&&n.push(a),n.join(" ").trim()}function m(e){var t,r,a,s,l,m=i(e);n(m)||(S.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):t=e,l=t.textContent,a=m?u(m,l,!0):d(l),r=c(t),r.length&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","div"),s.innerHTML=a.value,a.value=o(r,c(s),l)),a.value=b(a.value),e.innerHTML=a.value,e.className=p(e.className,m,a.language),e.result={language:a.language,re:a.r},a.second_best&&(e.second_best={language:a.second_best.language,re:a.second_best.r}))}function f(e){S=s(S,e)}function g(){if(!g.called){g.called=!0;var e=document.querySelectorAll("pre code");w.forEach.call(e,m)}}function _(){addEventListener("DOMContentLoaded",g,!1),addEventListener("load",g,!1)}function h(t,r){var a=k[t]=r(e);a.aliases&&a.aliases.forEach(function(e){x[e]=t})}function v(){return N(k)}function y(e){return e=(e||"").toLowerCase(),k[e]||k[x[e]]}var w=[],N=Object.keys,k={},x={},C=/^(no-?highlight|plain|text)$/i,E=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,B="
",S={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},L={"&":"&","<":"<",">":">"};return e.highlight=u,e.highlightAuto=d,e.fixMarkup=b,e.highlightBlock=m,e.configure=f,e.initHighlighting=g,e.initHighlightingOnLoad=_,e.registerLanguage=h,e.listLanguages=v,e.getLanguage=y,e.inherit=s,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(t,r,a){var n=e.inherit({cN:"comment",b:t,e:r,c:[]},a||{});return n.c.push(e.PWM),n.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),n},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e.registerLanguage("apache",function(e){var t={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:""},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",t]},t,e.QSM]}}],i:/\S/}}),e.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},r={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\._]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,r,a,t]}}),e.registerLanguage("coffeescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super yield import export from as default await then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},r="[A-Za-z$_][0-9A-Za-z$_]*",a={cN:"subst",b:/#\{/,e:/}/,k:t},n=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,a]},{b:/"/,e:/"/,c:[e.BE,a]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[a,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+r},{sL:"javascript",eB:!0,eE:!0,v:[{b:"```",e:"```"},{b:"`",e:"`"}]}];a.c=n;var i=e.inherit(e.TM,{b:r}),s="(\\(.*\\))?\\s*\\B[-=]>",c={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:t,c:["self"].concat(n)}]};return{aliases:["coffee","cson","iced"],k:t,i:/\/\*/,c:n.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+r+"\\s*=\\s*"+s,e:"[-=]>",rB:!0,c:[i,c]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:s,e:"[-=]>",rB:!0,c:[c]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{b:r+":",e:":",rB:!0,rE:!0,r:0}])}}),e.registerLanguage("cpp",function(e){var t={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[{b:'(u8?|U)?L?"',e:'"',i:"\\n",c:[e.BE]},{b:'(u8?|U)?R"',e:'"',c:[e.BE]},{b:"'\\\\?.",e:"'",i:"."}]},a={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},n={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},e.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:"<",e:">",i:"\\n"},e.CLCM,e.CBCM]},i=e.IR+"\\s*\\(",s={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},c=[t,e.CLCM,e.CBCM,a,r];return{aliases:["c","cc","h","c++","h++","hpp"],k:s,i:"",k:s,c:["self",t]},{b:e.IR+"::",k:s},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:s,c:c.concat([{b:/\(/,e:/\)/,k:s,c:c.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+e.IR+"[\\*&\\s]+)+"+i,rB:!0,e:/[{;=]/,eE:!0,k:s,i:/[^\w\s\*&]/,c:[{b:i,rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:s,r:0,c:[e.CLCM,e.CBCM,r,a,t]},e.CLCM,e.CBCM,n]}]),exports:{preprocessor:n,strings:r,k:s}}}),e.registerLanguage("cs",function(e){var t={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while nameof add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},r={cN:"string",b:'@"',e:'"',c:[{b:'""'}]},a=e.inherit(r,{i:/\n/}),n={cN:"subst",b:"{",e:"}",k:t},i=e.inherit(n,{i:/\n/}),s={cN:"string",b:/\$"/,e:'"',i:/\n/,c:[{b:"{{"},{b:"}}"},e.BE,i]},c={cN:"string",b:/\$@"/,e:'"',c:[{b:"{{"},{b:"}}"},{b:'""'},n]},o=e.inherit(c,{i:/\n/,c:[{b:"{{"},{b:"}}"},{b:'""'},i]});n.c=[c,s,r,e.ASM,e.QSM,e.CNM,e.CBCM],i.c=[o,s,a,e.ASM,e.QSM,e.CNM,e.inherit(e.CBCM,{i:/\n/})];var l={v:[c,s,r,e.ASM,e.QSM]},u=e.IR+"(<"+e.IR+"(\\s*,\\s*"+e.IR+")*>)?(\\[\\])?";return{aliases:["csharp"],k:t,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:""},{b:""}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},l,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{bK:"new return throw await",r:0},{cN:"function",b:"("+u+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,r:0,c:[l,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}}),e.registerLanguage("css",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",r={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",i:/:/,c:[{cN:"keyword",b:/\w+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:t,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,r]}]}}),e.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\-{3}/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+{3}/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}}),e.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}}),e.registerLanguage("ini",function(e){var t={cN:"string",c:[e.BE],v:[{b:"'''",e:"'''",r:10},{b:'"""',e:'"""',r:10},{b:'"',e:'"'},{b:"'",e:"'"}]};return{aliases:["toml"],cI:!0,i:/\S/,c:[e.C(";","$"),e.HCM,{cN:"section",b:/^\s*\[+/,e:/\]+/},{b:/^[a-z0-9\[\]_-]+\s*=\s*/,e:"$",rB:!0,c:[{cN:"attr",b:/[a-z0-9\[\]_-]+/},{b:/=/,eW:!0,r:0,c:[{cN:"literal",b:/\bon|off|true|false|yes|no\b/},{cN:"variable",v:[{b:/\$[\w\d"][\w\d_]*/},{b:/\$\{(.*?)}/}]},t,{cN:"number",b:/([\+\-]+)?[\d]+_[\d_]+/},e.NM]}]}]}}),e.registerLanguage("java",function(e){var t="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=t+"(<"+t+"(\\s*,\\s*"+t+")*>)?",a="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",n="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",i={cN:"number",b:n,r:0};return{aliases:["jsp"],k:a,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+r+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:a,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:a,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},i,{cN:"meta",b:"@[A-Za-z]+"}]}}),e.registerLanguage("javascript",function(e){var t="[A-Za-z$_][0-9A-Za-z$_]*",r={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:r,c:[]},i={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,i,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:r,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,i,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:t+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:t,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+t+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:t},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:s}]}]},{b://,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:t}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}}),e.registerLanguage("json",function(e){var t={literal:"true false null"},r=[e.QSM,e.CNM],a={e:",",eW:!0,eE:!0,c:r,k:t},n={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(a,{b:/:/})],i:"\\S"},i={b:"\\[",e:"\\]",c:[e.inherit(a)],i:"\\S"};return r.splice(r.length,0,n,i),{c:r,k:t,i:"\\S"}}),e.registerLanguage("makefile",function(e){var t={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{aliases:["mk","mak"],c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[t]}}},{cN:"section",b:/^[\w]+:\s*$/},{cN:"meta",b:/^\.PHONY:/,e:/$/,k:{"meta-keyword":".PHONY"},l:/[\.\w]+/},{b:/^\t+/,e:/$/,r:0,c:[e.QSM,t]}]}}),e.registerLanguage("xml",function(e){var t="[A-Za-z0-9\\._:-]+",r={eW:!0,i:/`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},e.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"|$)",e:">",k:{name:"style"},c:[r],starts:{e:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[r],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},r]}]}}),e.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}}),e.registerLanguage("nginx",function(e){var t={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},r={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,t],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[t]},{cN:"regexp",c:[e.BE,t],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},t]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:r}],r:0}],i:"[^\\s\\}]"}}),e.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},r={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},a=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:r,l:a,i:""}]}]},{cN:"class",b:"("+n.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:n,l:a,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}}),e.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},a={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=[e.BE,r,n],s=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),a,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=s,a.c=s,{aliases:["pl","pm"],l:/[\w\.]+/,k:t,c:s}}),e.registerLanguage("php",function(e){var t={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},r={cN:"meta",b:/<\?(php)?|\?>/},a={cN:"string",c:[e.BE,r],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},n={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.HCM,e.C("//","$",{c:[r]}),e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},r,{cN:"keyword",b:/\$this\b/},t,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",t,e.CBCM,a,n]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},a,n]}}),e.registerLanguage("python",function(e){var t={cN:"meta",b:/^(>>>|\.\.\.) /},r={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[t],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[t],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},a={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},n={cN:"params",b:/\(/,e:/\)/,c:["self",t,a,r]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)|=>/,c:[t,a,r,e.HCM,{v:[{cN:"function",bK:"def"},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,n,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}}),e.registerLanguage("ruby",function(e){var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},a={cN:"doctag",b:"@[A-Za-z]+"},n={b:"#<",e:">"},i=[e.C("#","$",{c:[a]}),e.C("^\\=begin","^\\=end",{c:[a],r:10}),e.C("^__END__","\\n$")],s={cN:"subst",b:"#\\{",e:"}",k:r},c={cN:"string",c:[e.BE,s],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{b:/<<(-?)\w+$/,e:/^\s*\w+$/}]},o={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:r},l=[c,n,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?" 3 | }),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(i)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:t}),o].concat(i)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[c,{b:t}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:r},{b:"("+e.RSR+"|unless)\\s*",c:[n,{cN:"regexp",c:[e.BE,s],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(i),r:0}].concat(i);s.c=l,o.c=l;var u="[>?]>",d="[\\w#]+\\(\\w+\\):\\d+:\\d+>",b="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",p=[{b:/^\s*=>/,starts:{e:"$",c:l}},{cN:"meta",b:"^("+u+"|"+d+"|"+b+")",starts:{e:"$",c:l}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,i:/\/\*/,c:i.concat(p).concat(l)}}),e.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*#]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",e:/;/,eW:!0,l:/[\w\.]+/,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}}),e}); -------------------------------------------------------------------------------- /highlight/highlight.php: -------------------------------------------------------------------------------- 1 | 'highlight', 16 | 17 | 'name' => array( 18 | 'en' => 'Code coloration', 19 | 'fr' => 'Code coloration', 20 | ), 21 | 22 | // the desc, showed in admin/addon (required) 23 | 'desc' => array( 24 | 'en' => 'Code coloration with highlight.js', 25 | 'fr' => 'Du code en couleur avec highlight.js', 26 | ), 27 | 28 | // the version, showed in admin/addon (required) 29 | 'version' => '1.0.0', 30 | 'compliancy' => '3.7', 31 | 32 | 'css' => 'highlight.css', 33 | 'js' => array('highlight.min.js', 'start_highlight.js'), 34 | 'url' => 'https://highlightjs.org/', 35 | ); 36 | -------------------------------------------------------------------------------- /highlight/start_highlight.js: -------------------------------------------------------------------------------- 1 | hljs.initHighlightingOnLoad(); 2 | -------------------------------------------------------------------------------- /hscroll/hscroll.css: -------------------------------------------------------------------------------- 1 | #scroll-bar { 2 | height: 3px; 3 | position: fixed; 4 | top: 0; 5 | left: 0; 6 | z-index: 3000; 7 | -webkit-backface-visibility: hidden; 8 | -moz-backface-visibility: hidden; 9 | backface-visibility: hidden 10 | } 11 | #scroll-bar-inner { 12 | box-shadow: 1px 1px 3px rgba(0,0,0,0.5); 13 | height: 100% 14 | } 15 | -------------------------------------------------------------------------------- /hscroll/hscroll.js: -------------------------------------------------------------------------------- 1 | // stolen from http://www.tiger-222.fr/?d=2016/10/18/14/00/25-scrollbar-horizontale 2 | function scroll_bar() 3 | { 4 | 'use strict'; 5 | var t = document.querySelector('#scroll-bar'), 6 | a = document.body.clientHeight, 7 | n = window.innerHeight, 8 | g = window.pageYOffset, 9 | o = g / (a - n) * 100; 10 | 11 | t.style.width = o + '%'; 12 | } 13 | window.addEventListener('load', scroll_bar); 14 | window.addEventListener('scroll', scroll_bar); 15 | -------------------------------------------------------------------------------- /hscroll/hscroll.php: -------------------------------------------------------------------------------- 1 | 'hscroll', 13 | 14 | // the name, showed in admin/addon (required) 15 | 'name' => array( 16 | 'en' => 'Horizontal scrollprogress', 17 | 'fr' => 'Indicateur de lecture', 18 | ), 19 | 20 | // the desc, showed in admin/addon (required) 21 | 'desc' => array( 22 | 'en' => 'Horizontal reading progressbar', 23 | 'fr' => 'Indicateur horizontal de lecture. Pensez au code d\'intégration', 24 | ), 25 | 'settings' => array( 26 | 'barcolor' => array( 27 | 'type' => 'text', 28 | 'label' => array( 29 | 'en' => 'Color', 30 | 'fr' => 'Couleur' 31 | ), 32 | 'desc' => array( 33 | 'en' => 'Color of scroll-bar', 34 | 'fr' => 'Couleur de la barre de progression', 35 | ), 36 | 'value' => '#7C00FF', 37 | ), 38 | ), 39 | 40 | 41 | // the version, showed in admin/addon (required) 42 | 'version' => '1.1.0', 43 | 'compliancy' => '3.7', 44 | 'css' => 'hscroll.css', 45 | 'js' => 'hscroll.js', 46 | 'url' => 'http://www.tiger-222.fr/?d=2016/10/18/14/00/25-scrollbar-horizontale', 47 | ); 48 | 49 | function a_hscroll() 50 | { 51 | $color = addon_get_setting('hscroll', 'barcolor'); 52 | $html = '
'; 53 | return $html; 54 | } 55 | -------------------------------------------------------------------------------- /latex/auto-render.min.js: -------------------------------------------------------------------------------- 1 | (function(e){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=e()}else if(typeof define==="function"&&define.amd){define([],e)}else{var t;if(typeof window!=="undefined"){t=window}else if(typeof global!=="undefined"){t=global}else if(typeof self!=="undefined"){t=self}else{t=this}t.renderMathInElement=e()}})(function(){var e,t,r;return function n(e,t,r){function a(o,l){if(!t[o]){if(!e[o]){var f=typeof require=="function"&&require;if(!l&&f)return f(o,!0);if(i)return i(o,!0);var d=new Error("Cannot find module '"+o+"'");throw d.code="MODULE_NOT_FOUND",d}var s=t[o]={exports:{}};e[o][0].call(s.exports,function(t){var r=e[o][1][t];return a(r?r:t)},s,s.exports,n,e,t,r)}return t[o].exports}var i=typeof require=="function"&&require;for(var o=0;o.katex{display:inline-block;text-align:initial}.katex{font:400 1.21em KaTeX_Main;line-height:1.2;white-space:nowrap;text-indent:0}.katex .katex-html{display:inline-block}.katex .katex-mathml{position:absolute;clip:rect(1px,1px,1px,1px);padding:0;border:0;height:1px;width:1px;overflow:hidden}.katex .base,.katex .strut{display:inline-block}.katex .mathit{font-family:KaTeX_Math;font-style:italic}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .amsrm,.katex .mathbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr{font-family:KaTeX_Script}.katex .mathsf{font-family:KaTeX_SansSerif}.katex .mainit{font-family:KaTeX_Main;font-style:italic}.katex .textstyle>.mord+.mop{margin-left:.16667em}.katex .textstyle>.mord+.mbin{margin-left:.22222em}.katex .textstyle>.mord+.mrel{margin-left:.27778em}.katex .textstyle>.mop+.mop,.katex .textstyle>.mop+.mord,.katex .textstyle>.mord+.minner{margin-left:.16667em}.katex .textstyle>.mop+.mrel{margin-left:.27778em}.katex .textstyle>.mop+.minner{margin-left:.16667em}.katex .textstyle>.mbin+.minner,.katex .textstyle>.mbin+.mop,.katex .textstyle>.mbin+.mopen,.katex .textstyle>.mbin+.mord{margin-left:.22222em}.katex .textstyle>.mrel+.minner,.katex .textstyle>.mrel+.mop,.katex .textstyle>.mrel+.mopen,.katex .textstyle>.mrel+.mord{margin-left:.27778em}.katex .textstyle>.mclose+.mop{margin-left:.16667em}.katex .textstyle>.mclose+.mbin{margin-left:.22222em}.katex .textstyle>.mclose+.mrel{margin-left:.27778em}.katex .textstyle>.mclose+.minner,.katex .textstyle>.minner+.mop,.katex .textstyle>.minner+.mord,.katex .textstyle>.mpunct+.mclose,.katex .textstyle>.mpunct+.minner,.katex .textstyle>.mpunct+.mop,.katex .textstyle>.mpunct+.mopen,.katex .textstyle>.mpunct+.mord,.katex .textstyle>.mpunct+.mpunct,.katex .textstyle>.mpunct+.mrel{margin-left:.16667em}.katex .textstyle>.minner+.mbin{margin-left:.22222em}.katex .textstyle>.minner+.mrel{margin-left:.27778em}.katex .mclose+.mop,.katex .minner+.mop,.katex .mop+.mop,.katex .mop+.mord,.katex .mord+.mop,.katex .textstyle>.minner+.minner,.katex .textstyle>.minner+.mopen,.katex .textstyle>.minner+.mpunct{margin-left:.16667em}.katex .reset-textstyle.textstyle{font-size:1em}.katex .reset-textstyle.scriptstyle{font-size:.7em}.katex .reset-textstyle.scriptscriptstyle{font-size:.5em}.katex .reset-scriptstyle.textstyle{font-size:1.42857em}.katex .reset-scriptstyle.scriptstyle{font-size:1em}.katex .reset-scriptstyle.scriptscriptstyle{font-size:.71429em}.katex .reset-scriptscriptstyle.textstyle{font-size:2em}.katex .reset-scriptscriptstyle.scriptstyle{font-size:1.4em}.katex .reset-scriptscriptstyle.scriptscriptstyle{font-size:1em}.katex .style-wrap{position:relative}.katex .vlist{display:inline-block}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist .baseline-fix{display:inline-table;table-layout:fixed}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{width:100%}.katex .mfrac .frac-line:before{border-bottom-style:solid;border-bottom-width:1px;content:"";display:block}.katex .mfrac .frac-line:after{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block;margin-top:-1px}.katex .mspace{display:inline-block}.katex .mspace.negativethinspace{margin-left:-.16667em}.katex .mspace.thinspace{width:.16667em}.katex .mspace.mediumspace{width:.22222em}.katex .mspace.thickspace{width:.27778em}.katex .mspace.enspace{width:.5em}.katex .mspace.quad{width:1em}.katex .mspace.qquad{width:2em}.katex .llap,.katex .rlap{width:0;position:relative}.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .rlap>.inner{left:0}.katex .katex-logo .a{font-size:.75em;margin-left:-.32em;position:relative;top:-.2em}.katex .katex-logo .t{margin-left:-.23em}.katex .katex-logo .e{margin-left:-.1667em;position:relative;top:.2155em}.katex .katex-logo .x{margin-left:-.125em}.katex .rule{display:inline-block;border:0 solid;position:relative}.katex .overline .overline-line,.katex .underline .underline-line{width:100%}.katex .overline .overline-line:before,.katex .underline .underline-line:before{border-bottom-style:solid;border-bottom-width:1px;content:"";display:block}.katex .overline .overline-line:after,.katex .underline .underline-line:after{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block;margin-top:-1px}.katex .sqrt>.sqrt-sign{position:relative}.katex .sqrt .sqrt-line{width:100%}.katex .sqrt .sqrt-line:before{border-bottom-style:solid;border-bottom-width:1px;content:"";display:block}.katex .sqrt .sqrt-line:after{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block;margin-top:-1px}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer,.katex .sizing{display:inline-block}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:2em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:3.46em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:4.14em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.98em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.47142857em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.95714286em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.55714286em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.875em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.125em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.25em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.5em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.8em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.1625em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.5875em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:3.1125em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.77777778em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.88888889em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.6em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.92222222em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.3em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.76666667em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.7em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.8em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.9em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.2em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.44em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.73em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:2.07em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.49em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.58333333em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.66666667em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.75em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.83333333em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44166667em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.725em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.075em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.48611111em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.55555556em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.625em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.69444444em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.20138889em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.4375em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72916667em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.28901734em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.40462428em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.46242775em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.52023121em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.57803468em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69364162em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83236994em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.19653179em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.43930636em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.24154589em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.33816425em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.38647343em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.43478261em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.48309179em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.57971014em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69565217em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83574879em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20289855em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.20080321em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.2811245em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.32128514em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.36144578em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.40160643em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48192771em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57831325em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69477912em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.8313253em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist>span,.katex .op-limits>.vlist>span{text-align:center}.katex .accent .accent-body>span{width:0}.katex .accent .accent-body.accent-vec>span{position:relative;left:.326em}.katex .mtable .vertical-separator{display:inline-block;margin:0 -.025em;border-right:.05em solid #000}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist{text-align:center}.katex .mtable .col-align-l>.vlist{text-align:left}.katex .mtable .col-align-r>.vlist{text-align:right} -------------------------------------------------------------------------------- /latex/latex.php: -------------------------------------------------------------------------------- 1 | 'latex', 16 | 'name' => array( 17 | 'en' => 'Write LaTeX code with KaTeX', 18 | 'fr' => 'Ecrivez du LaTeX avec KaTeX', 19 | ), 20 | 'desc' => array( 21 | 'en' => 'Write LaTeX code between \'$\' or \'$$\' : $$\pi=3.14$$', 22 | 'fr' => 'Vous pouvez écrire du LaTeX entre les symboles \'$\' ou \'$$\' : $$\pi=3,14$$', 23 | ), 24 | 'url' => 'https://khan.github.io/KaTeX/', 25 | 'version' => '1.0.0', 26 | 'compliancy' => '3.7', 27 | 'css' => 'katex.min.css', 28 | 'js' => array('katex.min.js', 'auto-render.min.js', 'katex-config.js'), 29 | ); 30 | -------------------------------------------------------------------------------- /lazyload/echo.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Lazy Load Images without jQuery 3 | * https://raw.githubusercontent.com/toddmotto/echo 4 | */ 5 | (function(root,factory){if(typeof define==='function'&&define.amd){define(function(){return factory(root)})}else if(typeof exports==='object'){module.exports=factory}else{root.echo=factory(root)}})(this,function(root){'use strict';var echo={};var callback=function(){};var offset,poll,delay,useDebounce,unload;var isHidden=function(element){return(element.offsetParent===null)};var inView=function(element,view){if(isHidden(element)){return false}var box=element.getBoundingClientRect();return(box.right>=view.l&&box.bottom>=view.t&&box.left<=view.r&&box.top<=view.b)};var debounceOrThrottle=function(){if(!useDebounce&&!!poll){return}clearTimeout(poll);poll=setTimeout(function(){echo.render();poll=null},delay)};echo.init=function(opts){opts=opts||{};var offsetAll=opts.offset||0;var offsetVertical=opts.offsetVertical||offsetAll;var offsetHorizontal=opts.offsetHorizontal||offsetAll;var optionToInt=function(opt,fallback){return parseInt(opt||fallback,10)};offset={t:optionToInt(opts.offsetTop,offsetVertical),b:optionToInt(opts.offsetBottom,offsetVertical),l:optionToInt(opts.offsetLeft,offsetHorizontal),r:optionToInt(opts.offsetRight,offsetHorizontal)};delay=optionToInt(opts.throttle,250);useDebounce=opts.debounce!==false;unload=!!opts.unload;callback=opts.callback||callback;echo.render();if(document.addEventListener){root.addEventListener('scroll',debounceOrThrottle,false);root.addEventListener('load',debounceOrThrottle,false)}else{root.attachEvent('onscroll',debounceOrThrottle);root.attachEvent('onload',debounceOrThrottle)}};echo.render=function(context){var nodes=(context||document).querySelectorAll('[data-echo], [data-echo-background]');var length=nodes.length;var src,elem;var view={l:0-offset.l,t:0-offset.t,b:(root.innerHeight||document.documentElement.clientHeight)+offset.b,r:(root.innerWidth||document.documentElement.clientWidth)+offset.r};for(var i=0;i 'lazyload', 16 | 17 | // the name, showed in admin/addon (required) 18 | 'name' => array( 19 | 'en' => 'Lazyload images', 20 | 'fr' => 'lazyload - chargement d\'images à la demande', 21 | ), 22 | 23 | // the desc, showed in admin/addon (required) 24 | 'desc' => array( 25 | 'en' => 'Load images when in viewport', 26 | 'fr' => 'Chargement des images lorsqu\'elles sont dans le viewport', 27 | ), 28 | 29 | // the version, showed in admin/addon (required) 30 | 'version' => '1.0.2', 31 | 'compliancy' => '3.7', 32 | 'css' => 'lazyload.css', 33 | 'js' => array('echo.js', 'lazyload.js'), 34 | 'url' => 'http://yeuxdelibad.net', 35 | 36 | 'hook-push' => array( 37 | 'list_items' => array( 38 | 'callback' => 'a_lazy_work_on_content', 39 | 'priority' => 100 40 | ) 41 | ), 42 | ); 43 | 44 | function a_lazy_work_on_content($datas) 45 | { 46 | // test le contenu 47 | if (!$datas || !is_array($datas)) { 48 | return $datas; 49 | } 50 | 51 | // on ne traite que les articles (à adapter au besoin) 52 | if ($datas['2'] != 'articles') { 53 | return $datas; 54 | } 55 | 56 | // parcours les articles 57 | foreach ($datas['1'] as &$art) { 58 | // check presence article 59 | if (!isset($art['bt_content'])) { 60 | continue; 61 | } 62 | // check presence de = '20708'); 77 | if ($libxml_compat) { 78 | $doc->loadHTML($art['bt_content'], LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); 79 | } else { 80 | $doc->loadHTML('
'.$art['bt_content'].'
'); 81 | $libxml_compat = false; 82 | } 83 | 84 | // Restore error level 85 | libxml_use_internal_errors($internalErrors); 86 | 87 | $imgs = $doc->getElementsByTagName('img'); 88 | 89 | // on traite les images 90 | for ($i = $imgs->length; --$i >= 0;) { 91 | $img = $imgs->item($i); 92 | 93 | $orgin_src = $img->getAttribute('src'); 94 | $orgin_alt = $img->getAttribute('alt'); 95 | 96 | // set data-echo as src 97 | $img->setAttribute('data-echo', $orgin_src); 98 | // set src as blank gif 99 | // $img->removeAttribute('src'); 100 | $img->setAttribute('src', "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="); 101 | 102 | // class lazy-load 103 | $img->setAttribute('class', 'lazy-load'); 104 | 105 | // on gére le noscript 106 | $noscript = $doc->createElement('noscript'); 107 | 108 | // on insert noscript avant l'image 109 | $img->parentNode->insertBefore($noscript, $img); 110 | 111 | // on gére l'image du noscript 112 | $alt_img = $doc->createElement('img'); 113 | // on insert l'img du noscript dans le noscript 114 | $noscript->appendChild($alt_img); 115 | // on modifie l'img du noscript 116 | $alt_img->setAttribute('src', $orgin_src); 117 | $alt_img->setAttribute('alt', $orgin_alt); 118 | } 119 | 120 | // fix for Libxml < 2.7.8 121 | // found on http://stackoverflow.com/questions/29493678/loadhtml-libxml-html-noimplied-on-an-html-fragment-generates-incorrect-tags 122 | if (!$libxml_compat) { 123 | $container = $doc->getElementsByTagName('div')->item(0); 124 | $container = $container->parentNode->removeChild($container); 125 | while ($doc->firstChild) { 126 | $doc->removeChild($doc->firstChild); 127 | } 128 | while ($container->firstChild) { 129 | $doc->appendChild($container->firstChild); 130 | } 131 | } 132 | 133 | // save 134 | $art['bt_content'] = $doc->saveHTML(); 135 | } 136 | 137 | return $datas; 138 | } 139 | -------------------------------------------------------------------------------- /readmore/readmore.php: -------------------------------------------------------------------------------- 1 | 'readmore', 22 | 'name' => array( 23 | 'en' => 'Read more', 24 | 'fr' => 'Autres articles', 25 | ), 26 | 'desc' => array( 27 | 'en' => 'List 3 "read-also like" thumbnails below each post.', 28 | 'fr' => 'Afficher des image d\'autres articles.', 29 | ), 30 | 'version' => '1.0.0', 31 | 'compliancy' => '3.7', 32 | 'css' => 'style.css', 33 | 34 | 'settings' => array( 35 | 'nb_posts' => array( 36 | 'type' => 'int', 37 | 'label' => array( 38 | 'en' => 'Number of posts to list', 39 | 'fr' => 'Nombre d\'articles à lister' 40 | ), 41 | 'value' => 4, 42 | 'value_min' => 1, 43 | 'value_max' => 8, 44 | ), 45 | ), 46 | ); 47 | 48 | function a_readmore() 49 | { 50 | $nbPosts = addon_get_setting('readmore', 'nb_posts'); 51 | 52 | // Find all posts 53 | $sql = ' 54 | SELECT ID 55 | FROM articles 56 | WHERE bt_statut = 1 57 | AND bt_date <= '.date('YmdHis'); 58 | try { 59 | $result = $GLOBALS['db_handle']->query($sql)->fetchAll(PDO::FETCH_ASSOC); 60 | } catch (Exception $e) { 61 | return ((bool)DISPLAY_PHP_ERRORS) ? 'Error a_readmore(): '.$e->getMessage() : ''; 62 | } 63 | 64 | // Clean array 65 | foreach ($result as $i => $post) { 66 | $result[$i] = (int)$post['ID']; 67 | } 68 | 69 | // Select N entries 70 | shuffle($result); 71 | $posts = array_slice($result, 0, $nbPosts); 72 | 73 | // Get posts 74 | $sql = ' 75 | SELECT bt_title, bt_id, bt_content 76 | FROM articles 77 | WHERE ID IN ('.implode(',', $posts).')'; 78 | try { 79 | $posts = $GLOBALS['db_handle']->query($sql)->fetchAll(PDO::FETCH_ASSOC); 80 | } catch (Exception $e) { 81 | return ((bool)DISPLAY_PHP_ERRORS) ? 'Error fetch content a_readmore(): '.$e->getMessage() : ''; 82 | } 83 | 84 | // Generates the list 85 | $html = '
    '."\n"; 86 | foreach ($posts as $i => $post) { 87 | // Extract the image from $post['bt_content'] 88 | preg_match('', $post['bt_content'], $matches); 89 | $img = ''; 90 | if ($matches) { 91 | $img = $matches[2]; // chemin_thb_img_test($matches[2]) 92 | } 93 | // Generates the link 94 | $decId = decode_id($post['bt_id']); 95 | $link = URL_ROOT.'?d='.implode('/', $decId).'-'.titre_url($post['bt_title']); 96 | $html .= "\t".'
  • '.$post['bt_title'].'
  • '."\n"; 97 | } 98 | $html .= '
'."\n"; 99 | 100 | return $html; 101 | } 102 | -------------------------------------------------------------------------------- /readmore/style.css: -------------------------------------------------------------------------------- 1 | #readmore { 2 | padding: 0; 3 | list-style: none; 4 | display: flex; 5 | flex-wrap: wrap; 6 | } 7 | 8 | #readmore > li { 9 | width: 25%; 10 | height: 175px; 11 | box-sizing: border-box; 12 | display: flex; 13 | align-items: flex-end; 14 | text-align: center; 15 | background-size: cover; 16 | color: white; 17 | text-shadow: 1px 1px 5px black; 18 | font-size: 1.2em; 19 | overflow: hidden; 20 | background-color: rgba(0, 0, 0, .1); 21 | } 22 | 23 | #readmore li > a { 24 | background: rgba(0, 0, 0, .6); 25 | padding: 5px; 26 | text-overflow: ellipsis; 27 | min-height: 35%; 28 | width: 100%; 29 | } 30 | 31 | @media (max-width: 700px) { 32 | #readmore > li { 33 | width: 50%; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /relatedposts/relatedposts.php: -------------------------------------------------------------------------------- 1 | 7 | # *** LICENSE *** 8 | 9 | /** 10 | * Changelog 11 | * 1.0.1 2017-12-30 thuban 12 | * - fix #35 13 | * 14 | * 1.0.0 2017-01-24 RemRem 15 | * - upd version for BT 3.7 16 | * - upd addons declaration (config > settings) 17 | * 18 | * 0.1.0 19 | * 2016-11-28 RemRem, maybe need more work 20 | * - upd addon to be BT#160 compliant 21 | * - fix #12 22 | * - upd current version to 0.X (dev version) 23 | */ 24 | 25 | $declaration = array( 26 | 'tag' => 'relatedposts', 27 | 'version' => '1.0.0', 28 | 'compliancy' => '3.7', 29 | 'url' => 'http://www.tiger-222.fr/', 30 | 31 | 'name' => array( 32 | 'en' => 'Related posts', 33 | 'fr' => 'Articles en relation', 34 | ), 35 | 'desc' => array( 36 | 'en' => 'Show a list of posts in relation of the current displayed one.', 37 | 'fr' => 'Afficher une liste d\'articles en relation avec celui en cours de lecture.', 38 | ), 39 | 40 | 'settings' => array( 41 | 'nb_posts' => array( 42 | 'type' => 'int', 43 | 'label' => array( 44 | 'en' => 'Number of posts to list', 45 | 'fr' => 'Nombre d\'articles à lister' 46 | ), 47 | 'value' => 5, 48 | 'value_min' => 1, 49 | 'value_max' => 10, 50 | ), 51 | 'sentence' => array( 52 | 'type' => 'text', 53 | 'label' => array( 54 | 'en' => 'Sentence printed before the post list', 55 | 'fr' => 'Phrase d\'accroche affichée avant la liste des articles' 56 | ), 57 | 'value' => 'Découvrez d\'autres articles de la même trempe que cet article :', 58 | ), 59 | 60 | 'random' => array( 61 | 'type' => 'bool', 62 | 'label' => array( 63 | 'en' => 'Pick random article', 64 | 'fr' => 'Choisir des articles au hasard' 65 | ), 66 | 'desc' => array( 67 | 'en' => 'No relation with current article.', 68 | 'fr' => 'Aucun lien avec l\'article en train d\'être lu' 69 | ), 70 | 'value' => false, 71 | ), 72 | 73 | 'showimg' => array( 74 | 'type' => 'select', 75 | 'label' => array( 76 | 'en' => 'Show images or text lists', 77 | 'fr' => 'Afficher des images des articles ou leur titre.' 78 | ), 79 | 'desc' => array( 80 | 'en' => 'Select image to show a list of pictures inside suggested articles, or text to show only titles.', 81 | 'fr' => 'Choisissez entre afficher des images des articles suggérés ou seulement leur titre en texte.', 82 | ), 83 | 'options' => array( 84 | 'images' => array( 85 | 'en' => 'Show image in article', 86 | 'fr' => 'Afficher des images dans la liste d\'articles', 87 | ), 88 | 'text' => array( 89 | 'en' => 'Show article title only', 90 | 'fr' => 'Afficher seulement le titre de l\'article', 91 | ), 92 | ), 93 | 'value' => 'text' // default value 94 | ), 95 | 'defaultimg' => array( 96 | 'type' => 'text', 97 | 'label' => array( 98 | 'en' => 'Default image to show (URL)', 99 | 'fr' => 'Image par défaut si aucune n\'est trouvée (URL)' 100 | ), 101 | 'value' => $GLOBALS['racine'].'/favicon.ico', 102 | ), 103 | 104 | 'backgroundcss' => array( 105 | 'type' => 'text', 106 | 'label' => array( 107 | 'en' => 'Background color (css)', 108 | 'fr' => 'Couleur de fond (css)' 109 | ), 110 | 'value' => 'transparent;' 111 | ), 112 | 'linkbgcolor' => array( 113 | 'type' => 'text', 114 | 'label' => array( 115 | 'en' => 'Links Background color (css)', 116 | 'fr' => 'Couleur d\'arrière plan des liens (css)' 117 | ), 118 | 'value' => '#ddd', 119 | ), 120 | 'linkhoverbgcolor' => array( 121 | 'type' => 'text', 122 | 'label' => array( 123 | 'en' => 'Links Background color on hover (css)', 124 | 'fr' => 'Couleur d\'arrière plan des liens au survol (css)' 125 | ), 126 | 'value' => '#eee', 127 | ), 128 | 'linkcolor' => array( 129 | 'type' => 'text', 130 | 'label' => array( 131 | 'en' => 'Links color (css)', 132 | 'fr' => 'Couleur des liens (css)' 133 | ), 134 | 'value' => '#444', 135 | ), 136 | 'squares' => array( 137 | 'type' => 'text', 138 | 'label' => array( 139 | 'en' => 'Left squares color (css)', 140 | 'fr' => 'Couleur des carrés à gauche (css)', 141 | ), 142 | 'value' => '#fa8072', 143 | ), 144 | ), 145 | 'css' => 'style.css', 146 | ); 147 | 148 | // Include the posts list. 149 | // To use in theme/$theme/post.html. 150 | function a_relatedposts() 151 | { 152 | $nbPosts = addon_get_setting('relatedposts', 'nb_posts'); 153 | 154 | // 1. Get the post ID 155 | $postId = (string)filter_input(INPUT_GET, 'd'); 156 | if (preg_match('#^\d{4}(/\d{2}){5}#', $postId)) { 157 | $postId = (int)substr(str_replace('/', '', $postId), 0, 14); 158 | } elseif (preg_match('#^\d{14}#', $postId)) { 159 | $postId = (int)substr($postId, 0, 14); 160 | } 161 | 162 | $pick_random = addon_get_setting('relatedposts', 'random'); 163 | if ($pick_random) { 164 | // 2. Find all posts 165 | $sql = ' 166 | SELECT ID 167 | FROM articles 168 | WHERE bt_statut = 1 169 | AND bt_date <= '.date('YmdHis'); 170 | try { 171 | $result = $GLOBALS['db_handle']->query($sql)->fetchAll(PDO::FETCH_ASSOC); 172 | } catch (Exception $e) { 173 | return ((bool)DISPLAY_PHP_ERRORS) ? 'Error a_readmore(): '.$e->getMessage() : ''; 174 | } 175 | 176 | // Clean array 177 | foreach ($result as $i => $post) { 178 | $result[$i] = (int)$post['ID']; 179 | } 180 | 181 | // Select N entries 182 | shuffle($result); 183 | $posts = array_slice($result, 0, $nbPosts); 184 | 185 | // 3. Get posts 186 | $sql = ' 187 | SELECT bt_title, bt_id, bt_content 188 | FROM articles 189 | WHERE ID IN ('.implode(',', $posts).')'; 190 | try { 191 | $relatedPosts = $GLOBALS['db_handle']->query($sql)->fetchAll(PDO::FETCH_ASSOC); 192 | } catch (Exception $e) { 193 | return ((bool)DISPLAY_PHP_ERRORS) ? 'Error fetch content a_readmore(): '.$e->getMessage() : ''; 194 | } 195 | } else { 196 | // 2. Get post tags 197 | try { 198 | $sql = $GLOBALS['db_handle']->prepare( 199 | 'SELECT bt_tags 200 | FROM articles 201 | WHERE bt_statut = 1 202 | AND bt_id = :id' 203 | ); 204 | $sql->bindValue(':id', $postId, SQLITE3_INTEGER); 205 | $sql->execute(); 206 | $tags = $sql->fetchAll(PDO::FETCH_ASSOC); 207 | $tags = current($tags); 208 | } catch (Exception $e) { 209 | return ((bool)DISPLAY_PHP_ERRORS) ? 'Error step 2 addon_relatedposts() : '.$e->getMessage() : ''; 210 | } 211 | 212 | // 3. Find related posts based on a random tag from current article 213 | $tags = explode(', ', $tags['bt_tags']); 214 | shuffle($tags); 215 | $tag = current($tags); 216 | try { 217 | $sql = $GLOBALS['db_handle']->prepare( 218 | 'SELECT bt_id, bt_title, bt_content 219 | FROM articles 220 | WHERE bt_statut = 1 221 | AND bt_id != :id 222 | AND bt_tags LIKE :tag' 223 | ); 224 | $sql->bindValue(':id', $postId, SQLITE3_INTEGER); 225 | $sql->bindValue(':tag', '%'.$tag.'%'); 226 | $sql->execute(); 227 | $relatedPosts = $sql->fetchAll(PDO::FETCH_ASSOC); 228 | } catch (Exception $e) { 229 | return ((bool)DISPLAY_PHP_ERRORS) ? 'Error step 3 addon_relatedposts() : '.$e->getMessage() : ''; 230 | } 231 | shuffle($relatedPosts); 232 | $relatedPosts = array_slice($relatedPosts, 0, $nbPosts); 233 | } 234 | 235 | // 4. Generate the list 236 | $html = ''; 268 | } 269 | 270 | // 5. change css colors with js if not images 271 | if (! $showimg) { 272 | $html .= ''; 294 | } 295 | 296 | return $html; 297 | } 298 | -------------------------------------------------------------------------------- /relatedposts/style.css: -------------------------------------------------------------------------------- 1 | /* http://red-team-design.com/css3-ordered-list-styles/ */ 2 | .article .related-posts { 3 | background-color: transparent; 4 | border-top: 1px solid #ddd; 5 | padding: 1em; 6 | } 7 | 8 | .article .related-posts p { 9 | font-weight: 700; 10 | } 11 | 12 | .article .related-posts ul { 13 | counter-reset: li; 14 | list-style: none; 15 | } 16 | 17 | .article .related-posts a { 18 | position: relative; 19 | display: block; 20 | padding: .4em .4em .4em .8em; 21 | *padding: .4em; 22 | margin: .5em 0 .5em 2.5em; 23 | background: #ddd; 24 | color: #444; 25 | text-decoration: none; 26 | transition: all .3s ease-out; 27 | } 28 | 29 | .article .related-posts a:hover { 30 | background: #eee; 31 | } 32 | 33 | .article .related-posts a::before { 34 | content: counter(li); 35 | counter-increment: li; 36 | position: absolute; 37 | left: -2.5em; 38 | top: 50%; 39 | margin-top: -1em; 40 | background: #fa8072; 41 | height: 2em; 42 | width: 2em; 43 | line-height: 2em; 44 | text-align: center; 45 | font-weight: bold; 46 | } 47 | 48 | .article .related-posts a::after { 49 | position: absolute; 50 | content: ''; 51 | border: .5em solid transparent; 52 | left: -1em; 53 | top: 50%; 54 | margin-top: -.5em; 55 | transition: all .3s ease-out; 56 | } 57 | 58 | .article .related-posts a:hover::after { 59 | left: -.5em; 60 | border-left-color: #fa8072; 61 | } 62 | 63 | #readmore { 64 | padding: 0; 65 | list-style: none; 66 | display: flex; 67 | flex-wrap: wrap; 68 | } 69 | 70 | #readmore > li { 71 | width: 25%; 72 | height: 175px; 73 | box-sizing: border-box; 74 | display: flex; 75 | align-items: flex-end; 76 | text-align: center; 77 | background-size: cover; 78 | color: white; 79 | text-shadow: 1px 1px 5px black; 80 | font-size: 1.2em; 81 | overflow: hidden; 82 | background-color: rgba(0, 0, 0, .1); 83 | } 84 | 85 | #readmore li > a { 86 | transition: all .5s ease-out; 87 | background: rgba(0, 0, 0, .6); 88 | padding: 5px; 89 | text-overflow: ellipsis; 90 | min-height: 35%; 91 | width: 100%; 92 | } 93 | #readmore li > a:hover { 94 | transition: all .5s ease-out; 95 | transform:translateY(-5px); 96 | transform:scale(1.1,1.1); 97 | } 98 | 99 | @media (max-width: 700px) { 100 | #readmore > li { 101 | width: 50%; 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /showrss/getrss.php: -------------------------------------------------------------------------------- 1 | load($xml); 7 | 8 | //get elements from "" 9 | $channel=$xmlDoc->getElementsByTagName('channel')->item(0); 10 | $channel_title = $channel->getElementsByTagName('title') 11 | ->item(0)->childNodes->item(0)->nodeValue; 12 | $channel_link = $channel->getElementsByTagName('link') 13 | ->item(0)->childNodes->item(0)->nodeValue; 14 | $channel_desc = $channel->getElementsByTagName('description') 15 | ->item(0)->childNodes->item(0)->nodeValue; 16 | 17 | //output elements from "" 18 | echo("

" . $channel_title . ""); 20 | echo("
"); 21 | echo($channel_desc . "

"); 22 | 23 | //get and output "" elements 24 | $x=$xmlDoc->getElementsByTagName('item'); 25 | for ($i=0; $i<=2; $i++) { 26 | $item_title=$x->item($i)->getElementsByTagName('title') 27 | ->item(0)->childNodes->item(0)->nodeValue; 28 | $item_link=$x->item($i)->getElementsByTagName('link') 29 | ->item(0)->childNodes->item(0)->nodeValue; 30 | $item_desc=$x->item($i)->getElementsByTagName('description') 31 | ->item(0)->childNodes->item(0)->nodeValue; 32 | echo ("

" . $item_title . ""); 34 | echo ("
"); 35 | echo ($item_desc . "

"); 36 | } 37 | -------------------------------------------------------------------------------- /showrss/phpcs.phar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlogoText/blogotext-addons/f4d662b8f0b4a2889bd87f2406573211b543b8b9/showrss/phpcs.phar -------------------------------------------------------------------------------- /showrss/showrss.php: -------------------------------------------------------------------------------- 1 | 'showrss', 12 | 13 | // the name, showed in admin/addon (required) 14 | 'name' => array( 15 | 'en' => 'Show RSS ', 16 | 'fr' => 'Montre un flux rss', 17 | ), 18 | 19 | // the desc, showed in admin/addon (required) 20 | 'desc' => array( 21 | 'en' => 'Show last items of a RSS feed.', 22 | 'fr' => 'Affiche les derniers éléments d\'un flux RSS.', 23 | ), 24 | 'settings' => array( 25 | 'feedurl' => array( 26 | 'type' => 'text', 27 | 'label' => array( 28 | 'en' => 'URL', 29 | 'fr' => 'URL' 30 | ), 31 | 'desc' => array( 32 | 'en' => 'Feed URL', 33 | 'fr' => 'Feed URL', 34 | ), 35 | 'value' => 'https://blogotext.org/blog/rss.php', 36 | ), 37 | ), 38 | 39 | 40 | // the version, showed in admin/addon (required) 41 | 'version' => '1.1.0', 42 | 'compliancy' => '3.7', 43 | 'url' => 'https://yeuxdelibad.net/Blog/', 44 | ); 45 | 46 | function a_showrss() 47 | { 48 | $feedurl = addon_get_setting('showrss', 'feedurl'); 49 | $getrss = $GLOBALS['racine'].'/addons/showrss/getrss.php?q='; 50 | $html = ' 51 | 72 | '; 73 | 74 | $html .= '
'; 75 | return $html; 76 | } 77 | -------------------------------------------------------------------------------- /sidelinks/sidelinks.php: -------------------------------------------------------------------------------- 1 | 'sidelinks', 12 | 13 | // the name, showed in admin/addon (required) 14 | 'name' => array( 15 | 'en' => 'Side links editor', 16 | 'fr' => 'Éditeur de liens de la barre latérale', 17 | ), 18 | 19 | // the desc, showed in admin/addon (required) 20 | 'desc' => array( 21 | 'en' => 'Edit links in sidebar', 22 | 'fr' => 'Éditeur des liens présents dans la barre latérale', 23 | ), 24 | 'settings' => array( 25 | 'links' => array( 26 | 'type' => 'text', 27 | 'label' => array( 28 | 'en' => 'Links', 29 | 'fr' => 'Liens' 30 | ), 31 | 'desc' => array( 32 | 'en' => 'List of links, using BBcode. Ex : [Blogotext|https://blogotext.org] [Yeuxdelibad|https://yeuxdelibad.net]', 33 | 'fr' => 'Liste des liens, écrits en BBcode. Ex : [Blogotext|https://blogotext.org] [Yeuxdelibad|https://yeuxdelibad.net]', 34 | ), 35 | 'value' => '[Tous les articles|?liste] [Article au hasard|?random] [Liens|?mode=links] [Blogotext|https://blogotext.org]', 36 | ), 37 | ), 38 | 39 | 40 | // the version, showed in admin/addon (required) 41 | 'version' => '1.0.0', 42 | 'compliancy' => '3.7', 43 | 'url' => 'https://blogotext.org', 44 | ); 45 | 46 | function a_sidelinks() 47 | { 48 | // regex stolen from inc/conv.php 49 | // Maybe we courl use markup() directly, but it add

tags... 50 | $tofind = array( 51 | /* regex URL */ '#([^"\[\]|])((http|ftp)s?://([^"\'\[\]<>\s\)\(]+))#i', 52 | /* a href */ '#\[([^[]+)\|([^[]+)\]#', 53 | ); 54 | $toreplace = array( 55 | /* regex URL */ '$1$2', 56 | /* a href */ '$1', 57 | ); 58 | 59 | 60 | $html = '
    '; 61 | $links = trim(addon_get_setting('sidelinks', 'links')); 62 | $links = explode(']', $links); 63 | for ($i = 0; $i < sizeof($links) -1; $i++) { // don't care of last ']' 64 | $l = $links[$i] . ']'; 65 | $link = preg_replace($tofind, $toreplace, $l); 66 | $html .= "
  • ".$link."
  • \n"; 67 | } 68 | $html .= '
'; 69 | return $html; 70 | } 71 | -------------------------------------------------------------------------------- /smileys/smileys.js: -------------------------------------------------------------------------------- 1 | // replace smileys string in to emojis in blogotext 2 | // 2016, thuban, 3 | // Licence MIT 4 | 5 | // Edit this array with regex you like 6 | var strtostr= [ 7 | [/(\s| |^)(:\)|:‑\))/g,' 😊'], 8 | [/(\s| |^):\(/g,' 😞'], 9 | [/(\s| |^)(:D|:‑D)/g,' 😃'], 10 | [/(\s| |^)(X|x)D/g,' 😆'], 11 | [/(\s| |^):(S|s)/g,' 😖'], 12 | [/(\s| |^):(P|p)/g,' 😋'], 13 | [/(\s| |^):(:\'‑\)|:\'\))/g,' 😂'], 14 | [/(\s| |^)(;\)|;‑\))/g,' 😉'], 15 | [/(\s| |^);(P|p)/g,' 😜'], 16 | [/(\s| |^):\//g,' 😕'], 17 | [/(\s| |^):\|/g,'😒'], 18 | [/(\s| |^):\'\(/g,' 😢'], 19 | [/(\s| |^)(oO|:O|:-O)/g,' 😲'], 20 | [/(\s| |^)(:\*|:-\*)/g,' 😗'], 21 | [/(\s| |^)x\.x/g,' 😵'], 22 | [/(\s| |^)O:\)/g,' 😇'], 23 | [/(\s| |^)\^\^/g,' 😁'], 24 | [/(\s| |^)=\^-\^=/g,' 🐱'], 25 | [/(\s| |^)(<|<)3/g,' ♥'] 26 | ]; 27 | 28 | // class div where regexp will be applied 29 | var classes_to_replace = ["com-content", "art-content", "post-content"]; 30 | 31 | // regexp to find tags (no replacement in
 and )
32 | var htmlTagRegex =/(<[^>]*>)/g
33 | 
34 | function convert_smileys()
35 | {
36 |     "use strict";
37 | 
38 |     // loop in classes
39 |     classes_to_replace.forEach(function (class_) {
40 |         var tochange = document.getElementsByClassName(class_);
41 |         var codecnt = 0;
42 | 
43 |         var classcnt = 0;
44 |         var div = "";
45 |         for (classcnt = 0; classcnt < tochange.length; classcnt++) {
46 |             div = tochange[classcnt]
47 | 
48 |             // check if in  or 
49 |             var tagArray = div.innerHTML.split(htmlTagRegex);
50 |             var divtxt = "";
51 |             var tagcnt = 0;
52 |             var t = "";
53 |             for (tagcnt = 0; tagcnt < tagArray.length; tagcnt++) {
54 |                 t = tagArray[tagcnt];
55 |                 if (t.toLowerCase() == "
" || t == "") {
56 |                     codecnt++;
57 |                 } else if (t.toLowerCase() == "
" || t == "") { 58 | codecnt--; 59 | } 60 | 61 | if (codecnt == 0) { 62 | var i; 63 | var newtxt = ""; 64 | for (i = 0; i < strtostr.length; i++) { 65 | t = t.replace(strtostr[i][0],strtostr[i][1]); 66 | } 67 | } 68 | divtxt += t; 69 | } 70 | div.innerHTML = divtxt; 71 | } 72 | }); 73 | } 74 | 75 | window.addEventListener('load', convert_smileys, false); 76 | -------------------------------------------------------------------------------- /smileys/smileys.php: -------------------------------------------------------------------------------- 1 | 'smileys', 22 | 'name' => array( 23 | 'en' => 'Smileys', 24 | 'fr' => 'Émoticônes', 25 | ), 26 | 'desc' => array( 27 | 'en' => 'Convert smileys strings into emoticons. i.e. : ";)" -> "😉".', 28 | 'fr' => 'Convertit des smileys en émojis. ex : ";)" -> "😉".', 29 | ), 30 | 'url' => 'http://yeuxdelibad.net', 31 | 'version' => '1.0.0', 32 | 'compliancy' => '3.7', 33 | 'js' => 'smileys.js', 34 | ); 35 | -------------------------------------------------------------------------------- /use_firefox/use_firefox.css: -------------------------------------------------------------------------------- 1 | /* The Modal (background) */ 2 | /* https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_modal_bottom */ 3 | .use_ffx_modal { 4 | display: none; /* Hidden by default */ 5 | position: fixed; /* Stay in place */ 6 | z-index: 1; /* Sit on top */ 7 | left: 0; 8 | top: 0; 9 | width: 100%; /* Full width */ 10 | height: 100%; /* Full height */ 11 | overflow: auto; /* Enable scroll if needed */ 12 | -webkit-animation-name: fadeIn; /* Fade in the background */ 13 | -webkit-animation-duration: 0.4s; 14 | animation-name: fadeIn; 15 | animation-duration: 0.4s 16 | } 17 | 18 | /* Modal Content */ 19 | .use_ffx_modal-content { 20 | position: fixed; 21 | bottom: 0; 22 | background-color: #fefefe; 23 | width: 100%; 24 | -webkit-animation-name: slideIn; 25 | -webkit-animation-duration: 0.4s; 26 | animation-name: slideIn; 27 | animation-duration: 0.4s 28 | } 29 | 30 | /* The Close Button */ 31 | .use_ffx_close { 32 | color: white; 33 | float: right; 34 | font-size: 28px; 35 | font-weight: bold; 36 | } 37 | 38 | .use_ffx_close:hover, 39 | .use_ffx_close:focus { 40 | color: #000; 41 | text-decoration: none; 42 | cursor: pointer; 43 | } 44 | 45 | .use_ffx_modal-header { 46 | padding: 2px 16px; 47 | background-color: orange; 48 | color: white; 49 | } 50 | 51 | .use_ffx_modal-body {padding: 2px 12px;} 52 | .use_ffx_modal-header h2 {font-size:18px;} 53 | .use_ffx_modal-body {color:darkblue;} 54 | 55 | /* Add Animation */ 56 | @-webkit-keyframes slideIn { 57 | from {bottom: -300px; opacity: 0} 58 | to {bottom: 0; opacity: 1} 59 | } 60 | 61 | @keyframes slideIn { 62 | from {bottom: -300px; opacity: 0} 63 | to {bottom: 0; opacity: 1} 64 | } 65 | 66 | @-webkit-keyframes fadeIn { 67 | from {opacity: 0} 68 | to {opacity: 1} 69 | } 70 | 71 | @keyframes fadeIn { 72 | from {opacity: 0} 73 | to {opacity: 1} 74 | } 75 | -------------------------------------------------------------------------------- /use_firefox/use_firefox.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | var modal = document.getElementById('use_ffx_modal'); 4 | 5 | // Get the element that closes the modal 6 | var span = document.getElementById("use_ffx_close"); 7 | 8 | // When the user clicks on (x), close the modal 9 | span.onclick = function () { 10 | modal.style.display = "none"; 11 | } 12 | 13 | // When the user clicks anywhere outside of the modal, close it 14 | window.onclick = function (event) { 15 | if (event.target == modal) { 16 | modal.style.display = "none"; 17 | } 18 | } 19 | 20 | if ((navigator.userAgent.toLowerCase().indexOf('chrome') > -1) || 21 | (navigator.userAgent.toLowerCase().indexOf('opera') > -1) || 22 | (navigator.userAgent.toLowerCase().indexOf('vivaldi') > -1) || 23 | (navigator.userAgent.toLowerCase().indexOf('safari') > -1) || 24 | (navigator.userAgent.toLowerCase().indexOf('msie') > -1) || 25 | (navigator.userAgent.toLowerCase().indexOf('samsung') > -1) || 26 | (navigator.userAgent.toLowerCase().indexOf('nokia') > -1) || 27 | (navigator.userAgent.toLowerCase().indexOf('chromium') > -1)) { 28 | modal.style.display = "block"; 29 | } 30 | -------------------------------------------------------------------------------- /use_firefox/use_firefox.min.css: -------------------------------------------------------------------------------- 1 | .use_ffx_modal{display:none;position:fixed;z-index:1;left:0;top:0;width:100%;height:100%;overflow:auto;-webkit-animation-name:fadeIn;-webkit-animation-duration:.4s;animation-name:fadeIn;animation-duration:.4s}.use_ffx_modal-content{position:fixed;bottom:0;background-color:#fefefe;width:100%;-webkit-animation-name:slideIn;-webkit-animation-duration:.4s;animation-name:slideIn;animation-duration:.4s}.use_ffx_close{color:white;float:right;font-size:28px;font-weight:bold}.use_ffx_close:hover,.use_ffx_close:focus{color:#000;text-decoration:none;cursor:pointer}.use_ffx_modal-header{padding:2px 16px;background-color:orange;color:white}.use_ffx_modal-body{padding:2px 12px}.use_ffx_modal-header h2{font-size:18px}.use_ffx_modal-body{color:darkblue}@-webkit-keyframes slideIn{from{bottom:-300px;opacity:0}to{bottom:0;opacity:1}}@keyframes slideIn{from{bottom:-300px;opacity:0}to{bottom:0;opacity:1}}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}} 2 | -------------------------------------------------------------------------------- /use_firefox/use_firefox.min.js: -------------------------------------------------------------------------------- 1 | "use strict";var modal=document.getElementById("use_ffx_modal"),span=document.getElementById("use_ffx_close");span.onclick=function(){modal.style.display="none"},window.onclick=function(e){e.target==modal&&(modal.style.display="none")},(navigator.userAgent.toLowerCase().indexOf("chrome")>-1||navigator.userAgent.toLowerCase().indexOf("opera")>-1||navigator.userAgent.toLowerCase().indexOf("vivaldi")>-1||navigator.userAgent.toLowerCase().indexOf("safari")>-1||navigator.userAgent.toLowerCase().indexOf("msie")>-1||navigator.userAgent.toLowerCase().indexOf("samsung")>-1||navigator.userAgent.toLowerCase().indexOf("nokia")>-1||navigator.userAgent.toLowerCase().indexOf("chromium")>-1)&&(modal.style.display="block"); 2 | -------------------------------------------------------------------------------- /use_firefox/use_firefox.php: -------------------------------------------------------------------------------- 1 | 'use_firefox', 15 | 'name' => array( 16 | 'en' => 'Use Firefox', 17 | 'fr' => 'Utilisez Firefox', 18 | ), 19 | 'desc' => array( 20 | 'en' => 'Display an modal if firefox is not used.', 21 | 'fr' => 'Affiche un avertissement si Firefox n\'est pas utilisé.', 22 | ), 23 | 'settings' => array( 24 | 'message' => array( 25 | 'type' => 'text', 26 | 'label' => array( 27 | 'en' => 'Message', 28 | 'fr' => 'Message' 29 | ), 30 | 'desc' => array( 31 | 'en' => 'Message to display', 32 | 'fr' => 'Message à afficher', 33 | ), 34 | 'value' => '⚠ Your browser doesn\'t respect your privacy, you might want to try Firefox.', 35 | ), 36 | 'dlmessage' => array( 37 | 'type' => 'text', 38 | 'label' => array( 39 | 'en' => 'Download message', 40 | 'fr' => 'Message téléchargement' 41 | ), 42 | 'desc' => array( 43 | 'en' => 'Message to display for download link', 44 | 'fr' => 'Message à afficher pour le lien de téléchargement', 45 | ), 46 | 'value' => '⬇️ Click to download Firefox now and thank me later 😉', 47 | ), 48 | 49 | ), 50 | 51 | 52 | 'version' => '1.0.0', 53 | 'compliancy' => '3.7', 54 | 'css' => 'use_firefox.min.css', 55 | 'js' => 'use_firefox.min.js', 56 | ); 57 | 58 | function a_use_firefox() 59 | { 60 | $msg = addon_get_setting('use_firefox', 'message'); 61 | $dlmsg = addon_get_setting('use_firefox', 'dlmessage'); 62 | $html = 'lala'; 63 | 64 | $html = '
65 |
66 |
67 | × 68 |

'.$msg.'

69 |
70 |
71 |

'.$dlmsg.'

72 |
73 |
74 |
'; 75 | return $html; 76 | } 77 | --------------------------------------------------------------------------------