├── .gitattributes ├── .gitignore ├── .htaccess ├── README.md ├── admin ├── admin.css ├── auth.php ├── check.php ├── config.php ├── delete.css ├── delete.php ├── edit.php ├── include.php ├── index.php ├── login.css ├── login.php ├── logout.php ├── ping.php ├── settings.php ├── themes │ ├── default │ │ ├── sitemap.css │ │ └── stylesheet.css │ ├── hm │ │ ├── sitemap.css │ │ └── stylesheet.css │ └── lessy │ │ ├── sitemap.css │ │ └── stylesheet.css ├── tinymce │ ├── langs │ │ └── readme.md │ ├── license.txt │ ├── plugins │ │ ├── advlist │ │ │ └── plugin.min.js │ │ ├── anchor │ │ │ └── plugin.min.js │ │ ├── autolink │ │ │ └── plugin.min.js │ │ ├── autoresize │ │ │ └── plugin.min.js │ │ ├── autosave │ │ │ └── plugin.min.js │ │ ├── bbcode │ │ │ └── plugin.min.js │ │ ├── charmap │ │ │ └── plugin.min.js │ │ ├── code │ │ │ └── plugin.min.js │ │ ├── colorpicker │ │ │ └── plugin.min.js │ │ ├── contextmenu │ │ │ └── plugin.min.js │ │ ├── directionality │ │ │ └── plugin.min.js │ │ ├── emoticons │ │ │ ├── img │ │ │ │ ├── smiley-cool.gif │ │ │ │ ├── smiley-cry.gif │ │ │ │ ├── smiley-embarassed.gif │ │ │ │ ├── smiley-foot-in-mouth.gif │ │ │ │ ├── smiley-frown.gif │ │ │ │ ├── smiley-innocent.gif │ │ │ │ ├── smiley-kiss.gif │ │ │ │ ├── smiley-laughing.gif │ │ │ │ ├── smiley-money-mouth.gif │ │ │ │ ├── smiley-sealed.gif │ │ │ │ ├── smiley-smile.gif │ │ │ │ ├── smiley-surprised.gif │ │ │ │ ├── smiley-tongue-out.gif │ │ │ │ ├── smiley-undecided.gif │ │ │ │ ├── smiley-wink.gif │ │ │ │ └── smiley-yell.gif │ │ │ └── plugin.min.js │ │ ├── example │ │ │ ├── dialog.html │ │ │ └── plugin.min.js │ │ ├── example_dependency │ │ │ └── plugin.min.js │ │ ├── fullpage │ │ │ └── plugin.min.js │ │ ├── fullscreen │ │ │ └── plugin.min.js │ │ ├── hr │ │ │ └── plugin.min.js │ │ ├── image │ │ │ └── plugin.min.js │ │ ├── imagetools │ │ │ └── plugin.min.js │ │ ├── importcss │ │ │ └── plugin.min.js │ │ ├── insertdatetime │ │ │ └── plugin.min.js │ │ ├── layer │ │ │ └── plugin.min.js │ │ ├── legacyoutput │ │ │ └── plugin.min.js │ │ ├── link │ │ │ └── plugin.min.js │ │ ├── lists │ │ │ └── plugin.min.js │ │ ├── media │ │ │ ├── moxieplayer.swf │ │ │ └── plugin.min.js │ │ ├── nonbreaking │ │ │ └── plugin.min.js │ │ ├── noneditable │ │ │ └── plugin.min.js │ │ ├── pagebreak │ │ │ └── plugin.min.js │ │ ├── paste │ │ │ └── plugin.min.js │ │ ├── preview │ │ │ └── plugin.min.js │ │ ├── print │ │ │ └── plugin.min.js │ │ ├── save │ │ │ └── plugin.min.js │ │ ├── searchreplace │ │ │ └── plugin.min.js │ │ ├── spellchecker │ │ │ └── plugin.min.js │ │ ├── tabfocus │ │ │ └── plugin.min.js │ │ ├── table │ │ │ └── plugin.min.js │ │ ├── template │ │ │ └── plugin.min.js │ │ ├── textcolor │ │ │ └── plugin.min.js │ │ ├── textpattern │ │ │ └── plugin.min.js │ │ ├── visualblocks │ │ │ ├── css │ │ │ │ └── visualblocks.css │ │ │ └── plugin.min.js │ │ ├── visualchars │ │ │ └── plugin.min.js │ │ └── wordcount │ │ │ └── plugin.min.js │ ├── skins │ │ └── lightgray │ │ │ ├── content.inline.min.css │ │ │ ├── content.min.css │ │ │ ├── fonts │ │ │ ├── tinymce-small.eot │ │ │ ├── tinymce-small.svg │ │ │ ├── tinymce-small.ttf │ │ │ ├── tinymce-small.woff │ │ │ ├── tinymce.eot │ │ │ ├── tinymce.svg │ │ │ ├── tinymce.ttf │ │ │ └── tinymce.woff │ │ │ ├── img │ │ │ ├── anchor.gif │ │ │ ├── loader.gif │ │ │ ├── object.gif │ │ │ └── trans.gif │ │ │ ├── skin.ie7.min.css │ │ │ └── skin.min.css │ ├── themes │ │ └── modern │ │ │ └── theme.min.js │ └── tinymce.min.js └── upload.php └── articles ├── 404 └── index.html ├── .htaccess ├── favicon.ico ├── index.html ├── license └── index.html ├── sitemap.css └── stylesheet.css /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | admin/password.php 45 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | 2 | RewriteEngine On 3 | 4 | # Let Admin and Let's Encrypt go through 5 | RewriteRule ^admin/ - [L] 6 | RewriteRule ^\.well-known/ - [L] 7 | 8 | # If a request tries to access /articles/ directly, redirect it to its canonical version 9 | RewriteCond %{THE_REQUEST} articles/ 10 | RewriteRule ^articles/(.*) /$1 [R=301,L] 11 | 12 | # Map everything else to /articles 13 | RewriteCond %{REQUEST_URI} !articles/ 14 | RewriteRule ^(.*)$ /articles/$1 [L] 15 | 16 | 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Blogless 2 | The [Blogless publishing system](http://blogless.datenbrei.de/) is for web writers. Just publish, share your texts with friends and don't think about the rest. 3 | 4 | >A website with the main purpose of having people read content would best serve its readers with almost nothing else but what’s needed for the reading experience — Leo Babauta 5 | 6 | Blogless is some kind of anti-blog. No subscribers, no community stress, no excuses for not having written the follow-up article in your vacation time, just articles. You even can switch off the RSS feed, the sitemap or the pingback functionality, if you like. Blogless sets the focus back from the needs and mechanisms of a blog to the pure content of your articles. 7 | 8 | Blogless generates static HTML pages and lets you manage them from a simple to handle online interface. New articles can be written and later changed again. All the pretty SEO stuff, like descriptions, the now useless keywords, author name and profile, open graph meta infos and all that is included without beeing in the way — automagically. 9 | 10 | ## Installation 11 | Just put it in the root of you webserver and call it. More installation instructions are on the [Blogless website](http://blogless.datenbrei.de/installation/) and in articles/index.html. 12 | 13 | ## Status 14 | Actually Blogless is in beta stage. It runs pretty well, but a bit of functionality is still missing. 15 | 16 | ## Prerequisites 17 | Blogless needs at least PHP version 5.5, released at 20th of June 2013 and it is tested with PHP 8. Also session handling needs to be set up in php.ini, but normally this should be ok. When starting, Blogless will do the needed checks automatically and tell you, if your setup is sufficient. 18 | -------------------------------------------------------------------------------- /admin/admin.css: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Lato:400,700); 2 | 3 | /* css reset for used elements*/ 4 | html, body, main, header, nav, section, address, footer, div, span, h1, h2, p, blockquote, pre, img, a, form, time, textarea, input, b, u, i, center, dl, dt, dd, ol, ul, li { 5 | margin:0; 6 | padding:0; 7 | border:0; 8 | font-size:medium; 9 | font:inherit; 10 | vertical-align:baseline; 11 | box-sizing: border-box; 12 | } 13 | 14 | html { 15 | background-color:#FAFAFA; 16 | font-family:'Lato',sans-serif; 17 | height:100%; 18 | } 19 | 20 | body { 21 | max-width:200mm; 22 | margin:0px auto; 23 | background-color:#FFF; 24 | min-height:100%; 25 | padding-bottom:2em; 26 | } 27 | 28 | main { 29 | display:block; 30 | padding:30px 10px; 31 | } 32 | 33 | nav { 34 | background:linear-gradient(to left,#EEE 0%,#999 100%); 35 | padding:3px 3px; 36 | overflow: auto; 37 | width:100%; 38 | margin:0 auto; 39 | position:fixed; 40 | bottom:0; 41 | border-top:1px solid #F80; 42 | } 43 | 44 | article { 45 | background-color:#FFF; 46 | line-height:140%; 47 | } 48 | 49 | aside { 50 | background-color:#FFF; 51 | padding:30px 10px; 52 | line-height:140%; 53 | } 54 | 55 | header { 56 | display:block; 57 | margin-bottom:1em; 58 | } 59 | 60 | footer { 61 | text-align:center; 62 | color:#BBB; 63 | font-size:small; 64 | font-weight:bold; 65 | } 66 | 67 | h1 { 68 | color:#F80; 69 | font-size:xx-large; 70 | font-weight:bold; 71 | line-height:120%; 72 | } 73 | 74 | .meta { 75 | display:block; 76 | color:#BBB; 77 | font-size:small; 78 | font-weight:bold; 79 | } 80 | 81 | time { 82 | display:inline; 83 | } 84 | 85 | h2 { 86 | color:#F80; 87 | font-size:medium; 88 | font-weight:bold; 89 | margin-top:1.5em; 90 | margin-bottom:0.5em; 91 | } 92 | 93 | hr { 94 | color:#F80; 95 | background-color:#F80; 96 | border:#F80; 97 | height:1px; 98 | } 99 | 100 | p { 101 | margin-bottom:0.5em; 102 | } 103 | 104 | details { 105 | display:block; 106 | margin:1.5em auto; 107 | } 108 | 109 | .link, .hashtag, .page, .mail { 110 | color:#F80; 111 | text-decoration:none; 112 | } 113 | 114 | b { 115 | font-weight:bold; 116 | } 117 | 118 | i { 119 | font-style:italic; 120 | } 121 | 122 | form { 123 | } 124 | 125 | label { 126 | display:block; 127 | width:9em; 128 | float:left; 129 | vertical-align:top; 130 | } 131 | 132 | input { 133 | display:block; 134 | width:calc(100% - 9em); 135 | border-radius:5px; 136 | border:1px solid #bbb; 137 | background-color:#FAFAFA; 138 | } 139 | 140 | #save { 141 | color:#FFF; 142 | background:#999; 143 | border-radius:5px; 144 | border:1px solid #bbb; 145 | text-decoration:none; 146 | font-weight:bold; 147 | padding:2px 4px; 148 | width:60%; 149 | margin:0px auto; 150 | } 151 | 152 | textarea { 153 | display:block; 154 | width:100%; 155 | border-radius:5px; 156 | border:1px solid #bbb; 157 | margin: -1px; 158 | background-color:#FAFAFA; 159 | resize:vertical; 160 | } 161 | 162 | ul { 163 | list-style:none; 164 | } 165 | 166 | img { 167 | width:100%; 168 | margin:5px 0; 169 | border-radius: 5px; 170 | } 171 | 172 | .menu { 173 | color:#FFF; 174 | background:transparent; 175 | text-decoration:none; 176 | font-weight:bold; 177 | padding:2px 5px; 178 | } 179 | 180 | .menu:hover { 181 | color: #F80; 182 | } 183 | 184 | .menu { 185 | float: left; 186 | } 187 | 188 | @media only screen and (min-width: 200mm) { 189 | nav { max-width: 200mm } 190 | } 191 | -------------------------------------------------------------------------------- /admin/auth.php: -------------------------------------------------------------------------------- 1 | 5 | Project: http://blogless.datenbrei.de 6 | License: http://blogless.datenbrei.de/license/ 7 | */ 8 | 9 | // Check Login 10 | session_start(); 11 | if (is_readable('password.php')) 12 | @include 'password.php'; 13 | else 14 | $password = false; 15 | 16 | if (empty($_SESSION['login']) or $_SESSION['login'] != $password) { 17 | header('Location: login.php'); 18 | die("Access denied"); 19 | } 20 | ?> 21 | -------------------------------------------------------------------------------- /admin/check.php: -------------------------------------------------------------------------------- 1 | 5 | Project: http://blogless.datenbrei.de 6 | License: http://blogless.datenbrei.de/license/ 7 | */ 8 | 9 | $ok = true; 10 | 11 | function check_version() { 12 | $version = current(explode("-", PHP_VERSION)); 13 | if (version_compare($version, '5.5.0') >= 0) { 14 | $html = '

☑ — Your PHP version ' . $version . ' is ok!

' . "\n"; 15 | $ok = false; 16 | } 17 | else { 18 | $html = '

☒ — You have PHP version ' . $version . ', which is not sufficient. You need at least version 5.5 because of support for "password_verify"!

' . "\n"; 19 | } 20 | 21 | return $html; 22 | } 23 | 24 | function check_file($filename) { 25 | global $ok; 26 | if (file_exists($filename)) { 27 | if (is_writable($filename)) { 28 | $html = '

☑ — "' . $filename . '" exists and is writable.

' . "\n"; 29 | } 30 | else { 31 | $html = '

☒ — "' . $filename . '" with permissions ' . decoct(fileperms($filename) & 0777) . ' exists, but is not writable by webserver user "' . get_current_user(). '"!

' . "\n"; 32 | $ok = false; 33 | } 34 | } 35 | else { 36 | if (touch($filename)) 37 | $html = '

☑ — "' . $filename . '" does not exist, but could be created by Blogless later...

' . "\n"; 38 | else { 39 | $html = '

☒ — "' . $filename . '" does not exist, and can not be created by webserver user "' . get_current_user(). '" because of wrong directory permissions!

' . "\n"; 40 | $ok = false; 41 | } 42 | unlink($filename); 43 | } 44 | 45 | return $html; 46 | } 47 | 48 | function check_dir($usage, $filename) { 49 | global $ok; 50 | if (is_dir($filename)) { 51 | if (is_writable($filename)) { 52 | $html = '

☑ — The ' . $usage . ' Directory "' . realpath($filename) . '" exists and is writable.

' . "\n"; 53 | } 54 | else { 55 | $html = '

☒ — The ' . $usage . ' Directory "' . realpath($filename) . '" with permissions ' . decoct(fileperms($filename) & 0777) . ' exists, but is not writable by webserver user "' . get_current_user(). '"!

' . "\n"; 56 | $ok = false; 57 | } 58 | } 59 | else { 60 | $ok = false; 61 | if (mkdir($filename)) 62 | $html = '

☒ — The ' . $usage . ' Directory "' . realpath($filename) . '" does not exist, but could be created by Blogless later...

' . "\n"; 63 | else 64 | $html = '

☒ — The ' . $usage . ' Directory "' . realpath($filename) . '" does not exist, and can not be created by webserver user "' . get_current_user(). '" because of wrong directory permissions!

' . "\n"; 65 | unlink($filename); 66 | } 67 | 68 | return $html; 69 | } 70 | 71 | function check_sessions() { 72 | global $ok; 73 | $html = ''; 74 | 75 | if (session_status() == PHP_SESSION_NONE) { 76 | if (session_start()) { 77 | $html = '

☑ — The PHP session handler is correctly configured and operational for Blogless

' . "\n"; 78 | } 79 | else { 80 | $ok = false; 81 | $html = '

☒ — The PHP session handler is not configured correctly! No session can be initiated! Blogless will not work!

' . "\n"; 82 | if (ini_get('session.save_handler') != '') { 83 | $html .= '

☝ — The "session.save_handler" in your php.ini is set to "' . ini_get('session.save_handler') . '".

' . "\n"; 84 | if (ini_get('session.save_path') != '') 85 | $html .= '

☝ — The "session.save_path" in your php.ini is set to "' . ini_get('session.save_path') . '".

' . "\n"; 86 | else 87 | $html .= '

☝ — The "session.save_path" in your php.ini is not set at all - but should be set!

' . "\n"; 88 | } 89 | else { 90 | $html .= '

☝ — The "session.save_handler" in your php.ini is not set at all - but should be set!

' . "\n"; 91 | } 92 | } 93 | } 94 | else { 95 | $html = '

☑ — The PHP session handler is correctly configured and operational for Blogless

' . "\n"; 96 | } 97 | return $html; 98 | } 99 | 100 | if ($_SERVER["REQUEST_METHOD"] == "GET") { 101 | 102 | $html = " \n"; 103 | $html .= " \n"; 104 | $html .= "Check Installation \n"; 105 | $html .= " \n"; 106 | $html .= '' . "\n"; 107 | $html .= '' . "\n"; 108 | $html .= " \n"; 109 | $html .= " \n"; 110 | $html .= '
' . "\n"; 111 | $html .= '

Check PHP Setup for Blogless

' . "\n"; 112 | $html .= '
' . "\n"; 113 | 114 | $html .= '

Check PHP Setup

' . "\n"; 115 | $html .= check_version(); 116 | $html .= check_sessions(); 117 | $html .= '

Check Directory Permissions

' . "\n"; 118 | $html .= check_dir('Admin', '.'); 119 | $html .= check_dir('Themes', 'themes/'); 120 | $html .= check_dir('Article', '../articles/'); 121 | $html .= '

Check File Permissions

' . "\n"; 122 | $html .= check_file('config.php'); 123 | $html .= check_file('password.php'); 124 | $html .= check_file('check.php'); 125 | $html .= '
' . "\n"; 126 | 127 | if ($ok) { 128 | $html .= '

Everything ok.

' . "\n"; 129 | $html .= '
' . "\n"; 130 | $html .= '

Go on and do some needed settings by clicking here!

' . "\n"; 131 | } 132 | else { 133 | $html .= '

Your Installation will not run Blogless! Check and fix your setup and run this test again by clicking below!

' . "\n"; 134 | $html .= '
' . "\n"; 135 | $html .= '

Check again!

' . "\n"; 136 | } 137 | $html .= ""; 138 | $html .= ""; 139 | header('Content-type: text/html; charset=utf-8'); 140 | header('Cache-Control: no-cache, must-revalidate'); 141 | die($html); 142 | } 143 | ?> 144 | -------------------------------------------------------------------------------- /admin/config.php: -------------------------------------------------------------------------------- 1 | 23 | -------------------------------------------------------------------------------- /admin/delete.css: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Lato:400,700); 2 | 3 | /* css reset */ 4 | html, body, main, header, p, blockquote, form, input, center { 5 | margin:0;padding:0;border:0;font-size:medium;font:inherit;vertical-align:baseline;box-sizing: border-box; 6 | } 7 | 8 | html {background-color:#FAFAFA; font-family:'Lato',sans-serif; height:100;} 9 | body {max-width:200mm; margin:40px auto; padding:1em; background-color:#FFF; border-radius: 5px; text-align: center; } 10 | header {display:block; margin-bottom:1em; } 11 | h1 {color:#F80; font-size:xx-large; font-weight:bold; line-height:120%; } 12 | p {margin-bottom:0.5em;} 13 | input {width:16em; border-radius:5px; border:1px solid #bbb; background-color:#FAFAFA; margin:0px auto; padding:2px 4px; } 14 | input[type="submit"] {color:#FFF; background:#999; text-decoration:none; font-weight:bold; width:8em; margin:0px auto; } 15 | article blockquote { margin: 2em auto; padding: 0.5em 10px; font-size:x-large; text-align:center; } 16 | article blockquote:before { font-size: 3em; line-height: 0.1em; content: '„' ' '; color: #F80; font-family: Georgia, serif; } 17 | article blockquote:after { font-size: 3em; line-height: 0.1em; content: ' ' ' “ '; color: #F80; font-family: Georgia, serif; vertical-align: -0.4em;} 18 | -------------------------------------------------------------------------------- /admin/delete.php: -------------------------------------------------------------------------------- 1 | 5 | Project: http://blogless.datenbrei.de 6 | License: http://blogless.datenbrei.de/license/ 7 | */ 8 | 9 | require('include.php'); 10 | require('auth.php'); 11 | 12 | // recursively remove directory 13 | function rrmdir($dir) { 14 | foreach(glob($dir . '/*') as $file) { 15 | if(is_dir($file)) rrmdir($file); else unlink($file); 16 | } 17 | rmdir($dir); 18 | } 19 | 20 | if ($_SERVER["REQUEST_METHOD"] == "GET") { 21 | $article = (isset($_GET['article'])) ? $_GET['article'] : NULL; 22 | $file = (isset($_GET['file'])) ? $_GET['file'] : NULL; 23 | 24 | $html = " \n"; 25 | $html .= " \n"; 26 | $html .= "Delete \n"; 27 | $html .= " \n"; 28 | $html .= '' . "\n"; 29 | $html .= '' . "\n"; 30 | $html .= '' . "\n"; 31 | $html .= '' . "\n"; 32 | $html .= '
' . "\n"; 33 | $html .= '
' . "\n"; 34 | 35 | if ($article && $file) { 36 | $html .= '
' . "\n"; 37 | $html .= '

Delete File

' . "\n"; 38 | $html .= '
' . "\n"; 39 | $html .= '

' . $file . '

' . "\n"; 40 | $html .= '
' . "\n"; 41 | $html .= '' . "\n"; 42 | $html .= '' . "\n"; 43 | $html .= ' '; 44 | $html .= ''; 45 | $html .= '
' . "\n"; 46 | } 47 | elseif ($article) { 48 | $html .= '
' . "\n"; 49 | $html .= '

Delete Article

' . "\n"; 50 | $html .= '
' . "\n"; 51 | $html .= '

' . $article . '

' . "\n"; 52 | $html .= '
'; 53 | $html .= '' . "\n"; 54 | $html .= ' '; 55 | $html .= ''; 56 | $html .= '
'; 57 | } 58 | else { 59 | header('Location: index.php'); 60 | } 61 | 62 | $html .= '
' . "\n"; 63 | $html .= '
' . "\n"; 64 | $html .= ''; 65 | $html .= ''; 66 | header('Content-type: text/html; charset=utf-8'); 67 | header('Cache-Control: no-cache, must-revalidate'); 68 | die($html); 69 | } 70 | elseif ($_SERVER["REQUEST_METHOD"] == "POST") { 71 | $article = filter_input(INPUT_POST, "article", FILTER_SANITIZE_STRING); 72 | $file = filter_input(INPUT_POST, "file", FILTER_SANITIZE_STRING); 73 | $choice = filter_input(INPUT_POST, "choice", FILTER_SANITIZE_STRING); 74 | 75 | // delete a file from an article, a file in index or a whole article 76 | if ($choice == 'Delete') { 77 | if ($article && $file && $file != 'index.html') { 78 | unlink($config["basedir"] . DIRECTORY_SEPARATOR . $article . '/' . $file); 79 | header('Location: edit.php?article=' . urlencode($article)); 80 | } 81 | elseif ($file && $file != 'index.html') { 82 | unlink($config["basedir"] . DIRECTORY_SEPARATOR . $file); 83 | header('Location: edit.php'); 84 | } 85 | elseif ($article) { 86 | rrmdir($config["basedir"] . DIRECTORY_SEPARATOR . urldecode($article)); 87 | header('Location: index.php'); 88 | } 89 | else 90 | header('Location: index.php'); 91 | } 92 | else { 93 | if ($article && $file && $file != 'index.html') { 94 | header('Location: edit.php?article=' . urlencode($article)); 95 | } 96 | elseif ($file && $file != 'index.html') { 97 | header('Location: edit.php'); 98 | } 99 | else 100 | header('Location: index.php'); 101 | 102 | } 103 | } 104 | ?> 105 | -------------------------------------------------------------------------------- /admin/include.php: -------------------------------------------------------------------------------- 1 | 5 | Project: http://blogless.datenbrei.de 6 | License: http://blogless.datenbrei.de/license/ 7 | */ 8 | 9 | // Set internal character encoding to 'UTF-8' - needed for some functions below 10 | // Not needed since PHP 5.6 with default_charset = UTF-8 11 | 12 | // locale and our own path 13 | mb_internal_encoding("UTF-8"); 14 | 15 | require_once('config.php'); 16 | 17 | function mystrftime ($format, $timestamp) { 18 | $format = str_replace('%S', date('S', $timestamp), $format); 19 | return strftime($format, $timestamp); 20 | } 21 | 22 | function reltoabs($text, $base) { 23 | // base url needs trailing / 24 | if (substr($base, -1, 1) != "/") 25 | $base .= "/"; 26 | // replace links 27 | $pattern = "/]*) href=\"([^http|ftp|https|mailto][^\"]*)\"/"; 28 | $replace = "\n"; 51 | $xml .= '' . "\n"; 52 | $xml .= '' . $article['created'] . "\n"; 53 | $xml .= "\n"; 54 | } 55 | $article = get_article(null); 56 | $xml .= "\n"; 57 | $xml .= '' . $config['baseurl'] . "index.html\n"; 58 | $xml .= '' . "\n"; 59 | $xml .= '' . $article['created'] . "\n"; 60 | $xml .= "\n"; 61 | $xml .= "\n"; 62 | file_put_contents($config["basedir"] . DIRECTORY_SEPARATOR . 'sitemap.xml',$xml); 63 | } 64 | 65 | // Generate RSS 2.0 feed 66 | function update_rss() { 67 | global $config; 68 | 69 | $xml = "\n"; 70 | $xml .= "\n"; 71 | $xml .= "\n"; 72 | $xml .= "" . $_SERVER['HTTP_HOST'] . "\n"; 73 | $xml .= "" . $config['baseurl'] . "\n"; 74 | $xml .= "" . $_SERVER['HTTP_HOST'] . "\n"; 75 | $xml .= "" . $config['language'] . "\n"; 76 | $xml .= "" . htmlspecialchars(date(DATE_RSS), time()) . "\n"; 77 | $xml .= "blogless\n"; 78 | $files = get_article_list(); 79 | foreach ($files as $filename) { 80 | $article = get_article($filename); 81 | if ($article['draft']) 82 | continue; 83 | $description = $article['description']; 84 | $xml .= "\n"; 85 | $xml .= "" . htmlspecialchars($article['title']) . "\n"; 86 | $xml .= "" . $config['baseurl'] . urlencode($filename) . "/index.html\n"; 87 | $xml .= "" . htmlspecialchars($description, ENT_COMPAT | ENT_XML1) . "\n"; 88 | $xml .= "\n"; 89 | //$xml .= "" . pageid($pagename) . "\n"; 90 | $xml .= "" . htmlspecialchars($article['created']) . "\n"; 91 | $xml .= "\n"; 92 | } 93 | $xml .= "\n"; 94 | $xml .= ""; 95 | file_put_contents('../feed.xml',$xml); 96 | } 97 | 98 | function get_article_list() { 99 | global $config; 100 | 101 | $dir = new DirectoryIterator($config["basedir"] . DIRECTORY_SEPARATOR); 102 | $files = array(); 103 | $unique = 1000; 104 | foreach ($dir as $file) { 105 | $filename = $file->getFilename(); 106 | if ($file->isDir() && !$file->isDot() && $filename != 'admin' && substr($filename,0,1) != ".") { 107 | $files[$file->getMTime() . $unique] = $file->getFilename(); 108 | } 109 | $unique++; 110 | } 111 | krsort($files); 112 | return $files; 113 | } 114 | 115 | function get_theme_list() { 116 | $dir = new DirectoryIterator('themes/'); 117 | $files = array(); 118 | $unique = 1000; 119 | foreach ($dir as $file) { 120 | if ($file->isDir() && !$file->isDot() && $file->getFilename() != 'admin') { 121 | $files[$file->getMTime() . $unique] = $file->getFilename(); 122 | } 123 | $unique++; 124 | } 125 | krsort($files); 126 | return $files; 127 | } 128 | 129 | function get_file_list($path) { 130 | $dir = new DirectoryIterator($path); 131 | $files = array(); 132 | $unique = 1000; 133 | foreach ($dir as $file) { 134 | if (!$file->isDir()) { 135 | $files[$file->getMTime() . $unique] = $file->getFilename(); 136 | } 137 | $unique++; 138 | } 139 | krsort($files); 140 | return $files; 141 | } 142 | 143 | // get article attributes 144 | function get_article($name) { 145 | global $config; 146 | 147 | $article = []; 148 | if ($name) { 149 | $path = $config["basedir"] . DIRECTORY_SEPARATOR . $name . DIRECTORY_SEPARATOR . 'index.html'; 150 | $article['url'] = $config['baseurl'] . $name . '/'; 151 | } 152 | else { 153 | $path = $config["basedir"] . DIRECTORY_SEPARATOR . 'index.html'; 154 | $article['url'] = $config['baseurl']; 155 | } 156 | 157 | if (is_readable($path)) { 158 | $original = file_get_contents($path); 159 | 160 | preg_match('##u', $original, $matches); 161 | $article['language'] = !empty($matches[1]) ? $matches[1] : ''; 162 | preg_match('#(.*)#u', $original, $matches); 163 | $article['title'] = !empty($matches[1]) ? htmlspecialchars_decode($matches[1]) : ''; 164 | preg_match('##u', $original, $matches); 165 | $article['profile'] = !empty($matches[1]) ? $matches[1] : ''; 166 | preg_match('#
(.*)
\r?\n#ms', $original, $matches); 167 | $article['content'] = !empty($matches[1]) ? $matches[1] : ''; 168 | 169 | $tags = get_meta_tags($path); 170 | $article['author'] = !empty($tags['author']) ? htmlspecialchars_decode($tags['author']) : ''; 171 | $article['created'] = !empty($tags['created']) ? $tags['created'] : ''; 172 | $article['description'] = !empty($tags['description']) ? htmlspecialchars_decode($tags['description']) : ''; 173 | $article['keywords'] = !empty($tags['keywords']) ? htmlspecialchars_decode($tags['keywords']) : ''; 174 | $article['draft'] = !empty($tags['draft']) && $tags['draft'] == 'yes' ? true : false; 175 | $article['twitter'] = !empty($tags['twitter']) ? htmlspecialchars_decode($tags['twitter']) : ''; 176 | $article['facebook'] = !empty($tags['facebook']) ? htmlspecialchars_decode($tags['facebook']) : ''; 177 | $article['gravatar'] = !empty($tags['gravatar']) ? $tags['gravatar'] : ''; 178 | $article['disqus'] = !empty($tags['disqus']) ? $tags['disqus'] : ''; 179 | } 180 | else { 181 | $article['language'] = ''; 182 | $article['title'] = date('Y-m-d', time()); 183 | $article['content'] = ''; 184 | $article['author'] = ''; 185 | $article['profile'] = ''; 186 | $article['created'] = date('Y-m-d', time()); 187 | $article['description'] = ''; 188 | $article['draft'] = true; 189 | $article['keywords'] = ''; 190 | $article['twitter'] = ''; 191 | $article['facebook'] = ''; 192 | $article['gravatar'] = ''; 193 | $article['disqus'] = ''; 194 | } 195 | 196 | if(empty($article['language'])) $article['language'] = $config['language']; 197 | if(empty($article['author'])) $article['author'] = $config['author']; 198 | if(empty($article['profile'])) $article['profile'] = $config['profile']; 199 | if(empty($article['twitter'])) $article['twitter'] = $config['twitter']; 200 | if(empty($article['facebook'])) $article['facebook'] = $config['facebook']; 201 | if(empty($article['draft'])) $article['draft'] = false; 202 | 203 | return $article; 204 | } 205 | ?> -------------------------------------------------------------------------------- /admin/index.php: -------------------------------------------------------------------------------- 1 | 5 | Project: http://blogless.datenbrei.de 6 | License: http://blogless.datenbrei.de/license/ 7 | */ 8 | 9 | // Set internal character encoding to 'UTF-8' - needed for some functions below 10 | // Not needed since PHP 5.6 with default_charset = UTF-8 11 | 12 | 13 | require_once('config.php'); 14 | if ($config["basedir"] == '') { 15 | require('check.php'); 16 | } 17 | require('auth.php'); 18 | require('include.php'); 19 | 20 | // locale and our own path 21 | //define ('MYPATH', ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on')) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] ); 22 | 23 | if ($_SERVER["REQUEST_METHOD"] == "GET") { 24 | $html = " \n"; 25 | $html .= " \n"; 26 | $html .= " \n"; 27 | $html .= "Index of Articles \n"; 28 | $html .= " \n"; 29 | $html .= '' . "\n"; 30 | $html .= '' . "\n"; 31 | $html .= " \n"; 32 | $html .= " \n"; 33 | $html .= "
\n"; 34 | $html .= "

Index of Articles

\n"; 35 | $html .= '
' . "\n"; 36 | 37 | $article = get_article(null); 38 | 39 | $html .= '🔧'; 40 | $html .= '🔎 ' . "\n"; 41 | $html .= ' — '; 42 | $html .= '' . $article['title'] . '
' . "\n"; 43 | $html .= '
' . "\n"; 44 | 45 | 46 | $files = get_article_list(); 47 | foreach ($files as $name) { 48 | $article = get_article($name); 49 | $html .= '🔧'; 50 | $html .= ''; 51 | $html .= ' — '; 52 | $html .= '' . $article['title'] . '
' . "\n"; 53 | } 54 | 55 | $html .= "
\n"; 56 | $html .= '' . "\n"; 61 | 62 | $html .= "" . "\n"; 63 | $html .= ""; 64 | 65 | header('Cache-Control: no-cache, must-revalidate'); 66 | die($html); 67 | } 68 | ?> -------------------------------------------------------------------------------- /admin/login.css: -------------------------------------------------------------------------------- 1 | @import url(http://fonts.googleapis.com/css?family=Lato:400,700); 2 | 3 | /* css reset */ 4 | html, body, main, header, nav, section, address, footer, div, span, h1, h2, p, blockquote, pre, img, a, form, time, textarea, input, b, u, i, center, dl, dt, dd, ol, ul, li { 5 | margin:0; 6 | padding:0; 7 | border:0; 8 | font-size:medium; 9 | font:inherit; 10 | vertical-align:baseline; 11 | box-sizing: border-box; 12 | } 13 | 14 | html { 15 | background-color:#FAFAFA; 16 | font-family:'Lato',sans-serif; 17 | height:100%; 18 | } 19 | 20 | body { 21 | max-width:200mm; 22 | margin:40px auto; 23 | padding:1em; 24 | background-color:#FFF; 25 | border-radius: 5px; 26 | text-align: center; 27 | } 28 | 29 | header { 30 | display:block; 31 | margin-bottom:1em; 32 | } 33 | 34 | h1 { 35 | color:#F80; 36 | font-size:xx-large; 37 | font-weight:bold; 38 | line-height:120%; 39 | } 40 | 41 | p { 42 | margin-bottom:0.5em; 43 | } 44 | 45 | input { 46 | display:block; 47 | width:16em; 48 | border-radius:5px; 49 | border:1px solid #bbb; 50 | background-color:#FAFAFA; 51 | margin:0px auto; 52 | padding:2px 4px; 53 | } 54 | 55 | input[type="submit"] { 56 | color:#FFF; 57 | background:#999; 58 | text-decoration:none; 59 | font-weight:bold; 60 | width:8em; 61 | margin:0px auto; 62 | } 63 | -------------------------------------------------------------------------------- /admin/login.php: -------------------------------------------------------------------------------- 1 | 5 | Project: http://blogless.datenbrei.de 6 | License: http://blogless.datenbrei.de/license/ 7 | */ 8 | 9 | // Is there yet a password set? If yes, get it. 10 | session_start(); 11 | if (is_readable('password.php')) 12 | @include 'password.php'; 13 | else 14 | $password = false; 15 | 16 | define('PWD_MESSAGE', 'Login with Username and Password'); 17 | define('PWD_SET', 'Initially set Username and global Password'); 18 | define('PWD_ERROR', 'Wrong Username or Password - try again!'); 19 | 20 | if ($_SERVER["REQUEST_METHOD"] == "GET") { 21 | $html = " \n"; 22 | $html .= " \n"; 23 | $html .= "Login \n"; 24 | $html .= " \n"; 25 | $html .= '' . "\n"; 26 | $html .= '' . "\n"; 27 | $html .= '' . "\n"; 28 | $html .= '' . "\n"; 29 | $html .= '
' . "\n"; 30 | $html .= '
' . "\n"; 31 | 32 | if ($password) { 33 | $error = (filter_input(INPUT_GET, "error", FILTER_VALIDATE_INT)) ? true : false; 34 | 35 | $html .= '
' . "\n"; 36 | $html .= '

Login

' . "\n"; 37 | $html .= '
' . "\n"; 38 | $html .= ($error) ? '

' . PWD_ERROR . '

' . "\n" : '

' . PWD_MESSAGE . '

' . "\n"; 39 | $html .= '
' . "\n"; 40 | $html .= '
'; 41 | $html .= '

' . "\n"; 42 | $html .= '

'; 43 | $html .= '
' . "\n"; 44 | $html .= '

'; 45 | $html .= '

'; 46 | } 47 | else { 48 | $html .= '
' . "\n"; 49 | $html .= '

Set Password

' . "\n"; 50 | $html .= '
' . "\n"; 51 | $html .= '

' . PWD_SET . '

' . "\n"; 52 | $html .= '
' . "\n"; 53 | $html .= '
' . "\n"; 54 | $html .= '

' . "\n"; 55 | $html .= '

' . "\n"; 56 | $html .= '
' . "\n"; 57 | $html .= '

'; 58 | $html .= '

' . "\n"; 59 | } 60 | 61 | $html .= '
' . "\n"; 62 | $html .= '
' . "\n"; 63 | $html .= ''; 64 | $html .= ''; 65 | header('Content-type: text/html; charset=utf-8'); 66 | header('Cache-Control: no-cache, must-revalidate'); 67 | die($html); 68 | } 69 | elseif ($_SERVER["REQUEST_METHOD"] == "POST") { 70 | $pw = filter_input(INPUT_POST, "password", FILTER_SANITIZE_STRING,FILTER_FLAG_STRIP_LOW); 71 | $user = filter_input(INPUT_POST, "username", FILTER_SANITIZE_STRING); 72 | 73 | // initial login, set username and password 74 | if (!$password) { 75 | $crypted = password_hash($pw, PASSWORD_BCRYPT); 76 | $file = '' . "\n"; 80 | file_put_contents('password.php', $file); 81 | 82 | // Login 83 | $_SESSION['login'] = $crypted; 84 | header('Location: index.php'); 85 | } 86 | else { 87 | // Login successful 88 | if ($user == $username && password_verify($pw, $password)) { 89 | $_SESSION['login'] = $password; 90 | header('Location: index.php'); 91 | } 92 | else { 93 | session_destroy(); 94 | header("HTTP/1.0 401 Unauthorized"); 95 | header('Location: login.php?error=401'); 96 | } 97 | } 98 | } 99 | ?> 100 | -------------------------------------------------------------------------------- /admin/logout.php: -------------------------------------------------------------------------------- 1 | 5 | Project: http://blogless.datenbrei.de 6 | License: http://blogless.datenbrei.de/license/ 7 | */ 8 | 9 | session_start(); 10 | if ($_SERVER["REQUEST_METHOD"] == "GET") { 11 | session_destroy(); 12 | header('Location: login.php'); 13 | 14 | } 15 | ?> 16 | -------------------------------------------------------------------------------- /admin/ping.php: -------------------------------------------------------------------------------- 1 | 5 | Project: http://blogless.datenbrei.de 6 | License: http://blogless.datenbrei.de/license/ 7 | */ 8 | 9 | require_once('config.php'); 10 | 11 | // allow_url_fopen must be set in php.ini!!! 12 | function do_ping($service, $source, $target) { 13 | $xml = xmlrpc_encode_request("pingback.ping", array($source, $target)); 14 | //file_put_contents('ping-service.txt', $service); 15 | //file_put_contents('ping-xml.txt', $xml); 16 | 17 | $c = curl_init($service); 18 | curl_setopt($c, CURLOPT_RETURNTRANSFER, true); 19 | curl_setopt($c, CURLOPT_FOLLOWLOCATION, true); 20 | curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false); 21 | //curl_setopt($c, CURLOPT_SSL_VERIFYHOST, false); 22 | curl_setopt($c, CURLOPT_TIMEOUT, 8); 23 | curl_setopt($c, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); 24 | //curl_setopt($c, CURLOPT_FOLLOWLOCATION, 1); // allow redirects 25 | curl_setopt($c, CURLOPT_HEADER, true); 26 | curl_setopt($c, CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); 27 | curl_setopt($c, CURLOPT_POSTFIELDS, $xml); 28 | curl_setopt($c, CURLOPT_POST, 1); 29 | $data = curl_exec($c); 30 | 31 | $response = xmlrpc_decode($data); 32 | //file_put_contents('ping-response.txt', $data); 33 | if ($response && xmlrpc_is_fault($response)) 34 | trigger_error("xmlrpc: $response[faultString] ($response[faultCode])"); 35 | } 36 | 37 | # $article_text will be the full text of YOUR post 38 | # $article_url will be the full url of YOUR posting 39 | function send_ping($article_text, $article_url) { 40 | global $config; 41 | $regex = '#]*href="([^"]+)"#i'; 42 | preg_match_all($regex, $article_text, $matches); 43 | foreach ($matches[1] as $link) { 44 | if (preg_match('/^https{0,1}:/i', $link) && strpos($link, $config['baseurl']) === false) { 45 | // We found an external link! 46 | $c = curl_init(); 47 | curl_setopt($c, CURLOPT_URL, $link); 48 | curl_setopt($c, CURLOPT_RETURNTRANSFER, true); 49 | curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false); 50 | //curl_setopt($c, CURLOPT_HEADER, false); 51 | $page_data = curl_exec($c); 52 | curl_close($c); 53 | 54 | // See if service link contents pingback header (i have to unify this, but it works for now) 55 | if (preg_match('##i', $page_data, $match)) { 56 | $service = $match[1]; 57 | do_ping($service, $article_url, $link); 58 | } 59 | elseif (preg_match('##i', $page_data, $match)) { 60 | $service = $match[1]; 61 | do_ping($service, $article_url, $link); 62 | } 63 | 64 | $i++; 65 | } 66 | } 67 | } 68 | ?> 69 | -------------------------------------------------------------------------------- /admin/settings.php: -------------------------------------------------------------------------------- 1 | 5 | Project: http://blogless.datenbrei.de 6 | License: http://blogless.datenbrei.de/license/ 7 | */ 8 | 9 | require('include.php'); 10 | require('config.php'); 11 | require('auth.php'); 12 | 13 | function theme_chooser($current) { 14 | $html = '' . "\n"; 20 | return $html; 21 | } 22 | 23 | $default_article_dir = dirname(getcwd()) . DIRECTORY_SEPARATOR . 'articles'; 24 | 25 | if ($_SERVER["REQUEST_METHOD"] == "GET") { 26 | $html = " \n"; 27 | $html .= " \n"; 28 | $html .= " \n"; 29 | $html .= "Settings \n"; 30 | $html .= " \n"; 31 | $html .= '' . "\n"; 32 | $html .= '' . "\n"; 33 | $html .= " \n"; 34 | $html .= " \n"; 35 | $html .= "
\n"; 36 | $html .= '

Settings


' . "\n"; 37 | 38 | if ($config['baseurl'] == '') 39 | $config['baseurl'] = ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on')) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . '/'; 40 | $html .= '
' . "\n"; 41 | 42 | $html .= '

Site Configuration

' . "\n"; 43 | $html .= '

' . "\n"; 44 | 45 | $html .= '

' . "\n"; 46 | $html .= '

' . "\n"; 47 | $html .= '

' . "\n"; 48 | $html .= '

' . "\n"; 49 | $html .= '

' . theme_chooser($config['theme']) . '

'; 50 | $html .= '

' . "\n"; 51 | $html .= "
\n"; 52 | $html .= "Server Directory Settings for Articles \n"; 53 | $html .= '

The Base URL must point to the Article Directory - both must match!!!

' . "\n"; 54 | $html .= '

' . "\n"; 55 | $html .= '

' . "\n"; 56 | $html .= "
\n"; 57 | 58 | $html .= '

Article Defaults

' . "\n"; 59 | $html .= '

' . "\n"; 60 | $html .= '

' . "\n"; 61 | $html .= '

' . "\n"; 62 | $html .= '

' . "\n"; 63 | $html .= '

' . "\n"; 64 | $html .= '

' . "\n"; 65 | $html .= '

' . "\n"; 66 | 67 | $html .= '

Site Options

' . "\n"; 68 | $flag = $config['rss'] == 'yes' ? 'checked' : ''; 69 | $html .= '

' . "\n"; 70 | $flag = $config['sitemap'] == 'yes' ? 'checked' : ''; 71 | $html .= '

' . "\n"; 72 | $flag = $config['articlelist'] == 'yes' ? 'checked' : ''; 73 | $html .= '

' . "\n"; 74 | $flag = $config['pingback'] == 'yes' ? 'checked' : ''; 75 | $html .= '

' . "\n"; 76 | $html .= '
'; 77 | $html .= ''; 78 | 79 | // Hidden field for old <-> new comparision 80 | $html .= '' . "\n"; 81 | 82 | 83 | 84 | $html .= "
\n"; 85 | $html .= "
\n"; 86 | $html .= " \n"; 87 | $html .= ""; 88 | header('Cache-Control: no-cache, must-revalidate'); 89 | die($html); 90 | } 91 | elseif ($_SERVER["REQUEST_METHOD"] == "POST") { 92 | $sitename = !empty($_POST['sitename']) ? $_POST['sitename'] : $_SERVER['HTTP_HOST']; 93 | $baseurl = !empty($_POST['baseurl']) ? $_POST['baseurl'] : ((isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on')) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . '/'; 94 | $basedir = !empty($_POST['basedir']) ? $_POST['basedir'] : $default_article_dir; 95 | $oldbasedir = !empty($_POST['oldbasedir']) ? $_POST['oldbasedir'] : $default_article_dir; 96 | $locale = !empty($_POST['locale']) ? $_POST['locale'] : 'en_US'; 97 | $dateformat = !empty($_POST['dateformat']) ? $_POST['dateformat'] : '%A, the %d%S of %B %Y'; 98 | $author = !empty($_POST['author']) ? $_POST['author'] : 'Anonymous'; 99 | $email = !empty($_POST['email']) ? $_POST['email'] : ''; 100 | $profile = !empty($_POST['profile']) ? $_POST['profile'] : ''; 101 | $twitter = !empty($_POST['twitter']) ? $_POST['twitter'] : ''; 102 | $facebook = !empty($_POST['facebook']) ? $_POST['facebook'] : ''; 103 | $fbappid = !empty($_POST['fbappid']) ? $_POST['fbappid'] : ''; 104 | $fbadmins = !empty($_POST['fbadmins']) ? $_POST['fbadmins'] : ''; 105 | $rss = !empty($_POST['rss']) ? 'yes' : 'no'; 106 | $sitemap = !empty($_POST['sitemap']) ? 'yes' : 'no'; 107 | $articlelist = !empty($_POST['articlelist']) ? 'yes' : 'no'; 108 | $pingback = !empty($_POST['pingback']) ? 'yes' : 'no'; 109 | $header = !empty($_POST['header']) ? $_POST['header'] : ''; 110 | $footer = !empty($_POST['footer']) ? $_POST['footer'] : ''; 111 | $theme = !empty($_POST['theme']) ? $_POST['theme'] : 'default'; 112 | $disqus = !empty($_POST['disqus']) ? $_POST['disqus'] : ''; 113 | 114 | //Fix inconvenient input 115 | if (substr($baseurl, -1) != '/') 116 | $baseurl .= '/'; 117 | 118 | 119 | $file = '' . "\n"; 143 | file_put_contents('config.php', $file); 144 | 145 | // Move article directory, if changed 146 | if ($basedir != $oldbasedir) { 147 | rename($oldbasedir, $basedir); 148 | } 149 | 150 | // set the actual theme/stylesheets for whole website 151 | @unlink($config["basedir"] . DIRECTORY_SEPARATOR . 'stylesheet.css'); 152 | @unlink($config["basedir"] . DIRECTORY_SEPARATOR . 'sitemap.css'); 153 | copy('themes/' . $theme . '/stylesheet.css', $config["basedir"] . DIRECTORY_SEPARATOR . 'stylesheet.css'); 154 | copy('themes/' . $theme . '/sitemap.css', $config["basedir"] . DIRECTORY_SEPARATOR . 'sitemap.css'); 155 | 156 | // update or delete sitemap 157 | if ($sitemap == 'yes') 158 | update_sitemap(); 159 | else 160 | @unlink($config["basedir"] . DIRECTORY_SEPARATOR . 'sitemap.xml'); 161 | 162 | // update or delete RSS feed 163 | if ($rss == 'yes') 164 | update_rss(); 165 | else 166 | @unlink($config["basedir"] . DIRECTORY_SEPARATOR . 'feed.xml'); 167 | 168 | header('Location: index.php'); 169 | } 170 | 171 | ?> 172 | -------------------------------------------------------------------------------- /admin/themes/default/sitemap.css: -------------------------------------------------------------------------------- 1 | * {display:block;} 2 | :root {font-family: Arial, Helvetica, sans-serif;background-color:#FFF;} 3 | urlset:before {content: "Sitemap"; color:#F80; font-weight:bold; font-size:xx-large; line-height:120%; text-align:center; } 4 | urlset {height:100%;max-width:200mm; margin:0px auto; padding:30px 10px; min-height:100%;} 5 | url {} 6 | loc {display:inline;color:#F80;} 7 | lastmod, changefreq, priority {display:none;} -------------------------------------------------------------------------------- /admin/themes/default/stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Default stylesheet for Blogless */ 2 | 3 | @import url(http://fonts.googleapis.com/css?family=Lato:400,700); 4 | @media print { 5 | article { border-bottom:1px solid #F80; border-top:1px solid #F80; } 6 | } 7 | 8 | /* css reset for used elements*/ 9 | html, body, main, header, details, nav, section, address, footer, div, span, h1, h2, p, blockquote, pre, img, a, form, time, textarea, input, b, u, i, center, dl, dt, dd, ol, ul, li { 10 | margin:0; padding:0; border:0; font-size:medium; font:inherit; vertical-align:baseline; box-sizing: border-box; 11 | } 12 | 13 | html { background-color:#FFF; font-family:'Lato',sans-serif; height:100%; } 14 | body { max-width:200mm; margin:0px auto; padding: 0px 10px 30px; min-height:100%; } 15 | body nav { color:white; background-color:gray; padding: 5px 10px 5px ; } 16 | body nav a { color:white; text-decoration:none; font-weight:bold; font-size:xx-large; line-height:120%;} 17 | body hr { color:#F80; background-color:#F80; border:#F80; height:1px; } 18 | article { line-height:160%; } 19 | article h2,h3,h4,h5,h6 { margin: 1em 0px; color:#F80; font-weight:bold; font-size:large; margin-top:1.5em; margin-bottom:0.5em; } 20 | article hr { color:#F80; background-color:#F80; border:#F80; height:1px; } 21 | article p { margin-bottom:1em; } 22 | article a { color:#F80; text-decoration:none; } 23 | article b { font-weight:bold; } 24 | article dfn,cite,em,i { font-style:italic; } 25 | article pre { font-family:monospace; white-space:pre-wrap; border-radius:5px; background-color:#eee; margin-top:1em; margin-bottom:1em; padding:2px; } 26 | article code,kbd,tt,var { font-family:monospace; white-space:pre-wrap; border-radius:5px; background-color:#eee; margin-top:1em; margin-bottom:0; padding:2px; } 27 | article ol { margin-top:1em; margin-bottom:1em; margin-left:2em; } 28 | article ul { margin-top:1em; margin-bottom:1em; margin-left:2em; list-style:square; } 29 | article img { width:100%; margin:5px 0; border-radius: 5px; } 30 | article blockquote { margin: 2em auto; padding: 0.5em 10px; font-style:italic; text-align:center; } 31 | article blockquote:before { font-size: 3em; line-height: 0.1em; content: '„' ' '; color: #F80; font-family: Georgia, serif; } 32 | article blockquote:after { font-size: 3em; line-height: 0.1em; content: ' ' ' “ '; color: #F80; font-family: Georgia, serif; vertical-align: -0.4em;} 33 | aside { padding:30px 10px; line-height:140%; } 34 | aside a {color:#F80; text-decoration:none; } 35 | aside ul { margin: 0 1em; list-style:none; } 36 | aside ul p { color:#BBB; } 37 | article header { display:block; color:#BBB; font-size:small; font-weight:bold; text-align:center; margin: 0 auto 3em auto; } 38 | article header #sitename { display:none; } 39 | article header h1 { margin: 1em 0 0.5em 0; color:#F80; font-weight:bold; font-size:xx-large; line-height:120%; text-align:center; } 40 | article header address { display:inline; } 41 | header time { display:inline; } 42 | article header a { color:#BBB; text-decoration:none; } 43 | article header img { display:none;} 44 | footer { text-align:center; color:#BBB; font-size:small; font-weight:bold; } 45 | footer a { color:#BBB; text-decoration:none; } 46 | -------------------------------------------------------------------------------- /admin/themes/hm/sitemap.css: -------------------------------------------------------------------------------- 1 | * {display:block;} 2 | :root {font-family: Arial, Helvetica, sans-serif;background-color:#FFF;} 3 | urlset:before {content: "Sitemap"; color:black; font-weight:bold; font-size:xx-large; line-height:120%; text-align:center; } 4 | urlset {height:100%;max-width:200mm; margin:0px auto; padding:30px 10px; min-height:100%;} 5 | url {} 6 | loc {display:inline;color:black;} 7 | lastmod, changefreq, priority {display:none;} -------------------------------------------------------------------------------- /admin/themes/hm/stylesheet.css: -------------------------------------------------------------------------------- 1 | @media print { 2 | article { border-bottom:1px solid #404040; border-top:1px solid #404040; } 3 | } 4 | 5 | /* css reset for used elements*/ 6 | html, body, main, header, details, nav, section, address, footer, div, span, h1, h2, p, blockquote, pre, img, a, form, time, textarea, input, b, u, i, center, dl, dt, dd, ol, ul, li { 7 | margin:0; padding:0; border:0; font:inherit; vertical-align:baseline; box-sizing: border-box; 8 | } 9 | 10 | html { background-color:#FFF; height:100%; } 11 | body { font-size:120%; font-family:Helvetica,Arial,sans-serif; max-width:200mm; margin:0px auto; padding: 0px 10px 30px; min-height:100%; line-height:1.5; } 12 | body nav { padding: 10px 0px 5px ; margin-top:1.5em; margin-bottom:0.5em;} 13 | body nav a { color:#0080C0; text-decoration:none; font-variant:small-caps; font-weight:bold; font-size:large; line-height:120%; } 14 | body header a { text-decoration:none; font-variant:small-caps; color:#0080C0; font-weight:bold; font-size:large; margin-top:1.5em; margin-bottom:0.5em;} 15 | body article { color:#787878; } 16 | body article h2,h3,h4,h5,h6 { margin: 1em 0px; color:#0080C0; font-weight:bold; font-size:140%; margin-top:1.5em; margin-bottom:0.5em; line-height:1.3; } 17 | body article hr { color:#0080C0; background-color:#404040; border:#404040; height:1px; } 18 | body article p { margin-bottom:1.5em; } 19 | body article a { color:#0080C0; text-decoration:none; } 20 | body article b { font-weight:bold; } 21 | body article dfn,cite,em,i { font-style:italic; } 22 | body article pre { font-family:monospace; white-space:pre-wrap; border-radius:5px; background-color:#eee; margin-top:1em; margin-bottom:1em; padding:2px; } 23 | body article code,kbd,tt,var { font-family:monospace; white-space:pre-wrap; border-radius:5px; background-color:#eee; margin-top:1em; margin-bottom:0; padding:2px; } 24 | body article ol { margin-top:1em; margin-bottom:1em; margin-left:2em; } 25 | body article ul { margin-top:1em; margin-bottom:1em; margin-left:2em; list-style:square; } 26 | body article img { width:100%; margin:5px 0; border-radius: 5px; } 27 | body article blockquote { margin: 2em auto; padding: 0.5em 10px; font-style:italic; text-align:center; color:#787878} 28 | body article blockquote:before { font-size: 3em; line-height: 0.1em; content: '„' ' '; color: #787878; font-family: Georgia, serif; } 29 | body article blockquote:after { font-size: 3em; line-height: 0.1em; content: ' ' ' “ '; color: #787878; font-family: Georgia, serif; vertical-align: -0.4em;} 30 | body article header { display:flex; align-content:center; margin: 1em auto 2em auto;} 31 | body article header h1 { color:#0080C0; font-weight:bold; font-size:200%; margin-bottom:0.5em; line-height:1.3;} 32 | body article header div { flex:1; color:#404040; font-size:medium; color: #787878; font-weight:bold;} 33 | body article header address { display:inline; } 34 | body article header time {} 35 | body article header a { flex:none; text-decoration:none; color: #787878; font-variant:normal; } 36 | body article header img { flex:none; width: 100px; height: 100px; border-radius: 50%; margin: 0; } 37 | body aside { padding:30px 10px; line-height:1.3; } 38 | body aside a {color:#0080C0; text-decoration:none; } 39 | body aside ul { margin: 0 1em; list-style:none; } 40 | body aside li { margin: 1em 0; list-style:none; } 41 | body aside ul p { color:#BBB; } 42 | body hr { color:#0080C0; background-color:#0080C0; border:#0080C0; height:1px; } 43 | body footer { text-align:center; color: #787878; font-size:small; font-weight:bold; } 44 | body footer a { color: #787878; text-decoration:none; } 45 | 46 | 47 | @media only screen and (max-width: 200mm) { 48 | article header img { display:none; } 49 | body aside { padding:30px 0px; line-height:1.3; } 50 | body aside ul { margin: 0; list-style:none; } 51 | } 52 | -------------------------------------------------------------------------------- /admin/themes/lessy/sitemap.css: -------------------------------------------------------------------------------- 1 | * {display:block;} 2 | :root {font-family: Arial, Helvetica, sans-serif;background-color:#FFF;} 3 | urlset:before {content: "Sitemap"; color:black; font-weight:bold; font-size:xx-large; line-height:120%; text-align:center; } 4 | urlset {height:100%;max-width:200mm; margin:0px auto; padding:30px 10px; min-height:100%;} 5 | url {} 6 | loc {display:inline;color:black;} 7 | lastmod, changefreq, priority {display:none;} -------------------------------------------------------------------------------- /admin/themes/lessy/stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Theme "Lessy" stylesheet for Blogless */ 2 | 3 | @import url(http://fonts.googleapis.com/css?family=Arvo:400,700); 4 | @media print { 5 | article { border-bottom:1px solid #404040; border-top:1px solid #404040; } 6 | } 7 | 8 | /* css reset for used elements*/ 9 | html, body, main, header, details, nav, section, address, footer, div, span, h1, h2, p, blockquote, pre, img, a, form, time, textarea, input, b, u, i, center, dl, dt, dd, ol, ul, li { 10 | margin:0; padding:0; border:0; font:inherit; font-size:medium; vertical-align:baseline; box-sizing: border-box; 11 | } 12 | 13 | html { background-color:#FFF; font-family:Helvetica,Arial,sans-serif; height:100%; } 14 | body { max-width:200mm; margin:0px auto; padding:30px 16px; min-height:100%; } 15 | body hr { color:#404040; background-color:#404040; border:#404040; height:1px; } 16 | article { line-height:160%; color:#787878; } 17 | article h2,h3,h4,h5,h6 { margin: 1em 0px; color:#404040; font-weight:bold; font-size:large; font-family: "Arvo",Georgia,serif; margin-top:1.5em; margin-bottom:0.5em; } 18 | article hr { color:#404040; background-color:#404040; border:#404040; height:1px; } 19 | article p { margin-bottom:1.5em; } 20 | article a { color:#404040; text-decoration:none; } 21 | article b { font-weight:bold; } 22 | article dfn,cite,em,i { font-style:italic; } 23 | article pre { font-family:monospace; white-space:pre-wrap; border-radius:5px; background-color:#eee; margin-top:1em; margin-bottom:1em; padding:2px; } 24 | article code,kbd,tt,var { font-family:monospace; white-space:pre-wrap; border-radius:5px; background-color:#eee; margin-top:1em; margin-bottom:0; padding:2px; } 25 | article ol { margin-top:1em; margin-bottom:1em; margin-left:2em; } 26 | article ul { margin-top:1em; margin-bottom:1em; margin-left:2em; list-style:square; } 27 | article img { width:100%; margin:5px 0; border-radius: 5px; } 28 | article blockquote { margin: 2em auto; padding: 0.5em 10px; font-style:italic; text-align:center; color:#787878} 29 | article blockquote:before { font-size: 3em; line-height: 0.1em; content: '„' ' '; color: #787878; font-family: Georgia, serif; } 30 | article blockquote:after { font-size: 3em; line-height: 0.1em; content: ' ' ' “ '; color: #787878; font-family: Georgia, serif; vertical-align: -0.4em;} 31 | article header { display:flex; align-content:center; margin: 1em auto 2em auto; } 32 | article header #sitename { display:none; } 33 | article header h1 { color:#404040; font-weight:bold; font-size:250%; line-height:64px; font-family: Arvo,Georgia,serif;} 34 | article header div { flex:1; color:#404040; font-size:medium; color: #787878; font-weight:bold;} 35 | article header address { display:inline;} 36 | article header time {} 37 | article header a { flex:none; text-decoration:none; color: #787878; } 38 | article header img { flex:none; width: 100px; height: 100px; border-radius: 50%; margin: 0; } 39 | aside { padding:30px 10px; line-height:140%; } 40 | aside a {color:#404040; text-decoration:none; } 41 | aside ul { margin: 0 1em; list-style:none; } 42 | aside ul p { color:#BBB; } 43 | footer { text-align:center; color: #787878; font-size:small; font-weight:bold; } 44 | footer a { color: #787878; text-decoration:none; } 45 | -------------------------------------------------------------------------------- /admin/tinymce/langs/readme.md: -------------------------------------------------------------------------------- 1 | This is where language files should be placed. 2 | 3 | Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/ 4 | -------------------------------------------------------------------------------- /admin/tinymce/plugins/advlist/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("advlist",function(a){function b(a,b){var c=[];return tinymce.each(b.split(/[ ,]/),function(a){c.push({text:a.replace(/\-/g," ").replace(/\b\w/g,function(a){return a.toUpperCase()}),data:"default"==a?"":a})}),c}function c(b,c){a.undoManager.transact(function(){var d,e=a.dom,f=a.selection;d=e.getParent(f.getNode(),"ol,ul"),d&&d.nodeName==b&&c!==!1||a.execCommand("UL"==b?"InsertUnorderedList":"InsertOrderedList"),c=c===!1?g[b]:c,g[b]=c,d=e.getParent(f.getNode(),"ol,ul"),d&&(e.setStyle(d,"listStyleType",c?c:null),d.removeAttribute("data-mce-style")),a.focus()})}function d(b){var c=a.dom.getStyle(a.dom.getParent(a.selection.getNode(),"ol,ul"),"listStyleType")||"";b.control.items().each(function(a){a.active(a.settings.data===c)})}var e,f,g={};e=b("OL",a.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),f=b("UL",a.getParam("advlist_bullet_styles","default,circle,disc,square")),a.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:e,onshow:d,onselect:function(a){c("OL",a.control.settings.data)},onclick:function(){c("OL",!1)}}),a.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:f,onshow:d,onselect:function(a){c("UL",a.control.settings.data)},onclick:function(){c("UL",!1)}})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/anchor/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("anchor",function(a){function b(){var b=a.selection.getNode(),c="";"A"==b.tagName&&(c=b.name||b.id||""),a.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:c},onsubmit:function(b){a.execCommand("mceInsertContent",!1,a.dom.createHTML("a",{id:b.data.name}))}})}a.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:b,stateSelector:"a:not([href])"}),a.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:b})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/autolink/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("autolink",function(a){function b(a){e(a,-1,"(",!0)}function c(a){e(a,0,"",!0)}function d(a){e(a,-1,"",!1)}function e(a,b,c){function d(a,b){if(0>b&&(b=0),3==a.nodeType){var c=a.data.length;b>c&&(b=c)}return b}function e(a,b){1!=a.nodeType||a.hasChildNodes()?g.setStart(a,d(a,b)):g.setStartBefore(a)}function f(a,b){1!=a.nodeType||a.hasChildNodes()?g.setEnd(a,d(a,b)):g.setEndAfter(a)}var g,h,i,j,k,l,m,n,o,p;if(g=a.selection.getRng(!0).cloneRange(),g.startOffset<5){if(n=g.endContainer.previousSibling,!n){if(!g.endContainer.firstChild||!g.endContainer.firstChild.nextSibling)return;n=g.endContainer.firstChild.nextSibling}if(o=n.length,e(n,o),f(n,o),g.endOffset<5)return;h=g.endOffset,j=n}else{if(j=g.endContainer,3!=j.nodeType&&j.firstChild){for(;3!=j.nodeType&&j.firstChild;)j=j.firstChild;3==j.nodeType&&(e(j,0),f(j,j.nodeValue.length))}h=1==g.endOffset?2:g.endOffset-1-b}i=h;do e(j,h>=2?h-2:0),f(j,h>=1?h-1:0),h-=1,p=g.toString();while(" "!=p&&""!==p&&160!=p.charCodeAt(0)&&h-2>=0&&p!=c);g.toString()==c||160==g.toString().charCodeAt(0)?(e(j,h),f(j,i),h+=1):0===g.startOffset?(e(j,0),f(j,i)):(e(j,h),f(j,i)),l=g.toString(),"."==l.charAt(l.length-1)&&f(j,i-1),l=g.toString(),m=l.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i),m&&("www."==m[1]?m[1]="http://www.":/@$/.test(m[1])&&!/^mailto:/.test(m[1])&&(m[1]="mailto:"+m[1]),k=a.selection.getBookmark(),a.selection.setRng(g),a.execCommand("createlink",!1,m[1]+m[2]),a.selection.moveToBookmark(k),a.nodeChanged())}var f;return a.on("keydown",function(b){return 13==b.keyCode?d(a):void 0}),tinymce.Env.ie?void a.on("focus",function(){if(!f){f=!0;try{a.execCommand("AutoUrlDetect",!1,!0)}catch(b){}}}):(a.on("keypress",function(c){return 41==c.keyCode?b(a):void 0}),void a.on("keyup",function(b){return 32==b.keyCode?c(a):void 0}))}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/autoresize/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("autoresize",function(a){function b(){return a.plugins.fullscreen&&a.plugins.fullscreen.isFullscreen()}function c(d){var g,h,i,j,k,l,m,n,o,p,q,r,s=tinymce.DOM;if(h=a.getDoc()){if(i=h.body,j=h.documentElement,k=e.autoresize_min_height,!i||d&&"setcontent"===d.type&&d.initial||b())return void(i&&j&&(i.style.overflowY="auto",j.style.overflowY="auto"));m=a.dom.getStyle(i,"margin-top",!0),n=a.dom.getStyle(i,"margin-bottom",!0),o=a.dom.getStyle(i,"padding-top",!0),p=a.dom.getStyle(i,"padding-bottom",!0),q=a.dom.getStyle(i,"border-top-width",!0),r=a.dom.getStyle(i,"border-bottom-width",!0),l=i.offsetHeight+parseInt(m,10)+parseInt(n,10)+parseInt(o,10)+parseInt(p,10)+parseInt(q,10)+parseInt(r,10),(isNaN(l)||0>=l)&&(l=tinymce.Env.ie?i.scrollHeight:tinymce.Env.webkit&&0===i.clientHeight?0:i.offsetHeight),l>e.autoresize_min_height&&(k=l),e.autoresize_max_height&&l>e.autoresize_max_height?(k=e.autoresize_max_height,i.style.overflowY="auto",j.style.overflowY="auto"):(i.style.overflowY="hidden",j.style.overflowY="hidden",i.scrollTop=0),k!==f&&(g=k-f,s.setStyle(a.iframeElement,"height",k+"px"),f=k,tinymce.isWebKit&&0>g&&c(d))}}function d(a,b,e){setTimeout(function(){c({}),a--?d(a,b,e):e&&e()},b)}var e=a.settings,f=0;a.settings.inline||(e.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight),10),e.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0),10),a.on("init",function(){var b,c;b=a.getParam("autoresize_overflow_padding",1),c=a.getParam("autoresize_bottom_margin",50),b!==!1&&a.dom.setStyles(a.getBody(),{paddingLeft:b,paddingRight:b}),c!==!1&&a.dom.setStyles(a.getBody(),{paddingBottom:c})}),a.on("nodechange setcontent keyup FullscreenStateChanged",c),a.getParam("autoresize_on_init",!0)&&a.on("init",function(){d(20,100,function(){d(5,1e3)})}),a.addCommand("mceAutoResize",c))}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/autosave/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce._beforeUnloadHandler=function(){var a;return tinymce.each(tinymce.editors,function(b){b.plugins.autosave&&b.plugins.autosave.storeDraft(),!a&&b.isDirty()&&b.getParam("autosave_ask_before_unload",!0)&&(a=b.translate("You have unsaved changes are you sure you want to navigate away?"))}),a},tinymce.PluginManager.add("autosave",function(a){function b(a,b){var c={s:1e3,m:6e4};return a=/^(\d+)([ms]?)$/.exec(""+(a||b)),(a[2]?c[a[2]]:1)*parseInt(a,10)}function c(){var a=parseInt(n.getItem(k+"time"),10)||0;return(new Date).getTime()-a>m.autosave_retention?(d(!1),!1):!0}function d(b){n.removeItem(k+"draft"),n.removeItem(k+"time"),b!==!1&&a.fire("RemoveDraft")}function e(){!j()&&a.isDirty()&&(n.setItem(k+"draft",a.getContent({format:"raw",no_events:!0})),n.setItem(k+"time",(new Date).getTime()),a.fire("StoreDraft"))}function f(){c()&&(a.setContent(n.getItem(k+"draft"),{format:"raw"}),a.fire("RestoreDraft"))}function g(){l||(setInterval(function(){a.removed||e()},m.autosave_interval),l=!0)}function h(){var b=this;b.disabled(!c()),a.on("StoreDraft RestoreDraft RemoveDraft",function(){b.disabled(!c())}),g()}function i(){a.undoManager.beforeChange(),f(),d(),a.undoManager.add()}function j(b){var c=a.settings.forced_root_block;return b=tinymce.trim("undefined"==typeof b?a.getBody().innerHTML:b),""===b||new RegExp("^<"+c+"[^>]*>((\xa0| |[ ]|]*>)+?|)|
$","i").test(b)}var k,l,m=a.settings,n=tinymce.util.LocalStorage;k=m.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",k=k.replace(/\{path\}/g,document.location.pathname),k=k.replace(/\{query\}/g,document.location.search),k=k.replace(/\{id\}/g,a.id),m.autosave_interval=b(m.autosave_interval,"30s"),m.autosave_retention=b(m.autosave_retention,"20m"),a.addButton("restoredraft",{title:"Restore last draft",onclick:i,onPostRender:h}),a.addMenuItem("restoredraft",{text:"Restore last draft",onclick:i,onPostRender:h,context:"file"}),a.settings.autosave_restore_when_empty!==!1&&(a.on("init",function(){c()&&j()&&f()}),a.on("saveContent",function(){d()})),window.onbeforeunload=tinymce._beforeUnloadHandler,this.hasDraft=c,this.storeDraft=e,this.restoreDraft=f,this.removeDraft=d,this.isEmpty=j}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/bbcode/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a){var b=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.on("beforeSetContent",function(a){a.content=b["_"+c+"_bbcode2html"](a.content)}),a.on("postProcess",function(a){a.set&&(a.content=b["_"+c+"_bbcode2html"](a.content)),a.get&&(a.content=b["_"+c+"_html2bbcode"](a.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Ephox Corp",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(a){function b(b,c){a=a.replace(b,c)}return a=tinymce.trim(a),b(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"),b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),b(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),b(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),b(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"),b(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"),b(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"),b(/(.*?)<\/font>/gi,"$1"),b(//gi,"[img]$1[/img]"),b(/(.*?)<\/span>/gi,"[code]$1[/code]"),b(/(.*?)<\/span>/gi,"[quote]$1[/quote]"),b(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),b(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),b(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),b(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),b(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),b(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),b(/<\/(strong|b)>/gi,"[/b]"),b(/<(strong|b)>/gi,"[b]"),b(/<\/(em|i)>/gi,"[/i]"),b(/<(em|i)>/gi,"[i]"),b(/<\/u>/gi,"[/u]"),b(/(.*?)<\/span>/gi,"[u]$1[/u]"),b(//gi,"[u]"),b(/]*>/gi,"[quote]"),b(/<\/blockquote>/gi,"[/quote]"),b(/
/gi,"\n"),b(//gi,"\n"),b(/
/gi,"\n"),b(/

/gi,""),b(/<\/p>/gi,"\n"),b(/ |\u00a0/gi," "),b(/"/gi,'"'),b(/</gi,"<"),b(/>/gi,">"),b(/&/gi,"&"),a},_punbb_bbcode2html:function(a){function b(b,c){a=a.replace(b,c)}return a=tinymce.trim(a),b(/\n/gi,"
"),b(/\[b\]/gi,""),b(/\[\/b\]/gi,""),b(/\[i\]/gi,""),b(/\[\/i\]/gi,""),b(/\[u\]/gi,""),b(/\[\/u\]/gi,""),b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2'),b(/\[url\](.*?)\[\/url\]/gi,'$1'),b(/\[img\](.*?)\[\/img\]/gi,''),b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2'),b(/\[code\](.*?)\[\/code\]/gi,'$1 '),b(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 '),a}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)}(); -------------------------------------------------------------------------------- /admin/tinymce/plugins/charmap/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("charmap",function(a){function b(){function b(a){for(;a;){if("TD"==a.nodeName)return a;a=a.parentNode}}var d,e,f,g;d='';var h=25,i=Math.ceil(c.length/h);for(f=0;i>f;f++){for(d+="",e=0;h>e;e++){var j=f*h+e;if(j
'+(k?String.fromCharCode(parseInt(k[0],10)):" ")+"
"}else d+="
"}d+="";var l={type:"container",html:d,onclick:function(c){var d=c.target;/^(TD|DIV)$/.test(d.nodeName)&&b(d).firstChild&&(a.execCommand("mceInsertContent",!1,tinymce.trim(d.innerText||d.textContent)),c.ctrlKey||g.close())},onmouseover:function(a){var c=b(a.target);c&&c.firstChild?(g.find("#preview").text(c.firstChild.firstChild.data),g.find("#previewTitle").text(c.title)):(g.find("#preview").text(" "),g.find("#previewTitle").text(" "))}};g=a.windowManager.open({title:"Special character",spacing:10,padding:10,items:[l,{type:"container",layout:"flex",direction:"column",align:"center",spacing:5,minWidth:160,minHeight:160,items:[{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:140,minHeight:80},{type:"label",name:"previewTitle",text:" ",style:"text-align: center",border:1,minWidth:140,minHeight:80}]}],buttons:[{text:"Close",onclick:function(){g.close()}}]})}var c=[["160","no-break space"],["173","soft hyphen"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["221","Y - acute"],["376","Y - diaeresis"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"]];a.addButton("charmap",{icon:"charmap",tooltip:"Special character",onclick:b}),a.addMenuItem("charmap",{icon:"charmap",text:"Special character",onclick:b,context:"insert"})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/code/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("code",function(a){function b(){var b=a.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:a.getParam("code_dialog_width",600),minHeight:a.getParam("code_dialog_height",Math.min(tinymce.DOM.getViewPort().h-200,500)),spellcheck:!1,style:"direction: ltr; text-align: left"},onSubmit:function(b){a.focus(),a.undoManager.transact(function(){a.setContent(b.data.code)}),a.selection.setCursorLocation(),a.nodeChanged()}});b.find("#code").value(a.getContent({source_view:!0}))}a.addCommand("mceCodeEditor",b),a.addButton("code",{icon:"code",tooltip:"Source code",onclick:b}),a.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:b})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/colorpicker/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("colorpicker",function(a){function b(b,c){function d(a){var b=new tinymce.util.Color(a),c=b.toRgb();f.fromJSON({r:c.r,g:c.g,b:c.b,hex:b.toHex().substr(1)}),e(b.toHex())}function e(a){f.find("#preview")[0].getEl().style.background=a}var f=a.windowManager.open({title:"Color",items:{type:"container",layout:"flex",direction:"row",align:"stretch",padding:5,spacing:10,items:[{type:"colorpicker",value:c,onchange:function(){var a=this.rgb();f&&(f.find("#r").value(a.r),f.find("#g").value(a.g),f.find("#b").value(a.b),f.find("#hex").value(this.value().substr(1)),e(this.value()))}},{type:"form",padding:0,labelGap:5,defaults:{type:"textbox",size:7,value:"0",flex:1,spellcheck:!1,onchange:function(){var a,b,c=f.find("colorpicker")[0];return a=this.name(),b=this.value(),"hex"==a?(b="#"+b,d(b),void c.value(b)):(b={r:f.find("#r").value(),g:f.find("#g").value(),b:f.find("#b").value()},c.value(b),void d(b))}},items:[{name:"r",label:"R",autofocus:1},{name:"g",label:"G"},{name:"b",label:"B"},{name:"hex",label:"#",value:"000000"},{name:"preview",type:"container",border:1}]}]},onSubmit:function(){b("#"+this.toJSON().hex)}});d(c)}a.settings.color_picker_callback||(a.settings.color_picker_callback=b)}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/contextmenu/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("contextmenu",function(a){var b,c=a.settings.contextmenu_never_use_native;a.on("contextmenu",function(d){var e,f=a.getDoc();if(!d.ctrlKey||c){if(d.preventDefault(),tinymce.Env.mac&&tinymce.Env.webkit&&2==d.button&&f.caretRangeFromPoint&&a.selection.setRng(f.caretRangeFromPoint(d.x,d.y)),e=a.settings.contextmenu||"link image inserttable | cell row column deletetable",b)b.show();else{var g=[];tinymce.each(e.split(/[ ,]/),function(b){var c=a.menuItems[b];"|"==b&&(c={text:b}),c&&(c.shortcut="",g.push(c))});for(var h=0;h'}),a+=""}),a+=""}var d=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];a.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:c,onclick:function(b){var c=a.dom.getParent(b.target,"a");c&&(a.insertContent(''+c.getAttribute('),this.hide())}},tooltip:"Emoticons"})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/example/dialog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |

Custom dialog

5 | Input some text: 6 | 7 | 8 | -------------------------------------------------------------------------------- /admin/tinymce/plugins/example/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("example",function(a,b){a.addButton("example",{text:"My button",icon:!1,onclick:function(){a.windowManager.open({title:"Example plugin",body:[{type:"textbox",name:"title",label:"Title"}],onsubmit:function(b){a.insertContent("Title: "+b.data.title)}})}}),a.addMenuItem("example",{text:"Example plugin",context:"tools",onclick:function(){a.windowManager.open({title:"TinyMCE site",url:b+"/dialog.html",width:600,height:400,buttons:[{text:"Insert",onclick:function(){var b=a.windowManager.getWindows()[0];a.insertContent(b.getContentWindow().document.getElementById("content").value),b.close()}},{text:"Close",onclick:"close"}]})}})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/example_dependency/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("example_dependency",function(){},["example"]); -------------------------------------------------------------------------------- /admin/tinymce/plugins/fullpage/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("fullpage",function(a){function b(){var b=c();a.windowManager.open({title:"Document properties",data:b,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(a){d(tinymce.extend(b,a.data))}})}function c(){function b(a,b){var c=a.attr(b);return c||""}var c,d,f=e(),g={};return g.fontface=a.getParam("fullpage_default_fontface",""),g.fontsize=a.getParam("fullpage_default_fontsize",""),c=f.firstChild,7==c.type&&(g.xml_pi=!0,d=/encoding="([^"]+)"/.exec(c.value),d&&(g.docencoding=d[1])),c=f.getAll("#doctype")[0],c&&(g.doctype=""),c=f.getAll("title")[0],c&&c.firstChild&&(g.title=c.firstChild.value),k(f.getAll("meta"),function(a){var b,c=a.attr("name"),d=a.attr("http-equiv");c?g[c.toLowerCase()]=a.attr("content"):"Content-Type"==d&&(b=/charset\s*=\s*(.*)\s*/gi.exec(a.attr("content")),b&&(g.docencoding=b[1]))}),c=f.getAll("html")[0],c&&(g.langcode=b(c,"lang")||b(c,"xml:lang")),g.stylesheets=[],tinymce.each(f.getAll("link"),function(a){"stylesheet"==a.attr("rel")&&g.stylesheets.push(a.attr("href"))}),c=f.getAll("body")[0],c&&(g.langdir=b(c,"dir"),g.style=b(c,"style"),g.visited_color=b(c,"vlink"),g.link_color=b(c,"link"),g.active_color=b(c,"alink")),g}function d(b){function c(a,b,c){a.attr(b,c?c:void 0)}function d(a){g.firstChild?g.insert(a,g.firstChild):g.append(a)}var f,g,h,j,m,n=a.dom;f=e(),g=f.getAll("head")[0],g||(j=f.getAll("html")[0],g=new l("head",1),j.firstChild?j.insert(g,j.firstChild,!0):j.append(g)),j=f.firstChild,b.xml_pi?(m='version="1.0"',b.docencoding&&(m+=' encoding="'+b.docencoding+'"'),7!=j.type&&(j=new l("xml",7),f.insert(j,f.firstChild,!0)),j.value=m):j&&7==j.type&&j.remove(),j=f.getAll("#doctype")[0],b.doctype?(j||(j=new l("#doctype",10),b.xml_pi?f.insert(j,f.firstChild):d(j)),j.value=b.doctype.substring(9,b.doctype.length-1)):j&&j.remove(),j=null,k(f.getAll("meta"),function(a){"Content-Type"==a.attr("http-equiv")&&(j=a)}),b.docencoding?(j||(j=new l("meta",1),j.attr("http-equiv","Content-Type"),j.shortEnded=!0,d(j)),j.attr("content","text/html; charset="+b.docencoding)):j&&j.remove(),j=f.getAll("title")[0],b.title?(j?j.empty():(j=new l("title",1),d(j)),j.append(new l("#text",3)).value=b.title):j&&j.remove(),k("keywords,description,author,copyright,robots".split(","),function(a){var c,e,g=f.getAll("meta"),h=b[a];for(c=0;c"))}function e(){return new tinymce.html.DomParser({validate:!1,root_name:"#document"}).parse(i)}function f(b){function c(a){return a.replace(/<\/?[A-Z]+/g,function(a){return a.toLowerCase()})}var d,f,h,l,m=b.content,n="",o=a.dom;if(!b.selection&&!("raw"==b.format&&i||b.source_view&&a.getParam("fullpage_hide_in_source_view"))){0!==m.length||b.source_view||(m=tinymce.trim(i)+"\n"+tinymce.trim(m)+"\n"+tinymce.trim(j)),m=m.replace(/<(\/?)BODY/gi,"<$1body"),d=m.indexOf("",d),i=c(m.substring(0,d+1)),f=m.indexOf("\n"),h=e(),k(h.getAll("style"),function(a){a.firstChild&&(n+=a.firstChild.value)}),l=h.getAll("body")[0],l&&o.setAttribs(a.getBody(),{style:l.attr("style")||"",dir:l.attr("dir")||"",vLink:l.attr("vlink")||"",link:l.attr("link")||"",aLink:l.attr("alink")||""}),o.remove("fullpage_styles");var p=a.getDoc().getElementsByTagName("head")[0];n&&(o.add(p,"style",{id:"fullpage_styles"},n),l=o.get("fullpage_styles"),l.styleSheet&&(l.styleSheet.cssText=n));var q={};tinymce.each(p.getElementsByTagName("link"),function(a){"stylesheet"==a.rel&&a.getAttribute("data-mce-fullpage")&&(q[a.href]=a)}),tinymce.each(h.getAll("link"),function(a){var b=a.attr("href");q[b]||"stylesheet"!=a.attr("rel")||o.add(p,"link",{rel:"stylesheet",text:"text/css",href:b,"data-mce-fullpage":"1"}),delete q[b]}),tinymce.each(q,function(a){a.parentNode.removeChild(a)})}}function g(){var b,c="",d="";return a.getParam("fullpage_default_xml_pi")&&(c+='\n'),c+=a.getParam("fullpage_default_doctype",""),c+="\n\n\n",(b=a.getParam("fullpage_default_title"))&&(c+=""+b+"\n"),(b=a.getParam("fullpage_default_encoding"))&&(c+='\n'),(b=a.getParam("fullpage_default_font_family"))&&(d+="font-family: "+b+";"),(b=a.getParam("fullpage_default_font_size"))&&(d+="font-size: "+b+";"),(b=a.getParam("fullpage_default_text_color"))&&(d+="color: "+b+";"),c+="\n\n"}function h(b){b.selection||b.source_view&&a.getParam("fullpage_hide_in_source_view")||(b.content=tinymce.trim(i)+"\n"+tinymce.trim(b.content)+"\n"+tinymce.trim(j))}var i,j,k=tinymce.each,l=tinymce.html.Node;a.addCommand("mceFullPageProperties",b),a.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),a.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"}),a.on("BeforeSetContent",f),a.on("GetContent",h)}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/fullscreen/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("fullscreen",function(a){function b(){var a,b,c=window,d=document,e=d.body;return e.offsetWidth&&(a=e.offsetWidth,b=e.offsetHeight),c.innerWidth&&c.innerHeight&&(a=c.innerWidth,b=c.innerHeight),{w:a,h:b}}function c(){function c(){j.setStyle(m,"height",b().h-(l.clientHeight-m.clientHeight))}var k,l,m,n,o=document.body,p=document.documentElement;i=!i,l=a.getContainer(),k=l.style,m=a.getContentAreaContainer().firstChild,n=m.style,i?(d=n.width,e=n.height,n.width=n.height="100%",g=k.width,h=k.height,k.width=k.height="",j.addClass(o,"mce-fullscreen"),j.addClass(p,"mce-fullscreen"),j.addClass(l,"mce-fullscreen"),j.bind(window,"resize",c),c(),f=c):(n.width=d,n.height=e,g&&(k.width=g),h&&(k.height=h),j.removeClass(o,"mce-fullscreen"),j.removeClass(p,"mce-fullscreen"),j.removeClass(l,"mce-fullscreen"),j.unbind(window,"resize",f)),a.fire("FullscreenStateChanged",{state:i})}var d,e,f,g,h,i=!1,j=tinymce.DOM;return a.settings.inline?void 0:(a.on("init",function(){a.addShortcut("Meta+Alt+F","",c)}),a.on("remove",function(){f&&j.unbind(window,"resize",f)}),a.addCommand("mceFullScreen",c),a.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Meta+Alt+F",selectable:!0,onClick:c,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})},context:"view"}),a.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Meta+Alt+F",onClick:c,onPostRender:function(){var b=this;a.on("FullscreenStateChanged",function(a){b.active(a.state)})}}),{isFullscreen:function(){return i}})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/hr/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("hr",function(a){a.addCommand("InsertHorizontalRule",function(){a.execCommand("mceInsertContent",!1,"
")}),a.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),a.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/image/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("image",function(a){function b(a,b){function c(a,c){d.parentNode&&d.parentNode.removeChild(d),b({width:a,height:c})}var d=document.createElement("img");d.onload=function(){c(Math.max(d.width,d.clientWidth),Math.max(d.height,d.clientHeight))},d.onerror=function(){c()};var e=d.style;e.visibility="hidden",e.position="fixed",e.bottom=e.left=0,e.width=e.height="auto",document.body.appendChild(d),d.src=a}function c(a,b,c){function d(a,c){return c=c||[],tinymce.each(a,function(a){var e={text:a.text||a.title};a.menu?e.menu=d(a.menu):(e.value=a.value,b(e)),c.push(e)}),c}return d(a,c||[])}function d(b){return function(){var c=a.settings.image_list;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):"function"==typeof c?c(b):b(c)}}function e(d){function e(){var a,b,c,d;a=l.find("#width")[0],b=l.find("#height")[0],a&&b&&(c=a.value(),d=b.value(),l.find("#constrain")[0].checked()&&m&&n&&c&&d&&(m!=c?(d=Math.round(c/m*d),isNaN(d)||b.value(d)):(c=Math.round(d/n*c),isNaN(c)||a.value(c))),m=c,n=d)}function f(){function b(b){function c(){b.onload=b.onerror=null,a.selection&&(a.selection.select(b),a.nodeChanged())}b.onload=function(){q.width||q.height||!t||r.setAttribs(b,{width:b.clientWidth,height:b.clientHeight}),c()},b.onerror=c}j(),e(),q=tinymce.extend(q,l.toJSON()),q.alt||(q.alt=""),q.title||(q.title=""),""===q.width&&(q.width=null),""===q.height&&(q.height=null),q.style||(q.style=null),q={src:q.src,alt:q.alt,title:q.title,width:q.width,height:q.height,style:q.style,"class":q["class"]},a.undoManager.transact(function(){return q.src?(""===q.title&&(q.title=null),s?r.setAttribs(s,q):(q.id="__mcenew",a.focus(),a.selection.setContent(r.createHTML("img",q)),s=r.get("__mcenew"),r.setAttrib(s,"id",null)),void b(s)):void(s&&(r.remove(s),a.focus(),a.nodeChanged()))})}function g(a){return a&&(a=a.replace(/px$/,"")),a}function h(c){var d,e,f,g=c.meta||{};o&&o.value(a.convertURL(this.value(),"src")),tinymce.each(g,function(a,b){l.find("#"+b).value(a)}),g.width||g.height||(d=a.convertURL(this.value(),"src"),e=a.settings.image_prepend_url,f=new RegExp("^(?:[a-z]+:)?//","i"),e&&!f.test(d)&&d.substring(0,e.length)!==e&&(d=e+d),this.value(d),b(a.documentBaseURI.toAbsolute(this.value()),function(a){a.width&&a.height&&t&&(m=a.width,n=a.height,l.find("#width").value(m),l.find("#height").value(n))}))}function i(a){if(a.margin){var b=a.margin.split(" ");switch(b.length){case 1:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[0],a["margin-bottom"]=a["margin-bottom"]||b[0],a["margin-left"]=a["margin-left"]||b[0];break;case 2:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[1],a["margin-bottom"]=a["margin-bottom"]||b[0],a["margin-left"]=a["margin-left"]||b[1];break;case 3:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[1],a["margin-bottom"]=a["margin-bottom"]||b[2],a["margin-left"]=a["margin-left"]||b[1];break;case 4:a["margin-top"]=a["margin-top"]||b[0],a["margin-right"]=a["margin-right"]||b[1],a["margin-bottom"]=a["margin-bottom"]||b[2],a["margin-left"]=a["margin-left"]||b[3]}delete a.margin}return a}function j(){function b(a){return a.length>0&&/^[0-9]+$/.test(a)&&(a+="px"),a}if(a.settings.image_advtab){var c=l.toJSON(),d=r.parseStyle(c.style);d=i(d),c.vspace&&(d["margin-top"]=d["margin-bottom"]=b(c.vspace)),c.hspace&&(d["margin-left"]=d["margin-right"]=b(c.hspace)),c.border&&(d["border-width"]=b(c.border)),l.find("#style").value(r.serializeStyle(r.parseStyle(r.serializeStyle(d))))}}function k(){if(a.settings.image_advtab){var b=l.toJSON(),c=r.parseStyle(b.style);l.find("#vspace").value(""),l.find("#hspace").value(""),c=i(c),(c["margin-top"]&&c["margin-bottom"]||c["margin-right"]&&c["margin-left"])&&(l.find("#vspace").value(c["margin-top"]===c["margin-bottom"]?g(c["margin-top"]):""),l.find("#hspace").value(c["margin-right"]===c["margin-left"]?g(c["margin-right"]):"")),c["border-width"]&&l.find("#border").value(g(c["border-width"])),l.find("#style").value(r.serializeStyle(r.parseStyle(r.serializeStyle(c))))}}var l,m,n,o,p,q={},r=a.dom,s=a.selection.getNode(),t=a.settings.image_dimensions!==!1;m=r.getAttrib(s,"width"),n=r.getAttrib(s,"height"),"IMG"!=s.nodeName||s.getAttribute("data-mce-object")||s.getAttribute("data-mce-placeholder")?s=null:q={src:r.getAttrib(s,"src"),alt:r.getAttrib(s,"alt"),title:r.getAttrib(s,"title"),"class":r.getAttrib(s,"class"),width:m,height:n},d&&(o={type:"listbox",label:"Image list",values:c(d,function(b){b.value=a.convertURL(b.value||b.url,"src")},[{text:"None",value:""}]),value:q.src&&a.convertURL(q.src,"src"),onselect:function(a){var b=l.find("#alt");(!b.value()||a.lastControl&&b.value()==a.lastControl.text())&&b.value(a.control.text()),l.find("#src").value(a.control.value()).fire("change")},onPostRender:function(){o=this}}),a.settings.image_class_list&&(p={name:"class",type:"listbox",label:"Class",values:c(a.settings.image_class_list,function(b){b.value&&(b.textStyle=function(){return a.formatter.getCssText({inline:"img",classes:[b.value]})})})});var u=[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0,onchange:h},o];a.settings.image_description!==!1&&u.push({name:"alt",type:"textbox",label:"Image description"}),a.settings.image_title&&u.push({name:"title",type:"textbox",label:"Image Title"}),t&&u.push({type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:5,size:3,onchange:e,ariaLabel:"Width"},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:5,size:3,onchange:e,ariaLabel:"Height"},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}),u.push(p),a.settings.image_advtab?(s&&(s.style.marginLeft&&s.style.marginRight&&s.style.marginLeft===s.style.marginRight&&(q.hspace=g(s.style.marginLeft)),s.style.marginTop&&s.style.marginBottom&&s.style.marginTop===s.style.marginBottom&&(q.vspace=g(s.style.marginTop)),s.style.borderWidth&&(q.border=g(s.style.borderWidth)),q.style=a.dom.serializeStyle(a.dom.parseStyle(a.dom.getAttrib(s,"style")))),l=a.windowManager.open({title:"Insert/edit image",data:q,bodyType:"tabpanel",body:[{title:"General",type:"form",items:u},{title:"Advanced",type:"form",pack:"start",items:[{label:"Style",name:"style",type:"textbox",onchange:k},{type:"form",layout:"grid",packV:"start",columns:2,padding:0,alignH:["left","right"],defaults:{type:"textbox",maxWidth:50,onchange:j},items:[{label:"Vertical space",name:"vspace"},{label:"Horizontal space",name:"hspace"},{label:"Border",name:"border"}]}]}],onSubmit:f})):l=a.windowManager.open({title:"Insert/edit image",data:q,body:u,onSubmit:f})}a.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:d(e),stateSelector:"img:not([data-mce-object],[data-mce-placeholder])"}),a.addMenuItem("image",{icon:"image",text:"Insert/edit image",onclick:d(e),context:"insert",prependToContext:!0}),a.addCommand("mceImage",d(e))}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/importcss/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("importcss",function(a){function b(a){return"string"==typeof a?function(b){return-1!==b.indexOf(a)}:a instanceof RegExp?function(b){return a.test(b)}:a}function c(b,c){function d(a,b){var g,h=a.href;if(h&&c(h,b)){f(a.imports,function(a){d(a,!0)});try{g=a.cssRules||a.rules}catch(i){}f(g,function(a){a.styleSheet?d(a.styleSheet,!0):a.selectorText&&f(a.selectorText.split(","),function(a){e.push(tinymce.trim(a))})})}}var e=[],g={};f(a.contentCSS,function(a){g[a]=!0}),c||(c=function(a,b){return b||g[a]});try{f(b.styleSheets,function(a){d(a)})}catch(h){}return e}function d(b){var c,d=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(b);if(d){var e=d[1],f=d[2].substr(1).split(".").join(" "),g=tinymce.makeMap("a,img");return d[1]?(c={title:b},a.schema.getTextBlockElements()[e]?c.block=e:a.schema.getBlockElements()[e]||g[e.toLowerCase()]?c.selector=e:c.inline=e):d[2]&&(c={inline:"span",title:b.substr(1),classes:f}),a.settings.importcss_merge_classes!==!1?c.classes=f:c.attributes={"class":f},c}}var e=this,f=tinymce.each;a.on("renderFormatsMenu",function(g){var h=a.settings,i={},j=h.importcss_selector_converter||d,k=b(h.importcss_selector_filter),l=g.control;a.settings.importcss_append||l.items().remove();var m=[];tinymce.each(h.importcss_groups,function(a){a=tinymce.extend({},a),a.filter=b(a.filter),m.push(a)}),f(c(g.doc||a.getDoc(),b(h.importcss_file_filter)),function(b){if(-1===b.indexOf(".mce-")&&!i[b]&&(!k||k(b))){var c,d=j.call(e,b);if(d){var f=d.name||tinymce.DOM.uniqueId();if(m)for(var g=0;g'+d+"";var f=a.dom.getParent(a.selection.getStart(),"time");if(f)return void a.dom.setOuterHTML(f,d)}a.insertContent(d)}var d,e,f="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),g="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),h="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),i="January February March April May June July August September October November December".split(" "),j=[];a.addCommand("mceInsertDate",function(){c(a.getParam("insertdatetime_dateformat",a.translate("%Y-%m-%d")))}),a.addCommand("mceInsertTime",function(){c(a.getParam("insertdatetime_timeformat",a.translate("%H:%M:%S")))}),a.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){c(d||e)},menu:j}),tinymce.each(a.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(a){e||(e=a),j.push({text:b(a),onclick:function(){d=a,c(a)}})}),a.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:j,context:"insert"})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/layer/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("layer",function(a){function b(a){do if(a.className&&-1!=a.className.indexOf("mceItemLayer"))return a;while(a=a.parentNode)}function c(b){var c=a.dom;tinymce.each(c.select("div,p",b),function(a){/^(absolute|relative|fixed)$/i.test(a.style.position)&&(a.hasVisual?c.addClass(a,"mceItemVisualAid"):c.removeClass(a,"mceItemVisualAid"),c.addClass(a,"mceItemLayer"))})}function d(c){var d,e,f=[],g=b(a.selection.getNode()),h=-1,i=-1;for(e=[],tinymce.walk(a.getBody(),function(a){1==a.nodeType&&/^(absolute|relative|static)$/i.test(a.style.position)&&e.push(a)},"childNodes"),d=0;dh&&e[d]==g&&(h=d);if(0>c){for(d=0;d-1?(e[h].style.zIndex=f[i],e[i].style.zIndex=f[h]):f[h]>0&&(e[h].style.zIndex=f[h]-1)}else{for(d=0;df[h]){i=d;break}i>-1?(e[h].style.zIndex=f[i],e[i].style.zIndex=f[h]):e[h].style.zIndex=f[h]+1}a.execCommand("mceRepaint")}function e(){var b=a.dom,c=b.getPos(b.getParent(a.selection.getNode(),"*")),d=a.getBody();a.dom.add(d,"div",{style:{position:"absolute",left:c.x,top:c.y>20?c.y:20,width:100,height:100},"class":"mceItemVisualAid mceItemLayer"},a.selection.getContent()||a.getLang("layer.content")),tinymce.Env.ie&&b.setHTML(d,d.innerHTML)}function f(){var c=b(a.selection.getNode());c||(c=a.dom.getParent(a.selection.getNode(),"DIV,P,IMG")),c&&("absolute"==c.style.position.toLowerCase()?(a.dom.setStyles(c,{position:"",left:"",top:"",width:"",height:""}),a.dom.removeClass(c,"mceItemVisualAid"),a.dom.removeClass(c,"mceItemLayer")):(c.style.left||(c.style.left="20px"),c.style.top||(c.style.top="20px"),c.style.width||(c.style.width=c.width?c.width+"px":"100px"),c.style.height||(c.style.height=c.height?c.height+"px":"100px"),c.style.position="absolute",a.dom.setAttrib(c,"data-mce-style",""),a.addVisual(a.getBody())),a.execCommand("mceRepaint"),a.nodeChanged())}a.addCommand("mceInsertLayer",e),a.addCommand("mceMoveForward",function(){d(1)}),a.addCommand("mceMoveBackward",function(){d(-1)}),a.addCommand("mceMakeAbsolute",function(){f()}),a.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"}),a.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"}),a.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"}),a.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"}),a.on("init",function(){tinymce.Env.ie&&a.getDoc().execCommand("2D-Position",!1,!0)}),a.on("mouseup",function(c){var d=b(c.target);d&&a.dom.setAttrib(d,"data-mce-style","")}),a.on("mousedown",function(c){var d,e=c.target,f=a.getDoc();tinymce.Env.gecko&&(b(e)?"on"!==f.designMode&&(f.designMode="on",e=f.body,d=e.parentNode,d.removeChild(e),d.appendChild(e)):"on"==f.designMode&&(f.designMode="off"))}),a.on("NodeChange",c)}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/legacyoutput/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(a){a.on("AddEditor",function(a){a.editor.settings.inline_styles=!1}),a.PluginManager.add("legacyoutput",function(b,c,d){b.on("init",function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",d=a.explode(b.settings.font_size_style_values),e=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignjustify:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(b){return a.inArray(d,b.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),a.each("b,i,u,strike".split(","),function(a){e.addValidElements(a+"[*]")}),e.getElementRule("font")||e.addValidElements("font[face|size|color|style]"),a.each(c.split(","),function(a){var b=e.getElementRule(a);b&&(b.attributes.align||(b.attributes.align={},b.attributesOrder.push("align")))})}),b.addButton("fontsizeselect",function(){var a=[],c="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7",d=b.settings.fontsize_formats||c;return b.$.each(d.split(" "),function(b,c){var d=c,e=c,f=c.split("=");f.length>1&&(d=f[0],e=f[1]),a.push({text:d,value:e})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:a,fixedWidth:!0,onPostRender:function(){var a=this;b.on("NodeChange",function(){var c;c=b.dom.getParent(b.selection.getNode(),"font"),a.value(c?c.size:"")})},onclick:function(a){a.control.settings.value&&b.execCommand("FontSize",!1,a.control.settings.value)}}}),b.addButton("fontselect",function(){function a(a){a=a.replace(/;$/,"").split(";");for(var b=a.length;b--;)a[b]=a[b].split("=");return a}var c="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",e=[],f=a(b.settings.font_formats||c);return d.each(f,function(a,b){e.push({text:{raw:b[0]},value:b[1],textStyle:-1==b[1].indexOf("dings")?"font-family:"+b[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:e,fixedWidth:!0,onPostRender:function(){var a=this;b.on("NodeChange",function(){var c;c=b.dom.getParent(b.selection.getNode(),"font"),a.value(c?c.face:"")})},onselect:function(a){a.control.settings.value&&b.execCommand("FontName",!1,a.control.settings.value)}}})})}(tinymce); -------------------------------------------------------------------------------- /admin/tinymce/plugins/link/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("link",function(a){function b(b){return function(){var c=a.settings.link_list;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):"function"==typeof c?c(b):b(c)}}function c(a,b,c){function d(a,c){return c=c||[],tinymce.each(a,function(a){var e={text:a.text||a.title};a.menu?e.menu=d(a.menu):(e.value=a.value,b&&b(e)),c.push(e)}),c}return d(a,c||[])}function d(b){function d(a){var b=l.find("#text");(!b.value()||a.lastControl&&b.value()==a.lastControl.text())&&b.value(a.control.text()),l.find("#href").value(a.control.value())}function e(b){var c=[];return tinymce.each(a.dom.select("a:not([href])"),function(a){var d=a.name||a.id;d&&c.push({text:d,value:"#"+d,selected:-1!=b.indexOf("#"+d)})}),c.length?(c.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:c,onselect:d}):void 0}function f(){!k&&0===u.text.length&&m&&this.parent().parent().find("#text")[0].value(this.value())}function g(b){var c=b.meta||{};o&&o.value(a.convertURL(this.value(),"href")),tinymce.each(b.meta,function(a,b){l.find("#"+b).value(a)}),c.text||f.call(this)}function h(a){var b=v.getContent();if(/]+>[^<]+<\/a>$/.test(b)||-1==b.indexOf("href=")))return!1;if(a){var c,d=a.childNodes;if(0===d.length)return!1;for(c=d.length-1;c>=0;c--)if(3!=d[c].nodeType)return!1}return!0}var i,j,k,l,m,n,o,p,q,r,s,t,u={},v=a.selection,w=a.dom;i=v.getNode(),j=w.getParent(i,"a[href]"),m=h(),u.text=k=j?j.innerText||j.textContent:v.getContent({format:"text"}),u.href=j?w.getAttrib(j,"href"):"",j?u.target=w.getAttrib(j,"target"):a.settings.default_link_target&&(u.target=a.settings.default_link_target),(t=w.getAttrib(j,"rel"))&&(u.rel=t),(t=w.getAttrib(j,"class"))&&(u["class"]=t),(t=w.getAttrib(j,"title"))&&(u.title=t),m&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){u.text=this.value()}}),b&&(o={type:"listbox",label:"Link list",values:c(b,function(b){b.value=a.convertURL(b.value||b.url,"href")},[{text:"None",value:""}]),onselect:d,value:a.convertURL(u.href,"href"),onPostRender:function(){o=this}}),a.settings.target_list!==!1&&(a.settings.target_list||(a.settings.target_list=[{text:"None",value:""},{text:"New window",value:"_blank"}]),q={name:"target",type:"listbox",label:"Target",values:c(a.settings.target_list)}),a.settings.rel_list&&(p={name:"rel",type:"listbox",label:"Rel",values:c(a.settings.rel_list)}),a.settings.link_class_list&&(r={name:"class",type:"listbox",label:"Class",values:c(a.settings.link_class_list,function(b){b.value&&(b.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[b.value]})})})}),a.settings.link_title!==!1&&(s={name:"title",type:"textbox",label:"Title",value:u.title}),l=a.windowManager.open({title:"Insert link",data:u,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:g,onkeyup:f},n,s,e(u.href),o,p,q,r],onSubmit:function(b){function c(b,c){var d=a.selection.getRng();window.setTimeout(function(){a.windowManager.confirm(b,function(b){a.selection.setRng(d),c(b)})},0)}function d(){var b={href:e,target:u.target?u.target:null,rel:u.rel?u.rel:null,"class":u["class"]?u["class"]:null,title:u.title?u.title:null};j?(a.focus(),m&&u.text!=k&&("innerText"in j?j.innerText=u.text:j.textContent=u.text),w.setAttribs(j,b),v.select(j),a.undoManager.add()):m?a.insertContent(w.createHTML("a",b,w.encode(u.text))):a.execCommand("mceInsertLink",!1,b)}var e;return u=tinymce.extend(u,b.data),(e=u.href)?e.indexOf("@")>0&&-1==e.indexOf("//")&&-1==e.indexOf("mailto:")?void c("The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(a){a&&(e="mailto:"+e),d()}):a.settings.link_assume_external_targets&&!/^\w+:/i.test(e)||!a.settings.link_assume_external_targets&&/^\s*www\./i.test(e)?void c("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(a){a&&(e="http://"+e),d()}):void d():void a.execCommand("unlink")}})}a.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onclick:b(d),stateSelector:"a[href]"}),a.addButton("unlink",{icon:"unlink",tooltip:"Remove link",cmd:"unlink",stateSelector:"a[href]"}),a.addShortcut("Meta+K","",b(d)),a.addCommand("mceLink",b(d)),this.showDialog=d,a.addMenuItem("link",{icon:"link",text:"Insert/edit link",shortcut:"Meta+K",onclick:b(d),stateSelector:"a[href]",context:"insert",prependToContext:!0})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/lists/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("lists",function(a){function b(a){return a&&/^(OL|UL|DL)$/.test(a.nodeName)}function c(a){return a.parentNode.firstChild==a}function d(a){return a.parentNode.lastChild==a}function e(b){return b&&!!a.schema.getTextBlockElements()[b.nodeName]}var f=this;a.on("init",function(){function g(a){function b(b){var d,e,f;e=a[b?"startContainer":"endContainer"],f=a[b?"startOffset":"endOffset"],1==e.nodeType&&(d=v.create("span",{"data-mce-type":"bookmark"}),e.hasChildNodes()?(f=Math.min(f,e.childNodes.length-1),b?e.insertBefore(d,e.childNodes[f]):v.insertAfter(d,e.childNodes[f])):e.appendChild(d),e=d,f=0),c[b?"startContainer":"endContainer"]=e,c[b?"startOffset":"endOffset"]=f}var c={};return b(!0),a.collapsed||b(),c}function h(a){function b(b){function c(a){for(var b=a.parentNode.firstChild,c=0;b;){if(b==a)return c;(1!=b.nodeType||"bookmark"!=b.getAttribute("data-mce-type"))&&c++,b=b.nextSibling}return-1}var d,e,f;d=f=a[b?"startContainer":"endContainer"],e=a[b?"startOffset":"endOffset"],d&&(1==d.nodeType&&(e=c(d),d=d.parentNode,v.remove(f)),a[b?"startContainer":"endContainer"]=d,a[b?"startOffset":"endOffset"]=e)}b(!0),b();var c=v.createRng();c.setStart(a.startContainer,a.startOffset),a.endContainer&&c.setEnd(a.endContainer,a.endOffset),w.setRng(c)}function i(b,c){var d,e,f,g=v.createFragment(),h=a.schema.getBlockElements();if(a.settings.forced_root_block&&(c=c||a.settings.forced_root_block),c&&(e=v.create(c),e.tagName===a.settings.forced_root_block&&v.setAttribs(e,a.settings.forced_root_block_attrs),g.appendChild(e)),b)for(;d=b.firstChild;){var i=d.nodeName;f||"SPAN"==i&&"bookmark"==d.getAttribute("data-mce-type")||(f=!0),h[i]?(g.appendChild(d),e=null):c?(e||(e=v.create(c),g.appendChild(e)),e.appendChild(d)):g.appendChild(d)}return a.settings.forced_root_block?f||tinymce.Env.ie&&!(tinymce.Env.ie>10)||e.appendChild(v.create("br",{"data-mce-bogus":"1"})):g.appendChild(v.create("br")),g}function j(){return tinymce.grep(w.getSelectedBlocks(),function(a){return/^(LI|DT|DD)$/.test(a.nodeName)})}function k(a,b,c){function d(a){tinymce.each(g,function(c){a.parentNode.insertBefore(c,b.parentNode)}),v.remove(a)}var e,f,g,h;for(g=v.select('span[data-mce-type="bookmark"]',a),c=c||i(b),e=v.createRng(),e.setStartAfter(b),e.setEndAfter(a),f=e.extractContents(),h=f.firstChild;h;h=h.firstChild)if("LI"==h.nodeName&&v.isEmpty(h)){v.remove(h);break}v.isEmpty(f)||v.insertAfter(f,a),v.insertAfter(c,a),v.isEmpty(b.parentNode)&&d(b.parentNode),v.remove(b),v.isEmpty(a)&&v.remove(a)}function l(a){var c,d;if(c=a.nextSibling,c&&b(c)&&c.nodeName==a.nodeName){for(;d=c.firstChild;)a.appendChild(d);v.remove(c)}if(c=a.previousSibling,c&&b(c)&&c.nodeName==a.nodeName){for(;d=c.firstChild;)a.insertBefore(d,a.firstChild);v.remove(c)}}function m(a){tinymce.each(tinymce.grep(v.select("ol,ul",a)),function(a){var c,d=a.parentNode;"LI"==d.nodeName&&d.firstChild==a&&(c=d.previousSibling,c&&"LI"==c.nodeName&&(c.appendChild(a),v.isEmpty(d)&&v.remove(d))),b(d)&&(c=d.previousSibling,c&&"LI"==c.nodeName&&c.appendChild(a))})}function n(a){function e(a){v.isEmpty(a)&&v.remove(a)}var f,g=a.parentNode,h=g.parentNode;return"DD"==a.nodeName?(v.rename(a,"DT"),!0):c(a)&&d(a)?("LI"==h.nodeName?(v.insertAfter(a,h),e(h),v.remove(g)):b(h)?v.remove(g,!0):(h.insertBefore(i(a),g),v.remove(g)),!0):c(a)?("LI"==h.nodeName?(v.insertAfter(a,h),a.appendChild(g),e(h)):b(h)?h.insertBefore(a,g):(h.insertBefore(i(a),g),v.remove(a)),!0):d(a)?("LI"==h.nodeName?v.insertAfter(a,h):b(h)?v.insertAfter(a,g):(v.insertAfter(i(a),g),v.remove(a)),!0):("LI"==h.nodeName?(g=h,f=i(a,"LI")):f=b(h)?i(a,"LI"):i(a),k(g,a,f),m(g.parentNode),!0)}function o(a){function c(c,d){var e;if(b(c)){for(;e=a.lastChild.firstChild;)d.appendChild(e);v.remove(c)}}var d,e;return"DT"==a.nodeName?(v.rename(a,"DD"),!0):(d=a.previousSibling,d&&b(d)?(d.appendChild(a),!0):d&&"LI"==d.nodeName&&b(d.lastChild)?(d.lastChild.appendChild(a),c(a.lastChild,d.lastChild),!0):(d=a.nextSibling,d&&b(d)?(d.insertBefore(a,d.firstChild),!0):d&&"LI"==d.nodeName&&b(a.lastChild)?!1:(d=a.previousSibling,d&&"LI"==d.nodeName?(e=v.create(a.parentNode.nodeName),d.appendChild(e),e.appendChild(a),c(a.lastChild,e),!0):!1)))}function p(){var b=j();if(b.length){for(var c=g(w.getRng(!0)),d=0;d0))return f;for(d=a.schema.getNonEmptyElements(),e=new tinymce.dom.TreeWalker(b.startContainer);f=e[c?"next":"prev"]();){if("LI"==f.nodeName&&!f.hasChildNodes())return f;if(d[f.nodeName])return f;if(3==f.nodeType&&f.data.length>0)return f}}function e(a,c){var d,e,f=a.parentNode;if(b(c.lastChild)&&(e=c.lastChild),d=c.lastChild,d&&"BR"==d.nodeName&&a.hasChildNodes()&&v.remove(d),v.isEmpty(c)&&v.$(c).empty(),!v.isEmpty(a))for(;d=a.firstChild;)c.appendChild(d);e&&c.appendChild(e),v.remove(a),v.isEmpty(f)&&v.remove(f)}if(w.isCollapsed()){var f=v.getParent(w.getStart(),"LI");if(f){var i=w.getRng(!0),j=v.getParent(d(i,c),"LI");if(j&&j!=f){var k=g(i);return c?e(j,f):e(f,j),h(k),!0}if(!j&&!c&&s(f.parentNode.nodeName))return!0}}},a.on("BeforeExecCommand",function(b){var c,d=b.command.toLowerCase();return"indent"==d?p()&&(c=!0):"outdent"==d&&q()&&(c=!0),c?(a.fire("ExecCommand",{command:b.command}),b.preventDefault(),!0):void 0}),a.addCommand("InsertUnorderedList",function(){t("UL")}),a.addCommand("InsertOrderedList",function(){t("OL")}),a.addCommand("InsertDefinitionList",function(){t("DL")}),a.addQueryStateHandler("InsertUnorderedList",u("UL")),a.addQueryStateHandler("InsertOrderedList",u("OL")),a.addQueryStateHandler("InsertDefinitionList",u("DL")),a.on("keydown",function(b){9!=b.keyCode||tinymce.util.VK.metaKeyPressed(b)||a.dom.getParent(a.selection.getStart(),"LI,DT,DD")&&(b.preventDefault(),b.shiftKey?q():p())})}),a.addButton("indent",{icon:"indent",title:"Increase indent",cmd:"Indent",onPostRender:function(){var b=this;a.on("nodechange",function(){for(var d=a.selection.getSelectedBlocks(),e=!1,f=0,g=d.length;!e&&g>f;f++){var h=d[f].nodeName;e="LI"==h&&c(d[f])||"UL"==h||"OL"==h||"DD"==h}b.disabled(e)})}}),a.on("keydown",function(a){a.keyCode==tinymce.util.VK.BACKSPACE?f.backspaceDelete()&&a.preventDefault():a.keyCode==tinymce.util.VK.DELETE&&f.backspaceDelete(!0)&&a.preventDefault()})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/media/moxieplayer.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datenbrei/blogless/d1b20b8acfbf1b990503ed11ec4f8a46868f68e7/admin/tinymce/plugins/media/moxieplayer.swf -------------------------------------------------------------------------------- /admin/tinymce/plugins/media/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("media",function(a,b){function c(a){return a=a.toLowerCase(),-1!=a.indexOf(".mp3")?"audio/mpeg":-1!=a.indexOf(".wav")?"audio/wav":-1!=a.indexOf(".mp4")?"video/mp4":-1!=a.indexOf(".webm")?"video/webm":-1!=a.indexOf(".ogg")?"video/ogg":-1!=a.indexOf(".swf")?"application/x-shockwave-flash":""}function d(b){var c=a.settings.media_scripts;if(c)for(var d=0;d=0;e--)b[d]==c[e]&&c.splice(e,1);a.selection.select(c[0]),a.nodeChanged()}})}function f(){var b=a.selection.getNode();return b.getAttribute("data-mce-object")?a.selection.getContent():void 0}function g(e){var f="";if(!e.source1&&(tinymce.extend(e,h(e.embed)),!e.source1))return"";if(e.source2||(e.source2=""),e.poster||(e.poster=""),e.source1=a.convertURL(e.source1,"source"),e.source2=a.convertURL(e.source2,"source"),e.source1mime=c(e.source1),e.source2mime=c(e.source2),e.poster=a.convertURL(e.poster,"poster"),e.flashPlayerUrl=a.convertURL(b+"/moxieplayer.swf","movie"),tinymce.each(l,function(a){var b,c,d;if(b=a.regex.exec(e.source1)){for(d=a.url,c=0;b[c];c++)d=d.replace("$"+c,function(){return b[c]});e.source1=d,e.type=a.type,e.width=e.width||a.w,e.height=e.height||a.h}}),e.embed)f=k(e.embed,e,!0);else{var g=d(e.source1);g&&(e.type="script",e.width=g.width,e.height=g.height),e.width=e.width||300,e.height=e.height||150,tinymce.each(e,function(b,c){e[c]=a.dom.encode(b)}),"iframe"==e.type?f+='':"application/x-shockwave-flash"==e.source1mime?(f+='',e.poster&&(f+=''),f+=""):-1!=e.source1mime.indexOf("audio")?a.settings.audio_template_callback?f=a.settings.audio_template_callback(e):f+='":"script"==e.type?f+='':f=a.settings.video_template_callback?a.settings.video_template_callback(e):'"}return f}function h(a){var b={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(a,c){if(b.source1||"param"!=a||(b.source1=c.map.movie),("iframe"==a||"object"==a||"embed"==a||"video"==a||"audio"==a)&&(b.type||(b.type=a),b=tinymce.extend(c.map,b)),"script"==a){var e=d(c.map.src);if(!e)return;b={type:"script",source1:c.map.src,width:e.width,height:e.height}}"source"==a&&(b.source1?b.source2||(b.source2=c.map.src):b.source1=c.map.src),"img"!=a||b.poster||(b.poster=c.map.src)}}).parse(a),b.source1=b.source1||b.src||b.data,b.source2=b.source2||"",b.poster=b.poster||"",b}function i(b){return b.getAttribute("data-mce-object")?h(a.serializer.serialize(b,{selection:!0})):{}}function j(b){if(a.settings.media_filter_html===!1)return b;var c=new tinymce.html.Writer;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(a){c.comment(a)},cdata:function(a){c.cdata(a)},text:function(a,b){c.text(a,b)},start:function(a,b,d){if("script"!=a&&"noscript"!=a){for(var e=0;e=g&&(d(h,{src:b["source"+g],type:b["source"+g+"mime"]}),!b["source"+g]))return;break;case"img":if(!b.poster)return;e=!0}f.start(a,h,i)},end:function(a){if("video"==a&&c)for(var h=1;2>=h;h++)if(b["source"+h]){var i=[];i.map={},h>g&&(d(i,{src:b["source"+h],type:b["source"+h+"mime"]}),f.start("source",i,!0))}if(b.poster&&"object"==a&&c&&!e){var j=[];j.map={},d(j,{src:b.poster,width:b.width,height:b.height}),f.start("img",j,!0)}f.end(a)}},new tinymce.html.Schema({})).parse(a),f.getContent()}var l=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$1"},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$2"},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc"},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&byline=0"},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"'}],m=tinymce.Env.ie&&tinymce.Env.ie<=8?"onChange":"onInput";a.on("ResolveName",function(a){var b;1==a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)}),a.on("preInit",function(){var b=a.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(a){b[a]=new RegExp("]*>","gi")});var c=a.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){c[a]={}}),a.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(b,c){for(var e,f,g,h,i,j,k,l,m=b.length;m--;)if(f=b[m],f.parent&&("script"!=f.name||(l=d(f.attr("src"))))){for(g=new tinymce.html.Node("img",1),g.shortEnded=!0,l&&(l.width&&f.attr("width",l.width.toString()),l.height&&f.attr("height",l.height.toString())),j=f.attributes,e=j.length;e--;)h=j[e].name,i=j[e].value,"width"!==h&&"height"!==h&&"style"!==h&&(("data"==h||"src"==h)&&(i=a.convertURL(i,h)),g.attr("data-mce-p-"+h,i));k=f.firstChild&&f.firstChild.value,k&&(g.attr("data-mce-html",escape(k)),g.firstChild=null),g.attr({width:f.attr("width")||"300",height:f.attr("height")||("audio"==c?"30":"150"),style:f.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":c,"class":"mce-object mce-object-"+c}),f.replace(g)}}),a.serializer.addAttributeFilter("data-mce-object",function(a,b){for(var c,d,e,f,g,h,i,k=a.length;k--;)if(c=a[k],c.parent){for(i=c.attr(b),d=new tinymce.html.Node(i,1),"audio"!=i&&"script"!=i&&d.attr({width:c.attr("width"),height:c.attr("height")}),d.attr({style:c.attr("style")}),f=c.attributes,e=f.length;e--;){var l=f[e].name;0===l.indexOf("data-mce-p-")&&d.attr(l.substr(11),f[e].value)}"script"==i&&d.attr("type","text/javascript"),g=c.attr("data-mce-html"),g&&(h=new tinymce.html.Node("#text",3),h.raw=!0,h.value=j(unescape(g)),d.append(h)),c.replace(d)}})}),a.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");("audio"==b||"script"==b)&&a.preventDefault()}),a.on("objectResized",function(a){var b,c=a.target;c.getAttribute("data-mce-object")&&(b=c.getAttribute("data-mce-html"),b&&(b=unescape(b),c.setAttribute("data-mce-html",escape(k(b,{width:a.width,height:a.height})))))}),a.addButton("media",{tooltip:"Insert/edit video",onclick:e,stateSelector:["img[data-mce-object=video]","img[data-mce-object=iframe]"]}),a.addMenuItem("media",{icon:"media",text:"Insert/edit video",onclick:e,context:"insert",prependToContext:!0})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/nonbreaking/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("nonbreaking",function(a){var b=a.getParam("nonbreaking_force_tab");if(a.addCommand("mceNonBreaking",function(){a.insertContent(a.plugins.visualchars&&a.plugins.visualchars.state?' ':" "),a.dom.setAttrib(a.dom.select("span.mce-nbsp"),"data-mce-bogus","1")}),a.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),a.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),b){var c=+b>1?+b:3;a.on("keydown",function(b){if(9==b.keyCode){if(b.shiftKey)return;b.preventDefault();for(var d=0;c>d;d++)a.execCommand("mceNonBreaking")}})}}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/noneditable/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("noneditable",function(a){function b(a){var b;if(1===a.nodeType){if(b=a.getAttribute(k),b&&"inherit"!==b)return b;if(b=a.contentEditable,"inherit"!==b)return b}return null}function c(a){for(var c;a;){if(c=b(a))return"false"===c?a:null;a=a.parentNode}}function d(){function d(a){for(;a;){if(a.id===n)return a;a=a.parentNode}}function e(a){var b;if(a)for(b=new i(a,a),a=b.current();a;a=b.next())if(3===a.nodeType)return a}function f(c,d){var e,f;return"false"===b(c)&&k.isBlock(c)?void m.select(c):(f=k.createRng(),"true"===b(c)&&(c.firstChild||c.appendChild(a.getDoc().createTextNode("\xa0")),c=c.firstChild,d=!0),e=k.create("span",{id:n,"data-mce-bogus":!0},o),d?c.parentNode.insertBefore(e,c):k.insertAfter(e,c),f.setStart(e.firstChild,1),f.collapse(!0),m.setRng(f),e)}function g(a){var b,c,d;if(a)b=m.getRng(!0),b.setStartBefore(a),b.setEndBefore(a),c=e(a),c&&c.nodeValue.charAt(0)==o&&(c=c.deleteData(0,1)),k.remove(a,!0),m.setRng(b);else for(;(a=k.get(n))&&a!==d;)c=e(a),c&&c.nodeValue.charAt(0)==o&&(c=c.deleteData(0,1)),k.remove(a,!0),d=a}function h(){function a(a,c){var d,e,f,g,h;if(d=j.startContainer,e=j.startOffset,3==d.nodeType){if(h=d.nodeValue.length,e>0&&h>e||(c?e==h:0===e))return}else{if(!(e0?e-1:e;d=d.childNodes[k],d.hasChildNodes()&&(d=d.firstChild)}for(f=new i(d,a);g=f[c?"prev":"next"]();){if(3===g.nodeType&&g.nodeValue.length>0)return;if("true"===b(g))return g}return a}var d,e,h,j,k;g(),h=m.isCollapsed(),d=c(m.getStart()),e=c(m.getEnd()),(d||e)&&(j=m.getRng(!0),h?(d=d||e,(k=a(d,!0))?f(k,!0):(k=a(d,!1))?f(k,!1):m.select(d)):(j=m.getRng(!0),d&&j.setStartBefore(d),e&&j.setEndAfter(e),m.setRng(j)))}function j(e){function f(a,b){for(;a=a[b?"previousSibling":"nextSibling"];)if(3!==a.nodeType||a.nodeValue.length>0)return a}function j(a,b){m.select(a),m.collapse(b)}function n(e){function f(a){for(var b=j;b;){if(b===a)return;b=b.parentNode}k.remove(a),h()}function g(){var d,g,h=a.schema.getNonEmptyElements();for(g=new tinymce.dom.TreeWalker(j,a.getBody());(d=e?g.prev():g.next())&&!h[d.nodeName.toLowerCase()]&&!(3===d.nodeType&&tinymce.trim(d.nodeValue).length>0);)if("false"===b(d))return f(d),!0;return c(d)?!0:!1}var i,j,l,n;if(m.isCollapsed()){if(i=m.getRng(!0),j=i.startContainer,l=i.startOffset,j=d(j)||j,n=c(j))return f(n),!1;if(3==j.nodeType&&(e?l>0:ls||s>124)&&s!=l.DELETE&&s!=l.BACKSPACE){if((tinymce.isMac?e.metaKey:e.ctrlKey)&&(67==s||88==s||86==s))return;if(e.preventDefault(),u)if(a.dom.isBlock(o)){var w=v?o.previousSibling:o.nextSibling;if(!w||w&&"false"===b(w)){var x=k.create("p",null," ");x.className="mceTmpParagraph";var y=v?o:w;y&&y.parentNode?y.parentNode.insertBefore(x,y):w||v||o.parentNode.appendChild(x),w=x}var z=new i(w,w),A=v?z.prev():z.next();j(A,!v)}else j(o,v)}else if(u||s==l.BACKSPACE||s==l.DELETE){if(p=d(q)){if(s==l.LEFT||s==l.BACKSPACE)if(o=f(p,!0),o&&"false"===b(o)){if(e.preventDefault(),s!=l.LEFT)return void k.remove(o);j(o,!0)}else g(p);if(s==l.RIGHT||s==l.DELETE)if(o=f(p,!0),o&&"false"===b(o)){if(e.preventDefault(),s!=l.RIGHT)return void k.remove(o);j(o,!1)}else g(p)}else{if(u&&t&&-1!==t.className.indexOf("mceTmpParagraph")&&t[v?"previousSibling":"nextSibling"]){var B=t[v?"previousSibling":"nextSibling"];" "===t.innerHTML||""===t.innerHTML||" "===t.innerHTML?k.remove(t):t.className=t.className.replace("mceTmpParagraph",""),j(B,!v)}var C=m.getRng(!0),D=C.endContainer;if(k.isBlock(D)&&k.isBlock(D.nextSibling)&&1==C.endOffset&&s==l.DELETE&&(o=c(D.nextSibling)),o&&(s==l.DELETE||s==l.BACKSPACE)&&k.isBlock(o))return e.preventDefault(),void k.remove(o)}if((s==l.BACKSPACE||s==l.DELETE)&&!n(s==l.BACKSPACE))return e.preventDefault(),!1}}var k=a.dom,m=a.selection,n="mce_noneditablecaret",o="\ufeff";a.on("mousedown",function(c){var d=a.selection.getNode();d&&-1!==d.className.indexOf("mceTmpParagraph")&&d!==c.target&&(" "===d.innerHTML||""===d.innerHTML||" "===d.innerHTML?k.remove(d):d.className=d.className.replace("mceTmpParagraph","")),"false"===b(d)&&d==c.target&&h()}),a.on("mouseup",h),a.on("keydown",j)}function e(b){var c=h.length,d=b.content,e=tinymce.trim(g);if("raw"!=b.format){for(;c--;)d=d.replace(h[c],function(b){var c=arguments,f=c[c.length-2];return f>0&&'"'==d.charAt(f-1)?b:''+a.dom.encode("string"==typeof c[1]?c[1]:c[0])+""});b.content=d}}var f,g,h,i=tinymce.dom.TreeWalker,j="contenteditable",k="data-mce-"+j,l=tinymce.util.VK;f=" "+tinymce.trim(a.getParam("noneditable_editable_class","mceEditable"))+" ",g=" "+tinymce.trim(a.getParam("noneditable_noneditable_class","mceNonEditable"))+" ",h=a.getParam("noneditable_regexp"),h&&!h.length&&(h=[h]),a.on("PreInit",function(){d(),h&&a.on("BeforeSetContent",e),a.parser.addAttributeFilter("class",function(a){for(var b,c,d=a.length;d--;)c=a[d],b=" "+c.attr("class")+" ",-1!==b.indexOf(f)?c.attr(k,"true"):-1!==b.indexOf(g)&&c.attr(k,"false")}),a.serializer.addAttributeFilter(k,function(a){for(var b,c=a.length;c--;)b=a[c],h&&b.attr("data-mce-content")?(b.name="#text",b.type=3,b.raw=!0,b.value=b.attr("data-mce-content")):(b.attr(j,null),b.attr(k,null))}),a.parser.addAttributeFilter(j,function(a){for(var b,c=a.length;c--;)b=a[c],b.attr(k,b.attr(j)),b.attr(j,null)})}),a.on("drop",function(a){c(a.target)&&a.preventDefault()})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/pagebreak/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("pagebreak",function(a){var b="mce-pagebreak",c=a.getParam("pagebreak_separator",""),d=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(a){return"\\"+a}),"gi"),e='';a.addCommand("mcePageBreak",function(){a.insertContent(a.settings.pagebreak_split_block?"

"+e+"

":e)}),a.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),a.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),a.on("ResolveName",function(c){"IMG"==c.target.nodeName&&a.dom.hasClass(c.target,b)&&(c.name="pagebreak")}),a.on("click",function(c){c=c.target,"IMG"===c.nodeName&&a.dom.hasClass(c,b)&&a.selection.select(c)}),a.on("BeforeSetContent",function(a){a.content=a.content.replace(d,e)}),a.on("PreInit",function(){a.serializer.addNodeFilter("img",function(b){for(var d,e,f=b.length;f--;)if(d=b[f],e=d.attr("class"),e&&-1!==e.indexOf("mce-pagebreak")){var g=d.parent;if(a.schema.getBlockElements()[g.name]&&a.settings.pagebreak_split_block){g.type=3,g.value=c,g.raw=!0,d.remove();continue}d.type=3,d.value=c,d.raw=!0}})})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/preview/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("preview",function(a){var b=a.settings,c=!tinymce.Env.ie;a.addCommand("mcePreview",function(){a.windowManager.open({title:"Preview",width:parseInt(a.getParam("plugin_preview_width","650"),10),height:parseInt(a.getParam("plugin_preview_height","500"),10),html:'",buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var d,e="";e+='',tinymce.each(a.contentCSS,function(b){e+=''});var f=b.body_id||"tinymce";-1!=f.indexOf("=")&&(f=a.getParam("body_id","","hash"),f=f[a.id]||f);var g=b.body_class||"";-1!=g.indexOf("=")&&(g=a.getParam("body_class","","hash"),g=g[a.id]||"");var h=a.settings.directionality?' dir="'+a.settings.directionality+'"':"";if(d=""+e+'"+a.getContent()+"",c)this.getEl("body").firstChild.src="data:text/html;charset=utf-8,"+encodeURIComponent(d);else{var i=this.getEl("body").firstChild.contentWindow.document;i.open(),i.write(d),i.close()}}})}),a.addButton("preview",{title:"Preview",cmd:"mcePreview"}),a.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/print/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("print",function(a){a.addCommand("mcePrint",function(){a.getWin().print()}),a.addButton("print",{title:"Print",cmd:"mcePrint"}),a.addShortcut("Meta+P","","mcePrint"),a.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print",shortcut:"Meta+P",context:"file"})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/save/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("save",function(a){function b(){var b;return b=tinymce.DOM.getParent(a.id,"form"),!a.getParam("save_enablewhendirty",!0)||a.isDirty()?(tinymce.triggerSave(),a.getParam("save_onsavecallback")?void(a.execCallback("save_onsavecallback",a)&&(a.startContent=tinymce.trim(a.getContent({format:"raw"})),a.nodeChanged())):void(b?(a.isNotDirty=!0,(!b.onsubmit||b.onsubmit())&&("function"==typeof b.submit?b.submit():a.windowManager.alert("Error: Form submit field collision.")),a.nodeChanged()):a.windowManager.alert("Error: No form element found."))):void 0}function c(){var b=tinymce.trim(a.startContent);return a.getParam("save_oncancelcallback")?void a.execCallback("save_oncancelcallback",a):(a.setContent(b),a.undoManager.clear(),void a.nodeChanged())}function d(){var b=this;a.on("nodeChange",function(){b.disabled(a.getParam("save_enablewhendirty",!0)&&!a.isDirty())})}a.addCommand("mceSave",b),a.addCommand("mceCancel",c),a.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:d}),a.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:d}),a.addShortcut("Meta+S","","mceSave")}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/searchreplace/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){function a(a,b,c,d,e){function f(a,b){if(b=b||0,!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var c=a.index;if(b>0){var d=a[b];if(!d)throw"Invalid capture group";c+=a[0].indexOf(d),a[0]=d}return[c,c+a[0].length,[a[0]]]}function g(a){var b;if(3===a.nodeType)return a.data;if(n[a.nodeName]&&!m[a.nodeName])return"";if(b="",(m[a.nodeName]||o[a.nodeName])&&(b+="\n"),a=a.firstChild)do b+=g(a);while(a=a.nextSibling);return b}function h(a,b,c){var d,e,f,g,h=[],i=0,j=a,k=b.shift(),l=0;a:for(;;){if((m[j.nodeName]||o[j.nodeName])&&i++,3===j.nodeType&&(!e&&j.length+i>=k[1]?(e=j,g=k[1]-i):d&&h.push(j),!d&&j.length+i>k[0]&&(d=j,f=k[0]-i),i+=j.length),d&&e){if(j=c({startNode:d,startNodeIndex:f,endNode:e,endNodeIndex:g,innerNodes:h,match:k[2],matchIndex:l}),i-=e.length-g,d=null,e=null,h=[],k=b.shift(),l++,!k)break}else{if((!n[j.nodeName]||m[j.nodeName])&&j.firstChild){j=j.firstChild;continue}if(j.nextSibling){j=j.nextSibling;continue}}for(;;){if(j.nextSibling){j=j.nextSibling;break}if(j.parentNode===a)break a;j=j.parentNode}}}function i(a){var b;if("function"!=typeof a){var c=a.nodeType?a:l.createElement(a);b=function(a,b){var d=c.cloneNode(!1);return d.setAttribute("data-mce-index",b),a&&d.appendChild(l.createTextNode(a)),d}}else b=a;return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex;if(f===g){var i=f;e=i.parentNode,a.startNodeIndex>0&&(c=l.createTextNode(i.data.substring(0,a.startNodeIndex)),e.insertBefore(c,i));var j=b(a.match[0],h);return e.insertBefore(j,i),a.endNodeIndexn;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),m.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(k,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}var j,k,l,m,n,o,p=[],q=0;if(l=b.ownerDocument,m=e.getBlockElements(),n=e.getWhiteSpaceElements(),o=e.getShortEndedElements(),k=g(b)){if(a.global)for(;j=a.exec(k);)p.push(f(j,d));else j=k.match(a),p.push(f(j,d));return p.length&&(q=p.length,h(b,p,i(c))),q}}function b(b){function c(){function a(){e.statusbar.find("#next").disabled(!g(k+1).length),e.statusbar.find("#prev").disabled(!g(k-1).length)}function c(){tinymce.ui.MessageBox.alert("Could not find the specified string.",function(){e.find("#find")[0].focus()})}var d={},e=tinymce.ui.Factory.create({type:"window",layout:"flex",pack:"center",align:"center",onClose:function(){b.focus(),j.done()},onSubmit:function(b){var f,h,i,l;return b.preventDefault(),h=e.find("#case").checked(),l=e.find("#words").checked(),i=e.find("#find").value(),i.length?d.text==i&&d.caseState==h&&d.wholeWord==l?0===g(k+1).length?void c():(j.next(),void a()):(f=j.find(i,h,l),f||c(),e.statusbar.items().slice(1).disabled(0===f),a(),void(d={text:i,caseState:h,wholeWord:l})):(j.done(!1),void e.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){e.submit()}},{text:"Replace",disabled:!0,onclick:function(){j.replace(e.find("#replace").value())||(e.statusbar.items().slice(1).disabled(!0),k=-1,d={})}},{text:"Replace all",disabled:!0,onclick:function(){j.replace(e.find("#replace").value(),!0,!0),e.statusbar.items().slice(1).disabled(!0),d={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){j.prev(),a()}},{text:"Next",name:"next",disabled:!0,onclick:function(){j.next(),a()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:b.selection.getNode().src},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}}).renderTo().reflow()}function d(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function e(c){var d,e;return e=b.dom.create("span",{"data-mce-bogus":1}),e.className="mce-match-marker",d=b.getBody(),j.done(!1),a(c,d,e,!1,b.schema)}function f(a){var b=a.parentNode;a.firstChild&&b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)}function g(a){var c,e=[];if(c=tinymce.toArray(b.getBody().getElementsByTagName("span")),c.length)for(var f=0;fk&&l[h].setAttribute("data-mce-index",o-1)}return b.undoManager.add(),k=q,c?(p=g(q+1).length>0,j.next()):(p=g(q-1).length>0,j.prev()),!e&&p},j.done=function(a){var c,e,g,h;for(e=tinymce.toArray(b.getBody().getElementsByTagName("span")),c=0;c=h.end?(e=k,g=h.end-j):d&&i.push(k),!d&&k.length+j>h.start&&(d=k,f=h.start-j),j+=k.length),d&&e){if(k=c({startNode:d,startNodeIndex:f,endNode:e,endNodeIndex:g,innerNodes:i,match:h.text,matchIndex:l}),j-=e.length-g,d=null,e=null,i=[],h=b.shift(),l++,!h)break}else{if((!x[k.nodeName]||w[k.nodeName])&&k.firstChild){k=k.firstChild;continue}if(k.nextSibling){k=k.nextSibling;continue}}for(;;){if(k.nextSibling){k=k.nextSibling;break}if(k.parentNode===a)break a;k=k.parentNode}}}function f(a){function b(b,c){var d=z[c];d.stencil||(d.stencil=a(d));var e=d.stencil.cloneNode(!1);return e.setAttribute("data-mce-index",c),b&&e.appendChild(A.doc.createTextNode(b)),e}return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex,i=A.doc;if(f===g){var j=f;e=j.parentNode,a.startNodeIndex>0&&(c=i.createTextNode(j.data.substring(0,a.startNodeIndex)),e.insertBefore(c,j));var k=b(a.match,h);return e.insertBefore(k,j),a.endNodeIndexn;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),m.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(l,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}function g(a){var b=a.parentNode;b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)}function h(b){var c=a.getElementsByTagName("*"),d=[];b="number"==typeof b?""+b:null;for(var e=0;eb&&a(z[b],b)!==!1;b++);return this}function l(b){return z.length&&e(a,z,f(b)),this}function m(a,b){if(v&&a.global)for(;u=a.exec(v);)z.push(c(u,b));return this}function n(a){var b,c=h(a?i(a):null);for(b=c.length;b--;)g(c[b]);return this}function o(a){return z[a.getAttribute("data-mce-index")]}function p(a){return h(i(a))[0]}function q(a,b,c){return z.push({start:a,end:a+b,text:v.substr(a,b),data:c}),this}function r(a){var c=h(i(a)),d=b.dom.createRng();return d.setStartBefore(c[0]),d.setEndAfter(c[c.length-1]),d}function s(a,c){var d=r(a);return d.deleteContents(),c.length>0&&d.insertNode(b.dom.doc.createTextNode(c)),d}function t(){return z.splice(0,z.length),n(),this}var u,v,w,x,y,z=[],A=b.dom;return w=b.schema.getBlockElements(),x=b.schema.getWhiteSpaceElements(),y=b.schema.getShortEndedElements(),v=d(a),{text:v,matches:z,each:k,filter:j,reset:t,matchFromElement:o,elementFromMatch:p,find:m,add:q,wrap:l,unwrap:n,replace:s,rangeFromMatch:r,indexOf:i}}}),d("tinymce/spellcheckerplugin/Plugin",["tinymce/spellcheckerplugin/DomTextMatcher","tinymce/PluginManager","tinymce/util/Tools","tinymce/ui/Menu","tinymce/dom/DOMUtils","tinymce/util/XHR","tinymce/util/URI","tinymce/util/JSON"],function(a,b,c,d,e,f,g,h){b.add("spellchecker",function(b,i){function j(){return E.textMatcher||(E.textMatcher=new a(b.getBody(),b)),E.textMatcher}function k(a,b){var d=[];return c.each(b,function(a){d.push({selectable:!0,text:a.name,data:a.value})}),d}function l(a){for(var b in a)return!1;return!0}function m(a,f){var g=[],h=A[a];c.each(h,function(a){g.push({text:a,onclick:function(){b.insertContent(b.dom.encode(a)),b.dom.remove(f),r()}})}),g.push({text:"-"}),D&&g.push({text:"Add to Dictionary",onclick:function(){s(a,f)}}),g.push.apply(g,[{text:"Ignore",onclick:function(){t(a,f)}},{text:"Ignore all",onclick:function(){t(a,f,!0)}}]),C=new d({items:g,context:"contextmenu",onautohide:function(a){-1!=a.target.className.indexOf("spellchecker")&&a.preventDefault()},onhide:function(){C.remove(),C=null}}),C.renderTo(document.body);var i=e.DOM.getPos(b.getContentAreaContainer()),j=b.dom.getPos(f[0]),k=b.dom.getRoot();"BODY"==k.nodeName?(j.x-=k.ownerDocument.documentElement.scrollLeft||k.scrollLeft,j.y-=k.ownerDocument.documentElement.scrollTop||k.scrollTop):(j.x-=k.scrollLeft,j.y-=k.scrollTop),i.x+=j.x,i.y+=j.y,C.moveTo(i.x,i.y+f[0].offsetHeight)}function n(){return b.getParam("spellchecker_wordchar_pattern")||new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g")}function o(a,b,d,e){var j={method:a},k="";"spellcheck"==a&&(j.text=b,j.lang=F.spellchecker_language),"addToDictionary"==a&&(j.word=b),c.each(j,function(a,b){k&&(k+="&"),k+=b+"="+encodeURIComponent(a)}),f.send({url:new g(i).toAbsolute(F.spellchecker_rpc_url),type:"post",content_type:"application/x-www-form-urlencoded",data:k,success:function(a){a=h.parse(a),a?a.error?e(a.error):d(a):e("Sever response wasn't proper JSON.")},error:function(a,b){e("Spellchecker request error: "+b.status)}})}function p(a,b,c,d){var e=F.spellchecker_callback||o;e.call(E,a,b,c,d)}function q(){function a(a){b.windowManager.alert(a),b.setProgressState(!1),u()}return B?void u():(u(),b.setProgressState(!0),p("spellcheck",j().text,y,a),void b.focus())}function r(){b.dom.select("span.mce-spellchecker-word").length||u()}function s(a,c){b.setProgressState(!0),p("addToDictionary",a,function(){b.setProgressState(!1),b.dom.remove(c,!0),r()},function(a){b.windowManager.alert(a),b.setProgressState(!1)})}function t(a,d,e){b.selection.collapse(),e?c.each(b.dom.select("span.mce-spellchecker-word"),function(c){c.getAttribute("data-mce-word")==a&&b.dom.remove(c,!0)}):b.dom.remove(d,!0),r()}function u(){j().reset(),E.textMatcher=null,B&&(B=!1,b.fire("SpellcheckEnd"))}function v(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function w(a){var d,e=[];if(d=c.toArray(b.getBody().getElementsByTagName("span")),d.length)for(var f=0;f0){var e=b.dom.createRng();e.setStartBefore(d[0]),e.setEndAfter(d[d.length-1]),b.selection.setRng(e),m(c.getAttribute("data-mce-word"),d)}}}),b.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:q,selectable:!0,onPostRender:function(){var a=this;a.active(B),b.on("SpellcheckStart SpellcheckEnd",function(){a.active(B)})}});var H={tooltip:"Spellcheck",onclick:q,onPostRender:function(){var a=this;b.on("SpellcheckStart SpellcheckEnd",function(){a.active(B)})}};z.length>1&&(H.type="splitbutton",H.menu=z,H.onshow=x,H.onselect=function(a){F.spellchecker_language=a.control.settings.data}),b.addButton("spellchecker",H),b.addCommand("mceSpellCheck",q),b.on("remove",function(){C&&(C.remove(),C=null)}),b.on("change",r),this.getTextMatcher=j,this.getWordCharPattern=n,this.markErrors=y,this.getLanguage=function(){return F.spellchecker_language},F.spellchecker_language=F.spellchecker_language||F.language||"en"})}),f(["tinymce/spellcheckerplugin/DomTextMatcher"])}(this); -------------------------------------------------------------------------------- /admin/tinymce/plugins/tabfocus/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("tabfocus",function(a){function b(a){9!==a.keyCode||a.ctrlKey||a.altKey||a.metaKey||a.preventDefault()}function c(b){function c(c){function f(a){return"BODY"===a.nodeName||"hidden"!=a.type&&"none"!=a.style.display&&"hidden"!=a.style.visibility&&f(a.parentNode)}function i(a){return/INPUT|TEXTAREA|BUTTON/.test(a.tagName)&&tinymce.get(b.id)&&-1!=a.tabIndex&&f(a)}if(h=d.select(":input:enabled,*[tabindex]:not(iframe)"),e(h,function(b,c){return b.id==a.id?(g=c,!1):void 0}),c>0){for(j=g+1;j=0;j--)if(i(h[j]))return h[j];return null}var g,h,i,j;if(!(9!==b.keyCode||b.ctrlKey||b.altKey||b.metaKey||b.isDefaultPrevented())&&(i=f(a.getParam("tab_focus",a.getParam("tabfocus_elements",":prev,:next"))),1==i.length&&(i[1]=i[0],i[0]=":prev"),h=b.shiftKey?":prev"==i[0]?c(-1):d.get(i[0]):":next"==i[1]?c(1):d.get(i[1]))){var k=tinymce.get(h.id||h.name);h.id&&k?k.focus():window.setTimeout(function(){tinymce.Env.webkit||window.focus(),h.focus()},10),b.preventDefault()}}var d=tinymce.DOM,e=tinymce.each,f=tinymce.explode;a.on("init",function(){a.inline&&tinymce.DOM.setAttrib(a.getBody(),"tabIndex",null),a.on("keyup",b),tinymce.Env.gecko?a.on("keypress keydown",c):a.on("keydown",c)})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/template/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("template",function(a){function b(b){return function(){var c=a.settings.templates;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):b(c)}}function c(b){function c(b){function c(b){if(-1==b.indexOf("")){var c="";tinymce.each(a.contentCSS,function(b){c+=''}),b=""+c+""+b+""}b=f(b,"template_preview_replace_values");var e=d.find("iframe")[0].getEl().contentWindow.document;e.open(),e.write(b),e.close()}var g=b.control.value();g.url?tinymce.util.XHR.send({url:g.url,success:function(a){e=a,c(e)}}):(e=g.content,c(e)),d.find("#description")[0].text(b.control.value().description)}var d,e,h=[];return b&&0!==b.length?(tinymce.each(b,function(a){h.push({selected:!h.length,text:a.title,value:{url:a.url,content:a.content,description:a.description}})}),d=a.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:h,onselect:c}}]},{type:"label",name:"description",label:"Description",text:"\xa0"},{type:"iframe",flex:1,border:1}],onsubmit:function(){g(!1,e)},width:a.getParam("template_popup_width",600),height:a.getParam("template_popup_height",500)}),void d.find("listbox")[0].fire("select")):void a.windowManager.alert("No templates defined")}function d(b,c){function d(a,b){if(a=""+a,a.length0&&(i=k.create("div",null),i.appendChild(j[0].cloneNode(!0))),h(k.select("*",i),function(b){g(b,a.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_cdate_format",a.getLang("template.cdate_format")))),g(b,a.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_mdate_format",a.getLang("template.mdate_format")))),g(b,a.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(b.innerHTML=l)}),e(i),a.execCommand("mceInsertContent",!1,i.innerHTML),a.addVisual()}var h=tinymce.each;a.addCommand("mceInsertTemplate",g),a.addButton("template",{title:"Insert template",onclick:b(c)}),a.addMenuItem("template",{text:"Insert template",onclick:b(c),context:"insert"}),a.on("PreProcess",function(b){var c=a.dom;h(c.select("div",b.node),function(b){c.hasClass(b,"mceTmpl")&&(h(c.select("*",b),function(b){c.hasClass(b,a.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_mdate_format",a.getLang("template.mdate_format"))))}),e(b))})})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/textcolor/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("textcolor",function(a){function b(b){var c;return a.dom.getParents(a.selection.getStart(),function(a){var d;(d=a.style["forecolor"==b?"color":"background-color"])&&(c=d)}),c}function c(){var b,c,d=[];for(c=a.settings.textcolor_map||["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],b=0;b
'+(c?"×":"")+"
"}var d,e,f,g,h,k,l,m=this,n=m._id,o=0;for(d=c(),d.push({text:tinymce.translate("No color"),color:"transparent"}),f='',g=d.length-1,k=0;j>k;k++){for(f+="",h=0;i>h;h++)l=k*i+h,l>g?f+="":(e=d[l],f+=b(e.color,e.text));f+=""}if(a.settings.color_picker_callback){for(f+='",f+="",h=0;i>h;h++)f+=b("","Custom color");f+=""}return f+="
"}function e(b,c){a.undoManager.transact(function(){a.focus(),a.formatter.apply(b,{value:c}),a.nodeChanged()})}function f(b){a.undoManager.transact(function(){a.focus(),a.formatter.remove(b,{value:null},null,!0),a.nodeChanged()})}function g(c){function d(a){k.hidePanel(),k.color(a),e(k.settings.format,a)}function g(){k.hidePanel(),k.resetColor(),f(k.settings.format)}function h(a,b){a.style.background=b,a.setAttribute("data-mce-color",b)}var j,k=this.parent();tinymce.DOM.getParent(c.target,".mce-custom-color-btn")&&(k.hidePanel(),a.settings.color_picker_callback.call(a,function(a){var b,c,e,f=k.panel.getEl().getElementsByTagName("table")[0];for(b=tinymce.map(f.rows[f.rows.length-1].childNodes,function(a){return a.firstChild}),e=0;ee;e++)h(b[e],b[e+1].getAttribute("data-mce-color"));h(c,a),d(a)},b(k.settings.format))),j=c.target.getAttribute("data-mce-color"),j?(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),c.target.setAttribute("aria-selected",!0),this.lastId=c.target.id,"transparent"==j?g():d(j)):null!==j&&k.hidePanel()}function h(){var a=this;a._color?e(a.settings.format,a._color):f(a.settings.format)}var i,j;j=a.settings.textcolor_rows||5,i=a.settings.textcolor_cols||8,a.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{role:"application",ariaRemember:!0,html:d,onclick:g},onclick:h}),a.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{role:"application",ariaRemember:!0,html:d,onclick:g},onclick:h})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/textpattern/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("textpattern",function(a){function b(){return j&&(i.sort(function(a,b){return a.start.length>b.start.length?-1:a.start.length'+a+"
"}function f(){var a,b="";for(a in n)b+=a;return new RegExp("["+b+"]","g")}function g(){var a,b="";for(a in n)b&&(b+=","),b+="span.mce-"+n[a];return b}var h,i,j,k,l,m,n,o,p=a.getBody(),q=a.selection;if(n={"\xa0":"nbsp","\xad":"shy"},d=!d,e.state=d,a.fire("VisualChars",{state:d}),o=f(),b&&(m=q.getBookmark()),d)for(i=[],tinymce.walk(p,function(a){3==a.nodeType&&a.nodeValue&&o.test(a.nodeValue)&&i.push(a)},"childNodes"),j=0;j=0;j--)a.dom.remove(i[j],1);q.moveToBookmark(m)}function c(){var b=this;a.on("VisualChars",function(a){b.active(a.state)})}var d,e=this;a.addCommand("mceVisualChars",b),a.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars",onPostRender:c}),a.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:c,selectable:!0,context:"view",prependToContext:!0}),a.on("beforegetcontent",function(a){d&&"raw"!=a.format&&!a.draft&&(d=!0,b(!1))})}); -------------------------------------------------------------------------------- /admin/tinymce/plugins/wordcount/plugin.min.js: -------------------------------------------------------------------------------- 1 | tinymce.PluginManager.add("wordcount",function(a){function b(){a.theme.panel.find("#wordcount").text(["Words: {0}",e.getCount()])}var c,d,e=this;c=a.getParam("wordcount_countregex",/[\w\u2019\x27\-\u00C0-\u1FFF]+/g),d=a.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g),a.on("init",function(){var c=a.theme.panel&&a.theme.panel.find("#statusbar")[0];c&&window.setTimeout(function(){c.insert({type:"label",name:"wordcount",text:["Words: {0}",e.getCount()],classes:"wordcount",disabled:a.settings.readonly},0),a.on("setcontent beforeaddundo",b),a.on("keyup",function(a){32==a.keyCode&&b()})},0)}),e.getCount=function(){var b=a.getContent({format:"raw"}),e=0;if(b){b=b.replace(/\.\.\./g," "),b=b.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," "),b=b.replace(/(\w+)(&#?[a-z0-9]+;)+(\w+)/i,"$1$3").replace(/&.+?;/g," "),b=b.replace(d,"");var f=b.match(c);f&&(e=f.length)}return e}}); -------------------------------------------------------------------------------- /admin/tinymce/skins/lightgray/content.inline.min.css: -------------------------------------------------------------------------------- 1 | .mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-spellchecker-word{border-bottom:2px solid red;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid green;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333} -------------------------------------------------------------------------------- /admin/tinymce/skins/lightgray/content.min.css: -------------------------------------------------------------------------------- 1 | body{background-color:#FFF;color:#000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-spellchecker-word{border-bottom:2px solid red;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid green;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333} -------------------------------------------------------------------------------- /admin/tinymce/skins/lightgray/fonts/tinymce-small.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datenbrei/blogless/d1b20b8acfbf1b990503ed11ec4f8a46868f68e7/admin/tinymce/skins/lightgray/fonts/tinymce-small.eot -------------------------------------------------------------------------------- /admin/tinymce/skins/lightgray/fonts/tinymce-small.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datenbrei/blogless/d1b20b8acfbf1b990503ed11ec4f8a46868f68e7/admin/tinymce/skins/lightgray/fonts/tinymce-small.ttf -------------------------------------------------------------------------------- /admin/tinymce/skins/lightgray/fonts/tinymce-small.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datenbrei/blogless/d1b20b8acfbf1b990503ed11ec4f8a46868f68e7/admin/tinymce/skins/lightgray/fonts/tinymce-small.woff -------------------------------------------------------------------------------- /admin/tinymce/skins/lightgray/fonts/tinymce.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datenbrei/blogless/d1b20b8acfbf1b990503ed11ec4f8a46868f68e7/admin/tinymce/skins/lightgray/fonts/tinymce.eot -------------------------------------------------------------------------------- /admin/tinymce/skins/lightgray/fonts/tinymce.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datenbrei/blogless/d1b20b8acfbf1b990503ed11ec4f8a46868f68e7/admin/tinymce/skins/lightgray/fonts/tinymce.ttf -------------------------------------------------------------------------------- /admin/tinymce/skins/lightgray/fonts/tinymce.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datenbrei/blogless/d1b20b8acfbf1b990503ed11ec4f8a46868f68e7/admin/tinymce/skins/lightgray/fonts/tinymce.woff -------------------------------------------------------------------------------- /admin/tinymce/skins/lightgray/img/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datenbrei/blogless/d1b20b8acfbf1b990503ed11ec4f8a46868f68e7/admin/tinymce/skins/lightgray/img/anchor.gif -------------------------------------------------------------------------------- /admin/tinymce/skins/lightgray/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datenbrei/blogless/d1b20b8acfbf1b990503ed11ec4f8a46868f68e7/admin/tinymce/skins/lightgray/img/loader.gif -------------------------------------------------------------------------------- /admin/tinymce/skins/lightgray/img/object.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datenbrei/blogless/d1b20b8acfbf1b990503ed11ec4f8a46868f68e7/admin/tinymce/skins/lightgray/img/object.gif -------------------------------------------------------------------------------- /admin/tinymce/skins/lightgray/img/trans.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datenbrei/blogless/d1b20b8acfbf1b990503ed11ec4f8a46868f68e7/admin/tinymce/skins/lightgray/img/trans.gif -------------------------------------------------------------------------------- /admin/tinymce/themes/modern/theme.min.js: -------------------------------------------------------------------------------- 1 | tinymce.ThemeManager.add("modern",function(a){function b(b){var c,d=[];if(b)return n(b.split(/[ ,]/),function(b){function e(){var c=a.selection;"bullist"==f&&c.selectorChanged("ul > li",function(a,c){for(var d,e=c.parents.length;e--&&(d=c.parents[e].nodeName,"OL"!=d&&"UL"!=d););b.active(a&&"UL"==d)}),"numlist"==f&&c.selectorChanged("ol > li",function(a,c){for(var d,e=c.parents.length;e--&&(d=c.parents[e].nodeName,"OL"!=d&&"UL"!=d););b.active(a&&"OL"==d)}),b.settings.stateSelector&&c.selectorChanged(b.settings.stateSelector,function(a){b.active(a)},!0),b.settings.disabledStateSelector&&c.selectorChanged(b.settings.disabledStateSelector,function(a){b.disabled(a)})}var f;"|"==b?c=null:m.has(b)?(b={type:b},l.toolbar_items_size&&(b.size=l.toolbar_items_size),d.push(b),c=null):(c||(c={type:"buttongroup",items:[]},d.push(c)),a.buttons[b]&&(f=b,b=a.buttons[f],"function"==typeof b&&(b=b()),b.type=b.type||"button",l.toolbar_items_size&&(b.size=l.toolbar_items_size),b=m.create(b),c.items.push(b),a.initialized?e():a.on("init",e)))}),{type:"toolbar",layout:"flow",items:d}}function c(){function a(a){return a?(c.push(b(a)),!0):void 0}var c=[];if(tinymce.isArray(l.toolbar)){if(0===l.toolbar.length)return;tinymce.each(l.toolbar,function(a,b){l["toolbar"+(b+1)]=a}),delete l.toolbar}for(var d=1;10>d&&a(l["toolbar"+d]);d++);return c.length||l.toolbar===!1||a(l.toolbar||r),c.length?{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:c}:void 0}function d(){function b(b){var c;return"|"==b?{text:"|"}:c=a.menuItems[b]}function c(c){var d,e,f,g,h;if(h=tinymce.makeMap((l.removed_menuitems||"").split(/[ ,]/)),l.menu?(e=l.menu[c],g=!0):e=q[c],e){d={text:e.title},f=[],n((e.items||"").split(/[ ,]/),function(a){var c=b(a);c&&!h[a]&&f.push(b(a))}),g||n(a.menuItems,function(a){a.context==c&&("before"==a.separator&&f.push({text:"|"}),a.prependToContext?f.unshift(a):f.push(a),"after"==a.separator&&f.push({text:"|"}))});for(var i=0;i=0;d--)for(e=g.length-1;e>=0;e--)if(g[e].predicate(f[d]))return{toolbar:g[e],element:f[d]};return null}var l;a.on("click keyup blur",function(){window.setTimeout(function(){var b;a.removed||(b=k(a.selection.getNode()),b?i(b):j())},0)}),a.on("ObjectResizeStart",function(){var b=k(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.hide()}),a.on("nodeChange ResizeEditor ResizeWindow",g),a.on("remove",function(){tinymce.each(c(),function(a){a.panel&&a.panel.remove()}),a.contextToolbars={}})}function i(b){function f(){if(n&&n.moveRel&&n.visible()&&!n._fixed){var b=a.selection.getScrollContainer(),c=a.getBody(),d=0,e=0;if(b){var f=o.getPos(c),g=o.getPos(b);d=Math.max(0,g.x-f.x),e=Math.max(0,g.y-f.y)}n.fixed(!1).moveRel(c,a.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(d,e)}}function g(){n&&(n.show(),f(),o.addClass(a.getBody(),"mce-edit-focus"))}function i(){n&&(n.hide(),n.hideAll&&n.hideAll(),o.removeClass(a.getBody(),"mce-edit-focus"))}function j(){return n?void(n.visible()||g()):(n=k.panel=m.create({type:p?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!!p,border:1,items:[l.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c()]}),a.fire("BeforeRenderUI"),n.renderTo(p||document.body).reflow(),e(n),g(),h(),a.on("nodeChange",f),a.on("activate",g),a.on("deactivate",i),void a.nodeChanged())}var n,p;return l.fixed_toolbar_container&&(p=o.select(l.fixed_toolbar_container)[0]),l.content_editable=!0,a.on("focus",function(){b.skinUiCss?tinymce.DOM.styleSheetLoader.load(b.skinUiCss,j,j):j()}),a.on("blur hide",i),a.on("remove",function(){n&&(n.remove(),n=null)}),b.skinUiCss&&tinymce.DOM.styleSheetLoader.load(b.skinUiCss),{}}function j(b){var g,i,j;return b.skinUiCss&&tinymce.DOM.loadCSS(b.skinUiCss),g=k.panel=m.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[l.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c(),{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",html:"",border:"1 0 0 0"}]}),l.resize!==!1&&(i={type:"resizehandle",direction:l.resize,onResizeStart:function(){var b=a.getContentAreaContainer().firstChild;j={width:b.clientWidth,height:b.clientHeight}},onResize:function(a){"both"==l.resize?f(j.width+a.deltaX,j.height+a.deltaY):f(null,j.height+a.deltaY)}}),l.statusbar!==!1&&g.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath"},i]}),l.readonly&&g.find("*").disabled(!0),a.fire("BeforeRenderUI"),g.renderBefore(b.targetNode).reflow(),l.width&&tinymce.DOM.setStyle(g.getEl(),"width",l.width),a.on("remove",function(){g.remove(),g=null}),e(g),h(),{iframeContainer:g.find("#iframe")[0].getEl(),editorContainer:g.getEl()}}var k=this,l=a.settings,m=tinymce.ui.Factory,n=tinymce.each,o=tinymce.DOM,p=tinymce.ui.Rect,q={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},r="undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image";k.renderUI=function(b){var c=l.skin!==!1?l.skin||"lightgray":!1;if(c){var d=l.skin_url;d=d?a.documentBaseURI.toAbsolute(d):tinymce.baseURL+"/skins/"+c,b.skinUiCss=tinymce.Env.documentMode<=7?d+"/skin.ie7.min.css":d+"/skin.min.css",a.contentCSS.push(d+"/content"+(a.inline?".inline":"")+".min.css")}return a.on("ProgressState",function(a){k.throbber=k.throbber||new tinymce.ui.Throbber(k.panel.getEl("body")),a.state?k.throbber.show(a.time):k.throbber.hide()}),l.inline?i(b):j(b)},k.resizeTo=f,k.resizeBy=g}); -------------------------------------------------------------------------------- /admin/upload.php: -------------------------------------------------------------------------------- 1 | 6 | Project: http://blogless.datenbrei.de 7 | License: http://blogless.datenbrei.de/license/ 8 | */ 9 | 10 | require_once('config.php'); 11 | require('auth.php'); 12 | 13 | if ($_SERVER["REQUEST_METHOD"] == "POST") { 14 | $name = (isset($_POST['name']) && $_POST['name'] != '') ? strtolower($_POST['name']) : null; 15 | if ($name) { 16 | $dir = $config["basedir"] . DIRECTORY_SEPARATOR . $name . '/'; 17 | header('Location: edit.php?article=' . urlencode($name)); 18 | } 19 | else { 20 | $dir = $config["basedir"] . DIRECTORY_SEPARATOR; 21 | header('Location: edit.php'); 22 | } 23 | @mkdir ($dir); 24 | $path = $dir . basename($_FILES["upload"]["name"]); 25 | move_uploaded_file($_FILES["upload"]["tmp_name"], $path); 26 | } 27 | ?> -------------------------------------------------------------------------------- /articles/.htaccess: -------------------------------------------------------------------------------- 1 | ErrorDocument 404 /404/index.html -------------------------------------------------------------------------------- /articles/404/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Article not found 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
28 | Blogless 29 |
30 |

Article not found

31 |
— 32 | 33 | 34 |
35 |
36 |
37 |

This article does not exist on this site, sorry!

38 |
39 |
40 |
41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /articles/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datenbrei/blogless/d1b20b8acfbf1b990503ed11ec4f8a46868f68e7/articles/favicon.ico -------------------------------------------------------------------------------- /articles/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Blogless - Just Writing 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 |
30 |

Blogless - Just Writing

31 |
— 32 | 33 | 34 |
35 |
36 |
37 |
38 |

Installation

39 |

For using Blogless just upload the zip's content to your PHP enabled webspace. That's it.

40 |

Using Blogless

41 |

Go to your webbrowser and call http://your.domain.xx/admin/

42 |

After passing the initial platform check, you will have to set an initial password to secure your website. If you forget it or want to change it later, just delete password.php. It will be generated from skretch next time when using Blogless.

43 |

Basic Settings

44 |

Then you are asked to make some basic settings. The paths für your directory structure and URL are guessed automatically and you should give your site at least a name. Some other settings or changes to them can be done later.

45 |

Attention: Blogless is delivered with a .htaccess file in the main directory, so that you do not need to address your webpages in the subdirectory "articles/", but can call them from the root directly (except for the admin subdir with the application files). But if you change the name of your "articles/" directory, you must adapt the .htaccess file accordingly!!!

46 |

Articles

47 |

Now you are ready to write and manage your articles:

48 |
    49 |
  1. If not yet done Login with your initially set username and password
  2. 50 |
  3. First press Settings to set some article Defaults and decide if you would like to generate an RSS feed, a sitemap.xml (good for Google) and if you would like to show a list of articles at the bottom of your sites homepage
  4. 51 |
  5. Press New Article to write a new article
  6. 52 |
  7. Press 🔧 (Edit) to edit an article or change this website's homepage index.html
  8. 53 |
  9. Press 🔎 (View) to read an article or your website's homepage
  10. 54 |
  11. Press ✖ (Delete) to delete an article
  12. 55 |
  13. Logout
  14. 56 |
57 |

Default Settings

58 |

It is best to first go to the settings page and provide some defaults for your articles, like the default author for new articles, his web profile and some other settings. You can always make individual settings for each article later, for example for guest articles. If the twitter id is set, your articles will appear as a nice "Twitter Cards" (of type summary), if referenced in a tweet.

59 |

Also check, if the automatically guessed base url is right (it should be - you could change it to the real site's url, if you are generating your articles offline and load them up).

60 |

Options

61 |

Now decide, if you want to have certain functionalities switched on:

62 |
    63 |
  • Sitemap - this gives Google and other web crawlers the chance to get an overview of your site. It is good to switch it on, if you would like to get every article you did write found by Google or other search engines.
  • 64 |
  • RSS Feed - Switch this on if you want to provide a feed for your website. Well, you would make a blog from blogless.
  • 65 |
  • Article List - At the bottom of your website's index page there will be a list of all articles written ever.
  • 66 |
  • Pingback - If you switch this on, when saving a newly written article Blogless will inform every other referenced blog, so that automatically comment links will be added for their articles. This means, that you will honor the original authors referenced by you and also, that possibly links to your article will be generated on their side.
  • 67 |
68 |

Write a new Article

69 |

Per default the article name is the actual date in ISO format (YYYY-MM-DD). Keep it, if you like to just write one article a day or less. For me it works pretty well. In the end you are completely free to name your articles how you like. Try to better use just ASCII characters and dashes. It will work with any unicode character, but the url may look a bit crazy in this case, hard to remember.

70 |

If you edit the sites index.html file there will be no possibillity to change the filename, it's just index.html, the homepage of your site.

71 |

Beware: Before uploading images or attach files to an article, it first needs to be saved the first time.

72 |
73 |
74 |
75 |
76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /articles/license/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | License 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |
28 | Blogless 29 |
30 |

License

31 | — 32 | 33 | 34 |
35 |
36 |
37 |

Blogless

38 |

Blogless is licensed under the following conditions:

39 |

Copyright 2015, Martin Döring

40 |

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

41 |

Tinymce

42 |

Tinymce is distributed with Blogless and is licensed under the LGPL.

43 |
44 |
45 |
46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /articles/sitemap.css: -------------------------------------------------------------------------------- 1 | * {display:block;} 2 | :root {font-family: Arial, Helvetica, sans-serif;background-color:#FFF;} 3 | urlset:before {content: "Sitemap"; color:black; font-weight:bold; font-size:xx-large; line-height:120%; text-align:center; } 4 | urlset {height:100%;max-width:200mm; margin:0px auto; padding:30px 10px; min-height:100%;} 5 | url {} 6 | loc {display:inline;color:black;} 7 | lastmod, changefreq, priority {display:none;} -------------------------------------------------------------------------------- /articles/stylesheet.css: -------------------------------------------------------------------------------- 1 | @media print { 2 | article { border-bottom:1px solid #404040; border-top:1px solid #404040; } 3 | } 4 | 5 | /* css reset for used elements*/ 6 | html, body, main, header, details, nav, section, address, footer, div, span, h1, h2, p, blockquote, pre, img, a, form, time, textarea, input, b, u, i, center, dl, dt, dd, ol, ul, li { 7 | margin:0; padding:0; border:0; font:inherit; vertical-align:baseline; box-sizing: border-box; 8 | } 9 | 10 | html { background-color:#FFF; height:100%; } 11 | body { font-size:120%; font-family:Helvetica,Arial,sans-serif; max-width:200mm; margin:0px auto; padding: 0px 10px 30px; min-height:100%; line-height:1.5; } 12 | body nav { padding: 10px 0px 5px ; margin-top:1.5em; margin-bottom:0.5em;} 13 | body nav a { color:#0080C0; text-decoration:none; font-variant:small-caps; font-weight:bold; font-size:large; line-height:120%; } 14 | body header a { text-decoration:none; font-variant:small-caps; color:#0080C0; font-weight:bold; font-size:large; margin-top:1.5em; margin-bottom:0.5em;} 15 | body article { color:#787878; } 16 | body article h2,h3,h4,h5,h6 { margin: 1em 0px; color:#0080C0; font-weight:bold; font-size:140%; margin-top:1.5em; margin-bottom:0.5em; line-height:1.3; } 17 | body article hr { color:#0080C0; background-color:#404040; border:#404040; height:1px; } 18 | body article p { margin-bottom:1.5em; } 19 | body article a { color:#0080C0; text-decoration:none; } 20 | body article b { font-weight:bold; } 21 | body article dfn,cite,em,i { font-style:italic; } 22 | body article pre { font-family:monospace; white-space:pre-wrap; border-radius:5px; background-color:#eee; margin-top:1em; margin-bottom:1em; padding:2px; } 23 | body article code,kbd,tt,var { font-family:monospace; white-space:pre-wrap; border-radius:5px; background-color:#eee; margin-top:1em; margin-bottom:0; padding:2px; } 24 | body article ol { margin-top:1em; margin-bottom:1em; margin-left:2em; } 25 | body article ul { margin-top:1em; margin-bottom:1em; margin-left:2em; list-style:square; } 26 | body article img { width:100%; margin:5px 0; border-radius: 5px; } 27 | body article blockquote { margin: 2em auto; padding: 0.5em 10px; font-style:italic; text-align:center; color:#787878} 28 | body article blockquote:before { font-size: 3em; line-height: 0.1em; content: '„' ' '; color: #787878; font-family: Georgia, serif; } 29 | body article blockquote:after { font-size: 3em; line-height: 0.1em; content: ' ' ' “ '; color: #787878; font-family: Georgia, serif; vertical-align: -0.4em;} 30 | body article header { display:flex; align-content:center; margin: 1em auto 2em auto;} 31 | body article header h1 { color:#0080C0; font-weight:bold; font-size:200%; margin-bottom:0.5em; line-height:1.3;} 32 | body article header div { flex:1; color:#404040; font-size:medium; color: #787878; font-weight:bold;} 33 | body article header address { display:inline; } 34 | body article header time {} 35 | body article header a { flex:none; text-decoration:none; color: #787878; font-variant:normal; } 36 | body article header img { flex:none; width: 100px; height: 100px; border-radius: 50%; margin: 0; } 37 | body aside { padding:30px 10px; line-height:1.3; } 38 | body aside a {color:#0080C0; text-decoration:none; } 39 | body aside ul { margin: 0 1em; list-style:none; } 40 | body aside li { margin: 1em 0; list-style:none; } 41 | body aside ul p { color:#BBB; } 42 | body hr { color:#0080C0; background-color:#0080C0; border:#0080C0; height:1px; } 43 | body footer { text-align:center; color: #787878; font-size:small; font-weight:bold; } 44 | body footer a { color: #787878; text-decoration:none; } 45 | 46 | 47 | @media only screen and (max-width: 200mm) { 48 | article header img { display:none; } 49 | body aside { padding:30px 0px; line-height:1.3; } 50 | body aside ul { margin: 0; list-style:none; } 51 | } 52 | --------------------------------------------------------------------------------