diff --git a/changes.zip b/changes.zip new file mode 100644 index 0000000..3d36700 Binary files /dev/null and b/changes.zip differ diff --git a/ckgedit.zip b/ckgedit.zip new file mode 100644 index 0000000..9b0c450 Binary files /dev/null and b/ckgedit.zip differ diff --git a/color.zip b/color.zip new file mode 100644 index 0000000..2192731 Binary files /dev/null and b/color.zip differ diff --git a/dokuwiki-plugins-2021-10-05-ckgedit_fix_media_dir.patch b/dokuwiki-plugins-2021-10-05-ckgedit_fix_media_dir.patch new file mode 100644 index 0000000..fcdc76f --- /dev/null +++ b/dokuwiki-plugins-2021-10-05-ckgedit_fix_media_dir.patch @@ -0,0 +1,14 @@ +diff -ruN lib/plugins/ckgedit.old/action/meta.php lib/plugins/ckgedit/action/meta.php +--- lib/plugins/ckgedit.old/action/meta.php 2021-10-05 17:27:06.277221520 +0200 ++++ lib/plugins/ckgedit/action/meta.php 2021-10-05 17:28:56.594090117 +0200 +@@ -523,7 +523,9 @@ + if(! empty($domain )) { + list($prefix,$mdir) = explode(trim(DOKU_BASE, '/'),$userfiles); + $mdir = ltrim($mdir, '/'); +- $media_dir = DOKU_BASE . $mdir . 'image/'; ++ // $media_dir = DOKU_BASE . $mdir . 'image/'; ++ $media_dir = DOKU_BASE . $mdir . 'lib/exe/fetch.php/'; ++ + } + else $media_dir = '/lib/plugins/ckgedit/fckeditor/'. $animal . '/image/'; + setcookieSameSite('FCK_media',$media_dir, $expire, '/'); diff --git a/dokuwiki-plugins-2021-10-05-mupdf_tmp_dir.patch b/dokuwiki-plugins-2021-10-05-mupdf_tmp_dir.patch new file mode 100644 index 0000000..492137b --- /dev/null +++ b/dokuwiki-plugins-2021-10-05-mupdf_tmp_dir.patch @@ -0,0 +1,12 @@ +diff -ruN lib/plugins/dw2pdf.old/vendor/mpdf/mpdf/src/Config/ConfigVariables.php lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Config/ConfigVariables.php +--- lib/plugins/dw2pdf.old/vendor/mpdf/mpdf/src/Config/ConfigVariables.php 2021-10-05 17:24:40.914758223 +0200 ++++ lib/plugins/dw2pdf/vendor/mpdf/mpdf/src/Config/ConfigVariables.php 2021-10-05 17:25:34.471666510 +0200 +@@ -453,7 +453,7 @@ + __DIR__ . '/../../ttfonts' + ], + +- 'tempDir' => __DIR__ . '/../../tmp', ++ 'tempDir' => '/var/lib/dokuwiki/data/tmp', + + 'allowAnnotationFiles' => false, + diff --git a/dokuwiki-plugins.spec b/dokuwiki-plugins.spec new file mode 100644 index 0000000..9fd7b98 --- /dev/null +++ b/dokuwiki-plugins.spec @@ -0,0 +1,334 @@ +%define realversion 20210220 +%define version %(echo %{realversion} | sed -e 's/-//g') +%define releasenum 4 + +%if 0%{?fedora} >= 11 || 0%{?rhel} >= 5 +%global useselinux 1 +%else +%global useselinux 0 +%endif + +Name: dokuwiki-plugins +Version: %{version} +Release: %{releasenum}%{?dist} +Summary: Standards compliant simple to use wiki +Group: Applications/Internet +License: GPLv2 +URL: http://www.dokuwiki.org/dokuwiki + +Source10: changes.zip +Source11: ckgedit.zip +Source12: color.zip +Source13: dw2pdf.zip +Source14: edittable.zip +Source15: encryptedpasswords.zip +Source16: hidden.zip +Source17: howhard.zip +Source18: loglog.zip +Source19: note.zip +Source20: nspages.zip +Source21: odt.zip +Source22: pagelist.zip +Source23: pagemove.zip +Source24: sortablejs.zip +Source25: tag.zip +Source26: todo.zip + + +Patch1: dokuwiki-plugins-2021-10-05-ckgedit_fix_media_dir.patch +Patch2: dokuwiki-plugins-2021-10-05-mupdf_tmp_dir.patch + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +Requires: dokuwiki >= 20200729 + + +%description +DokuWiki is a standards compliant, simple to use Wiki, mainly aimed at creating +documentation of any kind. It has a simple but powerful syntax which makes sure +the data files remain readable outside the Wiki and eases the creation of +structured texts. + +All data is stored in plain text files no database is required. + +This package provides several useful plugins for dokuwiki + +%prep +%{__rm} -rf lib +%{__mkdir_p} lib/{plugins,tpl} +# Extract plugins +for S in %{SOURCE10} %{SOURCE11} %{SOURCE12} %{SOURCE13} %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17} %{SOURCE18} %{SOURCE19} %{SOURCE20} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} %{SOURCE25} %{SOURCE26}; do + unzip -o -d lib/plugins $S +done + +mv lib/plugins/changes-master lib/plugins/changes +mv lib/plugins/ckgedit-master lib/plugins/ckgedit +mv lib/plugins/color-master lib/plugins/color +mv lib/plugins/dw2pdf-master lib/plugins/dw2pdf +mv lib/plugins/edittable-master lib/plugins/edittable +mv lib/plugins/encryptedpasswords-master lib/plugins/encryptedpasswords +mv lib/plugins/hidden-master lib/plugins/hidden +mv lib/plugins/howhard-master lib/plugins/howhard +mv lib/plugins/loglog-master lib/plugins/loglog +mv lib/plugins/note-master lib/plugins/note +mv lib/plugins/nspages-master lib/plugins/nspages +mv lib/plugins/odt-master lib/plugins/odt +mv lib/plugins/pagelist-master lib/plugins/pagelist +mv lib/plugins/pagemove-master lib/plugins/pagemove +mv lib/plugins/sortablejs-master lib/plugins/sortablejs +mv lib/plugins/tag-master lib/plugins/tag +mv lib/plugins/todo-master lib/plugins/todo + +ls -l lib/plugins/ckgedit + +find lib -type d -exec chmod 755 "{}" \; +find lib -type f -exec chmod 644 "{}" \; + +%patch1 -p0 +%patch2 -p0 + +%build + +%install +rm -rf $RPM_BUILD_ROOT +install -d -p $RPM_BUILD_ROOT%{_datadir}/dokuwiki/ +cp -rp lib $RPM_BUILD_ROOT%{_datadir}/dokuwiki/ + +%files +%defattr(-,root,root,-) +#%attr(0755,apache,apache) %dir %{_datadir}/dokuwiki/lib/plugins +# %attr(0775,root,apache) %dir %{_datadir}/dokuwiki/lib/plugins/* +%{_datadir}/dokuwiki/lib/plugins/* + +%clean +%{__rm} -rf $RPM_BUILD_ROOT + +%changelog +* Thu Oct 14 2021 John Crisp 20210220-4 +- remove attr dir line in files to fix conflicts [SME: 11703] + +* Mon Oct 11 2021 Terry Fage 20210220-3 +- reapply patchs ckgedit_fix_media_dir mupdf_tmp_dir [SME: 11704] + +* Wed Oct 06 2021 John Crisp 20210220-2 +- Update the dokuwiki requires version + +* Tue Oct 05 2021 John Crisp - 20210220-1 +- First import to SME [SME: 11704] +- Updated plugins to lastest versions +- Scripted git pulls for plugins and zipping them +- Sorted plugin names alphabetically + +* Mon Sep 25 2017 Daniel Berteaud - 20170219e-2 +- Fix syntax error in ckgedit lang file preventing access to settings + +* Mon Aug 28 2017 Daniel Berteaud - 20170219e-1 +- Bump for 2017-02-19e + +* Wed Aug 23 2017 Daniel Berteaud - 20170219d-1 +- Bump for 2017-02-19d +- Update ckgedit +- Update hidden +- Update tag +- Update pagelist +- Update loglog +- Update edittable +- Update odt +- Update nspages +- Update changes +- Update dw2pdf + +* Thu Mar 9 2017 Daniel Berteaud - 20170219b-1 +- Bump for 2017-02-19b + +* Tue Feb 21 2017 Daniel Berteaud - 20170219a-1 +- Bump for 2017-02-19a +- Update note +- Update odt +- Update dw2pdf +- Update color +- Update hidden +- Update encryptedpasswords +- Update tag +- Update pagelist +- Update changes +- Update loglog +- Update todo +- Update ckgedit +- Update edittable +- Update sortablejs +- Update howhard + +* Wed Jul 20 2016 Daniel Berteaud - 20160626a-2 +- Fix odt export when notes are used + See https://github.com/LarsGit223/dokuwiki-plugin-odt/issues/144 + +* Mon Jul 4 2016 Daniel Berteaud - 20160626a-1 +- Bump for 2016-06-26a + +* Tue Jun 28 2016 Daniel Berteaud - 20160626-1 +- Bump for 2016-06-26 +- Update changes +- Update ckgedit +- Update dw2pdf +- Update edittable +- Update hidden +- Update howhard +- Update loglog +- Update nspages +- Update odt +- Update pagelist +- Update pagemove +- Update tag +- Update todo + +* Wed Sep 9 2015 Daniel Berteaud - 20150810a-2 +- Update edittable to 2015-09-01 + +* Tue Sep 1 2015 Daniel Berteaud - 20150810a-1 +- Bump for 2015-08-10a +- Update odt +- Update dw2pdf +- Update hidden +- Update encryptedpassword +- Update nspage +- Update ckgedit +- Update edittable +- Update sortablejs +- Update howhard +- Remove useless dokuwiki_export template + +* Fri Mar 20 2015 Daniel Berteaud - 20140029d-1 +- Bump for 2014-09-29d +- Update changes +- Update edittable +- Update encryptedpassword +- Update loglog +- Update odt + +* Thu Feb 26 2015 Daniel Berteaud - 20140029c-1 +- Bump for 2014-09-29c +- Update odt +- Update dw2pdf +- Update nspage +- Update changes +- Update todo +- Update ckgedit +- Update edittable + +* Thu Dec 4 2014 Daniel Berteaud - 20140029b-1 +- Bump for 2014-09-29b + +* Tue Oct 14 2014 Daniel Berteaud - 20140029a-1 +- Bump version for 2014-09-29a +- Update default template +- Update ckgedit +- Update dw2pdf +- Update encryptedpassword +- Update howhard +- Update odt +- Update pagemove +- Update sortablejs +- Update todo + +* Tue Aug 12 2014 Daniel Berteaud - 20140505a-2 +- update odt +- update tag +- update hidden +- update todo +- update pagelist +- update pagemove +- update dw2pdf +- update loglog +- update ckgedit +- update nspage +- update encryptedpasswords +- add edittable +- add sertablejs +- add howhard +- remove toolbox +- remove floartdiv +- remove iframe + +* Fri Jun 27 2014 Daniel Berteaud - 20140505a-1 +- bump version for 2014-05-05a + +* Tue May 6 2014 Daniel Berteaud - 20140505-1 +- Bump release for new dokuwiki (2014-05-05) +- Update dokuwiki tpl +- Update dw2pdf +- Update tag +- Update pagelist +- Update ckgedit + +* Mon Dec 9 2013 Daniel Berteaud - 20131208-1 +- bump release for new dokuwiki version (2013-12-08) +- Update dokuwiki tpl +- Remove the old default template + +* Thu Nov 28 2013 Daniel Berteaud - 20130510a-4 +- Fix permissions on the plugins dir + +* Fri Nov 15 2013 Daniel Berteaud - 20130510a-3 +- Cleanup the spec file + +* Thu Oct 31 2013 Daniel Berteaud - 20130510a-2 +- Fix media manager in ckgedit +- Update dw2pdf +- Update tag +- Update pagelist +- Update nspages +- Update todo +- Update ckgedit + +* Wed Aug 21 2013 Daniel Berteaud - 20130510a-1 +- bump version to 2013-05-10a + +* Thu Mar 28 2013 Daniel Berteaud - 20130510-1 +- update hidden +- update encryptpassword +- update tag +- update pagelist +- update todo +- replace fckgLite with ckgedit +- remove edittable +- bump version for dokuwiki 2013-05-10 + +* Mon Oct 15 2012 Daniel Berteaud - 20121013-1 +- bump release for new dokuwiki version + +* Thu Sep 13 2012 Daniel Berteaud - 20120910-1 +- bump release for new dokuwiki version +- update hidden +- update tag +- update fckgLite +- update encryptedpasswords + +* Sun Jul 15 2012 Daniel Berteaud - 20120125b-1 +- bump release for dokuwiki 2012-01-25b +- update default tpl +- update dw2pdf +- update hidden +- update encryptedpasswords +- update pagelist +- update nspages +- update pagemove +- update fckgLite +- add iframe plugin + +* Tue May 29 2012 Daniel Berteaud - 20120125a-4 +- update dw2pdf, tag and hidden plugins + +* Mon Apr 23 2012 Daniel Berteaud - 20120125a-3 +- bump release for new dokuwiki version + +* Fri Jan 27 2012 Daniel Berteaud - 20120125-3 +- upgrade for upstream dokuwiki +- upgrade dw2pdf to latest release + +* Fri Nov 18 2011 Daniel Berteaud - 20110525a-2 +- Add fckgLite plugin + +* Mon Jul 18 2011 Daniel Berteaud - 20110525a-1 +- Initial release + diff --git a/dw2pdf.zip b/dw2pdf.zip new file mode 100644 index 0000000..ea69566 Binary files /dev/null and b/dw2pdf.zip differ diff --git a/edittable.zip b/edittable.zip new file mode 100644 index 0000000..36c07dd Binary files /dev/null and b/edittable.zip differ diff --git a/encryptedpasswords.zip b/encryptedpasswords.zip new file mode 100644 index 0000000..48dc7da Binary files /dev/null and b/encryptedpasswords.zip differ diff --git a/hidden.zip b/hidden.zip new file mode 100644 index 0000000..5d0501c Binary files /dev/null and b/hidden.zip differ diff --git a/howhard.zip b/howhard.zip new file mode 100644 index 0000000..76239e4 Binary files /dev/null and b/howhard.zip differ diff --git a/import.log b/import.log new file mode 100644 index 0000000..86b4dd6 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +dokuwiki-plugins-20210220-1_el7_sme:contribs10:dokuwiki-plugins-20210220-1.el7.sme.src.rpm:1633453049 diff --git a/lib/plugins/changes/action.php b/lib/plugins/changes/action.php new file mode 100644 index 0000000..c184667 --- /dev/null +++ b/lib/plugins/changes/action.php @@ -0,0 +1,62 @@ + + * @author Mykola Ostrovskyy + */ + +/** + * Class action_plugin_changes + */ +class action_plugin_changes extends DokuWiki_Action_Plugin +{ + /** + * Register callbacks + * @param Doku_Event_Handler $controller + */ + public function register(Doku_Event_Handler $controller) + { + $controller->register_hook('PARSER_CACHE_USE', 'BEFORE', $this, 'beforeParserCacheUse'); + } + + /** + * Handle PARSER_CACHE_USE:BEFORE event + * @param Doku_Event $event + */ + public function beforeParserCacheUse($event) + { + global $ID; + $cache = $event->data; + if (isset($cache->mode) && ($cache->mode == 'xhtml')) { + $depends = p_get_metadata($ID, 'relation depends'); + if (!empty($depends) && isset($depends['rendering'])) { + $this->addDependencies($cache, array_keys($depends['rendering'])); + } + } + } + + /** + * Add extra dependencies to the cache + */ + protected function addDependencies($cache, $depends) + { + // Prevent "Warning: in_array() expects parameter 2 to be array, null given" + if (!is_array($cache->depends)) { + $cache->depends = array(); + } + if (!array_key_exists('files', $cache->depends)) { + $cache->depends['files'] = array(); + } + + foreach ($depends as $file) { + if (!in_array($file, $cache->depends['files']) && @file_exists($file)) { + $cache->depends['files'][] = $file; + } + } + } +} + +//Setup VIM: ex: et ts=4 enc=utf-8 : diff --git a/lib/plugins/changes/conf/default.php b/lib/plugins/changes/conf/default.php new file mode 100644 index 0000000..3066687 --- /dev/null +++ b/lib/plugins/changes/conf/default.php @@ -0,0 +1,4 @@ + + */ +$lang['dayheaderfmt'] = 'Formát datumů v záhlaví dnů (formát strftime)'; +$lang['listmedia'] = 'Zahrnout změny souborů médií'; diff --git a/lib/plugins/changes/lang/de/settings.php b/lib/plugins/changes/lang/de/settings.php new file mode 100644 index 0000000..78ef707 --- /dev/null +++ b/lib/plugins/changes/lang/de/settings.php @@ -0,0 +1,4 @@ + + */ +$lang['dayheaderfmt'] = 'Dat-formato por la tago-kapoj. (strftime-formato)'; +$lang['listmedia'] = 'Inkludi ŝanĝojn de aŭdvidaĵ-dosieroj.'; diff --git a/lib/plugins/changes/lang/fa/settings.php b/lib/plugins/changes/lang/fa/settings.php new file mode 100644 index 0000000..2d8d2fb --- /dev/null +++ b/lib/plugins/changes/lang/fa/settings.php @@ -0,0 +1,9 @@ + + */ +$lang['dayheaderfmt'] = 'تاریخ فرمت برای هدر روز. (فرمت strftime)'; +$lang['listmedia'] = 'شامل تغییرات فایل‌های رسانه‌ای.'; diff --git a/lib/plugins/changes/lang/fr/settings.php b/lib/plugins/changes/lang/fr/settings.php new file mode 100644 index 0000000..e9852c2 --- /dev/null +++ b/lib/plugins/changes/lang/fr/settings.php @@ -0,0 +1,9 @@ + + */ +$lang['dayheaderfmt'] = 'Format de date pour les entêtes de jour. (format strftime)'; +$lang['listmedia'] = 'Inclure les modifications apportées aux fichiers média.'; diff --git a/lib/plugins/changes/lang/hr/settings.php b/lib/plugins/changes/lang/hr/settings.php new file mode 100644 index 0000000..b190bb1 --- /dev/null +++ b/lib/plugins/changes/lang/hr/settings.php @@ -0,0 +1,9 @@ + + */ +$lang['dayheaderfmt'] = 'Format datuma za datumska zaglavlja. (strftime format)'; +$lang['listmedia'] = 'Prikaži i promjene na medijskim datotekama.'; diff --git a/lib/plugins/changes/lang/hu/settings.php b/lib/plugins/changes/lang/hu/settings.php new file mode 100644 index 0000000..bd770cb --- /dev/null +++ b/lib/plugins/changes/lang/hu/settings.php @@ -0,0 +1,9 @@ + + */ +$lang['dayheaderfmt'] = 'Dátum formátum a naphoz. (strftime formátum)'; +$lang['listmedia'] = 'Tartalmazza a médiafájlok változását is.'; diff --git a/lib/plugins/changes/lang/ja/settings.php b/lib/plugins/changes/lang/ja/settings.php new file mode 100644 index 0000000..11c2c92 --- /dev/null +++ b/lib/plugins/changes/lang/ja/settings.php @@ -0,0 +1,9 @@ + + */ +$lang['dayheaderfmt'] = '日付見出しの日付形式。 (strftimeフォーマット)'; +$lang['listmedia'] = 'メディアファイルの変更を含む。'; diff --git a/lib/plugins/changes/lang/ko/settings.php b/lib/plugins/changes/lang/ko/settings.php new file mode 100644 index 0000000..77b7f63 --- /dev/null +++ b/lib/plugins/changes/lang/ko/settings.php @@ -0,0 +1,9 @@ + + */ +$lang['dayheaderfmt'] = '날짜 헤더에 대한 날짜 형식. (strftime 형식)'; +$lang['listmedia'] = '미디어 파일의 바뀜 포함.'; diff --git a/lib/plugins/changes/lang/nl/settings.php b/lib/plugins/changes/lang/nl/settings.php new file mode 100644 index 0000000..aa9ce7f --- /dev/null +++ b/lib/plugins/changes/lang/nl/settings.php @@ -0,0 +1,9 @@ + + */ +$lang['dayheaderfmt'] = 'Datum formaat voor de dag koppen. (strftime format)'; +$lang['listmedia'] = 'Aanpassingen van media bestanden ook tonen.'; diff --git a/lib/plugins/changes/lang/pl/settings.php b/lib/plugins/changes/lang/pl/settings.php new file mode 100644 index 0000000..7f6ac76 --- /dev/null +++ b/lib/plugins/changes/lang/pl/settings.php @@ -0,0 +1,10 @@ + + * @author Mati + */ +$lang['dayheaderfmt'] = 'Format daty dla nagłówków dnia (w formacie strftime).'; +$lang['listmedia'] = 'Dołącz zmiany plików multimedialnych'; diff --git a/lib/plugins/changes/lang/ru/settings.php b/lib/plugins/changes/lang/ru/settings.php new file mode 100644 index 0000000..efdf7df --- /dev/null +++ b/lib/plugins/changes/lang/ru/settings.php @@ -0,0 +1,9 @@ + + */ +$lang['dayheaderfmt'] = 'Формат даты для заголовков дня. (В формате PHP-фукции STRFTIME)'; +$lang['listmedia'] = 'Учитывать изменения медиа-файлов.'; diff --git a/lib/plugins/changes/lang/sv/settings.php b/lib/plugins/changes/lang/sv/settings.php new file mode 100644 index 0000000..d49c597 --- /dev/null +++ b/lib/plugins/changes/lang/sv/settings.php @@ -0,0 +1,9 @@ + + */ +$lang['dayheaderfmt'] = 'Datumformat för datumrubrikerna. (strftime-format)'; +$lang['listmedia'] = 'Inkluderar ändringar av mediafiler.'; diff --git a/lib/plugins/changes/lang/tr/settings.php b/lib/plugins/changes/lang/tr/settings.php new file mode 100644 index 0000000..ea6c932 --- /dev/null +++ b/lib/plugins/changes/lang/tr/settings.php @@ -0,0 +1,9 @@ + + */ +$lang['dayheaderfmt'] = 'Gün başlıkları için tarih biçimi. (strftime biçimi)'; +$lang['listmedia'] = 'Ortam dosyalarındaki değişiklikleri de dahil et.'; diff --git a/lib/plugins/changes/lang/zh/settings.php b/lib/plugins/changes/lang/zh/settings.php new file mode 100644 index 0000000..08b1c6d --- /dev/null +++ b/lib/plugins/changes/lang/zh/settings.php @@ -0,0 +1,4 @@ + + * @author Mykola Ostrovskyy + */ + +/** + * Class syntax_plugin_changes + */ +class syntax_plugin_changes extends DokuWiki_Syntax_Plugin +{ + /** + * What kind of syntax are we? + */ + public function getType() + { + return 'substition'; + } + + /** + * What type of XHTML do we create? + */ + public function getPType() + { + return 'block'; + } + + /** + * Where to sort in? + */ + public function getSort() + { + return 105; + } + + /** + * Connect pattern to lexer + * @param string $mode + */ + public function connectTo($mode) + { + $this->Lexer->addSpecialPattern('\{\{changes>[^}]*\}\}', $mode, 'plugin_changes'); + } + + /** + * Handler to prepare matched data for the rendering process + * + * @param string $match The text matched by the patterns + * @param int $state The lexer state for the match + * @param int $pos The character position of the matched text + * @param Doku_Handler $handler The Doku_Handler object + * @return array Return an array with all data you want to use in render + */ + public function handle($match, $state, $pos, Doku_Handler $handler) + { + $match = substr($match, 10, -2); + + $data = [ + 'ns' => [], + 'excludedpages' => [], + 'count' => 10, + 'type' => [], + 'render' => 'list', + 'render-flags' => [], + 'maxage' => null, + 'reverse' => false, + 'user' => [], + 'excludedusers' => [], + ]; + + $match = explode('&', $match); + foreach ($match as $m) { + if (is_numeric($m)) { + $data['count'] = (int) $m; + } else { + if (preg_match('/(\w+)\s*=(.+)/', $m, $temp) == 1) { + $this->handleNamedParameter($temp[1], trim($temp[2]), $data); + } else { + $this->addNamespace($data, trim($m)); + } + } + } + + return $data; + } + + /** + * Handle parameters that are specified using = syntax + * @param string $name + * @param $value + * @param array $data + */ + protected function handleNamedParameter($name, $value, &$data) + { + global $ID; + + static $types = array('edit' => 'E', 'create' => 'C', 'delete' => 'D', 'minor' => 'e'); + static $renderers = array('list', 'pagelist'); + + switch ($name) { + case 'count': + case 'maxage': + $data[$name] = intval($value); + break; + case 'ns': + foreach (preg_split('/\s*,\s*/', $value) as $value) { + $this->addNamespace($data, $value); + } + break; + case 'type': + foreach (preg_split('/\s*,\s*/', $value) as $value) { + if (array_key_exists($value, $types)) { + $data[$name][] = $types[$value]; + } + } + break; + case 'render': + // parse "name(flag1, flag2)" syntax + if (preg_match('/(\w+)(?:\((.*)\))?/', $value, $match) == 1) { + if (in_array($match[1], $renderers)) { + $data[$name] = $match[1]; + $flags = trim($match[2]); + if ($flags != '') { + $data['render-flags'] = preg_split('/\s*,\s*/', $flags); + } + } + } + break; + case 'user': + case 'excludedusers': + foreach (preg_split('/\s*,\s*/', $value) as $value) { + $data[$name][] = $value; + } + break; + case 'excludedpages': + foreach (preg_split('/\s*,\s*/', $value) as $page) { + if (!empty($page)) { + resolve_pageid(getNS($ID), $page, $exists); + $data[$name][] = $page; + } + } + break; + case 'reverse': + $data[$name] = (bool)$value; + break; + } + } + + /** + * Clean-up the namespace name and add it (if valid) into the $data array + * @param array $data + * @param string $namespace + */ + protected function addNamespace(&$data, $namespace) + { + if (empty($namespace)) return; + $action = ($namespace[0] == '-') ? 'exclude' : 'include'; + $namespace = cleanID(preg_replace('/^[+-]/', '', $namespace)); + if (!empty($namespace)) { + $data['ns'][$action][] = $namespace; + } + } + + /** + * Handles the actual output creation. + * + * @param string $mode output format being rendered + * @param Doku_Renderer $R the current renderer object + * @param array $data data created by handler() + * @return boolean rendered correctly? + */ + public function render($mode, Doku_Renderer $R, $data) + { + if ($mode === 'xhtml') { + /* @var Doku_Renderer_xhtml $R */ + $R->info['cache'] = false; + $changes = $this->getChanges( + $data['count'], + $data['ns'], + $data['excludedpages'], + $data['type'], + $data['user'], + $data['maxage'], + $data['excludedusers'], + $data['reverse'] + ); + if (!count($changes)) return true; + + switch ($data['render']) { + case 'list': + $this->renderSimpleList($changes, $R, $data['render-flags']); + break; + case 'pagelist': + $this->renderPageList($changes, $R, $data['render-flags']); + break; + } + return true; + } elseif ($mode === 'metadata') { + /* @var Doku_Renderer_metadata $R */ + global $conf; + $R->meta['relation']['depends']['rendering'][$conf['changelog']] = true; + return true; + } + return false; + } + + /** + * Based on getRecents() from inc/changelog.php + * + * @param int $num + * @param array $ns + * @param array $excludedpages + * @param array $type + * @param array $user + * @param int $maxage + * @return array + */ + protected function getChanges($num, $ns, $excludedpages, $type, $user, $maxage, $excludedusers, $reverse) + { + global $conf; + $changes = array(); + $seen = array(); + $count = 0; + $lines = array(); + + // Get global changelog + if (file_exists($conf['changelog']) && is_readable($conf['changelog'])) { + $lines = @file($conf['changelog']); + } + + // Merge media changelog + if ($this->getConf('listmedia')) { + if (file_exists($conf['media_changelog']) && is_readable($conf['media_changelog'])) { + $linesMedia = @file($conf['media_changelog']); + // Add a tag to identiy the media lines + foreach ($linesMedia as $key => $value) { + $value = parseChangelogLine($value); + $value['extra'] = 'media'; + $linesMedia[$key] = implode("\t", $value) . "\n"; + } + $lines = array_merge($lines, $linesMedia); + } + } + + if (is_null($maxage)) { + $maxage = (int) $conf['recent_days'] * 60 * 60 * 24; + } + + for ($i = count($lines) - 1; $i >= 0; $i--) { + $change = $this->handleChangelogLine( + $lines[$i], + $ns, + $excludedpages, + $type, + $user, + $maxage, + $seen, + $excludedusers + ); + if ($change !== false) { + $changes[] = $change; + // break when we have enough entries + if (++$count >= $num) break; + } + } + + // Date sort merged page and media changes + if ($this->getConf('listmedia') || $reverse) { + $dates = array(); + foreach ($changes as $change) { + $dates[] = $change['date']; + } + array_multisort($dates, ($reverse ? SORT_ASC : SORT_DESC), $changes); + } + + return $changes; + } + + /** + * Based on _handleRecent() from inc/changelog.php + * + * @param string $line + * @param array $ns + * @param array $excludedpages + * @param array $type + * @param array $user + * @param int $maxage + * @param array $seen + * @return array|bool + */ + protected function handleChangelogLine($line, $ns, $excludedpages, $type, $user, $maxage, &$seen, $excludedusers) + { + // split the line into parts + $change = parseChangelogLine($line); + if ($change === false) return false; + + // skip seen ones + if (isset($seen[$change['id']])) return false; + + // filter type + if (!empty($type) && !in_array($change['type'], $type)) return false; + + // filter user + if (!empty($user) && (empty($change['user']) || !in_array($change['user'], $user))) return false; + + // remember in seen to skip additional sights + $seen[$change['id']] = 1; + + // show only not existing pages for delete + if ($change['extra'] != 'media' && $change['type'] != 'D' && !page_exists($change['id'])) return false; + + // filter maxage + if ($maxage && $change['date'] < (time() - $maxage)) { + return false; + } + + // check if it's a hidden page + if (isHiddenPage($change['id'])) return false; + + // filter included namespaces + if (isset($ns['include'])) { + if (!$this->isInNamespace($ns['include'], $change['id'])) return false; + } + + // filter excluded namespaces + if (isset($ns['exclude'])) { + if ($this->isInNamespace($ns['exclude'], $change['id'])) return false; + } + // exclude pages + if (!empty($excludedpages)) { + foreach ($excludedpages as $page) { + if ($change['id'] == $page) return false; + } + } + + // exclude users + if (!empty($excludedusers)) { + foreach ($excludedusers as $user) { + if ($change['user'] == $user) return false; + } + } + + // check ACL + $change['perms'] = auth_quickaclcheck($change['id']); + if ($change['perms'] < AUTH_READ) return false; + + return $change; + } + + /** + * Check if page belongs to one of namespaces in the list + * + * @param array $namespaces + * @param string $id page id + * @return bool + */ + protected function isInNamespace($namespaces, $id) + { + foreach ($namespaces as $ns) { + if ((strpos($id, $ns . ':') === 0)) return true; + } + return false; + } + + /** + * Render via the Pagelist plugin + * + * @param $changes + * @param Doku_Renderer_xhtml $R + * @param $flags + */ + protected function renderPageList($changes, &$R, $flags) + { + /** @var helper_plugin_pagelist $pagelist */ + $pagelist = @plugin_load('helper', 'pagelist'); + if ($pagelist) { + $pagelist->setFlags($flags); + $pagelist->startList(); + foreach ($changes as $change) { + if ($change['extra'] == 'media') continue; + $page['id'] = $change['id']; + $page['date'] = $change['date']; + $page['user'] = $this->getUserName($change); + $page['desc'] = $change['sum']; + $pagelist->addPage($page); + } + $R->doc .= $pagelist->finishList(); + } else { + // Fallback to the simple list renderer + $this->renderSimpleList($changes, $R); + } + } + + /** + * Render the day header + * + * @param Doku_Renderer $R + * @param int $date + */ + protected function dayheader(&$R, $date) + { + if ($R->getFormat() == 'xhtml') { + /* @var Doku_Renderer_xhtml $R */ + $R->doc .= '

'; + $R->cdata(dformat($date, $this->getConf('dayheaderfmt'))); + $R->doc .= '

'; + } else { + $R->header(dformat($date, $this->getConf('dayheaderfmt')), 3, 0); + } + } + + /** + * Render with a simple list render + * + * @param array $changes + * @param Doku_Renderer_xhtml $R + * @param null $flags + */ + protected function renderSimpleList($changes, &$R, $flags = null) + { + global $conf; + $flags = $this->parseSimpleListFlags($flags); + + $dayheaders_date = ''; + if ($flags['dayheaders']) { + $dayheaders_date = date('Ymd', $changes[0]['date']); + $this->dayheader($R, $changes[0]['date']); + } + + $R->listu_open(); + foreach ($changes as $change) { + if ($flags['dayheaders']) { + $tdate = date('Ymd', $change['date']); + if ($tdate != $dayheaders_date) { + $R->listu_close(); // break list to insert new header + $this->dayheader($R, $change['date']); + $R->listu_open(); + $dayheaders_date = $tdate; + } + } + + $R->listitem_open(1); + $R->listcontent_open(); + if (trim($change['extra']) == 'media') { + $R->internalmedia(':' . $change['id'], null, null, null, null, null, 'linkonly'); + } else { + $R->internallink(':' . $change['id'], null, null, false, 'navigation'); + } + if ($flags['summary']) { + $R->cdata(' ' . $change['sum']); + } + if ($flags['signature']) { + $user = $this->getUserName($change); + $date = strftime($conf['dformat'], $change['date']); + $R->cdata(' '); + $R->entity('---'); + $R->cdata(' '); + $R->emphasis_open(); + $R->cdata($user . ' ' . $date); + $R->emphasis_close(); + } + $R->listcontent_close(); + $R->listitem_close(); + } + $R->listu_close(); + } + + /** + * Parse flags for the simple list render + * + * @param array $flags + * @return array + */ + protected function parseSimpleListFlags($flags) + { + $outFlags = array('summary' => true, 'signature' => false, 'dayheaders' => false); + if (!empty($flags)) { + foreach ($flags as $flag) { + if (array_key_exists($flag, $outFlags)) { + $outFlags[$flag] = true; + } elseif (substr($flag, 0, 2) == 'no') { + $flag = substr($flag, 2); + if (array_key_exists($flag, $outFlags)) { + $outFlags[$flag] = false; + } + } + } + } + return $outFlags; + } + + /** + * Get username or fallback to ip + * + * @param array $change + * @return mixed + */ + protected function getUserName($change) + { + /* @var DokuWiki_Auth_Plugin $auth */ + global $auth; + if (!empty($change['user'])) { + $user = $auth->getUserData($change['user']); + if (empty($user)) { + return $change['user']; + } else { + return $user['name']; + } + } else { + return $change['ip']; + } + } +} diff --git a/lib/plugins/ckgedit/LICENSE b/lib/plugins/ckgedit/LICENSE new file mode 100644 index 0000000..d159169 --- /dev/null +++ b/lib/plugins/ckgedit/LICENSE @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/lib/plugins/ckgedit/README.md b/lib/plugins/ckgedit/README.md new file mode 100644 index 0000000..2bd113b --- /dev/null +++ b/lib/plugins/ckgedit/README.md @@ -0,0 +1,14 @@ +ckgedit is a WYSIWYG editor for Dokuwiki. It is an implementation of fckgLite which replaces the +FCKEditor with the more current CKEditor. Whereas the base directory for fckgLite is named fckg, the +base directory for this version is ckgedit. However, only one of the two can +be enabled at any one time. + +This version of ckgeditor should work with Linux, Windows, and versions of Dokuwiki installed with the +Ubuntu/Debian package manager. + +This branch uses CKEditor 4.11.4 + + + + + diff --git a/lib/plugins/ckgedit/action/delete.php b/lib/plugins/ckgedit/action/delete.php new file mode 100644 index 0000000..4b89a97 --- /dev/null +++ b/lib/plugins/ckgedit/action/delete.php @@ -0,0 +1,29 @@ + + */ + +class action_plugin_ckgedit_delete extends DokuWiki_Action_Plugin { + + + function register(Doku_Event_Handler $controller) { + $controller->register_hook('DOKUWIKI_STARTED', 'BEFORE', $this, 'ckgedit_delete_preprocess'); + } + + function ckgedit_delete_preprocess(Doku_Event $event){ + global $ACT; + if (! is_array($ACT) || !(isset($ACT['delete']))) return; + global $TEXT; + $TEXT = NULL; + unset($ACT['delete']); + $ACT['save'] = "Speichern"; + } + + +} //end of action class +?> diff --git a/lib/plugins/ckgedit/action/edit.php b/lib/plugins/ckgedit/action/edit.php new file mode 100644 index 0000000..4bfa201 --- /dev/null +++ b/lib/plugins/ckgedit/action/edit.php @@ -0,0 +1,1357 @@ + + */ + +class action_plugin_ckgedit_edit extends DokuWiki_Action_Plugin { + + var $fck_location = "ckeditor"; + var $helper = false; + var $ckgedit_bak_file = ""; + var $debug = false; + var $test = false; + var $page_from_template; + var $draft_found = false; + var $draft_text; + var $draft_started; + var $captcha; + /** + * Constructor + */ + function __construct() + { + $this->setupLocale(); + $this->helper = plugin_load('helper', 'ckgedit'); + if(!plugin_isdisabled('captcha')) { + $this->captcha = plugin_load('helper', 'captcha'); + } + else $this->captcha = false; + + } + + + function register(Doku_Event_Handler $controller) + { + $version = explode('.', phpversion()); + define('PHP_VERSION_NUM', $version[0] * 10+ $version[1]); + + if($this->helper->is_outOfScope()) return; + + global $FCKG_show_preview; + $FCKG_show_preview = true; + + if(isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'dwiki') { + $FCKG_show_preview = true; + return; + } + elseif(isset($_COOKIE['FCKG_USE'])) { + preg_match('/_\w+_/', $_COOKIE['FCKG_USE'], $matches); + if($matches[0] == '_false_') { + $FCKG_show_preview = true; + return; + } + } + $Fck_NmSp = "!!NONSET!!"; + if(isset($_COOKIE['FCK_NmSp'])) { + $Fck_NmSp = $_COOKIE['FCK_NmSp']; + } + $dwedit_ns = @$this->getConf('dwedit_ns'); + if(isset($dwedit_ns) && $dwedit_ns) { + $ns_choices = explode(',',$dwedit_ns); + foreach($ns_choices as $ns) { + $ns = trim($ns); + if(preg_match("/$ns/",$_REQUEST['id']) || preg_match("/$ns/",$Fck_NmSp)) { + $FCKG_show_preview = true; + return; + } + } + } + $controller->register_hook('COMMON_PAGE_FROMTEMPLATE', 'AFTER', $this, 'pagefromtemplate', array()); + $controller->register_hook('COMMON_PAGETPL_LOAD', 'AFTER', $this, 'pagefromtemplate', array()); + + $controller->register_hook('TPL_ACT_RENDER', 'BEFORE', $this, 'ckgedit_edit'); + $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'ckgedit_edit_meta'); + } + + /** + * function pagefromtemplate + * Capture template text output by Template Event handler instead of pageTemplate() + * @author Myron Turner + * + */ + function pagefromtemplate(Doku_Event $event) { + if($event->data['tpl']) { + $this->page_from_template = $event->data['tpl']; + } + } + + /** + * ckgedit_edit_meta + * + * load fck js + * @author Pierre Spring + * @author Myron Turner + * @param mixed $event + * @access public + * @return void + */ + function ckgedit_edit_meta(Doku_Event $event) + { + global $ACT; + // we only change the edit behaviour + if ($ACT != 'edit'){ + return; + } + global $ID; + global $REV; + global $INFO; + global $conf; + $event->data['script'][] = + array( + 'type'=>'text/javascript', + 'charset'=>'utf-8', + '_data'=>'', + 'src'=>DOKU_BASE.'lib/plugins/ckgedit/' .$this->fck_location. '/ckeditor.js' + )+([ 'defer' => 'defer']); + + if(isset($conf['fnencode']) && $conf['fnencode'] == 'safe') { + $event->data['script'][] = + array( + 'type'=>'text/javascript', + 'charset'=>'utf-8', + '_data'=>'', + 'src'=>'lib/plugins/ckgedit/scripts/safeFN_cmpr.js' + ) + ([ 'defer' => 'defer']); + } + $ua = strtolower ($_SERVER['HTTP_USER_AGENT']); + if(strpos($ua, 'msie') !== false) { + echo "\n" . '' ."\n"; + } + + if($this->test) { + $nval = substr(md5(time()), -20); + $parse_url = DOKU_URL . 'lib/plugins/ckgedit/scripts/parse_wiki.js.unc'; + } + else $parse_url = DOKU_BASE . 'lib/plugins/ckgedit/scripts/parse_wiki-cmpr.js'; + $event->data['script'][] = + array( + 'type'=>'text/javascript', + 'charset'=>'utf-8', + '_data'=>'', + 'src'=> $parse_url + ) + ([ 'defer' => 'defer']); + + return; + } + + /** + * function ckgedit_edit + * @author Pierre Spring + * edit screen using fck + * + * @param & $event + * @access public + * @return void + */ + function ckgedit_edit(Doku_Event $event) + { + + global $INFO; + + // we only change the edit behaviour + if ($event->data != 'edit') { + return; + } + // load xml and acl + if (!$this->_preprocess()){ + return; + } + // print out the edit screen + $this->_print(); + // prevent Dokuwiki normal processing of $ACT (it would clean the variable and destroy our 'index' value. + $event->preventDefault(); + // index command belongs to us, there is no need to hold up Dokuwiki letting other plugins see if its for them + $event->stopPropagation(); + } + + /** + * function _preprocess + * @author Myron Turner + */ + function _preprocess($draft_text = "") + { + global $ID; + global $REV; + global $DATE; + global $RANGE; + global $PRE; + global $SUF; + global $INFO; + global $SUM; + global $lang; + global $conf; + global $ckgedit_lang; + //set summary default + if(!$SUM){ + if($REV){ + $SUM = $lang['restored']; + }elseif(!$INFO['exists']){ + $SUM = $lang['created']; + } + } + if(!$draft_text) { + if($INFO['exists']){ + if($RANGE){ + list($PRE,$text,$SUF) = rawWikiSlices($RANGE,$ID,$REV); + }else{ + $text = rawWiki($ID,$REV); + } + }else{ + //try to load a pagetemplate + $text = pageTemplate($ID); + //Check for text from template event handler + if(!$text && $this->page_from_template) $text = $this->page_from_template; + } + } + else $text = $draft_text; + + $text = str_replace('¬ags', '&amp;notags',$text); + $text = preg_replace_callback( + '/(~~NOCACHE~~|~~NOTOC~~|\{\{rss>http(s?):\/\/.*?\}\})/ms', + create_function( + '$matches', + '$matches[0] = preg_replace("#{{rss>http(s?):\/\/#", "{ { rss>$1Feed:", $matches[0]); + $matches[0] = str_replace("~", "~ ", $matches[0]); + return $matches[0];' + ),$text); + + if($this->getConf('smiley_hack')) { + $new_addr = $_SERVER['SERVER_NAME'] . DOKU_BASE; + $text=preg_replace("#(?<=http://)(.*?)(?=lib/plugins/ckgedit/ckeditor/plugins/smiley/images)#s", $new_addr,$text); + } + /*interwiki frasl refactoring*/ + +/* + $text = preg_replace_callback('/\[\[\w+>.*?\]\]/ms', + create_function( + '$matches', + 'return str_replace("/", "__IWIKI_FSLASH__" ,$matches[0]);' + ), $text); + */ + + global $useComplexTables; + if($this->getConf('complex_tables') || strrpos($text, '~~COMPLEX_TABLES~~') !== false) { + $useComplexTables=true; + } + else { + $useComplexTables=false; + } + + if(strpos($text, '%%') !== false || strpos($text, '\\\\') !== false || strpos($text, '|') !== false ) { + $text = preg_replace('/%%\s*\s*%%/ms', 'PERCNWPERC',$text); + $text = preg_replace('/%%\s*<(code|file)>\s*%%/ms', 'PERC' . "$1" . 'PERC',$text); + $text = preg_replace_callback( + "/<(nowiki|code|file)>(.*?)<\/(nowiki|code|file)/ms", + function ($matches) { + $matches[0] = str_replace('%%', 'DBLPERCENT',$matches[0]); + $matches[0] = str_replace('\\ ', 'DBLBACKSPLASH',$matches[0]); + $matches[0] = str_replace('|', 'NWPIPECHARACTER',$matches[0]); + return $matches[0]; + }, + $text + ); + + $text = preg_replace_callback( + "/(?)%%(.*?)%%/ms", + function($matches) { + return '' . $matches[1] . ''; + }, + $text + ); + + $text = str_replace('DBLPERCENT','%%',$text); + } + + $pos = strpos($text, '<'); + + if($pos !== false) { + +/* skipentity support */ + $text = preg_replace_callback( + '/``(.*?)``/ms', + function($matches) { + $needles = array('[',']', '/', '.', '*', '_','\'','<','>','%', '{', '}', '\\' , '(' ); + $replacements = array('[',']','/', '.', '*', '_', ''', '<','>','%', '{','}', '\','('); + $matches[1] = str_replace($needles, $replacements, $matches[1]); + return '``' .$matches[1] .'``' ; + }, + $text + ); + + + $text = preg_replace_callback( + '/()(.*?)(<\/nowiki>)/ms', + create_function( + '$matches', + '$needles = array("[","]", "/", ".", "*", "_","\'","<",">","%", "{", "}", "\\\","("); + $replacements = array("[","]","/", ".", "*", "_", "'", "<",">","%", "{","}", "\","("); + $matches[2] = str_replace($needles, $replacements, $matches[2]); + return $matches[1] . $matches[2] . $matches[3];' + ), + $text + ); + + $text = preg_replace_callback( + '/<(code|file)(.*?)(>)(.*?)(<\/\1>)/ms', + create_function( + '$matches', + ' //file_put_contents("geshi.txt", print_r($matches,true)); + if(preg_match("/(^\s*geshi:\s*(\w+)(\s+\w+\.\w+)*\s*)$/m",$matches[0],$gmatch)){ + $gmatch[0] = preg_replace("/\s*geshi:\s+/","",$gmatch[0]); + $matches[1] .= " " . trim($gmatch[0]); + //file_put_contents("gmatch.txt", print_r($gmatch,true)); + $c=1; + $matches[4] = str_replace($gmatch[1],"",$matches[4],$c); + } + if(preg_match("/\w+/",$matches[2])) { + $matches[4] = str_replace("CHEVRONescC", ">>",$matches[4]); + $matches[4] = str_replace("CHEVRONescO", "<<",$matches[4]); + $matches[4] = preg_replace("/<(?!\s)/ms", "__GESHI_OPEN__", $matches[4]); + } + else { + if( preg_match("/MULTI/",$matches[0])) { + $open = "< "; + $close = " >"; + } + else { + $open = "<"; + $close = ">"; + } + $matches[4] = preg_replace("/<(?!\s)/ms", $open, $matches[4]); + $matches[4] = preg_replace("/(?/ms", $close, $matches[4]); + } + $matches[4] = str_replace("\"", "__GESHI_QUOT__", $matches[4]); + $matches[4] = preg_replace("/\\\\\\(\n|\s)/ms","CODE_BLOCK_EOL_MASK$1",$matches[4]); + return "<" . $matches[1] . $matches[2] . $matches[3] . $matches[4] . $matches[5];' + ), + $text + ); + + $text = preg_replace_callback( + '/~~START_HTML_BLOCK~~.*?CLOSE_HTML_BLOCK/ms', + create_function( + '$matches', + '$matches[0] = str_replace("_ckgedit_NPBBR_","",$matches[0]); + return $matches[0];' + ),$text); + + $text = preg_replace_callback( + '/(\|\s*)(|)(.*?)(<\/code>|<\/file>)\n_ckgedit_NPBBR_(?=.*?\|)/ms', + create_function( + '$matches', + '$matches[2] = preg_replace("//ms", "TPRE_CODE", $matches[2]); + $matches[2] = preg_replace("//ms", "TPRE_FILE", $matches[2]); + $matches[4] = "TPRE_CLOSE"; + $matches[3] = preg_replace("/^\n+/", "TC_NL",$matches[3]); + $matches[3] = preg_replace("/\n/ms", "TC_NL",$matches[3]); + return $matches[1] . $matches[2] . trim($matches[3]) . $matches[4];' + ), + $text + ); + $text = preg_replace('/TPRE_CLOSE\s+/ms',"TPRE_CLOSE",$text); + $text = preg_replace('/<(?!code|file|nowiki|del|sup|sub|\/\/|\s|\/del|\/code|\/nowiki|\/file|\/sup|\/sub)/ms',"<",$text); + $text = str_replace(array('',''),array('NWIKISTART','NWIKICLOSE'),$text); + $text = str_replace('%%<', '%%<', $text); + } + + if($this->getConf('duplicate_notes')) { + $text = preg_replace_callback('/\(\((.*?)\)\)/ms', + create_function( + '$matches', + 'static $count = 0; + $count++; + $ins = "FNoteINSert" . $count; + $needles = array("[","]", "/", ".", "*", "_","\'","<",">","%", "{", "}", "\\\","("); + $replacements = array("[","]","/", ".", "*", "_", "'", "<",">","%", "{","}", "\","("); + $matches[1] = str_replace($needles, $replacements, $matches[1]); + return "(($ins" . $matches[1] . "))" ;' + ), $text + ); + } + $text = preg_replace('/^\>/ms',"_QUOT_",$text); // dw quotes + $text = str_replace('>>','CHEVRONescC',$text); + $text = str_replace('<<','CHEVRONescO',$text); + $text = preg_replace('/(={3,}.*?)(\{\{.*?\}\})(.*?={3,})/',"$1$3\n$2",$text); + $email_regex = '/\/\/\<\/\/(.*?@.*?)>/'; + $text = preg_replace($email_regex,"<$1>",$text); + + $text = preg_replace('/{{(.*)\.swf(\s*)}}/ms',"__SWF__$1.swf$2__FWS__",$text); + $text = preg_replace('/PERCNWPERC/ms', '%%< nowiki >%%',$text); + //$text = preg_replace('/%%\s*<(code|file)>\s*%%/ms', 'PERC' . "$1" . 'PERC',$text); + $text = preg_replace('/PERCcodePERC/ms','%%<code>%%', $text); + $text = preg_replace('/PERCfilePERC/ms','%%<file>%%', $text); + $divalign = false; + if($this->helper->has_plugin('divalign2') + ||$this->helper->has_plugin('divalign2_center')) { + $divalign = true; + $text = preg_replace_callback('/\n([;#]{3})/', + + function ($matches) { + return "divalNLine" . str_replace('#','CGEHASH',$matches[1]); + }, $text + ); + } + $text = preg_replace_callback( + '|((.*?<\/code>)|ms', + function($matches) { + $retstr = $matches[1] . ">\n/*" . $matches[2] . "*/\n" . $matches[3]; + return $retstr; + }, $text + ); + + $this->xhtml = $this->_render_xhtml($text); + + /*interwiki frasl refactoring*/ + // $this->xhtml = str_replace("__IWIKI_FSLASH__", "⁄", $this->xhtml); + if($this->getConf('duplicate_notes')) { + $this->xhtml = preg_replace("/FNoteINSert\d+/ms", "",$this->xhtml); + } + if($divalign) { + $this->xhtml = str_replace("CGEHASH", "#", $this->xhtml); + } + $this->xhtml = str_replace("__GESHI_QUOT__", '"', $this->xhtml); + $this->xhtml = str_replace("__GESHI_OPEN__", "< ", $this->xhtml); + $this->xhtml = str_replace('CHEVRONescC', '>>',$this->xhtml); + $this->xhtml = str_replace('CHEVRONescO', '<<',$this->xhtml); + $this->xhtml = preg_replace('/_QUOT_/ms','>',$this->xhtml); // dw quotes + $this->xhtml = preg_replace_callback( + "/^(>+)(.*?)$/ms", + function($matches) { + $matches[2] = str_ireplace('
',"",$matches[2]); + return $matches[1] . $matches[2] . "
"; + }, + $this->xhtml + ); + + if($pos !== false) { + $this->xhtml = preg_replace_callback( + '/(TPRE_CODE|TPRE_FILE)(.*?)(TPRE_CLOSE)/ms', + create_function( + '$matches', + '$matches[1] = preg_replace("/TPRE_CODE/","
\n", $matches[1]);  
+                    $matches[1] = preg_replace("/TPRE_FILE/","
\n", $matches[1]);  
+                    $matches[2] = preg_replace("/TC_NL/ms", "\n", $matches[2]);  
+                    $matches[3] = "
"; + return $matches[1] . $matches[2] . $matches[3];' + ), + $this->xhtml + ); + + } + $this->xhtml = preg_replace_callback( + '/~~START_HTML_BLOCK~~[\n\s]*(.*?)CLOSE_HTML_BLOCK/ms', + create_function( + '$matches', + '$matches[1] = str_replace("&","&",$matches[1]); + $matches[1] = html_entity_decode($matches[1],ENT_QUOTES, "UTF-8"); + $matches[1] = preg_replace("/<\/?code.*?>/", "",$matches[1]); + $matches[1] = preg_replace("/^\s*<\/p>/","",$matches[1]); + $tmp = explode("\n", $matches[1]); + for($n=0; $n<7; $n++) { + if( (preg_match("/(

\s*)*( |\s+)<\/p>/",$tmp[$n])) || (preg_match("/^\s+$/",$tmp[$n]))) { + unset($tmp[$n]); + } + } + return "~~START_HTML_BLOCK~~" . implode("\n",$tmp) . "CLOSE_HTML_BLOCK"; ' + ),$this->xhtml); + + $this->xhtml = preg_replace_callback( + '/()(.*?)(<\/pre>)/ms', + create_function( + '$matches', + '$matches[4] = preg_replace("/(\||\^)[ ]+(\||\^)/ms","$1   $2" , $matches[4]); + return $matches[1] . $matches[2] . $matches[3] . $matches[4] . $matches[5];' + ), + $this->xhtml + ); + + $this->xhtml = preg_replace_callback( + '/~~MULTI_PLUGIN_OPEN~~(.*?)~~MULTI_PLUGIN_CLOSE~~/ms', + create_function( + '$matches', + 'return str_replace("<", "< ",$matches[0]);' + ), + $this->xhtml + ); + //insures breaks are retained for single spacing + $this->xhtml = preg_replace('/

\s*\s*<\/p>/ms', '
', $this->xhtml); + + if($this->draft_started) return $this->xhtml; + $cname = getCacheName($INFO['client'].$ID,'.draft.fckl'); + + $this->draft_started = false; + if(file_exists($cname) && !$this->draft_started) { + + $this->draft_started = true; + + $cdata = unserialize(io_readFile($cname,false)); + $prefix = isset($cdata['prefix']) ? urldecode($cdata['prefix']) : "" ; + if($prefix) $prefix = $this-> _preprocess($prefix); + $text = urldecode($cdata['text']); + $suffix = isset($cdata['suffix']) ? urldecode($cdata['suffix']) : "" ; + + if($suffix) $suffix = $this-> _preprocess($suffix); + + preg_match_all("/<\/(.*?)\>/", $cdata['text'],$matches); + /* exclude drafts saved from preview mode */ + if (!in_array('code', $matches[1]) && !in_array('file', $matches[1]) && !in_array('nowiki', $matches[1])) { + //$this->draft_text = $cdata['text']; + $this->draft_text = $prefix . $text . $suffix; + $this->draft_found = true; + msg($this->getLang('draft_msg')) ; + } + unlink($cname); + } + if($draft_started) return $this->xhtml; + return true; + } + + + /** + Check for for alternate style sheet + */ + function alt_style_sheet() { + $stylesheet = DOKU_PLUGIN . 'ckgedit/ckeditor/css/_style.css'; + if(file_exists($stylesheet)) { + global $conf; + $tpl_name = $conf['template']; + if($fh = fopen($stylesheet,"r")) { + $line_num = 0; + while (!feof($fh) && $line_num < 4) { + $line = fgets($fh,1024); //msg($line); + if(strpos($line,$tpl_name)!==false) { + return DOKU_BASE . '/lib/plugins/ckgedit/ckeditor/css/_style.css' ; + break; + } + $line_num ++; + } + } + } + return ""; + } + + + /** + * function _print + * @author Myron Turner + */ + function _print() + { + global $INFO; + global $lang; + global $ckgedit_lang; + global $ID; + global $REV; + global $DATE; + global $PRE; + global $SUF; + global $SUM; + $wr = $INFO['writable']; + if($wr){ + if ($REV) print p_locale_xhtml('editrev'); + $ro=false; + }else{ + // check pseudo action 'source' + if(!actionOK('source')){ + msg('Command disabled: source',-1); + return false; + } + print p_locale_xhtml('read'); + $ro='readonly="readonly"'; + } + + if(!$DATE) $DATE = $INFO['lastmod']; + $guest_toolbar = $this->getConf('guest_toolbar'); + $guest_media = $this->getConf('guest_media'); + if(!isset($INFO['userinfo']) && !$guest_toolbar) { + $toolbar = "DokuwikiNoGuest"; + } + else if(!isset($INFO['userinfo']) && !$guest_media) { + $toolbar = "DokuwikiGuest"; + } + else $toolbar = 'Dokuwiki'; + +$height = isset($_COOKIE['ckgEdht']) && $_COOKIE['ckgEdht'] ? $_COOKIE['ckgEdht']: 250; +if(!is_numeric($height)) $height = 250; +$fbsz_increment = isset($_COOKIE['fbsz']) && $_COOKIE['fbsz'] ? $_COOKIE['fbsz'] : false; +$fbrowser_width = 1070; +$fbrowser_height = 660; +if($fbsz_increment) { + $fbrowser_width = $fbrowser_width + ($fbrowser_width*($fbsz_increment/100)); + $fbrowser_height =$fbrowser_height + ($fbrowser_height*($fbsz_increment/100)); +} + +$doku_base= rtrim(DOKU_BASE,'/'); +$ns = getNS($_COOKIE['FCK_NmSp']); + +//get user file browser if allowed +if ($this->getConf('allow_ckg_filebrowser') == 'all') { + $fb = $this->getUserFb(); +} else { + //use only allowed file browser + $fb = $this->getConf('allow_ckg_filebrowser'); +} + +//setup options +if ($fb == 'dokuwiki') { + $fbOptions = "filebrowserImageBrowseUrl: \"$doku_base/lib/exe/mediamanager.php?ns=$ns&edid=wiki__text&onselect=ckg_edit_mediaman_insert&ckg_media=img\", + filebrowserBrowseUrl: \"$doku_base/lib/exe/mediamanager.php?ns=$ns&edid=wiki__text&onselect=ckg_edit_mediaman_insertlink&ckg_media=link\""; +} else { + $fbOptions = "filebrowserImageBrowseUrl : \"$doku_base/lib/plugins/ckgedit/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=$doku_base/lib/plugins/ckgedit/fckeditor/editor/filemanager/connectors/php/connector.php\", + filebrowserBrowseUrl: \"$doku_base/lib/plugins/ckgedit/fckeditor/editor/filemanager/browser/default/browser.html?Type=File&Connector=$doku_base/lib/plugins/ckgedit/fckeditor/editor/filemanager/connectors/php/connector.php\""; +} +if($this->getConf('style_sheet')) { +$contents_css = $this->alt_style_sheet(); +} +//msg($contents_css); +$ckeditor_replace =<<helper->registerOnLoad($ckeditor_replace); + + global $skip_styling; + +?> +page_from_template) { + $ckg_template = 'tpl'; + } + else $ckg_template =""; + + if($INPUT->has('hid')) { + $hid = $INPUT->str('hid'); + } + else { + $hid = ""; + } + /* accommodates include plugin's redirect to original page after editing included page */ + $ckgedit_redirect = $INPUT->str('redirect_id', ""); + + ?> +

+
+ + + + + + + + + + + + + + + + + +
+xhtml=<<go to top | back to Index | Wiki start page ] +ERRTXT;*/ +?> + + + +helper->dw_edit_displayed(); +$is_ckgeditChrome = false; + if(stripos($_SERVER['HTTP_USER_AGENT'],'Chrome') !== false) { + preg_match("/Chrome\/(\d+)/", $_SERVER['HTTP_USER_AGENT'],$cmatch); + if((int)$cmatch[1] <26) $is_ckgeditChrome =true; +} + +?> + +
+ + +
+ + + /> + + + name="do[delete]" value="" + title="getLang('title_dw_delete') ?>" + style = "font-size: 100%;" + /> + + + + + + style = "font-size: 100%;" + type="submit" + name="do[save]" + value="getLang('btn_dw_edit')?>" + title="getLang('title_dw_edit')?>" + /> + + + getConf('allow_ckg_filebrowser') == 'all'): ?> + + +test ? 'inline' : 'none'; + $chrome_dwedit_link = 'DW Edit'; + $backup_btn =$this->getLang('dw_btn_backup') ? $this->getLang('dw_btn_backup') : $this->getLang('dw_btn_refresh'); + $backup_title = $this->getLang('title_dw_backup') ? $this->getLang('title_dw_backup') : $this->getLang('title_dw_refresh'); + $using_scayt = ($this->getConf('scayt')) == 'on'; + +?> + + + + + + + draft_found) { ?> + + + + + + + + + + +     + + +
+ + + + debug) { ?> + + +
+ + +
+
+
+
      + + [ close ]    +
+ +
+ + + +    + px +    +   + + + title=" " /> + + + + + + + + +
+ + + +
+ + + +
+ + captcha && $this->captcha->isEnabled()) echo $this->captcha->getHTML(); ?> +
+ + + +
+ + + + + + */ + function _render_xhtml($text){ + $mode = 'ckgedit'; + + global $skip_styling; + $skip_styling = $this->getConf('nofont_styling'); + if(!$skip_styling && $_POST['styling'] == 'no_styles') { + $skip_styling = true; + } + + if(strpos($text,'~~NO_STYLING~~') !== false) { + $skip_styling = true; + } + // $text = preg_replace("/\\\\(\n|\s)/ms","CODE_BLOCK_EOL_MASK$1",$text); + $text = preg_replace_callback('/\[\[(.*?>)(.*?)\]\]/ms', + function ($matches) { + if(strpos($matches[0],"\n") !== false) return $matches[0]; + if(preg_match("#<(\w+)>.*?<\/\\1>#",$matches[0])) return $matches[0]; + list($name,$link_text) = explode('|',$matches[2]); + $retv = '[[' . $matches[1] . "oIWIKIo" . $name ."cIWIKIc"; + if(!empty($link_text)) { + $retv .= "|$link_text"; + } + return $retv . ']]'; + }, + $text); + + // try default renderer first: + $file = DOKU_INC."inc/parser/$mode.php"; + + if(@file_exists($file)){ + + require_once $file; + $rclass = "Doku_Renderer_$mode"; + + if ( !class_exists($rclass) ) { + trigger_error("Unable to resolve render class $rclass",E_USER_WARNING); + msg("Renderer for $mode not valid",-1); + return null; + } + $Renderer = new $rclass(); + } + else{ + // Maybe a plugin is available? + $Renderer = plugin_load('renderer',$mode); + if(is_null($Renderer)){ + msg("No renderer for $mode found",-1); + return null; + } + } +// aimed at wrap plugin which allows multiple newlines in a cell +$text = preg_replace_callback( + '#(\|.*?)\|.?[\n\r]#ms', + function ($matches) { + $matches[0] = preg_replace("#\\\\\\\\\s*[\r\n]#ms", " \\\\\\\\ ",$matches[0]); + return ($matches[0]); + }, + $text); + + // prevents utf8 conversions of quotation marks + $text = str_replace('"',"_ckgedit_QUOT_",$text); + + $text = preg_replace_callback('/()([^<]+)(<\/code>)/ms', + create_function( + '$matches', + '$quot = str_replace("_ckgedit_QUOT_",\'"\',$matches[2]); + $quot = str_replace("\\\\ ","_ckgedit_NL",$quot); + $quot .= "_ckgedit_NL"; + return $matches[1] . $quot . $matches[3];' + ), $text); + + $text = preg_replace_callback('/()([^<]+)(<\/file>)/ms', + create_function( + '$matches', + '$quot = str_replace("_ckgedit_QUOT_",\'"\',$matches[2]); + $quot = str_replace("\\\\ ","_ckgedit_NL",$quot); + $quot .= "_ckgedit_NL"; + return $matches[1] . $quot . $matches[3];' + ), $text); + + $text = preg_replace_callback('/\|([\s\S]+)\|/ms', // prevents extra backslash from hanging on a new line + function ($matches) { + if(!strpos($matches[1], "_ckgedit_NL")) return $matches[0]; + $matches[1] = str_replace("\\_ckgedit_NL","_ckgedit_NL",$matches[1]); + + return '|' . $matches[1] . '|'; + return $matches[0]; + }, + $text + ); + + $text = preg_replace_callback('/(|)([^<]+)(<\/code>|<\/file>)/ms', + create_function( + '$matches', + '$matches[2] = str_replace("<font","ckgeditFONTOpen",$matches[2]); + $matches[2] = str_replace("font>","ckgeditFONTClose",$matches[2]); + return $matches[1] .$matches[2] . $matches[3]; ' + ), $text); + $text = str_replace('CODE_BLOCK_EOL_MASK','\\', $text); + /// msg($text); + $instructions = p_get_instructions("=== header ==="); // loads DOKU_PLUGINS array --M.T. Dec 22 2009 + + $instructions = p_get_instructions($text); + if(is_null($instructions)) return ''; + + $Renderer->notoc(); + if(!$this->getConf('smiley_as_text')) { + $Renderer->smileys = getSmileys(); + } + $Renderer->entities = getEntities(); + $Renderer->acronyms = array(); + $Renderer->interwiki = getInterwiki(); + + // Loop through the instructions + /* + By-passing plugin processing was sugested and first implemented + by Matti Lattu + It is a significant contribution to the functionality of ckgEdit + */ + foreach ( $instructions as $instruction ) { + if ($instruction[0] == 'plugin') { + $Renderer->doc .= $instruction[1][3]; + } else { + // Execute the callback against the Renderer + call_user_func_array(array(&$Renderer, $instruction[0]),$instruction[1]); + } + } + + //set info array + $info = $Renderer->info; + + // Post process and return the output + $data = array($mode,& $Renderer->doc); + if(class_exists('dokuwiki\Extension\Event')) { + Event::createAndTrigger('RENDERER_CONTENT_POSTPROCESS', $data); + } + else { + trigger_event('RENDERER_CONTENT_POSTPROCESS',$data); + } + + $xhtml = $Renderer->doc; + $xhtml = str_replace( + array('NWIKISTART','NWIKICLOSE'), + array('&lt;nowiki>','&lt;/nowiki>'),$xhtml); + + if(!$skip_styling) { // create font styles from font plugin markup for html display + $xhtml = preg_replace_callback( + '|&lt;font\s+(.*?)/([\w ,\-]+);;([\(\)),\w,\s\#]+);;([\(\)),\w,\s\#]+)>(.*?)&lt;/font>|ms', + function($matches) { + $count = 0; $str=''; + if($matches[3] && $matches[3] != 'inherit') { $str .= ''; $count++;} + if($matches[1] && $matches[1] != 'inherit') { $str .= ''; $count++; } + if($matches[2] && $matches[2] != 'inherit') { $str .= ''; $count++; } + if($matches[4] && $matches[4] != 'inherit') { $str .= ''; $count++; } + $str .= $matches[5]; + for($i =0; $i<$count; $i++) { + $str .= ''; + } + return $str; + }, $xhtml + ); + } + + /** + * Alternative to the one liner at 1179: $xhtml = str_replace(array('oiwikio','ciwikic'),array('oIWIKIo','cIWIKIc'),$xhtml); + * if it turns out that there are users using 'oiwikio','ciwikic' + $xhtml = preg_replace_callback( + '|class=\"interwiki.*?href=\".*?:oiwikiotowerciwikic\".*?title=\".*?oiwikiotowerciwikic\"|ms', + function($matches) { + $matches[0] = str_replace(array('oiwikio','ciwikic'),array('oIWIKIo','cIWIKIc'),$matches[0]); + return $matches[0]; + },$xhtml + ); + */ + if(stripos($xhtml,'oIWIKIo') !== false) { + $xhtml = str_replace(array('oiwikio','ciwikic'),array('oIWIKIo','cIWIKIc'),$xhtml); + $xhtml = preg_replace_callback( + '/oIWIKIo(.*?)cIWIKIc(?=<\/a>)/ms', + create_function( + '$matches', + ' return ">". $matches[1] ;' + ), + $xhtml + ); + + } + + $pos = strpos($xhtml, 'MULTI_PLUGIN_OPEN'); + if($pos !== false) { + $xhtml = preg_replace_callback( + '|MULTI_PLUGIN_OPEN.*?MULTI_PLUGIN_CLOSE|ms', + create_function( + '$matches', + '$matches[0] = str_replace("//",$matches[0]);' + ), + $xhtml + ); + + $xhtml = preg_replace('/~\s*~\s*MULTI_PLUGIN_OPEN~\s*~/', "\n\n~~MULTI_PLUGIN_OPEN~~\n\n\n\n", $xhtml); + $xhtml = preg_replace('/~\s*~\s*MULTI_PLUGIN_CLOSE~\s*~/', "\n\n
\n\n~~MULTI_PLUGIN_CLOSE~~\n\n", $xhtml); + + } + + + // remove empty paragraph: see _ckgedit_NPBBR_ comment above + $xhtml = preg_replace('/

\s+_ckgedit_NPBBR_\s+<\/p>/ms',"\n",$xhtml); + $xhtml = str_replace('_ckgedit_NPBBR_', " ", $xhtml); + $xhtml = str_replace('_ckgedit_QUOT_', '"', $xhtml); + $xhtml = str_replace('_ckgedit_NL', "\n", $xhtml); + $xhtml = str_replace('

', "\n\n

 

", $xhtml); + // inserts p before an initial codeblock to enable text entry above block + $xhtml = preg_replace('/^
 

\s+<\/(em|b|u|i)>/ms',"",$xhtml); + $xhtml = preg_replace("/col\d+\s+(\w+align)/ms", "$1",$xhtml); //remove col number for cell prpoerties dialog + $xhtml = str_replace('ckgeditFONTOpen', '&lt;font',$xhtml); // protect font markup in code blocks + $xhtml = str_replace('ckgeditFONTClose', 'font&gt;',$xhtml); + $xhtml = str_replace('DBLBACKSPLASH', '\\ ',$xhtml); + $xhtml = str_replace('NWPIPECHARACTER', '|',$xhtml); + $xhtml = str_replace('&lt;blockquote>','
',$xhtml); + $xhtml = str_replace('&lt;/blockquote>','
',$xhtml); + + $xhtml= preg_replace_callback( + '/(

\s*)?

(.*?)<\/blockquote>(\s*<\/p>)?/ms', + function($matches) { + $matches[0] = preg_replace("/(

)?\s*(

)\s*(<\/p>)?/m","

$2",$matches[0]); + $matches[0] = preg_replace("/(

)?\s*(<\/blockquote>)\s*(<\/p>)?/m","$2

",$matches[0]); + // $matches[0] = str_replace('
', '
', $matches[0]); + return $matches[0]; + }, $xhtml + ); + + $ua = strtolower ($_SERVER['HTTP_USER_AGENT']); + if(strpos($ua,'chrome') !== false) { + $xhtml = preg_replace_callback( + '/(?<=)/sm', + create_function( + '$matches', + '$ret_str = " " . trim($matches[3]) . " " . trim($matches[2]) . " " . trim($matches[1]) ; + return $ret_str;' + ), + $xhtml + ); + } + + return $xhtml; + } + + function write_debug($what,$line="") { + return; + $handle = fopen("ckgedit_php.txt", "a"); + // if(is_array($what)) $what = print_r($what,true); + if($line) $what = "line $line\n" . $what; + fwrite($handle,"$what\n"); + fclose($handle); + } + + function get_switch_fb_value() { + if ($this->getUserFb() == 'dokuwiki') { + $fbText = $this->getLang('btn_val_ckg_fb'); + } else { + $fbText = $this->getLang('btn_val_dw_fb'); + } + return $fbText; + } + + function get_switch_fb_title() { + if ($this->getUserFb() == 'dokuwiki') { + $fbText = $this->getLang('btn_title_ckg_fb'); + } else { + $fbText = $this->getLang('btn_title_dw_fb'); + } + return $fbText; + } + + function getUserFb() { + //get user file browser + if (!isset($_COOKIE['ckgFbOpt'])) { + $_COOKIE['ckgFbOpt'] = $this->getConf('default_ckg_filebrowser'); + } + return $_COOKIE['ckgFbOpt']; + } + +} //end of action class + +?> diff --git a/lib/plugins/ckgedit/action/ent.ser b/lib/plugins/ckgedit/action/ent.ser new file mode 100644 index 0000000..aa3ca6f --- /dev/null +++ b/lib/plugins/ckgedit/action/ent.ser @@ -0,0 +1 @@ +a:490:{i:8704;s:3:"∀";s:6:"forall";s:3:"∀";i:8706;s:3:"∂";s:4:"part";s:3:"∂";i:8707;s:3:"∃";s:5:"exist";s:3:"∃";i:8709;s:3:"∅";s:5:"empty";s:3:"∅";i:8711;s:3:"∇";s:5:"nabla";s:3:"∇";i:8712;s:3:"∈";s:4:"isin";s:3:"∈";i:8713;s:3:"∉";s:5:"notin";s:3:"∉";i:8715;s:3:"∋";s:2:"ni";s:3:"∋";i:8719;s:3:"∏";s:4:"prod";s:3:"∏";i:8721;s:3:"∑";s:3:"sum";s:3:"∑";i:8722;s:3:"−";s:5:"minus";s:3:"−";i:8727;s:3:"∗";s:6:"lowast";s:3:"∗";i:8730;s:3:"√";s:5:"radic";s:3:"√";i:8733;s:3:"∝";s:4:"prop";s:3:"∝";i:8734;s:3:"∞";s:5:"infin";s:3:"∞";i:8736;s:3:"∠";s:3:"ang";s:3:"∠";i:8743;s:3:"∧";s:3:"and";s:3:"∧";i:8744;s:3:"∨";s:2:"or";s:3:"™";i:8745;s:3:"∩";s:3:"cap";s:3:"∩";i:8746;s:3:"∪";s:3:"cup";s:3:"∪";i:8747;s:3:"∫";s:3:"int";s:3:"∫";i:8756;s:3:"∴";s:6:"there4";s:3:"∴";i:8764;s:3:"∼";s:3:"sim";s:3:"∼";i:8773;s:3:"≅";s:4:"cong";s:3:"≅";i:8776;s:3:"≈";s:5:"asymp";s:3:"≈";i:8800;s:3:"≠";s:2:"ne";s:3:"≠";i:8801;s:3:"≡";s:5:"equiv";s:3:"≡";i:8804;s:3:"≤";s:2:"le";s:3:"≤";i:8805;s:3:"≥";s:2:"ge";s:3:"≥";i:8834;s:3:"⊂";s:3:"sub";s:3:"⊂";i:8835;s:3:"⊃";s:3:"sup";s:3:"⊃";i:8836;s:3:"⊄";s:4:"nsub";s:3:"⊄";i:8838;s:3:"⊆";s:4:"sube";s:3:"⊆";i:8839;s:3:"⊇";s:4:"supe";s:3:"⊇";i:8853;s:3:"⊕";s:5:"oplus";s:3:"⊕";i:8855;s:3:"⊗";s:6:"otimes";s:3:"⊗";i:8869;s:3:"⊥";s:4:"perp";s:3:"⊥";i:8901;s:3:"⋅";s:4:"sdot";s:3:"⋅";i:913;s:2:"α";s:5:"Alpha";s:2:"Α";i:914;s:2:"β";s:4:"Beta";s:2:"Β";i:915;s:2:"γ";s:5:"Gamma";s:2:"Γ";i:916;s:2:"δ";s:5:"Delta";s:2:"Δ";i:917;s:2:"ε";s:7:"Epsilon";s:2:"Ε";i:918;s:2:"ζ";s:4:"Zeta";s:2:"Ζ";i:919;s:2:"η";s:3:"Eta";s:2:"Η";i:920;s:2:"θ";s:5:"Theta";s:2:"Θ";i:921;s:2:"ι";s:4:"Iota";s:2:"Ι";i:922;s:2:"κ";s:5:"Kappa";s:2:"Κ";i:923;s:2:"λ";s:6:"Lambda";s:2:"Λ";i:924;s:2:"μ";s:2:"Mu";s:2:"Μ";i:925;s:2:"ν";s:2:"Nu";s:2:"Ν";i:926;s:2:"ξ";s:2:"Xi";s:2:"Ξ";i:927;s:2:"ο";s:7:"Omicron";s:2:"Ο";i:928;s:2:"π";s:2:"Pi";s:2:"Π";i:929;s:2:"ρ";s:3:"Rho";s:2:"Ρ";i:931;s:2:"σ";s:5:"Sigma";s:2:"Σ";i:932;s:2:"τ";s:3:"Tau";s:2:"Τ";i:933;s:2:"υ";s:7:"Upsilon";s:2:"Υ";i:934;s:2:"φ";s:3:"Phi";s:2:"Φ";i:935;s:2:"χ";s:3:"Chi";s:2:"Χ";i:936;s:2:"ψ";s:3:"Psi";s:2:"Ψ";i:937;s:2:"ω";s:5:"Omega";s:2:"Ω";i:945;s:2:"α";s:5:"alpha";s:2:"α";i:946;s:2:"β";s:4:"beta";s:2:"β";i:947;s:2:"γ";s:5:"gamma";s:2:"γ";i:948;s:2:"δ";s:5:"delta";s:2:"δ";i:949;s:2:"ε";s:7:"epsilon";s:2:"ε";i:950;s:2:"ζ";s:4:"zeta";s:2:"ζ";i:951;s:2:"η";s:3:"eta";s:2:"η";i:952;s:2:"θ";s:5:"theta";s:2:"θ";i:953;s:2:"ι";s:4:"iota";s:2:"ι";i:954;s:2:"κ";s:5:"kappa";s:2:"κ";i:955;s:2:"λ";s:6:"lambda";s:2:"λ";i:956;s:2:"μ";s:2:"mu";s:2:"μ";i:957;s:2:"ν";s:2:"nu";s:2:"ν";i:958;s:2:"ξ";s:2:"xi";s:2:"ξ";i:959;s:2:"ο";s:7:"omicron";s:2:"ο";i:960;s:2:"π";s:2:"pi";s:2:"π";i:961;s:2:"ρ";s:3:"rho";s:2:"ρ";i:962;s:2:"ς";s:6:"sigmaf";s:2:"ς";i:963;s:2:"σ";s:5:"sigma";s:2:"σ";i:964;s:2:"τ";s:3:"tau";s:2:"τ";i:965;s:2:"υ";s:7:"upsilon";s:2:"υ";i:966;s:2:"φ";s:3:"phi";s:2:"φ";i:967;s:2:"χ";s:3:"chi";s:2:"χ";i:968;s:2:"ψ";s:3:"psi";s:2:"ψ";i:969;s:2:"ω";s:5:"omega";s:2:"ω";i:977;s:2:"ϑ";s:8:"thetasym";s:2:"ϑ";i:978;s:2:"ϒ";s:5:"upsih";s:2:"ϒ";i:982;s:2:"ϖ";s:3:"piv";s:2:"ϖ";i:338;s:2:"œ";s:5:"OElig";s:2:"Œ";i:339;s:2:"œ";s:5:"oelig";s:2:"œ";i:352;s:2:"š";s:6:"Scaron";s:2:"Š";i:353;s:2:"š";s:6:"scaron";s:2:"š";i:376;s:2:"ÿ";s:4:"Yuml";s:2:"Ÿ";i:402;s:2:"ƒ";s:4:"fnof";s:2:"ƒ";i:710;s:2:"ˆ";s:4:"circ";s:2:"ˆ";i:732;s:2:"˜";s:5:"tilde";s:2:"˜";i:8194;s:3:" ";s:4:"ensp";s:3:" ";i:8195;s:3:" ";s:4:"emsp";s:3:" ";i:8201;s:3:" ";s:6:"thinsp";s:3:" ";i:8204;s:3:"‌";s:4:"zwnj";s:3:"‌";i:8205;s:3:"‍";s:3:"zwj";s:3:"‍";i:8206;s:3:"‎";s:3:"lrm";s:3:"‎";i:8207;s:3:"‏";s:3:"rlm";s:3:"‏";i:8211;s:3:"–";s:5:"ndash";s:3:"–";i:8212;s:3:"—";s:5:"mdash";s:3:"—";i:8216;s:3:"‘";s:5:"lsquo";s:3:"‘";i:8217;s:3:"’";s:5:"rsquo";s:3:"’";i:8218;s:3:"‚";s:5:"sbquo";s:3:"‚";i:8220;s:3:"“";s:5:"ldquo";s:3:"“";i:8221;s:3:"”";s:5:"rdquo";s:3:"”";i:8222;s:3:"„";s:5:"bdquo";s:3:"„";i:8224;s:3:"†";s:6:"dagger";s:3:"†";i:8225;s:3:"†";s:6:"Dagger";s:3:"‡";i:8226;s:3:"•";s:4:"bull";s:3:"•";i:8230;s:3:"…";s:6:"hellip";s:3:"…";i:8240;s:3:"‰";s:6:"permil";s:3:"‰";i:8242;s:3:"′";s:5:"prime";s:3:"′";i:8243;s:3:"′";s:5:"Prime";s:3:"″";i:8249;s:3:"‹";s:6:"lsaquo";s:3:"‹";i:8250;s:3:"›";s:6:"rsaquo";s:3:"›";i:8254;s:3:"‾";s:5:"oline";s:3:"‾";i:8364;s:3:"€";s:4:"euro";s:3:"€";i:8482;s:3:"™";i:8592;s:3:"←";s:4:"larr";s:3:"←";i:8593;s:3:"↑";s:4:"uarr";s:3:"↑";i:8594;s:3:"→";s:4:"rarr";s:3:"→";i:8595;s:3:"↓";s:4:"darr";s:3:"↓";i:8596;s:3:"↔";s:4:"harr";s:3:"↔";i:8629;s:3:"↵";s:5:"crarr";s:3:"↵";i:8968;s:3:"⌈";s:5:"lceil";s:3:"⌈";i:8969;s:3:"⌉";s:5:"rceil";s:3:"⌉";i:8970;s:3:"⌊";s:6:"lfloor";s:3:"⌊";i:8971;s:3:"⌋";s:6:"rfloor";s:3:"⌋";i:9674;s:3:"◊";s:3:"loz";s:3:"◊";i:9824;s:3:"♠";s:6:"spades";s:3:"♠";i:9827;s:3:"♣";s:5:"clubs";s:3:"♣";i:9829;s:3:"♥";s:6:"hearts";s:3:"♥";i:9830;s:3:"♦";s:5:"diams";s:3:"♦";i:161;s:2:"¡";s:5:"iexcl";s:2:"¡";i:162;s:2:"¢";s:4:"cent";s:2:"¢";i:163;s:2:"£";s:5:"pound";s:2:"£";i:164;s:2:"¤";s:6:"curren";s:2:"¤";i:165;s:2:"¥";s:3:"yen";s:2:"¥";i:166;s:2:"¦";s:6:"brvbar";s:2:"¦";i:167;s:2:"§";s:4:"sect";s:2:"§";i:168;s:2:"¨";s:3:"uml";s:2:"¨";i:169;s:2:"©";s:4:"copy";s:2:"©";i:170;s:2:"ª";s:4:"ordf";s:2:"ª";i:171;s:2:"«";s:5:"laquo";s:2:"«";i:172;s:2:"¬";s:3:"not";s:2:"¬";i:173;s:2:"­";s:3:"shy";s:2:"­";i:174;s:2:"®";s:3:"reg";s:2:"®";i:175;s:2:"¯";s:4:"macr";s:2:"¯";i:176;s:2:"°";s:3:"deg";s:2:"°";i:177;s:2:"±";s:6:"plusmn";s:2:"±";i:178;s:2:"²";s:4:"sup2";s:2:"²";i:179;s:2:"³";s:4:"sup3";s:2:"³";i:180;s:2:"´";s:5:"acute";s:2:"´";i:181;s:2:"µ";s:5:"micro";s:2:"µ";i:182;s:2:"¶";s:4:"para";s:2:"¶";i:183;s:2:"·";s:6:"middot";s:2:"·";i:184;s:2:"¸";s:5:"cedil";s:2:"¸";i:185;s:2:"¹";s:4:"sup1";s:2:"¹";i:186;s:2:"º";s:4:"ordm";s:2:"º";i:187;s:2:"»";s:5:"raquo";s:2:"»";i:188;s:2:"¼";s:6:"frac14";s:2:"¼";i:189;s:2:"½";s:6:"frac12";s:2:"½";i:190;s:2:"¾";s:6:"frac34";s:2:"¾";i:191;s:2:"¿";s:6:"iquest";s:2:"¿";i:215;s:2:"×";s:5:"times";s:2:"×";i:247;s:2:"÷";s:6:"divide";s:2:"÷";i:192;s:2:"à";s:6:"Agrave";s:2:"À";i:193;s:2:"á";s:6:"Aacute";s:2:"Á";i:194;s:2:"â";s:5:"Acirc";s:2:"Â";i:195;s:2:"ã";s:6:"Atilde";s:2:"Ã";i:196;s:2:"Ä";s:4:"Auml";s:2:"Ä";i:197;s:2:"å";s:5:"Aring";s:2:"Å";i:198;s:2:"æ";s:5:"AElig";s:2:"Æ";i:199;s:2:"ç";s:6:"Ccedil";s:2:"Ç";i:200;s:2:"è";s:6:"Egrave";s:2:"È";i:201;s:2:"é";s:6:"Eacute";s:2:"É";i:202;s:2:"ê";s:5:"Ecirc";s:2:"Ê";i:203;s:2:"Ë";s:4:"Euml";s:2:"Ë";i:204;s:2:"ì";s:6:"Igrave";s:2:"Ì";i:205;s:2:"í";s:6:"Iacute";s:2:"Í";i:206;s:2:"î";s:5:"Icirc";s:2:"Î";i:207;s:2:"ï";s:4:"Iuml";s:2:"Ï";i:208;s:2:"ð";s:3:"ETH";s:2:"Ð";i:209;s:2:"ñ";s:6:"Ntilde";s:2:"Ñ";i:210;s:2:"ò";s:6:"Ograve";s:2:"Ò";i:211;s:2:"ó";s:6:"Oacute";s:2:"Ó";i:212;s:2:"ô";s:5:"Ocirc";s:2:"Ô";i:213;s:2:"õ";s:6:"Otilde";s:2:"Õ";i:214;s:2:"Ö";s:4:"Ouml";s:2:"Ö";i:216;s:2:"ø";s:6:"Oslash";s:2:"Ø";i:217;s:2:"ù";s:6:"Ugrave";s:2:"Ù";i:218;s:2:"ú";s:6:"Uacute";s:2:"Ú";i:219;s:2:"û";s:5:"Ucirc";s:2:"Û";i:220;s:2:"Ü";s:4:"Uuml";s:2:"Ü";i:221;s:2:"ý";s:6:"Yacute";s:2:"Ý";i:222;s:2:"þ";s:5:"THORN";s:2:"Þ";i:223;s:2:"ß";s:5:"szlig";s:2:"ß";i:224;s:2:"à";s:6:"agrave";s:2:"à";i:225;s:2:"á";s:6:"aacute";s:2:"á";i:226;s:2:"â";s:5:"acirc";s:2:"â";i:227;s:2:"ã";s:6:"atilde";s:2:"ã";i:228;s:2:"ä";s:4:"auml";s:2:"ä";i:229;s:2:"å";s:5:"aring";s:2:"å";i:230;s:2:"æ";s:5:"aelig";s:2:"æ";i:231;s:2:"ç";s:6:"ccedil";s:2:"ç";i:232;s:2:"è";s:6:"egrave";s:2:"è";i:233;s:2:"é";s:6:"eacute";s:2:"é";i:234;s:2:"ê";s:5:"ecirc";s:2:"ê";i:235;s:2:"ë";s:4:"euml";s:2:"ë";i:236;s:2:"ì";s:6:"igrave";s:2:"ì";i:237;s:2:"í";s:6:"iacute";s:2:"í";i:238;s:2:"î";s:5:"icirc";s:2:"î";i:239;s:2:"ï";s:4:"iuml";s:2:"ï";i:240;s:2:"ð";s:3:"eth";s:2:"ð";i:241;s:2:"ñ";s:6:"ntilde";s:2:"ñ";i:242;s:2:"ò";s:6:"ograve";s:2:"ò";i:243;s:2:"ó";s:6:"oacute";s:2:"ó";i:244;s:2:"ô";s:5:"ocirc";s:2:"ô";i:245;s:2:"õ";s:6:"otilde";s:2:"õ";i:246;s:2:"ö";s:4:"ouml";s:2:"ö";i:248;s:2:"ø";s:6:"oslash";s:2:"ø";i:249;s:2:"ù";s:6:"ugrave";s:2:"ù";i:250;s:2:"ú";s:6:"uacute";s:2:"ú";i:251;s:2:"û";s:5:"ucirc";s:2:"û";i:252;s:2:"ü";s:4:"uuml";s:2:"ü";i:253;s:2:"ý";s:6:"yacute";s:2:"ý";i:254;s:2:"þ";s:5:"thorn";s:2:"þ";i:255;s:2:"ÿ";s:4:"yuml";s:2:"ÿ";s:5:"trade";s:3:"™";i:32;s:1:" ";s:4:"nbsp";s:1:" ";s:4:"quot";s:1:""";i:34;s:1:""";s:3:"amp";s:1:"&";i:38;s:1:"&";s:2:"lt";s:1:"<";i:60;s:1:"<";s:2:"gt";s:1:">";i:62;s:1:">";s:5:"frasl";s:3:"⁄";i:8260;s:3:"⁄";i:8656;s:3:"⇐";i:8657;s:3:"↑";i:8658;s:3:"⇒";i:8659;s:3:"↓";i:8660;s:3:"⇔";s:4:"hArr";s:3:"⇔";s:4:"rArr";s:3:"⇒";s:4:"lArr";s:3:"⇐";} \ No newline at end of file diff --git a/lib/plugins/ckgedit/action/entities/ENTITIES.HOWTO b/lib/plugins/ckgedit/action/entities/ENTITIES.HOWTO new file mode 100644 index 0000000..806a5a5 --- /dev/null +++ b/lib/plugins/ckgedit/action/entities/ENTITIES.HOWTO @@ -0,0 +1,55 @@ +Adding Entities to the Entities Defintions Array. + +You create an Entity definition file with the format illustrated below, and then run the php +script ents_seri.php + +Name your definitions file add.ent + +Then at the command line type: + php ents_seri.php + +Alternatively, you can give your entity definition file any name you want and feed +the file name to the script at the command line: + php ents_seri.php your_entity_file + +This creates a new entities file called ent.ser, which must then be copied to +the fckg/action subdirectory. You would be wise to first back up the original ent.ser +before over-writing it. + +There are two definition files in the action/entities: ents.data and fcked-ents.data. +These are required and must not be removed from the directory. + +The definition file has the following format: + +character +entity numeric code +entity character code + +character +entity numeric code +entity character code + +etc. + +There is one empty line between each definition. Here is an actual example. + +< +< +< + +> +> +> + + +¡ +¡ + + +¢ +¢ + + +£ +£ + diff --git a/lib/plugins/ckgedit/action/entities/ent.ser b/lib/plugins/ckgedit/action/entities/ent.ser new file mode 100644 index 0000000..aa3ca6f --- /dev/null +++ b/lib/plugins/ckgedit/action/entities/ent.ser @@ -0,0 +1 @@ +a:490:{i:8704;s:3:"∀";s:6:"forall";s:3:"∀";i:8706;s:3:"∂";s:4:"part";s:3:"∂";i:8707;s:3:"∃";s:5:"exist";s:3:"∃";i:8709;s:3:"∅";s:5:"empty";s:3:"∅";i:8711;s:3:"∇";s:5:"nabla";s:3:"∇";i:8712;s:3:"∈";s:4:"isin";s:3:"∈";i:8713;s:3:"∉";s:5:"notin";s:3:"∉";i:8715;s:3:"∋";s:2:"ni";s:3:"∋";i:8719;s:3:"∏";s:4:"prod";s:3:"∏";i:8721;s:3:"∑";s:3:"sum";s:3:"∑";i:8722;s:3:"−";s:5:"minus";s:3:"−";i:8727;s:3:"∗";s:6:"lowast";s:3:"∗";i:8730;s:3:"√";s:5:"radic";s:3:"√";i:8733;s:3:"∝";s:4:"prop";s:3:"∝";i:8734;s:3:"∞";s:5:"infin";s:3:"∞";i:8736;s:3:"∠";s:3:"ang";s:3:"∠";i:8743;s:3:"∧";s:3:"and";s:3:"∧";i:8744;s:3:"∨";s:2:"or";s:3:"™";i:8745;s:3:"∩";s:3:"cap";s:3:"∩";i:8746;s:3:"∪";s:3:"cup";s:3:"∪";i:8747;s:3:"∫";s:3:"int";s:3:"∫";i:8756;s:3:"∴";s:6:"there4";s:3:"∴";i:8764;s:3:"∼";s:3:"sim";s:3:"∼";i:8773;s:3:"≅";s:4:"cong";s:3:"≅";i:8776;s:3:"≈";s:5:"asymp";s:3:"≈";i:8800;s:3:"≠";s:2:"ne";s:3:"≠";i:8801;s:3:"≡";s:5:"equiv";s:3:"≡";i:8804;s:3:"≤";s:2:"le";s:3:"≤";i:8805;s:3:"≥";s:2:"ge";s:3:"≥";i:8834;s:3:"⊂";s:3:"sub";s:3:"⊂";i:8835;s:3:"⊃";s:3:"sup";s:3:"⊃";i:8836;s:3:"⊄";s:4:"nsub";s:3:"⊄";i:8838;s:3:"⊆";s:4:"sube";s:3:"⊆";i:8839;s:3:"⊇";s:4:"supe";s:3:"⊇";i:8853;s:3:"⊕";s:5:"oplus";s:3:"⊕";i:8855;s:3:"⊗";s:6:"otimes";s:3:"⊗";i:8869;s:3:"⊥";s:4:"perp";s:3:"⊥";i:8901;s:3:"⋅";s:4:"sdot";s:3:"⋅";i:913;s:2:"α";s:5:"Alpha";s:2:"Α";i:914;s:2:"β";s:4:"Beta";s:2:"Β";i:915;s:2:"γ";s:5:"Gamma";s:2:"Γ";i:916;s:2:"δ";s:5:"Delta";s:2:"Δ";i:917;s:2:"ε";s:7:"Epsilon";s:2:"Ε";i:918;s:2:"ζ";s:4:"Zeta";s:2:"Ζ";i:919;s:2:"η";s:3:"Eta";s:2:"Η";i:920;s:2:"θ";s:5:"Theta";s:2:"Θ";i:921;s:2:"ι";s:4:"Iota";s:2:"Ι";i:922;s:2:"κ";s:5:"Kappa";s:2:"Κ";i:923;s:2:"λ";s:6:"Lambda";s:2:"Λ";i:924;s:2:"μ";s:2:"Mu";s:2:"Μ";i:925;s:2:"ν";s:2:"Nu";s:2:"Ν";i:926;s:2:"ξ";s:2:"Xi";s:2:"Ξ";i:927;s:2:"ο";s:7:"Omicron";s:2:"Ο";i:928;s:2:"π";s:2:"Pi";s:2:"Π";i:929;s:2:"ρ";s:3:"Rho";s:2:"Ρ";i:931;s:2:"σ";s:5:"Sigma";s:2:"Σ";i:932;s:2:"τ";s:3:"Tau";s:2:"Τ";i:933;s:2:"υ";s:7:"Upsilon";s:2:"Υ";i:934;s:2:"φ";s:3:"Phi";s:2:"Φ";i:935;s:2:"χ";s:3:"Chi";s:2:"Χ";i:936;s:2:"ψ";s:3:"Psi";s:2:"Ψ";i:937;s:2:"ω";s:5:"Omega";s:2:"Ω";i:945;s:2:"α";s:5:"alpha";s:2:"α";i:946;s:2:"β";s:4:"beta";s:2:"β";i:947;s:2:"γ";s:5:"gamma";s:2:"γ";i:948;s:2:"δ";s:5:"delta";s:2:"δ";i:949;s:2:"ε";s:7:"epsilon";s:2:"ε";i:950;s:2:"ζ";s:4:"zeta";s:2:"ζ";i:951;s:2:"η";s:3:"eta";s:2:"η";i:952;s:2:"θ";s:5:"theta";s:2:"θ";i:953;s:2:"ι";s:4:"iota";s:2:"ι";i:954;s:2:"κ";s:5:"kappa";s:2:"κ";i:955;s:2:"λ";s:6:"lambda";s:2:"λ";i:956;s:2:"μ";s:2:"mu";s:2:"μ";i:957;s:2:"ν";s:2:"nu";s:2:"ν";i:958;s:2:"ξ";s:2:"xi";s:2:"ξ";i:959;s:2:"ο";s:7:"omicron";s:2:"ο";i:960;s:2:"π";s:2:"pi";s:2:"π";i:961;s:2:"ρ";s:3:"rho";s:2:"ρ";i:962;s:2:"ς";s:6:"sigmaf";s:2:"ς";i:963;s:2:"σ";s:5:"sigma";s:2:"σ";i:964;s:2:"τ";s:3:"tau";s:2:"τ";i:965;s:2:"υ";s:7:"upsilon";s:2:"υ";i:966;s:2:"φ";s:3:"phi";s:2:"φ";i:967;s:2:"χ";s:3:"chi";s:2:"χ";i:968;s:2:"ψ";s:3:"psi";s:2:"ψ";i:969;s:2:"ω";s:5:"omega";s:2:"ω";i:977;s:2:"ϑ";s:8:"thetasym";s:2:"ϑ";i:978;s:2:"ϒ";s:5:"upsih";s:2:"ϒ";i:982;s:2:"ϖ";s:3:"piv";s:2:"ϖ";i:338;s:2:"œ";s:5:"OElig";s:2:"Œ";i:339;s:2:"œ";s:5:"oelig";s:2:"œ";i:352;s:2:"š";s:6:"Scaron";s:2:"Š";i:353;s:2:"š";s:6:"scaron";s:2:"š";i:376;s:2:"ÿ";s:4:"Yuml";s:2:"Ÿ";i:402;s:2:"ƒ";s:4:"fnof";s:2:"ƒ";i:710;s:2:"ˆ";s:4:"circ";s:2:"ˆ";i:732;s:2:"˜";s:5:"tilde";s:2:"˜";i:8194;s:3:" ";s:4:"ensp";s:3:" ";i:8195;s:3:" ";s:4:"emsp";s:3:" ";i:8201;s:3:" ";s:6:"thinsp";s:3:" ";i:8204;s:3:"‌";s:4:"zwnj";s:3:"‌";i:8205;s:3:"‍";s:3:"zwj";s:3:"‍";i:8206;s:3:"‎";s:3:"lrm";s:3:"‎";i:8207;s:3:"‏";s:3:"rlm";s:3:"‏";i:8211;s:3:"–";s:5:"ndash";s:3:"–";i:8212;s:3:"—";s:5:"mdash";s:3:"—";i:8216;s:3:"‘";s:5:"lsquo";s:3:"‘";i:8217;s:3:"’";s:5:"rsquo";s:3:"’";i:8218;s:3:"‚";s:5:"sbquo";s:3:"‚";i:8220;s:3:"“";s:5:"ldquo";s:3:"“";i:8221;s:3:"”";s:5:"rdquo";s:3:"”";i:8222;s:3:"„";s:5:"bdquo";s:3:"„";i:8224;s:3:"†";s:6:"dagger";s:3:"†";i:8225;s:3:"†";s:6:"Dagger";s:3:"‡";i:8226;s:3:"•";s:4:"bull";s:3:"•";i:8230;s:3:"…";s:6:"hellip";s:3:"…";i:8240;s:3:"‰";s:6:"permil";s:3:"‰";i:8242;s:3:"′";s:5:"prime";s:3:"′";i:8243;s:3:"′";s:5:"Prime";s:3:"″";i:8249;s:3:"‹";s:6:"lsaquo";s:3:"‹";i:8250;s:3:"›";s:6:"rsaquo";s:3:"›";i:8254;s:3:"‾";s:5:"oline";s:3:"‾";i:8364;s:3:"€";s:4:"euro";s:3:"€";i:8482;s:3:"™";i:8592;s:3:"←";s:4:"larr";s:3:"←";i:8593;s:3:"↑";s:4:"uarr";s:3:"↑";i:8594;s:3:"→";s:4:"rarr";s:3:"→";i:8595;s:3:"↓";s:4:"darr";s:3:"↓";i:8596;s:3:"↔";s:4:"harr";s:3:"↔";i:8629;s:3:"↵";s:5:"crarr";s:3:"↵";i:8968;s:3:"⌈";s:5:"lceil";s:3:"⌈";i:8969;s:3:"⌉";s:5:"rceil";s:3:"⌉";i:8970;s:3:"⌊";s:6:"lfloor";s:3:"⌊";i:8971;s:3:"⌋";s:6:"rfloor";s:3:"⌋";i:9674;s:3:"◊";s:3:"loz";s:3:"◊";i:9824;s:3:"♠";s:6:"spades";s:3:"♠";i:9827;s:3:"♣";s:5:"clubs";s:3:"♣";i:9829;s:3:"♥";s:6:"hearts";s:3:"♥";i:9830;s:3:"♦";s:5:"diams";s:3:"♦";i:161;s:2:"¡";s:5:"iexcl";s:2:"¡";i:162;s:2:"¢";s:4:"cent";s:2:"¢";i:163;s:2:"£";s:5:"pound";s:2:"£";i:164;s:2:"¤";s:6:"curren";s:2:"¤";i:165;s:2:"¥";s:3:"yen";s:2:"¥";i:166;s:2:"¦";s:6:"brvbar";s:2:"¦";i:167;s:2:"§";s:4:"sect";s:2:"§";i:168;s:2:"¨";s:3:"uml";s:2:"¨";i:169;s:2:"©";s:4:"copy";s:2:"©";i:170;s:2:"ª";s:4:"ordf";s:2:"ª";i:171;s:2:"«";s:5:"laquo";s:2:"«";i:172;s:2:"¬";s:3:"not";s:2:"¬";i:173;s:2:"­";s:3:"shy";s:2:"­";i:174;s:2:"®";s:3:"reg";s:2:"®";i:175;s:2:"¯";s:4:"macr";s:2:"¯";i:176;s:2:"°";s:3:"deg";s:2:"°";i:177;s:2:"±";s:6:"plusmn";s:2:"±";i:178;s:2:"²";s:4:"sup2";s:2:"²";i:179;s:2:"³";s:4:"sup3";s:2:"³";i:180;s:2:"´";s:5:"acute";s:2:"´";i:181;s:2:"µ";s:5:"micro";s:2:"µ";i:182;s:2:"¶";s:4:"para";s:2:"¶";i:183;s:2:"·";s:6:"middot";s:2:"·";i:184;s:2:"¸";s:5:"cedil";s:2:"¸";i:185;s:2:"¹";s:4:"sup1";s:2:"¹";i:186;s:2:"º";s:4:"ordm";s:2:"º";i:187;s:2:"»";s:5:"raquo";s:2:"»";i:188;s:2:"¼";s:6:"frac14";s:2:"¼";i:189;s:2:"½";s:6:"frac12";s:2:"½";i:190;s:2:"¾";s:6:"frac34";s:2:"¾";i:191;s:2:"¿";s:6:"iquest";s:2:"¿";i:215;s:2:"×";s:5:"times";s:2:"×";i:247;s:2:"÷";s:6:"divide";s:2:"÷";i:192;s:2:"à";s:6:"Agrave";s:2:"À";i:193;s:2:"á";s:6:"Aacute";s:2:"Á";i:194;s:2:"â";s:5:"Acirc";s:2:"Â";i:195;s:2:"ã";s:6:"Atilde";s:2:"Ã";i:196;s:2:"Ä";s:4:"Auml";s:2:"Ä";i:197;s:2:"å";s:5:"Aring";s:2:"Å";i:198;s:2:"æ";s:5:"AElig";s:2:"Æ";i:199;s:2:"ç";s:6:"Ccedil";s:2:"Ç";i:200;s:2:"è";s:6:"Egrave";s:2:"È";i:201;s:2:"é";s:6:"Eacute";s:2:"É";i:202;s:2:"ê";s:5:"Ecirc";s:2:"Ê";i:203;s:2:"Ë";s:4:"Euml";s:2:"Ë";i:204;s:2:"ì";s:6:"Igrave";s:2:"Ì";i:205;s:2:"í";s:6:"Iacute";s:2:"Í";i:206;s:2:"î";s:5:"Icirc";s:2:"Î";i:207;s:2:"ï";s:4:"Iuml";s:2:"Ï";i:208;s:2:"ð";s:3:"ETH";s:2:"Ð";i:209;s:2:"ñ";s:6:"Ntilde";s:2:"Ñ";i:210;s:2:"ò";s:6:"Ograve";s:2:"Ò";i:211;s:2:"ó";s:6:"Oacute";s:2:"Ó";i:212;s:2:"ô";s:5:"Ocirc";s:2:"Ô";i:213;s:2:"õ";s:6:"Otilde";s:2:"Õ";i:214;s:2:"Ö";s:4:"Ouml";s:2:"Ö";i:216;s:2:"ø";s:6:"Oslash";s:2:"Ø";i:217;s:2:"ù";s:6:"Ugrave";s:2:"Ù";i:218;s:2:"ú";s:6:"Uacute";s:2:"Ú";i:219;s:2:"û";s:5:"Ucirc";s:2:"Û";i:220;s:2:"Ü";s:4:"Uuml";s:2:"Ü";i:221;s:2:"ý";s:6:"Yacute";s:2:"Ý";i:222;s:2:"þ";s:5:"THORN";s:2:"Þ";i:223;s:2:"ß";s:5:"szlig";s:2:"ß";i:224;s:2:"à";s:6:"agrave";s:2:"à";i:225;s:2:"á";s:6:"aacute";s:2:"á";i:226;s:2:"â";s:5:"acirc";s:2:"â";i:227;s:2:"ã";s:6:"atilde";s:2:"ã";i:228;s:2:"ä";s:4:"auml";s:2:"ä";i:229;s:2:"å";s:5:"aring";s:2:"å";i:230;s:2:"æ";s:5:"aelig";s:2:"æ";i:231;s:2:"ç";s:6:"ccedil";s:2:"ç";i:232;s:2:"è";s:6:"egrave";s:2:"è";i:233;s:2:"é";s:6:"eacute";s:2:"é";i:234;s:2:"ê";s:5:"ecirc";s:2:"ê";i:235;s:2:"ë";s:4:"euml";s:2:"ë";i:236;s:2:"ì";s:6:"igrave";s:2:"ì";i:237;s:2:"í";s:6:"iacute";s:2:"í";i:238;s:2:"î";s:5:"icirc";s:2:"î";i:239;s:2:"ï";s:4:"iuml";s:2:"ï";i:240;s:2:"ð";s:3:"eth";s:2:"ð";i:241;s:2:"ñ";s:6:"ntilde";s:2:"ñ";i:242;s:2:"ò";s:6:"ograve";s:2:"ò";i:243;s:2:"ó";s:6:"oacute";s:2:"ó";i:244;s:2:"ô";s:5:"ocirc";s:2:"ô";i:245;s:2:"õ";s:6:"otilde";s:2:"õ";i:246;s:2:"ö";s:4:"ouml";s:2:"ö";i:248;s:2:"ø";s:6:"oslash";s:2:"ø";i:249;s:2:"ù";s:6:"ugrave";s:2:"ù";i:250;s:2:"ú";s:6:"uacute";s:2:"ú";i:251;s:2:"û";s:5:"ucirc";s:2:"û";i:252;s:2:"ü";s:4:"uuml";s:2:"ü";i:253;s:2:"ý";s:6:"yacute";s:2:"ý";i:254;s:2:"þ";s:5:"thorn";s:2:"þ";i:255;s:2:"ÿ";s:4:"yuml";s:2:"ÿ";s:5:"trade";s:3:"™";i:32;s:1:" ";s:4:"nbsp";s:1:" ";s:4:"quot";s:1:""";i:34;s:1:""";s:3:"amp";s:1:"&";i:38;s:1:"&";s:2:"lt";s:1:"<";i:60;s:1:"<";s:2:"gt";s:1:">";i:62;s:1:">";s:5:"frasl";s:3:"⁄";i:8260;s:3:"⁄";i:8656;s:3:"⇐";i:8657;s:3:"↑";i:8658;s:3:"⇒";i:8659;s:3:"↓";i:8660;s:3:"⇔";s:4:"hArr";s:3:"⇔";s:4:"rArr";s:3:"⇒";s:4:"lArr";s:3:"⇐";} \ No newline at end of file diff --git a/lib/plugins/ckgedit/action/entities/ents.data b/lib/plugins/ckgedit/action/entities/ents.data new file mode 100644 index 0000000..255e497 --- /dev/null +++ b/lib/plugins/ckgedit/action/entities/ents.data @@ -0,0 +1,948 @@ +∀ +∀ +∀ + +∂ +∂ +∂ + +∃ +∃ +∃ + +∅ +∅ +∅ + +∇ +∇ +∇ + +∈ +∈ +∈ + +∉ +∉ +∉ + +∋ +∋ +∋ + +∏ +∏ +∏ + +∑ +∑ +∑ + +− +− +− + +∗ +∗ +∗ + +√ +√ +√ + +∝ +∝ +∝ + +∞ +∞ +∞ + +∠ +∠ +∠ + +∧ +∧ +∧ + +∨ +∨ +∨ + +∩ +∩ +∩ + +∪ +∪ +∪ + +∫ +∫ +∫ + +∴ +∴ +∴ + +∼ +∼ +∼ + +≅ +≅ +≅ + +≈ +≈ +≈ + +≠ +≠ +≠ + +≡ +≡ +≡ + +≤ +≤ +≤ + +≥ +≥ +≥ + +⊂ +⊂ +⊂ + +⊃ +⊃ +⊃ + +⊄ +⊄ +⊄ + +⊆ +⊆ +⊆ + +⊇ +⊇ +⊇ + +⊕ +⊕ +⊕ + +⊗ +⊗ +⊗ + +⊥ +⊥ +⊥ + +⋅ +⋅ +⋅ + +Α +Α +Α + +Β +Β +Β + +Γ +Γ +Γ + +Δ +Δ +Δ + +Ε +Ε +Ε + +Ζ +Ζ +Ζ + +Η +Η +Η + +Θ +Θ +Θ + +Ι +Ι +Ι + +Κ +Κ +Κ + +Λ +Λ +Λ + +Μ +Μ +Μ + +Ν +Ν +Ν + +Ξ +Ξ +Ξ + +Ο +Ο +Ο + +Π +Π +Π + +Ρ +Ρ +Ρ + +Σ +Σ +Σ + +Τ +Τ +Τ + +Υ +Υ +Υ + +Φ +Φ +Φ + +Χ +Χ +Χ + +Ψ +Ψ +Ψ + +Ω +Ω +Ω + +α +α +α + +β +β +β + +γ +γ +γ + +δ +δ +δ + +ε +ε +ε + +ζ +ζ +ζ + +η +η +η + +θ +θ +θ + +ι +ι +ι + +κ +κ +κ + +λ +λ +λ + +μ +μ +μ + +ν +ν +ν + +ξ +ξ +ξ + +ο +ο +ο + +π +π +π + +ρ +ρ +ρ + +ς +ς +ς + +σ +σ +σ + +τ +τ +τ + +υ +υ +υ + +φ +φ +φ + +χ +χ +χ + +ψ +ψ +ψ + +ω +ω +ω + +ϑ +ϑ +ϑ + +ϒ +ϒ +ϒ + +ϖ +ϖ +ϖ + +Œ +Œ +Œ + +œ +œ +œ + +Š +Š +Š + +š +š +š + +Ÿ +Ÿ +Ÿ + +ƒ +ƒ +ƒ + +ˆ +ˆ +ˆ + +˜ +˜ +˜ + +  +  +  + +  +  +  + +  +  +  + +‌ +‌ +‌ + +‍ +‍ +‍ + +‎ +‎ +‎ + +‏ +‏ +‏ + +– +– +– + +— +— +— + +‘ +‘ +‘ + +’ +’ +’ + +‚ +‚ +‚ + +“ +“ +“ + +” +” +” + +„ +„ +„ + +† +† +† + +‡ +‡ +‡ + +• +• +• + +… +… +… + +‰ +‰ +‰ + +′ +′ +′ + +″ +″ +″ + +‹ +‹ +‹ + +› +› +› + +‾ +‾ +‾ + +€ +€ +€ + +™ +™ +or + +← +← +← + +↑ +↑ +↑ + +→ +→ +→ + +↓ +↓ +↓ + +↔ +↔ +↔ + +↵ +↵ +↵ + +⌈ +⌈ +⌈ + +⌉ +⌉ +⌉ + +⌊ +⌊ +⌊ + +⌋ +⌋ +⌋ + +◊ +◊ +◊ + +♠ +♠ +♠ + +♣ +♣ +♣ + +♥ +♥ +♥ + +♦ +♦ +♦ + + +  +  + +¡ +¡ +¡ + +¢ +¢ +¢ + +£ +£ +£ + +¤ +¤ +¤ + +¥ +¥ +¥ + +¦ +¦ +¦ + +§ +§ +§ + +¨ +¨ +¨ + +© +© +© + +ª +ª +ª + +« +« +« + +¬ +¬ +¬ + +­­ +­ +­ + +® +® +® + +¯ +¯ +¯ + +° +° +° + +± +± +± + +² +² +² + +³ +³ +³ + +´ +´ +´ + +µ +µ +µ + +¶ +¶ +¶ + +· +· +· + +¸ +¸ +¸ + +¹ +¹ +¹ + +º +º +º + +» +» +» + +¼ +¼ +¼ + +½ +½ +½ + +¾ +¾ +¾ + +¿ +¿ +¿ + +× +× +× + +÷ +÷ +÷ + +À +À +À + +Á +Á +Á + + + + + +à +à +à + +Ä +Ä +Ä + +Å +Å +Å + +Æ +Æ +Æ + +Ç +Ç +Ç + +È +È +È + +É +É +É + +Ê +Ê +Ê + +Ë +Ë +Ë + +Ì +Ì +Ì + +Í +Í +Í + +Î +Î +Î + +Ï +Ï +Ï + +Ð +Ð +Ð + +Ñ +Ñ +Ñ + +Ò +Ò +Ò + +Ó +Ó +Ó + +Ô +Ô +Ô + +Õ +Õ +Õ + +Ö +Ö +Ö + +Ø +Ø +Ø + +Ù +Ù +Ù + +Ú +Ú +Ú + +Û +Û +Û + +Ü +Ü +Ü + +Ý +Ý +Ý + +Þ +Þ +Þ + +ß +ß +ß + +à +à +à + +á +á +á + +â +â +â + +ã +ã +ã + +ä +ä +ä + +å +å +å + +æ +æ +æ + +ç +ç +ç + +è +è +è + +é +é +é + +ê +ê +ê + +ë +ë +ë + +ì +ì +ì + +í +í +í + +î +î +î + +ï +ï +ï + +ð +ð +ð + +ñ +ñ +ñ + +ò +ò +ò + +ó +ó +ó + +ô +ô +ô + +õ +õ +õ + +ö +ö +ö + +ø +ø +ø + +ù +ù +ù + +ú +ú +ú + +û +û +û + +ü +ü +ü + +ý +ý +ý + +þ +þ +þ + +ÿ +ÿ +ÿ + +™ +™ +™ + diff --git a/lib/plugins/ckgedit/action/entities/ents_seri.php b/lib/plugins/ckgedit/action/entities/ents_seri.php new file mode 100644 index 0000000..1a8c80b --- /dev/null +++ b/lib/plugins/ckgedit/action/entities/ents_seri.php @@ -0,0 +1,61 @@ + diff --git a/lib/plugins/ckgedit/action/entities/fcked-ents.data b/lib/plugins/ckgedit/action/entities/fcked-ents.data new file mode 100644 index 0000000..e0fb2c8 --- /dev/null +++ b/lib/plugins/ckgedit/action/entities/fcked-ents.data @@ -0,0 +1,842 @@ +¡ +iexcl +161 + +¢ +cent +162 + +£ +pound +163 + +¤ +curren +164 + +¥ +yen +165 + +¦ +brvbar +166 + +§ +sect +167 + +¨ +uml +168 + +© +copy +169 + +ª +ordf +170 + +« +laquo +171 + +¬ +not +172 + +­ +shy +173 + +® +reg +174 + +¯ +macr +175 + +° +deg +176 + +± +plusmn +177 + +² +sup2 +178 + +³ +sup3 +179 + +´ +acute +180 + +µ +micro +181 + +¶ +para +182 + +· +middot +183 + +¸ +cedil +184 + +¹ +sup1 +185 + +º +ordm +186 + +» +raquo +187 + +¼ +frac14 +188 + +½ +frac12 +189 + +¾ +frac34 +190 + +¿ +iquest +191 + +à +agrave +192 + +á +aacute +193 + +â +acirc +194 + +ã +atilde +195 + +Ä +Auml +196 + +å +aring +197 + +æ +aelig +198 + +ç +ccedil +199 + +è +egrave +200 + +é +eacute +201 + +ê +ecirc +202 + +Ë +203 +Euml; + +ì +igrave +204 + +í +iacute +205 + +î +icirc +206 + +ï +iuml +207 + +ð +eth +208 + +ñ +ntilde +209 + +ò +ograve +210 + +ó +oacute +211 + +ô +ocirc +212 + +õ +otilde +213 + +Ö +Ouml +214 + +× +times +215 + +ø +oslash +216 + +ù +ugrave +217 + +ú +uacute +218 + +û +ucirc +219 + +Ü +Uuml +220 + +ý +yacute +221 + +þ +thorn +222 + +ß +szlig +223 + +à +agrave +224 + +á +aacute +225 + +â +acirc +226 + +ã +atilde +227 + +ä +auml +228 + +å +aring +229 + +æ +aelig +230 + +ç +ccedil +231 + +è +egrave +232 + +é +eacute +233 + +ê +ecirc +234 + +ë +euml +235 + +ì +igrave +236 + +í +iacute +237 + +î +icirc +238 + +ï +iuml +239 + +ð +eth +240 + +ñ +ntilde +241 + +ò +ograve +242 + +ó +oacute +243 + +ô +ocirc +244 + +õ +otilde +245 + +ö +ouml +246 + +÷ +divide +247 + +ø +oslash +248 + +ù +ugrave +249 + +ú +uacute +250 + +û +ucirc +251 + +ü +uuml +252 + +ý +yacute +253 + +þ +thorn +254 + +ÿ +yuml +255 + +" +quot +34 + +& +amp +38 + +< +lt +60 + +> +gt +62 + +œ +oelig +338 + +œ +oelig +339 + +š +scaron +352 + +š +scaron +353 + +ÿ +yuml +376 + +ˆ +circ +710 + +˜ +tilde +732 + +  +ensp +8194 + +  +emsp +8195 + +  +thinsp +8201 + +– +ndash +8211 + +— +mdash +8212 + +‘ +lsquo +8216 + +’ +rsquo +8217 + +‚ +sbquo +8218 + +“ +ldquo +8220 + +” +rdquo +8221 + +„ +bdquo +8222 + +† +dagger +8224 + +† +dagger +8225 + +‰ +permil +8240 + +‹ +lsaquo +8249 + +› +rsaquo +8250 + +€ +euro +8364 + +ƒ +fnof +402 + +α +alpha +913 + +β +beta +914 + +γ +gamma +915 + +δ +delta +916 + +ε +epsilon +917 + +ζ +zeta +918 + +η +eta +919 + +θ +theta +920 + +ι +iota +921 + +κ +kappa +922 + +λ +lambda +923 + +μ +mu +924 + +ν +nu +925 + +ξ +xi +926 + +ο +omicron +927 + +π +pi +928 + +ρ +rho +929 + +σ +sigma +931 + +τ +tau +932 + +υ +upsilon +933 + +φ +phi +934 + +χ +chi +935 + +ψ +psi +936 + +ω +omega +937 + +α +alpha +945 + +β +beta +946 + +γ +gamma +947 + +δ +delta +948 + +ε +epsilon +949 + +ζ +zeta +950 + +η +eta +951 + +θ +theta +952 + +ι +iota +953 + +κ +kappa +954 + +λ +lambda +955 + +μ +mu +956 + +ν +nu +957 + +ξ +xi +958 + +ο +omicron +959 + +π +pi +960 + +ρ +rho +961 + +ς +sigmaf +962 + +σ +sigma +963 + +τ +tau +964 + +υ +upsilon +965 + +φ +phi +966 + +χ +chi +967 + +ψ +psi +968 + +ω +omega +969 + +• +bull +8226 + +… +hellip +8230 + +′ +prime +8242 + +′ +prime +8243 + +‾ +oline +8254 + +⁄ +frasl +8260 + +← +larr +8592 + +↑ +uarr +8593 + +→ +rarr +8594 + +↓ +darr +8595 + +↔ +harr +8596 + +← +larr +8656 + +↑ +uarr +8657 + +→ +rarr +8658 + +↓ +darr +8659 + +↔ +harr +8660 + +∂ +part +8706 + +∏ +prod +8719 + +∑ +sum +8721 + +− +minus +8722 + +√ +radic +8730 + +∞ +infin +8734 + +∩ +cap +8745 + +∫ +int +8747 + +≈ +asymp +8776 + +≠ +ne +8800 + +≡ +equiv +8801 + +≤ +le +8804 + +≥ +ge +8805 + +◊ +loz +9674 + +♠ +spades +9824 + +♣ +clubs +9827 + +♥ +hearts +9829 + +♦ +diams +9830 + +⇔ +8660 +hArr + +⇒ +8658 +rArr + +⇐ +8656 +lArr + + + diff --git a/lib/plugins/ckgedit/action/entities/utils/entities.conf b/lib/plugins/ckgedit/action/entities/utils/entities.conf new file mode 100644 index 0000000..08a97de --- /dev/null +++ b/lib/plugins/ckgedit/action/entities/utils/entities.conf @@ -0,0 +1,27 @@ +# Typography replacements +# +# Order does matter! +# +# You can use HTML entities here, but it is not recommended because it may break +# non-HTML renderers. Use UTF-8 chars directly instead. +# This adds four entities that are needed by the ckgeditor. Before substituting this file for +# Dokuwiki's make sure all of the entities in Dokuwiki's entities.conf are listed here. +<-> ↔ +<- ← +<=> ⇔ +<= ⇐ +<-> ↔ +-> → +<- ← +<=> ⇔ +=> ⇒ +<= ⇐ +>> » +<< « +--- — +-- – +(c) © +(tm) ™ +(r) ® +... … + diff --git a/lib/plugins/ckgedit/action/entities/utils/entities.html b/lib/plugins/ckgedit/action/entities/utils/entities.html new file mode 100644 index 0000000..8d0d588 --- /dev/null +++ b/lib/plugins/ckgedit/action/entities/utils/entities.html @@ -0,0 +1,52 @@ + + + + + + + + + +
+ + + + diff --git a/lib/plugins/ckgedit/action/entities/utils/entities.pl b/lib/plugins/ckgedit/action/entities/utils/entities.pl new file mode 100644 index 0000000..c583051 --- /dev/null +++ b/lib/plugins/ckgedit/action/entities/utils/entities.pl @@ -0,0 +1,711 @@ +use strict; + +my $count = 0; +my $skip = 0; + +while() { + next if /^\s+/; + + if ($skip) { + $skip=0; + next; + } + + $count++ if /^&#/; + $count++ if /^&\w/; + # print "$count: "; + print; + if($count == 2) { + $count = 0; + print "\n"; + $skip = 1; + } + + +} +# print $count, "\n"; + +__DATA__ +" +" +" +quotation mark + +' +' +' +apostrophe  + +& +& +& +ampersand + +< +< +< +less-than + +> +> +> +greater-than + +¡ +¡ +¡ +inverted exclamation mark + +¢ +¢ +¢ +cent + +£ +£ +£ +pound + +¤ +¤ +¤ +currency + +¥ +¥ +¥ +yen + +¦ +¦ +¦ +broken vertical bar + +§ +§ +§ +section + +¨ +¨ +¨ +spacing diaeresis + +© +© +© +copyright + +ª +ª +ª +feminine ordinal indicator + +« +« +« +angle quotation mark (left) + +¬ +¬ +¬ +negation +­ +­ +­ +soft hyphen + +® +® +® +registered trademark + +¯ +¯ +¯ +spacing macron + +° +° +° +degree + +± +± +± +plus-or-minus  + +² +² +² +superscript 2 + +³ +³ +³ +superscript 3 + +´ +´ +´ +spacing acute + +µ +µ +µ +micro + +¶ +¶ +¶ +paragraph + +· +· +· +middle dot + +¸ +¸ +¸ +spacing cedilla + +¹ +¹ +¹ +superscript 1 + +º +º +º +masculine ordinal indicator + +» +» +» +angle quotation mark (right) + +¼ +¼ +¼ +fraction 1/4 + +½ +½ +½ +fraction 1/2 + +¾ +¾ +¾ +fraction 3/4 + +¿ +¿ +¿ +inverted question mark + +× +× +× +multiplication + +÷ +÷ +÷ +division + +∀ +∀ +for all + +∂ +∂ +∂ +part + +∏ +∏ +∏ +prod + +∑ +∑ +∑ +sum + +− +− +− +minus + +∞ +∞ +∞ +infinity + +∩ +∩ +∩ +cap + +∫ +∫ +∫ +integral + +≈ +≈ +≈ +almost equal + +≠ +≠ +≠ +not equal +≡ +≡ +≡ +equivalent +≤ +≤ +≤ +less or equal +≥ +≥ +≥ +greater or equal + + +Α +Α +Α +Alpha + +Β +Β +Β +Beta + +Γ +Γ +Γ +Gamma + +Δ +Δ +Δ +Delta + +Ε +Ε +Ε +Epsilon + +Ζ +Ζ +Ζ +Zeta + +Η +Η +Η +Eta + +Θ +Θ +Θ +Theta + +Ι +Ι +Ι +Iota + +Κ +Κ +Κ +Kappa + +Λ +Λ +Λ +Lambda + +Μ +Μ +Μ +Mu + +Ν +Ν +Ν +Nu + +Ξ +Ξ +Ξ +Xi + +Ο +Ο +Ο +Omicron + +Π +Π +Π +Pi + +Ρ +Ρ +Ρ +Rho + +Σ +Σ +Σ +Sigma + +Τ +Τ +Τ +Tau + +Υ +Υ +Υ +Upsilon + +Φ +Φ +Φ +Phi + +Χ +Χ +Χ +Chi + +Ψ +Ψ +Ψ +Psi + +Ω +Ω +Ω +Omega +  +α +α +α +alpha + +β +β +β +beta + +γ +γ +γ +gamma + +δ +δ +δ +delta + +ε +ε +ε +epsilon + +ζ +ζ +ζ +zeta + +η +η +η +eta + +θ +θ +θ +theta + +ι +ι +ι +iota + +κ +κ +κ +kappa + +λ +λ +λ +lambda + +μ +μ +μ +mu +ν +ν +ν +nu +ξ +ξ +ξ +xi +ο +ο +ο +omicron +π +π +π +pi +ρ +ρ +ρ +rho +ς +ς +ς +sigmaf +σ +σ +σ +sigma +τ +τ +τ +tau +υ +υ +υ +upsilon +φ +φ +φ +phi +χ +χ +χ +chi +ψ +ψ +ψ +psi +ω +ω +ω +omega + +Œ +Œ +Œ +capital ligature OE +œ +œ +œ +small ligature oe +Š +Š +Š +capital S with caron +š +š +š +small S with caron +Ÿ +Ÿ +Ÿ +capital Y with diaeres +ƒ +ƒ +ƒ +f with hook +ˆ +ˆ +ˆ +modifier letter circumflex accent +˜ +˜ +˜ +small tilde +‌ +‌ +‌ +zero width non-joiner +‍ +‍ +‍ +zero width joiner +‎ +‎ +‎ +left-to-right mark +‏ +‏ +‏ +right-to-left mark + +– +– +– +en dash + +— +— +— +em dash + +‘ +‘ +‘ +left single quotation mark + +’ +’ +’ +right single quotation mark + +‚ +‚ +‚ +single low-9 quotation mark + +“ +“ +“ +left double quotation mark + +” +” +” +right double quotation mark + +„ +„ +„ +double low-9 quotation mark + +† +† +† +dagger + +‡ +‡ +‡ +double dagger + +• +• +• +bullet + +… +… +… +horizontal ellipsis + +‰ +‰ +‰ +per mille  + +′ +′ +′ +minutes + +″ +″ +″ +seconds + +‹ +‹ +‹ +single left angle quotation + +› +› +› +single right angle quotation + +‾ +‾ +‾ +overline + +€ +€ +€ +euro + +™ +™ +™ +trademark + +← +← +← +left arrow + +↑ +↑ +↑ +up arrow + +→ +→ +→ +right arrow + +↓ +↓ +↓ +down arrow + +↔ +↔ +↔ +left right arrow + +◊ +◊ +◊ +lozenge + +♠ +♠ +♠ +spade + +♣ +♣ +♣ +club + +♥ +♥ +♥ +heart + +♦ +♦ +♦ +diamond + + diff --git a/lib/plugins/ckgedit/action/entities/utils/entities.txt b/lib/plugins/ckgedit/action/entities/utils/entities.txt new file mode 100644 index 0000000..0d5cb67 --- /dev/null +++ b/lib/plugins/ckgedit/action/entities/utils/entities.txt @@ -0,0 +1,718 @@ +" +" +" +quotation mark + +' +' +' (does not work in IE) +apostrophe  + +& +& +& +ampersand + +< +< +< +less-than + +> +> +> +greater-than +Note: Entity names are case sensitive! + +¡ +¡ +¡ +inverted exclamation mark + +¢ +¢ +¢ +cent + +£ +£ +£ +pound + +¤ +¤ +¤ +currency + +¥ +¥ +¥ +yen + +¦ +¦ +¦ +broken vertical bar + +§ +§ +§ +section + +¨ +¨ +¨ +spacing diaeresis + +© +© +© +copyright + +ª +ª +ª +feminine ordinal indicator + +« +« +« +angle quotation mark (left) + +¬ +¬ +¬ +negation +­ +­ +­ +soft hyphen + +® +® +® +registered trademark + +¯ +¯ +¯ +spacing macron + +° +° +° +degree + +± +± +± +plus-or-minus  + +² +² +² +superscript 2 + +³ +³ +³ +superscript 3 + +´ +´ +´ +spacing acute + +µ +µ +µ +micro + +¶ +¶ +¶ +paragraph + +· +· +· +middle dot + +¸ +¸ +¸ +spacing cedilla + +¹ +¹ +¹ +superscript 1 + +º +º +º +masculine ordinal indicator + +» +» +» +angle quotation mark (right) + +¼ +¼ +¼ +fraction 1/4 + +½ +½ +½ +fraction 1/2 + +¾ +¾ +¾ +fraction 3/4 + +¿ +¿ +¿ +inverted question mark + +× +× +× +multiplication + +÷ +÷ +÷ +division + +∀ +∀ +for all + +∂ +∂ +∂ +part + +∏ +∏ +∏ +prod + +∑ +∑ +∑ +sum + +− +− +− +minus + +∞ +∞ +∞ +infinity + +∩ +∩ +∩ +cap + +∫ +∫ +∫ +integral + +≈ +≈ +≈ +almost equal +≠ +≠ +≠ +not equal +≡ +≡ +≡ +equivalent +≤ +≤ +≤ +less or equal +≥ +≥ +≥ +greater or equal + + +Α +Α +Α +Alpha + +Β +Β +Β +Beta + +Γ +Γ +Γ +Gamma + +Δ +Δ +Δ +Delta + +Ε +Ε +Ε +Epsilon + +Ζ +Ζ +Ζ +Zeta + +Η +Η +Η +Eta + +Θ +Θ +Θ +Theta + +Ι +Ι +Ι +Iota + +Κ +Κ +Κ +Kappa + +Λ +Λ +Λ +Lambda + +Μ +Μ +Μ +Mu + +Ν +Ν +Ν +Nu + +Ξ +Ξ +Ξ +Xi + +Ο +Ο +Ο +Omicron + +Π +Π +Π +Pi + +Ρ +Ρ +Ρ +Rho + +Σ +Σ +Σ +Sigma + +Τ +Τ +Τ +Tau + +Υ +Υ +Υ +Upsilon + +Φ +Φ +Φ +Phi + +Χ +Χ +Χ +Chi + +Ψ +Ψ +Ψ +Psi + +Ω +Ω +Ω +Omega +  +α +α +α +alpha + +β +β +β +beta + +γ +γ +γ +gamma + +δ +δ +δ +delta + +ε +ε +ε +epsilon + +ζ +ζ +ζ +zeta + +η +η +η +eta + +θ +θ +θ +theta + +ι +ι +ι +iota + +κ +κ +κ +kappa + +λ +λ +λ +lambda + +μ +μ +μ +mu +ν +ν +ν +nu +ξ +ξ +ξ +xi +ο +ο +ο +omicron +π +π +π +pi +ρ +ρ +ρ +rho +ς +ς +ς +sigmaf +σ +σ +σ +sigma +τ +τ +τ +tau +υ +υ +υ +upsilon +φ +φ +φ +phi +χ +χ +χ +chi +ψ +ψ +ψ +psi +ω +ω +ω +omega +  +  +  +  +ϑ +ϑ +ϑ +theta symbol +ϒ +ϒ +ϒ +upsilon symbol +ϖ +ϖ +ϖ +pi symbol +Other Entities Supported by HTML +Character +Entity Number +Entity Name +Description +Œ +Œ +Œ +capital ligature OE +œ +œ +œ +small ligature oe +Š +Š +Š +capital S with caron +š +š +š +small S with caron +Ÿ +Ÿ +Ÿ +capital Y with diaeres +ƒ +ƒ +ƒ +f with hook +ˆ +ˆ +ˆ +modifier letter circumflex accent +˜ +˜ +˜ +small tilde +‌ +‌ +‌ +zero width non-joiner +‍ +‍ +‍ +zero width joiner +‎ +‎ +‎ +left-to-right mark +‏ +‏ +‏ +right-to-left mark + +– +– +– +en dash + +— +— +— +em dash + +‘ +‘ +‘ +left single quotation mark + +’ +’ +’ +right single quotation mark + +‚ +‚ +‚ +single low-9 quotation mark + +“ +“ +“ +left double quotation mark + +” +” +” +right double quotation mark + +„ +„ +„ +double low-9 quotation mark + +† +† +† +dagger + +‡ +‡ +‡ +double dagger + +• +• +• +bullet + +… +… +… +horizontal ellipsis + +‰ +‰ +‰ +per mille  + +′ +′ +′ +minutes + +″ +″ +″ +seconds + +‹ +‹ +‹ +single left angle quotation + +› +› +› +single right angle quotation + +‾ +‾ +‾ +overline + +€ +€ +€ +euro + +™ +™ +™ +trademark + +← +← +← +left arrow + +↑ +↑ +↑ +up arrow + +→ +→ +→ +right arrow + +↓ +↓ +↓ +down arrow + +↔ +↔ +↔ +left right arrow + +◊ +◊ +◊ +lozenge + +♠ +♠ +♠ +spade + +♣ +♣ +♣ +club + +♥ +♥ +♥ +heart + +♦ +♦ +♦ +diamond + +⇔ +⇔ +⇔ + +⇒ +⇒ +⇒ + +⇐ +⇐ +⇐ + +← +&8592; +← + diff --git a/lib/plugins/ckgedit/action/entities/utils/fcked-ents.pl b/lib/plugins/ckgedit/action/entities/utils/fcked-ents.pl new file mode 100644 index 0000000..df297bc --- /dev/null +++ b/lib/plugins/ckgedit/action/entities/utils/fcked-ents.pl @@ -0,0 +1,231 @@ +use strict; + + + +while() { + chomp; + my($icon, $num, $character) = split; + next if !$icon || !$num || ! $character; +# $icon = trim($icon); +# $num = trim($num); +# $character=trim($character); + print "$icon\n$num\n$character\n\n"; +} + +sub trim { + my $str = shift; + $str =~ s/^\s+//; + $str =~ s/\s+$//; + return $str; +} + +__DATA__ + nbsp 160 +¡ iexcl 161 +¢ cent 162 +£ pound 163 +¤ curren 164 +¥ yen 165 +¦ brvbar 166 +§ sect 167 +¨ uml 168 +© copy 169 +ª ordf 170 +« laquo 171 +¬ not 172 +­ shy 173 +® reg 174 +¯ macr 175 +° deg 176 +± plusmn 177 +² sup2 178 +³ sup3 179 +´ acute 180 +µ micro 181 +¶ para 182 +· middot 183 +¸ cedil 184 +¹ sup1 185 +º ordm 186 +» raquo 187 +¼ frac14 188 +½ frac12 189 +¾ frac34 190 +¿ iquest 191 +à agrave 192 +á aacute 193 +â acirc 194 +ã atilde 195 +Ä Auml 196 +å aring 197 +æ aelig 198 +ç ccedil 199 +è egrave 200 +é eacute 201 +ê ecirc 202 +ë euml 203 +ì igrave 204 +í iacute 205 +î icirc 206 +ï iuml 207 +ð eth 208 +ñ ntilde 209 +ò ograve 210 +ó oacute 211 +ô ocirc 212 +õ otilde 213 +Ö Ouml 214 +× times 215 +ø oslash 216 +ù ugrave 217 +ú uacute 218 +û ucirc 219 +Ü Uuml 220 +ý yacute 221 +þ thorn 222 +ß szlig 223 +à agrave 224 +á aacute 225 +â acirc 226 +ã atilde 227 +ä auml 228 +å aring 229 +æ aelig 230 +ç ccedil 231 +è egrave 232 +é eacute 233 +ê ecirc 234 +ë euml 235 +ì igrave 236 +í iacute 237 +î icirc 238 +ï iuml 239 +ð eth 240 +ñ ntilde 241 +ò ograve 242 +ó oacute 243 +ô ocirc 244 +õ otilde 245 +ö ouml 246 +÷ divide 247 +ø oslash 248 +ù ugrave 249 +ú uacute 250 +û ucirc 251 +ü uuml 252 +ý yacute 253 +þ thorn 254 +ÿ yuml 255 +" quot 34 +& amp 38 +< lt 60 +> gt 62 +œ oelig 338 +œ oelig 339 +š scaron 352 +š scaron 353 +ÿ yuml 376 +ˆ circ 710 +˜ tilde 732 +  ensp 8194 +  emsp 8195 +  thinsp 8201 +– ndash 8211 +— mdash 8212 +‘ lsquo 8216 +’ rsquo 8217 +‚ sbquo 8218 +“ ldquo 8220 +” rdquo 8221 +„ bdquo 8222 +† dagger 8224 +† dagger 8225 +‰ permil 8240 +‹ lsaquo 8249 +› rsaquo 8250 +€ euro 8364 +ƒ fnof 402 +α alpha 913 +β beta 914 +γ gamma 915 +δ delta 916 +ε epsilon 917 +ζ zeta 918 +η eta 919 +θ theta 920 +ι iota 921 +κ kappa 922 +λ lambda 923 +μ mu 924 +ν nu 925 +ξ xi 926 +ο omicron 927 +π pi 928 +ρ rho 929 +σ sigma 931 +τ tau 932 +υ upsilon 933 +φ phi 934 +χ chi 935 +ψ psi 936 +ω omega 937 +α alpha 945 +β beta 946 +γ gamma 947 +δ delta 948 +ε epsilon 949 +ζ zeta 950 +η eta 951 +θ theta 952 +ι iota 953 +κ kappa 954 +λ lambda 955 +μ mu 956 +ν nu 957 +ξ xi 958 +ο omicron 959 +π pi 960 +ρ rho 961 +ς sigmaf 962 +σ sigma 963 +τ tau 964 +υ upsilon 965 +φ phi 966 +χ chi 967 +ψ psi 968 +ω omega 969 +• bull 8226 +… hellip 8230 +′ prime 8242 +′ prime 8243 +‾ oline 8254 +⁄ frasl 8260 +← larr 8592 +↑ uarr 8593 +→ rarr 8594 +↓ darr 8595 +↔ harr 8596 +← larr 8656 +↑ uarr 8657 +→ rarr 8658 +↓ darr 8659 +↔ harr 8660 +∂ part 8706 +∏ prod 8719 +∑ sum 8721 +− minus 8722 +√ radic 8730 +∞ infin 8734 +∩ cap 8745 +∫ int 8747 +≈ asymp 8776 +≠ ne 8800 +≡ equiv 8801 +≤ le 8804 +≥ ge 8805 +◊ loz 9674 +♠ spades 9824 +♣ clubs 9827 +♥ hearts 9829 +♦ diams 9830 + diff --git a/lib/plugins/ckgedit/action/entities/utils/fcked-ents.txt b/lib/plugins/ckgedit/action/entities/utils/fcked-ents.txt new file mode 100644 index 0000000..61c1c69 --- /dev/null +++ b/lib/plugins/ckgedit/action/entities/utils/fcked-ents.txt @@ -0,0 +1,209 @@ + nbsp 160 +¡ iexcl 161 +¢ cent 162 +£ pound 163 +¤ curren 164 +¥ yen 165 +¦ brvbar 166 +§ sect 167 +¨ uml 168 +© copy 169 +ª ordf 170 +« laquo 171 +¬ not 172 +­ shy 173 +® reg 174 +¯ macr 175 +° deg 176 +± plusmn 177 +² sup2 178 +³ sup3 179 +´ acute 180 +µ micro 181 +¶ para 182 +· middot 183 +¸ cedil 184 +¹ sup1 185 +º ordm 186 +» raquo 187 +¼ frac14 188 +½ frac12 189 +¾ frac34 190 +¿ iquest 191 +à agrave 192 +á aacute 193 +â acirc 194 +ã atilde 195 +Ä Auml 196 +å aring 197 +æ aelig 198 +ç ccedil 199 +è egrave 200 +é eacute 201 +ê ecirc 202 +ë euml 203 +ì igrave 204 +í iacute 205 +î icirc 206 +ï iuml 207 +ð eth 208 +ñ ntilde 209 +ò ograve 210 +ó oacute 211 +ô ocirc 212 +õ otilde 213 +Ö Ouml 214 +× times 215 +ø oslash 216 +ù ugrave 217 +ú uacute 218 +û ucirc 219 +Ü Uuml 220 +ý yacute 221 +þ thorn 222 +ß szlig 223 +à agrave 224 +á aacute 225 +â acirc 226 +ã atilde 227 +ä auml 228 +å aring 229 +æ aelig 230 +ç ccedil 231 +è egrave 232 +é eacute 233 +ê ecirc 234 +ë euml 235 +ì igrave 236 +í iacute 237 +î icirc 238 +ï iuml 239 +ð eth 240 +ñ ntilde 241 +ò ograve 242 +ó oacute 243 +ô ocirc 244 +õ otilde 245 +ö ouml 246 +÷ divide 247 +ø oslash 248 +ù ugrave 249 +ú uacute 250 +û ucirc 251 +ü uuml 252 +ý yacute 253 +þ thorn 254 +ÿ yuml 255 +" quot 34 +& amp 38 +< lt 60 +> gt 62 +œ oelig 338 +œ oelig 339 +š scaron 352 +š scaron 353 +ÿ yuml 376 +ˆ circ 710 +˜ tilde 732 +  ensp 8194 +  emsp 8195 +  thinsp 8201 +– ndash 8211 +— mdash 8212 +‘ lsquo 8216 +’ rsquo 8217 +‚ sbquo 8218 +“ ldquo 8220 +” rdquo 8221 +„ bdquo 8222 +† dagger 8224 +† dagger 8225 +‰ permil 8240 +‹ lsaquo 8249 +› rsaquo 8250 +€ euro 8364 +ƒ fnof 402 +α alpha 913 +β beta 914 +γ gamma 915 +δ delta 916 +ε epsilon 917 +ζ zeta 918 +η eta 919 +θ theta 920 +ι iota 921 +κ kappa 922 +λ lambda 923 +μ mu 924 +ν nu 925 +ξ xi 926 +ο omicron 927 +π pi 928 +ρ rho 929 +σ sigma 931 +τ tau 932 +υ upsilon 933 +φ phi 934 +χ chi 935 +ψ psi 936 +ω omega 937 +α alpha 945 +β beta 946 +γ gamma 947 +δ delta 948 +ε epsilon 949 +ζ zeta 950 +η eta 951 +θ theta 952 +ι iota 953 +κ kappa 954 +λ lambda 955 +μ mu 956 +ν nu 957 +ξ xi 958 +ο omicron 959 +π pi 960 +ρ rho 961 +ς sigmaf 962 +σ sigma 963 +τ tau 964 +υ upsilon 965 +φ phi 966 +χ chi 967 +ψ psi 968 +ω omega 969 +• bull 8226 +… hellip 8230 +′ prime 8242 +′ prime 8243 +‾ oline 8254 +⁄ frasl 8260 +← larr 8592 +↑ uarr 8593 +→ rarr 8594 +↓ darr 8595 +↔ harr 8596 +← larr 8656 +↑ uarr 8657 +→ rarr 8658 +↓ darr 8659 +↔ harr 8660 +∂ part 8706 +∏ prod 8719 +∑ sum 8721 +− minus 8722 +√ radic 8730 +∞ infin 8734 +∩ cap 8745 +∫ int 8747 +≈ asymp 8776 +≠ ne 8800 +≡ equiv 8801 +≤ le 8804 +≥ ge 8805 +◊ loz 9674 +♠ spades 9824 +♣ clubs 9827 +♥ hearts 9829 +♦ diams 9830 + diff --git a/lib/plugins/ckgedit/action/entities/utils/fckeditor_ents.doc b/lib/plugins/ckgedit/action/entities/utils/fckeditor_ents.doc new file mode 100644 index 0000000..1fcc34b Binary files /dev/null and b/lib/plugins/ckgedit/action/entities/utils/fckeditor_ents.doc differ diff --git a/lib/plugins/ckgedit/action/iwiki.php b/lib/plugins/ckgedit/action/iwiki.php new file mode 100644 index 0000000..dc430fe --- /dev/null +++ b/lib/plugins/ckgedit/action/iwiki.php @@ -0,0 +1,45 @@ +register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handle_ajax_call_unknown'); + + } + + /** + * @param Doku_Event $event event object by reference + * @param mixed $param [the parameters passed as fifth argument to register_hook() when this + * handler was registered] + * @return void + */ + + public function handle_ajax_call_unknown(Doku_Event &$event, $param) { + + if ($event->data !== 'iwiki_list') { + return; + } + + $event->stopPropagation(); + $event->preventDefault(); + $a = getInterwiki(); + ksort($a); + echo json_encode($a); + } + +} diff --git a/lib/plugins/ckgedit/action/mediamanager.php b/lib/plugins/ckgedit/action/mediamanager.php new file mode 100644 index 0000000..2e3c3ce --- /dev/null +++ b/lib/plugins/ckgedit/action/mediamanager.php @@ -0,0 +1,50 @@ +setupLocale(); + } + + + function register(Doku_Event_Handler $controller) + { + $controller->register_hook('MEDIAMANAGER_STARTED', 'AFTER', $this, 'mediaman_started'); + $controller->register_hook('MEDIA_UPLOAD_FINISH', 'BEFORE', $this, 'upload_finish'); + $controller->register_hook('TPL_METAHEADER_OUTPUT', 'BEFORE', $this, 'handle_metafile'); + } + + function handle_metafile(Doku_Event $event) { + $event->data['script'][] = + array( + 'type'=>'text/javascript', + 'charset'=>'utf-8', + '_data'=>'', + 'src'=>DOKU_BASE.'lib/plugins/ckgedit/scripts/mediamgr.js' + ) + ([ 'defer' => 'defer']); + } + + function upload_finish(Doku_Event $event) { + if(!preg_match("#^image/#",$event->data[3]) && $_COOKIE['ckgFbType'] == 'image') { + if(!empty($event->data[3]) && strlen($event->data[3]) >30) { + $fname = substr($event->data[3],0,29) . '. . .'; + } + else $fname = $event->data[3]; + msg($this->getLang('mediamgr_imgonly') . $fname); + setcookieSameSite('ckgFbType', 'image',time()-10); + $event->preventDefault(); + } + } + + function mediaman_started(Doku_Event $event) { + if ($_GET["onselect"] == "ckg_edit_mediaman_insert") { + setcookieSameSite('ckgFbType', 'image'); + } else if ($_GET["onselect"] == "ckg_edit_mediaman_insertlink") { + setcookieSameSite('ckgFbType', 'link'); + } + } +} diff --git a/lib/plugins/ckgedit/action/meta.php b/lib/plugins/ckgedit/action/meta.php new file mode 100644 index 0000000..83b76a6 --- /dev/null +++ b/lib/plugins/ckgedit/action/meta.php @@ -0,0 +1,1023 @@ +helper = plugin_load('helper', 'ckgedit'); + $this->dokuwiki_priority = false; + $this->dw_priority_group = "NOT_SET"; + $this->dw_priority_metafn=metaFN(':ckgedit:dw_priority', '.ser'); + if(!file_exists($this->dw_priority_metafn)) { + io_saveFile($this->dw_priority_metafn, serialize(array())); + } + + } + /* + * Register its handlers with the dokuwiki's event controller + */ + function register(Doku_Event_Handler $controller) { + + if($this->helper->is_outOfScope()) return; + $controller->register_hook( 'TPL_METAHEADER_OUTPUT', 'AFTER', $this, 'loadScript'); + $controller->register_hook( 'HTML_EDITFORM_INJECTION', 'AFTER', $this, 'preprocess'); + $controller->register_hook( 'HTML_EDITFORM_OUTPUT', 'BEFORE', $this, 'insertFormElement'); + $controller->register_hook('DOKUWIKI_STARTED', 'BEFORE', $this, 'file_type'); + $controller->register_hook('TPL_CONTENT_DISPLAY', 'AFTER', $this, 'setupDWEdit'); + $controller->register_hook('DOKUWIKI_STARTED', 'AFTER', $this, 'reset_user_rewrite_check'); + $controller->register_hook('DOKUWIKI_DONE', 'BEFORE', $this, 'restore_conf'); + $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this,'_ajax_call'); + //$controller->register_hook('HTML_UPDATEPROFILEFORM_OUTPUT', 'BEFORE', $this, 'handle_profile_form'); + $controller->register_hook('ACTION_SHOW_REDIRECT', 'BEFORE', $this, 'handle_redirect'); + } + + function handle_redirect(Doku_Event $event, $param) { + global $INPUT; + $ckg_redirect = $INPUT->str('ckgedit_redirect',""); + if($ckg_redirect) $event->data['id'] = $ckg_redirect; + //msg($ckg_redirect); + } + + function handle_profile_form(Doku_Event $event, $param) { + if(!$this->getConf('dw_priority')) { return; } + global $INFO; + $client = $_SERVER['REMOTE_USER']; //$INFO['client']; + $ar = unserialize(file_get_contents($this->dw_priority_metafn)); + $which = $ar[$client]; + $dwed = ""; $cked = ""; + if($which == 'N') { + $cked = "checked"; + } + else if($which == 'Y') { + $dwed = "checked"; + } + + $pos = $event->data->findElementByAttribute('type', 'reset'); + $_form = '
'; + $_form.= '
' . $this->getLang('uprofile_title') .''; + + $_form.= ' '; + $_form .=''; + + $_form.= '
'; + $_form.= '

 "; + $_form.= ''; + $_form.= '
'; + $event->data->insertElement($pos+2, $_form); + } + +function _ajax_call(Doku_Event $event, $param) { + + if ($event->data == 'cked_scaytchk') { + global $lang,$INPUT; + $event->stopPropagation(); + $event->preventDefault(); + $filename = metaFN('fckl:scayt','.meta'); + $msg = $this->locale_xhtml('scayt'); + if (!file_exists($filename)) { + io_saveFile($filename,'1'); + echo "$msg\n"; + return; + } + + + return; + } + if ($event->data == 'cked_upload') { + global $lang; + $event->stopPropagation(); + $event->preventDefault(); + global $INPUT; + $id = urldecode($INPUT->str('ckedupl_id')); + $id = str_replace('/', ':',$id); + $this->ajax_debug($id); + $fn = mediaFN($id); + $this->ajax_debug($fn); + $delete = $INPUT->str('ckedupl_del'); + if(file_exists($fn)) { + $size = filesize($fn); + $this->ajax_debug("$fn: $size"); + } + else $this->ajax_debug("$fn not found"); + + if($delete && $delete == 'D') { + $size = ""; $ft = ""; + $oldf = $id; + $size_tm = $INPUT->str('delsize'); + $this->ajax_debug('size_tm='.$size_tm); + if($size_tm != 'undefined' && isset($size_tm)) { + list($size,$ft) = explode(';',$size_tm); + $size=trim($size); + $ft=trim($ft); + $size = '-' . $size; + } + else if(file_exists($fn)) { + if(!$size) { + $size = filesize($fn); + $size = '-' . $size; + } + if(!$ft) { + $ft=filemtime($fn) ; + } + } + else { + $this->ajax_debug("$fn not found"); + return; + } + if(isset($ft) && file_exists($fn)) { + $newf = mediaFN($id,$ft); + $this->ajax_debug("newf: $newf fn: $fn"); + if(file_exists($fn)){ + $this->ajax_debug("old file: $oldf; $fn"); + } + else $this->ajax_debug("no old file: $fn"); + + io_makeFileDir($newf); + if(copy($fn, $newf)) { + $this->ajax_debug("Copying $fn to $newf"); + chmod($newf, $conf['fmode']); + $this->ajax_debug("deleting: $fn"); + if(!unlink($fn)) $this->ajax_debug("delete failed"); + } + else $this->ajax_debug("copy failed"); + } + if(file_exists($fn)) { + if(!copy($fn, $newf)) { + $this->ajax_debug ("(2nd try) could not copy $fn to $newf"); + return; + } + if(!unlink($fn)) { + $this->ajax_debug ("could not delete $fn"); + return; + } + } + addMediaLogEntry($ft, $id, DOKU_CHANGE_TYPE_DELETE, $lang['deleted'],'', null, $size); + } + else addMediaLogEntry(time(), $id, DOKU_CHANGE_TYPE_CREATE, $lang['created'],'', null, $size); + echo 'done'; + return; + } + //cked_deletedsize + if ($event->data == 'cked_deletedsize') { + $event->stopPropagation(); + $event->preventDefault(); + global $INPUT; + $id = urldecode($INPUT->str('cked_delid')); + $fn = mediaFN($id); + if(file_exists($fn)) { + $this->ajax_debug(filesize ($fn) . ';' .filemtime($fn) ); + } + else echo ("$fn not found"); + return; + } + if ($event->data == 'use_heads') { + $event->stopPropagation(); + $event->preventDefault(); + global $INPUT; + $page = $INPUT->str('dw_id'); + $page = urldecode($page); + $page = ltrim($page, ':'); + $t= trim(p_get_first_heading($page)); + echo $t; + return; + } + if ($event->data == 'wrap_lang') { // parse and return language file to ckeditor wrap plugin + $event->stopPropagation(); + $event->preventDefault(); + global $INPUT; + $which = $INPUT->str('lang'); + $path = DOKU_PLUGIN . 'wrap/lang/' . $which . '/lang.php'; + if(file_exists($path)) { + $data = file($path, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES ); + array_shift($data); + } + else { + $data = array(); + } + $result = array(); + for($i=0; $idata == 'cked_selector') { //choose profile editor priority + $event->stopPropagation(); + $event->preventDefault(); + global $INPUT, $USERINFO,$INFO; + if(!isset($USERINFO)) return; + + $ar = unserialize(file_get_contents($this->dw_priority_metafn)); + $dwp = $INPUT->str('dw_val'); + $client = $INPUT->str('dwp_client'); + $ar[$client] = $dwp; + $retv = file_put_contents($this->dw_priority_metafn,serialize($ar)); + if($retv === false) { + echo $this->dw_priority_metafn; + } + else echo "done"; + return; + } + + + if ($event->data == 'geshi_sel') { //get geshi file names , return as ;; separated string w/o php extensions + $event->stopPropagation(); + $event->preventDefault(); + + if( class_exists('GeSHi')) { + if(defined('GESHI_LANG_ROOT') ) $geshi_dir =GESHI_LANG_ROOT; + } + else { + echo "ENotfound\n"; + return ; + } + $gfiles = scandir ($geshi_dir); + $selects = array(); + foreach($gfiles as $gfile){ + if(is_dir($gfile)) continue; + $gfile = preg_replace("/\.php\n?$/","",$gfile); + $selects[] = $gfile; + } + $selects = implode ( ';;', $selects ); + echo $selects; + return; + } + + if ($event->data !== 'refresh_save') { // save ckgedit backups in native dw format + return; + } + + $event->stopPropagation(); + $event->preventDefault(); + global $INPUT; + + + $rsave_id = urldecode($INPUT->str('rsave_id')); + $path = pathinfo($rsave_id); + if($path['extension'] != 'ckgedit') { + echo "failed"; + return; + } + + $this->wiki_text = urldecode($INPUT->str('wikitext')); + + if(!preg_match('/^\s+(\-|\*)/',$this->wiki_text)){ + $this->wiki_text = trim($this->wiki_text); + } + + /* preserve newlines in code blocks */ + $this->wiki_text = preg_replace_callback( + '/(|)(.*?)(<\/code>|<\/file>)/ms', + create_function( + '$matches', + 'return str_replace("\n", "__code_NL__",$matches[0]);' + ), + $this->wiki_text + ); + + $this->wiki_text = preg_replace('/^\s*[\r\n]$/ms',"__n__", $this->wiki_text); + $this->wiki_text = preg_replace('/\r/ms',"", $this->wiki_text); + $this->wiki_text = preg_replace('/^\s+(?=\^|\|)/ms',"", $this->wiki_text); + $this->wiki_text = preg_replace('/__n__/',"\n", $this->wiki_text); + $this->wiki_text = str_replace("__code_NL__","\n", $this->wiki_text); + + + $this->wiki_text .= "\n"; + + + $pos = strpos($this->wiki_text, 'MULTI_PLUGIN_OPEN'); + if($pos !== false) { + $this->wiki_text = preg_replace_callback( + '|MULTI_PLUGIN_OPEN.*?MULTI_PLUGIN_CLOSE|ms', + create_function( + '$matches', + 'return preg_replace("/\\\\\\\\/ms","\n",$matches[0]);' + ), + $this->wiki_text + ); + + $this->wiki_text = preg_replace_callback( + '|MULTI_PLUGIN_OPEN.*?MULTI_PLUGIN_CLOSE|ms', + create_function( + '$matches', + 'return preg_replace("/^\s+/ms","",$matches[0]);' + ), + $this->wiki_text + ); + + } + + $this->replace_entities(); + $this->wiki_text = preg_replace('/\<\?php/i', '<?php',$this->wiki_text) ; + $this->wiki_text = preg_replace('/\?>/i', '?>',$this->wiki_text) ; + file_put_contents($rsave_id, $this->wiki_text); + echo 'done'; + +} + +function replace_entities() { + global $ents; + $serialized = FCK_ACTION_SUBDIR . 'ent.ser'; + $ents = unserialize(file_get_contents($serialized)); + + $this->wiki_text = preg_replace_callback( + '|(&(\w+);)|', + create_function( + '$matches', + 'global $ents; return $ents[$matches[2]];' + ), + $this->wiki_text + ); + +} + + function insertFormElement(Doku_Event $event, $param) { + global $FCKG_show_preview; + + $param = array(); + + global $ID; + $dwedit_ns = @$this->getConf('dwedit_ns'); + if(isset($dwedit_ns) && $dwedit_ns) { + $ns_choices = explode(',',$dwedit_ns); + foreach($ns_choices as $ns) { + $ns = trim($ns); + if(preg_match("/$ns/",$ID)) { + echo ""; + break; + } + } + } + $act = $event->data; + if(is_string($act) && $act != 'edit') { + return; + } + + // restore preview button if standard DW editor is in place + // $FCKG_show_preview is set in edit.php in the register() function +if($_REQUEST['fck_preview_mode'] != 'nil' && !isset($_COOKIE['FCKG_USE']) && !$FCKG_show_preview) { + echo ''; + } + elseif($FCKG_show_preview) { + echo ''; + } + else { + echo ''; + } + + global $ckgedit_lang; + + if($_REQUEST['fck_preview_mode']== 'preview'){ + return; + } + + $param = array(); + $this->preprocess($event, $param); // create the setDWEditCookie() js function + $button = array + ( + '_elem' => 'button', + 'type' => 'submit', + '_action' => 'cancel', + 'value' => $this->getLang('btn_fck_edit'), + 'class' => 'button', + 'id' => 'edbtn__edit', + 'title' => $this->getLang('btn_fck_edit') + ); + + $pos = strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE'); + if($pos === false) { + $button['onclick'] = 'return setDWEditCookie(1, this);'; + } + else { + $button['onmousedown'] = 'return setDWEditCookie(1, this);'; + } + + $pos = $event->data->findElementByAttribute('type','submit'); + //inserts HTML data after that position. + $event->data->insertElement(++$pos,$button); + + return; + + } + + + function preprocess(Doku_Event $event, $param) { + $act = $event->data; + + if(is_string($act) && $act != 'edit') { + return; + } + global $INFO, $ckgedit_lang; + + $discard = $this->getLang('discard_edits'); + echo "\n"; + echo << +SCRIPT; + + } + +function check_userfiles() { + + global $INFO; + global $conf; + + $save_dir = trim($conf['savedir']); + $animal = isset($conf['animal']) ? $conf['animal'] : 'userfiles'; + + $userfiles = DOKU_PLUGIN . "ckgedit/fckeditor/$animal/"; + if(isset($conf['animal']) && $conf['animal'] !== 'userfiles') { + setcookieSameSite('FCK_animal',$animal, $expire, '/'); + setcookieSameSite('FCK_animal_inc',$conf['animal_inc'], $expire, '/'); + preg_match('#^(.*?' . $conf['animal'] . ')#', $save_dir,$matches); + $save_dir=$matches[1] . '/data/pages'; + setcookieSameSite('FCK_farmlocal',$save_dir, $expire, '/'); + + return; + } +// msg('BASE='. DOKU_BASE); +// msg(DOKU_URL); +// msg('REL='. DOKU_REL); + if(!preg_match('#^\.\/data$#',$save_dir)) { + $data_media = $conf['savedir'] . '/media/'; + + $domain = trim(DOKU_BASE,'/'); + + $expire = null; + + if(! empty($domain )) { + list($prefix,$mdir) = explode(trim(DOKU_BASE, '/'),$userfiles); + $mdir = ltrim($mdir, '/'); + // $media_dir = DOKU_BASE . $mdir . 'image/'; + $media_dir = DOKU_BASE . $mdir . 'lib/exe/fetch.php/'; + + } + else $media_dir = '/lib/plugins/ckgedit/fckeditor/'. $animal . '/image/'; + setcookieSameSite('FCK_media',$media_dir, $expire, '/'); + + } + else { + $data_media = DOKU_INC.'data/media/'; + } + + if($this->getConf('winstyle')) { + $htaccess = $data_media . '.htaccess'; + if(!file_exists($htaccess)) { + $security = $userfiles . '.htaccess.security'; + if(file_exists($security)) { + if(!copy($security, $htaccess)) { + msg($this->getLang("ws_cantcopy") . $htaccess); + } + else msg($this->getLang("ws_copiedhtaccess")); + } + } + return; + } + if(!is_readable($userfiles) && !is_writable($userfiles)){ + msg($this->getLang("userfiles_perm" ) . ' ' . $userfiles) ; + return; + } + $version = io_readFile(DOKU_PLUGIN . 'ckgedit/version'); + if(!$version) return; + $meta = metaFN('fckl:symchk','.meta'); + $symcheck = io_readFile($meta); + if($symcheck) { + if(trim($version)== trim($symcheck)) { //symlinks should already have been created + return; + } + } + + if (function_exists('php_uname')) { + $sys = php_uname() ; + if( preg_match('/Windows/i', $sys) ) { + preg_match('/build\s+(\d+)/',$sys, $matches); + if($matches[1] < 6000) { // we can make symlinks for vista (6000) or later + return; + } + + $winlinks = array(); + $userfiles = str_replace('/', '\\',$userfiles); + exec("dir " . $userfiles, $output); + foreach($output as $line) { + if(preg_match('/\s+(.*?)\s+\[/i',$line,$matches)) { + $winlinks[] = $matches[1]; + } + } + } + + } + else if( preg_match('/WINNT/i', PHP_OS) ) { // if we can't get php_uname and a build and this is Windows, just return + return; + } + + $show_msg = false; + if($INFO['isadmin'] || $INFO['ismanager'] ) { // only admins and mgrs get messages + $show_msg = true; + } + $link_names = array('flash', 'image', 'media', 'file', 'image'); + if(is_array($winlinks) && count($winlinks)) { + $link_names = array_diff($link_names, $winlinks); + } + $links = array(); + foreach ($link_names as $ln) { + $links[$ln] = $userfiles . $ln; + } + + $bad_create = false; + $successes = array(); + if(@file_exists($userfiles)) { + foreach($links as $name => $path) { + if(!is_link($path)) { + if(file_exists($path) && is_file($path) ){ + unlink($path); + } + if(file_exists($path) && is_dir($path) ){ + rmdir($path); + } + if(!@symlink($data_media,$path) ) { + $bad_create = true; + if($show_msg) msg($this->getLang("sym_not created_1") . " $name link: $path",-1); + } + else { + $successes[] = $name; + } + } + } + } + else { + if($show_msg) { + msg($this->getLang("sym_not created_2") ." $userfiles",-1); + } + } + + + + if($bad_create) { + if($show_msg) { + msg($this->getLang("sym_not created_3") . " $userfiles"); + } + } + else { + if(count($successes)) { + $links_created = implode(', ',$successes); + msg($this->getLang("syms_created") . " $links_created",2); + } + } + io_saveFile($meta,$version); + chmod($meta, 0666); +} + + + function set_session() { + global $USERINFO, $INFO; + global $conf; + global $ID; + global $ACT; + + if($this->session_id) return; + + $cname = getCacheName($INFO['client'].$ID,'.draft'); + $fckl_draft = $cname . '.fckl'; + if((isset($ACT) && is_array($ACT)) || isset($_REQUEST['dwedit_preview'])) { + if(isset($ACT['draftdel']) || isset($ACT['cancel']) || isset($_REQUEST['dwedit_preview'])) { + @unlink($fckl_draft); + @unlink($cname); + } + } + + if(file_exists($cname)) { + if(file_exists($fckl_draft)) { + unlink($fckl_draft); + } + @rename($cname, $fckl_draft); + } + + + $session_string = session_id(); + $this->session_id = $session_string; + + + $_SESSION['dwfck_id'] = $session_string; + $default_fb = $this->getConf('default_fb'); + + if($default_fb == 'none') { + $acl = 255; + } + else { + $acl = auth_quickaclcheck($ID); + } + $_SESSION['dwfck_acl'] = $acl; + + if($this->getConf('openfb') || $acl == 255) { + $_SESSION['dwfck_openfb'] = 'y'; + } + else { + $_SESSION['dwfck_openfb'] = 'n'; + } + + $_SESSION['dwfck_grps'] = isset($USERINFO['grps']) ? $USERINFO['grps'] : array(); + $_SESSION['dwfck_client'] = $INFO['client']; + $_SESSION['dwfck_sepchar'] = $conf['sepchar'] ; + $_SESSION['dwfck_conf'] = array('sepchar'=> $conf['sepchar'], + 'isadmin'=>($INFO['isadmin'] || $INFO['ismanager']), + 'deaccent'=>$conf['deaccent'], 'useslash'=>$conf['useslash']); + $elems = explode(':', $ID); + array_pop($elems); + + $_SESSION['dwfck_ns'] = implode(':',$elems); + $_SESSION['dwfck_top'] = implode('/',$elems); + $_SESSION['dwfck_del'] = $this->getConf('acl_del'); + + // temp fix for puzzling encoding=url bug in frmresourceslist.html, + // where image loading is processed in GetFileRowHtml() + + if(preg_match('/ckgedit:fckeditor:userfiles:image/',$ID)) { + $_SESSION['dwfck_ns'] = ""; + $_SESSION['dwfck_top'] = ""; + + } + + $expire = time()+60*60*24*30; + // $expire = null; + setcookieSameSite('FCK_NmSp_acl',$session_string, $expire, '/'); + + setcookieSameSite('FCK_SCAYT',$this->getConf('scayt'), $expire, '/'); + setcookieSameSite('FCK_SCAYT_AUTO',$this->getConf('scayt_auto'), $expire, '/'); + $scayt_lang = $this->getConf('scayt_lang'); + if(isset($scayt_lang)) { + list($scayt_lang_title,$scayt_lang_code) = explode('/',$scayt_lang); + if($scayt_lang_code!="en_US") { + setcookieSameSite('FCK_SCAYT_LANG',$scayt_lang_code, $expire, '/'); + } + } + if ($this->getConf('winstyle')) { + setcookieSameSite('FCKConnector','WIN', $expire, DOKU_BASE); + } + + if ($this->dokuwiki_priority && $this->in_dwpriority_group() ) { + if(isset($_COOKIE['FCKG_USE']) && $_COOKIE['FCKG_USE'] == 'other') { //if other go to ckeditor + $expire = time() -60*60*24*30; + setcookieSameSite('FCKG_USE','_false_', $expire, '/'); + } + else { + setcookieSameSite('FCKG_USE','_false_', $expire, '/'); //turn off ckeditor + } + } + } + + function file_type(Doku_Event $event, $param) { + global $ACT; + global $ID; + global $JSINFO; + global $INPUT; + global $updateVersion; + global $conf, $USERINFO; + + if(isset($USERINFO)) { + $this->startup_msg(); + } + if((float)$updateVersion >= 51){ // HOGFATHER + + // $conf['plugin']['ckgedit']['allow_ckg_filebrowser'] = 'dokuwiki'; + // $conf['plugin']['ckgedit']['default_ckg_filebrowser'] = 'dokuwiki'; + } + + $auth = auth_quickaclcheck($ID); + $JSINFO['confirm_delete']= $this->getLang('confirm_delete'); + $JSINFO['doku_base'] = DOKU_BASE ; + $JSINFO['cg_rev'] = $INPUT->str('rev'); + $JSINFO['dw_version'] = (float)$updateVersion; + if(preg_match("/Chrome\/(\d+)/", $_SERVER['HTTP_USER_AGENT'],$cmatch)) { + $JSINFO['chrome_version'] = (float) $cmatch[1]; + } + else $JSINFO['chrome_version'] = 0; + $JSINFO['hide_captcha_error'] = $INPUT->str('ckged_captcha_err','none'); + $dbl_click_auth = $this->getConf('dw_edit_display'); + if($dbl_click_auth == 'none' || empty($_SERVER['REMOTE_USER'])) { + $JSINFO['ckg_dbl_click'] = ""; + } + else if($dbl_click_auth == 'all' ||$auth == 255 ) { + $JSINFO['ckg_dbl_click'] = "1"; + } + $onoff = $this->getConf('dblclk'); + if($onoff == 'off') $JSINFO['ckg_dbl_click'] = ""; + $JSINFO['ckg_canonical'] =$conf['canonical']; + $JSINFO['doku_base'] = DOKU_BASE; + $JSINFO['doku_url'] = DOKU_URL; + if($this->helper->has_plugin('tag')) $JSINFO['has_tags'] = "Tag"; + if($this->helper->has_plugin('wrap') && ! plugin_isdisabled('wrap')) { + $JSINFO['has_wrap'] = "Wrap"; + $wrap_helper = plugin_load('helper','wrap'); + if($wrap_helper ) { + $syntaxDiv = $wrap_helper->getConf('syntaxDiv'); + if(!empty($syntaxDiv)) { + $JSINFO['wrapDiv'] = $syntaxDiv; + } + else $JSINFO['wrapDiv'] = ""; + + $syntaxSpan = $wrap_helper->getConf('syntaxSpan'); + if(!empty($syntaxSpan)) { + $JSINFO['wrapSpan'] = $syntaxSpan; + } + else $JSINFO['wrapSpan'] = ""; + } + } + if(!isset($_COOKIE['ckgEdPaste'])) { + $JSINFO['ckgEdPaste'] = 'off'; + } + else { + $JSINFO['ckgEdPaste'] = $_COOKIE['ckgEdPaste']; + } + $JSINFO[ 'rel_links'] = $this->getConf('rel_links'); + $JSINFO['ckg_template'] = $conf['template']; + $this->check_userfiles(); + $this->profile_dwpriority=($this->dokuwiki_priority && $this->in_dwpriority_group()) ? 1 : 0; + if(isset($_COOKIE['FCK_NmSp'])) $this->set_session(); + /* set cookie to pass namespace to FCKeditor's media dialog */ + // $expire = time()+60*60*24*30; + $expire = null; + setcookieSameSite('FCK_NmSp',$ID, $expire, '/'); + + + + /* Remove TopLevel cookie */ + if(isset($_COOKIE['TopLevel'])) { + setcookieSameSite("TopLevel", $_REQUEST['TopLevel'], time()-3600, '/'); + } + + + if(!isset($_REQUEST['id']) || isset($ACT['preview'])) return; + if(isset($_REQUEST['do']) && isset($_REQUEST['do']['edit'])) { + $_REQUEST['do'] = 'edit'; + } + } + +function loadScript(Doku_Event $event) { + echo << + +SCRIPT; + +} + +/** + * Handle features need for DW Edit: + * 1. Re-label Cancel Button "Exit" when doing a preview + * 2. set up $REQUEST value to identify a preview when in DW Edit , used in + * set_session to remove ckgedit and DW drafts if present after a DW preview +*/ + function setupDWEdit(Doku_Event $event) { + global $ACT; + + // $url = DOKU_URL . 'lib/plugins/ckgedit/scripts/script-cmpr.js'; + echo << + +SCRIPT; + + if(isset($_REQUEST['do']) && is_array($_REQUEST['do'])) { + if(isset($_REQUEST['do']['preview'])) { + echo ''; + } + } + + + } + + + +function reset_user_rewrite_check() { + + global $ACT; + global $conf; + global $JSINFO,$USERINFO; + + if(isset($_COOKIE['FCKG_USE']) && $_COOKIE['FCKG_USE'] =='_false_' ) return; + if($ACT == 'edit') { + $this->user_rewrite = $conf['userewrite']; + $conf['userewrite'] = 0; + } + + if($conf['htmlok'] || $this->getConf('htmlblock_ok')) { + $JSINFO['htmlok'] = 1; + } + else $JSINFO['htmlok'] = 0; + } + +function startup_msg() { + global $INFO; + global $ACT; + global $updateVersion; + $show_msg = false; + if($INFO['isadmin'] || $INFO['ismanager'] ) { // only admins and mgrs get messages + $show_msg = true; + } + if(!$show_msg) return; + + $filename = metaFN('fckl:scayt','.meta'); + $msg = $this->locale_xhtml('scayt'); + if (!file_exists($filename)) { + io_saveFile($filename,'1'); + msg($msg,MSG_MANAGERS_ONLY); + } + else { + if($this->getConf('scayt_auto') != 'off') return; + $this->startup_check_twice($filename, 'scayt'); + } + if( (float)$updateVersion < 51) { + return; + } + +/* + $filename = metaFN('fckl:hogfather','.meta'); + $msg = $this->locale_xhtml('hogfather'); + if (!file_exists($filename)) { + io_saveFile($filename,'1'); + msg($msg,MSG_MANAGERS_ONLY); + } */ + +} + +function startup_check_twice($filename, $which) { + global $ACT; + + if($ACT != 'login') return; + $msg = $this->locale_xhtml($which); + if (file_exists($filename)) { + $reps = io_readFile($filename); + if($reps <2) { + $reminder = $this->getLang('dblclk_reminder'); + msg("($reminder) " . $msg,2 ); + io_saveFile($filename,$reps+1); + return; + } + } +} +/** + checked for additional dw priority possibilities only if the dw priority option is set to true +*/ +function in_dwpriority_group() { + global $USERINFO,$INFO; + if(!isset($USERINFO)) return false; + if(empty($this->dw_priority_group)) return true; // all users get dw_priority if no dw_priority group has been set in config + $client = $_SERVER['REMOTE_USER']; + $ar = unserialize(file_get_contents($this->dw_priority_metafn)); // check user profile settings + $expire = time() -60*60*24*30; + if(isset($ar[$client])) { + if($ar[$client] =='Y') return true; // Y = dw_priority selected + if($ar[$client] =='N') { + setcookieSameSite('FCKG_USE','_false_', $expire, '/'); + return false; // N = CKEditor selected + } + } + $user_groups = $USERINFO['grps']; + + if(in_array($this->dw_priority_group, $user_groups) || in_array("admin", $user_groups)) { + return true; + } + + setcookieSameSite('FCKG_USE','_false_', $expire, '/'); + + return false; +} + +function restore_conf() { + global $conf; + global $ACT; + if($ACT == 'edit') { return; } + + if($this->user_rewrite !==false) { + $conf['userewrite'] = $this->user_rewrite; + } + +} +function ajax_debug($data) { + return; + echo "$data\n"; +} +function write_debug($data) { + return; + if (!$handle = fopen(DOKU_INC .'meta.txt', 'a')) { + return; + } + if(is_array($data)) { + $data = print_r($data,true); + } + // Write $somecontent to our opened file. + fwrite($handle, "$data\n"); + fclose($handle); + +} + +} + + + diff --git a/lib/plugins/ckgedit/action/save.php b/lib/plugins/ckgedit/action/save.php new file mode 100644 index 0000000..96d13a3 --- /dev/null +++ b/lib/plugins/ckgedit/action/save.php @@ -0,0 +1,464 @@ +register_hook('DOKUWIKI_STARTED', 'BEFORE', $this, 'ckgedit_save_preprocess'); + } + + function ckgedit_save_preprocess(Doku_Event $event){ + global $ACT,$INPUT; + $this->helper = $this->loadhelper('ckgedit'); + if (!isset($_REQUEST['ckgedit']) || ! is_array($ACT) || !(isset($ACT['save']) || isset($ACT['preview']))) return; + if (isset($_REQUEST["fontdel"]) ) { + msg($this->getLang("fontdel"),1); + } + if (isset($_REQUEST["formatdel"]) ) { + msg($this->getLang("formatdel"),1); + } + + $img_size = $INPUT->int('broken_image'); + if($img_size) msg($this->getLang('broken_image') . $img_size/1000000 . 'M' ); + + + global $TEXT, $conf; + + if (!$TEXT) return; + $preserve_enc = $this->getConf('preserve_enc'); + $deaccent = $conf['deaccent'] == 0 ? false : true; + $TEXT = $_REQUEST['fck_wikitext']; + + if(!preg_match('/^\s+(\-|\*)/',$TEXT)) { + $TEXT = trim($TEXT); + } + + + $TEXT = preg_replace_callback( + '|\{\{data:(.*?);base64|ms', + create_function( + '$matches', + 'if(!preg_match("/image/",$matches[1])) { + return "{{data:image/jpeg;base64"; + } + return $matches[0];' + ),$TEXT); + + if(strpos($TEXT,'data:image') !== false) { + $TEXT = preg_replace_callback( + '|\{\{(\s*)data:image\/(\w+;base64,\s*)(.*?)\?nolink&(\s*)\}\}|ms', + create_function( + '$matches', + 'list($ext,$base) = explode(";",$matches[2]); + if($ext == "jpeg" || $ext == "tiff") $ext = "jpg"; + if(function_exists("imagecreatefromstring") && !imagecreatefromstring (base64_decode($matches[3]))) { + msg("Clipboard paste: invalid $ext image format"); + return "{{" . BROKEN_IMAGE . "}}"; + } + global $INFO,$conf; + $ns = getNS($INFO["id"]); + $ns = trim($ns); + if(!empty($ns)) { + $ns = ":$ns:"; + $dir = str_replace(":","/",$ns); + } + else { // root namespace + $dir = "/"; + $ns = ":"; + } + $fn = md5($matches[3]) . ".$ext"; + $path = $conf["mediadir"] . $dir . $fn; + @io_makeFileDir($path); + if(!file_exists($path)) { + @file_put_contents($path, base64_decode($matches[3])); + global $lang; + $id = $dir . $fn; + $id = str_replace("/",":",$id); + addMediaLogEntry(time(), $id, DOKU_CHANGE_TYPE_CREATE, $lang["created"],"", null, strlen(base64_decode($matches[3]))); + } + else { + msg("file for this image previousely saved",2); + } + $left = "{{"; + $right = "}}"; + if($matches[1]) $left .= $matches[1]; + if($matches[4]) $right = $matches[4] . $right; + + $retv = "$left" . $ns. $fn . "$right"; + return $retv;' + ), + $TEXT + ); + } + $TEXT = str_replace('%%', "FCKGPERCENTESC", $TEXT); + + if($deaccent || $preserve_enc) { + $TEXT = preg_replace_callback('/^(.*?)(\[\[.*?\]\])*(.*?)$/ms', + create_function( + '$matches', + '$matches[1] = preg_replace("/%([A-F0-9]{1,3})/i", "URLENC_PERCENT$1", $matches[1]); + $matches[2] = preg_replace("/%([A-F0-9]{1,3})/i", "URLENC_PERCENT$1", $matches[2]); + $matches[3] = preg_replace("/%([A-F0-9]{1,3})/i", "URLENC_PERCENT$1", $matches[3]); + return $matches[1].$matches[2].$matches[3];' + ), + $TEXT + ); + } + + $TEXT = rawurldecode($TEXT); + $TEXT = preg_replace('/NOWIKI_%_NOWIKI_%_/', '%%',$TEXT); + $TEXT = preg_replace('/URLENC_PERCENT/', '%',$TEXT); + $TEXT = preg_replace('/NOWIKI_(.)_/', '$1',$TEXT); + + /* preserve newlines in code blocks */ + $TEXT = preg_replace_callback( + '/(|)(.*?)(<\/code>|<\/file>)/ms', + create_function( + '$matches', + 'return str_replace("\n", "__code_NL__",$matches[0]);' + ), + $TEXT + ); + + $TEXT = preg_replace('/^\s*[\r\n]$/ms',"__n__", $TEXT); + $TEXT = preg_replace('/oIWIKIo|cIWIKIc/ms',"", $TEXT); + $TEXT = preg_replace('/\r/ms',"", $TEXT); + $TEXT = preg_replace('/^\s+(?=\^|\|)/ms',"", $TEXT); + $TEXT = preg_replace('/__n__/',"\n", $TEXT); + $TEXT = str_replace("__code_NL__","\n", $TEXT); + $TEXT = str_replace("FCKGPERCENTESC", '%%', $TEXT); + if($this->getConf('complex_tables')) { + $TEXT = str_replace('~~COMPLEX_TABLES~~','',$TEXT); + } + $TEXT .= "\n"; + // Removes relics of markup characters left over after acronym markup has been removed + //$TEXT = preg_replace('/([\*\/_]{2})\s+\\1\s*([A-Z]+)\s*\\1+/ms',"$2",$TEXT); + + $pos = strpos($TEXT, 'MULTI_PLUGIN_OPEN'); + if($pos !== false) { + $TEXT = preg_replace_callback( + '|MULTI_PLUGIN_OPEN.*?MULTI_PLUGIN_CLOSE|ms', + create_function( + '$matches', + 'return preg_replace("/\\\\\\\\/ms","\n",$matches[0]);' + ), + $TEXT + ); + + $TEXT = preg_replace_callback( + '|MULTI_PLUGIN_OPEN.*?MULTI_PLUGIN_CLOSE|ms', + create_function( + '$matches', + 'return preg_replace("/^\s+/ms","",$matches[0]);' + ), + $TEXT + ); + $TEXT = str_replace("~~MULTI_PLUGIN_OPEN~~","~~MULTI_PLUGIN_OPEN~~\n",$TEXT); + } + + if(strpos($TEXT,'L_PARgr') !== false) { + $TEXT = preg_replace_callback( + '|\(\((.*?)\)\)|ms', + create_function( + '$matches', + 'return "((" . trim($matches[1]) . "))"; ' + ), + $TEXT + ); + $TEXT = str_replace('L_PARgr', '(',$TEXT); + $TEXT = str_replace('R_PARgr', ')',$TEXT); + } +/* +Restructure numbered syntax highlighting 13/09/2019 +*/ +$TEXT = preg_replace_callback("#.*?(\[enable_line_numbers.*?\])\s*\*\/#ms", + function($matches) { + return ''; + }, $TEXT +) ; + + $this->replace_entities(); + /*Remove urls from linkonly images inserted after second and additional saves, resulting in multiple urls corrupting HTML output */ + $TEXT = preg_replace("/\{\{http:\/\/.*?fetch.php\?media=(.*?linkonly.*?)\}\}/",'{{' . "$1" .'}}',$TEXT); + $TEXT = str_replace('< nowiki >', '%%%%',$TEXT); + + + $TEXT = preg_replace_callback( + '#\[\[(.*?)\]\]#ms', + function($matches){ + if($this->helper->has_plugin('button') && strpos($matches[0], '[[{') === 0) { + return $matches[0]; + } + if(preg_match('/[\w\.]+\s*>/',$matches[0])) { + return $matches[0]; + } + if(preg_match('/([\w\.\-]+@[\w\.\-]+\.\w{2,3})\?.*?\|\1/i',$matches[0])) { + return $matches[0]; + } + global $ID, $conf; + $qs = ""; + if(preg_match("/\[\[http/",$matches[0])) return $matches[0]; //not an internal link + if(preg_match("#\[\[.*?\|\{\{.*?\}\}\]\]#", $matches[0],$matches_1)) { // media file + if(!$this->getConf('rel_links')) { + return $matches[0]; + } + $link = explode('?',$matches[1]); + list($link_id,$linktext) = explode('|', $link[0]); + $current_id = $this->abs2rel($link_id,$ID); + return preg_replace("#$link_id#",$current_id, $matches[0]); + } + + $link = explode('?',$matches[1]); + if($link[1]) { + $link_id = $link[0]; + list($qs,$linktext) = explode('|', $link[1]); + } + else list($link_id,$linktext) = explode('|', $link[0]); + if($this->getConf('rel_links')) + $current_id = $this->abs2rel($link_id,$ID); + else $current_id = $link_id; + if($qs) $current_id .= "?$qs"; + + //as in _getLinkTitle in xhtml.php + if(useHeading('content')) { + $tmp_linktext = p_get_first_heading($link_id); + if(trim($linktext) == trim($tmp_linktext)) { + $linktext = ""; + } + } + $tmp_ar = explode(':',$link_id); + $tmp_id = array_pop($tmp_ar); + if(!useHeading('content') && (trim($linktext,'.: ' ) == trim($tmp_id,'.: '))) + $linktext = ""; + + $current_id = $current_id.'|'.$linktext; + return '[[' . $current_id .']]'; + }, + $TEXT + ); + + if($this->getConf('rel_links')) { + $TEXT = preg_replace_callback( + '#\{\{(\s*)(.*?)(\s*)\}\}#ms', + function($matches) { + global $ID; + $link = explode('?',$matches[2]); + list($link_id,$linktext) = explode('|', $link[0]); + $rel = $this->abs2rel($link_id,$ID); + if(!empty($link[1])) $rel .= '?' . $link[1]; + if(!empty($linktext)) $rel = $rel.'|'.$linktext; + return '{{' .$matches[1] . $rel . $matches[3] .'}}'; + }, + $TEXT + ); + } + +/* 11 Dec 2013 see comment below +Remove discarded font syntax +*/ + $TEXT = preg_replace_callback( + '|_REMOVE_FONTS_START_(.*?)_REMOVE_FONTS_END_|ms', + create_function( + '$matches', + '$matches[1] = preg_replace("//ms","",$matches[1]); + return preg_replace("/<\/font>/ms","",$matches[1]);' + ), + $TEXT + ); + + /* +6 April 2013 +Removed newlines and spaces from beginnings and ends of text enclosed by font tags. Too subtle for javascript. + */ + $TEXT = preg_replace_callback( + '|()(.*?)(?=)|ms', + create_function( + '$matches', + '$matches[2]=preg_replace("/^\s+/ms","",$matches[2]); + $matches[2]=preg_replace("/\s+$/ms","",$matches[2]); + return $matches[1]. $matches[2];' + ), + $TEXT + ); + /* insure space before and after ckgedit font oprning and closing tags*/ + $TEXT = preg_replace("/\s+<\/font>/","", $TEXT); + $TEXT = preg_replace("//ms"," ", $TEXT); + $TEXT = preg_replace('/\s{2,}{2,}/ms',' font> ',$TEXT); + + $TEXT = preg_replace('/__QUOTE__/ms',">",$TEXT); + $TEXT = preg_replace('/[\t\x20]+$/ms',"",$TEXT); + $TEXT = preg_replace('/\n{4,}/ms',"\n\n",$TEXT); + $TEXT = preg_replace('/\n{3,}/ms',"\n\n",$TEXT); + + /*first pass for blockquotes*/ + $TEXT = preg_replace_callback( + "#^>+(.*?)\\\\\\\\#ms", + function($matches) { + return str_replace('\\',"",$matches[0]); + }, + $TEXT + ); + + /* remove extra line-feeds following in-table code blocks + make sure cell-ending pipe not mistaken for a following link divider + */ + $TEXT = preg_replace_callback( + '#(/code|/file)\>.*?\n\|#ms', + function($matches) { + $matches[0] = preg_replace("/([\S\s\w\:])\\\\\\\\(\w)/ms","$1@#@$2",$matches[0]); //retain backslashes inside code blocks + $matches[0] = preg_replace("/(\w+)\\\\\\\\(\w)/ms","$1@#@",$matches[0]); + $matches[0] = preg_replace("/\\\\(\w+)/ms","@!@$1",$matches[0]); + $matches[0] = preg_replace("/(\w+)\\\\/ms","@!@$1",$matches[0]); + $matches[0] = str_replace("\\", "",$matches[0]); + $matches[0] = str_replace("@!@",'\\',$matches[0]); + return str_replace("@#@", "\\\\",$matches[0]); + }, + $TEXT + ); + /* reformat table cell after removing extra line-feeds, above */ + $TEXT = preg_replace_callback( + '#\|[\s\n]+(\)(.*?)(\<\/file>\s*.*?)\n?\|#ms', + function($matches) { + //$ret = '' . str_replace('\\',"",$matches[2]) . '|'; + $matches[3] = preg_replace('/\n+/',"",$matches[3] ); + $matches[3] = preg_replace('/\s+$/',"",$matches[3] ) . '|'; + return '|' . $matches[1] . $matches[2] . str_replace("\\ ","",$matches[3]); + }, + $TEXT + ); + + + /* Feb 23 2019 + remove spaces and line feeds between beginning of table cell and start of code block + */ + $TEXT = preg_replace_callback( + '#\|(.*?)[\s\n]+\<(code|file)\>#ms', + function($matches) { + return '|' . $matches[1] ."\n<". $matches[2] .'>' . "\n"; + },$TEXT + ); + /*remove line feeds following block */ + $TEXT = preg_replace_callback( + '#\<\/(code|file)\>([^\w\|]+)#ms', + function($matches) { + $matches[2] = str_replace(':\\', '~~WIN__DIR~~',$matches[2]); + $matches[2] = preg_replace('#([\w;.:=\:])\\\\#ms', "$1_bSL_",$matches[2]); //protect backslashes in Windows paths + $ret = '' . str_replace("\\","",$matches[2]); + $ret = str_replace( '_bSL_', '\\',$ret); + $ret = str_replace( '~~WIN__DIR~~', ':\\',$ret); + return "\n" .$ret; + },$TEXT + ); + $TEXT = str_replace('CBL__Bksl','\\',$TEXT); + $TEXT = preg_replace("/1){ + $aResult=array_fill(0,$nPageDiff-1,'..'); + } + else if($nPageDiff == 1) { + $aResult[] = '.'; + } + $aResult=array_merge($aResult,$aLinkDiff); + return implode(':', $aResult); +} + + +} //end of action class +?> diff --git a/lib/plugins/ckgedit/action/tagapi.php b/lib/plugins/ckgedit/action/tagapi.php new file mode 100644 index 0000000..fa9930f --- /dev/null +++ b/lib/plugins/ckgedit/action/tagapi.php @@ -0,0 +1,73 @@ + + */ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); +class action_plugin_ckgedit_tagapi extends DokuWiki_Action_Plugin { + private $tagplugin = null; + /** + * Registers a callback function for a given event + * + * @param Doku_Event_Handler $controller DokuWiki's event controller object + * @return void + */ + public function register(Doku_Event_Handler $controller) { + + $controller->register_hook('AJAX_CALL_UNKNOWN', 'BEFORE', $this, 'handle_ajax_call_unknown'); + + } + + /** + * @param Doku_Event $event event object by reference + * @param mixed $param [the parameters passed as fifth argument to register_hook() when this + * handler was registered] + * @return void + */ + + public function handle_ajax_call_unknown(Doku_Event &$event, $param) { + if ($event->data !== 'tagapi_list') { + return; + } + $event->stopPropagation(); + $event->preventDefault(); + + if ($this->tagplugin = $this->loadHelper('tag')) { + $tags = $this->tagplugin->tagOccurrences(array(), NULL, true); + $a = print_r($tags,true); + // file_put_contents(DOKU_INC . 'tags.txt', $a); + } else { + $tags = array(); + } + + // sort tags by name ($tags is in the form $tag => $count) + ksort($tags); + echo '{"tags":['; + $firstelement = true; + foreach (array_keys($tags) as $tag) { + if ($firstelement) { + $firstelement = false; + } else { + echo ','; + } + echo '{"name":"'.$this->tagToName($tag).'","id":"'.$tag.'"}'; + } + echo']}'; + } + + private function tagToName($t) { + $exists = false; + $id = $t; + resolve_pageID($this->tagplugin->namespace, $id, $exists); + $name = p_get_first_heading($id, false); + if (empty($name)) { + $name = $t; + } else { + $name = $name; + } + return $name; + } +} \ No newline at end of file diff --git a/lib/plugins/ckgedit/admin.php b/lib/plugins/ckgedit/admin.php new file mode 100644 index 0000000..b72466e --- /dev/null +++ b/lib/plugins/ckgedit/admin.php @@ -0,0 +1,124 @@ + + * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html +*/ + +require_once(DOKU_INC . 'lib/plugins/ckgedit/scripts/css6.php'); +class admin_plugin_ckgedit extends DokuWiki_Admin_Plugin { + + private $tpl_inc; + private $template; + private $alt; + function __construct() { + global $conf; + $this->template = $conf['template']; + $this->tpl_inc = tpl_incdir(); + } + + function handle() { + + if (!isset($_REQUEST['cmd'])) return; // first time - nothing to do + + $this->output = 'invalid'; + + if (!checkSecurityToken()) return; + if (!is_array($_REQUEST['cmd'])) return; + + switch (key($_REQUEST['cmd'])) { + case 'stylesheet' : { + $this->alt = ""; + $this->output = 'style_sheet_msg'; + break; + } + case 'alt_stylesheet' : { + $this->alt = $_REQUEST['templates']; + $this->output = 'alt_style_sheet_msg'; + break; + } + } + + + } + + /** + * output appropriate html + */ + function html() { + ptln(''); + ptln(''); + + ptln(''); + // output hidden values to ensure dokuwiki will return back to this plugin + ptln(' '); + ptln(' '); + formSecurityToken(); + + //Current style sheet + ptln('

' . $this->getLang('default_stylesheet') . ': (' .$this->template . ')
'); + ptln(''); + ptln('  '); + ptln('

'); + + // Other style sheet + $alt_val = isset($this->alt)?$this->alt: "" ; + ptln('

' . $this->getLang('alt_stylesheet') .'
'); + ptln(''); + ptln(''); + ptln('

'); + + if($this->output && $this->output == 'style_sheet_msg') { + $path = $this->tpl_inc; + ptln(htmlspecialchars($this->getLang($this->output)). " " .$this->template); + $retv = css_ckg_out($path); + $this->message($path, $retv); + + } + else if($this->output && $this->output == 'alt_style_sheet_msg') { + ptln(htmlspecialchars($this->getLang($this->output)). " " .$this->alt); + $path = str_replace('tpl/'.$this->template, 'tpl/'.$this->alt,$this->tpl_inc); + $retv = css_ckg_out($path,$this->alt); + $this->message($path, $retv); + } + + } + + function message($path, $which) { + $messages = array( + "Stylesheet saved to $path" . 'Styles/_style.css', + "Failed to save stylesheet to $path" . 'Styles/_style.css' + ); + $color = $which == 0? '#333': 'blue'; + ptln('
'.htmlspecialchars($messages[$which]).''); + + } + + function templates($selected="") { + $dir = dirname($this->tpl_inc); + $files = scandir($dir); + $dir .= '/'; + $list = ""; + foreach ($files AS $file) { + if($file == '.' || $file == '..' || $file == $this->template) continue; + $entry = $dir . $file; + if(!is_writable($entry)) continue; + if(is_dir ($entry ) ) { + if($file == $selected) { + $list .= ""; + } + else $list .= ""; + } + } + + return $list; + } +} \ No newline at end of file diff --git a/lib/plugins/ckgedit/ckeditor/CHANGES.md b/lib/plugins/ckgedit/ckeditor/CHANGES.md new file mode 100644 index 0000000..9f37e50 --- /dev/null +++ b/lib/plugins/ckgedit/ckeditor/CHANGES.md @@ -0,0 +1,1703 @@ +CKEditor 4 Changelog +==================== + +## CKEditor 4.11.4 + +Fixed Issues: + +* [#589](https://github.com/ckeditor/ckeditor-dev/issues/589): Fixed: The editor causes memory leaks in create and destroy cycles. +* [#1397](https://github.com/ckeditor/ckeditor-dev/issues/1397): Fixed: Using the dialog to remove headers from a [table](https://ckeditor.com/cke4/addon/table) with one header row only throws an error. +* [#1479](https://github.com/ckeditor/ckeditor-dev/issues/1479): Fixed: [Justification](https://ckeditor.com/cke4/addon/justify) for styled content in BR mode is disabled. +* [#2816](https://github.com/ckeditor/ckeditor-dev/issues/2816): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) resize handler is visible in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). +* [#2874](https://github.com/ckeditor/ckeditor-dev/issues/2874): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) resize handler is not created when the editor is initialized in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). +* [#2775](https://github.com/ckeditor/ckeditor-dev/issues/2775): Fixed: [Clipboard](https://ckeditor.com/cke4/addon/clipboard) paste buttons have wrong state when [read-only](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html) mode is set by the mouse event listener with the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) plugin. +* [#1901](https://github.com/ckeditor/ckeditor-dev/issues/1901): Fixed: Cannot open the context menu over a [Widget](https://ckeditor.com/cke4/addon/widget) with the Shift+F10 keyboard shortcut. + +Other Changes: + +* Updated [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) and [SpellCheckAsYouType](https://ckeditor.com/cke4/addon/scayt) (SCAYT) plugins: + * Language dictionary update: German language was extended with over 600k new words. + * Language dictionary update: Swedish language was extended with over 300k new words. + * Grammar support added for Australian and New Zealand English, Polish, Slovak, Slovenian and Austrian languages. + * Changed wavy red and green lines that underline spelling and grammar errors to straight ones. + * [#55](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/55): Fixed: WSC does not use [`CKEDITOR.getUrl()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getUrl) when referencing style sheets. + * [#166](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/166): Fixed: SCAYT does not use [`CKEDITOR.getUrl()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getUrl) when referencing style sheets. + * [#56](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/56): [Chrome] Fixed: SCAYT/WSC throws errors when running inside a Chrome extension. + * Fixed: After removing a dictionary, the words are not underlined and considered as incorrect. + * Fixed: The Slovenian (`sl_SL`) language does not work. + * Fixed: Quotes with code `U+2019` (Right single quotation mark) are considered separators. + * Fixed: Wrong error message formatting when the service ID is invalid. + * Fixed: Absent languages in the Languages tab when using SCAYT with the [Shared Spaces](https://ckeditor.com/cke4/addon/sharedspace) plugin. + +## CKEditor 4.11.3 + +Fixed Issues: + +* [#2721](https://github.com/ckeditor/ckeditor-dev/issues/2721), [#487](https://github.com/ckeditor/ckeditor-dev/issues/487): Fixed: The order of sublist items is reversed when a higher level list item is removed. +* [#2527](https://github.com/ckeditor/ckeditor-dev/issues/2527): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) autocomplete order does not prioritize emojis with the name starting from the used string. +* [#2572](https://github.com/ckeditor/ckeditor-dev/issues/2572): Fixed: Icons in the [Emoji](https://ckeditor.com/cke4/addon/emoji) dropdown navigation groups are not centered. +* [#1191](https://github.com/ckeditor/ckeditor-dev/issues/1191): Fixed: Items in the [elements path](https://ckeditor.com/cke4/addon/elementspath) are draggable. +* [#2292](https://github.com/ckeditor/ckeditor-dev/issues/2292): Fixed: Dropping a list with a link on the editor's margin causes a console error and removes the dragged text from editor. +* [#2756](https://github.com/ckeditor/ckeditor-dev/issues/2756): Fixed: The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin causes an error when typing in the [source editing mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_sourcearea.html). +* [#1986](https://github.com/ckeditor/ckeditor-dev/issues/1986): Fixed: The Cell Properties dialog from the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin shows styles that are not allowed through [`config.allowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-allowedContent). +* [#2565](https://github.com/ckeditor/ckeditor-dev/issues/2565): [IE, Edge] Fixed: Buttons in the [editor toolbar](https://ckeditor.com/cke4/addon/toolbar) are activated by clicking them with the right mouse button. +* [#2792](https://github.com/ckeditor/ckeditor-dev/pull/2792): Fixed: A bug in the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin that caused the following issues: + * [#2780](https://github.com/ckeditor/ckeditor-dev/issues/2780): Fixed: Undo steps disappear after multiple changes of selection. + * [#2470](https://github.com/ckeditor/ckeditor-dev/issues/2470): [Firefox] Fixed: Widget's nested editable gets blurred upon focus. + * [#2655](https://github.com/ckeditor/ckeditor-dev/issues/2655): [Chrome, Safari] Fixed: Widget's nested editable cannot be focused under certain circumstances. + +## CKEditor 4.11.2 + +Fixed Issues: + +* [#2403](https://github.com/ckeditor/ckeditor-dev/issues/2403): Fixed: Styling inline editor initialized inside a table with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is causing style leaks. +* [#2514](https://github.com/ckeditor/ckeditor-dev/issues/2403): Fixed: Pasting table data into inline editor initialized inside a table with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin inserts pasted content into the wrapping table. +* [#2451](https://github.com/ckeditor/ckeditor-dev/issues/2451): Fixed: The [Remove Format](https://ckeditor.com/cke4/addon/removeformat) plugin changes selection. +* [#2546](https://github.com/ckeditor/ckeditor-dev/issues/2546): Fixed: The separator in the toolbar moves when buttons are focused. +* [#2506](https://github.com/ckeditor/ckeditor-dev/issues/2506): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) throws a type error when an empty `
` tag with an `image` class is upcasted. +* [#2650](https://github.com/ckeditor/ckeditor-dev/issues/2650): Fixed: [Table](https://ckeditor.com/cke4/addon/table) dialog validator fails when the `getValue()` function is defined in the global scope. +* [#2690](https://github.com/ckeditor/ckeditor-dev/issues/2690): Fixed: Decimal characters are removed from the inside of numbered lists when pasting content using the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#2205](https://github.com/ckeditor/ckeditor-dev/issues/2205): Fixed: It is not possible to add new list items under an item containing a block element. +* [#2411](https://github.com/ckeditor/ckeditor-dev/issues/2411), [#2438](https://github.com/ckeditor/ckeditor-dev/issues/2438) Fixed: Apply numbered list option throws a console error for a specific markup. +* [#2430](https://github.com/ckeditor/ckeditor-dev/issues/2430) Fixed: [Color Button](https://ckeditor.com/cke4/addon/colorbutton) and [List Block](https://ckeditor.com/cke4/addon/listblock) items are draggable. + +Other Changes: + +* Updated the [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) plugin: + * [#52](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/52) Fixed: Clicking "Finish Checking" without a prior action would hang the Spell Checking dialog. +* [#2603](https://github.com/ckeditor/ckeditor-dev/issues/2603): Corrected the GPL license entry in the `package.json` file. + +## CKEditor 4.11.1 + +Fixed Issues: + +* [#2571](https://github.com/ckeditor/ckeditor-dev/issues/2571): Fixed: Clicking the categories in the [Emoji](https://ckeditor.com/cke4/addon/emoji) dropdown panel scrolls the entire page. + +## CKEditor 4.11 + +**Security Updates:** + +* Fixed XSS vulnerability in the HTML parser reported by [maxarr](https://hackerone.com/maxarr). + + Issue summary: It was possible to execute XSS inside CKEditor after persuading the victim to: (i) switch CKEditor to source mode, then (ii) paste a specially crafted HTML code, prepared by the attacker, into the opened CKEditor source area, and (iii) switch back to WYSIWYG mode. + +**An upgrade is highly recommended!** + +New Features: + +* [#2062](https://github.com/ckeditor/ckeditor-dev/pull/2062): Added the emoji dropdown that allows the user to choose the emoji from the toolbar and search for them using keywords. +* [#2154](https://github.com/ckeditor/ckeditor-dev/issues/2154): The [Link](https://ckeditor.com/cke4/addon/link) plugin now supports phone number links. +* [#1815](https://github.com/ckeditor/ckeditor-dev/issues/1815): The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin supports typing link completion. +* [#2478](https://github.com/ckeditor/ckeditor-dev/issues/2478): [Link](https://ckeditor.com/cke4/addon/link) can be inserted using the Ctrl/Cmd + K keystroke. +* [#651](https://github.com/ckeditor/ckeditor-dev/issues/651): Text pasted using the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin preserves indentation in paragraphs. +* [#2248](https://github.com/ckeditor/ckeditor-dev/issues/2248): Added support for justification in the [BBCode](https://ckeditor.com/cke4/addon/bbcode) plugin. Thanks to [Matěj Kmínek](https://github.com/KminekMatej)! +* [#706](https://github.com/ckeditor/ckeditor-dev/issues/706): Added a different cursor style when selecting cells for the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin. +* [#2072](https://github.com/ckeditor/ckeditor-dev/issues/2072): The [UI Button](https://ckeditor.com/cke4/addon/button) plugin supports custom `aria-haspopup` property values. The [Menu Button](https://ckeditor.com/cke4/addon/menubutton) `aria-haspopup` value is now `menu`, the [Panel Button](https://ckeditor.com/cke4/addon/panelbutton) and [Rich Combo](https://ckeditor.com/cke4/addon/richcombo) `aria-haspopup` value is now `listbox`. +* [#1176](https://github.com/ckeditor/ckeditor-dev/pull/1176): The [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) can now be attached to a selection instead of an element. +* [#2202](https://github.com/ckeditor/ckeditor-dev/issues/2202): Added the `contextmenu_contentsCss` configuration option to allow adding custom CSS to the [Context Menu](https://ckeditor.com/cke4/addon/contextmenu). + +Fixed Issues: + +* [#1477](https://github.com/ckeditor/ckeditor-dev/issues/1477): Fixed: On destroy, [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) does not destroy its content. +* [#2394](https://github.com/ckeditor/ckeditor-dev/issues/2394): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) dropdown does not show up with repeated symbols in a single line. +* [#1181](https://github.com/ckeditor/ckeditor-dev/issues/1181): [Chrome] Fixed: Opening the context menu in a read-only editor results in an error. +* [#2276](https://github.com/ckeditor/ckeditor-dev/issues/2276): [iOS] Fixed: [Button](https://ckeditor.com/cke4/addon/button) state does not refresh properly. +* [#1489](https://github.com/ckeditor/ckeditor-dev/issues/1489): Fixed: Table contents can be removed in read-only mode when the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is used. +* [#1264](https://github.com/ckeditor/ckeditor-dev/issues/1264) Fixed: Right-click does not clear the selection created with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin. +* [#586](https://github.com/ckeditor/ckeditor-dev/issues/586) Fixed: The `required` attribute is not correctly recognized by the [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin dialog. Thanks to [Roli Züger](https://github.com/rzueger)! +* [#2380](https://github.com/ckeditor/ckeditor-dev/issues/2380) Fixed: Styling HTML comments in a top-level element results in extra paragraphs. +* [#2294](https://github.com/ckeditor/ckeditor-dev/issues/2294) Fixed: Pasting content from Microsoft Outlook and then bolding it results in an error. +* [#2035](https://github.com/ckeditor/ckeditor-dev/issues/2035) [Edge] Fixed: `Permission denied` is thrown when opening a [Panel](https://ckeditor.com/cke4/addon/panel) instance. +* [#965](https://github.com/ckeditor/ckeditor-dev/issues/965) Fixed: The [`config.forceSimpleAmpersand`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forceSimpleAmpersand) option does not work. Thanks to [Alex Maris](https://github.com/alexmaris)! +* [#2448](https://github.com/ckeditor/ckeditor-dev/issues/2448): Fixed: The [`Escape HTML Entities`] plugin with custom [additional entities](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-entities_additional) configuration breaks HTML escaping. +* [#898](https://github.com/ckeditor/ckeditor-dev/issues/898): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) long alternative text protrudes into the editor when the image is selected. +* [#1113](https://github.com/ckeditor/ckeditor-dev/issues/1113): [Firefox] Fixed: Nested contenteditable elements path is not updated on focus with the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) plugin. +* [#1682](https://github.com/ckeditor/ckeditor-dev/issues/1682) Fixed: Hovering the [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) panel changes its size, causing flickering. +* [#421](https://github.com/ckeditor/ckeditor-dev/issues/421) Fixed: Expandable [Button](https://ckeditor.com/cke4/addon/button) puts the `(Selected)` text at the end of the label when clicked. +* [#1454](https://github.com/ckeditor/ckeditor-dev/issues/1454): Fixed: The [`onAbort`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-onAbort) method of the [Upload Widget](https://ckeditor.com/cke4/addon/uploadwidget) is not called when the loader is aborted. +* [#1451](https://github.com/ckeditor/ckeditor-dev/issues/1451): Fixed: The context menu is incorrectly positioned when opened with Shift+F10. +* [#1722](https://github.com/ckeditor/ckeditor-dev/issues/1722): [`CKEDITOR.filter.instances`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#static-property-instances) is causing memory leaks. +* [#2491](https://github.com/ckeditor/ckeditor-dev/issues/2491): Fixed: The [Mentions](https://ckeditor.com/cke4/addon/mentions) plugin is not matching diacritic characters. +* [#2519](https://github.com/ckeditor/ckeditor-dev/issues/2519): Fixed: The [Accessibility Help](https://ckeditor.com/cke4/addon/a11yhelp) dialog should display all available keystrokes for a single command. + +API Changes: + +* [#2453](https://github.com/ckeditor/ckeditor-dev/issues/2453): The [`CKEDITOR.ui.panel.block.getItems`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_panel_block.html#method-getItems) method now also returns `input` elements in addition to links. +* [#2224](https://github.com/ckeditor/ckeditor-dev/issues/2224): The [`CKEDITOR.tools.convertToPx`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-convertToPx) function now converts negative values. +* [#2253](https://github.com/ckeditor/ckeditor-dev/issues/2253): The widget definition [`insert`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-insert) method now passes `editor` and `commandData`. Thanks to [marcparmet](https://github.com/marcparmet)! +* [#2045](https://github.com/ckeditor/ckeditor-dev/issues/2045): Extracted [`tools.eventsBuffer`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-eventsBuffer) and [`tools.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) functions logic into a separate namespace. + * [`tools.eventsBuffer`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-eventsBuffer) was extracted into [`tools.buffers.event`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_buffers_event.html), + * [`tools.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) was extracted into [`tools.buffers.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_buffers_throttle.html). +* [#2466](https://github.com/ckeditor/ckeditor-dev/issues/2466): The [`CKEDITOR.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-constructor) constructor accepts an additional `rules` parameter allowing to bind the editor and filter together. +* [#2493](https://github.com/ckeditor/ckeditor-dev/issues/2493): The [`editor.getCommandKeystroke`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) method accepts an additional `all` parameter allowing to retrieve an array of all command keystrokes. +* [#2483](https://github.com/ckeditor/ckeditor-dev/issues/2483): Button's DOM element created with the [`hasArrow`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui.html#method-addButton) definition option can by identified by the `.cke_button_expandable` CSS class. + +Other Changes: + +* [#1713](https://github.com/ckeditor/ckeditor-dev/issues/1713): Removed the redundant `lang.title` entry from the [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin. + +## CKEditor 4.10.1 + +Fixed Issues: + +* [#2114](https://github.com/ckeditor/ckeditor-dev/issues/2114): Fixed: [Autocomplete](https://ckeditor.com/cke4/addon/autocomplete) cannot be initialized before [`instanceReady`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-instanceReady). +* [#2107](https://github.com/ckeditor/ckeditor-dev/issues/2107): Fixed: Holding and releasing the mouse button is not inserting an [autocomplete](https://ckeditor.com/cke4/addon/autocomplete) suggestion. +* [#2167](https://github.com/ckeditor/ckeditor-dev/issues/2167): Fixed: Matching in [Emoji](https://ckeditor.com/cke4/addon/emoji) plugin is not case insensitive. +* [#2195](https://github.com/ckeditor/ckeditor-dev/issues/2195): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) shows the suggestion box when the colon is preceded with other characters than white space. +* [#2169](https://github.com/ckeditor/ckeditor-dev/issues/2169): [Edge] Fixed: Error thrown when pasting into the editor. +* [#1084](https://github.com/ckeditor/ckeditor-dev/issues/1084) Fixed: Using the "Automatic" option with [Color Button](https://ckeditor.com/cke4/addon/colorbutton) on a text with the color already defined sets an invalid color value. +* [#2271](https://github.com/ckeditor/ckeditor-dev/issues/2271): Fixed: Custom color name not used as a label in the [Color Button](https://ckeditor.com/cke4/addon/image2) plugin. Thanks to [Eric Geloen](https://github.com/egeloen)! +* [#2296](https://github.com/ckeditor/ckeditor-dev/issues/2296): Fixed: The [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin throws an error when activated on content containing HTML comments. +* [#966](https://github.com/ckeditor/ckeditor-dev/issues/966): Fixed: Executing [`editor.destroy()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-destroy) during the [file upload](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-onUploading) throws an error. Thanks to [Maksim Makarevich](https://github.com/MaksimMakarevich)! +* [#1719](https://github.com/ckeditor/ckeditor-dev/issues/1719): Fixed: Ctrl/Cmd + A inadvertently focuses inline editor if it is starting and ending with a list. Thanks to [theNailz](https://github.com/theNailz)! +* [#1046](https://github.com/ckeditor/ckeditor-dev/issues/1046): Fixed: Subsequent new links do not include the `id` attribute. Thanks to [Nathan Samson](https://github.com/nathansamson)! +* [#1348](https://github.com/ckeditor/ckeditor-dev/issues/1348): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin aspect ratio locking uses an old width and height on image URL change. +* [#1791](https://github.com/ckeditor/ckeditor-dev/issues/1791): Fixed: [Image](https://ckeditor.com/cke4/addon/image) and [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugins can be enabled when [Easy Image](https://ckeditor.com/cke4/addon/easyimage) is present. +* [#2254](https://github.com/ckeditor/ckeditor-dev/issues/2254): Fixed: [Image](https://ckeditor.com/cke4/addon/image) ratio locking is too precise for resized images. Thanks to [Jonathan Gilbert](https://github.com/logiclrd)! +* [#1184](https://github.com/ckeditor/ckeditor-dev/issues/1184): [IE8-11] Fixed: Copying and pasting data in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) throws an error. +* [#1916](https://github.com/ckeditor/ckeditor-dev/issues/1916): [IE9-11] Fixed: Pressing the Delete key in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) throws an error. +* [#2003](https://github.com/ckeditor/ckeditor-dev/issues/2003): [Firefox] Fixed: Right-clicking multiple selected table cells containing empty paragraphs removes the selection. +* [#1816](https://github.com/ckeditor/ckeditor-dev/issues/1816): Fixed: Table breaks when Enter is pressed over the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin. +* [#1115](https://github.com/ckeditor/ckeditor-dev/issues/1115): Fixed: The `` tag is not preserved when proper configuration is provided and a style is applied by the [Font](https://ckeditor.com/cke4/addon/font) plugin. +* [#727](https://github.com/ckeditor/ckeditor-dev/issues/727): Fixed: Custom styles may be invisible in the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin. +* [#988](https://github.com/ckeditor/ckeditor-dev/issues/988): Fixed: ACF-enabled custom elements prefixed with `object`, `embed`, `param` are removed from the editor content. + +API Changes: + +* [#2249](https://github.com/ckeditor/ckeditor-dev/issues/1791): Added the [`editor.plugins.detectConflict()`](https://ckeditor.com/docs/ckeditor4/latest/CKEDITOR_editor_plugins.html#method-detectConflict) method finding conflicts between provided plugins. + +## CKEditor 4.10 + +New Features: + +* [#1751](https://github.com/ckeditor/ckeditor-dev/issues/1751): Introduced the **Autocomplete** feature that consists of the following plugins: + * [Autocomplete](https://ckeditor.com/cke4/addon/autocomplete) – Provides contextual completion feature for custom text matches based on user input. + * [Text Watcher](https://ckeditor.com/cke4/addon/textWatcher) – Checks whether an editor's text change matches the chosen criteria. + * [Text Match](https://ckeditor.com/cke4/addon/textMatch) – Allows to search [`CKEDITOR.dom.range`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html) for matching text. +* [#1703](https://github.com/ckeditor/ckeditor-dev/issues/1703): Introduced the [Mentions](https://ckeditor.com/cke4/addon/mentions) plugin providing smart completion feature for custom text matches based on user input starting with a chosen marker character. +* [#1746](https://github.com/ckeditor/ckeditor-dev/issues/1703): Introduced the [Emoji](https://ckeditor.com/cke4/addon/emoji) plugin providing completion feature for emoji ideograms. +* [#1761](https://github.com/ckeditor/ckeditor-dev/issues/1761): The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin now supports email links. + +Fixed Issues: + +* [#1458](https://github.com/ckeditor/ckeditor-dev/issues/1458): [Edge] Fixed: After blurring the editor it takes 2 clicks to focus a widget. +* [#1034](https://github.com/ckeditor/ckeditor-dev/issues/1034): Fixed: JAWS leaves forms mode after pressing the Enter key in an inline editor instance. +* [#1748](https://github.com/ckeditor/ckeditor-dev/pull/1748): Fixed: Missing [`CKEDITOR.dialog.definition.onHide`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog_definition.html#property-onHide) API documentation. Thanks to [sunnyone](https://github.com/sunnyone)! +* [#1321](https://github.com/ckeditor/ckeditor-dev/issues/1321): Fixed: Ideographic space character (`\u3000`) is lost when pasting text. +* [#1776](https://github.com/ckeditor/ckeditor-dev/issues/1776): Fixed: Empty caption placeholder of the [Image Base](https://ckeditor.com/cke4/addon/imagebase) plugin is not hidden when blurred. +* [#1592](https://github.com/ckeditor/ckeditor-dev/issues/1592): Fixed: The [Image Base](https://ckeditor.com/cke4/addon/imagebase) plugin caption is not visible after paste. +* [#620](https://github.com/ckeditor/ckeditor-dev/issues/620): Fixed: The [`config.forcePasteAsPlainText`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forcePasteAsPlainText) option is not respected in internal and cross-editor pasting. +* [#1467](https://github.com/ckeditor/ckeditor-dev/issues/1467): Fixed: The resizing cursor of the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin appearing in the middle of a merged cell. + +API Changes: + +* [#850](https://github.com/ckeditor/ckeditor-dev/issues/850): Backward incompatibility: Replaced the `replace` dialog from the [Find / Replace](https://ckeditor.com/cke4/addon/find) plugin with a `tabId` option in the `find` command. +* [#1582](https://github.com/ckeditor/ckeditor-dev/issues/1582): The [`CKEDITOR.editor.addCommand()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-addCommand) method can now accept a [`CKEDITOR.command`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_command.html) instance as a parameter. +* [#1712](https://github.com/ckeditor/ckeditor-dev/issues/1712): The [`extraPlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins), [`removePlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-removePlugins) and [`plugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-plugins) configuration options allow whitespace. +* [#1802](https://github.com/ckeditor/ckeditor-dev/issues/1802): The [`extraPlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins), [`removePlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-removePlugins) and [`plugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-plugins) configuration options allow passing plugin names as an array. +* [#1724](https://github.com/ckeditor/ckeditor-dev/issues/1724): Added an option to the [`getClientRect()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-getClientRect) function allowing to retrieve an absolute bounding rectangle of the element, i.e. a position relative to the upper-left corner of the topmost viewport. +* [#1498](https://github.com/ckeditor/ckeditor-dev/issues/1498) : Added a new [`getClientRects()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-getClientRects) method to `CKEDITOR.dom.range`. It returns a list of rectangles for each selected element. +* [#1993](https://github.com/ckeditor/ckeditor-dev/issues/1993): Added the [`CKEDITOR.tools.throttle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) function. + +Other Changes: + +* Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) plugins: + * Language dictionary update: Added support for the Uzbek Latin language. + * Languages no longer supported as additional languages: Manx - Isle of Man (`gv_GB`) and Interlingua (`ia_XR`). + * Extended and improved language dictionaries: Georgian and Swedish. Also added the missing word _"Ensure"_ to the American, British and Canada English language. + * [#141](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/141) Fixed: SCAYT throws "Uncaught Error: Error in RangyWrappedRange module: createRange(): Parameter must be a Window object or DOM node". + * [#153](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/153) [Chrome] Fixed: Correcting a word in the widget in SCAYT moves focus to another editable. + * [#155](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/155) [IE8] Fixed: SCAYT throws an error and does not work. + * [#156](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/156) [IE10] Fixed: SCAYT does not seem to work. + * Fixed: After some text is dragged and dropped, the markup is not refreshed for grammar problems in SCAYT. + * Fixed: Request to FastCGI fails when the user tries to replace a word with non-English characters with a proper suggestion in WSC. + * [Firefox] Fixed: Ctrl+Z removes focus in SCAYT. + * Grammar support for default languages was improved. + * New application source URL was added in SCAYT. + * Removed green marks and legend related to grammar-supported languages in the Languages tab of SCAYT. Grammar is now supported for almost all the anguages in the list for an additional fee. + * Fixed: JavaScript error in the console: "Cannot read property 'split' of undefined" in SCAYT and WSC. + * [IE10] Fixed: Markup is not set for a specific case in SCAYT. + * Fixed: Accessibility issue: No `alt` attribute for the logo image in the About tab of SCAYT. + +## CKEditor 4.9.2 + +**Security Updates:** + +* Fixed XSS vulnerability in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) (`image2`) plugin reported by [Kyaw Min Thein](https://twitter.com/kyawminthein99). + + Issue summary: It was possible to execute XSS inside CKEditor using the `` tag and specially crafted HTML. Please note that the default presets (Basic/Standard/Full) do not include this plugin, so you are only at risk if you made a custom build and enabled this plugin. + +We would like to thank the [Drupal security team](https://www.drupal.org/drupal-security-team) for bringing this matter to our attention and coordinating the fix and release process! + +## CKEditor 4.9.1 + +Fixed Issues: + +* [#1835](https://github.com/ckeditor/ckeditor-dev/issues/1835): Fixed: Integration between [CKFinder](https://ckeditor.com/ckeditor-4/ckfinder/) and the [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin does not work. + +## CKEditor 4.9 + +New Features: + +* [#932](https://github.com/ckeditor/ckeditor-dev/issues/932): Introduced Easy Image feature for inserting images that are automatically rescaled, optimized, responsive and delivered through a blazing-fast CDN. Three new plugins were added to support it: + * [Easy Image](https://ckeditor.com/cke4/addon/easyimage), + * [Cloud Services](https://ckeditor.com/cke4/addon/cloudservices) + * [Image Base](https://ckeditor.com/cke4/addon/imagebase) +* [#1338](https://github.com/ckeditor/ckeditor-dev/issues/1338): Keystroke labels are displayed for function keys (like F7, F8). +* [#643](https://github.com/ckeditor/ckeditor-dev/issues/643): The [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin can now upload files using XHR requests. This allows for setting custom HTTP headers using the [`config.fileTools_requestHeaders`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fileTools_requestHeaders) configuration option. +* [#1365](https://github.com/ckeditor/ckeditor-dev/issues/1365): The [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin uses XHR requests by default. +* [#1399](https://github.com/ckeditor/ckeditor-dev/issues/1399): Added the possibility to set [`CKEDITOR.config.startupFocus`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-startupFocus) as `start` or `end` to specify where the editor focus should be after the initialization. +* [#1441](https://github.com/ckeditor/ckeditor-dev/issues/1441): The [Magic Line](https://ckeditor.com/cke4/addon/magicline) plugin line element can now be identified by the `data-cke-magic-line="1"` attribute. + +Fixed Issues: + +* [#595](https://github.com/ckeditor/ckeditor-dev/issues/595): Fixed: Pasting does not work on mobile devices. +* [#869](https://github.com/ckeditor/ckeditor-dev/issues/869): Fixed: Empty selection clears cached clipboard data in the editor. +* [#1419](https://github.com/ckeditor/ckeditor-dev/issues/1419): Fixed: The [Widget Selection](https://ckeditor.com/cke4/addon/widgetselection) plugin selects the editor content with the Alt+A key combination on Windows. +* [#1274](https://github.com/ckeditor/ckeditor-dev/issues/1274): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) does not match a single selected image using the [`contextDefinition.cssSelector`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_balloontoolbar_contextDefinition.html#property-cssSelector) matcher. +* [#1232](https://github.com/ckeditor/ckeditor-dev/issues/1232): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) buttons should be registered as focusable elements. +* [#1342](https://github.com/ckeditor/ckeditor-dev/issues/1342): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) should be re-positioned after the [`change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event. +* [#1426](https://github.com/ckeditor/ckeditor-dev/issues/1426): [IE8-9] Fixed: Missing [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) background in the [Kama](https://ckeditor.com/cke4/addon/kama) skin. Thanks to [Christian Elmer](https://github.com/keinkurt)! +* [#1470](https://github.com/ckeditor/ckeditor-dev/issues/1470): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) is not visible after drag and drop of a widget it is attached to. +* [#1048](https://github.com/ckeditor/ckeditor-dev/issues/1048): Fixed: [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) is not positioned properly when a margin is added to its non-static parent. +* [#889](https://github.com/ckeditor/ckeditor-dev/issues/889): Fixed: Unclear error message for width and height fields in the [Image](https://ckeditor.com/cke4/addon/image) and [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugins. +* [#859](https://github.com/ckeditor/ckeditor-dev/issues/859): Fixed: Cannot edit a link after a double-click on the text in the link. +* [#1013](https://github.com/ckeditor/ckeditor-dev/issues/1013): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) does not work correctly with the [`config.forcePasteAsPlainText`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forcePasteAsPlainText) option. +* [#1356](https://github.com/ckeditor/ckeditor-dev/issues/1356): Fixed: [Border parse function](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_parse.html#method-border) does not allow spaces in the color value. +* [#1010](https://github.com/ckeditor/ckeditor-dev/issues/1010): Fixed: The CSS `border` shorthand property was incorrectly expanded ignoring the `border-color` style. +* [#1535](https://github.com/ckeditor/ckeditor-dev/issues/1535): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) mouseover border contrast is insufficient. +* [#1516](https://github.com/ckeditor/ckeditor-dev/issues/1516): Fixed: Fake selection allows removing content in read-only mode using the Backspace and Delete keys. +* [#1570](https://github.com/ckeditor/ckeditor-dev/issues/1570): Fixed: Fake selection allows cutting content in read-only mode using the Ctrl/Cmd + X keys. +* [#1363](https://github.com/ckeditor/ckeditor-dev/issues/1363): Fixed: Paste notification is unclear and it might confuse users. + +API Changes: + +* [#1346](https://github.com/ckeditor/ckeditor-dev/issues/1346): [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) [context manager API](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.balloontoolbar.contextManager.html) is now available in the [`pluginDefinition.init()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_pluginDefinition.html#method-init) method of the [requiring](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_pluginDefinition.html#property-requires) plugin. +* [#1530](https://github.com/ckeditor/ckeditor-dev/issues/1530): Added the possibility to use custom icons for [buttons](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_button.html.html). + +Other Changes: + +* Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) plugins: + * SCAYT [`scayt_minWordLength`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#scayt_minWordLength) configuration option now defaults to 3 instead of 4. + * SCAYT default number of suggested words in the context menu changed to 3. + * [#90](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/90): Fixed: Selection is lost on link creation if SCAYT highlights the word. + * Fixed: SCAYT crashes when the browser `localStorage` is disabled. + * [IE11] Fixed: `Unable to get property type of undefined or null reference` error in the browser console when SCAYT is disabled/enabled. + * [#46](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/46): Fixed: Editing is blocked when remote spell checker server is offline. + * Fixed: User Dictionary cannot be created in WSC due to `You already have the dictionary` error. + * Fixed: Words with apostrophe `'` on the replacement make the WSC dialog inaccessible. + * Fixed: SCAYT/WSC causes the `Uncaught TypeError` error in the browser console. +* [#1337](https://github.com/ckeditor/ckeditor-dev/issues/1337): Updated the samples layout with the new CKEditor 4 logo and color scheme. +* [#1591](https://github.com/ckeditor/ckeditor-dev/issues/1591): CKBuilder and language tools are now downloaded over HTTPS. Thanks to [August Detlefsen](https://github.com/augustd)! + +## CKEditor 4.8 + +**Important Notes:** + +* [#1249](https://github.com/ckeditor/ckeditor-dev/issues/1249): Enabled the [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) plugin by default in standard and full presets. Also, it will no longer log an error in case of missing [`config.imageUploadUrl`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-imageUploadUrl) property. + +New Features: + +* [#933](https://github.com/ckeditor/ckeditor-dev/issues/933): Introduced [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) plugin. +* [#662](https://github.com/ckeditor/ckeditor-dev/issues/662): Introduced image inlining for the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#468](https://github.com/ckeditor/ckeditor-dev/issues/468): [Edge] Introduced support for the Clipboard API. +* [#607](https://github.com/ckeditor/ckeditor-dev/issues/607): Manually inserted Hex color is prefixed with a hash character (`#`) if needed. It ensures a valid Hex color value is used when setting the table cell border or background color with the [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) window. +* [#584](https://github.com/ckeditor/ckeditor-dev/issues/584): [Font size and Family](https://ckeditor.com/cke4/addon/font) and [Format](https://ckeditor.com/cke4/addon/format) drop-downs are not toggleable anymore. Default option to reset styles added. +* [#856](https://github.com/ckeditor/ckeditor-dev/issues/856): Introduced the [`CKEDITOR.tools.keystrokeToArray()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-keystrokeToArray) method. It converts a keystroke into its string representation, returning every key name as a separate array element. +* [#1053](https://github.com/ckeditor/ckeditor-dev/issues/1053): Introduced the [`CKEDITOR.tools.object.merge()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-merge) method. It allows to merge two objects, returning the new object with all properties from both objects deeply cloned. +* [#1073](https://github.com/ckeditor/ckeditor-dev/issues/1073): Introduced the [`CKEDITOR.tools.array.every()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_array.html#method-every) method. It invokes a given test function on every array element and returns `true` if all elements pass the test. + +Fixed Issues: + +* [#796](https://github.com/ckeditor/ckeditor-dev/issues/796): Fixed: A list is pasted from OneNote in the reversed order. +* [#834](https://github.com/ckeditor/ckeditor-dev/issues/834): [IE9-11] Fixed: The editor does not save the selected state of radio buttons inserted by the [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin. +* [#704](https://github.com/ckeditor/ckeditor-dev/issues/704): [Edge] Fixed: Using Ctrl/Cmd + Z breaks widget structure. +* [#591](https://github.com/ckeditor/ckeditor-dev/issues/591): Fixed: A column is inserted in a wrong order inside the table if any cell has a vertical split. +* [#787](https://github.com/ckeditor/ckeditor-dev/issues/787): Fixed: Using Cut inside a nested table does not cut the selected content. +* [#842](https://github.com/ckeditor/ckeditor-dev/issues/842): Fixed: List style not restored when toggling list indent level in the [Indent List](https://ckeditor.com/cke4/addon/indentlist) plugin. +* [#711](https://github.com/ckeditor/ckeditor-dev/issues/711): Fixed: Dragging widgets should only work with the left mouse button. +* [#862](https://github.com/ckeditor/ckeditor-dev/issues/862): Fixed: The "Object Styles" group in the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin is visible only if the whole element is selected. +* [#994](https://github.com/ckeditor/ckeditor-dev/pull/994): Fixed: Typo in the [`CKEDITOR.focusManager.focus()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_focusManager.html#method-focus) API documentation. Thanks to [benjy](https://github.com/benjy)! +* [#1014](https://github.com/ckeditor/ckeditor-dev/issues/1014): Fixed: The [Table Tools](https://ckeditor.com/cke4/addon/tabletools) Cell Properties dialog is now [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) aware — it is not possible to change the cell width or height if corresponding styles are disabled. +* [#877](https://github.com/ckeditor/ckeditor-dev/issues/877): Fixed: A list with custom bullets with exotic characters crashes the editor when [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword). +* [#605](https://github.com/ckeditor/ckeditor-dev/issues/605): Fixed: Inline widgets do not preserve trailing spaces. +* [#1008](https://github.com/ckeditor/ckeditor-dev/issues/1008): Fixed: Shorthand Hex colors from the [`config.colorButton_colors`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-colorButton_colors) option are not correctly highlighted in the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) Text Color or Background Color panel. +* [#1094](https://github.com/ckeditor/ckeditor-dev/issues/1094): Fixed: Widget definition [`upcast`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-upcasts) methods are called for every element. +* [#1057](https://github.com/ckeditor/ckeditor-dev/issues/1057): Fixed: The [Notification](https://ckeditor.com/addon/notification) plugin overwrites Web Notifications API due to leakage to the global scope. +* [#1068](https://github.com/ckeditor/ckeditor-dev/issues/1068): Fixed: Upload widget paste listener ignores changes to the [`uploadWidgetDefinition`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.uploadWidgetDefinition.html). +* [#921](https://github.com/ckeditor/ckeditor-dev/issues/921): Fixed: [Edge] CKEditor erroneously perceives internal copy and paste as type "external". +* [#1213](https://github.com/ckeditor/ckeditor-dev/issues/1213): Fixed: Multiple images uploaded using [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) plugin are randomly duplicated or mangled. +* [#532](https://github.com/ckeditor/ckeditor-dev/issues/532): Fixed: Removed an outdated user guide link from the [About](https://ckeditor.com/cke4/addon/about) dialog. +* [#1221](https://github.com/ckeditor/ckeditor-dev/issues/1221): Fixed: Invalid CSS loaded by [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) plugin when [`config.skin`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-skin) is loaded using a custom path. +* [#522](https://github.com/ckeditor/ckeditor-dev/issues/522): Fixed: Widget selection is not removed when widget is inside table cell with [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin enabled. +* [#1027](https://github.com/ckeditor/ckeditor-dev/issues/1027): Fixed: Cannot add multiple images to the table with [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin in certain situations. +* [#1069](https://github.com/ckeditor/ckeditor-dev/issues/1069): Fixed: Wrong shape processing by [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#995](https://github.com/ckeditor/ckeditor-dev/issues/995): Fixed: Hyperlinked image gets inserted twice by [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#1287](https://github.com/ckeditor/ckeditor-dev/issues/1287): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) plugin throws exception if included in editor build but not loaded into editor's instance. + +API Changes: + +* [#1097](https://github.com/ckeditor/ckeditor-dev/issues/1097): Widget [`upcast`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-upcast) methods are now called in the [widget definition's](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#property-definition) context. +* [#1118](https://github.com/ckeditor/ckeditor-dev/issues/1118): Added the `show` option in the [`balloonPanel.attach()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_balloonPanel.html#method-attach) method, allowing to attach a hidden [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) instance. +* [#1145](https://github.com/ckeditor/ckeditor-dev/issues/1145): Added the [`skipNotifications`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-skipNotifications) option to the [`CKEDITOR.fileTools.uploadWidgetDefinition`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.uploadWidgetDefinition.html), allowing to switch off default notifications displayed by upload widgets. + +Other Changes: + +* [#815](https://github.com/ckeditor/ckeditor-dev/issues/815): Removed Node.js dependency from the CKEditor build script. +* [#1041](https://github.com/ckeditor/ckeditor-dev/pull/1041), [#1131](https://github.com/ckeditor/ckeditor-dev/issues/1131): Updated URLs pointing to [CKSource](https://cksource.com/) and [CKEditor](https://ckeditor.com/) resources after the launch of new websites. + +## CKEditor 4.7.3 + +New Features: + +* [#568](https://github.com/ckeditor/ckeditor-dev/issues/568): Added possibility to adjust nested editables' filters using the [`CKEDITOR.filter.disallowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#property-disallowedContent) property. + +Fixed Issues: + +* [#554](https://github.com/ckeditor/ckeditor-dev/issues/554): Fixed: [`change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event not fired when typing the first character after pasting into the editor. Thanks to [Daniel Miller](https://github.com/millerdev)! +* [#566](https://github.com/ckeditor/ckeditor-dev/issues/566): Fixed: The CSS `border` shorthand property with zero width (`border: 0px solid #000;`) causes the table to have the border attribute set to 1. +* [#779](https://github.com/ckeditor/ckeditor-dev/issues/779): Fixed: The [Remove Format](https://ckeditor.com/cke4/addon/removeformat) plugin removes elements with language definition inserted by the [Language](https://ckeditor.com/cke4/addon/language) plugin. +* [#423](https://github.com/ckeditor/ckeditor-dev/issues/423): Fixed: The [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin pastes paragraphs into the editor even if [`CKEDITOR.config.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode) is set to `CKEDITOR.ENTER_BR`. +* [#719](https://github.com/ckeditor/ckeditor-dev/issues/719): Fixed: Image inserted using the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin can be resized when the editor is in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). +* [#577](https://github.com/ckeditor/ckeditor-dev/issues/577): Fixed: The "Delete Columns" command provided by the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin throws an error when trying to delete columns. +* [#867](https://github.com/ckeditor/ckeditor-dev/issues/867): Fixed: Typing into a selected table throws an error. +* [#817](https://github.com/ckeditor/ckeditor-dev/issues/817): Fixed: The [Save](https://ckeditor.com/cke4/addon/save) plugin does not work in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea). + +Other Changes: + +* Updated the [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugin: + * [#40](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/40): Fixed: IE10 throws an error when spell checking is started. +* [#800](https://github.com/ckeditor/ckeditor-dev/issues/800): Added the [`CKEDITOR.dom.selection.isCollapsed()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_selection.html#method-isCollapsed) method which is a simpler way to check if the selection is collapsed. +* [#830](https://github.com/ckeditor/ckeditor-dev/issues/830): Added an option to define which dialog tab should be shown by default when creating [`CKEDITOR.dialogCommand`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.dialogCommand.html). + +## CKEditor 4.7.2 + +New Features: + +* [#455](https://github.com/ckeditor/ckeditor-dev/issues/455): Added [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) integration with the [Justify](https://ckeditor.com/cke4/addon/justify) plugin. + +Fixed Issues: + +* [#663](https://github.com/ckeditor/ckeditor-dev/issues/663): [Chrome] Fixed: Clicking the scrollbar throws an `Uncaught TypeError: element.is is not a function` error. +* [#694](https://github.com/ckeditor/ckeditor-dev/pull/694): Refactoring in the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin: + * [#520](https://github.com/ckeditor/ckeditor-dev/issues/520): Fixed: Widgets cannot be properly pasted into a table cell. + * [#460](https://github.com/ckeditor/ckeditor-dev/issues/460): Fixed: Editor gone after pasting into an editor within a table. +* [#579](https://github.com/ckeditor/ckeditor-dev/issues/579): Fixed: Internal `cke_table-faked-selection-table` class is visible in the Stylesheet Classes field of the [Table Properties](https://ckeditor.com/cke4/addon/table) dialog. +* [#545](https://github.com/ckeditor/ckeditor-dev/issues/545): [Edge] Fixed: Error thrown when pressing the [Select All](https://ckeditor.com/cke4/addon/selectall) button in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea). +* [#582](https://github.com/ckeditor/ckeditor-dev/issues/582): Fixed: Double slash in the path to stylesheet needed by the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin. Thanks to [Marius Dumitru Florea](https://github.com/mflorea)! +* [#491](https://github.com/ckeditor/ckeditor-dev/issues/491): Fixed: Unnecessary dependency on the [Editor Toolbar](https://ckeditor.com/cke4/addon/toolbar) plugin inside the [Notification](https://ckeditor.com/cke4/addon/notification) plugin. +* [#646](https://github.com/ckeditor/ckeditor-dev/issues/646): Fixed: Error thrown into the browser console after opening the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin menu in the editor without any selection. +* [#501](https://github.com/ckeditor/ckeditor-dev/issues/501): Fixed: Double click does not open the dialog for modifying anchors inserted via the [Link](https://ckeditor.com/cke4/addon/link) plugin. +* [#9780](https://dev.ckeditor.com/ticket/9780): [IE8-9] Fixed: Clicking inside an empty [read-only](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) editor throws an error. +* [#16820](https://dev.ckeditor.com/ticket/16820): [IE10] Fixed: Clicking below a single horizontal rule throws an error. +* [#426](https://github.com/ckeditor/ckeditor-dev/issues/426): Fixed: The [`range.cloneContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-cloneContents) method selects the whole element when the selection starts at the beginning of that element. +* [#644](https://github.com/ckeditor/ckeditor-dev/issues/644): Fixed: The [`range.extractContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-extractContents) method returns an incorrect result when multiple nodes are selected. +* [#684](https://github.com/ckeditor/ckeditor-dev/issues/684): Fixed: The [`elementPath.contains()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_elementPath.html#method-contains) method incorrectly excludes the last element instead of root when the `fromTop` parameter is set to `true`. + +Other Changes: + +* Updated the [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) plugin: + * [#148](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/148): Fixed: SCAYT leaves underlined word after the CKEditor Replace dialog corrects it. +* [#751](https://github.com/ckeditor/ckeditor-dev/issues/751): Added the [`CKEDITOR.dom.nodeList.toArray()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_nodeList.html#method-toArray) method which returns an array representation of a [node list](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.dom.nodeList.html). + +## CKEditor 4.7.1 + +New Features: + +* Added a new Mexican Spanish localization. Thanks to [David Alexandro Rodriguez](https://www.transifex.com/user/profile/darsco16/)! +* [#413](https://github.com/ckeditor/ckeditor-dev/issues/413): Added Paste as Plain Text keyboard shortcut to the [Accessibility Help](https://ckeditor.com/cke4/addon/a11yhelp) instructions. + +Fixed Issues: + +* [#515](https://github.com/ckeditor/ckeditor-dev/issues/515): [Chrome] Fixed: Mouse actions on CKEditor scrollbar throw an exception when the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is loaded. +* [#493](https://github.com/ckeditor/ckeditor-dev/issues/493): Fixed: Selection started from a nested table causes an error in the browser while scrolling down. +* [#415](https://github.com/ckeditor/ckeditor-dev/issues/415): [Firefox] Fixed: Enter key breaks the table structure when pressed in a table selection. +* [#457](https://github.com/ckeditor/ckeditor-dev/issues/457): Fixed: Error thrown when deleting content from the editor with no selection. +* [#478](https://github.com/ckeditor/ckeditor-dev/issues/478): [Chrome] Fixed: Error thrown by the [Enter Key](https://ckeditor.com/cke4/addon/enterkey) plugin when pressing Enter with no selection. +* [#424](https://github.com/ckeditor/ckeditor-dev/issues/424): Fixed: Error thrown by [Tab Key Handling](https://ckeditor.com/cke4/addon/tab) and [Indent List](https://ckeditor.com/cke4/addon/indentlist) plugins when pressing Tab with no selection in inline editor. +* [#476](https://github.com/ckeditor/ckeditor-dev/issues/476): Fixed: Anchors inserted with the [Link](https://ckeditor.com/cke4/addon/link) plugin on collapsed selection cannot be edited. +* [#417](https://github.com/ckeditor/ckeditor-dev/issues/417): Fixed: The [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin throws an error when used with a table with only header or footer rows. +* [#523](https://github.com/ckeditor/ckeditor-dev/issues/523): Fixed: The [`editor.getCommandKeystroke()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) method does not obtain the correct keystroke. +* [#534](https://github.com/ckeditor/ckeditor-dev/issues/534): [IE] Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) does not work in Quirks Mode. +* [#450](https://github.com/ckeditor/ckeditor-dev/issues/450): Fixed: [`CKEDITOR.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.filter.html) incorrectly transforms the `margin` CSS property. + +## CKEditor 4.7 + +**Important Notes:** + +* [#13793](https://dev.ckeditor.com/ticket/13793): The [`embed_provider`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-embed_provider) configuration option for the [Media Embed](https://ckeditor.com/cke4/addon/embed) and [Semantic Media Embed](https://ckeditor.com/cke4/addon/embedsemantic) plugins is no longer preset by default. +* The [UI Color](https://ckeditor.com/cke4/addon/uicolor) plugin now uses a custom color picker instead of the `YUI 2.7.0` library which has some known vulnerabilities (it's a security precaution, there was no security issue in CKEditor due to the way it was used). + +New Features: + +* [#16755](https://dev.ckeditor.com/ticket/16755): Added the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin that lets you select and manipulate an arbitrary rectangular table fragment (a few cells, a row or a column). +* [#16961](https://dev.ckeditor.com/ticket/16961): Added support for pasting from Microsoft Excel. +* [#13381](https://dev.ckeditor.com/ticket/13381): Dynamic code evaluation call in [`CKEDITOR.template`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.template.html) removed. CKEditor can now be used without the `unsafe-eval` Content Security Policy. Thanks to [Caridy Patiño](http://caridy.name)! +* [#16971](https://dev.ckeditor.com/ticket/16971): Added support for color in the `background` property containing also other styles for table cells in the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin. +* [#16847](https://dev.ckeditor.com/ticket/16847): Added support for parsing and inlining any formatting created using the Microsoft Word style system to the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#16818](https://dev.ckeditor.com/ticket/16818): Added table cell height parsing in the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#16850](https://dev.ckeditor.com/ticket/16850): Added a new [`config.enableContextMenu`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enableContextMenu) configuration option for enabling and disabling the [context menu](https://ckeditor.com/cke4/addon/contextmenu). +* [#16937](https://dev.ckeditor.com/ticket/16937): The `command` parameter in [`CKEDITOR.editor.getCommandKeystroke()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) now also accepts a command name as an argument. +* [#17010](https://dev.ckeditor.com/ticket/17010): The [`CKEDITOR.dom.range.shrink()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-shrink) method now allows for skipping bogus `
` elements. + +Fixed Issues: + +* [#16935](https://dev.ckeditor.com/ticket/16935): [Chrome] Fixed: Blurring the editor in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea) throws an error. +* [#16825](https://dev.ckeditor.com/ticket/16825): [Chrome] Fixed: Error thrown when destroying a focused inline editor. +* [#16857](https://dev.ckeditor.com/ticket/16857): Fixed: Ctrl+Shift+V blocked by [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting). +* [#16845](https://dev.ckeditor.com/ticket/16845): [IE] Fixed: Cursor jumps to the top of the scrolled editor after focusing it when the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin is enabled. +* [#16786](https://dev.ckeditor.com/ticket/16786): Fixed: Added missing translations for the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin. +* [#14714](https://dev.ckeditor.com/ticket/14714): [WebKit/Blink] Fixed: Exception thrown on refocusing a blurred inline editor. +* [#16913](https://dev.ckeditor.com/ticket/16913): [Firefox, IE] Fixed: [Paste as Plain Text](https://ckeditor.com/cke4/addon/pastetext) keystroke does not work. +* [#16968](https://dev.ckeditor.com/ticket/16968): Fixed: [Safari] [Paste as Plain Text](https://ckeditor.com/cke4/addon/pastetext) is not handled by the editor. +* [#16912](https://dev.ckeditor.com/ticket/16912): Fixed: Exception thrown when a single image is pasted using [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword). +* [#16821](https://dev.ckeditor.com/ticket/16821): Fixed: Extraneous `` elements with `height` style stacked when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword). +* [#16866](https://dev.ckeditor.com/ticket/16866): [IE, Edge] Fixed: Whitespaces not preserved when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword). +* [#16860](https://dev.ckeditor.com/ticket/16860): Fixed: Paragraphs which only look like lists incorrectly transformed into them when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword). +* [#16817](https://dev.ckeditor.com/ticket/16817): Fixed: When [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword), paragraphs are transformed into lists with some corrupted data. +* [#16833](https://dev.ckeditor.com/ticket/16833): [IE11] Fixed: Malformed list with headers [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword). +* [#16826](https://dev.ckeditor.com/ticket/16826): [IE] Fixed: Superfluous paragraphs within lists [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword). +* [#12465](https://dev.ckeditor.com/ticket/12465): Fixed: Cannot change the state of checkboxes or radio buttons if the properties dialog was invoked with a double-click. +* [#13062](https://dev.ckeditor.com/ticket/13062): Fixed: Impossible to unlink when the caret is at the edge of the link. +* [#13585](https://dev.ckeditor.com/ticket/13585): Fixed: Error when wrapping two adjacent `
` elements with a `
`. +* [#16811](https://dev.ckeditor.com/ticket/16811): Fixed: Table alignment is not preserved by the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#16810](https://dev.ckeditor.com/ticket/16810): Fixed: Vertical align in tables is not supported by the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#11956](https://dev.ckeditor.com/ticket/11956): [Blink, IE] Fixed: [Link](https://ckeditor.com/cke4/addon/link) dialog does not open on a double click on the second word of the link with a background color or other styles. +* [#10472](https://dev.ckeditor.com/ticket/10472): Fixed: Unable to use [Table Resize](https://ckeditor.com/cke4/addon/tableresize) on table header and footer. +* [#14762](https://dev.ckeditor.com/ticket/14762): Fixed: Hovering over an empty table (without rows or cells) throws an error when the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin is active. +* [#16777](https://dev.ckeditor.com/ticket/16777): [Edge] Fixed: The [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin does not allow to drop widgets into the editor. +* [#14894](https://dev.ckeditor.com/ticket/14894): [Chrome] Fixed: The editor scrolls to the top after focusing or when a dialog is opened. +* [#14769](https://dev.ckeditor.com/ticket/14769): Fixed: URLs with '-' in host are not detected by the [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin. +* [#16804](https://dev.ckeditor.com/ticket/16804): Fixed: Focus is not on the first menu item when the user opens a context menu or a drop-down list from the editor toolbar. +* [#14407](https://dev.ckeditor.com/ticket/14407): [IE] Fixed: Non-editable widgets can be edited. +* [#16927](https://dev.ckeditor.com/ticket/16927): Fixed: An error thrown if a bundle containing the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin is run in ES5 strict mode. Thanks to [Igor Rubinovich](https://github.com/IgorRubinovich)! +* [#16920](https://dev.ckeditor.com/ticket/16920): Fixed: Several plugins not using the [Dialog](https://ckeditor.com/cke4/addon/dialog) plugin as a direct dependency. +* [PR#336](https://github.com/ckeditor/ckeditor-dev/pull/336): Fixed: Typo in [`CKEDITOR.getCss()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getCss) API documentation. Thanks to [knusperpixel](https://github.com/knusperpixel)! +* [#17027](https://dev.ckeditor.com/ticket/17027): Fixed: Command event data should be initialized as an empty object. +* Fixed the behavior of HTML parser when parsing `src`/`srcdoc` attributes of the ` + +
+
+
+ +
+
+ +
+
+ +
+ +
+
+ +
+
+
Adjust browser window size: 5% 10%   15% +   20%  -10% +   -20%  Reset
+
Sort by:   Name  Date  File Size  Reverse Order
+
  
+
+ +
+ + + + + + diff --git a/lib/plugins/ckgedit/fckeditor/editor/filemanager/connectors/uploadtest.html b/lib/plugins/ckgedit/fckeditor/editor/filemanager/connectors/uploadtest.html new file mode 100644 index 0000000..c5bc8e2 --- /dev/null +++ b/lib/plugins/ckgedit/fckeditor/editor/filemanager/connectors/uploadtest.html @@ -0,0 +1,192 @@ + + + + FCKeditor - Uploaders Tests + + + + + + + + + + + +
+ + + + + + + + +
+ Select the "File Uploader" to use:
+ +
+ Resource Type
+ +
+ Current Folder:
+ +
       + Custom Uploader URL:
+ +
+
+ + + + + + +
+
+ Upload a new file:
+
+ + +
+
       + Uploaded File URL:
+ +
+
+ Post URL:   +
+ +
+ + diff --git a/lib/plugins/ckgedit/fckeditor/userfiles/.htaccess b/lib/plugins/ckgedit/fckeditor/userfiles/.htaccess new file mode 100644 index 0000000..e053cef --- /dev/null +++ b/lib/plugins/ckgedit/fckeditor/userfiles/.htaccess @@ -0,0 +1,20 @@ +#unix -- do not change or move + + Require all denied + + + Order allow,deny + Deny from all + + + + + Require all granted + + + Order allow,deny + Allow from all + + + +Options -Indexes diff --git a/lib/plugins/ckgedit/fckeditor/userfiles/.htaccess.closed b/lib/plugins/ckgedit/fckeditor/userfiles/.htaccess.closed new file mode 100644 index 0000000..8a1e096 --- /dev/null +++ b/lib/plugins/ckgedit/fckeditor/userfiles/.htaccess.closed @@ -0,0 +1,9 @@ + + Require all denied + + + Order allow,deny + deny from all + + +Options -Indexes diff --git a/lib/plugins/ckgedit/fckeditor/userfiles/.htaccess.open b/lib/plugins/ckgedit/fckeditor/userfiles/.htaccess.open new file mode 100644 index 0000000..b5be045 --- /dev/null +++ b/lib/plugins/ckgedit/fckeditor/userfiles/.htaccess.open @@ -0,0 +1,10 @@ +#unix -- do not change or move + + Require all granted + + + Order allow,deny + Allow from all + + +Options -Indexes diff --git a/lib/plugins/ckgedit/fckeditor/userfiles/.htaccess.security b/lib/plugins/ckgedit/fckeditor/userfiles/.htaccess.security new file mode 100644 index 0000000..e053cef --- /dev/null +++ b/lib/plugins/ckgedit/fckeditor/userfiles/.htaccess.security @@ -0,0 +1,20 @@ +#unix -- do not change or move + + Require all denied + + + Order allow,deny + Deny from all + + + + + Require all granted + + + Order allow,deny + Allow from all + + + +Options -Indexes diff --git a/lib/plugins/ckgedit/fckeditor/userfiles/blink.jpg b/lib/plugins/ckgedit/fckeditor/userfiles/blink.jpg new file mode 100644 index 0000000..ceaeb9c Binary files /dev/null and b/lib/plugins/ckgedit/fckeditor/userfiles/blink.jpg differ diff --git a/lib/plugins/ckgedit/helper.php b/lib/plugins/ckgedit/helper.php new file mode 100644 index 0000000..ff6ca10 --- /dev/null +++ b/lib/plugins/ckgedit/helper.php @@ -0,0 +1,365 @@ + + */ + +// must be run within Dokuwiki +if (!defined('DOKU_INC')) die(); + +class helper_plugin_ckgedit extends DokuWiki_Plugin { + + + + function getMethods(){ + $result = array(); + $result[] = array( + 'name' => 'registerOnLoad', + 'desc' => 'register some javascript to the window.onload js event', + 'params' => array('js' => 'string'), + 'return' => array('html' => 'string'), + ); + return $result; + } + + /** + * Convert string configuration value into an array + */ + function get_conf_array($val) { + $str = $this->getConf($val); + $str = preg_replace('/\s+/',"",$str); + return explode(',', $str); + } + + function get_ckgedit_ImageAllowedExtensions() { + $uploadImageTypes = ARRAY(); + foreach (getMimeTypes() as $ext=>$mtype) { + if(preg_match("/image/", $mtype)) { + $uploadImageTypes[] = $ext; + } + } + return '.(' . implode('|',$uploadImageTypes) .')$'; + } + + function is_outOfScope(&$which="") { + if(isset($_REQUEST['target']) && $_REQUEST['target'] == 'plugin_data') return true; + return false; + } + + function has_plugin($plugin) { + $plugins_list = plugin_list(); + return in_array($plugin, $plugins_list); + } + + /** + * function dw_edit_displayed + * @author Myron Turner + * determines whether or not to show or hide the + * 'DW Edit' button + */ + + function dw_edit_displayed() + { + global $INFO; + + $dw_edit_display = @$this->getConf('dw_edit_display'); + if(!isset($dw_edit_display))return ""; //version 0. + if($dw_edit_display != 'all') { + $admin_exclusion = false; + if($dw_edit_display == 'admin' && ($INFO['isadmin'] || $INFO['ismanager']) ) { + $admin_exclusion = true; + } + if($dw_edit_display == 'none' || $admin_exclusion === false) { + return ' style = "display:none"; '; + } + return ""; + } + return ""; + + } + + function registerOnLoad($js){ + global $ID; + global $lang; + global $skip_styling; + global $JSINFO; + + $ckgedit_conf_direction = $this->getConf('direction'); + if($ckgedit_conf_direction == "dokuwiki") { + $ckgedit_lang_direction = $lang['direction']; + } + else { + $ckgedit_lang_direction = $ckgedit_conf_direction; + } + $ImageUploadAllowedExtensions = $this->get_ckgedit_ImageAllowedExtensions() ; + $media_tmp_ns = preg_match('/:/',$ID) ? preg_replace('/:\w+$/',"",$ID,1) : ""; + $locktimer_msg = "Your lock for editing this page is about to expire in a minute.\\n" + . "You can reset the timer by clicking the Back-up button."; + + $meta_fn = metaFN($ID,'.ckgedit'); + $meta_id = 'meta/' . str_replace(':','/',$ID) . '.ckgedit'; + + global $INFO; + global $conf; + global $USERINFO; + $_OS = strtolower(PHP_OS); + $cname = getCacheName($INFO['client'].$ID,'.draft'); + $useheading = $conf['useheading']; + + if($useheading && $useheading != 'navigation') { + $useheading = 'y'; + } + else $useheading = 'n'; + //msg('uh='.$useheading); + $open_upload = $this->getConf('open_upload'); + $editor_backup = $this->getConf('editor_bak'); + $create_folder = $this->getConf('create_folder'); + $interface_lang = $this->getConf('other_lang'); + $scayt_lang = $this->getConf('scayt_lang'); + list($name,$scayt_lang) = explode('/', $scayt_lang); + + $scayt_auto = $this->getConf('scayt_auto'); + $color_opts = $this->getConf('color_options'); + $font_opts = $this->getConf('font_options'); + $toolbar_opts = $this->getConf('alt_toolbar'); + $mfiles = $this->getConf('mfiles'); + $extra_plugins = $this->getConf('extra_plugins'); + $ckg_gui = $this->getConf('gui'); + if(!isset($INFO['userinfo']) && !$open_upload) { + $user_type = 'visitor'; + } + else { + $user_type = 'user'; + } + $save_dir = DOKU_BASE . ltrim($conf['savedir'],'/.\/'); + $fbsz_increment = isset($_COOKIE['fbsz']) && $_COOKIE['fbsz'] ? $_COOKIE['fbsz'] : '0'; + $use_pastebase64 = (isset($_COOKIE['ckgEdPaste']) && $_COOKIE['ckgEdPaste'] == 'on' ) ? 'on' : 'off'; + // if no ACL is used always return upload rights + if($conf['useacl']) { + $client = $_SERVER['REMOTE_USER']; + } + else $client = ""; + $user_name = $USERINFO['name']; + $user_email = $USERINFO['mail']; + + $fnencode = isset($conf['fnencode']) ? $conf['fnencode'] : 'url'; + $user_groups = $USERINFO['grps']; + if(!$user_groups) $user_groups = array(); + if (@in_array("guest", $user_groups)) { + $create_folder = 'n'; + $user_type = 'visitor'; + } + $user_groups = str_replace('"','\"',implode(";;",$user_groups)); + + if($INFO['isadmin'] || $INFO['ismanager']) { + $client = ""; + } + + $ver_anteater = mktime(0,0,0,11,7,2010); + $dwiki_version=mktime(0,0,0,01,01,2008); + + if(isset($conf['fnencode'])) { + $ver_anteater = mktime(0,0,0,11,7,2010); + $dwiki_version=mktime(0,0,0,11,7,2010); + } + else if(function_exists('getVersionData')) { + $verdata= getVersionData(); + if(isset($verdata) && preg_match('/(\d+)-(\d+)-(\d+)/',$verdata['date'],$ver_date)) { + if($ver_date[1] >= 2005 && ($ver_date[3] > 0 && $ver_date[3] < 31) && ($ver_date[2] > 0 && $ver_date[2] <= 12)) { + // month day year + $dwiki_version=@mktime(0, 0, 0, $ver_date[2],$ver_date[3], $ver_date[1]); + if(!$dwiki_version) $dwiki_version = mktime(0,0,0,01,01,2008); + $ver_anteater = mktime(0,0,0,11,7,2010); + } + } + } + +$ckg_brokenimg = $this->getLang('broken_image'); + $default_fb = $this->getConf('default_fb'); + if($default_fb == 'none') { + $client = ""; + } + + $doku_base = DOKU_BASE; + + return << + // 2500000) { + alert(broken_msg); + e.data.dataValue = ''; + } + }); + + oDokuWiki_FCKEditorInstance.dwiki_user = "$user_type"; + oDokuWiki_FCKEditorInstance.dwiki_client = "$client"; + oDokuWiki_FCKEditorInstance.dwiki_usergroups = "$user_groups"; + oDokuWiki_FCKEditorInstance.dwiki_doku_base = "$doku_base"; + oDokuWiki_FCKEditorInstance.dwiki_create_folder = "$create_folder"; + oDokuWiki_FCKEditorInstance.dwiki_fnencode = "$fnencode"; + oDokuWiki_FCKEditorInstance.dwiki_version = $dwiki_version; + oDokuWiki_FCKEditorInstance.dwiki_anteater = $ver_anteater; + oDokuWiki_FCKEditorInstance.isLocalDwikiBrowser = false; + oDokuWiki_FCKEditorInstance.isUrlExtern = false; + oDokuWiki_FCKEditorInstance.isDwikiMediaFile = false; + oDokuWiki_FCKEditorInstance.imageUploadAllowedExtensions="$ImageUploadAllowedExtensions"; + oDokuWiki_FCKEditorInstance.fckgUserName = "$user_name"; + oDokuWiki_FCKEditorInstance.fckgUserMail="$user_email"; + oDokuWiki_FCKEditorInstance.useheading = "$useheading"; + oDokuWiki_FCKEditorInstance.mfiles = parseInt("$mfiles"); + oDokuWiki_FCKEditorInstance.fbsz_increment=parseInt("$fbsz_increment"); + +} + + + window.DWikifnEncode = "$fnencode"; + + //]]> + + +end_of_string; + } +} +?> diff --git a/lib/plugins/ckgedit/images/keyboard.png b/lib/plugins/ckgedit/images/keyboard.png new file mode 100644 index 0000000..dba1c8c Binary files /dev/null and b/lib/plugins/ckgedit/images/keyboard.png differ diff --git a/lib/plugins/ckgedit/images/larger.gif b/lib/plugins/ckgedit/images/larger.gif new file mode 100644 index 0000000..e137c92 Binary files /dev/null and b/lib/plugins/ckgedit/images/larger.gif differ diff --git a/lib/plugins/ckgedit/images/smaller.gif b/lib/plugins/ckgedit/images/smaller.gif new file mode 100644 index 0000000..66d3a51 Binary files /dev/null and b/lib/plugins/ckgedit/images/smaller.gif differ diff --git a/lib/plugins/ckgedit/lang/ar/lang.php b/lib/plugins/ckgedit/lang/ar/lang.php new file mode 100644 index 0000000..0153879 --- /dev/null +++ b/lib/plugins/ckgedit/lang/ar/lang.php @@ -0,0 +1,26 @@ + + */ +$lang['btn_dw_edit'] = 'Editor syntaxe'; +$lang['dw_btn_fck_preview'] = 'Náhled CKG'; +$lang['dw_btn_lang'] = 'Jazyk'; +$lang['title_dw_delete'] = 'Smazat stránku'; +$lang['title_dw_edit'] = 'Uloží práci, opustí editor a při další úpravě se zobrazí klasický editor syntaxe'; +$lang['dw_btn_revert'] = 'Vrátit (Revert)'; +$lang['title_dw_revert'] = 'Vrátí se k předchozí záloze'; +$lang['title_dw_lang'] = 'Vyberte jazyk pro kontrolu pravopisu'; +$lang['title_dw_cancel'] = 'Ukončí editor'; +$lang['btn_fck_edit'] = 'Editor CKG'; +$lang['confirm_delete'] = 'Opravdu chcete tuto stránku smazat?'; +$lang['confirm_preview'] = 'Jakákoliv práce, která nebyla uložena, bude ztracena.'; +$lang['editor_height'] = 'Výška editoru'; +$lang['dw_btn_backup'] = 'Záloha'; +$lang['title_dw_backup'] = 'Vytvoří zálohu (a obnoví uzamknutí stránky)'; +$lang['backup_empty'] = 'Zásobník záloh se zdá být prázdný. Chcete pokračovat?'; +$lang['btn_draft'] = 'Načíst Koncept'; +$lang['title_draft'] = 'Prohlédnout, ukázat, upravit Koncept'; +$lang['btn_exit_draft'] = 'Opustit Koncept'; +$lang['title_exit_draft'] = 'Vrátí se k aktuální uložené verzi dokumentu'; +$lang['draft_msg'] = 'K této stránce je uložen Koncept. Tlačítko Načíst Koncept přepne mezi aktuální verzí a konceptem. Můžete upravit a uložit pouze jeden z nich.'; +$lang['minor_changes'] = 'Drobné změny'; +$lang['dw_btn_styling'] = 'Upravit fonty'; diff --git a/lib/plugins/ckgedit/lang/de-informal/lang.php b/lib/plugins/ckgedit/lang/de-informal/lang.php new file mode 100644 index 0000000..e8e2a76 --- /dev/null +++ b/lib/plugins/ckgedit/lang/de-informal/lang.php @@ -0,0 +1,52 @@ + + * @author David McAllister + * @author hans-juergen.schuemmer + * @author hans-juergen.schuemmer + */ +$lang['btn_dw_edit'] = 'DW Edit'; +$lang['dw_btn_fck_preview'] = 'CKG Vorschau'; +$lang['dw_btn_lang'] = 'Sprache'; +$lang['title_dw_delete'] = 'Seite löschen'; +$lang['title_dw_edit'] = 'Arbeit speichern, schliessen und zum DokuWiki Editor wechseln'; +$lang['dw_btn_revert'] = 'Rückgängig'; +$lang['title_dw_revert'] = 'Zurück zur Backup-Version'; +$lang['title_dw_lang'] = 'Sprache für Rechtschreibekontrolle wählen'; +$lang['title_dw_cancel'] = 'Editor schliessen'; +$lang['btn_fck_edit'] = 'CKG Editor'; +$lang['confirm_delete'] = 'Sind Sie sicher, dass Sie diese Seite löschen wollen?'; +$lang['confirm_preview'] = 'Jede nicht gespeicherte Bearbeitung wird verloren gehen.'; +$lang['editor_height'] = 'Die Höhe des Editors'; +$lang['editor_height_title'] = 'Bei neuer Ladung die Größe des Editors verändern'; +$lang['dw_btn_backup'] = 'Backup'; +$lang['title_dw_backup'] = 'Backup-Editor'; +$lang['backup_empty'] = 'Es ist kein Backup vorhanden. Wollen Sie fortfahren?'; +$lang['btn_draft'] = 'Entwurf öffnen'; +$lang['title_draft'] = 'Entwurf anzeigen und bearbeiten'; +$lang['btn_exit_draft'] = 'Entwurf schliessen'; +$lang['title_exit_draft'] = 'Zum aktuellen Dokument zurückkehren'; +$lang['draft_msg'] = 'Für dieses Dokument besteht eine Entwurfsversion. Der Knopf \'Entwurf\' schaltet zwischen diesem Dokument und dem Entwurf hin und her. Es können beide Dokumente bearbeitet oder gesichert werden.'; +$lang['whats_this'] = 'Was ist das?'; +$lang['complex_tables'] = 'Komplexe Tabelle aktivieren'; +$lang['minor_changes'] = 'Kleine Änderungen'; +$lang['discard_edits'] = 'Um Ihre Änderungen zu Speichern auf OK klicken oder zum Verwerfen auf Abbrechen'; +$lang['dw_btn_styling'] = 'Schriftarten bearbeiten'; +$lang['title_styling'] = 'Öffnen und Schriftstile als Markup darstellen'; +$lang['js']['font_err_1'] = 'Formatierung der Schrift ist innerhalb von Links nicht möglich. Bitte die folgende Änderung mit OK bestätigen:'; +$lang['js']['font_err_throw'] = 'Fehler bei der Formatierung der Schrift'; +$lang['js']['dwp_save_err'] = 'Speichern der Änderungen nicht möglich als:'; +$lang['js']['dwp_updated'] = 'Der bevorzugte Editor wurde eingestellt auf:'; +$lang['js']['mediamgr_notice'] = 'Bitte den Link-Dialog zum Einfügen benutzen'; +$lang['js']['ckg_paste_restart'] = 'Nach dem Auffrischen der Seite ist die erweiterte Unterstützung der Zwischenablage umgeschaltet auf: '; +$lang['js']['on'] = 'ein'; +$lang['js']['off'] = 'aus'; +$lang['uprofile_title'] = 'Bitte den bevorzugten Editor auswählen'; +$lang['btn_val_dw_fb'] = 'DW-Dateibrowser'; +$lang['btn_val_ckg_fb'] = 'CKG-Dateibrowser'; +$lang['btn_title_dw_fb'] = 'Abspeichern und Schließen des Editors und Umschalten auf den DW-Dateibrowser'; +$lang['btn_title_ckg_fb'] = 'Abspeichern und Schließen des Editors und Umschalten auf den CKG-Dateibrowser'; +$lang['sym_not created_1'] = 'Erstellung nicht möglich'; diff --git a/lib/plugins/ckgedit/lang/de-informal/settings.php b/lib/plugins/ckgedit/lang/de-informal/settings.php new file mode 100644 index 0000000..20e8b1a --- /dev/null +++ b/lib/plugins/ckgedit/lang/de-informal/settings.php @@ -0,0 +1,40 @@ + + * @author Juergen-aus-Koeln + * @author David McAllister + */ +$lang['groups'] = 'Gruppe die den Timer für die Sperre deaktivieren darf (veraltet)'; +$lang['fck_preview'] = 'Gruppe für FCK Vorschau'; +$lang['guest_toolbar'] = 'Gästen Symbolleiste anzeigen'; +$lang['guest_media'] = 'Gäste können Mediendateien verlinken'; +$lang['open_upload'] = 'Gäste können Hochladen'; +$lang['default_fb'] = 'Standardzugang für Dateiauswahl. Mit none wird ACL nicht verwendet.'; +$lang['openfb'] = 'Dateiauswahl öffnen. Damit bekommt der Benutzer Zugang zur kompletten Verzeichnisstruktur, unabhängig von seinen Berechtigungen. ACL wird weiterhin für Uploads angewandt.'; +$lang['dw_edit_display'] = 'Welche Benutzer haben Zugang zur Schaltfläche "DW Edit". Auswahl: "all" für alle Benutzer, "admin" für nur admin und managers; "none" für niemand. Der Standard ist "all".'; +$lang['smiley_as_text'] = 'Smileys in CKGeditor als Text anzeigen (werden im Browser trotzdem als Bild angezeigt)'; +$lang['editor_bak'] = 'Backup in meta/<namespace>.ckgedit speichern'; +$lang['create_folder'] = 'Schaltfläche für neues Verzeichnis in der Dateiauswahl anzeigen (y/n)'; +$lang['dwedit_ns'] = 'Komma-separierte Liste von Namesräumen und/oder Seiten für die ckgedit automatisch zum DokuWiki Editor wechselt. Akzeptiert auch teilweise Übereinstimmungen'; +$lang['acl_del'] = 'Der Standard (nicht aktiviert) erlaubt Benutzern mit Berechtigung zum Hochladen auch Mediendatein zu löschen. Wenn das Kontrollkästchen aktiviert ist, braucht der Benutzer die Berechtigung im Verzeichnis zu Löschen.'; +$lang['auth_ci'] = 'Beim Benutzername nicht Groß- und Kleinschreibung unterscheiden, damit kann man sich als BENUTZER und benutzer anmelden'; +$lang['nix_style'] = 'Für Windows Server (Vista und höhere). Diese Einstellung ermöglicht den Zugriff auf data\media über cgkedit\CKeditor\userfiles, wenn in userfiles Links zu media und file erstellt wurden'; +$lang['no_symlinks'] = 'Automatisches Erstellen von symbolischen Links in ckgedit/userfiles deaktivieren'; +$lang['direction'] = 'Schreibrichtung in CKeditor: nocheck: ckgedit verändert die vorgegebene Schreibrichtung nicht, dokuwiki: die aktuelle Schreibrichtung von Dokuwiki, ltr: von links nach rechts; rtl: von rechts nach links.'; +$lang['scayt_auto'] = 'Automatische Rechtschreibungprüfung aktivieren. Voreinstellung ist "on", um die Rechtschreibprüfung abzuschalten "off" auswählen'; +$lang['scayt_lang'] = 'Standardsprache für automatische Überprüfung auswählen.'; +$lang['smiley_hack'] = 'Beim Umzug auf einen neuen Server die URL für die Smileys des CKEditor zurücksetzen. Dies erfolgt für jede Seite getrennt wenn die Seite zum Bearbeiten geöffnet und gespeichert wird. Diese Option sollte normalerweise ausgeschaltet bleiben.'; +$lang['complex_tables'] = 'Den komplexen Algorithmus für Tabellen verwenden. Im Vergleich zur normalen Verarbeitung von Tabellen sollte man damit bessere Ergebnisse erhalten, wenn man komplexe Strukturen von rowspans und colspans verwendet. Erfordert etwas mehr Verarbeitungszeit.'; +$lang['duplicate_notes'] = 'Auf true setzen damit Benutzer mehrere Fußnoten mit demselben Fußnotentext erstellen können. Damit werden fehlerhafte Fußnoten verhindert.'; +$lang['winstyle'] = 'Verwende direkten Pfad zum Medienverzeichnis anstatt fckeditor/userfiles. Dafür muss fckeditor/userfiles/.htaccess.security nach data/media kopiert und in .htaccess umbenannt werden'; +$lang['other_lang'] = 'Als Standardsprache für den CKEditor wird die im Browser eingestellte Sprache verwendet. Alternativ kann hier eine andere Sprache ausgewählt werden. Diese ist unabhängig von der für DokuWiki gewählten Sprache.'; +$lang['dw_priority'] = 'DokuWiki-Editor als Standard verwenden'; +$lang['preload_ckeditorjs'] = 'Für schnelleres Laden des Editors Javascript für CKEditor im voraus laden'; +$lang['nofont_styling'] = 'Schriftstile im Editor als Plugin markup anzeigen. Mehr Details dazu auf der Plugin-Seite für ckgedit auf Dokuwiki.org'; +$lang['font_options'] = 'Schriftoptionen entfernen'; +$lang['color_options'] = 'Farboptionen entfernen'; +$lang['alt_toolbar'] = 'Funktionen, die aus der CKEditor-Toolbar entfernt werden sollen'; +$lang['mfiles'] = 'Unterstützung von mfile Dateien aktivieren'; diff --git a/lib/plugins/ckgedit/lang/de/lang.php b/lib/plugins/ckgedit/lang/de/lang.php new file mode 100644 index 0000000..39208e9 --- /dev/null +++ b/lib/plugins/ckgedit/lang/de/lang.php @@ -0,0 +1,94 @@ + + * @author WhitesnakeS04 + * @author Sebastian Engel + * @author Joerg Maeder + * @author Leo Rudin + * @author Padhie + * @author liz + * @author Martin Sachers + * @author ttthomas + * @author Marco Hofmann + * @author hans-juergen.schuemmer + * @author Jens Weber + * @author Christoph Ziehr + */ +$lang['btn_dw_edit'] = 'DW Edit'; +$lang['dw_btn_fck_preview'] = 'CKG Vorschau'; +$lang['dw_btn_lang'] = 'Sprache'; +$lang['title_dw_delete'] = 'Seite löschen'; +$lang['title_dw_edit'] = 'Arbeit speichern, schließen und zum ursprünglichen DokuWiki Editor wechseln'; +$lang['dw_btn_revert'] = 'Rückgängig'; +$lang['title_dw_revert'] = 'Zurück zur Backup-Version'; +$lang['title_dw_lang'] = 'Sprache für Rechtschreibkontrolle wählen'; +$lang['title_dw_cancel'] = 'Editor schließen'; +$lang['btn_fck_edit'] = 'CKG Editor'; +$lang['confirm_delete'] = 'Sind Sie sicher, dass Sie diese Seite löschen wollen?'; +$lang['confirm_preview'] = 'Jede nicht gespeicherte Bearbeitung wird verloren gehen.'; +$lang['editor_height'] = 'Editorhöhe'; +$lang['editor_height_title'] = 'Editor neuskalieren beim Neuladen'; +$lang['dw_btn_backup'] = 'Backup'; +$lang['title_dw_backup'] = 'Backup-Editor-Fenster & Renew-Zugangssperre'; +$lang['backup_empty'] = 'Es ist kein Backup vorhanden. Wollen Sie fortfahren?'; +$lang['btn_draft'] = 'Entwurf öffnen'; +$lang['title_draft'] = 'Entwurf anzeigen und bearbeiten'; +$lang['btn_exit_draft'] = 'Entwurf schließen'; +$lang['title_exit_draft'] = 'Zurück zum aktuellen Dokument.'; +$lang['draft_msg'] = 'Für dieses Dokument besteht eine Entwurfsversion. Der Knopf \'Entwurf\' schaltet zwischen diesem Dokument und dem Entwurf hin und her. Es können beide Dokumente bearbeitet oder gesichert werden.'; +$lang['whats_this'] = 'Was ist das?'; +$lang['complex_tables'] = 'Aktiviere komplexe Tabellen'; +$lang['minor_changes'] = 'Kleine Änderungen'; +$lang['discard_edits'] = 'Um Änderungen zu speichern klicke OK; um abzubrechen klicke Abbrechen.'; +$lang['dw_btn_styling'] = 'Schriftart bearbeiten'; +$lang['title_styling'] = 'Öffne mit Schriftart als markup'; +$lang['js']['font_err_1'] = 'Formatierungen können nicht in Links genutzt werden. Klicken Sie auf OK, um die folgende Korrektur zu akzeptieren:'; +$lang['js']['font_err_2'] = 'Um zu Überarbeiten, geben Sie den vollständigen Dokuwiki-Link unten, einschließlich Klammern ein. Um zum Editor zurückzukehren, klicken Sie auf Abbrechen.'; +$lang['js']['font_err_throw'] = 'Zeichenformatierungs-Fehler'; +$lang['js']['dwp_save_err'] = 'Speichern nicht möglich für:'; +$lang['js']['dwp_updated'] = 'Editor Priorität aktualisiert auf:'; +$lang['js']['dwp_not_sel'] = 'Editor-Priorität nicht ausgewählt: Es wird durch die Konfiguration der dw_users-Gruppe bestimmt'; +$lang['js']['mediamgr_notice'] = 'Verwenden Sie den Link Dialog um Links einzufügen'; +$lang['js']['font_conflict'] = 'Der Parser fand einen oder mehrere Link-Font-Konflikte. Wenn Sie auf OK klicken, können Sie zum Editor zurückkehren und die Schriftstile entfernen. Weitere Informationen finden Sie unter: https://www.dokuwiki.org/plugin:ckgedit:font_styling#conflicts_with_dokuwiki_links'; +$lang['mediamgr_imgonly'] = 'Benutzen Sie den Bild-Dialog nur für Bilder. Verwenden Sie den Link-Dialog für andere Dateitypen. Die betroffene Datei ist:'; +$lang['mediamgr_imgonly'] = 'Laden Sie nur Bilder hoch, wenn Sie den Bilddialog verwenden: '; +$lang['uprofile_title'] = 'Wählen Sie ihren Standard Editor'; +$lang['btn_val_dw_fb'] = 'DW Dateibrowser'; +$lang['btn_val_ckg_fb'] = 'CKG Dateibrowser'; +$lang['btn_title_dw_fb'] = 'Speichern und Editor schließen und zum DW Dateibrowser wechseln'; +$lang['btn_title_ckg_fb'] = 'Speichern und Editor schließen und zum CKG Dateibrowser wechseln'; +$lang['formatdel'] = 'Markup wurde aus Header(n) entfernt: Von DokuWiki nicht unterstützt'; +$lang['fontdel'] = 'Markup wurde aus Link(s) entfernt: Von DokuWiki nicht unterstützt'; +$lang['ws_cantcopy'] = 'Für das winstyle Setup: kann nicht kopiert werden nach'; +$lang['ws_copiedhtaccess'] = 'Für das winstyle Setup wurde das Security-aktivierte .htaccess nach data/media kopiert. Siehe ckgedit/fckeditor/userfiles/.htacess.security '; +$lang['userfiles_perm'] = 'Bitte überprüfen Sie die Berechtigungen; ckgedit hat keinen Zugriff'; +$lang['sym_not created_1'] = 'Kann nicht erstellt werden '; +$lang['sym_not created_2'] = 'Kann keine Symlinks für den Dateibrowser erstellen: kein Zugriff: '; +$lang['sym_not created_3'] = 'Es gab einen Fehler beim Versuch symbolische Links zu erstellen in'; +$lang['syms_created'] = 'Die folgenden Links wurden im Verzeichnis userfiles angelegt: '; +$lang['dblclk'] = 'Neues Feature: Doppelklick im Browserfenster um den DW Editor zum Bearbeiten eines Abschnitts an der Kursorposition zu öffnen. Siehe:
direct_access_to_dokuwiki_editor. '; +$lang['dblclk_reminder'] = 'Erinnerung'; +$lang['ckg_img_paste'] = 'Zusätzliche Unterstützung beim Einfügen von Bildern aus der Zwischenablage'; +$lang['ckg_img_paste_title'] = 'Aus um doppeltes Einfügen zu verhindern, oder Ein, um Einfügen zu erlauben'; +$lang['js']['ckg_paste_restart'] = 'Beim Neuladen des Editors wird die zusätzliche Unterstützung für das Einfügen eingeschaltet.'; +$lang['on'] = 'Ein'; +$lang['off'] = 'Aus'; +$lang['js']['on'] = 'ein'; +$lang['js']['off'] = 'aus'; +$lang['broken_image'] = 'Benutze das ImagePaste Plugin mit dem Mediamanager oder versuche das MS Word Tool. STRG + V mit Bildern > 2,5M funktioniert evtl. nicht. Dieses Bild hat folgende Größe:'; +$lang['js']['broken_image_1'] = 'benutze das ImagePaste Plugin mit dem Dokuwiki Mediamanager oder versuche das MS Word Einfügen Tool'; +$lang['js']['broken_image_2'] = 'Bilder grösser 2,5M mit STRG + V einfügen funktioniert nicht. Dieses Bild hat folgende Größe:'; +$lang['menu'] = 'CKEditor CSS Tool'; +$lang['default_stylesheet'] = 'Ein Stylesheet für das aktuelle Template anlegen'; +$lang['alt_stylesheet'] = 'Ein Stylesheet für ein anderes Template anlegen'; +$lang['style_sheet'] = 'Stylesheet anlegen'; +$lang['style_sheet_msg'] = 'Ein Stylesheet für das aktuelle Template anlegen:'; +$lang['alt_style_sheet_msg'] = 'Stylesheet anlegen für:'; +$lang['checkbox'] = 'Nach ckeditor/css kopieren'; +$lang['stylesheet_oinfo'] = 'Info'; +$lang['stylesheet_cinfo'] = 'Info schließen'; +$lang['js']['stylesheet_oinfo'] = 'Info'; +$lang['js']['stylesheet_cinfo'] = 'Info schließen'; diff --git a/lib/plugins/ckgedit/lang/de/merger.txt b/lib/plugins/ckgedit/lang/de/merger.txt new file mode 100644 index 0000000..9bf0b91 --- /dev/null +++ b/lib/plugins/ckgedit/lang/de/merger.txt @@ -0,0 +1,6 @@ + + + - Diese Version von [[doku>plugin:ckgedit|ckgedit]] macht CKEditor Vers. 4.9 zur Vers. 4.10 mit aktuellem und besserem Javascript. + - Mit dem Upgrade auf 4.9 ging ckgedit mit [[doku>plugin:ckgdoku|ckgdoku]] zusammen. Siehe bei ckgdoku: [[doku>plugin:ckgdoku#configuration|configuration options]]. + +Evtl. Probleme melden bei [[https://github.com/turnermm/ckgedit/issues|ckgedit's issues]] auf github.// \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/de/scayt.txt b/lib/plugins/ckgedit/lang/de/scayt.txt new file mode 100644 index 0000000..5418108 --- /dev/null +++ b/lib/plugins/ckgedit/lang/de/scayt.txt @@ -0,0 +1 @@ +Die Scayt Rechtschreibprüfung stellt drei Auswahlmöglichkeiten zur Verfügung: An, Aus und Deaktiviert. Ab sofort ist die Standardeinstellung **Aus** statt **An**. Bei der Einstellung **An** werden die Inhalte des Bearbeitungsfensters von Scayt geparst und zur Rechtschreibprüfung an den Scayt-Server geschickt. Obwohl es keinen Grund gibt dies als Sicherheitsrisiko zu sehen, wurde diese Änderung für Benutzer mit privaten Wikis vorgenommen, die sich unwohl fühlen wenn deren Daten an einen entfernten Server geschickt werden. Wird die Einstellung "Deaktiviert" ausgewählt, wird die Rechtschreibprüfung vollständig entfernt. Weitere Informationen finden Sie auf der Konfigurations-Seite der ckgedit-Dokumentation unter https://www.dokuwiki.org/plugin:ckgedit:configuration#scayt_auto. diff --git a/lib/plugins/ckgedit/lang/de/settings.php b/lib/plugins/ckgedit/lang/de/settings.php new file mode 100644 index 0000000..272218a --- /dev/null +++ b/lib/plugins/ckgedit/lang/de/settings.php @@ -0,0 +1,60 @@ + + * @author Gunnar Lindenblatt + * @author WhitesnakeS04 + * @author Leo Rudin + * @author Juergen-aus-Koeln + * @author liz + * @author Christoph Ziehr + */ +$lang['fck_preview'] = 'FCK Vorschau Gruppe'; +$lang['guest_toolbar'] = 'Werkzeugleiste für Gäste anzeigen'; +$lang['guest_media'] = 'Gäste können Medien-Dateien verlinken'; +$lang['open_upload'] = 'Gäste können hochladen'; +$lang['default_fb'] = 'Standardmäßiger Zugang zum Durchsuchen der Dateien. Ohne diesen werden die Regeln der Zugangsverwaltung nicht angewendet.'; +$lang['openfb'] = 'Öffentlich alle Dateien durchsuchbar. Benutzer erhalten Zugang zur gesamten Verzeichnisstruktur, unabhängig von der jeweiligen Zugangsberechtigung. Die Zugriffsrechte gelten weiterhin bei Uploads.'; +$lang['dw_edit_display'] = 'Kontrolliert, welche Benutzer Zugang zur "DW Edit"-Taste haben. Möglichkeiten: "Alle" für alle Benutzer; "Admin" ausschließlich für Administratoren und Manager; "Niemand" für Keinen. Standardwert ist "Alle".'; +$lang['dw_edit_display_o_all'] = 'Alle'; +$lang['dw_edit_display_o_admin'] = 'Admin'; +$lang['dw_edit_display_o_none'] = 'Niemand'; +$lang['smiley_as_text'] = 'Smileys im CKeditor als Text anzeigen (wird im Browser weiterhin als Grafik angezeigt)'; +$lang['editor_bak'] = 'Sicherung auf meta/<namespace>.ckgedit speichern'; +$lang['create_folder'] = 'Aktiviere den neuen-Ordner-Button im Datei-Browser (y/n)'; +$lang['dwedit_ns'] = 'Komma-getrennte Liste aus Namensräumen und Seiten, bei welchen automatisch auf den ursprünglichen Dokuwiki-Editor umgeschaltet wird; Teilausdrücke werden akzeptiert.'; +$lang['acl_del'] = 'Default (kein Haken gesetzt) ermöglicht Benutzern mit Upload-Rechten media-Dateien zu löschen; wenn der Haken gesetzt wurde, benötigt der Benutzer die Berechtigung, aus dem Verzeichnis heraus zu löschen.'; +$lang['auth_ci'] = 'Die ID des Benutzer-Logins ist schreibungsunabhängig, d.h. beide Schreibweisen USER und user sind möglich.'; +$lang['nix_style'] = 'Für Windows-Server (Vista und später): Diese Einstellung ermöglicht den Zugang zu data\media durch ckgedit\CKeditor\userfiles, sofern Links zu media und file erfolgreich in userfiles angelegt wurden.'; +$lang['no_symlinks'] = 'Automatische Erstellung symbolischer Links unter ckgedit/userfiles deaktivieren.'; +$lang['direction'] = 'Einstellen der Sprach-Richtung in CKeditor: nocheck: ckgedit nimmt keine Einstellungsänderungen der Default-Richtung vor; dokuwiki: die aktuelle Dokuwiki Sprach-Richtung; ltr: von links nach rechts ; rtl: von rechts nach links.'; +$lang['scayt_auto'] = 'Aktiviere die SCAYT-Rechtschreibprüfung automatisch; Vorbelegt ist "An" = eingeschaltet. Zum Ausschalten von SCAYT auf "Aus" umstellen.'; +$lang['scayt_auto_o_on'] = 'An'; +$lang['scayt_auto_o_off'] = 'Aus'; +$lang['scayt_auto_o_disable'] = 'Deaktiviert'; +$lang['scayt_lang'] = 'Standard-Sprache für die SCAYT-Rechtschreibprüfung auswählen.'; +$lang['smiley_hack'] = 'Bei Umzug auf neuen Server, die URL für CKeditor\'s Smileys zurücksetzen. Dies passiert seitenweise, sobald die Seite zur Bearbeitung geladen und gespeichert wird. Diese Option sollte i.d.R. ausgeschaltet sein.'; +$lang['complex_tables'] = 'Den Algorithmus für komplexe Tabellen standardmäßig aktivieren. Im Gegensatz zur Standard-Syntaxanalyse von Tabellen, erreicht man hiermit bessere Ergebnisse, wenn Zellen miteinander über Zeilen oder Spalten hinweg verbunden werden. Jedoch auf Kosten leicht erhöhter Durchlaufzeit.'; +$lang['duplicate_notes'] = 'Setze dies auf "true", wenn Anwender mehrere, gleichlautende Fußnoten erstellen; verhindert, dass in diesem Fall die Funktionalität der Fußnoten beschädigt wird.'; +$lang['winstyle'] = 'Direkte Pfadangabe zum media-Verzeichnis verwenden anstatt fckeditor/userfiles. Dafür muss fckeditor/userfiles/.htaccess.security zu data/media kopiert und in .htaccess umbenannt werden.'; +$lang['other_lang'] = 'Ihre Standard-Sprache für den CKEditor ist die Sprache, die auch Ihr Browser besitzt. Sie können jedoch hier eine andere Sprache wählen; unabhängig von der Sprache im Dokuwiki Inteface.'; +$lang['dw_priority'] = 'Den Dokuwiki-Editor als Standard-Editor verwenden'; +$lang['preload_ckeditorjs'] = 'Die Javascript-Umgebung für den Ckeditor vorab laden, um den Editor-Aufruf zu beschleunigen'; +$lang['nofont_styling'] = 'Font Styles (= Schriftschnitt) im Editor als Plugin-Markup anzeigen. Weitere Informationen auf der ckgedit-Plugin-Seite unter Dokuwiki.org.'; +$lang['font_options'] = 'Entfernt die Option zum Einstellen der Schriftart.'; +$lang['color_options'] = 'Entfernt Farb-Optionen.'; +$lang['alt_toolbar'] = 'Funktionen, die nicht in der Werkzeugleiste angezeigt werden sollen'; +$lang['mfiles'] = 'mfile-Unterstützung einschalten.'; +$lang['extra_plugins'] = 'Durch Kommata getrennte Liste zusätzlicher CKeditor Plugins zum Einfügen in die Toolbar. Siehe Details bei "ckgedit plugin\'s" config page'; +$lang['dw_users'] = "Gruppenname der Benutzer, deren Standardeditor der DokuWiki-Editor ist, wenn dw_priority aktiviert ist. Wenn dieser Eintrag keinen Wert besitzt, haben alle Benutzer standardmäßig den DokuWiki-Editor, wenn dw_priority aktiviert ist."; +$lang['allow_ckg_filebrowser'] = 'Auswählen, welche(n) Datei/Medien Browser Benutzer verwenden können'; +$lang['default_ckg_filebrowser'] = 'Auswählen, welche(r) Datei/Medien Browser standardmäßig verwendet wird. Wenn der gewählte Browser unzulässig ist, wird überschrieben.'; +$lang['htmlblock_ok'] = 'Bei Verwendung von HTML_BLOCKs muss entweder diese Option oder die DokuWiki-Option htmlok eingeschaltet sein. Es stellt nicht das gleiche Sicherheitsrisiko dar wie htmlok. Dennoch sollte es nur in einer vertrauenswürdigen Benutzerumgebung und nicht in einem offenen Wiki verwendet werden. '; +$lang['dblclk'] = 'off schaltet das Bearbeiten einzelner Abschnitte (Sections) per Doppelklick mit dem DokuWiki-Editor aus (siehe: direct_access_to_dokuwiki_editor) '; +$lang['preserve_enc'] = 'Bewahre URL-Kodierung, falls die De-Akzent-Option von dokuwiki aktiv ist.'; +$lang['gui'] = 'Wähle CKEditor GUI (grafische Benutzeroberfläche)'; +$lang['rel_links'] = 'Aktiviere Unterstützung für relative interne Verknüpfungen und Bildverknüpfungen.'; +$lang['style_sheet'] = 'Ein alternatives Stylesheet für den CKEditor verwenden.' . + ' Für weitere Informationen siehe das CKEditor CSS Tool, unter weitere Plugins im Admin-Bereich.' . + ' Alternativ sind weitere Informationen auf der ckgedit plugin Seite zu finden.'; diff --git a/lib/plugins/ckgedit/lang/de/style.txt b/lib/plugins/ckgedit/lang/de/style.txt new file mode 100644 index 0000000..9d522ee --- /dev/null +++ b/lib/plugins/ckgedit/lang/de/style.txt @@ -0,0 +1,10 @@ +**Aktuelles Template Template** \\ + +Mit dieser App können Sie ein Stylesheet für das Bearbeitungsfenster des CKEditors anlegen, das auf Ihrem Template basiert. Das Stylesheet wird in Ihrem Template-Verzeichnis in einem Verzeichnis mit dem Namen **Styles** abgelegt, wenn Sie es speichern. Das Stylesheet wird den Namen *_styles.css** tragen. Um es zu aktivieren, müssen folgende Dinge getan werden: + + - es muss in **ckgedit/ckeditor/css** abgelegt werden. Dies wird automatisch geschehen, wenn Sie die Checkbox **Nach ckeditor/css kopieren** aktivieren. + - Die Option **Ein alternatives Stylesheet für den CKEditor verwenden.** in der Konfiguration muss aktiviert werden. + +**Weitere Templates, die installiert aber nicht aktiviert sind**\\ Sie können ebenfalls weitere Stylesheets für Templates anlegen, die in Ihrem tpl-Ordner vorhanden sind. Diese werden in den Styles-Ordner des entsprechenden Templates kopiert, nicht aber nach **ckeditor/css**. + +---- diff --git a/lib/plugins/ckgedit/lang/en.4.9.js.beautified b/lib/plugins/ckgedit/lang/en.4.9.js.beautified new file mode 100644 index 0000000..4f147a5 --- /dev/null +++ b/lib/plugins/ckgedit/lang/en.4.9.js.beautified @@ -0,0 +1,876 @@ +CKEDITOR.lang['en'] = { + "editor": "Rich Text Editor", + "editorPanel": "Rich Text Editor panel", + "common": { + "editorHelp": "Press ALT 0 for help", + "browseServer": "Browse Server", + "url": "URL", + "protocol": "Protocol", + "upload": "Upload", + "uploadSubmit": "Send it to the Server", + "image": "Image", + "flash": "Flash", + "form": "Form", + "checkbox": "Checkbox", + "radio": "Radio Button", + "textField": "Text Field", + "textarea": "Textarea", + "hiddenField": "Hidden Field", + "button": "Button", + "select": "Selection Field", + "imageButton": "Image Button", + "notSet": "", + "id": "Id", + "name": "Name", + "langDir": "Language Direction", + "langDirLtr": "Left to Right (LTR)", + "langDirRtl": "Right to Left (RTL)", + "langCode": "Language Code", + "longDescr": "Long Description URL", + "cssClass": "Stylesheet Classes", + "advisoryTitle": "Advisory Title", + "cssStyle": "Style", + "ok": "OK", + "cancel": "Cancel", + "close": "Close", + "preview": "Preview", + "resize": "Resize", + "generalTab": "General", + "advancedTab": "Advanced", + "validateNumberFailed": "This value is not a number.", + "confirmNewPage": "Any unsaved changes to this content will be lost. Are you sure you want to load new page?", + "confirmCancel": "You have changed some options. Are you sure you want to close the dialog window?", + "options": "Options", + "target": "Target", + "targetNew": "New Window (_blank)", + "targetTop": "Topmost Window (_top)", + "targetSelf": "Same Window (_self)", + "targetParent": "Parent Window (_parent)", + "langDirLTR": "Left to Right (LTR)", + "langDirRTL": "Right to Left (RTL)", + "styles": "Style", + "cssClasses": "Stylesheet Classes", + "width": "Width", + "height": "Height", + "align": "Alignment", + "left": "Left", + "right": "Right", + "center": "Center", + "justify": "Justify", + "alignLeft": "Align Left", + "alignRight": "Align Right", + "alignCenter": "Align Center", + "alignTop": "Top", + "alignMiddle": "Middle", + "alignBottom": "Bottom", + "alignNone": "None", + "invalidValue": "Invalid value.", + "invalidHeight": "Height must be a number.", + "invalidWidth": "Width must be a number.", + "invalidLength": "Value specified for the \"%1\" field must be a positive number with or without a valid measurement unit (%2).", + "invalidCssLength": "Value specified for the \"%1\" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).", + "invalidHtmlLength": "Value specified for the \"%1\" field must be a positive number with or without a valid HTML measurement unit (px or %).", + "invalidInlineStyle": "Value specified for the inline style must consist of one or more tuples with the format of \"name : value\", separated by semi-colons.", + "cssLengthTooltip": "Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).", + "unavailable": "%1, unavailable", + "keyboard": { + "8": "Backspace", + "13": "Enter", + "16": "Shift", + "17": "Ctrl", + "18": "Alt", + "32": "Space", + "35": "End", + "36": "Home", + "46": "Delete", + "112": "F1", + "113": "F2", + "114": "F3", + "115": "F4", + "116": "F5", + "117": "F6", + "118": "F7", + "119": "F8", + "120": "F9", + "121": "F10", + "122": "F11", + "123": "F12", + "124": "F13", + "125": "F14", + "126": "F15", + "127": "F16", + "128": "F17", + "129": "F18", + "130": "F19", + "131": "F20", + "132": "F21", + "133": "F22", + "134": "F23", + "135": "F24", + "224": "Command" + }, + "keyboardShortcut": "Keyboard shortcut", + "optionDefault": "Default" + }, + "about": { + "copy": "Copyright © $1. All rights reserved.", + "dlgTitle": "About CKEditor 4", + "moreInfo": "For licensing information please visit our web site:", + help: "Check $1 for help.", + userGuide: "CKEditor User's Guide" + }, + "basicstyles": { + "bold": "Bold", + "italic": "Italic", + "strike": "Strikethrough", + "subscript": "Subscript", + "superscript": "Superscript", + "underline": "Underline" + }, + "bidi": { + "ltr": "Text direction from left to right", + "rtl": "Text direction from right to left" + }, + "blockquote": { + "toolbar": "Block Quote" + }, + "notification": { + "closed": "Notification closed." + }, + "button": { + "selectedLabel": "%1 (Selected)" + }, + "toolbar": { + "toolbarCollapse": "Collapse Toolbar", + "toolbarExpand": "Expand Toolbar", + "toolbarGroups": { + "document": "Document", + "clipboard": "Clipboard/Undo", + "editing": "Editing", + "forms": "Forms", + "basicstyles": "Basic Styles", + "paragraph": "Paragraph", + "links": "Links", + "insert": "Insert", + "styles": "Styles", + "colors": "Colors", + "tools": "Tools" + }, + "toolbars": "Editor toolbars" + }, + "clipboard": { + "copy": "Copy", + "copyError": "Your browser security settings don't permit the editor to automatically execute copying operations. Please use the keyboard for that (Ctrl/Cmd+C).", + "cut": "Cut", + "cutError": "Your browser security settings don't permit the editor to automatically execute cutting operations. Please use the keyboard for that (Ctrl/Cmd+X).", + "paste": "Paste", + "pasteNotification": "Press %1 to paste. Your browser doesn‘t support pasting with the toolbar button or context menu option.", + "pasteArea": "Paste Area", + "pasteMsg": "Paste your content inside the area below and press OK.", + "title": "Paste" + }, + "colorbutton": { + "auto": "Automatic", + "bgColorTitle": "Background Color", + "colors": { + "000": "Black", + "800000": "Maroon", + "8B4513": "Saddle Brown", + "2F4F4F": "Dark Slate Gray", + "008080": "Teal", + "000080": "Navy", + "4B0082": "Indigo", + "696969": "Dark Gray", + "B22222": "Fire Brick", + "A52A2A": "Brown", + "DAA520": "Golden Rod", + "006400": "Dark Green", + "40E0D0": "Turquoise", + "0000CD": "Medium Blue", + "800080": "Purple", + "808080": "Gray", + "F00": "Red", + "FF8C00": "Dark Orange", + "FFD700": "Gold", + "008000": "Green", + "0FF": "Cyan", + "00F": "Blue", + "EE82EE": "Violet", + "A9A9A9": "Dim Gray", + "FFA07A": "Light Salmon", + "FFA500": "Orange", + "FFFF00": "Yellow", + "00FF00": "Lime", + "AFEEEE": "Pale Turquoise", + "ADD8E6": "Light Blue", + "DDA0DD": "Plum", + "D3D3D3": "Light Grey", + "FFF0F5": "Lavender Blush", + "FAEBD7": "Antique White", + "FFFFE0": "Light Yellow", + "F0FFF0": "Honeydew", + "F0FFFF": "Azure", + "F0F8FF": "Alice Blue", + "E6E6FA": "Lavender", + "FFF": "White", + "1ABC9C": "Strong Cyan", + "2ECC71": "Emerald", + "3498DB": "Bright Blue", + "9B59B6": "Amethyst", + "4E5F70": "Grayish Blue", + "F1C40F": "Vivid Yellow", + "16A085": "Dark Cyan", + "27AE60": "Dark Emerald", + "2980B9": "Strong Blue", + "8E44AD": "Dark Violet", + "2C3E50": "Desaturated Blue", + "F39C12": "Orange", + "E67E22": "Carrot", + "E74C3C": "Pale Red", + "ECF0F1": "Bright Silver", + "95A5A6": "Light Grayish Cyan", + "DDD": "Light Gray", + "D35400": "Pumpkin", + "C0392B": "Strong Red", + "BDC3C7": "Silver", + "7F8C8D": "Grayish Cyan", + "999": "Dark Gray" + }, + "more": "More Colors...", + "panelTitle": "Colors", + "textColorTitle": "Text Color" + }, + "colordialog": { + "clear": "Clear", + "highlight": "Highlight", + "options": "Color Options", + "selected": "Selected Color", + "title": "Select color" + }, + "templates": { + "button": "Templates", + "emptyListMsg": "(No templates defined)", + "insertOption": "Replace actual contents", + "options": "Template Options", + "selectPromptMsg": "Please select the template to open in the editor", + "title": "Content Templates" + }, + "contextmenu": { + "options": "Context Menu Options" + }, + "copyformatting": { + "label": "Copy Formatting", + "notification": { + "copied": "Formatting copied", + "applied": "Formatting applied", + "canceled": "Formatting canceled", + "failed": "Formatting failed. You cannot apply styles without copying them first." + } + }, + "div": { + "IdInputLabel": "Id", + "advisoryTitleInputLabel": "Advisory Title", + "cssClassInputLabel": "Stylesheet Classes", + "edit": "Edit Div", + "inlineStyleInputLabel": "Inline Style", + "langDirLTRLabel": "Left to Right (LTR)", + "langDirLabel": "Language Direction", + "langDirRTLLabel": "Right to Left (RTL)", + "languageCodeInputLabel": " Language Code", + "remove": "Remove Div", + "styleSelectLabel": "Style", + "title": "Create Div Container", + "toolbar": "Create Div Container" + }, + "elementspath": { + "eleLabel": "Elements path", + "eleTitle": "%1 element" + }, + "filetools": { + "loadError": "Error occurred during file read.", + "networkError": "Network error occurred during file upload.", + "httpError404": "HTTP error occurred during file upload (404: File not found).", + "httpError403": "HTTP error occurred during file upload (403: Forbidden).", + "httpError": "HTTP error occurred during file upload (error status: %1).", + "noUrlError": "Upload URL is not defined.", + "responseError": "Incorrect server response." + }, + "find": { + "find": "Find", + "findOptions": "Find Options", + "findWhat": "Find what:", + "matchCase": "Match case", + "matchCyclic": "Match cyclic", + "matchWord": "Match whole word", + "notFoundMsg": "The specified text was not found.", + "replace": "Replace", + "replaceAll": "Replace All", + "replaceSuccessMsg": "%1 occurrence(s) replaced.", + "replaceWith": "Replace with:", + "title": "Find and Replace" + }, + "fakeobjects": { + "anchor": "Anchor", + "flash": "Flash Animation", + "hiddenfield": "Hidden Field", + "iframe": "IFrame", + "unknown": "Unknown Object" + }, + "flash": { + "access": "Script Access", + "accessAlways": "Always", + "accessNever": "Never", + "accessSameDomain": "Same domain", + "alignAbsBottom": "Abs Bottom", + "alignAbsMiddle": "Abs Middle", + "alignBaseline": "Baseline", + "alignTextTop": "Text Top", + "bgcolor": "Background color", + "chkFull": "Allow Fullscreen", + "chkLoop": "Loop", + "chkMenu": "Enable Flash Menu", + "chkPlay": "Auto Play", + "flashvars": "Variables for Flash", + "hSpace": "HSpace", + "properties": "Flash Properties", + "propertiesTab": "Properties", + "quality": "Quality", + "qualityAutoHigh": "Auto High", + "qualityAutoLow": "Auto Low", + "qualityBest": "Best", + "qualityHigh": "High", + "qualityLow": "Low", + "qualityMedium": "Medium", + "scale": "Scale", + "scaleAll": "Show all", + "scaleFit": "Exact Fit", + "scaleNoBorder": "No Border", + "title": "Flash Properties", + "vSpace": "VSpace", + "validateHSpace": "HSpace must be a number.", + "validateSrc": "URL must not be empty.", + "validateVSpace": "VSpace must be a number.", + "windowMode": "Window mode", + "windowModeOpaque": "Opaque", + "windowModeTransparent": "Transparent", + "windowModeWindow": "Window" + }, + "font": { + "fontSize": { + "label": "Size", + "voiceLabel": "Font Size", + "panelTitle": "Font Size" + }, + "label": "Font", + "panelTitle": "Font Name", + "voiceLabel": "Font" + }, + "forms": { + "button": { + "title": "Button Properties", + "text": "Text (Value)", + "type": "Type", + "typeBtn": "Button", + "typeSbm": "Submit", + "typeRst": "Reset" + }, + "checkboxAndRadio": { + "checkboxTitle": "Checkbox Properties", + "radioTitle": "Radio Button Properties", + "value": "Value", + "selected": "Selected", + "required": "Required" + }, + "form": { + "title": "Form Properties", + "menu": "Form Properties", + "action": "Action", + "method": "Method", + "encoding": "Encoding" + }, + "hidden": { + "title": "Hidden Field Properties", + "name": "Name", + "value": "Value" + }, + "select": { + "title": "Selection Field Properties", + "selectInfo": "Select Info", + "opAvail": "Available Options", + "value": "Value", + "size": "Size", + "lines": "lines", + "chkMulti": "Allow multiple selections", + "required": "Required", + "opText": "Text", + "opValue": "Value", + "btnAdd": "Add", + "btnModify": "Modify", + "btnUp": "Up", + "btnDown": "Down", + "btnSetValue": "Set as selected value", + "btnDelete": "Delete" + }, + "textarea": { + "title": "Textarea Properties", + "cols": "Columns", + "rows": "Rows" + }, + "textfield": { + "title": "Text Field Properties", + "name": "Name", + "value": "Value", + "charWidth": "Character Width", + "maxChars": "Maximum Characters", + "required": "Required", + "type": "Type", + "typeText": "Text", + "typePass": "Password", + "typeEmail": "Email", + "typeSearch": "Search", + "typeTel": "Telephone Number", + "typeUrl": "URL" + } + }, + "format": { + "label": "Format", + "panelTitle": "Paragraph Format", + "tag_address": "Address", + "tag_div": "Normal (DIV)", + "tag_h1": "Heading 1", + "tag_h2": "Heading 2", + "tag_h3": "Heading 3", + "tag_h4": "Heading 4", + "tag_h5": "Heading 5", + "tag_h6": "Heading 6", + "tag_p": "Normal", + "tag_pre": "Formatted" + }, + "horizontalrule": { + "toolbar": "Insert Horizontal Line" + }, + "iframe": { + "border": "Show frame border", + "noUrl": "Please type the iframe URL", + "scrolling": "Enable scrollbars", + "title": "IFrame Properties", + "toolbar": "IFrame" + }, + "image": { + "alt": "Alternative Text", + "border": "Border", + "btnUpload": "Send it to the Server", + "button2Img": "Do you want to transform the selected image button on a simple image?", + "hSpace": "HSpace", + "img2Button": "Do you want to transform the selected image on a image button?", + "infoTab": "Image Info", + "linkTab": "Link", + "lockRatio": "Lock Ratio", + "menu": "Image Properties", + "resetSize": "Reset Size", + "title": "Image Properties", + "titleButton": "Image Button Properties", + "upload": "Upload", + "urlMissing": "Image source URL is missing.", + "vSpace": "VSpace", + "validateBorder": "Border must be a whole number.", + "validateHSpace": "HSpace must be a whole number.", + "validateVSpace": "VSpace must be a whole number." + }, + "indent": { + "indent": "Increase Indent", + "outdent": "Decrease Indent" + }, + "smiley": { + "options": "Smiley Options", + "title": "Insert a Smiley", + "toolbar": "Smiley" + }, + "language": { + "button": "Set language", + "remove": "Remove language" + }, + "link": { + "acccessKey": "Access Key", + "advanced": "Advanced", + "advisoryContentType": "Advisory Content Type", + "advisoryTitle": "Advisory Title", + "anchor": { + "toolbar": "Anchor", + "menu": "Edit Anchor", + "title": "Anchor Properties", + "name": "Anchor Name", + "errorName": "Please type the anchor name", + "remove": "Remove Anchor" + }, + "anchorId": "By Element Id", + "anchorName": "By Anchor Name", + "charset": "Linked Resource Charset", + "cssClasses": "Stylesheet Classes", + "download": "Force Download", + "displayText": "Display Text", + "emailAddress": "E-Mail Address", + "emailBody": "Message Body", + "emailSubject": "Message Subject", + "id": "Id", + "info": "Link Info", + "langCode": "Language Code", + "langDir": "Language Direction", + "langDirLTR": "Left to Right (LTR)", + "langDirRTL": "Right to Left (RTL)", + "menu": "Edit Link", + "name": "Name", + "noAnchors": "(No anchors available in the document)", + "noEmail": "Please type the e-mail address", + "noUrl": "Please type the link URL", + "other": "", + "popupDependent": "Dependent (Netscape)", + "popupFeatures": "Popup Window Features", + "popupFullScreen": "Full Screen (IE)", + "popupLeft": "Left Position", + "popupLocationBar": "Location Bar", + "popupMenuBar": "Menu Bar", + "popupResizable": "Resizable", + "popupScrollBars": "Scroll Bars", + "popupStatusBar": "Status Bar", + "popupToolbar": "Toolbar", + "popupTop": "Top Position", + "rel": "Relationship", + "selectAnchor": "Select an Anchor", + "styles": "Style", + "tabIndex": "Tab Index", + "target": "Target", + "targetFrame": "", + "targetFrameName": "Target Frame Name", + "targetPopup": "", + "targetPopupName": "Popup Window Name", + "title": "Link", + "toAnchor": "Link to anchor in the text", + "toEmail": "E-mail", + "toUrl": "URL", + "toolbar": "Link", + "type": "Link Type", + "unlink": "Unlink", + "upload": "Upload" + }, + "list": { + "bulletedlist": "Insert/Remove Bulleted List", + "numberedlist": "Insert/Remove Numbered List" + }, + "liststyle": { + "armenian": "Armenian numbering", + "bulletedTitle": "Bulleted List Properties", + "circle": "Circle", + "decimal": "Decimal (1, 2, 3, etc.)", + "decimalLeadingZero": "Decimal leading zero (01, 02, 03, etc.)", + "disc": "Disc", + "georgian": "Georgian numbering (an, ban, gan, etc.)", + "lowerAlpha": "Lower Alpha (a, b, c, d, e, etc.)", + "lowerGreek": "Lower Greek (alpha, beta, gamma, etc.)", + "lowerRoman": "Lower Roman (i, ii, iii, iv, v, etc.)", + "none": "None", + "notset": "", + "numberedTitle": "Numbered List Properties", + "square": "Square", + "start": "Start", + "type": "Type", + "upperAlpha": "Upper Alpha (A, B, C, D, E, etc.)", + "upperRoman": "Upper Roman (I, II, III, IV, V, etc.)", + "validateStartNumber": "List start number must be a whole number." + }, + "magicline": { + "title": "Insert paragraph here" + }, + "maximize": { + "maximize": "Maximize", + "minimize": "Minimize" + }, + "newpage": { + "toolbar": "New Page" + }, + "pagebreak": { + "alt": "Page Break", + "toolbar": "Insert Page Break for Printing" + }, + "pastetext": { + "button": "Paste as plain text", + "pasteNotification": "Press %1 to paste. Your browser doesn‘t support pasting with the toolbar button or context menu option.", + "title": "Paste as Plain Text" + }, + "pastefromword": { + "confirmCleanup": "The text you want to paste seems to be copied from Word. Do you want to clean it before pasting?", + "error": "It was not possible to clean up the pasted data due to an internal error", + "title": "Paste from Word", + "toolbar": "Paste from Word" + }, + "preview": { + "preview": "Preview" + }, + "print": { + "toolbar": "Print" + }, + "removeformat": { + "toolbar": "Remove Format" + }, + "save": { + "toolbar": "Save" + }, + "selectall": { + "toolbar": "Select All" + }, + "showblocks": { + "toolbar": "Show Blocks" + }, + "sourcearea": { + "toolbar": "Source" + }, + "specialchar": { + "options": "Special Character Options", + "title": "Select Special Character", + "toolbar": "Insert Special Character" + }, + "scayt": { + "btn_about": "About SCAYT", + "btn_dictionaries": "Dictionaries", + "btn_disable": "Disable SCAYT", + "btn_enable": "Enable SCAYT", + "btn_langs": "Languages", + "btn_options": "Options", + "text_title": "Spell Check As You Type" + }, + "stylescombo": { + "label": "Styles", + "panelTitle": "Formatting Styles", + "panelTitle1": "Block Styles", + "panelTitle2": "Inline Styles", + "panelTitle3": "Object Styles" + }, + "table": { + "border": "Border size", + "caption": "Caption", + "cell": { + "menu": "Cell", + "insertBefore": "Insert Cell Before", + "insertAfter": "Insert Cell After", + "deleteCell": "Delete Cells", + "merge": "Merge Cells", + "mergeRight": "Merge Right", + "mergeDown": "Merge Down", + "splitHorizontal": "Split Cell Horizontally", + "splitVertical": "Split Cell Vertically", + "title": "Cell Properties", + "cellType": "Cell Type", + "rowSpan": "Rows Span", + "colSpan": "Columns Span", + "wordWrap": "Word Wrap", + "hAlign": "Horizontal Alignment", + "vAlign": "Vertical Alignment", + "alignBaseline": "Baseline", + "bgColor": "Background Color", + "borderColor": "Border Color", + "data": "Data", + "header": "Header", + "yes": "Yes", + "no": "No", + "invalidWidth": "Cell width must be a number.", + "invalidHeight": "Cell height must be a number.", + "invalidRowSpan": "Rows span must be a whole number.", + "invalidColSpan": "Columns span must be a whole number.", + "chooseColor": "Choose" + }, + "cellPad": "Cell padding", + "cellSpace": "Cell spacing", + "column": { + "menu": "Column", + "insertBefore": "Insert Column Before", + "insertAfter": "Insert Column After", + "deleteColumn": "Delete Columns" + }, + "columns": "Columns", + "deleteTable": "Delete Table", + "headers": "Headers", + "headersBoth": "Both", + "headersColumn": "First column", + "headersNone": "None", + "headersRow": "First Row", + "invalidBorder": "Border size must be a number.", + "invalidCellPadding": "Cell padding must be a positive number.", + "invalidCellSpacing": "Cell spacing must be a positive number.", + "invalidCols": "Number of columns must be a number greater than 0.", + "invalidHeight": "Table height must be a number.", + "invalidRows": "Number of rows must be a number greater than 0.", + "invalidWidth": "Table width must be a number.", + "menu": "Table Properties", + "row": { + "menu": "Row", + "insertBefore": "Insert Row Before", + "insertAfter": "Insert Row After", + "deleteRow": "Delete Rows" + }, + "rows": "Rows", + "summary": "Summary", + "title": "Table Properties", + "toolbar": "Table", + "widthPc": "percent", + "widthPx": "pixels", + "widthUnit": "width unit" + }, + "undo": { + "redo": "Redo", + "undo": "Undo" + }, + "widget": { + "move": "Click and drag to move", + "label": "%1 widget" + }, + "uploadwidget": { + "abort": "Upload aborted by the user.", + "doneOne": "File successfully uploaded.", + "doneMany": "Successfully uploaded %1 files.", + "uploadOne": "Uploading file ({percentage}%)...", + "uploadMany": "Uploading files, {current} of {max} done ({percentage}%)..." + }, + "wsc": { + "btnIgnore": "Ignore", + "btnIgnoreAll": "Ignore All", + "btnReplace": "Replace", + "btnReplaceAll": "Replace All", + "btnUndo": "Undo", + "changeTo": "Change to", + "errorLoading": "Error loading application service host: %s.", + "ieSpellDownload": "Spell checker not installed. Do you want to download it now?", + "manyChanges": "Spell check complete: %1 words changed", + "noChanges": "Spell check complete: No words changed", + "noMispell": "Spell check complete: No misspellings found", + "noSuggestions": "- No suggestions -", + "notAvailable": "Sorry, but service is unavailable now.", + "notInDic": "Not in dictionary", + "oneChange": "Spell check complete: One word changed", + "progress": "Spell check in progress...", + "title": "Spell Checker", + "toolbar": "Check Spelling" + } +}; +CKEDITOR.lang.en["indent"] = { + indent: "Nested List", + outdent: "Decrease Nesting" +}; +CKEDITOR.lang.en["stylescombo"]["label"] = "Code"; +CKEDITOR.lang.en.image.alt = "HoverTip"; +CKEDITOR.lang.en["fbrowser"] = { + FileBrowserError_101: "Folder already exists.", + FileBrowserError_102: "Invalid folder name", + FileBrowserError_103: "You have no permissions to create the folder.", + FileBrowserError_110: "Unknown error creating folder", + FileBrowserError_201: "A file with the same name is already available. The uploaded file has been renamed to: ", + FileBrowserError_202: "Invalid file", + FileBrowserError_203: "You do not have permission to upload files to this folder. If you think this is incorrect please notify your administrator.", + FileBrowserError_204: "Unable to delete the selected file", + FileBrowserError_205: "Unable to rename the selected file; check your directory/write permisssions", + FileBrowserError_206: " already exists; you must either delete or rename it. ", + FileBrowserError_default: "Error on your request. Error number: ", + FileBrowserError_Ajax: "Your browser does not support AJAX.", + FileBrowserError_XML: "The server didn't reply with a proper XML data. Please check your configuration.", + FileBrowserError_Folder_Submit: "Please type the folder name.", + FileBrowserError_File_Submit: "Please select a file from your computer", + FileBrowserError_Upload: "Error on upload. Error number: ", + FileBrowserError_Connector: "The connector is disabled. Check editor/filemanager/connectors/php/config.php", + FileBrowserError_Command: "Unsupported command: ", + FileBrowserError_Type: "Invalid type specified: ", + FolderMoveWarning: "You can only move files to a folder one level below the current directory", + FileBrowserError_301: "The uploaded file exceeds the upload_max_filesize directive in php.ini.", + FileBrowserError_302: "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.", + FileBrowserError_303: "The uploaded file was only partially uploaded.", + FileBrowserError_304: "No file was uploaded.", + FileBrowserError_306: "Missing a temporary folder.", + FileBrowserError_307: "Failed to write file to disk.", + FileBrowserError_308: "PHP does not provide a way to ascertain which extension caused the file upload to stop; examining the list of loaded extensions with phpinfo() may help.", + DlgFileBrowserUpMsg: "Upload a new file in this folder", + DlgFileBrowserRead: "read-only", + DlgFileBrowserWrite: "uploadable", + DlgFileBrowserNewFolder: "Create Folder", + DlgFileBrowserResourceType: "Resource Type", + DlgLnkUpload: "Upload", + DlgFileBrowserMove: "Move", + LinkText: "Link Display Text
User defined Text (takes precedence over Page Name or ID)", + InternalLink: "internal link", + InternalMedia: "internal media", + MediaFileLink: "link to media file", + InterWikiLink: "Interwiki Link", + InterWikiType: "Interwiki Type", + InterwikiPlaceHolder: "Interwiki Replacement Text", + InterwikiInfo: "
Dokuwiki's interwiki links are short-cuts which look like this: [[wp>Shakespeare]], which will create a link to the English Wikipedia article on Shakespeare. The wp part designates a link pattern; the text following the '>' will be inserted into the link, replacing a place holder, which is enclosed in curly brackets, as in {NAME}. When there is no place holder, the replacement text will be appended to the end of the link.
", + MediaFileLink: "link to media file", + SMBLabel: "Samba Share", + GetHeadingsLabel: "Get Headings", + QStringLabel: "Query String (For example: value_1=1&value_2=2) ", + ResetQS: "Reset Query String", + NotSetOption: "Not Set", + AdvancedInfo: "To create anchors from Dokuwiki headers, click on the Get Headings button, select the header, click OK. You can go back, select a new page and get new headers.", + AdvancedTabPrompt: "Use the advanced tab to create page anchors and query strings", + SMBExample: "Enter your share as: \\\\Server\\directory\\file", + DlgFileBrowserWaitingMsg: "Loading files, please wait.", + DlgFileBrowserAdjustSize: "Adjust browser size", + DlgFileBrowserReset: "Reset", + DlgFileBrowserSortBy: "Sort by", + DlgFileBrowserSortDate: "Date", + DlgFileBrowserSortSize: "File size", + DlgFileBrowserSortName: "Name", + DlgFileBrowserButtonHelp: "Help", + DlgFileBrowserResizeMsg: "The file browser window will be reset to the default size after your page is reloaded into the editor.", + DlgFileBrowserSearch: "Find file(s)", + DlgFileBrowserSortOrder: "Reverse order", + DlgFileBrowserInfo_1: "If you increase the zoom level of your browser, Ckgedit's file browser may exceed the size of its enclosing window, forcing scrollbars. To eliminate the scrollbars, you can enlarge the window up to 20%. The new size takes effect after you have closed and re-opened the editor. Resizing uses a cookie with a year's duration. ", + DlgFileBrowserInfo_2: "The file listings can be sorted by Name, Date, and File Size. By default they sort in ascending order, but Date and File Size can be sorted in descending order by checking the Reverse Order option. The sort functions are not supported by Internet Explorer but do work in Win 10 Edge.", + DlgFileBrowserInfo_3: "The search functions will search using whole or part of a file name." +}; +CKEDITOR.lang.en["footnote"] = { + FootNoteInfo: '
  • To create a footnote enter the footnote text into the editing box and click OK
  • To edit a footnote enter the footnote id into the id box and click the Load button.
    The footnote will appear in the editing box, where you can then edit it.
    When you are finished editing, click OK to save.
  • A footnote id has this form: fckgL_<n>, where n is the number of the note.
', + ToolTip: "Insert a footnote", + Settings: "Settings", + Header: "This dialog window lets you create and edit footnotes.", + Label_1: "Footnote Text (required)", + Label_2: "Footnote Id: ", + LoadButtonLabel: "Load Note In Editor", + Title: "Footnote Dialog", + Validate: "The footnote text field cannot be empty." +}; +CKEDITOR.lang.en["fontassist"] = { + Title: "Font Plugin Editor", + ToolTip: "Check and Revise Font Styling", + MainHeader: "View and optionally alter text styled with the font plugin .", + SelectColor: " Select Color", + SelectedTextColor: "Selected Text Color", + SelectedBGColor: "Selected Background Color", + BGColors: "Background Colors", + InfoText: '
This tool works with the font plugin and is used to update the font plugin\'s syntax and/or view its enclosed text. Clicking anywhere on the plugin syntax or its text will enable you to check the appearance of the font, its colors, and its size.

You can also update the plugin syntax in place. To do this you must select both the font syntax itself and the enclosed text:

<font. . . >text</font>

Then whatever changes you make with this tool can be inserted into the editor window, by clicking OK, and will replace the current font syntax.

The font syntax will appear in the textbox below the display window and is updated with each change. Clicking on the text will select the text for copying.
', + Main: "Main", + Text: "Text", + IfChecked: " If checked, uncheck to activate OK button", + Fonts: "Fonts", + FontSizes: "Font Sizes (px)", + ResetFont: "Reset font", + ResetAll: "Reset all", + TextColors: "Text Colors", + Accept: "Accept", + Reset: "Reset", + none: "none" +}; +CKEDITOR.lang.en["signature"] = { + ToolTip: "Insert signature" +}; +CKEDITOR.lang.en.format["panelTitle"] = "Section Headers"; +CKEDITOR.lang.en.format["label"] = "Headlines"; +CKEDITOR.lang.en.stylescombo["panelTitle"] = "Formatting Code Styles"; +CKEDITOR.lang.en["stylescombo"]["label"] = "Code"; +CKEDITOR.lang.en.common.alignBaseLine = "Baseline"; +CKEDITOR.lang.en["indent"] = { + indent: "Nested List", + outdent: "Decrease Nesting" +}; +CKEDITOR.lang.en.common["noLink"] = "No link"; +CKEDITOR.lang.en.common["linkType"] = "Link type"; +CKEDITOR.lang.en.common["linkDetail"] = "Detail"; +CKEDITOR.lang.en.common["linkDirect"] = "Direct"; +CKEDITOR.lang.en.common["linkNoLink"] = "No Link"; +CKEDITOR.lang.en.common["linkOnly"] = "Link only"; \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/en/hogfather.txt b/lib/plugins/ckgedit/lang/en/hogfather.txt new file mode 100644 index 0000000..2ea6a3b --- /dev/null +++ b/lib/plugins/ckgedit/lang/en/hogfather.txt @@ -0,0 +1 @@ +This version of ckgedit has been adapted for the hogfather dokuwiki distribution. The most significant difference from previous versions is that it no longer has access to the ckgedit filebrowser. It uses instead the dokuwiki media app for media and its linkwiz for internal links. See [[doku>plugin:ckgedit#note_on_hogfather]] diff --git a/lib/plugins/ckgedit/lang/en/lang.php b/lib/plugins/ckgedit/lang/en/lang.php new file mode 100644 index 0000000..aa12251 --- /dev/null +++ b/lib/plugins/ckgedit/lang/en/lang.php @@ -0,0 +1,80 @@ +New Feature: double click browser window to open DW Editor for section editing at cursor. See: direct_access_to_dokuwiki_editor. "; +$lang['dblclk_reminder'] = "Reminder "; +$lang['ckg_img_paste'] = 'Turn supplementary image paste support'; +$lang['ckg_img_paste_title'] = 'Off to prevent double pastes, or on to enable pastes'; +$lang['js']['ckg_paste_restart'] = 'On reloading the editor, supplementary paste support will be turned'; +$lang['on'] ='on'; +$lang['off'] ='off'; +$lang['js']['on'] ='on'; +$lang['js']['off'] ='off'; +$lang['broken_image'] = "Use the imagePaste plugin with the Dokuwiki Mediamanager or try the MS Word Paste Tool. Raw data of Ctrl-v images over 2.5M can hang. This image is: " ; +$lang['js']['broken_image_1'] = "Use the imagePaste plugin with the Dokuwiki Mediamanager or try the MS Word Paste Tool."; +$lang['js']['broken_image_2'] = "Ctrl-v images with raw data over 2.5M can hang. This image is: " ; +$lang['menu'] = 'CKEditor editor CSS tool'; +$lang['default_stylesheet'] = 'Create a style sheet for the current template'; +$lang['alt_stylesheet'] = 'Create a stylesheet for another template'; +$lang['style_sheet'] = 'Create Style sheet'; +$lang['style_sheet_msg'] = 'Creating Style sheet for the current template:'; +$lang['alt_style_sheet_msg'] = 'Creating Style sheet for:'; +$lang['checkbox'] = 'Copy to ckeditor/css'; +$lang['stylesheet_oinfo'] = 'Info'; +$lang['stylesheet_cinfo'] = 'Close Info'; +$lang['js']['stylesheet_oinfo'] = 'Info'; +$lang['js']['stylesheet_cinfo'] = 'Close Info'; +$lang['js']['lock_msg'] = "Your lock for editing this page is about to expire in one minute\n"; +$lang['js']['willexpire'] = 'Your lock for editing this page is about to expire in a minute.\nTo avoid conflicts use the backup button to reset the locktimer.'; + diff --git a/lib/plugins/ckgedit/lang/en/scayt.txt b/lib/plugins/ckgedit/lang/en/scayt.txt new file mode 100644 index 0000000..550fce4 --- /dev/null +++ b/lib/plugins/ckgedit/lang/en/scayt.txt @@ -0,0 +1,3 @@ +The Scayt spellchecker offers three Configuration Options: on, off, disabled. As of now, the default setting will be **off** instead of **on**. With **on** the contents of the editor is parsed by Scayt and sent for spell-checking to a Scayt server. While there is no reason to believe this is a security risk, nevertheless this change is being made out of consideration for users with private wikis who may feel anxious having their data sent to a remote server. When set to “disable” The spell checker is removed entirely. Further information can be found in the Configuration Options page of the ckgedit documentation at https://www.dokuwiki.org/plugin:ckgedit:configuration#scayt_auto. + + diff --git a/lib/plugins/ckgedit/lang/en/settings.php b/lib/plugins/ckgedit/lang/en/settings.php new file mode 100644 index 0000000..1c59732 --- /dev/null +++ b/lib/plugins/ckgedit/lang/en/settings.php @@ -0,0 +1,57 @@ +nocheck: ckgedit will make no changes to the default direction setting; ' + . ' dokuwiki: the current Dokuwiki language direction; ltr: Left-to-right ; rtl: Right-to-left.'; +$lang['scayt_auto'] = 'Set whether or not the Scayt check-as-you-type spell checker is active at startup. Defaults to off; the user can re-enable spell checking on a per page basis.' . + ' To remove the Scayt spell checker completely, select disable. '. + '(See ckgedit:configuration#scayt_auto") '; +$lang['scayt_auto_o_on'] = 'on'; +$lang['scayt_auto_o_off'] = 'off'; +$lang['scayt_auto_o_disable'] = 'disable'; +$lang['scayt_lang']="Set SCAYT default language."; +$lang['smiley_hack'] = "Reset URL for CKeditor's smilies when moving to new server. This is done on a page by page basis when page is loaded for editing and saved. This option should normally be turned off."; +$lang['complex_tables'] ="Use the complex tables algorithm. As opposed to the standard parsing of tables, this should give better results when mixing complex arrangements of rowspans and colspans. But slightly more processing time."; +$lang['duplicate_notes'] = "Set this to true if users create multiple footnotes with the same footnote texts; required to prevent notes from being corrupted."; +$lang['winstyle'] = 'Use direct path to media directory instead of fckeditor/userfiles. This function copies
fckeditor/userfiles/.htaccess.security to data/media/.htaccess; if not, this should be done manually'; +$lang['other_lang'] = 'Your default language for the CKEditor is the language set for your browser. You can, however, choose another language here; it is independent of the Dokuwiki interface language.'; +#$lang['dw_priority'] = "Make Dokuwiki editor the default editor: does not work in farms"; +$lang['nofont_styling'] = 'Display font styles in editor as plugin markup. See the ckgedit plugin page at Dokuwiki.org for details.'; +$lang['font_options'] = 'Remove font options.'; +$lang['color_options'] = 'Remove Color options.'; +$lang['alt_toolbar'] = 'Functions to remove from CKEditor toolbar.

Any other functions can be removed by including them as a comma separated list in the text box:

' . + 'Bold, Italic, Underline, Strike, Subscript, Superscript, RemoveFormat, Find, Replace, SelectAll, Scayt, ' . + 'Image, Table, Tags, Link, Unlink, Format, Styles,TextColor, BGColor, NumberedList, BulletedList, ' . + 'Cut, Copy, Paste, PasteText, PasteFromWord, Undo, Redo, Source, Maximize, About.'; + +$lang['mfiles'] = 'Enable mfile support'; +$lang['extra_plugins'] = "Comma separated list of additional Ckeditor plugins to be added to toolbar. See ckgedit plugin's config page for details"; +#$lang['dw_users'] = "Group name of users whose editor defaults to Dokuwiki editor when dw_priority is selected. If not defined, then all users get the native Dokuwiki editor when dw_priority is selected."; +$lang['allow_ckg_filebrowser'] = 'Select which file/media browser(s) users can use'; +$lang['default_ckg_filebrowser'] = 'Select which file/media browser is the default. This will be overridden if the selected browser is not allowed'; +$lang['htmlblock_ok'] ='When using HTML_BLOCKs either this setting or Dokuwiki\'s htmlok option must be enabled. ' . + ' It doesn\'t pose the same level of security risk as htmlok. Nevertheless, it is should be used only in a trusted user environment, and not in an open wiki.'; +$lang['dblclk']="Set to off to turn off the double click feature which enables section editing using the Dokuwiki editor (see: direct_access_to_dokuwiki_editor)"; +$lang['preserve_enc'] ="Preserve urlencoding in urls when the dokuwiki deaccent option is active."; +$lang['gui'] = "Select CKEditor GUI."; +$lang['rel_links'] = "Activate support for relative internal and image links"; +$lang['style_sheet'] = 'Use an alternate style sheet for the Ckeditor editing window.' . + ' For more information see the CKEditor editor CSS tool, under Additional Plugins on the Admin page. Or ' . + ' see the ckgedit plugin page.'; + diff --git a/lib/plugins/ckgedit/lang/en/style.txt b/lib/plugins/ckgedit/lang/en/style.txt new file mode 100644 index 0000000..bc72bd2 --- /dev/null +++ b/lib/plugins/ckgedit/lang/en/style.txt @@ -0,0 +1,11 @@ +**Current Template** \\ +With this app you can create a style sheet for the CKEditor's editing window that is based on your template. It will place the style sheet in your template folder in the directory named **Styles**, which will be created when the style sheet is saved. The style sheet will be named **_styles.css**. To activate this style sheet two things must be done: + + - it must be placed in **ckgedit/ckeditor/css**. This will automatically be done for you if you check off the checkbox labeled **Copy to ckeditor/css.** + - The **style_sheet** option in the ''Configuration Settings'' must be set to **true**. + +**Other templates: installed but not activated** \\ You can also create additional style sheets for other templates which you might have stored in your **tpl** folder. These will be copied to the Styles folder of the respective templates but not to **ckeditor/css**. + +---- + + diff --git a/lib/plugins/ckgedit/lang/eo/lang.php b/lib/plugins/ckgedit/lang/eo/lang.php new file mode 100644 index 0000000..0f3d43a --- /dev/null +++ b/lib/plugins/ckgedit/lang/eo/lang.php @@ -0,0 +1,33 @@ + + */ +$lang['btn_dw_edit'] = 'DW-Redakti'; +$lang['dw_btn_fck_preview'] = 'CKG-Antaŭrigardo'; +$lang['dw_btn_lang'] = 'Lingvo'; +$lang['title_dw_delete'] = 'Forigi paĝon'; +$lang['title_dw_edit'] = 'Konservi la laboron, Eliri kaj Ŝanĝi al la standarda DokuWiki-redaktilo'; +$lang['dw_btn_revert'] = 'Malfari'; +$lang['title_dw_revert'] = 'Reiri al antaŭa savkopio'; +$lang['title_dw_lang'] = 'Elekti lingvon de ortografikontrolo'; +$lang['title_dw_cancel'] = 'Forlasi la redaktilon'; +$lang['btn_fck_edit'] = 'CKG-Redaktilo'; +$lang['confirm_delete'] = 'Ĉu vi vere volas forigi ĉi-tiun paĝon?'; +$lang['confirm_preview'] = 'Ajna laboro estos perdita.'; +$lang['dw_btn_backup'] = 'Savkopio'; +$lang['title_dw_backup'] = 'Savkopia fenestro & bloki forigon'; +$lang['backup_empty'] = 'La savkopio ŝajnas malplena. Ĉu vi volas daŭrigi?'; +$lang['btn_draft'] = 'Akiri skizon'; +$lang['title_draft'] = 'Rigardi, Montri, Redakti skizon'; +$lang['btn_exit_draft'] = 'Forlasi la skizon'; +$lang['title_exit_draft'] = 'Reiri al la aktuala dokumento'; +$lang['draft_msg'] = 'Tiu dokumento havas skizon. La skizo-butono ŝaltas inter la dokumento kaj la skizo. Vi povas modifi kaj konservi unu el ambaŭ.'; +$lang['whats_this'] = 'kio estas tio?'; +$lang['complex_tables'] = 'Ebligi kompleksajn tabelojn'; +$lang['minor_changes'] = 'Etaj modifoj'; +$lang['discard_edits'] = 'Por konservi viajn modifojn klaku OK, por rezigni klaku Nuligi'; +$lang['dw_btn_styling'] = 'Modifi tiparojn'; +$lang['title_styling'] = 'Malfermi kun tipar-stiloj en markup-formato'; diff --git a/lib/plugins/ckgedit/lang/eo/settings.php b/lib/plugins/ckgedit/lang/eo/settings.php new file mode 100644 index 0000000..1fa6357 --- /dev/null +++ b/lib/plugins/ckgedit/lang/eo/settings.php @@ -0,0 +1,38 @@ + + * @author Robert Bogenschneider + */ +$lang['groups'] = 'Grupo, kiu rajtas malebligi la blokad-kalkulilon (malaktuala)'; +$lang['fck_preview'] = 'FCK Antaŭrigarda grupo'; +$lang['guest_toolbar'] = 'Montri la ilaron al gastoj'; +$lang['guest_media'] = 'Gastoj rajtas ligi al aŭdvidaj dosieroj'; +$lang['open_upload'] = 'Gastoj rajtas alŝuti'; +$lang['default_fb'] = 'Maniero de dosierrigardado. Sen tio ACL ne validas (ne okazas alirkontrolo).'; +$lang['openfb'] = 'Malferma rigardado de dosieroj. Tio ebligas uzantojn aliri kompletajn dosierujajn strukturojn, sendepende de legpermesoj. Alirkontrolo tamen validas por alŝutoj.'; +$lang['dw_edit_display'] = 'Difinas, kiuj uzantoj povas aliri la "DW Edit"-butonon. Elektoj: "all" por ĉiuj uzantoj; "admin" nur por la superuzanto kaj administrantoj; "none" por neniu. Standardo estas "all".'; +$lang['smiley_as_text'] = 'Montri ridetulojn kiel tekston en CKeditor (montriĝos tamen kiel bildo en foliumilo)'; +$lang['editor_bak'] = 'Konservi sekureckopion al meta/<namespace>.ckgedit'; +$lang['create_folder'] = 'Ĉu ebligi butonon por krei dosierujojn en la dosier-foliumilo (y/n)?'; +$lang['dwedit_ns'] = 'Komo-disigita listo de nomspacoj, kie ckgedit aŭtomate ŝaltas al la interna DokuWiki-editoro.'; +$lang['acl_del'] = 'La defaŭlto (sen marko) permesas al uzantoj kun alŝutpermeso forigi aŭdvidajn dosierojn; se la kesto estas markita, la uzanto bezonas forig-permeson por forigi ion el la dosierujo.'; +$lang['auth_ci'] = 'Ĉu ignori usklecon, tio signifas, ke vi povas ensaluti kaj kiel UZANTO kaj kiel uzanto?'; +$lang['nix_style'] = 'Por Vindozaj serviloj (Vista kaj poste). Tiu agordo ebligas aliri data\media tra ckgedit\CKeditor\userfiles, se ligiloj al dosieroj sukcese kreiĝis en userfiles'; +$lang['no_symlinks'] = 'Malebligi aŭtomatan kreadon de simbolaj ligiloj en ckgedit/userfiles.'; +$lang['direction'] = 'Indiki la direkton de la lingvo en CKeditor: nocheck: ckgedit faras neniujn ŝanĝojn en la standarda lingvodirekto; dokuwiki: la momenta lingvodirekto de Dokuwiki; ltr: Maldekstre-dekstren; rtl: Dekstre-maldekstren.'; +$lang['scayt_auto'] = 'Aŭtomate aktivigi la SCAYT-korektilon. Standardo estas "on". Por malŝalti SCAYT, elektu "off".'; +$lang['scayt_lang'] = 'Indiki la standardan lingvon por SCAYT.'; +$lang['smiley_hack'] = 'Nuligi URL por la ridetuloj de CKEditor dum translokiĝo al alia servilo. Ĉio okazas paĝon post paĝo, kiam paĝo estas ŝargata por modifado kaj konservata. Normale la opcio estu malŝaltita.'; +$lang['complex_tables'] = 'Uzi la algoritmon por kompleksaj tabeloj. Male al la standarda parsado se tabeloj, devus veni pli bonaj rezultoj kun kompleksaj aranĝoj de kombinitaj linioj kaj kolumnoj. Sed bezonas iom pli da prilabora tempo.'; +$lang['duplicate_notes'] = 'Diru jes al tio, se uzantoj kreas plurajn piednotojn el la sama piednota teksto; necesa por eviti fuŝadon de piednotoj.'; +$lang['winstyle'] = 'Uzi rektan padon al la aŭdvida dosierujo anstataŭ fckeditor/userfiles. Tio necesigas kopii fckeditor/userfiles/.htaccess.security al data/media kaj renomi ĝin .htaccess'; +$lang['other_lang'] = 'La standarda lingvo de la CKEditoro estas la lingvo instalita en via foliumilo. Vi povas tamen elekti alian lingvon ĉi tie; temas pri interfaca lingvo sendependa de DokuWiki.'; +$lang['dw_priority'] = 'Uzi la DokuWiki-editoron standarde'; +$lang['preload_ckeditorjs'] = 'Antaŭŝargi la javaskripton de ckeditor por rapidigi la ekstarton de la redaktilo'; +$lang['nofont_styling'] = 'Montri tipar-stilojn en la redaktilo en kromaĵ-formato. Vd. la ckgedit-paĝon ĉe dokuwiki.org pri detaloj.'; +$lang['font_options'] = 'Forigi tipar-opciojn.'; +$lang['color_options'] = 'Forigi kolor-opciojn.'; +$lang['alt_toolbar'] = 'Funkcioj forigendaj el la CKEditor-ilaro'; diff --git a/lib/plugins/ckgedit/lang/es/lang.php b/lib/plugins/ckgedit/lang/es/lang.php new file mode 100644 index 0000000..a8c40ad --- /dev/null +++ b/lib/plugins/ckgedit/lang/es/lang.php @@ -0,0 +1,73 @@ + + * @author Olaf Reitmaier + */ +$lang['btn_dw_edit'] = 'Editor DW'; +$lang['dw_btn_fck_preview'] = 'Prevista CKG'; +$lang['dw_btn_lang'] = 'Idioma'; +$lang['title_dw_delete'] = 'Borrar Página'; +$lang['title_dw_edit'] = 'Guardar, Salir y Cambia al Editor Nativo Dokuwiki'; +$lang['dw_btn_revert'] = 'Revertir'; +$lang['title_dw_revert'] = 'Revertir a un respaldo previo'; +$lang['title_dw_lang'] = 'Seleccione el idioma del corrector ortográfico'; +$lang['title_dw_cancel'] = 'Salir del Editor'; +$lang['btn_fck_edit'] = 'Editor CKG'; +$lang['confirm_delete'] = 'Seguro desea eliminar esta página?'; +$lang['confirm_preview'] = 'Cualquier cambio no guardado se perderá.'; +$lang['editor_height'] = 'Alto del Editor'; +$lang['editor_height_title'] = 'Ajustar tamaño del editor al recargar'; +$lang['dw_btn_backup'] = 'Respaldar'; +$lang['title_dw_backup'] = 'Respaldar la ventana del editor & Renovar el bloqueo'; +$lang['backup_empty'] = 'El buffer de respaldo para vacío. Desea continua?'; +$lang['btn_draft'] = 'Cargar Borrador'; +$lang['title_draft'] = 'Ver, Mostrar, Editar Borrador'; +$lang['btn_exit_draft'] = 'Salir del Borrador'; +$lang['title_exit_draft'] = 'Regresar al documento actual'; +$lang['draft_msg'] = 'Este documento tiene un borrador. El botón de borrar intercambia entre este documento y el borrador. Usted puede editar y guardar cualquier de los dos.'; +$lang['whats_this'] = 'Qué es esto?'; +$lang['complex_tables'] = 'Habilitar tablas complejas'; +$lang['minor_changes'] = 'Cambios menores'; +$lang['discard_edits'] = 'Para guardar los cambios presione OK; para descartar presione Cancel'; +$lang['dw_btn_styling'] = 'Editar Fuentes'; +$lang['title_styling'] = 'Abrir con las fuentes mostradas como etiquetas'; +$lang['js']['font_err_1'] = 'Estilos de fuentes no puede ser incluído en vínculos. Presione OK para aceptar la siguiente correción:'; +$lang['js']['font_err_2'] = 'Para revisar, ingrese debajo el vínculo Dokuwiki completo, incluyendo los corchetes. Para regresar al Editor presione Cancel.'; +$lang['js']['font_err_throw'] = 'Error de Formato de Fuente'; +$lang['js']['dwp_save_err'] = 'Imposible guardar los cambios en:'; +$lang['js']['dwp_updated'] = 'La prioridad del Editor ha sido actualizada a:'; +$lang['js']['dwp_not_sel'] = 'La prioridad del Editor no está seleccionada: será determinada por el parámetro de configuración dw_users_group'; +$lang['js']['mediamgr_notice'] = 'Use la ventana de vínculo para insertar'; +$lang['js']['font_conflict'] = 'El interprete encontró uno o más conflictos vínculos-fuentes. Presionando OK, retornará al editor y removerá los estilos de fuente. Para mayor información véa: https://www.dokuwiki.org/plugin:ckgedit:font_styling#conflicts_with_dokuwiki_links'; +$lang['js']['ckg_paste_restart'] = 'Al recargar el editor, el soporte de pegado suplementario se activará'; +$lang['js']['on'] = 'Encendido'; +$lang['js']['off'] = 'Apagado'; +$lang['js']['broken_image_1'] = 'Usa el plugin imagePaste con el Dokuwiki Mediamanager o prueba la herramienta MS Word Paste.'; +$lang['js']['broken_image_2'] = 'Se pueden colgar imágenes Ctrl-v con datos en bruto de más de 2.5M. Esta imagen es:'; +$lang['mediamgr_imgonly'] = 'Cargue imágenes solamente usando la ventana de imágenes:'; +$lang['uprofile_title'] = 'Seleccione Su Editor Predeterminado'; +$lang['btn_val_dw_fb'] = 'Explorador de Archivos DW'; +$lang['btn_val_ckg_fb'] = 'Explorador de Archivos CKG'; +$lang['btn_title_dw_fb'] = 'Guardar y cerrar el editor y cambiar al Explorador de Archivos DW'; +$lang['btn_title_ckg_fb'] = 'Guardar y cerrar el editor y cambiar al Explorador de Archivos CKG'; +$lang['formatdel'] = 'Etiquetas removidas de(los) encabezado(s): no soportados por Dokuwiki'; +$lang['fontdel'] = 'Etiquetas de Fuentes removidas de(los) vínculo(s): no soportados por Dokuwiki'; +$lang['ckgcke_conflict'] = 'Se ha detectado una copia de ckgedit. Tanto ckgedit como ckgedit deben ser desactivados. '; +$lang['ws_cantcopy'] = 'Para la configuración de winstyle: no se puede copiar a'; +$lang['ws_copiedhtaccess'] = 'Para la configuración de Winstyle, copiado el .htaccess de seguridad a los datos/medios de comunicación +Ver ckgedit/fckeditor/userfiles/.htacess.security '; +$lang['userfiles_perm'] = 'Por favor, compruebe los permisos; ckgedit no puede acceder '; +$lang['sym_not created_1'] = 'Incapaz de crear'; +$lang['sym_not created_2'] = 'No puede crear enlaces simbólicos para el navegador de archivos: no puede acceder: '; +$lang['sym_not created_3'] = 'Hubo un error al tratar de crear enlaces simbólicos en'; +$lang['syms_created'] = 'Los siguientes enlaces fueron creados en el directorio de archivos de usuario:'; +$lang['dblclk'] = 'Nueva Característica: doble click en la ventana del navegador para abrir el DW Editor para editar la sección en el cursor. Ver: direct_access_to_dokuwiki_editor.'; +$lang['dblclk_reminder'] = 'Recordatorio'; +$lang['ckg_img_paste'] = 'Girar el soporte suplementario de pegado de imágenes'; +$lang['ckg_img_paste_title'] = 'Apagado para evitar los pegados dobles, o encendido para permitir los pegados'; +$lang['on'] = 'Encendido'; +$lang['off'] = 'Apagado'; +$lang['broken_image'] = 'Usa el plugin imagePaste con el Dokuwiki Mediamanager o probar la herramienta MS Word Paste. Los datos en bruto de las imágenes Ctrl-v de más de 2.5M pueden colgarse. Esta imagen es: '; diff --git a/lib/plugins/ckgedit/lang/es/merger.txt b/lib/plugins/ckgedit/lang/es/merger.txt new file mode 100644 index 0000000..a06dcf0 --- /dev/null +++ b/lib/plugins/ckgedit/lang/es/merger.txt @@ -0,0 +1,4 @@ + - Esta versión de [[doku>plugin:ckgedit|ckgedit]] actualiza CKEditor de la 4.9 a la 4.10, lo que proporciona un javascript actualizado y mejorado. + - Con la actualización a 4.9, ckgedit se fusionó con [[doku>plugin:ckgdoku|ckgdoku]]. Ver las opciones de configuración de ckgdoku [[doku>plugin:ckgdoku#configuration|configuration options]]. + +Por favor, informe de cualquier problema a [[https://github.com/turnermm/ckgedit/issues|ckgedit's issues]] en github \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/es/scayt.txt b/lib/plugins/ckgedit/lang/es/scayt.txt new file mode 100644 index 0000000..de64463 --- /dev/null +++ b/lib/plugins/ckgedit/lang/es/scayt.txt @@ -0,0 +1 @@ +El corrector ortográfico Scayt ofrece tres opciones de configuración: encendido, apagado y desactivado. A partir de ahora, la configuración por defecto será **off** en lugar de **on**. Con **on** el contenido del editor es analizado por Scayt y enviado para el corrector ortográfico a un servidor Scayt. Aunque no hay razón para creer que esto sea un riesgo de seguridad, sin embargo este cambio se hace por consideración a los usuarios con wikis privados que pueden sentirse ansiosos de que sus datos sean enviados a un servidor remoto. Se puede encontrar más información en la página de Opciones de Configuración de la documentación de ckgedit en https://www.dokuwiki.org/plugin:ckgedit:configuration#scayt_lang. \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/es/settings.php b/lib/plugins/ckgedit/lang/es/settings.php new file mode 100644 index 0000000..3a7a7c8 --- /dev/null +++ b/lib/plugins/ckgedit/lang/es/settings.php @@ -0,0 +1,49 @@ + + * @author Olaf Reitmaier + */ +$lang['groups'] = 'Grupo al que se le permite deshabilitar el temporizador de bloqueos (obsoleto)'; +$lang['fck_preview'] = 'Previsualizar Grupo FCK'; +$lang['guest_toolbar'] = 'Mostrar Barra de Herramientas a los Invitados'; +$lang['guest_media'] = 'Pueden los Invitados Vincular Archivos Multimedia'; +$lang['open_upload'] = 'Pueden los Invitados Cargar'; +$lang['default_fb'] = 'Acceso de exploración de archivos Predeterminado. Con ninguno (none), las listas de control de acceso (acl) no aplican.'; +$lang['openfb'] = 'Abrir Explorador de Archivos. Otorga al usuario acceso a la estructura completa de directorios, sin importar si tiene o no permisos. Las listas de control de '; +$lang['dw_edit_display'] = 'Controla cuáles usuarios tienen acceso al botón "Editor DW". Opciones "all" para todos los usuarios; "admin" para admin y administradores solamente; "none" para ninguno. Por defecto en "all".'; +$lang['smiley_as_text'] = 'Mostrar emoticones como texto en el Editor CK (se mostrarán como imágenes en el navegador)'; +$lang['editor_bak'] = 'Guardar respaldo en meta/<namespace>.ckgedit'; +$lang['create_folder'] = 'Habilitar botón de creación de carpetas en explorador de archivos (y/n)'; +$lang['dwedit_ns'] = 'Lista separada de espacios de nombres y páginas donde ckgedit automáticamente cambie hacia el Editor nativo de DokuWiki; aceptar coincidencias parciales.'; +$lang['acl_del'] = 'Predeterminado (no chequeado) permite a los usuarios con permite de borrar archivos '; +$lang['auth_ci'] = 'El nombre de usuario (login id) es sensible a mayúsculas/minúsculas, es decir, usted puede iniciar sesión con ambos USUARIO y usuario'; +$lang['nix_style'] = 'Para servidores Windows (Vista y posteriores). Este parámetro hace posible acceder data\media a través de ckgedit\CKeditor\userfiles, si los enlaces a media y file han sido creados en userfiles'; +$lang['no_symlinks'] = 'Deshabiltiar la creación automática de enlaces simbólicos en ckgedit/userfiles.'; +$lang['direction'] = 'Define la dirección del lenguaje en el editor CK: nocheck: ckgedit no hará cambios en el sentido por defecto; dokuwiki: la dirección actual del lenguaje en Dokuwiki; ltr: Izquierda-a-derecha ; rtl: Derecha-a-izquierda.'; +$lang['scayt_auto'] = 'Automáticamente habilitar el corrector ortográfico SCAYT. Por defecto es "on". Para deshabilitarlo seleccione "off".'; +$lang['scayt_lang'] = 'Definir el lenguaje por defecto de SCAYT'; +$lang['smiley_hack'] = 'Reiniciar la URL de los emoticones del editor CK cuando se está moviendo a un nuevo servidor. Esto se hace página por página cuando se carga para editarla y se guarda. Esta opción debería normalmente estar apagada.'; +$lang['complex_tables'] = 'Usar el algoritmo de tablas complejas. Opuesto al estándar de interpretación de tablas, este debería dar mejores resultados cuando se mezclan arreglos complejos de rowspan y colspans. Per ligeramente con mayor tiempo de procesamiento.'; +$lang['duplicate_notes'] = 'Defina esto en true si los usuarios crean múltiples notas al pie con el mismo texto; requerido para prevenir que las notas al pie se corrompan.'; +$lang['winstyle'] = 'Utilizar la ruta directa al directorio media en lugar de fckeditor/userfiles. Esta función copia
fckeditor/userfiles/.htaccess.security a data/media/.htaccess; si no, esto debe hacerse de forma manual.'; +$lang['other_lang'] = 'Por defecto, el idioma predeterminado del editor CK es el idioma del navegador. Sin embargo, usted puede seleccionar otro idioma aquí, esto es independiente del lenguaje de la interfaz de Dokuwiki'; +$lang['dw_priority'] = 'Hacer Dokuwiki el editor predeterminado: no funciona en farms'; +$lang['preload_ckeditorjs'] = 'Precargar el javascript del editor CK para acelerar las subsecuentes cargas del editor'; +$lang['nofont_styling'] = 'Mostrar los estilos de fuentes en el editor como etiquetas. Véa la página del plugin ckgedit en Dokuwiki.org para más detalles.'; +$lang['font_options'] = 'Deshabilitar las opciones de fuentes.'; +$lang['color_options'] = 'Deshabilitar las opciones de Color.'; +$lang['alt_toolbar'] = 'Funciones a ocultar en la barra de herramientas del Editor CK.

Cualquier función puede ser ocultada incluyéndola como en una lista separada por comas:

Bold, Italic, Underline, Strike, Subscript, Superscript, RemoveFormat, Find, Replace, SelectAll, Scayt, Image, Table, Tags, Link, Unlink, Format, Styles,TextColor, BGColor, NumberedList, BulletedList, Cut, Copy, Paste, PasteText, PasteFromWord, Undo, Redo, Source, Maximize, About.'; +$lang['mfiles'] = 'Habilita el soporte mfile'; +$lang['extra_plugins'] = 'Listado separado por comas de plugins adicionales del editor CK que serán añadidos a la barra de herramientas. Véa los plugins de ckgedit config page para más detalles.'; +$lang['dw_users'] = 'Nombre del grupo de usuarios para quienes el editor por defecto es el editor de Dokuwiki cuando dw_priority está seleccionado. Si no está definido, entonces todos los usuarios usan el editor nativo de Dokuwiki cuando dw_priority esté seleccionado.'; +$lang['allow_ckg_filebrowser'] = 'Seleccione los navegadores de archivos/medios que pueden utilizar los usuarios '; +$lang['default_ckg_filebrowser'] = 'Seleccione qué navegador de archivos/medios es el predeterminado. Esto se anulará si el navegador seleccionado no está permitido '; +$lang['captcha_auth'] = 'Nivel de ACL en el que el captcha se apaga cuando la opción parausuarios del plugin del captcha se ajusta a true. El valor por defecto es ACL_CREATE, lo que significa que cualquier usuario con ACL_EDIT o menos obtendrá el captcha, ACL_CREATE o más alto no lo hará. '; +$lang['htmlblock_ok'] = 'Cuando se usa HTML_BLOCKs esta configuración o la opción htmlok de Dokuwiki debe estar activada. No supone el mismo nivel de riesgo de seguridad que htmlok. Sin embargo, debe ser usado sólo en un entorno de usuario de confianza, y no en un wiki abierto. '; +$lang['dblclk'] = 'Configurar off para desactivar la característica de doble clic que permite la edición de secciones usando el editor de Dokuwiki (ver: direct_access_to_dokuwiki_editor) '; +$lang['preserve_enc'] = 'Preservar la codificación de url en las urls cuando la opción de desactivación de dokuwiki está activa.'; +$lang['gui'] = 'Seleccionar CKEditor GUI.'; +$lang['rel_links'] = 'Activar el soporte para los enlaces internos y de imagen relativos'; diff --git a/lib/plugins/ckgedit/lang/fa/lang.php b/lib/plugins/ckgedit/lang/fa/lang.php new file mode 100644 index 0000000..38dfd44 --- /dev/null +++ b/lib/plugins/ckgedit/lang/fa/lang.php @@ -0,0 +1,74 @@ + + */ +$lang['btn_dw_edit'] = 'ویرایش دوکوویکی'; +$lang['dw_btn_fck_preview'] = 'پیش‌نمایش CKG'; +$lang['dw_btn_lang'] = 'زبان'; +$lang['title_dw_delete'] = 'حذف صفحه'; +$lang['title_dw_edit'] = 'ذخیره کار، خروج، و انتقال به ویرایشگر اصلی دوکوویکی'; +$lang['dw_btn_revert'] = 'برگشت'; +$lang['title_dw_revert'] = 'برگشت به بکاپ قبلی'; +$lang['title_dw_lang'] = 'انتخاب زبان برای بررسی هِجی'; +$lang['title_dw_cancel'] = 'خروج از ویرایشگر'; +$lang['btn_fck_edit'] = 'ویرایش CKG'; +$lang['confirm_delete'] = 'آیا مطمئنید می‌خواهید این صفحه را حذف کنید؟'; +$lang['confirm_preview'] = 'هر کار که ذخیره نشده باشد از دست خواهد رفت.'; +$lang['editor_height'] = 'ارتفاع ویرایشگر'; +$lang['editor_height_title'] = 'اندازه ویرایشگر هنگام بارگذاری مجدد بِروز خواهد شد'; +$lang['dw_btn_backup'] = 'بکاپ'; +$lang['title_dw_backup'] = 'بکاپ‌گرفتن از پنجره ویرایشگر و تجدید قفل'; +$lang['backup_empty'] = 'حافظه بکاپ ظاهراً خالی است. آیا می‌خواهید ادامه دهید؟'; +$lang['btn_draft'] = 'دریافت پیش‌نویس'; +$lang['title_draft'] = 'دیدن، نمایش، ویرایش پیش‌نویس'; +$lang['btn_exit_draft'] = 'خروج از پیش‌نویس'; +$lang['title_exit_draft'] = 'بازگشت به سند فعلی'; +$lang['draft_msg'] = 'این سند یک فایل پیش‌نویس دارد. دکمه پیش‌نویس بین این سند و پیش‌نویس جابجا می‌کند. شما می‌توانید هر یک از این دو را ویرایش یا ذخیره کنید.'; +$lang['whats_this'] = 'این چیست؟'; +$lang['complex_tables'] = 'فعالسازی امکان جداول پیچیده'; +$lang['minor_changes'] = 'تغییرات جزئی'; +$lang['discard_edits'] = 'برای ذخیره ویرایش‌هایتان روی بلی کلیک کنید؛ برای حذف روی لغو کلیک کنید'; +$lang['dw_btn_styling'] = 'ویرایش فونت‌ها'; +$lang['title_styling'] = 'گشودن با نوع فونتهای نشان‌داده‌شده به عنوان مارکاپ'; +$lang['js']['font_err_1'] = 'نوه فونت نمی‌تواند در این پیوندها مشمول شود. برای پذیرفتن تصحیح زیر روی بلی کلیک کنید:'; +$lang['js']['font_err_2'] = 'جهت تجدیدنظر، مارکاپ کامل پیوند دوکوویکی را شامل براکت‌ها در پایین وارد کنید. +برای بازگشت به ویرایشگر روی لغو کلیک کنید'; +$lang['js']['font_err_throw'] = 'خطای فرمت‌دهی فونت'; +$lang['js']['dwp_save_err'] = 'عدم امکان ذخیره تغییرات در:'; +$lang['js']['dwp_updated'] = 'اولویت ویرایشگر بِروزسازی شد به:'; +$lang['js']['dwp_not_sel'] = 'اولویت ویرایشگر انتخاب نشد: این توسط تنظیمات config گروه dw_users تعیین می‌شود'; +$lang['js']['mediamgr_notice'] = 'از دیالوگ پیوند برای واردکردن استفاده کنید'; +$lang['js']['font_conflict'] = 'Parser دچار یک یا تعداد بیشتر مشکلات فونتِ پیوند شد. با کلیک روی بلی شما می‌توانید به ویرایشگر برگردید و نوعهای فونت را بردارید.برای اطلاعات بیشتر نگاه کنید به: https://www.dokuwiki.org/plugin:ckgedit:font_styling#conflicts_with_dokuwiki_links'; +$lang['js']['ckg_paste_restart'] = 'هنگام بارگذاری مجدد ویرایشگر، پشتیبانی اضافی paste به این صورت در می‌آید:'; +$lang['js']['on'] = 'روشن'; +$lang['js']['off'] = 'خاموش'; +$lang['js']['broken_image_1'] = 'از پلاگین ImagePaste به همراه مدیریت رسانه‌ای دوکوویکی استفاده شود یا ابزار paste نرم‌افزار MS Word امتحان شود.'; +$lang['js']['broken_image_2'] = 'Ctrl-v کردن تصاویر به همراه داده‌های خام با حجم بیش از ۲.۵ مگابایت می‌تواند هنگ کند. این تصویر عبارتست از:'; +$lang['mediamgr_imgonly'] = 'از دیالوگ تصاویر فقط برای تصواویر استفاده شود، برای سایر رسانه‌ها از دیالوگ پیوند. این فایل عبارتست از:'; +$lang['uprofile_title'] = 'ویرایشگر پیش‌فرض خود را انتخاب کنید'; +$lang['btn_val_dw_fb'] = 'مرورگر فایل دوکوویکی'; +$lang['btn_val_ckg_fb'] = 'مرورگر فایل CKG'; +$lang['btn_title_dw_fb'] = 'ذخیره و بستن ویرایشگر و انتقالبه مرورگر فایل دوکوویکی'; +$lang['btn_title_ckg_fb'] = 'ذخیره و بستن ویرایشگر و انتقالبه مرورگر فایل CKG'; +$lang['formatdel'] = 'مارکاپ از سرتیترها برداشته شد: توسط دوکوویکی پشتیبانی نمی‌شود'; +$lang['fontdel'] = 'مارکاپ فونت از پیوندها برداشته شد: توسط دوکوویکی پشتیبانی نمی‌شود'; +$lang['ckgcke_conflict'] = 'یک رونوشت از ckgedit شناسایی شد. یا ckgedit یا ckgedit باید غیرفعال شوند.'; +$lang['ws_cantcopy'] = 'برای نصب ویندوزمانند: نمی‌توان رونوشت کرد به:'; +$lang['ws_copiedhtaccess'] = 'برای نصب ویندوزمانند، فایل.htaccess فعال‌شده از نظر امنیت به data/media کپی شد. +نگاه کنید به ckgedit/fckeditor/userfiles/.htacess.security'; +$lang['userfiles_perm'] = 'لطفا اجازه‌های دسترسی را بررسی کنید؛ ckgedit نمی‌تواند دسترسی یابد'; +$lang['sym_not created_1'] = 'عدم امکان ایجاد'; +$lang['sym_not created_2'] = 'نمی‌تواند پیوندهای نمادین برای مرورگر فایل ایجاد کند: نمی‌تواند دسترسی یابد:'; +$lang['sym_not created_3'] = 'رخ‌دادن خطایی هنگام تلاش برای ایجاد پیوندهای نمادین در:'; +$lang['syms_created'] = 'پیوندهای زیر در پوشه userfiles ایجاد شدند:'; +$lang['dblclk'] = 'ویژگیهای جدید: +روی پنجره مرورگر کلیک دوتایی کنید تا ویرایشگر دوکوویکی برای ویرایش بخشی در محل مکان‌نما باز شود. نگاه کنید: direct_access_to_dokuwiki_editor. '; +$lang['dblclk_reminder'] = 'یادآور '; +$lang['ckg_img_paste'] = 'پشتیبانی اضافی paste تصویر'; +$lang['ckg_img_paste_title'] = 'خاموش جهت پیشگیری از paste دوتایی، یا فعال‌کردن paste ها'; +$lang['on'] = 'روشن'; +$lang['off'] = 'خاموش'; +$lang['broken_image'] = 'از پلاگین ImagePaste به همراه مدیریت رسانه‌ای دوکوویکی استفاده شود یا ابزار Paste نرم‌افزار MS Word امتحان شود. داده‌های خام Ctrl-v تصاویر بزرگتر از ۲.۵ مگابایت می‌تواند هنگ کند. این تصویر عبارتست از:'; diff --git a/lib/plugins/ckgedit/lang/fa/merger.txt b/lib/plugins/ckgedit/lang/fa/merger.txt new file mode 100644 index 0000000..4de1538 --- /dev/null +++ b/lib/plugins/ckgedit/lang/fa/merger.txt @@ -0,0 +1,5 @@ +- این نسخه از [[doku>plugin:ckgedit|ckgedit]] پلاگین CKGEditor را از ۴.۹ به ۴.۱۰ ارتقا می‌دهد، که جاوااسکریپت بِروز و بهبودیافته‌ای می‌دهد. +- با ارتقا به ۴.۹، ckgedit با [[doku>plugin:ckgdoku|ckgdoku]] یکی شد. نگاه‌کنید به [[doku>plugin:ckgdoku#configuration|گزینه‌های پیکربندی]] ckgdoku. + +لطفاً هر مشکلی را به +[[https://github.com/turnermm/ckgedit/issues|مسائل ckgedit]] گزارش دهید. \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/fa/scayt.txt b/lib/plugins/ckgedit/lang/fa/scayt.txt new file mode 100644 index 0000000..12ef465 --- /dev/null +++ b/lib/plugins/ckgedit/lang/fa/scayt.txt @@ -0,0 +1,2 @@ +بررسی‌کننده هِجی Scayt سه گزینه پیکربندی ارائه می‌کند: روشن، خاموش، غیرفعال. تاکنون گزینه پیش‌فرض **خاموش** بوده نه **روشن**. با **روشن** محتویات ویرلیشگر توسط Scayt تجزیه‌ شده و برای بررسی هجی به یک سِرور Scayt ارسال می‌شود. اگر چه هیچ دلیلی برای این فکر که این یک ریسک امنیتی باشد وجود ندارد، با اینحال این تغییر برای کاربرانی با ویکی خصوصی که نگران ارسال داده‌هایشان به یک سِرور دوردست هستند انجام شد. +اطلاعات بیشتر می‌تواند در صفحه گزینه‌های پیکربندی مستندات ckgedit در نشانی زیر یافت شود: https://www.dokuwiki.org/plugin:ckgedit:configuration#scayt_lang. \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/fa/settings.php b/lib/plugins/ckgedit/lang/fa/settings.php new file mode 100644 index 0000000..25a52d8 --- /dev/null +++ b/lib/plugins/ckgedit/lang/fa/settings.php @@ -0,0 +1,32 @@ + + */ +$lang['groups'] = 'گروه اجازه دارد تایمر قفل را غیرفعال کند (منسوخ)'; +$lang['fck_preview'] = 'گروه پیش‌نمایش FCK'; +$lang['guest_toolbar'] = 'نمایش نوارابزار به میهمانان'; +$lang['guest_media'] = 'میهمان بتواند به فایلهای رسانه‌ای پیوند دهد'; +$lang['open_upload'] = 'میهمان بتواند بارگذاری کند'; +$lang['default_fb'] = 'دسترسی مرور فایل پیش‌فرض. با هیچکدام، acl اِعمال نمی‌شود.'; +$lang['openfb'] = 'مرور فایل آزاد. این به کاربر دسترسی به کل ساختار دایرکتوری را می‌دهد، فارغ از آنکه کاربر اجازه داشته باشد یا نه. ACL همچنان درخصوص بارگذاریها اِعمال می‌شود.'; +$lang['dw_edit_display'] = 'کنترل می‌کند کدام کاربران به دکمه "ویرایشگر دوکوویکی" دسترسی داشته باشند.گزینه‌ها: "همه" برای همه کاربران؛ "ادمین" تنها برای ادمین‌ و مدیران؛ "هیچکدام" برای هیچ کس. پیش‌فرض روی "همه".'; +$lang['smiley_as_text'] = 'لبخندک‌ها در CKeditor به صورت متن نشان داده شود (در مرورگر همچنان به صورت تصویر نشان داده می‌شود)'; +$lang['editor_bak'] = 'ذخیره بکاپ در meta/<namespace>.ckgedit'; +$lang['create_folder'] = 'فعالسازی دکمه ایجاد پوشه در مرورگر فایل (y/n)'; +$lang['dwedit_ns'] = 'لیست با کاما جدا شده فضاهای نام و/یا صفحه‌هایی که ckgedit به صورت خودکار به ویرایشگر اصلی دوکوویکی شیفت کند؛ مطابقت‌های بخشی را هم می‌پذیرد.'; +$lang['acl_del'] = 'حالت پیش‌فرض (جعبه بدون تیک) به کاربران دارای اجازه بارگذاری امکان می‌دهد فایلهای رسانه‌ای را حذف کنند؛ اگر جعبه تیک زده شود، جهت حذف از پوشه، کاربر نیاز به اجازه حذف خواهد داشت.'; +$lang['auth_ci'] = 'شناسه ورود کاربر ناحساس به کوچک و بزرگ بودن حروف است، یعنی شما می‌توانید هم به عنوان USER و هم user وارد شوید.'; +$lang['nix_style'] = 'برای سِرورهای ویندوز (ویستا و بعدتر). این تنظیم ممکن می‌کند توسط ckgedit\CKeditor\userfiles به data\media دسترسی یافت، اگر پیوندها به رسانه و فایل در فایلهای کاربر با موفقیت ایجاد شده باشند.'; +$lang['no_symlinks'] = 'غیرفعالسازی ایجاد پیوندهای نمادین در ckgedit/userfiles. این گزینه هنگام بِروزسازی باید غیرفعال شود.'; +$lang['direction'] = 'تعیین راستای نوشتاری زبان: nocheck: ckgedit تغییری در تنظیمات راستای زبان پیش‌فرض نمی‌دهد; dokuwiki: راستای زبانی فعلی دوکوویکی; ltr: چپ به راست ; rtl: راست به چپ.'; +$lang['scayt_auto'] = 'تعیین کنید آیا بررسی‌کننده‌هجی‌هنگام‌نوشتن Scayt در هنگام آغاز فعال باشد یا نه. پیش‌فرض off است؛ کاربر می‌توان برای هر صفحه آنرا فعالسازی مجدد کند. برای حذف کامل بررسی‌کننده‌هجی Scayt گزینه disable را انتخاب کنید (نگاه کنید به ckgedit:configuration#scayt_auto")'; +$lang['scayt_lang'] = 'تعیین زبان پیش‌فرض SCAYT'; +$lang['smiley_hack'] = 'بازتنظیم URL برای لبخندک‌های CKedit وقتی به سِرور جدید نقل می‌شود. این‌کار بر مبنای صفحه به صفحه انجام می‌شود وقتی صفحه برای ویرایش لود و ذخیره می‌گردد. این گزینه باید در حالت طبیعی خاموش باشد.'; +$lang['complex_tables'] = 'از الگوریتم جداول پیچیده استفاده شود. در برابر تجزیه استاندارد جداول، اینکار وقتی چیدمانهای پیچیده بازه سطرها و بازه ستونها ترکیب می‌شوند، نتایج بهتری می‌دهد، اما با زمان کمی بیشتر.'; +$lang['duplicate_notes'] = 'این را true قرار دهید اگر کاربران چندین زیرنویس با متن زیرنویس مشابه ایجاد می‌کنند؛ جهت جلوگیری از تخریب یادداشتها لازم است.'; +$lang['winstyle'] = 'از مسیر مستقیم به دایرکتوری رسانه استفاده شود بجای fckeditor/userfiles. این تابع
fckeditor/userfiles/.htaccess.security را به data/media/.htaccess کپی می‌کند؛ اگرنه اینکار باید به صورت دستی انجام شود.'; +$lang['other_lang'] = 'زبان پیش‌فرض شما برای CKEditor زبان تعیین شده برای مرورگرتان است.با اینحال می‌توانید اینجا زبان دیگری انتخاب کنید؛ این مستقل از زبان واسط دوکوویکی است.'; +$lang['dw_priority'] = 'ویرایشگر دوکوویکی را ویرایشگر پیش‌فرض قرار دهید: در مزرعه ویکی‌ها کار نمی‌کند.'; diff --git a/lib/plugins/ckgedit/lang/fr/lang.php b/lib/plugins/ckgedit/lang/fr/lang.php new file mode 100644 index 0000000..3002051 --- /dev/null +++ b/lib/plugins/ckgedit/lang/fr/lang.php @@ -0,0 +1,79 @@ + + * @author Hérisson grognon + * @author Schplurtz le Déboulonné + * @author salabdou + * @author TJ619 + * @author Laurent Marquet + * @author Blacklord049 + * @author Nicolas Friedli + */ +$lang['btn_dw_edit'] = 'Éditeur DW'; +$lang['dw_btn_fck_preview'] = 'Prévisualisation CKG'; +$lang['dw_btn_lang'] = 'Langue'; +$lang['title_dw_delete'] = 'Supprimer la page'; +$lang['title_dw_edit'] = 'Sauvegarder le travail, quitter et retourner sur l\'éditeur natif DokuWiki'; +$lang['dw_btn_revert'] = 'Restaurer la dernière sauvegarde'; +$lang['title_dw_revert'] = 'Revenir à la dernière sauvegarde'; +$lang['title_dw_lang'] = 'Sélectionner la langue pour la vérification orthographique'; +$lang['title_dw_cancel'] = 'Quitter l\'éditeur'; +$lang['btn_fck_edit'] = 'Éditeur CKG'; +$lang['confirm_delete'] = 'Êtes-vous sûr de vouloir supprimer cette page ?'; +$lang['confirm_preview'] = 'Tout travail non sauvegardé sera perdu.'; +$lang['editor_height'] = 'Hauteur de l\'éditeur : '; +$lang['editor_height_title'] = 'L\'éditeur se redimensionne au rechargement.'; +$lang['dw_btn_backup'] = 'Sauvegarde'; +$lang['title_dw_backup'] = 'Sauvegarde la fenêtre de l\'éditeur et renouvelle le verrou'; +$lang['backup_empty'] = 'Le tampon de sauvegarde est vide. Voulez-vous continuer ?'; +$lang['btn_draft'] = 'Obtenir le brouillon'; +$lang['title_draft'] = 'Voir, Afficher, Éditer le brouillon'; +$lang['btn_exit_draft'] = 'Quitter le brouillon'; +$lang['title_exit_draft'] = 'Retourner au document courant'; +$lang['draft_msg'] = 'Ce document a un brouillon. Le bouton Obtenir/Quitter le brouillon bascule entre ce document et le brouillon. Vous pouvez éditer et sauver l\'un ou l\'autre.'; +$lang['draft_msg'] = 'Ce document a un brouillon. Le bouton Obtenir/Quitter Brouillon bascule entre ce document et le brouillon. Vous pouvez éditer et sauver l\'un ou l\'autre.'; +$lang['whats_this'] = 'Qu\'est-ce que c\'est ?'; +$lang['complex_tables'] = 'Autoriser les tableaux complexes'; +$lang['minor_changes'] = 'Changements mineurs'; +$lang['discard_edits'] = 'Pour sauver vos modifcations, cliquez sur OK, sinon cliquez sur Annuler.'; +$lang['dw_btn_styling'] = 'Éditer la police d\'écriture'; +$lang['title_styling'] = 'Ouvrir avec les styles de police présentés comme balisage'; +$lang['js']['font_err_1'] = 'Les styles de police ne peuvent pas être inclus dans des liens. Cliquez sur OK pour accepter la correction suivante : '; +$lang['js']['font_err_2'] = 'Pour modifiez, saisissez ci-dessous la syntaxe complète de lien DokuWiki, en incluant les crochets. Pour retourner à l\'éditeur cliquez sur Annuler.'; +$lang['js']['font_err_throw'] = 'Erreur du formatage du texte'; +$lang['js']['dwp_save_err'] = 'Impossible de sauvegarder les changements de : '; +$lang['js']['dwp_updated'] = 'Priorité d\'éditeur mise à jour vers : '; +$lang['js']['dwp_not_sel'] = 'Priorité d\'éditeur non sélectionnée : cela sera déterminé par le paramètre "dw_users"'; +$lang['js']['mediamgr_notice'] = 'Ouvrir la boîte de dialogue des liens pour une insertion'; +$lang['js']['font_conflict'] = 'Le parseur a trouvé un ou plusieurs conflits. En cliquand sur OK, vous retournez à l\'éditeur pour y supprimer les styles de caratère. Pour plus d\'informations (en anglais): https://www.dokuwiki.org/plugin:ckgedit:font_styling#conflicts_with_dokuwiki_links'; +$lang['js']['ckg_paste_restart'] = 'Lors du rechargement de l\'éditeur, un article supplémentaire de support sera utilisé.'; +$lang['js']['on'] = 'Marche'; +$lang['js']['off'] = 'Arrêt'; +$lang['js']['broken_image_1'] = 'Utilisez le greffon imagePaste avec le gestionnaire de média de DokuWiki ou essayez l\'outil coller de MS Word (MS Word Paste Tool).'; +$lang['js']['broken_image_2'] = 'Coller des images de données brutes supérieures à 2,5M peut bloquer. Cette image fait :'; +$lang['mediamgr_imgonly'] = 'Envoyer des images en utilisant la boîte de dialogue spécifique:'; +$lang['uprofile_title'] = 'Sélectionnez votre éditeur par défaut'; +$lang['btn_val_dw_fb'] = 'Gestionnaire de fichiers DW'; +$lang['btn_val_ckg_fb'] = 'Gestionnaire de fichiers CKG'; +$lang['btn_title_dw_fb'] = 'Sauver, fermer l\'éditeur et passer au gestionnaire de fichiers DW'; +$lang['btn_title_ckg_fb'] = 'Sauver, fermer l\'éditeur et passer au gestionnaire de fichiers CKG'; +$lang['formatdel'] = 'Balisage supprimé des entêtes: indisponible dans DokuWiki'; +$lang['fontdel'] = 'Polices différentes supprimées des liens: indisponible dans DokuWiki'; +$lang['ckgcke_conflict'] = 'Une copie de ckgedit a été détectée. L\'un des Ckgedit et ckgedit doit être désactivé.'; +$lang['ws_cantcopy'] = 'Pour la configuration de Winstyle: impossible de copier vers'; +$lang['ws_copiedhtaccess'] = 'Pour l’installation de Winstyle, copiez le fichier .htaccess avec sécurité activée dans data/media +Voir ckgedit/fckeditor/userfiles/.htaccess.security'; +$lang['userfiles_perm'] = 'Veuillez vérifier les permissions; ckgedit ne peut accéder à'; +$lang['sym_not created_1'] = 'Impossible de créer'; +$lang['sym_not created_2'] = 'Ne peut créer de lien symbolique pour le gestionnaire de fichiers: Ne peut accéder à: '; +$lang['sym_not created_3'] = 'Il y a eu une erreur en essayant de créer des liens symboliques dans'; +$lang['syms_created'] = 'liens créés dans le dossier userfiles:'; +$lang['dblclk'] = 'Nouvelle fonctionnalité Un double clic dans le navigateur édite la section sous le curseur dans l\'éditeur DW. Voir, en anglais, direct_access_to_dokuwiki_editor.'; +$lang['dblclk_reminder'] = 'Rappel '; +$lang['ckg_img_paste'] = 'Activer la prise en charge supplémentaire du coller d\'image'; +$lang['ckg_img_paste_title'] = 'Arrêté pour prévenir les coller doubles, ou en marche pour activer les coller'; +$lang['on'] = 'Marche'; +$lang['off'] = 'Arrêt'; +$lang['broken_image'] = 'Utilisez le greffon imagePaste avec le gestionnaire de média de DokuWiki ou essayez l\'outil coller de MS Word (MS Word Paste Tool). Coller des images de données brutes supérieures à 2,5M peut bloquer. Cette image fait :'; diff --git a/lib/plugins/ckgedit/lang/fr/merger.txt b/lib/plugins/ckgedit/lang/fr/merger.txt new file mode 100644 index 0000000..124c7d7 --- /dev/null +++ b/lib/plugins/ckgedit/lang/fr/merger.txt @@ -0,0 +1,4 @@ +- Cette version de [[doku>plugin:ckgedit|ckgedit]] met à niveau CKEditor de la version 4.9 à 4.10, ce qui permet d'obtenir du javascript amélioré et mis à jour. +   - Avec la mise à niveau à 4.9, ckgedit a fusionné avec [[doku>plugin:ckgdoku|ckgdoku]]. Voir ckgdoku [[doku>plugin:ckgdoku#configuration|configuration option]]. + +Veuillez signaler tout problème à [[https://github.com/turnermm/ckgedit/issues|ckgedit]] sur github. \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/fr/scayt.txt b/lib/plugins/ckgedit/lang/fr/scayt.txt new file mode 100644 index 0000000..2b03b16 --- /dev/null +++ b/lib/plugins/ckgedit/lang/fr/scayt.txt @@ -0,0 +1,3 @@ +Le correcteur orthographique Scayt offre trois options de configuration : arrêté, en marche, désactivé. Pour l'instant, le réglage par défaut sera **arrêté** au lieu de **en marche**. Avec **en marche", le contenu de l'éditeur est analysé par Scayt et envoyé à un serveur Scayt pour vérification orthographique. Bien qu'il n'y ait aucune raison de penser qu'il s'agisse d'un risque de sécurité, ce changement est réalisé en considération du fait que des utilisateurs de wiki privé pourraient se sentir mal à l'aise de voir leur données envoyées à un serveur distant. De plus amples informormation sont disponibles sur la page de documenation de ckgedit consacrée aux options de configuration située à https://www.dokuwiki.org/plugin:ckgedit:configuration#scayt_lang. + + \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/fr/settings.php b/lib/plugins/ckgedit/lang/fr/settings.php new file mode 100644 index 0000000..5bbb8cb --- /dev/null +++ b/lib/plugins/ckgedit/lang/fr/settings.php @@ -0,0 +1,52 @@ + + * @author TJ619 + * @author Laurent Marquet + * @author Blacklord049 + * @author Schplurtz le Déboulonné + */ +$lang['groups'] = 'Groupe autorisé à désativer le verrou minuté (obsolète)'; +$lang['fck_preview'] = 'Groupe de prévisualisation FCK'; +$lang['guest_toolbar'] = 'Afficher la barre d\'outil pour les invités'; +$lang['guest_media'] = 'Les invités peuvent faire des liens sur les fichiers medias'; +$lang['open_upload'] = 'Les invités peuvent uploader'; +$lang['default_fb'] = 'Accès à la navigation des fichiers par défaut. Avec none, ACL ne s\'applique pas.'; +$lang['openfb'] = 'Ouvre la navigation des fichiers. Cela donne accès à l\'utilisateur à toute la structure de répertoires, qu\'il/elle ait les permissions ou pas. ACL s\'applique toujours pour l\'upload.'; +$lang['dw_edit_display'] = 'Contrôle quels utilisateurs ont accès au bouton "Éditeur DW". Choix: "all" pour tous les utilisateurs; "admin" pour les admin et gestionnaires seulement; "none" pour personne. "all" par défaut.'; +$lang['smiley_as_text'] = 'Affiche les émoticones comme du texte dans CKeditor (sera toujours affiché comme une image dans le navigateur)'; +$lang['editor_bak'] = 'Sauve le backup sur meta/<namespace>.ckgedit'; +$lang['create_folder'] = 'Activer le bouton de création de dossier dans le navigateur de fichier (o/n)'; +$lang['dwedit_ns'] = 'Liste des namespaces, séparés par des virgules, et/ou des pages où ckgedit bascule automatiquement sur l\'éditeur natif de DW; Accepte les correspondances partielles.'; +$lang['acl_del'] = 'Par défault (case non cochée) autorise les utilisateurs avec "upload permission" à supprimer les fichiers de media; Si la case est cochée, alors l\'utilisateur doit avoir la permission "delete" pour supprimer dans le répertoire.'; +$lang['auth_ci'] = 'L\'identifiant de l\'utilisateur est non-sensible à la casse, ce qui fait que l\'on peut s\'identifier avec UTILISATEUR et utilisateur'; +$lang['nix_style'] = 'Pour les serveurs Windows Servers (Vista et suivants). Ce paramètre rend possible l\'accès à "data\media" à travers "ckgedit\CKeditor\userfiles", si les liens aux medias et fichiers ont été créés avec succès dans "userfiles"'; +$lang['no_symlinks'] = 'Désactive la création automatique des liens symboliques dans ckgedit/userfiles'; +$lang['direction'] = 'Définit la direction de langue dans CKeditor: nocheck: ckgedit ne fera aucun changement au paramètre de direction par défaut; dokuwiki: le paramètre courant de Dokuwiki de direction de langue; ltr: Gauche-à-droite; rtl: Droite-à-gauche.'; +$lang['scayt_auto'] = 'Active automatiquement le vérificateur d\'orthographe SCAYT. Par défaut sur "on". Pour le désactiver, sélectionner "off"'; +$lang['scayt_lang'] = 'Définir le langage par défaut de SCAYT'; +$lang['smiley_hack'] = 'Mettre à zéro l\'URL pour les émoticones CKeditor\'s lors d\'un changement de serveur. C\'est fait, page par page, quand la page est chargée pour édition et sauveagrdée. Cette option devrait normalement être sur "off".'; +$lang['complex_tables'] = 'Utiliser l\'algorithme des tableaux complexes. À l\'opposé de la gestion standard des tableaux, cela donnera un meilleur résultat lors d\'arrangements complexes de "rowspans" et "colspans", mais cela demande beaucoup plus de temps de traitement.'; +$lang['duplicate_notes'] = 'Choisir "true" si les utilisateurs créent de multiples notes de bas de page avec le même texte; Requis pour éviter la corruption des notes.'; +$lang['winstyle'] = 'Utiliser le chemin direct au répertoire des medias à la place de "fckeditor/userfiles". Cela requiert de copier le fichier "fckeditor/userfiles/.htaccess.security" dans "data/media" et de le renommer ".htaccess".'; +$lang['other_lang'] = 'Votre langue par défaut pour CKEditor est la langue par défaut du navigateur. Vous pouvez, cependant, choisir une autre langue ici; C\'est indépendant de la langue d\'interface de Dokuwiki.'; +$lang['dw_priority'] = 'Définir l\'éditeur DokuWiki comme éditeur par défaut'; +$lang['preload_ckeditorjs'] = 'Pré-charger le fichier javascript de CKeditor pour accélérer le chargement ultérieur de l\'éditeur'; +$lang['nofont_styling'] = 'Affiche les styles de police dans l\'éditeur comme "plugin markup". Voir la page de plugin de CKGedit plugin sur Dokuwiki.org pour les détails.'; +$lang['font_options'] = 'Retire les options de police d\'écriture'; +$lang['color_options'] = 'Retire les options de colorations'; +$lang['alt_toolbar'] = 'Fonctions à retirer de la barre d\'outils CKEditor'; +$lang['mfiles'] = 'Activer la gestion des \'mfiles\''; +$lang['extra_plugins'] = 'Liste des extensions (séparées par des virgules) à ajouter dans la barre d\'outils de CKEditor. Voir la page à propos des plugins CKGEdit pour plus de détails.'; +$lang['dw_users'] = 'Nom du groupe d\'utilisateurs pour lesquels l\'éditeur par défaut est celui de DokuWiki quand dw_priority est sélectionné. Si non défini, tous les utilisateurs utiliseront l\'éditeur natif lorsque dw_priority est coché.'; +$lang['allow_ckg_filebrowser'] = 'Sélectionnez le ou les navigateurs de fichiers/médias que les utilisateurs peuvent utiliser'; +$lang['default_ckg_filebrowser'] = 'Sélectionnez quel navigateur de fichier/média est le navigateur par défaut. Ceci sera annulé si le navigateur sélectionné n\'est pas autorisé'; +$lang['captcha_auth'] = 'Niveau d\'ACL à partir duquel le captcha est désactivé lorsque l\'option forusers du greffon captcha est activée. Le défaut est ACL_CREATE, ce qui signifie que les utilisateurs n\'ayant que ACL_EDIT ou moins auront le captcha, et ceux qui ont ACL_CREATE ou plus ne l\'auront pas.'; +$lang['htmlblock_ok'] = 'Lors de l\'utilisation de HTML_BLOCK, il faut activer soit ce réglage, soit htmlok de DokuWiki.Cette option ci ne pose pas les mêmes risques de sécurité que htmlok. Néanmoins, il ne faudrait l\'utiliser que dans un environnement de confiance et pas dans un wiki ouvert.'; +$lang['dblclk'] = 'Réglez sur off pour désactiver la fonctionnalité d\'édition sur double clic dans l\'éditeur DokuWiki (voir direct_access_to_dokuwiki_editor, en anglais).'; +$lang['preserve_enc'] = 'Conservez le codage d’URL dans les URL lorsque l’option dokuwiki deaccent est active.'; +$lang['gui'] = 'Sélectionnez CKEditor GUI.'; +$lang['rel_links'] = 'Activer la prise en charge des liens relatifs internes et d\'image.'; diff --git a/lib/plugins/ckgedit/lang/hr/lang.php b/lib/plugins/ckgedit/lang/hr/lang.php new file mode 100644 index 0000000..1f7d4d6 --- /dev/null +++ b/lib/plugins/ckgedit/lang/hr/lang.php @@ -0,0 +1,71 @@ + + */ +$lang['btn_dw_edit'] = 'DW uređivač'; +$lang['dw_btn_fck_preview'] = 'CKG pretpregled'; +$lang['dw_btn_lang'] = 'Jezik'; +$lang['title_dw_delete'] = 'Obriši stranicu'; +$lang['title_dw_edit'] = 'Snimi napravljeno, izađi i prebaci na klasičan DokuWiki uređivač.'; +$lang['dw_btn_revert'] = 'Povrati'; +$lang['title_dw_revert'] = 'Povrati na prethodnu pohranu'; +$lang['title_dw_lang'] = 'Odaberi jezik za provjeru pravopisa'; +$lang['title_dw_cancel'] = 'Napusti uređivač'; +$lang['btn_fck_edit'] = 'CKG uređivač'; +$lang['confirm_delete'] = 'Jeste li sigurni da želite obrisati ovu stranicu?'; +$lang['confirm_preview'] = 'Svaka nesnimljena izmjena biti će izgubljena.'; +$lang['editor_height'] = 'Visina okna uređivača'; +$lang['editor_height_title'] = 'Izmjeni veličinu okna uređivača pri ponovnom učitavanju'; +$lang['dw_btn_backup'] = 'Pohrani'; +$lang['title_dw_backup'] = 'Pohrani sadržaj prozora uređivača i obnovi zaključavanje'; +$lang['backup_empty'] = 'Spremnik pohrane izgleda da je prazan. Da li želite nastaviti?'; +$lang['btn_draft'] = 'Preuzmi nacrt'; +$lang['title_draft'] = 'Vidi, prikaži, uredi nacrt'; +$lang['btn_exit_draft'] = 'Napusti nacrt'; +$lang['title_exit_draft'] = 'Povratak na trenutni dokument'; +$lang['draft_msg'] = 'Ovaj dokument ima pohranjen nacrt. Gumb nacrta prebacuje između ovog dokumenta i nacrta. Možete snimiti bilo koji od ta dva.'; +$lang['whats_this'] = 'što je ovo?'; +$lang['complex_tables'] = 'Omogući kompleksne tabele'; +$lang['minor_changes'] = 'Manje promjene'; +$lang['discard_edits'] = 'Pritisnite OK da snimite promjene ili Prekini da ih odbacite'; +$lang['dw_btn_styling'] = 'Uredi znakovlje'; +$lang['title_styling'] = 'Otvori sa stilovima znakovlja prikazanih kao oznake'; +$lang['js']['font_err_1'] = 'Stilovi fontova ne mogu biti uključeni u poveznice. Pritisnite OK da prihvatite slijedeće ispravke:'; +$lang['js']['font_err_2'] = 'Za izmjenu unesite punu Dokuwiki poveznicu, uključivši zagrade. Za povratak u uređivač pritisnite Cancel'; +$lang['js']['font_err_throw'] = 'Greška pri uređivanju fonta'; +$lang['js']['dwp_save_err'] = 'Ne mogu snimiti promjene u:'; +$lang['js']['dwp_updated'] = 'Prioritet uređivača promijenjen u:'; +$lang['js']['dwp_not_sel'] = 'Prioritet uređivača nije odabran: biti će određen pomoću dw_users grupne konfiguracijske postavke'; +$lang['js']['mediamgr_notice'] = 'Koristi odabir poveznica za ubacivanje'; +$lang['js']['font_conflict'] = 'Analizator je otkrio jedan ili više font-poveznica konflikata. Pritiskom na OK možete se vratiti na uređivanje i ukloniti stilove fontova. Za više informacija pogledajte: https://www.dokuwiki.org/plugin:ckgedit:font_styling#conflicts_with_dokuwiki_links'; +$lang['js']['ckg_paste_restart'] = 'Kod ponovnog učitavanja uređivača, dodatna podrška za lijepljenje biti će'; +$lang['js']['on'] = 'uključena'; +$lang['js']['off'] = 'isključena'; +$lang['js']['broken_image_1'] = 'Koristi imagePaste dodatak sa Dokuwiki upraviteljem medija ili probajte sa MS Word Paste Tool.'; +$lang['js']['broken_image_2'] = 'Ctrl-v slike sa neobrađenom veličinom preko 2,5M može zaglaviti. Ova slika je:'; +$lang['mediamgr_imgonly'] = 'Učitaj samo slike kada se koristi urednik slika:'; +$lang['uprofile_title'] = 'Odaberite svoj podrazumijevani uređivač'; +$lang['btn_val_dw_fb'] = 'DW uređivač datoteka'; +$lang['btn_val_ckg_fb'] = 'CKG uređivač datoteka'; +$lang['btn_title_dw_fb'] = 'Snimi i zatvori uređivač i prebaci na DW uređivač datoteka'; +$lang['btn_title_ckg_fb'] = 'Snimi i zatvori uređivač i prebaci na CKG uređivač datoteka'; +$lang['formatdel'] = 'Oznake uklonjene iz zaglavlja: nisu podržane u Dokuwiki-u'; +$lang['fontdel'] = 'Oznake fontova uklonjene iz poveznica: nisu podržane u Dokuwiki-u'; +$lang['ws_cantcopy'] = 'Za Win tip postavki:ne mogu kopirati u'; +$lang['ws_copiedhtaccess'] = 'Za Win tip postavki, kopirana sigurnosno omogućena .htaaccess u data/media. +Vidi ckgedit/fckeditor/userfiles/.htacess sigurnost'; +$lang['userfiles_perm'] = 'Molim provjerite dozvole: ckgedit ne može pristupiti'; +$lang['sym_not created_1'] = 'Ne mogu kreirati'; +$lang['sym_not created_2'] = 'Ne mogu kreirati simboličku poveznicu za urednik datoteka: ne mogu pristupiti'; +$lang['sym_not created_3'] = 'Dogodila se greška pri pokušaju kreiranja simboličke poveznice u'; +$lang['syms_created'] = 'Slijedeće poveznice su kreirane u userfiles mapi:'; +$lang['dblclk'] = 'Nova mogućnost: dvoklik na prozor browsera za ortvaranje DW Urednika za uređivanje odjeljka ispod pokazivača. Vidi: direct_access_to_dokuwiki_editor.'; +$lang['dblclk_reminder'] = 'Podsjetnik'; +$lang['ckg_img_paste'] = 'Uključi dodatnu podršku za lijepljenje slika'; +$lang['ckg_img_paste_title'] = 'Isključi za prevenciju dvostrukog lijepljenja, ili uključi za omogućavanje lijepljenja'; +$lang['on'] = 'uključi'; +$lang['off'] = 'isključi'; +$lang['broken_image'] = 'Koristi imagePaste dodatak sa Dokuwiki upraviteljem medija ili probajte sa MS Word Paste Tool. SIrova veličina Ctrl-v slike veća od 2,5M može zaglaviti. Ova slika je:'; diff --git a/lib/plugins/ckgedit/lang/hr/merger.txt b/lib/plugins/ckgedit/lang/hr/merger.txt new file mode 100644 index 0000000..f64770b --- /dev/null +++ b/lib/plugins/ckgedit/lang/hr/merger.txt @@ -0,0 +1,2 @@ + - Ova verzija [[doku>plugin:ckgedit|ckgedit]] nadograđuje CKEditor sa 4.9 na 4.10, što donosi aktualni i poboljšani javascript. + - S nadogradnjom na 4.9, ckgedit je spojen sa [[doku>plugin:ckgdoku|ckgdoku]]. Vidi ckgdoku [[doku>plugin:ckgdoku#configuration|opcije postavki]]. Molimo dojavite bilo kakav problem na [[https://github.com/turnermm/ckgedit/issues|ckgedit problemi]] na github-u. \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/hr/scayt.txt b/lib/plugins/ckgedit/lang/hr/scayt.txt new file mode 100644 index 0000000..c2dc2ea --- /dev/null +++ b/lib/plugins/ckgedit/lang/hr/scayt.txt @@ -0,0 +1,3 @@ +Scayt provjera pravopisa nudi tri podešavanja: uključeno, isključeno, onemogućeno. Od sada podrazumijevana postavka će biti **isključeno** umjesto **uključeno**. Sa **uključeno** sadržaj se obrađuje od strane Scayt i šalje se na provjeru pravopisa na Scayt server. Iako nema razloga vjerovati da je to sigurnosni rizik, ova promjena je učinjena radi korisnika sa privatnim Wiki-jima koji se mogu osjećati ugroženo sa slanjem njihovih podataka na vanjski server. Više informacija možete naći u opcijama Postavki ckedit dokumentacije na https://www.dokuwiki.org/plugin:ckgedit:configuration#scayt_lang. + + \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/hr/settings.php b/lib/plugins/ckgedit/lang/hr/settings.php new file mode 100644 index 0000000..5c6fd5f --- /dev/null +++ b/lib/plugins/ckgedit/lang/hr/settings.php @@ -0,0 +1,48 @@ + + */ +$lang['groups'] = 'Grupa koja može onemogućiti vrijeme zaključavanja (zastarjelo)'; +$lang['fck_preview'] = 'FCK grupa za pretpregled'; +$lang['guest_toolbar'] = 'Prikaži alatnu traku i gostima'; +$lang['guest_media'] = 'Gosti mogu se povezati na medijske datoteke'; +$lang['open_upload'] = 'Gosti mogu učitati'; +$lang['default_fb'] = 'Podrazumijevani pristup datotekama. Ako je ništa, ACL se ne primjenjuje.'; +$lang['openfb'] = 'Otvori pregled datoteka. Ovo omogućava korisnicima pristup cijeloj strukturi mapa, bez obzira na ovlaštenja. Ali ACL se ipak primjenjuje kod učitavanja.'; +$lang['dw_edit_display'] = 'Kontrolira tko ima pristup "DW uređivač" gumbu. Odabiri su: "all" za sve korisnike; "admin" samo za administratore i upravitelje; "none" za nikoga. Inicijalno je "all".'; +$lang['smiley_as_text'] = 'Prikazuj smješkiće kao tekst u CK uređivaču (u pregledniku će i dalje biti prikazani kao slike)'; +$lang['editor_bak'] = 'Snimi sigurnosnu kopiju u meta/<namespace>.ckgedit'; +$lang['create_folder'] = 'Omogući gumb za kreiranje mapa u pregledniku datoteka (y/n)'; +$lang['dwedit_ns'] = 'Zarezom odvojena lista imenskih prostora i/ili stranica gdje se isključivo koristi klasičan DokuWiki uređivač; prihvaća djelomična poklapanja'; +$lang['acl_del'] = 'Inicijalna postavka (neoznačeno) omogućava korisnicima s ovlastima učitavanja da brišu medijske datoteke; ako je označeno tada korisnik treba imati ovlasti brisanja da može brisati u mapi.'; +$lang['auth_ci'] = 'Korisnička prijava je neosjetljiva na mala/VELIKA slova, što znači je svejedno da li se prijavite kao KORISNIK i korisnik'; +$lang['nix_style'] = 'Za Windows poslužitelje (Vista i noviji). Ova postavka omogućava pristup data\media kroz ckgedit\CKeditor\userfiles, ako su uspješno napravljene poveznice prema media i file mapama u mapi userfiles.'; +$lang['no_symlinks'] = 'Onemogući automatsko kreiranje simboličkih veza u ckgedit/userfiles.'; +$lang['direction'] = 'Postavi smjer pisanja u CK uređivaču: nocheck: koristiti će se podrazumijevani smjer pisanja; dokuwiki: prema postavki jezika u Dokuwiki-u; ltr: S lijeva na desno; rtl: S desna na lijevo.'; +$lang['scayt_auto'] = 'Automatski omogući SCAYT provjeru pravopisa. Inicijalno je "on" odnosno uključeno. Odaberite "off" da ga isključite'; +$lang['scayt_lang'] = 'Postavite SCAYT jezik'; +$lang['smiley_hack'] = 'Resetirati URL adrese za smješke u CK uređivaču pri micanju na novi server. To se izvodi za svaku stranicu pri svakom njenom učitavanju i snimanju. Normalno ova opcija treba biti isključena.'; +$lang['complex_tables'] = 'Koristi algoritam za kompleksne tabele. Suprotno standardnoj obradi tabela, ovo treba dati bolje rezultate kada se koriste kompleksni oblici spojenih redova i kolona. Međutim zahtjeva više vremena za obradu.'; +$lang['duplicate_notes'] = 'Postavi na "true" ako korisnici kreiraju više fusnota s istim tekstom; obavezno kako bi se izbjegla oštećenja fusnota. '; +$lang['winstyle'] = 'Koristi direktne staze do medijskih datoteka umjesto kroz fckeditor/userfiles. Ovo zahtjeva da fckeditor/userfiles/.htaccess.security bude kopiran u data/media i preimenovan u .htaccess'; +$lang['other_lang'] = 'Vaš inicijalni jezik za CK uređivač je jezik postavljen u vašem pregledniku. Međutim vi možete ovdje odabrati drugi jezik; to je neovisno o jeziku postavljenom u Dokuwiki-u.'; +$lang['dw_priority'] = 'Postavi klasičan dokuwiki uređivač kao podrazumijevani'; +$lang['preload_ckeditorjs'] = 'Odmah učitati java skript kod CK uređivača da se ubrzaju naknadna učitavanja uređivača'; +$lang['nofont_styling'] = 'Prikaži stilove znakovlja u uređivaču kao oznake dodataka. Pogledajte detalje o ckgedit dodatku na Dokuwiki.org.'; +$lang['font_options'] = 'Ukloni opcije znakovlja.'; +$lang['color_options'] = 'Ukloni opcije boje.'; +$lang['alt_toolbar'] = 'Funkcije koje se uklanjaju iz alatne trake u CK uređivaču'; +$lang['mfiles'] = 'Omogući mfile podršku'; +$lang['extra_plugins'] = 'Zarezom odvojena lista dodatnih Ckeditor dodataka koji će biti dodani na alatnu traku. Pogledajte ckgedit uputu o podešavanju za detalje'; +$lang['dw_users'] = 'Ime grupe korisnika čiji je podrazumijevani Dokuwiki uređivač kada je odabran dw_priority. Ako nije definiran, tada će svima ugrađeni Dokuwiki uređivač biti podrazumijevani ako je odabran dw_priority.'; +$lang['allow_ckg_filebrowser'] = 'Odaberite koji datoteka/media pretraživač korisnici mogu koristiti'; +$lang['default_ckg_filebrowser'] = 'Odaberite koji datoteka/media pretraživač je podrazumijevani. Ovo će biti nadjačano ako odabrani pretraživač nije dopušten'; +$lang['captcha_auth'] = 'ACL nivo na kojem je captcha isključen kada je opcija captcha dodatka forusers uključena. Podrazumijevana vrijednost je ACL_CREATE, što znači da svi korisnici sa ACL_EDIT ili manje, će se prikazati captcha, za ACL_CREATE ili više neće.'; +$lang['htmlblock_ok'] = 'Kada se koristi HTML_BLOCK ili ova postavka ili Dokuwiki htmlok postavka mora biti omogućena. Ona ne znači isti nivo sigurnosnog rizika kao htmlok. Unatoč tome ona ipak bi trebal biti korištena samo u sigurnim korisničkim okolinama, a ne na otvorenom wiki-u.'; +$lang['dblclk'] = 'Postavi na isključi da se isključi mogućnost uređivanja odjeljka Dokuwiki urednikom dvoklikom (vidi: direct_access_to_dokuwiki_editor)'; +$lang['preserve_enc'] = 'Sačuvaj kodiranje URL veza kada je Dokuwiki deaccent opcija aktivna.'; +$lang['gui'] = 'Odaberi CKEditor GUI.'; +$lang['rel_links'] = 'Aktiviraj podršku za relativne interne i slikovne poveznice'; diff --git a/lib/plugins/ckgedit/lang/it/lang.php b/lib/plugins/ckgedit/lang/it/lang.php new file mode 100644 index 0000000..76d772f --- /dev/null +++ b/lib/plugins/ckgedit/lang/it/lang.php @@ -0,0 +1,24 @@ + + * @author HokkaidoPerson + * @author Hideaki SAWADA + */ +$lang['btn_dw_edit'] = 'テキストモードに変更'; +$lang['dw_btn_fck_preview'] = 'プレビュー'; +$lang['dw_btn_lang'] = '言語を選択'; +$lang['title_dw_delete'] = 'ページを削除'; +$lang['title_dw_edit'] = '内容を保存して編集を終わり、DokuWiki組み込みのエディタに切り替え'; +$lang['dw_btn_revert'] = '戻す'; +$lang['title_dw_revert'] = '以前のドラフトに戻す'; +$lang['title_dw_lang'] = 'スペルチェッカーの言語を選択'; +$lang['title_dw_cancel'] = '編集をキャンセル'; +$lang['btn_fck_edit'] = 'GUIモードに変更'; +$lang['confirm_delete'] = '本当にこのページを削除してもよろしいですか?'; +$lang['confirm_preview'] = '編集中の内容は保存されず失われます'; +$lang['editor_height'] = 'エディターの高さ'; +$lang['editor_height_title'] = 'エディターは、再読込時にサイズ変更する'; +$lang['dw_btn_backup'] = 'ドラフトを保存'; +$lang['title_dw_backup'] = '内容をドラフトに保存して、ロックの期限を更新'; +$lang['backup_empty'] = '以前のドラフトは存在しません。このまま戻すと編集中の内容はすべて失われますがよろしいですか?'; +$lang['btn_draft'] = 'ドラフトを表示'; +$lang['title_draft'] = 'ドラフトを表示して編集'; +$lang['btn_exit_draft'] = '現在の文書に戻る'; +$lang['title_exit_draft'] = '現在の文書に戻る'; +$lang['draft_msg'] = 'この文書にはドラフトが存在します。「ドラフトを表示」「現在の文書に戻る」ボタンでドラフトと現在の文書を交互に表示できます。編集したい方を編集してください。'; +$lang['whats_this'] = 'ヘルプ'; +$lang['complex_tables'] = '複雑な表を有効にする'; +$lang['minor_changes'] = '小さな変更'; +$lang['discard_edits'] = '編集内容を保存する場合はOKを、破棄する場合はキャンセルをクリックしてください。'; +$lang['dw_btn_styling'] = 'フォントの編集'; +$lang['title_styling'] = 'マークアップで指定されたフォントスタイルで表示する。'; +$lang['js']['font_err_1'] = 'フォントの装飾はリンクに含める事が出来ません。以下の修正を承諾するには「OK」をクリックして下さい。'; +$lang['js']['font_err_2'] = '修正するには、以下にDokuWikiのリンクの完全なマークアップを入力して下さい。ブラケットも含んで下さい。エディターに戻るには「キャンセル」をクリックして下さい。'; +$lang['js']['font_err_throw'] = 'フォント書式エラー'; +$lang['js']['dwp_save_err'] = '以下に変更を保存出来ません:'; +$lang['js']['dwp_updated'] = 'エディターの優先度は次の通り更新されました:'; +$lang['js']['dwp_not_sel'] = 'エディターの優先度が選択されていません。優先度はdw_usersグループの構成設定で指定します。'; +$lang['js']['mediamgr_notice'] = '挿入にリンクダイアログを使用する'; +$lang['js']['font_conflict'] = '分析した所、リンクフォントの競合が1つ以上見つかりました。「OK」をクリックすると、エディターに戻ってフォントスタイルを除去する事が出来ます。より詳しい情報については、https://www.dokuwiki.org/plugin:ckgedit:font_styling#conflicts_with_dokuwiki_links を参照して下さい。'; +$lang['js']['ckg_paste_restart'] = 'エディターを再読み込みすると、補助的な貼り付けサポートが有効になります'; +$lang['js']['on'] = 'ON'; +$lang['js']['off'] = 'OFF'; +$lang['mediamgr_imgonly'] = '画像ダイアログは、画像に対してのみ用いて下さい。他のメディアについてはリンクダイアログを用いて下さい。選択したファイル:'; +$lang['uprofile_title'] = '使いたいデフォルトのエディターを選択'; +$lang['btn_val_dw_fb'] = 'DWファイルブラウザー'; +$lang['btn_val_ckg_fb'] = 'CKGファイルブラウザー'; +$lang['btn_title_dw_fb'] = '保存してエディターを閉じ、DWファイルブラウザーに切り替える'; +$lang['btn_title_ckg_fb'] = '保存してエディターを閉じ、CKGファイルブラウザーに切り替える'; +$lang['formatdel'] = 'ヘッダーからマークアップを除去しました。DokuWikiでサポートされていません。'; +$lang['fontdel'] = 'リンクからフォントマークアップを除去しました。DokuWikiでサポートされていません。'; +$lang['ws_cantcopy'] = 'winstyleセットアップに際して:次に対してコピー出来ません:'; +$lang['ws_copiedhtaccess'] = 'winstyleセットアップに際して、セキュリティ設定された.htaccessファイルを、ディレクトリ data・mediaにコピーしました +ckgedit/fckeditor/userfiles/.htacess.security をご覧下さい'; +$lang['userfiles_perm'] = 'パーミッションを確認して下さい。ckgeditがアクセス出来ません。'; +$lang['sym_not created_1'] = '作成出来ません'; +$lang['sym_not created_2'] = 'シンボリックリンクをファイルブラウザーに作成出来ません。以下にアクセス出来ません:'; +$lang['sym_not created_3'] = '次に対しシンボリックリンクを作成しようとした際にエラーが発生しました:'; +$lang['syms_created'] = '以下のリンクがユーザーファイルのディレクトリに作成されました。'; +$lang['dblclk_reminder'] = 'リマインダー'; diff --git a/lib/plugins/ckgedit/lang/ja/settings.php b/lib/plugins/ckgedit/lang/ja/settings.php new file mode 100644 index 0000000..ebc28fe --- /dev/null +++ b/lib/plugins/ckgedit/lang/ja/settings.php @@ -0,0 +1,38 @@ + + * @author Hideaki SAWADA + */ +$lang['groups'] = 'ロックの期限を無効化できるグループ(廃止予定)'; +$lang['fck_preview'] = 'FCK プレビューグループ'; +$lang['guest_toolbar'] = 'ゲストに対してツールバーを表示'; +$lang['guest_media'] = 'ゲストはメディアファイルにリンク可能'; +$lang['open_upload'] = 'ゲストはメディアファイルをアップロード可能'; +$lang['default_fb'] = 'ファイルブラウザーのデフォルトのアクセス権。noneの場合、ACLは適用されません。'; +$lang['openfb'] = 'ファイルブラウザーをオープンにする。これによってユーザーはパーミッションに関係なくすべてのディレクトリ構造にアクセスできます。ただしアップロードにはACLが適用されます。'; +$lang['dw_edit_display'] = '"テキストモード"ボタンを使用できるユーザーを制限する。all: すべてのユーザー、admin: adminとmanagerのみ、none: 誰も使用できない。デフォルトはall。'; +$lang['smiley_as_text'] = 'CKeditorで顔文字を文字列で表示(この設定を有効にしても表示の際は画像として表示されます)'; +$lang['editor_bak'] = 'meta/<namespace>.ckgedit にバックアップを保存'; +$lang['create_folder'] = 'ファイルブラウザーでフォルダ作成ボタンを有効にする。 (y/n)'; +$lang['dwedit_ns'] = 'テキストモードに自動的に切り替える名前空間のリスト(カンマ区切り)'; +$lang['acl_del'] = 'デフォルト(チェックしない)の場合、アップロード権限を持つユーザーにメディアファイルを削除する権限を与えます。チェックした場合、フォルダからファイルを削除するには削除の権限が必要です。'; +$lang['auth_ci'] = 'ユーザーのログインIDは大文字小文字を区別しない。つまりUSERとuserのいずれでもログイン可能'; +$lang['nix_style'] = 'Windowsのサーバー(Vista以降)用の設定。この設定を有効にすると userfiles にメディアとファイルへのリンクを正常に作ることができる場合に、data\media に ckgedit\CKeditor\userfiles でアクセスできるようにします。'; +$lang['no_symlinks'] = 'ckgedit/userfiles にシンボリックリンクを自動で作成しない'; +$lang['direction'] = 'CKeditorでの文字の方向: nocheck: ckgeditはデフォルトの方向の設定を変更しない。 dokuwiki: Dokuwikiの文字の方向の設定に従う。 ltr: 左から右。 rtl: 右から左。'; +$lang['scayt_auto'] = 'スペルチェッカーを自動的に有効化。デフォルトは"on"。スペルチェッカーを無効にするには"off"を選択してください。'; +$lang['scayt_lang'] = 'スペルチェッカーのデフォルト言語'; +$lang['smiley_hack'] = '新しいサーバーに移動した時にCKeditorの顔文字のURLを初期化。これはページごとにページが編集のために読み込まれ、保存された時に行われます。このオプションは通常はoffにします。'; +$lang['complex_tables'] = '複雑な表のアルゴリズムを使用。通常の表のパースに比べて、rowspanやcolspanを使った複雑な表をより良くパースできますが、処理時間がやや長くなります。'; +$lang['duplicate_notes'] = 'ユーザーが同じ脚注テキストに対して複数の脚注を付ける場合にチェックしてください。脚注が衝突しないようにするために必要です。'; +$lang['winstyle'] = 'fckeditor/userfiles の代わりにメディアディレクトリへの直接のパスを使用。このためには fckeditor/userfiles/.htaccess.security を data/media にコピーして .htaccess にリネームする必要があります。'; +$lang['other_lang'] = 'CKEditorのデフォルト言語。デフォルトではブラウザの言語が使われますが、ここで他の言語を選択できます。この設定はDokuwikiのインターフェイスの言語とは独立しています。'; +$lang['dw_priority'] = 'Dokuwikiのエディタを標準に設定'; +$lang['preload_ckeditorjs'] = 'CKEditorを事前に読み込み、編集を始める時の遅延時間を減らします。'; +$lang['nofont_styling'] = 'エディター内はプラグインのマークアップで指定されたフォントスタイルで表示する。詳細は、Dokuwiki.org の ckgedit プラグインページを参照してください。'; +$lang['font_options'] = 'フォントのオプションを削除する。'; +$lang['color_options'] = '配色のオプションを削除する。'; +$lang['alt_toolbar'] = 'CKEditor のツールバーから削除する機能'; diff --git a/lib/plugins/ckgedit/lang/ko/lang.php b/lib/plugins/ckgedit/lang/ko/lang.php new file mode 100644 index 0000000..6c36859 --- /dev/null +++ b/lib/plugins/ckgedit/lang/ko/lang.php @@ -0,0 +1,42 @@ + + */ +$lang['btn_dw_edit'] = 'DW 편집'; +$lang['dw_btn_fck_preview'] = 'CKG 미리 보기'; +$lang['dw_btn_lang'] = '언어'; +$lang['title_dw_delete'] = '문서 삭제'; +$lang['title_dw_edit'] = '작업을 저장하고 종료한 다음 네이티브 도쿠위키 편집기로 전환'; +$lang['dw_btn_revert'] = '되돌리기'; +$lang['title_dw_revert'] = '이전 백업으로 되돌리기'; +$lang['title_dw_lang'] = '맞춤법 검사기를 위한 언어 선택'; +$lang['title_dw_cancel'] = '편집기 종료'; +$lang['btn_fck_edit'] = 'CKG 편집'; +$lang['confirm_delete'] = '정말로 이 문서를 삭제하겠습니까?'; +$lang['confirm_preview'] = '저장하지 않은 작업은 사라집니다.'; +$lang['editor_height'] = '편집기 높이'; +$lang['editor_height_title'] = '편집기를 다시 불러올 때 다시 크기 조절'; +$lang['dw_btn_backup'] = '백업'; +$lang['title_dw_backup'] = '편집기 창을 백업 및 잠금 갱신'; +$lang['backup_empty'] = '백업한 버퍼가 비어있는 것으로 나타납니다. 계속할까요?'; +$lang['btn_draft'] = '초안 얻기'; +$lang['title_draft'] = '초안을 보고 편집하기'; +$lang['btn_exit_draft'] = '초안 종료'; +$lang['title_exit_draft'] = '현재 문서로 돌아가기'; +$lang['draft_msg'] = '이 문서에 초안 파일이 있습니다. 초안 버튼은 이 문서와 초안 사이를 전환합니다. 둘 중 하나를 편집하고 저장할 수 있습니다.'; +$lang['whats_this'] = '이게 뭐죠?'; +$lang['complex_tables'] = '복잡한 표 활성화'; +$lang['minor_changes'] = '사소한 바뀜'; +$lang['discard_edits'] = '편집을 저장하려면 확인을, 버리려면 취소를 클릭하세요'; +$lang['dw_btn_styling'] = '글꼴 편집'; +$lang['title_styling'] = '글꼴 스타일을 마크업으로 보여지도록 열기'; +$lang['js']['font_err_1'] = '글꼴 스타일은 링크 안에 포함할 수 없습니다. 다음 수정을 받아들이려면 확인을 클릭하세요:'; +$lang['js']['font_err_2'] = '개정하려면, 괄호를 포함하여 아래에 전체 도쿠위키 링크 문법을 입력하세요. 편집기로 돌아가려면 취소를 클릭하세요.'; +$lang['js']['font_err_throw'] = '글꼴 서식 오류'; +$lang['js']['dwp_save_err'] = '바뀜을 저장할 수 없습니다:'; +$lang['js']['dwp_updated'] = '편집기 우선 순위 업데이트:'; +$lang['js']['dwp_not_sel'] = '편집기 우선 순위를 선택하지 않음: dw_users 그룹 환경 설정에 의해 결정될 것입니다'; +$lang['uprofile_title'] = '기본 편집기 선택'; diff --git a/lib/plugins/ckgedit/lang/ko/settings.php b/lib/plugins/ckgedit/lang/ko/settings.php new file mode 100644 index 0000000..79b5941 --- /dev/null +++ b/lib/plugins/ckgedit/lang/ko/settings.php @@ -0,0 +1,40 @@ + + */ +$lang['groups'] = '잠금 타이머를 비활성화하도록 허용하는 그룹 (사용되지 않음)'; +$lang['fck_preview'] = 'FCK 미리 보기 그룹'; +$lang['guest_toolbar'] = '손님에게 도구 모음을 표시'; +$lang['guest_media'] = '손님이 미디어 파일로 링크할 수 있음'; +$lang['open_upload'] = '손님이 올릴 수 있음'; +$lang['default_fb'] = '기본 파일 찾아보기 접근. none이면, acl이 적용되지 않습니다.'; +$lang['openfb'] = '파일 찾아보기를 엽니다. 사용자가 권한이 있는지 없는지에 따라 사용자에게 전체 디렉터리 구조에 접근할 수 있도록 줍니다. ACL은 여전히 올리기에 적용됩니다.'; +$lang['dw_edit_display'] = '"DW 편집" 버튼으로 접근할 수 있는 사용자를 제어합니다. 선택: "all"은 모든 사용자; "admin"은 admin 및 manager만; "none"은 아무도 없음. 기본값은 "all"입니다.'; +$lang['smiley_as_text'] = 'CKeditor에서 이모티콘을 텍스트로 표시 (여전히 브라우저에서는 그림으로 표시됩니다)'; +$lang['editor_bak'] = 'meta/<namespace>.ckgedit에 백업을 저장'; +$lang['create_folder'] = '파일 브라우저에서 폴더 만들기 버튼 활성화 (y/n)'; +$lang['dwedit_ns'] = 'ckgedit가 네이티브 도쿠위키 편집기로 자동으로 전환할 이름공간 및/또는 문서의 쉼표로 구분된 목록; 부분적인 일치를 허용합니다.'; +$lang['acl_del'] = '기본값 (상자가 체크되지 않음)으로 올리기 권한이 있는 사용자에게 미디어 파일을 삭제할 권한을 허용합니다; 상자게 체크되어 있으면, 사용자는 폴더에서 삭제하려면 삭제 권한이 필요합니다.'; +$lang['auth_ci'] = '사용자 로그인 id는 대소문자를 구분하지 않습니다, 즉 USER와 user 둘 다 로그인할 수 있습니다'; +$lang['nix_style'] = 'Windows 서버 (Vista 이상)를 위해 이 설정은 미디어와 파일로의 링크가 성공적으로 userfiles에 만들어지는 경우, ckgedit\CKeditor\userfiles를 통해 data/media에 접근할 수 있도록 합니다'; +$lang['no_symlinks'] = 'ckgedit/userfiles에 심볼릭 링크를 자동으로 만들기를 비활성화합니다.'; +$lang['direction'] = 'CKeditor에서의 언어 방향 설정: nocheck: ckgedit는 기본 방향 설정을 바꾸지 않습니다; dokuwiki: 현재 도쿠위키 언어 방향; ltr: 왼쪽에서 오른쪽; rtl: 오른쪽에서 왼쪽.'; +$lang['scayt_auto'] = 'SCAYT 맞춤법 검사기를 자동으로 활성화합니다. 기본값은 "on"입니다; SCAYT를 끄려면 "off"를 선택하세요'; +$lang['scayt_lang'] = 'SCAYT 기본 언어를 설정합니다.'; +$lang['smiley_hack'] = '새 서버로 이동했을 때 CKeditor 이모티콘의 URL을 재설정합니다. 문서별로 문서가 편집을 위해 불러오고, 저장되었을 때 이루어집니다. 이 옵션은 일반적으로 off로 설정해야 합니다.'; +$lang['complex_tables'] = '복잡한 표 알고리즘을 사용합니다. 표의 표준 구문 분석에 비해 rowspan과 colspan을 사용한 복잡한 표를 더 잘 표시해야 합니다. 그러나 처리 시간이 다소 길어집니다.'; +$lang['duplicate_notes'] = '사용자가 같은 각주 텍스트에 여러 각주를 붙이는 경우 이것을 true로 설정하세요; 각주가 충돌하지 않도록 하기 위해 필요합니다.'; +$lang['winstyle'] = 'fckeditor/userfiles 대신 미디어 디렉터리에 직접 경로를 사용합니다. 이를 위해서는 fckeditor/userfiles/.htaccess.security를 data/media에 복사하여 .htaccess 이름을 바꿀 필요가 있습니다.'; +$lang['other_lang'] = 'CKEditor의 기본 언어로 브라우저의 언어로 설정됩니다. 하지만, 여기에서 다른 언어를 선택할 수 있습니다; 이것은 도쿠위키의 인터페이스 언어와는 독립적입니다.'; +$lang['dw_priority'] = 'dw_priority: 도쿠위키 편집기를 기본 편집기로 사용'; +$lang['preload_ckeditorjs'] = 'CKEditor의 자바스크립트를 미리 읽어 편집기를 불러올 때의 지연 시간을 줄이기'; +$lang['nofont_styling'] = '편집기에서 글꼴 스타일을 플러그인 마크업으로 표시합니다. 자세한 내용은 Dokuwiki.org에서 ckgedit 플러그인 문서를 보세요.'; +$lang['font_options'] = '글꼴 옵션을 제거합니다.'; +$lang['color_options'] = '색 옵션을 제거합니다.'; +$lang['alt_toolbar'] = 'CKEditor 도구 모음에서 제거할 기능

텍스트 상자에 쉼표로 구분된 목록으로 다른 기능들을 포함하여 제거할 수 있습니다:

Bold, Italic, Underline, Strike, Subscript, Superscript, RemoveFormat, Find, Replace, SelectAll, Scayt, Image, Table, Tags, Link, Unlink, Format, Styles,TextColor, BGColor, NumberedList, BulletedList, Cut, Copy, Paste, PasteText, PasteFromWord, Undo, Redo, Source, Maximize, About.'; +$lang['mfiles'] = 'mfile 지원 활성화'; +$lang['extra_plugins'] = '도구 모음에 추가할 추가적인 Ckeditor 플러그인의 쉼표로 구분된 목록. 자세한 사항은 ckgedit 플러그인의 설정 문서를 보세요'; +$lang['dw_users'] = 'dw_priority가 선택되어 있을 때 편집기 기본값을 도쿠위키 편집기로 사용할 사용자의 그룹 이름. 정의하지 않으면, 모든 사용자가 dw_priority가 선택되어 있을 때 네이티브 도쿠위키 편집기를 사용합니다.'; diff --git a/lib/plugins/ckgedit/lang/nl/lang.php b/lib/plugins/ckgedit/lang/nl/lang.php new file mode 100644 index 0000000..8dc2621 --- /dev/null +++ b/lib/plugins/ckgedit/lang/nl/lang.php @@ -0,0 +1,75 @@ + + * @author Coen Eisma + * @author Mijndert + * @author Peter van Diest + */ +$lang['btn_dw_edit'] = 'DW Bewerkvenster'; +$lang['dw_btn_fck_preview'] = 'CKG Voorbeeld'; +$lang['dw_btn_lang'] = 'Taal'; +$lang['title_dw_delete'] = 'Pagina schrappen'; +$lang['title_dw_edit'] = 'Werk opslaan, Stop, en terugschakelen naar de originele DokuWiki Editor'; +$lang['dw_btn_revert'] = 'Terugkeren'; +$lang['title_dw_revert'] = 'Terugkeren naar vorige back-up'; +$lang['title_dw_lang'] = 'Selecteer taal voor spellingcontrole'; +$lang['title_dw_cancel'] = 'Stop Editor'; +$lang['btn_fck_edit'] = 'CKG Editor'; +$lang['confirm_delete'] = 'Wil je deze pagina schrappen? Zeker?'; +$lang['confirm_preview'] = 'Niet opgeslagen werk gaat verloren.'; +$lang['editor_height'] = 'Hoogte bewerkvenster'; +$lang['editor_height_title'] = 'De afmetingen van de editor worden opnieuw bepaald bij herladen'; +$lang['dw_btn_backup'] = 'Back-up'; +$lang['title_dw_backup'] = 'Maak een back-up van bewerkvenster & hernieuw vergrendeling'; +$lang['backup_empty'] = 'De back-up buffer is blijkbaar leeg. Verder gaan?'; +$lang['btn_draft'] = 'Ontwerp'; +$lang['title_draft'] = 'Bekijk, Toon, Bewerk ontwerp'; +$lang['btn_exit_draft'] = 'Stop ontwerp'; +$lang['title_exit_draft'] = 'Keer terug naar huidig document'; +$lang['draft_msg'] = 'Dit document heeft een ontwerp bestand. De ontwerp knop schakelt tussen dit document en het ontwerp. Je kan een van beide bewerken en bewaren.'; +$lang['whats_this'] = 'Wat is dit?'; +$lang['complex_tables'] = 'Complexe tabellen inschakelen'; +$lang['minor_changes'] = 'Kleine wijzigingen'; +$lang['discard_edits'] = 'Om je wijzigingen op te slaan klik OK; voor afkeuren klik Cancel'; +$lang['dw_btn_styling'] = 'Lettertypen aanpassen'; +$lang['title_styling'] = 'Open met de stijl van het lettertype getoond als markup'; +$lang['js']['font_err_1'] = 'Font styling niet toegestaan in links. Klik OK om de volgende correctie te accepteren.'; +$lang['js']['font_err_2'] = 'Om het bij te werken, voer de volledige syntaxis van de DokuWiki-link in, inclusief de haakjes. Om terug te keren naar het bewerkvenster klikt u op Annuleren.'; +$lang['js']['font_err_throw'] = 'Font-opmaakfout'; +$lang['js']['dwp_save_err'] = 'Niet mogelijk om veranderingen op te slaan in:'; +$lang['js']['dwp_updated'] = 'Prioriteitseditor geüpdatete naar:'; +$lang['js']['dwp_not_sel'] = 'Prioriteitseditor niet geselecteerd. Het zal bepaald worden op basis van de dw_user group config setting'; +$lang['js']['mediamgr_notice'] = 'Gebruik de linkdialoogvenster om in te voegen'; +$lang['js']['font_conflict'] = 'De parser heeft één of meer link-font-conflicten gevonden. Door op OK te klikken ga je terug naar de editor waar je de fontstijlen kunt verwijderen. Voor meer informatie kijk je op: https://www.dokuwiki.org/plugin:ckgedit:font_styling#conflicts_with_dokuwiki_links'; +$lang['js']['ckg_paste_restart'] = 'Bij het herladen van het bewerkvenster, wordt de ondersteuning voor plakken aangezet'; +$lang['js']['on'] = 'Aan'; +$lang['js']['off'] = 'Uit'; +$lang['js']['broken_image_1'] = 'Gebruik de imagePaste plugin met de DokuWiki Mediabeheerder of probeer de MS Word plak-functie'; +$lang['js']['broken_image_2'] = 'Ctrl+V van afbeeldingen met ruwe bestandsgrootte groter dan 2.5 MB kunnen blijven hangen. Deze afbeelding is:'; +$lang['mediamgr_imgonly'] = 'Upload alleen afbeeldingen wanneer je het afbeeldingsdialoogvenster gebruikt.'; +$lang['uprofile_title'] = 'Selecteer je standaard editor'; +$lang['btn_val_dw_fb'] = 'DW bestandsbrowser'; +$lang['btn_val_ckg_fb'] = 'CKG bestandsbrowser'; +$lang['btn_title_dw_fb'] = 'Sla op en sluit de editor en schakel over naar de DW bestandsbrowser'; +$lang['btn_title_ckg_fb'] = 'Sla op en sluit de editor en schakel over naar de CKG bestandsbrowser'; +$lang['formatdel'] = 'Opmaak verwijderd van de kopteksten: niet ondersteund door Dokuwiki'; +$lang['fontdel'] = 'Letteropmaak verwijderd uit links: niet ondersteund door Dokuwiki'; +$lang['ckgcke_conflict'] = 'Er is een kopie van ckgedit gedetecteerd. Ckgedit of ckgdoku moet zijn uitgeschakeld.'; +$lang['ws_cantcopy'] = 'Voor winstyle-instellingen: kan niet kopiëren naar'; +$lang['ws_copiedhtaccess'] = 'Voor winstyle-instellingen: de beveiligingsinstellingen van .htaccess zijn naar data/media gekopieerd +Kijk op ckgedit/fckeditor/userfiles/.htacess.security'; +$lang['userfiles_perm'] = 'Controleer de bestandsrechten: ckgedit heeft geen toegang tot'; +$lang['sym_not created_1'] = 'Niet mogelijk om aan te maken:'; +$lang['sym_not created_2'] = 'Niet mogelijk om symlinks voor de bestandsverkenner te creëren: geen toegang tot:'; +$lang['sym_not created_3'] = 'Er was een fout tijdens het creëren van symbolische links in'; +$lang['syms_created'] = 'De volgende links zijn gecreëerd in de gebruikersmap:'; +$lang['dblclk'] = 'Nieuwe optie: dubbelklik in de browser om de DW Editor te openen om de sectie waar de cursor staat te bewerken. Kijk op: direct_access_to_dokuwiki_editor. '; +$lang['dblclk_reminder'] = 'Herinnering'; +$lang['ckg_img_paste'] = 'Ondersteuning voor aanvullende afbeelding plakken aanzetten'; +$lang['ckg_img_paste_title'] = 'Uit om dubbel plakken te voorkomen of Aan om plakken in te schakelen'; +$lang['on'] = 'aan'; +$lang['off'] = 'uit'; +$lang['broken_image'] = 'Gebruik de imagePaste plugin met de DokuWiki Mediabeheerder of probeer de MS Word plak-functie. Ctrl+V van afbeeldingen met ruwe bestandsgrootte groter dan 2.5 MB kunnen blijven hangen. Deze afbeelding is:'; diff --git a/lib/plugins/ckgedit/lang/nl/merger.txt b/lib/plugins/ckgedit/lang/nl/merger.txt new file mode 100644 index 0000000..80be15d --- /dev/null +++ b/lib/plugins/ckgedit/lang/nl/merger.txt @@ -0,0 +1,5 @@ + + - Deze versie van [[doku>plugin:ckgedit|ckgedit]] updatet CKEditor van 4.9 naar 4.10, wat zorgt voor bijgewerkte en verbeterde javascript. + - Met de update naar 4.9, is ckgedit samengevoegd met [[doku>plugin:ckgdoku|ckgdoku]]. Zie ckgdoku's [[doku>plugin:ckgdoku#configuration|configuratieopties]]. + +Rapporteer problemen die je tegenkomt alstublieft op [[https://github.com/turnermm/ckgedit/issues|ckgedit's issuetracker]] op GitHub. \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/nl/scayt.txt b/lib/plugins/ckgedit/lang/nl/scayt.txt new file mode 100644 index 0000000..05e57a4 --- /dev/null +++ b/lib/plugins/ckgedit/lang/nl/scayt.txt @@ -0,0 +1,3 @@ +The Scayt Spellingcontrole heeft voor de 'scayt_auto' configuratie-instelling drie keuzes: aan, uit, uitgeschakeld. Vanaf nu is de standaardkeuze **uit** in plaats van **aan**. Met **aan** wordt de inhoud van het bewerkvenster verwerkt door Scayt en verzonden voor spellingscontrole naar een Scayt server. Ondanks dat er geen reden is om te geloven dat hier een veiligheidsrisico is, is desalniettemin deze aanpassing gemaakt voor gebruikers die zich bezorgd voelen over het feit dat hun data naar een externe server wordt gestuurd. Met de keuze **uitgeschakeld** wordt de spellingscontrole-functie helemaal verwijderd uit het bewerkvenster. U kunt meer informatie vinden op de Configuration Options pagina van de ckgedit documentatie via https://www.dokuwiki.org/plugin:ckgedit:configuration#scayt_auto. + + \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/nl/settings.php b/lib/plugins/ckgedit/lang/nl/settings.php new file mode 100644 index 0000000..ee3301d --- /dev/null +++ b/lib/plugins/ckgedit/lang/nl/settings.php @@ -0,0 +1,51 @@ + + * @author Coen Eisma + * @author Mijndert + * @author Peter van Diest + */ +$lang['groups'] = 'Groep met rechten om lock timer uit te schakelen (afgeschaft)'; +$lang['fck_preview'] = 'FCK Voorbeeld Groep'; +$lang['guest_toolbar'] = 'Toon werkbalk aan Gast'; +$lang['guest_media'] = 'Gast mag Media bestanden linken'; +$lang['open_upload'] = 'Gast mag uploaden'; +$lang['default_fb'] = 'Standaard bestandstoegang permissies. Als \'none\', dan wordt ACL niet toegepast.'; +$lang['openfb'] = 'Open bestandsbenadering. De gebruiker krijgt hierdoor toegang tot de volledige directory structuur, ongeacht de gebruikersrechten dit al dan niet toelaten. ACL is wel van toepassing op uploads.'; +$lang['dw_edit_display'] = 'Welke gebruikers mogen de "DW Editor" knop gebruiken. Selecteer: "all" voor alle gebruikers; "admin" voor administrator en beheerders; "none" voor niemand. Standaardwaarde is "all".'; +$lang['smiley_as_text'] = 'Toon smileys als tekst in FCKeditor (wordt wel als afbeelding getoond in de browser)'; +$lang['editor_bak'] = 'Sla backup op in meta/<namespace>.ckgedit'; +$lang['create_folder'] = 'Activeer knop Aanmaken map in bestandsverkenner (y/n)'; +$lang['dwedit_ns'] = 'Komma-gescheiden lijst van namespaces waarbij ckgedit automatisch terugschakelt naar de oorspronkelijke DokuWiki Editor.'; +$lang['acl_del'] = 'Standaardinstelling (niet aangevinkt) staat gebruikers met upload rechten toe om mediabestanden te verwijderen; indien aangevinkt, dan heeft gebruiker de verwijder-permissie nodig om het bestand uit de map te verwijderen.'; +$lang['auth_ci'] = 'De gebruikers login is niet hoofdletter gevoelig, dus je kan inloggen met zowel GEBRUIKER als gebruiker'; +$lang['nix_style'] = 'Voor Windows Servers (Vista en later). Deze parameter maakt het mogelijk om data\media te benaderen met ckgedit \ckeditor\userfiles, indien links naar media en bestand succesvol aangemaakt zijn in userfiles'; +$lang['no_symlinks'] = 'Deactiveert automatische creatie van symbolische links in ckgedit/userfiles. Deze optie moet uitgeschakeld worden tijdens updaten.'; +$lang['direction'] = 'Zet de schrijf- en lees richting van de taal in CKeditor: nocheck: geen wijziging van de standaard schrijfrichting in ckgedit; dokuwiki: gebruik de Dokuwiki taal schrijfrichting; ltr: Links-naar-rechts; rtl: Rechts-naar-links.'; +$lang['scayt_auto'] = 'Stelt in of de SCAYT spellingcontrole, tijdens-het-typen, al actief is bij openen van het bewerkvenster. Standaard op off; de gebruiker kan de spellingscontrole inschakelen per pagina. Om de Scayt spellingscontrole compleet te verwijderen, kies disable. (Zie voor meer achtergrond ckgedit:configuration#scayt_auto") '; +$lang['scayt_lang'] = 'Activeer de SCAYT standaard taalcode.'; +$lang['smiley_hack'] = 'Reset de URL voor FCKeditor\'s smilies bij verhuizing naar nieuwe server. Dit wordt pagina per pagina uitgevoerd bij het openen en bewaren van de pagina. Deze optie zou normaal uit moeten staan.'; +$lang['complex_tables'] = 'Gebruik het complex tables algorithm, in tegenstelling tot het standaard ontleding algoritme. Dit zou een beter resultaat geven wanneer complexe rowspans en colspans gemengd worden.'; +$lang['duplicate_notes'] = 'Zet deze optie op true (aanvinken) wanneer gebruikers meerdere voetnoten maken met dezelfde voettekst; deze optie is noodzakelijk om te voorkomen dat de voetnoten corrupt raken.'; +$lang['winstyle'] = 'Gebruik een direct pad naar de mediamap in plaats van fckeditor/userfiles. Deze functie kopieert
fckeditor/userfiles/.htaccess.security naar data/media/.htaccess. Zo niet, dan moet dit handmatig gedaan worden.'; +$lang['other_lang'] = 'De standaardtaal voor de CKGEditor is de taal zoals ingesteld voor de browser. Je kunt echter een andere taal kiezen, onafhankelijk van de taal van het Dokuwiki-interface.'; +$lang['dw_priority'] = 'Maak DokuWiki editor de standaard editor'; +$lang['preload_ckeditorjs'] = 'Laad het javascript van de CKGeditor van tevoren om in het vervolg het laden van de editor te versnellen.'; +$lang['nofont_styling'] = 'Toon lettertypestijlen in de editor als plugin markup. Voor details, zie de ckgedit-pluginpagina van Dokuwiki.org.'; +$lang['font_options'] = 'Lettertype opties verwijderen'; +$lang['color_options'] = 'Kleur opties verwijderen'; +$lang['alt_toolbar'] = 'Functies om de CKEditor tool te verwijderen'; +$lang['mfiles'] = 'mfile-ondersteuning aanzetten'; +$lang['extra_plugins'] = 'Kommagescheiden lijst van aanvullende CKeditor plugins die aan de werkbalk toegevoegd worden. Zie de Configuration Page van de ckgedit plugin voor details'; +$lang['dw_users'] = 'Groepsnaam van de gebruikers voor wie de standaard Dokuwiki-bewerkvenster weergegeven wordt, als dw_priority wordt ingeschakeld. Als er geen groepsnaam wordt opgegeven, dan krijgen alle gebruikers het originele DokuWiki-bewerkvenster als de optie dw_priority wordt ingeschakeld.'; +$lang['allow_ckg_filebrowser'] = 'Selecteer welke bestandsbrowser(s) gebruikers kunnen gebruiken'; +$lang['default_ckg_filebrowser'] = 'Selecteer welke bestandsbrowser standaard wordt gebruikt. Dit wordt overschreven als de geselecteerde bestandsbrowser niet is toegestaan.'; +$lang['captcha_auth'] = 'ACL-niveau waarop de captcha wordt uitgeschakeld als de captcha plugin\'s forusers is ingeschakeld. De standaardwaarde is ACL_CREATE, dit betekent dat elke gebruiker met ACL_EDIT of lager een captcha krijgt, en met ACL_CREATE of hoger niet.'; +$lang['htmlblock_ok'] = 'Als HTML_BLOCK-blokken worden gebruikt, dan moet of deze instelling of DokuWiki\'s htmlok optie worden ingeschakeld. Deze instelling geeft niet hetzelfde veiligheidsrisico als htmlok. Desalniettemin moet deze instelling alleen gebruikt worden in een vertrouwde gebruikersomgeving, en niet in een open wiki.'; +$lang['dblclk'] = 'Kies uit om de dubbelklik-functie uit te schakelen die de gebruiker alinea\'s laat bewerken in het standaard DokuWiki\'s bewerkvenster (zie: direct_access_to_dokuwiki_editor)'; +$lang['preserve_enc'] = 'Behoud url-encodering in url\'s als DokuWiki\'s deaccent optie actief is'; +$lang['gui'] = 'Kies een CKEditor GUI'; +$lang['rel_links'] = 'Activateer ondersteuning voor relatieve interne verwijzingen en afbeeldingsverwijzingen'; diff --git a/lib/plugins/ckgedit/lang/pl/lang.php b/lib/plugins/ckgedit/lang/pl/lang.php new file mode 100644 index 0000000..4f8778d --- /dev/null +++ b/lib/plugins/ckgedit/lang/pl/lang.php @@ -0,0 +1,32 @@ + + */ +$lang['btn_dw_edit'] = 'Edycja DW'; +$lang['dw_btn_fck_preview'] = 'Podgląd CKG'; +$lang['dw_btn_lang'] = 'Język'; +$lang['title_dw_delete'] = 'Usuń stronę'; +$lang['title_dw_edit'] = 'Zapisz pracę, Wyjdź, i Przełącz do natywnego edytora DokuWiki'; +$lang['dw_btn_revert'] = 'Przywróć'; +$lang['title_dw_revert'] = 'Przywróć poprzednią kopię zapasową'; +$lang['title_dw_lang'] = 'Wybierz język dla sprawdzania pisowni'; +$lang['title_dw_cancel'] = 'Opuść edytor'; +$lang['btn_fck_edit'] = 'Edycja CKG'; +$lang['confirm_delete'] = 'Jesteś pewien że chcesz usunąć tę stronę?'; +$lang['confirm_preview'] = 'Każda niezapisana praca zostanie utracona.'; +$lang['editor_height'] = 'Wysokość edytora'; +$lang['dw_btn_backup'] = 'Kopia zapasowa'; +$lang['btn_draft'] = 'Pobierz wersję roboczą'; +$lang['btn_exit_draft'] = 'Wyjdź z wersji roboczej'; +$lang['title_exit_draft'] = 'Wróć do bieżącego dokumentu'; +$lang['whats_this'] = 'co to jest?'; +$lang['minor_changes'] = 'Drobne zmiany'; +$lang['discard_edits'] = 'Aby zapisać zmiany kliknij OK; aby anulować kliknij Cancel'; +$lang['dw_btn_styling'] = 'Edycja czcionek'; +$lang['js']['on'] = 'wlączone'; +$lang['js']['off'] = 'wyłączone'; +$lang['uprofile_title'] = 'Wybierz swój domyślny edytor'; +$lang['dblclk_reminder'] = 'Przypomnienie'; diff --git a/lib/plugins/ckgedit/lang/pt-br/lang.php b/lib/plugins/ckgedit/lang/pt-br/lang.php new file mode 100644 index 0000000..05189de --- /dev/null +++ b/lib/plugins/ckgedit/lang/pt-br/lang.php @@ -0,0 +1,25 @@ + + * @author Ianka Kryukov + * @author serg + * @author Artem Trutko + * @author Evgeniy Bekhterev + */ +$lang['btn_dw_edit'] = 'Переключить в DokuWiki Редактор'; +$lang['dw_btn_fck_preview'] = 'CKG предпросмотр'; +$lang['dw_btn_lang'] = 'Язык'; +$lang['title_dw_delete'] = 'Удалить страницу'; +$lang['title_dw_edit'] = 'Сохранить текущий текст, выйти и переключить редактор с CKEditor на обычный DokuWiki Editor. (Поменяется при следующем редактировании.)'; +$lang['dw_btn_revert'] = 'Вернуться'; +$lang['title_dw_revert'] = 'Вернуться к предыдущей резервной копии'; +$lang['title_dw_lang'] = 'Выбрать язык'; +$lang['title_dw_cancel'] = 'Выйти из редактроа'; +$lang['btn_fck_edit'] = 'Переключить в CKG Редактор'; +$lang['confirm_delete'] = 'Уверены что хотите удалить страницу?'; +$lang['confirm_preview'] = 'Вся несохраненная работа будет потерянв'; +$lang['editor_height'] = 'Высота редактора'; +$lang['editor_height_title'] = 'Изменение размера редактора после повторной загрузки'; +$lang['dw_btn_backup'] = 'Резервная копия'; +$lang['title_dw_backup'] = 'Окно резервного копирования и возобновления блокировки'; +$lang['backup_empty'] = 'Буфер резервной копии выглядит пустым. Продолжить?'; +$lang['btn_draft'] = 'Загрузить черновик'; +$lang['title_draft'] = 'Обзор, Показать, Редактировать черновик'; +$lang['btn_exit_draft'] = 'Выйти из черновика'; +$lang['title_exit_draft'] = 'Возврат к текущему документу'; +$lang['draft_msg'] = 'За этим документом закреплен файл черновика. Кнопка черновик осуществляет переключение между этим документом и черновиком. Вы можете редактировать и сохранять каждую из них.'; +$lang['whats_this'] = 'Что это?'; +$lang['complex_tables'] = 'Включить Комплексные Таблицы'; +$lang['minor_changes'] = 'Небольшое изменение'; +$lang['discard_edits'] = 'Для сохранения изменений нажмите ОК; для отмены нажмите Отмена'; +$lang['dw_btn_styling'] = 'Редактировать Шрифты'; +$lang['title_styling'] = 'Открыть с помощью стилей шрифта, как показано в разметки'; +$lang['js']['font_err_1'] = 'Стили шрифтов нельзя включить в ссылки. Нажмите OK чтобы принять следующие корректировки: '; +$lang['js']['font_err_2'] = 'Для пересмотра, введите полную разметку ссылок Dokuwiki ниже, включая скобки. Чтобы вернуться в редактор, нажмите кнопку Отмена.'; +$lang['js']['font_err_throw'] = 'Ошибка форматирования шрифта'; +$lang['js']['dwp_save_err'] = 'Невозможно сохранить изменения в:'; +$lang['js']['dwp_updated'] = 'Приоритет редактора обновлен до:'; +$lang['js']['dwp_not_sel'] = 'Приоритет редактора не выбран: он будет определяться настройкой конфигурации группы dw_users'; +$lang['js']['mediamgr_notice'] = 'Используйте диалоговое окно "ссылка" для вставки'; +$lang['js']['font_conflict'] = 'Парсер обнаружил один или несколько конфликтов ссылок-шрифтов. Нажав кнопку ОК, вы можете вернуться в редактор и удалить стили шрифтов. Для получения дополнительной информации см.: https://www.dokuwiki.org/plugin:ckgedit:font_styling#conflicts_with_dokuwiki_links'; +$lang['js']['ckg_paste_restart'] = 'При перезагрузке редактора будет включена дополнительная поддержка вставки'; +$lang['js']['on'] = 'вкл.'; +$lang['js']['off'] = 'выкл.'; +$lang['js']['broken_image_1'] = 'Используйте плагин imagePaste с Dokuwiki Mediamanager или попробуйте инструмент MS Word Paste.'; +$lang['js']['broken_image_2'] = 'Ctrl-v изображения с необработанными данными более 2,5М могут висеть. Это изображение является:'; +$lang['mediamgr_imgonly'] = 'Используйте Image Dialog только для изображений, Link Dialog-для других носителей. Этот файл является:'; +$lang['uprofile_title'] = 'Выберите редактор по умолчанию'; +$lang['btn_val_dw_fb'] = 'DW файловый браузер'; +$lang['btn_val_ckg_fb'] = 'CKG файловый браузер'; +$lang['btn_title_dw_fb'] = 'Сохраните и закройте редактор, а затем переключитесь на DW файловый браузер '; +$lang['btn_title_ckg_fb'] = 'Сохраните и закройте редактор и переключитесь на файловый браузер CKG'; +$lang['formatdel'] = 'Разметка, удаленная из заголовков: не поддерживается Dokuwiki'; +$lang['fontdel'] = 'Разметка шрифта удалена из ссылок: не поддерживается Dokuwiki'; +$lang['ckgcke_conflict'] = 'Обнаружена копия ckgedit. Либо ckgedit, либо ckgedit должны быть отключены.'; +$lang['ws_cantcopy'] = 'Для установки winstyle: не удается скопировать в'; +$lang['ws_copiedhtaccess'] = 'Для winstyle установки, скопированные с включенной безопасностью .htaccess в data/media +См. ckgedit/fckeditor/userfiles/.htacess.security'; +$lang['userfiles_perm'] = 'Пожалуйста, проверьте разрешения; ckgedit не может получить доступ'; +$lang['sym_not created_1'] = 'Невозможно создать'; +$lang['sym_not created_2'] = 'Не удается создать символические ссылки для filebrowser: не удается получить доступ:'; +$lang['sym_not created_3'] = 'Произошла ошибка при попытке создать символические ссылки в'; +$lang['syms_created'] = 'В каталоге userfiles были созданы следующие ссылки:'; +$lang['dblclk'] = 'Новая функция: дважды щелкните окно браузера, чтобы открыть редактор DW для редактирования раздела при наведении курсора. См.: direct_access_to_dokuwiki_editor'; +$lang['dblclk_reminder'] = 'Напоминание'; +$lang['ckg_img_paste'] = 'Включить дополнительную поддержку вставки изображений'; +$lang['ckg_img_paste_title'] = 'Во избежание двойной вставки, или для включения вставки'; +$lang['on'] = 'вкл.'; +$lang['off'] = 'выкл.'; +$lang['broken_image'] = 'Используйте плагин imagePaste с Dokuwiki Mediamanager или попробуйте инструмент MS Word Paste. Необработанные данные Ctrl-v изображений более 2,5М могут висеть. Это изображение является:'; diff --git a/lib/plugins/ckgedit/lang/ru/merger.txt b/lib/plugins/ckgedit/lang/ru/merger.txt new file mode 100644 index 0000000..4223e10 --- /dev/null +++ b/lib/plugins/ckgedit/lang/ru/merger.txt @@ -0,0 +1,4 @@ +- Эта версия [[doku>plugin:ckgedit|ckgedit]] обновляет CKEditor с 4.9 до 4.10, что дает современный и улучшенный javascript. +- С обновлением до 4.9 ckgedit переехал с [[doku>plugin:ckgdoku|ckgdoku]]. См. ckgdoku [[doku>plugin:ckgdoku#configuration|configuration options]]. + +Пожалуйста, сообщайте о любых проблемах [[https://github.com/turnermm/ckgedit/issues|ckgedit's issues]] на github. \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/ru/scayt.txt b/lib/plugins/ckgedit/lang/ru/scayt.txt new file mode 100644 index 0000000..3a13aec --- /dev/null +++ b/lib/plugins/ckgedit/lang/ru/scayt.txt @@ -0,0 +1 @@ +Scayt spellchecker предлагает три варианта Конфигурации: on, off, disabled. На данный момент настройкой по умолчанию будет **off** вместо **on**. С помощью **on** содержимое редактора анализируется Scayt и отправляется для проверки орфографии на сервер Scayt. Хотя нет никаких оснований полагать, что это представляет угрозу безопасности, тем не менее это изменение делается из соображений пользователей с частными вики-сайтами, которые могут испытывать беспокойство из-за отправки своих данных на удаленный сервер. Дополнительную информацию можно найти на странице Параметры конфигурации документации ckgedit по адресу https://www.dokuwiki.org/plugin:ckgedit:configuration#scayt_lang. diff --git a/lib/plugins/ckgedit/lang/ru/settings.php b/lib/plugins/ckgedit/lang/ru/settings.php new file mode 100644 index 0000000..0f484de --- /dev/null +++ b/lib/plugins/ckgedit/lang/ru/settings.php @@ -0,0 +1,52 @@ + + * @author Ianka Kryukov + * @author serg + * @author Artem Trutko + * @author Evgeniy Bekhterev + */ +$lang['groups'] = 'Разделенный запятыми список групп, которым разрешено отключать таймер блокировки'; +$lang['fck_preview'] = 'FCK предварительного просмотра группы'; +$lang['guest_toolbar'] = 'Отображать ли панель для гостей'; +$lang['guest_media'] = 'Могут ли гости вставлять ссылки на медиа файлы'; +$lang['open_upload'] = 'Могут ли гости загружать файлы'; +$lang['default_fb'] = 'Доступ для просмотра файлов по умолчанию. Если выбрать none, то ACL не будет использоваться.'; +$lang['openfb'] = 'Открытый просмотр файлов. Это дает пользователю доступ ко всей структуре папок, несмотря на то, имеет ли он права на это или нет. При этом ACL применяется для разрешения загрузки.'; +$lang['dw_edit_display'] = 'Выбрать, какие пользователи имеют доступ к кнопке "Редактор DokuWiki". Варианты: "all"- для всех; "admin"- только для администраторов и менеджеров; "none" - ни для кого'; +$lang['smiley_as_text'] = 'Отображение смайлов в виде текста в CKeditor (будут по-прежнему отображаться как изображения в браузере)'; +$lang['editor_bak'] = 'Сохранить резервную копию/<namespace>.ckgedit'; +$lang['create_folder'] = 'Включить кнопку создания папки в файловом браузере (да/нет)'; +$lang['dwedit_ns'] = 'Разделение запятыми список имен и/или страниц, где ckgedit автоматически переключается на родной Вики редактор; принимает частичные совпадения.'; +$lang['acl_del'] = 'По умолчанию (флажок не установлен) пользователи с разрешением на загрузку могут удалять медиафайлы; если флажок установлен, то для удаления из папки пользователю требуется разрешение на удаление.'; +$lang['auth_ci'] = 'Нечувствительный к регистру Логин id, так что можно войти и как USER и как user.'; +$lang['nix_style'] = 'Для серверов Windows (Vista и более поздние версии). Этот параметр делает возможным доступ к данным\медиа через ckgedit\CKeditor\Пользовательские файлы, если ссылки на медиа и файлы были успешно создан в пользовательских файлах.'; +$lang['no_symlinks'] = 'Отключить автоматическое создание символических ссылок в ckgedit/Пользовательских файлах.'; +$lang['direction'] = 'Установить языковое направление в CKeditor. nocheck: ckgedit оставит направление языка по умолчанию; dokuwiki: примет языковые настройки стандартного редактора Dokuwiki; ltr: С лева на право ; rtl: С права на лево.'; +$lang['scayt_auto'] = 'Автоматически включить SCAYT орфографии. По умолчанию используется "ВКЛ.". Чтобы отключить SCAYT выберите "Выкл."'; +$lang['scayt_lang'] = 'Установить SCAYT языком по умолчанию.'; +$lang['smiley_hack'] = 'Сбросьте URL-адрес для смайликов CKEditor при переходе на новый сервер. Это делается постранично, когда страница загружается для редактирования и сохраняется. Обычно эта опция должна быть отключена.'; +$lang['complex_tables'] = 'Используйте алгоритм сложных таблиц. В отличие от стандартного разбора таблиц, это должно дать лучшие результаты при смешивании сложных схем rowspans и colspans. Но немного больше времени обработки.'; +$lang['duplicate_notes'] = 'Установите это значение на true, если пользователи создают несколько сносок с одним и тем же текстом сноски; требуется для предотвращения повреждения заметок.'; +$lang['winstyle'] = 'Используйте прямой путь к каталогу media вместо fckeditor/userfiles. Эта функция копирует
fckeditor/userfiles/.htaccess.security в data/media/.htaccess; если нет, то это должно быть сделано вручную'; +$lang['other_lang'] = 'Ваш язык по умолчанию для CKEditor-это язык, установленный для вашего браузера. Однако здесь вы можете выбрать другой язык; он не зависит от языка интерфейса Dokuwiki.'; +$lang['dw_priority'] = 'Сделать Dokuwiki редактором по-умолчанию.'; +$lang['preload_ckeditorjs'] = 'Подгрузить JavaScript ckeditor для ускорения последующей загрузки из редакторе.'; +$lang['nofont_styling'] = 'Отображение стилей шрифтов в редакторе в виде разметки плагина. Посмотреть страницу плагина ckgedit в Dokuwiki.org для получения подробной информации.'; +$lang['font_options'] = 'Удалить параметры шрифта.'; +$lang['color_options'] = 'Удалить цветовые варианты.'; +$lang['alt_toolbar'] = 'Функциями для того чтобы извлечь компоненты из панели инструментов'; +$lang['mfiles'] = 'Включить поддержку mfile'; +$lang['extra_plugins'] = 'Разделенный запятыми список дополнительных плагинов Ckeditor, которые будут добавлены на панель инструментов. См. Плагин ckgedit страница конфигурации для получения более подробной информации'; +$lang['dw_users'] = 'Имя группы пользователей, редактор которых по умолчанию использует редактор Dokuwiki при выборе dw_priority. Если не определено, то все пользователи получают собственный редактор Dokuwiki, когда выбран dw_priority.'; +$lang['allow_ckg_filebrowser'] = 'Выберите, какие файловый/медиа браузеры могут использовать пользователи'; +$lang['default_ckg_filebrowser'] = 'Выберите, какой файловый/медиа браузер используется по умолчанию. Это будет переопределено, если выбранный браузер не разрешен'; +$lang['captcha_auth'] = 'Уровень ACL, на котором капча отключается, когда параметр forusers плагина captcha установлен в true. Значение по умолчанию - ACL_CREATE, которая означает, что любой пользователь с помощью ACL_EDIT или меньше, будут получать капчу, ACL_CREATE или высшее не будет.'; +$lang['htmlblock_ok'] = 'При использовании HTML_BLOCKs необходимо включить либо этот параметр, либо опцию htmlok Dokuwiki. Он не представляет такого же уровня риска для безопасности, как htmlok. Тем не менее, он должен использоваться только в доверенной пользовательской среде, а не в открытой вики.'; +$lang['dblclk'] = 'Установите значение off, чтобы отключить функцию двойного щелчка, которая позволяет редактировать разделы с помощью редактора Dokuwiki (см.: direct_access_to_dokuwiki_editor) '; +$lang['preserve_enc'] = 'Сохранение urlencoding в URL-адресах, когда активна опция dokuwiki deaccent.'; +$lang['gui'] = 'Выберите графический интерфейс CKEditor.'; +$lang['rel_links'] = 'Активируйте поддержку относительных внутренних и графических ссылок'; diff --git a/lib/plugins/ckgedit/lang/sr/lang.php b/lib/plugins/ckgedit/lang/sr/lang.php new file mode 100644 index 0000000..d585f6c --- /dev/null +++ b/lib/plugins/ckgedit/lang/sr/lang.php @@ -0,0 +1,41 @@ + + */ +$lang['btn_dw_edit'] = 'DW уређивање'; +$lang['dw_btn_fck_preview'] = 'CKG претпреглед'; +$lang['dw_btn_lang'] = 'Језик'; +$lang['title_dw_delete'] = 'Обриши страницу'; +$lang['title_dw_edit'] = 'Сачувај урађено, изађи и пребаци ме на домаћи уређивач Докувикија'; +$lang['dw_btn_revert'] = 'Опозови'; +$lang['title_dw_revert'] = 'Опозови на претходну резерву'; +$lang['title_dw_lang'] = 'Изабери језик провере правописа'; +$lang['title_dw_cancel'] = 'Изађи из уређивача'; +$lang['btn_fck_edit'] = 'CKG уређивање'; +$lang['confirm_delete'] = 'Да ли сте сигурни да желите обрисати ову страницу?'; +$lang['confirm_preview'] = 'Несачувани рад ће бити изгубљен.'; +$lang['editor_height'] = 'Висина уређивача'; +$lang['editor_height_title'] = 'Промени величину уређивача при поновном учитавању'; +$lang['dw_btn_backup'] = 'Направи резерву'; +$lang['title_dw_backup'] = 'Направи резерву прозора уређивача и обнови катанац'; +$lang['backup_empty'] = 'Остава за резерве делује празно. Да ли желите да наставите?'; +$lang['btn_draft'] = 'Направи нацрт'; +$lang['title_draft'] = 'Погледај, прикажи, уреди нацрт'; +$lang['btn_exit_draft'] = 'Изађи из нацрта'; +$lang['title_exit_draft'] = 'Врати се на тренутни документ'; +$lang['draft_msg'] = 'Овај документ садржи нацрт датотеку. Дугме за нацрте ће мењати између приказа овог документа и нацрта. Можете мењати и сачувати било који примерак.'; +$lang['whats_this'] = 'шта је ово?'; +$lang['complex_tables'] = 'Омогући сложене табеле'; +$lang['minor_changes'] = 'Мање измене'; +$lang['discard_edits'] = 'Да сачувате ваше измене кликните на „У реду“, за одбацивање кликните на „Откажи“'; +$lang['dw_btn_styling'] = 'Уреди фонтове'; +$lang['title_styling'] = 'Отвори и прикажи стилове фонтова као маркап'; +$lang['js']['font_err_1'] = 'Стилизовање фонтова се не може укључити у везе. Кликните на „У реду“ да прихватите следећу исправку:'; +$lang['js']['font_err_throw'] = 'Грешка у форматирању фонта'; +$lang['js']['dwp_save_err'] = 'Не могу да сачувам измене у:'; +$lang['js']['on'] = 'укључено'; +$lang['js']['off'] = 'искључено'; +$lang['uprofile_title'] = 'Изаберите подразумеваног уређивача'; diff --git a/lib/plugins/ckgedit/lang/sv/lang.php b/lib/plugins/ckgedit/lang/sv/lang.php new file mode 100644 index 0000000..936cd19 --- /dev/null +++ b/lib/plugins/ckgedit/lang/sv/lang.php @@ -0,0 +1,34 @@ + + */ +$lang['btn_dw_edit'] = 'DW-redigerare'; +$lang['dw_btn_fck_preview'] = 'CKG-förhandsvisning'; +$lang['dw_btn_lang'] = 'Språk'; +$lang['title_dw_delete'] = 'Ta bort sida'; +$lang['dw_btn_revert'] = 'Återgå'; +$lang['title_dw_revert'] = 'Återgå till föregående säkerhetskopia'; +$lang['title_dw_lang'] = 'Välj språk för stavningskontroll'; +$lang['title_dw_cancel'] = 'Avsluta redigerare'; +$lang['confirm_delete'] = 'Är du säker på att du vill ta bort denna sida?'; +$lang['confirm_preview'] = 'Ändringar som inte sparats kommer att gå förlorade.'; +$lang['editor_height'] = 'Höjd på redigerare'; +$lang['dw_btn_backup'] = 'Säkerhetskopia'; +$lang['title_draft'] = 'Visa, redigera utkast'; +$lang['btn_exit_draft'] = 'Avsluta utkast'; +$lang['title_exit_draft'] = 'Återgå till nuvarande dokument'; +$lang['whats_this'] = 'vad är detta?'; +$lang['complex_tables'] = 'Aktivera komplexa tabeller'; +$lang['minor_changes'] = 'Mindre ändringar.'; +$lang['discard_edits'] = 'För att spara dina ändringar klicka OK; för att förkasta klicka på Avbryt'; +$lang['dw_btn_styling'] = 'Redigera fypsnitt'; +$lang['js']['dwp_save_err'] = 'Kunde inte spara ändringar till:'; +$lang['js']['on'] = 'på'; +$lang['js']['off'] = 'av'; +$lang['uprofile_title'] = 'Välj din standardredigerare'; +$lang['sym_not created_1'] = 'Kunde inte skapa'; +$lang['on'] = 'på'; +$lang['off'] = 'av'; diff --git a/lib/plugins/ckgedit/lang/sv/settings.php b/lib/plugins/ckgedit/lang/sv/settings.php new file mode 100644 index 0000000..00cc38c --- /dev/null +++ b/lib/plugins/ckgedit/lang/sv/settings.php @@ -0,0 +1,16 @@ + + */ +$lang['guest_toolbar'] = 'Visa verktygsfält för besökare'; +$lang['guest_media'] = 'Besökare kan länka till mediafiler'; +$lang['open_upload'] = 'Besökare kan ladda uopp'; +$lang['create_folder'] = 'Aktivera knapp för att skapa ny katalog i filhanteraren (j/n)'; +$lang['scayt_lang'] = 'Välj SCAYT-standardspråk'; +$lang['font_options'] = 'Ta bort typsnittsalternativ.'; +$lang['color_options'] = 'Ta bort färgalternativ.'; +$lang['mfiles'] = 'Aktivera mfile-stöd'; +$lang['rel_links'] = 'Aktivera stöd för relativa interna- och bildlänkar'; diff --git a/lib/plugins/ckgedit/lang/vi/lang.php b/lib/plugins/ckgedit/lang/vi/lang.php new file mode 100644 index 0000000..98050aa --- /dev/null +++ b/lib/plugins/ckgedit/lang/vi/lang.php @@ -0,0 +1,72 @@ + + */ +$lang['btn_dw_edit'] = 'Sửa đổi bằng DW'; +$lang['dw_btn_fck_preview'] = 'Xem trước bằng CKG'; +$lang['dw_btn_lang'] = 'Ngôn ngữ'; +$lang['title_dw_delete'] = 'Xóa trang'; +$lang['title_dw_edit'] = 'Lưu công việc, thoát và chuyển sang Trình soạn thảo DokuWiki gốc'; +$lang['dw_btn_revert'] = 'Lùi lại'; +$lang['title_dw_revert'] = 'Lùi về bản sao lưu trước'; +$lang['title_dw_lang'] = 'Chọn ngôn ngữ để kiểm tra chính tả'; +$lang['title_dw_cancel'] = 'Thoát Trình chỉnh sửa'; +$lang['btn_fck_edit'] = 'Trình sửa đổi CKG'; +$lang['confirm_delete'] = 'Bạn có chắc chắn muốn xóa trang này?'; +$lang['confirm_preview'] = 'Bất kỳ công việc chưa được lưu sẽ bị mất.'; +$lang['editor_height'] = 'Chiều cao Trình sửa đổi'; +$lang['editor_height_title'] = 'Kích thước lại Trình sửa đổi khi tải lại'; +$lang['dw_btn_backup'] = 'Sao lưu'; +$lang['title_dw_backup'] = 'Sao lưu cửa sổ trình sửa đổi và gia hạn mới khóa'; +$lang['backup_empty'] = 'Bộ đệm sao lưu dường như trống rỗng. Bạn có muốn tiếp tục?'; +$lang['btn_draft'] = 'Nhận bản nháp'; +$lang['title_draft'] = 'Xem, hiển thị, sửa đổi bản nháp'; +$lang['btn_exit_draft'] = 'Thoát bản nháp'; +$lang['title_exit_draft'] = 'Quay trở lại tài liệu hiện tại'; +$lang['draft_msg'] = 'Tài liệu này có một tập tin nháp. Nút bản nháp đảo chiều giữa tài liệu này và bản nháp. Bạn có thể sửa đổi và lưu một trong hai.'; +$lang['whats_this'] = 'đây là gì?'; +$lang['complex_tables'] = 'Kích hoạt bảng phức tạp'; +$lang['minor_changes'] = 'Thay đổi nhỏ'; +$lang['discard_edits'] = 'Nhấn OK để lưu các sửa đổi của bạn; nhấn Hủy bỏ để hủy bỏ.'; +$lang['dw_btn_styling'] = 'Sửa đổi phông chữ'; +$lang['title_styling'] = 'Mở với các kiểu phông chữ được hiển thị dưới dạng đánh dấu'; +$lang['js']['font_err_1'] = 'Kiểu phông chữ có thể được bao gồm trong các liên kết. Nhấn OK để chấp nhận điều chỉnh sau:'; +$lang['js']['font_err_2'] = 'Để xem lại, hãy nhập đánh dấu liên kết Dokuwiki đầy đủ bên dưới, bao gồm cả dấu ngoặc. Để quay về Trình chỉnh sửa, nhấp vào Hủy bỏ.'; +$lang['js']['font_err_throw'] = 'Lỗi định dạng phông chữ'; +$lang['js']['dwp_save_err'] = 'Không thể lưu các thay đổi thành:'; +$lang['js']['dwp_updated'] = 'Trình sửa đổi ưu tiên được cập nhật thành:'; +$lang['js']['dwp_not_sel'] = 'Chưa chọn Trình sửa đổi ưu tiên: nó sẽ được xác định bởi cài đặt cấu hình nhóm dw_users'; +$lang['js']['mediamgr_notice'] = 'Sử dụng hộp thoại liên kết để chèn'; +$lang['js']['font_conflict'] = 'Trình phân tích cú pháp tìm thấy một hoặc nhiều xung đột phông chữ liên kết. Bằng cách nhấn vào OK, bạn có thể quay lại trình sửa đổi và xóa các kiểu phông chữ. Để biết thêm thông tin xem: https://www.dokuwiki.org/plugin:ckgedit:font_styling#conflicts_with_dokuwiki_links'; +$lang['js']['ckg_paste_restart'] = 'Khi tải lại trình sửa đổi, hỗ trợ dán bổ sung sẽ được bật'; +$lang['js']['on'] = 'bật'; +$lang['js']['off'] = 'tắt'; +$lang['js']['broken_image_1'] = 'Sử dụng plugin imagePaste với Quản lý phương tiện Dokuwiki hoặc dùng thử Công cụ dán MS Word.'; +$lang['js']['broken_image_2'] = 'Hình ảnh Ctrl-v với dữ liệu thô trên 2,5M có thể bị treo. Hình ảnh này là:'; +$lang['mediamgr_imgonly'] = 'Chỉ sử dụng Hộp thoại Hình ảnh cho hình ảnh, Hộp thoại Liên kết cho các phương tiện khác. Tập tin này là:'; +$lang['uprofile_title'] = 'Chọn Trình sửa đổi mặc định của bạn'; +$lang['btn_val_dw_fb'] = 'Trình duyệt tập tin DW'; +$lang['btn_val_ckg_fb'] = 'Trình duyệt tập tin CKG'; +$lang['btn_title_dw_fb'] = 'Lưu và đóng trình sửa đổi và chuyển sang Trình duyệt tập tin DW'; +$lang['btn_title_ckg_fb'] = 'Lưu và đóng trình sửa đổi và chuyển sang Trình duyệt tập tin CKG'; +$lang['formatdel'] = 'Đánh dấu bị xóa khỏi (các) đầu đề: không được Dokuwiki hỗ trợ'; +$lang['fontdel'] = 'Xóa phông chữ đánh dấu khỏi (các) liên kết: không được Dokuwiki hỗ trợ'; +$lang['ckgcke_conflict'] = 'Một bản sao của ckgedit đã được phát hiện. Ckgedit này hoặc ckgedit kia phải bị vô hiệu hóa.'; +$lang['ws_cantcopy'] = 'Để thiết lập winstyle: không thể sao chép vào'; +$lang['ws_copiedhtaccess'] = 'Để thiết lập winstyle, sao chép .htaccess được kích hoạt bảo mật vào dữ liệu/phương tiện +Xem ckgedit/fckeditor/userfiles/.htacess.security'; +$lang['userfiles_perm'] = 'Vui lòng kiểm tra quyền; ckgedit không thể truy cập'; +$lang['sym_not created_1'] = 'Không thể tạo'; +$lang['sym_not created_2'] = 'Không thể tạo liên kết tượng trưng cho trình duyệt tập tin: không thể truy cập:'; +$lang['sym_not created_3'] = 'Đã xảy ra lỗi khi cố gắng tạo liên kết tượng trưng trong'; +$lang['syms_created'] = 'Các liên kết sau đã được tạo trong thư mục userfiles:'; +$lang['dblclk'] = 'Tính năng mới: nhấn đúp vào cửa sổ trình duyệt để sửa đổi phần tại con trỏ bằng Trình sửa đổi DW. Xem: direct_access_to_dokuwiki_editor. '; +$lang['dblclk_reminder'] = 'Nhắc nhở '; +$lang['ckg_img_paste'] = 'Bật hỗ trợ dán hình ảnh bổ sung'; +$lang['ckg_img_paste_title'] = 'Tắt để tránh dán hai lần hoặc bật để kích hoạt dán'; +$lang['on'] = 'bật'; +$lang['off'] = 'tắt'; +$lang['broken_image'] = 'Sử dụng plugin imagePaste với Quản lý phương tiện Dokuwiki hoặc dùng thử Công cụ dán của MS Word. Dữ liệu thô của hình ảnh Ctrl-v trên 2,5M có thể bị treo. Hình ảnh này là:'; diff --git a/lib/plugins/ckgedit/lang/vi/merger.txt b/lib/plugins/ckgedit/lang/vi/merger.txt new file mode 100644 index 0000000..ed57057 --- /dev/null +++ b/lib/plugins/ckgedit/lang/vi/merger.txt @@ -0,0 +1,2 @@ + - Phiên bản này của [[doku>plugin:ckgedit|ckgedit]] nâng cấp CKEditor từ 4.9 lên 4.10, giúp cập nhật và cải tiến javascript. + - Với bản nâng cấp lên 4.9, ckgedit được hợp nhất với [[doku>plugin:ckgdoku|ckgdoku]]. Xem ckgdoku's [[doku>plugin:ckgdoku#configuration|tùy chọn cấu hình]]. \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/vi/scayt.txt b/lib/plugins/ckgedit/lang/vi/scayt.txt new file mode 100644 index 0000000..3d95fdd --- /dev/null +++ b/lib/plugins/ckgedit/lang/vi/scayt.txt @@ -0,0 +1 @@ +Trình kiểm tra chính tả Scayt cung cấp ba Tùy chọn cấu hình: on (bật), off (tất), disabled (vô hiệu hóa). Bây giờ, cài đặt mặc định sẽ là **off** thay vì **on**. Với **on** nội dung của trình sửa đổi được Scayt phân tích cú pháp và gửi đến máy chủ Scayt để kiểm tra chính tả. Mặc dù không có lý do nào để tin rằng đây là rủi ro bảo mật, tuy nhiên thay đổi này đang được xem xét cho người dùng có wiki riêng có thể cảm thấy lo lắng khi dữ liệu của họ được gửi đến máy chủ từ xa. Thông tin thêm có thể được tìm thấy trong trang Tùy chọn cấu hình của tài liệu ckgedit tại https://www.dokuwiki.org/plugin:ckgedit:configuration#scayt_lang. \ No newline at end of file diff --git a/lib/plugins/ckgedit/lang/vi/settings.php b/lib/plugins/ckgedit/lang/vi/settings.php new file mode 100644 index 0000000..824bd8d --- /dev/null +++ b/lib/plugins/ckgedit/lang/vi/settings.php @@ -0,0 +1,48 @@ + + */ +$lang['groups'] = 'Nhóm được phép vô hiệu hóa bộ đếm thời gian khóa (lỗi thời)'; +$lang['fck_preview'] = 'Nhóm xem trước FCK'; +$lang['guest_toolbar'] = 'Hiển thị thanh công cụ cho Khách'; +$lang['guest_media'] = 'Khách có thể liên kết đến tập tin phương tiện'; +$lang['open_upload'] = 'Khách có thể tải lên'; +$lang['default_fb'] = 'Truy cập duyệt tập tin mặc định. Không có, acl không áp dụng.'; +$lang['openfb'] = 'Mở Duyệt Tập tin. Điều này cho phép thành viên truy cập vào toàn bộ cấu trúc đường dẫn, cho dù thành viên có quyền hay không. ACL vẫn áp dụng cho tải lên.'; +$lang['dw_edit_display'] = 'Kiểm soát những thành viên có quyền truy cập vào nút "Trình sửa đổi DW". Lựa chọn: "all" cho tất cả thành viên; "admin" chỉ dành cho quản trị viên và người quản lý; "none" không ai có thể truy cập. Mặc định là "all".'; +$lang['smiley_as_text'] = 'Hiển thị mặt cười dưới dạng văn bản trong CKeditor (vẫn sẽ hiển thị dưới dạng hình ảnh trong trình duyệt)'; +$lang['editor_bak'] = 'Lưu bản sao lưu vào meta/<namespace>.ckgedit'; +$lang['create_folder'] = 'Kích hoạt nút tạo thư mục trong trình duyệt tập tin (y/n)'; +$lang['dwedit_ns'] = 'Danh sách các không gian tên và/hoặc trang được phân tách bằng dấu phẩy nơi ckgedit tự động chuyển sang Trình sửa đổi DokuWiki gốc; chấp nhận một phần phù hợp.'; +$lang['acl_del'] = 'Mặc định (hộp không được đánh dấu) cho phép thành viên có quyền tải lên để xóa các tập tin phương tiện; nếu hộp được đánh dấu, thì thành viên cần xóa quyền xóa khỏi thư mục.'; +$lang['auth_ci'] = 'Id đăng nhập thành viên không phân biệt chữ hoa chữ thường, nghĩa là bạn có thể đăng nhập với tư cách là cả THÀNH VIÊN và thành viên'; +$lang['nix_style'] = 'Dành cho Windows Servers (Vista trở lên). Cài đặt này cho phép truy cập data\media thông qua ckgedit\CKeditor\userfiles, nếu liên kết đến phương tiện và tập tin đã được tạo thành công trong tập tin người dùng'; +$lang['no_symlinks'] = 'Vô hiệu hóa tự động tạo các liên kết tượng trưng trong ckgedit/userfiles. Tùy chọn này nên được tắt khi cập nhật.'; +$lang['direction'] = 'Đặt hướng ngôn ngữ trong CKeditor: nocheck: ckgedit sẽ không thay đổi cài đặt hướng mặc định; dokuwiki: hướng ngôn ngữ Dokuwiki hiện tại; ltr: Trái sang phải ; rtl: Phải sang trái.'; +$lang['scayt_auto'] = 'Đặt có hay không trình kiểm tra chính tả khi nhập Scayt đang hoạt động khi khởi động. Mặc định là off;người dùng có thể kích hoạt lại kiểm tra chính tả trên cơ sở mỗi trang. Để xóa hoàn toàn trình kiểm tra chính tả Scayt, chọn disable. (Xem ckgedit:configuration#scayt_auto") '; +$lang['scayt_lang'] = 'Đặt ngôn ngữ mặc định SCAYT.'; +$lang['smiley_hack'] = 'Đặt lại URL cho mặt cười của CKeditor khi chuyển sang máy chủ mới. Điều này được thực hiện trên một trang theo cơ sở trang khi trang được tải để sửa đổi và lưu. Tùy chọn này thường nên được tắt.'; +$lang['complex_tables'] = 'Sử dụng thuật toán bảng phức tạp. Trái ngược với phân tích cú pháp tiêu chuẩn của các bảng, điều này sẽ cho kết quả tốt hơn khi trộn các sắp xếp phức tạp của các rowspans và colspans. Nhưng thời gian xử lý nhiều hơn một chút.'; +$lang['duplicate_notes'] = 'Đặt điều này thành đúng nếu thành viên tạo nhiều chú thích với cùng một văn bản chú thích; cần thiết để ngăn ghi chú bị hỏng.'; +$lang['winstyle'] = 'Sử dụng đường dẫn trực tiếp đến đường dẫn phương tiện thay vì fckeditor/userfiles. Chức năng này sao chép
fckeditor/userfiles/.htaccess.security đến data/media/.htaccess; nếu không, điều này nên được thực hiện thủ công'; +$lang['other_lang'] = 'Ngôn ngữ mặc định của bạn cho CKEditor là ngôn ngữ được đặt cho trình duyệt của bạn. Tuy nhiên, bạn có thể chọn một ngôn ngữ khác ở đây; nó độc lập với ngôn ngữ giao diện Dokuwiki.'; +$lang['dw_priority'] = 'Đặt trình sửa đổi Dokuwiki làm trình sửa đổi mặc định: không hoạt động trong các trang trại'; +$lang['preload_ckeditorjs'] = 'Tải trước javascript của ckeditor để tăng tốc độ tải trình sửa đổi sau'; +$lang['nofont_styling'] = 'Hiển thị kiểu phông chữ trong trình sửa đổi dưới dạng đánh dấu plugin. Xem trang plugin ckgedit tại Dokuwiki.org để biết chi tiết.'; +$lang['font_options'] = 'Xóa tùy chọn phông chữ.'; +$lang['color_options'] = 'Xóa tùy chọn màu.'; +$lang['alt_toolbar'] = 'Các chức năng muốn loại bỏ khỏi thanh công cụ CKEditor.

Bất kỳ chức năng nào khác có thể được loại bỏ bằng cách đưa chúng vào danh sách được phân tách bằng dấu phẩy trong hộp văn bản:

Bold (In đậm), Italic (In nghiêng), Underline (Gạch chân), Strike (Gạch xuyên ngang), Subscript (Chỉ số dưới), Superscript (Chỉ số trên), RemoveFormat (Xóa định dạng), Find (Tìm), Replace (Thay thế), SelectAll (Chọn tất cả), Scayt (Kiểm tra chính tả Scayt), Image (Hình ảnh), Table (Bảng), Tags (Thẻ), Link (Liên kết), Unlink (Bỏ liên kết), Format (Định dạng), Styles (Kiểu cách),TextColor (Màu văn bản), BGColor (Màu nền), NumberedList (Danh sách đánh số), BulletedList (Danh sách không đánh số), Cut (Cắt), Copy (Sao chép), Paste (Dán), PasteText (Dán văn bản thường), PasteFromWord (Dán từ Word), Undo (Hoàn tác), Redo (Làm lại), Source (Nguồn), Maximize (Phóng to), About (Về).'; +$lang['mfiles'] = 'Cho phép hỗ trợ mfile'; +$lang['extra_plugins'] = 'Danh sách các plugin Ckeditor được phân tách bằng dấu phẩy được thêm vào thanh công cụ. Xem trang cấu hình plugin của ckgedit để biết chi tiết'; +$lang['dw_users'] = 'Tên nhóm thành viên có trình sửa đổi mặc định cho trình soạn thảo Dokuwiki khi dw_priority được chọn. Nếu không được xác định, thì tất cả thành viên sẽ nhận được trình sửa đổi Dokuwiki riêng khi dw_priority được chọn'; +$lang['allow_ckg_filebrowser'] = 'Chọn trình duyệt Tập tin/phương tiện thành viên có thể sử dụng'; +$lang['default_ckg_filebrowser'] = 'Chọn trình duyệt Tập tin/phương tiện mặc định. Điều này sẽ bị ghi đè nếu trình duyệt được chọn không được phép'; +$lang['captcha_auth'] = 'Mức độ ACL mà captcha bị tắt khi tùy chọn forusers của plugin captcha được đặt thành đúng. Mặc định là ACL_CREATE, có nghĩa là bất kỳ thành viên nào với ACL_EDIT hoặc ít hơn sẽ có được captcha ACL_CREATE hoặc cao hơn sẽ không.'; +$lang['htmlblock_ok'] = 'Khi sử dụng HTML_BLOCKs cài đặt này hoặc tùy chọn htmlok của Dokuwiki phải được kích hoạt. Nó không gây ra mức độ rủi ro bảo mật tương tự như htmlok. Tuy nhiên, nó chỉ nên được sử dụng trong môi trường thành viên đáng tin cậy chứ không phải trong wiki mở.'; +$lang['dblclk'] = 'Đặt off để tắt tính năng nhấp đúp cho phép sửa đổi phần bằng trình sửa đổi Dokuwiki (xem: direct_access_to_dokuwiki_editor)'; +$lang['preserve_enc'] = 'Giữ nguyên urlencoding trong url khi tùy chọn vô hiệu hóa dokuwiki đang hoạt động.'; +$lang['gui'] = 'Chọn GUI CKEditor.'; +$lang['rel_links'] = 'Kích hoạt hỗ trợ cho các liên kết hình ảnh và nội bộ liên quan'; diff --git a/lib/plugins/ckgedit/lang/zh-tw/lang.php b/lib/plugins/ckgedit/lang/zh-tw/lang.php new file mode 100644 index 0000000..e753278 --- /dev/null +++ b/lib/plugins/ckgedit/lang/zh-tw/lang.php @@ -0,0 +1,34 @@ + + */ +$lang['btn_dw_edit'] = 'DW編輯'; +$lang['dw_btn_fck_preview'] = 'CKG預覽'; +$lang['dw_btn_lang'] = '語言'; +$lang['title_dw_delete'] = '刪除頁面'; +$lang['title_dw_edit'] = '存檔離開後切換到預設編輯器'; +$lang['dw_btn_revert'] = '還原'; +$lang['title_dw_revert'] = '還原備份檔'; +$lang['title_dw_lang'] = '選擇拼字檢查的語言'; +$lang['title_dw_cancel'] = '離開編輯器'; +$lang['btn_fck_edit'] = 'CKG編輯'; +$lang['confirm_delete'] = '確定要刪除頁面嗎?'; +$lang['confirm_preview'] = '你將會遺失尚未儲存的資料'; +$lang['editor_height'] = '編輯器高度'; +$lang['editor_height_title'] = '編輯器於頁面刷新時,重新調整大小'; +$lang['dw_btn_backup'] = '備份'; +$lang['title_dw_backup'] = '備份現在的資料並更新鎖定定時器'; +$lang['backup_empty'] = '備份暫存區沒有資料可提供還原,仍要繼續嗎?'; +$lang['btn_draft'] = '載入草稿'; +$lang['title_draft'] = '檢視並編輯草稿'; +$lang['btn_exit_draft'] = '編輯草稿'; +$lang['title_exit_draft'] = '返回現行的檔案'; +$lang['draft_msg'] = '有份編輯一半的草稿。請用下方的草稿鈕繼續編輯或移除'; +$lang['whats_this'] = '這是什麼?'; +$lang['complex_tables'] = '使用複雜性表格'; +$lang['minor_changes'] = '微小修訂'; +$lang['discard_edits'] = '按 OK 以儲存你的修改,按 Cancel 放棄你的修改'; +$lang['dw_btn_styling'] = '字形'; diff --git a/lib/plugins/ckgedit/lang/zh-tw/settings.php b/lib/plugins/ckgedit/lang/zh-tw/settings.php new file mode 100644 index 0000000..74ee2f7 --- /dev/null +++ b/lib/plugins/ckgedit/lang/zh-tw/settings.php @@ -0,0 +1,22 @@ + + * @author chenb + * @author 2576562185 <2576562185@qq.com> + */ +$lang['btn_dw_edit'] = 'DW 原生编辑器'; +$lang['dw_btn_fck_preview'] = 'CKG 预览'; +$lang['dw_btn_lang'] = '语言'; +$lang['title_dw_delete'] = '删除页面'; +$lang['title_dw_edit'] = '保存并退出,并切换回原生DokuWiki编辑器'; +$lang['dw_btn_revert'] = '回滚'; +$lang['title_dw_revert'] = '回滚到上次备份'; +$lang['title_dw_lang'] = '选择需拼写检查的语言'; +$lang['title_dw_cancel'] = '退出编辑器'; +$lang['btn_fck_edit'] = 'CKG 可视编辑器'; +$lang['confirm_delete'] = '您确定要删除这个页面吗?'; +$lang['confirm_preview'] = '未经存储的改动将会丢失。'; +$lang['editor_height'] = '编辑器高度'; +$lang['editor_height_title'] = '打开时重置编辑器大小'; +$lang['dw_btn_backup'] = '备份'; +$lang['title_dw_backup'] = "备份编辑器窗口和更新锁定"; +$lang['backup_empty'] = "备份缓冲区似乎为空。 你想继续吗?"; +$lang['btn_draft'] = '获取草稿'; +$lang['title_draft'] = '查看、展示、编辑草稿'; +$lang['btn_exit_draft'] = '退出草稿'; +$lang['title_exit_draft'] = '返回到当前文档'; +$lang['draft_msg'] = '此文档有一份草稿。“草稿”按钮可在文档与草稿间来回切换。你可以独立地编辑、保存它们。'; +$lang['whats_this'] = '这是什么?'; +$lang['complex_tables'] = '启用复杂型表格'; +$lang['minor_changes'] = '小修改'; +$lang['discard_edits'] = '点“确定”保存,点“取消”撤销修改'; +$lang['dw_btn_styling'] = '修改字体'; +$lang['title_styling'] = '以显示为Markup标记的字体样式打开'; +$lang['js']['font_err_1'] = '字体样式不能包含在链接中。 单击确定以接受以下更正:'; +$lang['js']['font_err_2'] = '要进行修订,请在下面输入完整的Dokuwiki链接标记,包括方括号。 要返回编辑器,请单击“取消”。'; +$lang['js']['font_err_throw'] = '字体格式错误'; +$lang['js']['dwp_save_err'] = '无法将更改保存到:'; +$lang['js']['dwp_updated'] = '编辑器优先级已更新为:'; +$lang['js']['dwp_not_sel'] = '未选择编辑器优先级:它将由dw_users组配置设置确定'; +$lang['js']['mediamgr_notice'] = '使用链接对话框插入'; +$lang['js']['font_conflict'] = "解析器发现一个或多个链接字体冲突。 通过单击“确定”,您可以返回到编辑器并删除字体样式。 有关更多信息,请参见:https://www.dokuwiki.org/plugin:ckgedit:font_styling#conflicts_with_dokuwiki_links"; +$lang['mediamgr_imgonly'] = '“图像对话框”仅用于图像,“链接对话框”用于其他媒体。 该文件是:'; +$lang['uprofile_title'] = '选择您的默认编辑器'; +$lang['btn_val_dw_fb'] = 'DW 文件浏览器'; +$lang['btn_val_ckg_fb'] = 'CKG 文件浏览器'; +$lang['btn_title_dw_fb'] = '保存并关闭当前编辑器并切换至 DW 文件浏览器'; +$lang['btn_title_ckg_fb'] = '保存并关闭当前编辑器并切换至 CKG 文件浏览器'; +$lang['formatdel'] = '从标题中删除Markup标记:Dokuwiki不支持'; +$lang["fontdel"] ='从链接中删除了字体Markup标记:Dokuwiki不支持'; +$lang["ws_cantcopy"] ='对于winstyle设置:无法复制到'; +$lang["ws_copiedhtaccess"] ='对于winstyle设置,复制 security-enabled .htaccess 到 data/media' ."\n" .'参见 ckgedit/fckeditor/userfiles/.htacess.security'; +$lang["userfiles_perm"] ='请检查权限; ckgedit无法访问'; +$lang['sym_not created_1'] = '无法创建'; +$lang["sym_not created_2"] = '无法为文件浏览器创建符号链接:无法访问:'; +$lang["sym_not created_3"] = '尝试在其中创建符号链接时发生错误'; +$lang["syms_created"] = '在userfiles目录中创建了以下链接:'; +$lang['dblclk'] ="新功能: 双击浏览器窗口以打开DW编辑器,以便在光标处进行章节编辑。 参见: direct_access_to_dokuwiki_editor. "; +$lang['dblclk_reminder'] = "提醒 "; +$lang['ckg_img_paste'] = '启用辅助图像粘贴支持'; +$lang['ckg_img_paste_title'] = '禁用以防止重复粘贴,或启用以允许粘贴'; +$lang['js']['ckg_paste_restart'] = '重新加载编辑器时,将允许补充粘贴支持'; +$lang['on'] = '启用'; +$lang['off'] = '禁用'; +$lang['js']['on'] = '启用'; +$lang['js']['off'] = '禁用'; +$lang['broken_image'] = "将imagePaste插件与Dokuwiki Mediamanager一起使用,或尝试使用MS Word Paste Tool。 超过2.5M的Ctrl-v图像原始数据可能会挂起。 该图像是:" ; +$lang['js']['broken_image_1'] = "将imagePaste插件与Dokuwiki Mediamanager一起使用,或尝试使用MS Word Paste Tool。"; +$lang['js']['broken_image_2'] = "超过2.5M的Ctrl-v图像原始数据可能会挂起。 该图像是: " ; +$lang['menu'] = 'CKEditor编辑器CSS工具'; +$lang['default_stylesheet'] = '为当前模板创建样式表'; +$lang['alt_stylesheet'] = '为另一个模板创建样式表'; +$lang['style_sheet'] = '创建样式表'; +$lang['style_sheet_msg'] = '为当前模板创建样式表:'; +$lang['alt_style_sheet_msg'] = '为以下对象创建样式表:'; +$lang['checkbox'] = '复制到ckeditor/css'; +$lang['stylesheet_oinfo'] = '信息'; +$lang['stylesheet_cinfo'] = '关闭信息'; +$lang['js']['stylesheet_oinfo'] = '信息'; +$lang['js']['stylesheet_cinfo'] = '关闭信息'; +$lang['js']['lock_msg'] = "您编辑此页面的锁将在一分钟后到期\n"; +$lang['js']['willexpire'] = '您编辑此页面的锁将在一分钟后到期\n 为避免冲突,请使用备份按钮重置锁定计时器。'; diff --git a/lib/plugins/ckgedit/lang/zh/settings.php b/lib/plugins/ckgedit/lang/zh/settings.php new file mode 100644 index 0000000..95ae870 --- /dev/null +++ b/lib/plugins/ckgedit/lang/zh/settings.php @@ -0,0 +1,10 @@ + + */ +$lang['openfb'] = 'Open the file to browse. This gives the user access to the entire directory structure, whether the user has permissions or not. The ACL still applies to uploads.'; +$lang['dw_edit_display'] = 'Control which users can access the "DW Edit" button. Choice: "All" for all users; "Administrator" applies only to administrators and managers; "None" for anyone. The default is "All".'; +$lang['smiley_as_text'] = 'Display emoticons as text in CKeditor (It will still appear as an image in the browser.)'; diff --git a/lib/plugins/ckgedit/locktimer.js b/lib/plugins/ckgedit/locktimer.js new file mode 100644 index 0000000..aa116f6 --- /dev/null +++ b/lib/plugins/ckgedit/locktimer.js @@ -0,0 +1,189 @@ + if(window.dw_locktimer) { + var locktimer = dw_locktimer; +} + + var ourLockTimerRefreshID; + var ourLockTimerIsSet = true; + var ourLockTimerWarningtimerID; + var ourLockTimerIntervalID; + var dwfckTextChanged = false; + var ourLockTimerINI = false; + /** + * event handler + * handles some mousepresses and all keystrokes from CKEditor window + */ + + + function handlekeypress (e) { + if(ourLockTimerIsSet) { + lockTimerRefresh(); + } + window.dwfckTextChanged = true; + } + + + function unsetDokuWikiLockTimer() { + + if(window.locktimer && !ourLockTimerINI) { + locktimer.old_reset = locktimer.reset; + locktimer.old_warning = locktimer.warning; + ourLockTimerINI=true; + } + else { + window.setTimeout("unsetDokuWikiLockTimer()", 600); + + } + + locktimer.reset = function(){ + locktimer.clear(); // alert(locktimer.timeout); + window.clearTimeout(ourLockTimerWarningtimerID); + ourLockTimerWarningtimerID = window.setTimeout(function () { locktimer.warning(); }, locktimer.timeout); + }; + + locktimer.warning = function(){ + window.clearTimeout(ourLockTimerWarningtimerID); + if(ourLockTimerIsSet) { + alert(LANG.plugins.ckgedit.willexpire); + } + else { + alert(LANG.plugins.ckgedit.lock_msg); + } + }; + + + locktimer.ourLockTimerReset = locktimer.reset; + locktimer.our_lasttime = new Date(); + lockTimerRefresh(); + + } + + function lockTimerRefresh(bak) { + var now = new Date(); + if(!ourLockTimerINI) unsetDokuWikiLockTimer(); + + if((now.getTime() - locktimer.our_lasttime.getTime() > 45*1000) || bak){ + var dwform = GetE('dw__editform'); + window.clearTimeout(ourLockTimerWarningtimerID); + var params = 'call=lock&id='+locktimer.pageid; + if(CKEDITOR.instances) { + dwform.elements.wikitext.value = CKEDITOR.instances.wiki__text.getData(); + params += '&prefix='+encodeURIComponent(dwform.elements.prefix.value); + params += '&wikitext='+encodeURIComponent(dwform.elements.wikitext.value); + params += '&suffix='+encodeURIComponent(dwform.elements.suffix.value); + params += '&date='+encodeURIComponent(dwform.elements.date.value); + } + locktimer.our_lasttime = now; + jQuery.post( + DOKU_BASE + 'lib/exe/ajax.php', + params, + function (data) { + try { + var data = JSON.parse(data); + data.draft = data.draft + ' by ckgedit'; + } + catch(err) { + data = data.replace(/auto/,"") + ' by ckgedit'; + } + locktimer.response = data; + locktimer.refreshed(data); + }, + 'html' + ); + } + + } + function resetDokuWikiLockTimer(delete_checkbox) { + + var dom_checkbox = document.getElementById('ckgedit_timer'); + var dom_label = document.getElementById('ckgedit_timer_label'); + locktimer.clear(); + if(ourLockTimerIsSet) { + + ourLockTimerIsSet = false; + locktimer.reset = locktimer.old_reset; + locktimer.refresh(); + return; + } + + if(delete_checkbox) { + dom_checkbox.style.display = 'none'; + dom_label.style.display = 'none'; + } + + ourLockTimerIsSet = true; + locktimer.reset = locktimer.ourLockTimerReset; + lockTimerRefresh(); + + } + +function renewLock(bak) { + if(ourLockTimerIsSet) { + lockTimerRefresh(true); + } + else { + locktimer.refresh(); + } + locktimer.reset(); + + + if(bak) { + var id = "$ID"; + parse_wikitext('bakup'); + + var dwform = GetE('dw__editform'); + if(dwform.elements.fck_wikitext.value == '__false__' ) return; + GetE('saved_wiki_html').innerHTML = CKEDITOR.instances.wiki__text.getData(); // ourFCKEditorNode.innerHTML; + if(($editor_backup) == 0 ) { + return; + } + + var params = "rsave_id=" + encodeURIComponent("$meta_fn"); + params += '&wikitext='+encodeURIComponent(dwform.elements.fck_wikitext.value); + params += '&call=refresh_save'; + jQuery.post( + DOKU_BASE + 'lib/exe/ajax.php', + params, + function (data) { + if(data == 'done') { + show_backup_msg("$meta_id"); + } + else { + alert("error saving: " + id); + } + }, + 'html' + ); + } + +} +function dwfckKeypressInstallHandler() { + if(window.addEventListener){ + oDokuWiki_FCKEditorInstance.EditorDocument.addEventListener('keyup', handlekeypress , false) ; + } + else { + oDokuWiki_FCKEditorInstance.EditorDocument.attachEvent('onkeyup', handlekeypress ) ; + } +} + +function disableDokuWikiLockTimer() { + resetDokuWikiLockTimer(false); + if(ourLockTimerIntervalID) { + window.clearInterval(ourLockTimerIntervalID); + } + if(ourLockTimerIsSet) { + ourLockTimerIntervalID = window.setInterval(function () { locktimer.refresh(); }, 30000); + } +} + +// Make sure that show buttons in top and/or bottom clear the fckl file + function get_showButtons() { + var inputs = document.getElementsByTagName('input'); + + for(var i=0; i + * @author Myron Turner + */ +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +// we inherit from the XHTML renderer instead directly of the base renderer +require_once DOKU_INC.'inc/parser/xhtml.php'; + +/** + * The Renderer + */ +class renderer_plugin_ckgedit extends Doku_Renderer_xhtml +{ + + var $ver_anteater; + var $dwiki_version; + +/** + * Establish version in constructor + * @author Myron Turner + */ + + function __construct() { + global $conf; + $this->ver_anteater = mktime(0,0,0,11,7,2010); + $this->dwiki_version=mktime(0,0,0,01,01,2008); + + if(isset($conf['fnencode'])) { + $this->ver_anteater = mktime(0,0,0,11,7,2010); + $this->dwiki_version=mktime(0,0,0,11,7,2010); + } + else if(function_exists('getVersionData')) { + $verdata= getVersionData(); + if(isset($verdata) && preg_match('/(\d+)-(\d+)-(\d+)/',$verdata['date'],$ver_date)) { + if($ver_date[1] >= 2005 && ($ver_date[3] > 0 && $ver_date[3] < 31) && ($ver_date[2] > 0 && $ver_date[2] <= 12)) { + // month day year + $this->dwiki_version=@mktime(0, 0, 0, $ver_date[2],$ver_date[3], $ver_date[1]); + if(!$this->dwiki_version) $this->dwiki_version = mktime(0,0,0,01,01,2008); + $this->ver_anteater = mktime(0,0,0,11,7,2010); + } + } + } + } + + + /** + * the format we produce + */ + function getFormat() + { + // this should be 'ckgedit' usally, but we inherit from the xhtml renderer + // and produce XHTML as well, so we can gain magically compatibility + // by saying we're the 'xhtml' renderer here. + return 'xhtml'; + } + + + + + /* + * The standard xhtml renderer adds anchors we do not need. + */ + function header($text, $level, $pos) { + // write the header + $this->doc .= DOKU_LF.''; + $this->doc .= $this->_xmlEntities($text); + $this->doc .= "".DOKU_LF; + } + + /* + * The FCKEditor prefers over + */ + function strong_open() + { + + $this->doc .= ''; + } + function strong_close() + { + $this->doc .= ''; + } + + /* + * The FCKEditor prefers over + */ + function deleted_open() + { + $this->doc .= ''; + } + function deleted_close() + { + $this->doc .= ''; + } + + /** + * isolate table from bottom and top editor window margins + * @author Myron Turner + */ + function table_close($pos = NULL) + { + global $conf; + $this->doc .= "\n \n"; + if($this->dwiki_version >= $this->ver_anteater) { + $this->doc .= "
"; + } + } + + function table_open($maxcols = null, $numrows = null, $pos = null, $classes = NULL){ + $this->doc .= "\n \n"; + parent::table_open($maxcols, $numrows, $pos,$classes); + } + /* + * Dokuwiki displays __underlines__ as follows + * underlines + * in the fck editor this conflicts with + * the //italic// style that is displayed as + * italic + * which makes the rathe obvious + */ + function underline_open() + { + $this->doc .= ''; + } + function underline_close() + { + $this->doc .= ''; + } + + function listcontent_open() + { + } + + function listcontent_close() + { + } +} diff --git a/lib/plugins/ckgedit/saferencode b/lib/plugins/ckgedit/saferencode new file mode 100644 index 0000000..e69de29 diff --git a/lib/plugins/ckgedit/script.js b/lib/plugins/ckgedit/script.js new file mode 100644 index 0000000..eda5116 --- /dev/null +++ b/lib/plugins/ckgedit/script.js @@ -0,0 +1,508 @@ +/* + * HTML Parser By John Resig (ejohn.org) + * Original code by Erik Arvidsson, Mozilla Public License + * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js + * @license GPL 3 or later (http://www.gnu.org/licenses/gpl.html) +*/ + +var HTMLParser; +var HTMLParserInstalled=true; +var HTMLParser_Elements = new Array(); +(function(){ + + // Regular Expressions for parsing tags and attributes + var startTag = /^<(\w+)((?:\s+[\w-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, + endTag = /^<\/(\w+)[^>]*>/, + attr = /([\w-]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; + + // Empty Elements - HTML 4.01 + var empty = makeMap("br,col,hr,img"); + // HTMLParser_Elements['empty'] = empty; + + // Block Elements - HTML 4.01 + var block = makeMap("blockquote,center,del,div,dl,dt,hr,iframe,ins,li,ol,p,pre,table,tbody,td,tfoot,th,thead,tr,ul"); + // HTMLParser_Elements['block'] = block; + + // Inline Elements - HTML 4.01 + var inline = makeMap("a,abbr,acronym,b,big,br,cite,code,del,em,font,h1,h2,h3,h4,h5,h6,i,img,ins,kbd,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var"); + + // Elements that you can, intentionally, leave open + // (and which close themselves) + var closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"); + + // Attributes that have their values filled in disabled="disabled" + var fillAttrs = makeMap("checked,disabled,ismap,noresize,nowrap,readonly,selected"); + + // Special Elements (can contain anything) + var special = makeMap("script,style"); + + //define ('BROKEN_IMAGE', DOKU_URL . 'lib/plugins/ckgedit/fckeditor/userfiles/blink.jpg?nolink&33x34'); + var broken_image ='http://' + location.host + DOKU_BASE + '/lib/plugins/ckgedit/fckeditor/userfiles/blink.jpg?nolink&33x34'; + HTMLParser = this.HTMLParser = function( html, handler ) { + var index, chars, match, stack = [], last = html; + + html = html.replace(/()/gm, + function(match, p1, p2) { + var skip = false; + if(p1.match(/msword/) ) { + skip = true; + match = match.replace(/msword/,""); + } + if(p2.length > 2500000 && !skip ) { + jQuery('#dw__editform').append(''); + return '{{' + broken_image + '}}'; + } + return match; + }); + html = html.replace(/~~OPEN_HTML_BLOCK~~/gm , '~~START_HTML_BLOCK~~') ; + html = html.replace(/~~END_HTML_BLOCK~~/gm , '~~CLOSE_HTML_BLOCK~~') ; + + if(html.match(/~~START_HTML_BLOCK~~/gm) ){ //adopted [\s\S] from Goyvaerts, Reg. Exp. Cookbook (O'Reilly) + if(!JSINFO['htmlok']) { + html = html.replace(/~~START_HTML_BLOCK~~|~~CLOSE_HTML_BLOCK~~/gm,""); + } + + html = html.replace(/(

)*\s*~~START_HTML_BLOCK~~\s*(<\/p>)*([\s\S]+)~~CLOSE_HTML_BLOCK~~\s*(<\/p>)*/gm, function(match,p,p1,text,p2) { + text = text.replace(/<\/?div.*?>/gm,""); + text = text.replace(//gm,""); + text = text.replace(/<\/code>/gm,""); + text = text.replace(/fckgL\d+\s*\<\/sup\>)\<\/a\>/gm, function(match,sup,a) { + return( '' +sup); + } + ); + /* remove html5 attributes */ + var pos = html.indexOf('data-'); + if(pos != -1) { + html = html.replace(/(<\w+)([^>]+)>/gm,function(match,tag,atts){ + atts = atts.replace(/data-[\w\-]+\s*=\s*(\"|\')\w+(\"|\')/,""); + //alert(atts); + return tag + atts+ '>'; + }); + } + stack.last = function(){ + return this[ this.length - 1 ]; + }; + + while ( html ) { + chars = true; + + // Make sure we're not in a script or style element + if ( !stack.last() || !special[ stack.last() ] ) { + + // Comment + if ( html.indexOf(""); + + if ( index >= 0 ) { + if ( handler.comment ) + handler.comment( html.substring( 4, index ) ); + html = html.substring( index + 3 ); + chars = false; + } + + // end tag + } else if ( html.indexOf("]*>"), function(all, text){ + text = text.replace(//g, "$1") + .replace(//g, "$1"); + + if ( handler.chars ) + handler.chars( text ); + + return ""; + }); + + parseEndTag( "", stack.last() ); + } + + if ( html == last ) + throw "Parse Error: " + html; + last = html; + } + + // Clean up any remaining tags + parseEndTag(); + + function parseStartTag( tag, tagName, rest, unary ) { + if ( block[ tagName ] ) { + while ( stack.last() && inline[ stack.last() ] ) { + parseEndTag( "", stack.last() ); + } + } + + if ( closeSelf[ tagName ] && stack.last() == tagName ) { + parseEndTag( "", tagName ); + } + + unary = empty[ tagName ] || !!unary; + + if ( !unary ) + stack.push( tagName ); + + if ( handler.start ) { + var attrs = []; + + rest.replace(attr, function(match, name) { + var value = arguments[2] ? arguments[2] : + arguments[3] ? arguments[3] : + arguments[4] ? arguments[4] : + fillAttrs[name] ? name : ""; + + attrs.push({ + name: name, + value: value, + escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') //" + }); + }); + + if ( handler.start ) + handler.start( tagName, attrs, unary ); + } + } + + function parseEndTag( tag, tagName ) { + // If no tag name is provided, clean shop + if ( !tagName ) + var pos = 0; + + // Find the closest opened tag of the same type + else + for ( var pos = stack.length - 1; pos >= 0; pos-- ) + if ( stack[ pos ] == tagName ) + break; + + if ( pos >= 0 ) { + // Close all the open elements, up the stack + for ( var i = stack.length - 1; i >= pos; i-- ) + if ( handler.end ) + handler.end( stack[ i ] ); + + // Remove the open elements from the stack + stack.length = pos; + } + } + }; + + + function makeMap(str){ + var obj = {}, items = str.split(","); + for ( var i = 0; i < items.length; i++ ) + obj[ items[i] ] = true; + return obj; + } +})(); + + +function HTMLParser_test_result(results) { + +var test_str = ""; +for ( i=0; i < results.length; i++) { + var character = results.charAt(i); + if(results.charCodeAt(i) == 10) + character ='\\n'; + if(results.charCodeAt(i) == 32) + character ='SP'; + var entry = character + ' '; + + test_str += entry; + if(results.charCodeAt(i) == 10) { + test_str += "\n"; + } +} + +if(!confirm(test_str)) return false; +return true; + +} + +function hide_backup_msg() { + document.getElementById("backup_msg").style.display="none"; + return false; +} + +function show_backup_msg(msg) { + document.getElementById("backup_msg").style.display="block"; + document.getElementById("backup_msg_area").innerHTML = "Backed up to: " + msg; + + return false; +} + + // legacy functions + function remove_draft(){ + } + +function dwedit_draft_delete() { +} + // legacy functions end + + function setEdHeight(h) { + h = parseInt(h); + document.cookie = 'ckgEdht=' + h +';expires=0;path=' +JSINFO['doku_base'] + ';SameSite=Lax;'; + } + + /* enable disable image paste */ + function ckgd_setImgPaste(which) { + var state = JSINFO['ckgEdPaste'] ? JSINFO['ckgEdPaste'] : ""; + if(state == 'on') { + which = 'off' + } + else which = 'on'; + JSINFO['ckgEdPaste'] = which; + document.cookie = 'ckgEdPaste=' + which +';expires="Thu, 18 Dec 2575 12:00:00 UTC";path=' +JSINFO['doku_base']; + alert(LANG.plugins.ckgedit.ckg_paste_restart + ' ' + LANG.plugins.ckgedit[which]); + } + + function ckg_RawImgMsg() { + return LANG.plugins.ckgedit.broken_image_1 + "\n" + LANG.plugins.ckgedit.broken_image_2 ; + } + function GetE(e) { + return document.getElementById(e); + } +var dokuBase = location.host + DOKU_BASE; + + if(window.getSelection != undefined) { + var doku_ckg_getSelection = window.getSelection; + window.getSelection = function(ta) { + if(!ta) ta = GetE("wiki__text"); + return doku_ckg_getSelection(ta); + }; + } + + function ckgedit_seteditor_priority(m,client,dw_val_obj) { + var which = {'Y': 'Dokuwiki', 'N': 'CKEditor'}; + + if (typeof m === "undefined") { // Safari + if(dw_val_obj[0].checked) { + m= dw_val_obj[0].value; + } + else if(dw_val_obj[1].checked) { + m = dw_val_obj[1].value; + } + } + var params = "dw_val=" + m; params += '&call=cked_selector'; params += "&dwp_client=" + client; + jQuery.post( DOKU_BASE + 'lib/exe/ajax.php', params, + function (data) { + if(data == 'done') { + if(!m) + alert(LANG.plugins.ckgedit.dwp_not_sel); + else + alert(LANG.plugins.ckgedit.dwp_updated + which[m]); + } + else { + alert(LANG.plugins.ckgedit.dwp_save_err + data); + } + }, + 'html' + ); + } + + /* gets both size and filetime: "size||filetime" */ + function ckged_get_unlink_size(id) { + var params = 'call=cked_deletedsize'; params += "&cked_delid=" + id; + jQuery.post( DOKU_BASE + 'lib/exe/ajax.php', params, + function (data) { + if(data) { + JSINFO['ckg_del_sz'] = data; + //console.log(data); + } + else { + // alert(LANG.plugins.ckgedit.dwp_save_err + data); + } + }, + 'html' + ); + + } + + function ckged_setmedia(id,del, refresh_cb) { + + var params = 'call=cked_upload'; params += "&ckedupl_id=" + id; + if(del) params += "&ckedupl_del=D&delsize="+JSINFO['ckg_del_sz']; + jQuery.post( DOKU_BASE + 'lib/exe/ajax.php', params, + function (data) { + if(data) { + if(refresh_cb) { + refresh_cb.postMessage(JSINFO['doku_url'], JSINFO['doku_url']); + } + // console.log(data); + } + else { + // alert(LANG.plugins.ckgedit.dwp_save_err + data); + } + }, + 'html' + ); + } + + jQuery(document).ready(function() { + if(JSINFO['hide_captcha_error'] =='hide') { + jQuery("div.error").hide(); + } + }); + + +jQuery(document).ready(function(){ + + jQuery( "#editor_height" ).keydown(function(event) { + if ( event.which == 13 ) { + event.preventDefault(); + } + }); + + $dokuWiki = jQuery('.dokuwiki'); + jQuery('.editbutton_table button').click(function() { + var f = this.form; + jQuery('').attr('type','hidden').attr('name','mode').attr('value','dwiki').appendTo(jQuery(f)); + jQuery('').attr('type','hidden').attr('name','fck_preview_mode').attr('value','nil').appendTo(jQuery(f)); + }); + + if(typeof(JSINFO['dbl_click_auth'] !== 'undefined') && JSINFO['dbl_click_auth'] == "") return; + if(!JSINFO['ckg_dbl_click']) return; + + /** + * If one or more edit section buttons exist? + * This makes sure this feature is enabled only on the edit page and for users with page edit rights. + */ + if (jQuery('.editbutton_section', $dokuWiki).length > 0) { + + // register double click event for all headings and section divs + jQuery('[class^="sectionedit"], div[class^="level"]', $dokuWiki).dblclick(function(){ + // find the closest edit button form to the element double clicked (downwards) and submit the form + var f = jQuery(this).nextAll('.editbutton_section:eq(0)').children('form:eq(0)'); + //alert(jQuery(f).hasClass('button')); + jQuery('').attr('type','hidden').attr('name','mode').attr('value','dwiki').appendTo(jQuery(f)); + jQuery('').attr('type','hidden').attr('name','fck_preview_mode').attr('value','nil').appendTo(jQuery(f)); + f.submit(); + }) + } + + if(JSINFO['ckg_template'].match(/bootstrap/) && jQuery('div.editButtons').length>0) { + // var n=jQuery('div.editButtons input').length; + jQuery( "div.editButtons input").each(function( index ) { + if(jQuery(this).hasClass('btn-success')) { + jQuery(this).removeClass('btn-success') + } + if(jQuery(this).hasClass('btn-danger')) { + jQuery(this).removeClass('btn-danger'); + } + + }); + + } + +}); + +function ckg_edit_mediaman_insert(edid, id, opts, dw_align) { + var link, width, s, align; + + //parse option string + var options = opts.substring(1).split('&'); + + //get width and link options + link = 'detail'; + for (var i in options) { + var opt = options[i]; + if (typeof opt !== 'string') { + continue; + } + if (opt.match(/^\d+$/)) { + width = opt; + } else if (opt.match(/^\w+$/)) { + link = opt; + } + } + + //get alignment option + switch (dw_align) { + case '2': + align = 'medialeft'; + break; + case '3': + align = 'mediacenter'; + break; + case '4': + align = 'mediaright'; + break; + default: + align = ''; + break; + } + + var funcNum = CKEDITOR.instances.wiki__text._.filebrowserFn; + var fileUrl = DOKU_BASE + 'lib/exe/fetch.php?media=' + id; + CKEDITOR.tools.callFunction(funcNum, fileUrl, function() { + var dialog = this.getDialog(); + if ( dialog.getName() == "image" ) { + if (align != null) { + dialog.getContentElement("info", "cmbAlign").setValue(align); + } + if (link != null) { + dialog.getContentElement("info", "cmbLinkType").setValue(link); + } + if (width != null) { + dialog.getContentElement("info", "txtWidth").setValue(width); + dialog.dontResetSize = true; + } + } + }); +} + +function ckg_edit_mediaman_insertlink(edid, id, opts, dw_align) { + var funcNum = CKEDITOR.instances.wiki__text._.filebrowserFn; + CKEDITOR.tools.callFunction(funcNum, id, function() { + var dialog = this.getDialog(); + if (dialog.getName() == "link") { + dialog.getContentElement('info', 'media').setValue(id); + } + }); +} + +function getCookie(name) { + var re = new RegExp(name + "=([^;]+)"); + var value = re.exec(document.cookie); + return (value != null) ? decodeURIComponent(value[1]) : null; +} +function ckg_admininfo(t){ + if(t.innerHTML == LANG.plugins.ckgedit.stylesheet_cinfo) + t.innerHTML = LANG.plugins.ckgedit.stylesheet_oinfo; + else t.innerHTML = LANG.plugins.ckgedit.stylesheet_cinfo; +} + + /* DOKUWIKI:include_once locktimer.js */ + diff --git a/lib/plugins/ckgedit/scripts/add_v_animal.sh b/lib/plugins/ckgedit/scripts/add_v_animal.sh new file mode 100644 index 0000000..01c9a1e --- /dev/null +++ b/lib/plugins/ckgedit/scripts/add_v_animal.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# This script is under public domain do with it whatever you want (yes, that includes eating it). +if [ $# -lt 1 ]; then + echo "Usage: $(basename $0) [animal domain or directory]" + exit 1 +fi + + +ANIMAL=${PWD}/${1} +ANIMAL_TITLE=$1 + +if [ -d $ANIMAL ]; then + echo "ERROR: $ANIMAL exists already!" + exit 1 +fi + +echo ">> adding animal $1" + +echo ">> creating directory structure ..." +mkdir -p ${ANIMAL}/{data/{attic,cache,index,locks,media,media_attic,media_meta,meta,pages,tmp},conf} +find ${ANIMAL}/ -type d -exec chmod 777 {} \; +touch ${ANIMAL}/conf/{local.php,local.protected.php,acl.auth.php,users.auth.php,plugins.local.php} +chmod 666 ${ANIMAL}/conf/{local.php,acl.auth.php,users.auth.php,plugins.local.php} + +echo ">> creating basic configuration ..." +echo " ${ANIMAL}/conf/local.php + +echo ">> setting fixed configuration ..." +echo " ${ANIMAL}/conf/local.protected.php + +echo ">> setting basic permissions ..." +echo "# +* @admin 255 +* @ALL 1" > ${ANIMAL}/conf/acl.auth.php + +echo ">> adding admin user ..." +echo '# +admin:$1$cce258b2$U9o5nK0z4MhTfB5QlKF23/:admin:admin@mail.org:admin,user' > ${ANIMAL}/conf/users.auth.php + +echo ">> IMPORTANT: Don't forget to change your admin username + password!" +echo ">> finished!" +echo ">> bye!" + +exit 0 + +# vim:ts=4:sw=4:noet:enc=utf-8: \ No newline at end of file diff --git a/lib/plugins/ckgedit/scripts/addanimal.sh b/lib/plugins/ckgedit/scripts/addanimal.sh new file mode 100644 index 0000000..8f42bc8 --- /dev/null +++ b/lib/plugins/ckgedit/scripts/addanimal.sh @@ -0,0 +1,61 @@ +#!/bin/bash +# This script is under public domain do with it whatever you want (yes, that includes eating it). +if [ $# -lt 1 ]; then + echo "Usage: $(basename $0) [animal domain or directory]" + exit 1 +fi + +# set_basedir +# Author: Myron Turner +set_basedir() { +BARN=`pwd | awk -F/ '{ print $NF }'` +echo "'/"$BARN"/$1/'" +} + +ANIMAL=${PWD}/${1} +ANIMAL_TITLE=$1 + +if [ -d $ANIMAL ]; then + echo "ERROR: $ANIMAL exists already!" + exit 1 +fi + +echo ">> adding animal $1" + +echo ">> creating directory structure ..." +mkdir -p ${ANIMAL}/{data/{attic,cache,index,locks,media,media_attic,media_meta,meta,pages,tmp},conf} +find ${ANIMAL}/ -type d -exec chmod 777 {} \; +touch ${ANIMAL}/conf/{local.php,local.protected.php,acl.auth.php,users.auth.php,plugins.local.php} +chmod 666 ${ANIMAL}/conf/{local.php,acl.auth.php,users.auth.php,plugins.local.php} + +echo ">> creating basic configuration ..." +echo " ${ANIMAL}/conf/local.php + +echo ">> setting fixed configuration ..." +echo " ${ANIMAL}/conf/local.protected.php + +echo ">> setting basic permissions ..." +echo "# +* @admin 255 +* @ALL 1" > ${ANIMAL}/conf/acl.auth.php + +echo ">> adding admin user ..." +echo '# +admin:$1$cce258b2$U9o5nK0z4MhTfB5QlKF23/:admin:admin@mail.org:admin,user' > ${ANIMAL}/conf/users.auth.php + +echo ">> IMPORTANT: Don't forget to change your admin username + password!" +echo ">> finished!" +echo ">> bye!" + +exit 0 + +# vim:ts=4:sw=4:noet:enc=utf-8: \ No newline at end of file diff --git a/lib/plugins/ckgedit/scripts/css6.php b/lib/plugins/ckgedit/scripts/css6.php new file mode 100644 index 0000000..967b1d6 --- /dev/null +++ b/lib/plugins/ckgedit/scripts/css6.php @@ -0,0 +1,524 @@ + + */ + +if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../../../').'/'); +require_once(DOKU_INC.'inc/init.php'); + +// ---------------------- functions ------------------------------ + +/** + * Output all needed Styles + * + * @author Andreas Gohr + */ +function css_ckg_out($path, $tpl = "") +{ + global $conf; + global $lang; + global $config_cascade; + global $INPUT; + $copy = $INPUT->str('ckg_save_ss',FALSE); + chdir($path); + + $mediatypes = array('screen', 'all'); + $type = ''; + + if(!$tpl) { + $tpl = $conf['template']; + + if($copy) { + $copy_path = DOKU_PLUGIN . 'ckgedit/ckeditor/css/_style.css'; + msg($copy_path,1); + } + } + + // load styl.ini + $styleini = css_ckg_styleini($tpl); + + // if old 'default' userstyle setting exists, make it 'screen' userstyle for backwards compatibility + if (isset($config_cascade['userstyle']['default'])) { + $config_cascade['userstyle']['screen'] = $config_cascade['userstyle']['default']; + } + + // Array of needed files and their web locations, the latter ones + // are needed to fix relative paths in the stylesheets + $files = array(); + foreach($mediatypes as $mediatype) { + $files[$mediatype] = array(); + // load core styles + $files[$mediatype][DOKU_INC.'lib/styles/'.$mediatype.'.css'] = DOKU_BASE.'lib/styles/'; + + // load template styles + if (isset($styleini['stylesheets'][$mediatype])) { + $files[$mediatype] = array_merge($files[$mediatype], $styleini['stylesheets'][$mediatype]); + } + // load user styles + if(!empty($config_cascade['userstyle'][$mediatype])) { + foreach($config_cascade['userstyle'][$mediatype] as $userstyle) { + $files[$mediatype][$userstyle] = DOKU_BASE; + } + } + } + + $css=""; + + // build the stylesheet + foreach ($mediatypes as $mediatype) { + + // print the default classes for interwiki links and file downloads + if ($mediatype == 'screen') { + $css .= '@media screen {'; + css_ckg_interwiki($css); + css_ckg_filetypes($css); + $css .= '}'; + } + + $xcl = 'plugins|popup|fileuploader|toc|search|recent|diff|edit|form|admin|manager|media|modal'; + + // load files + $css_ckg_content = ''; + foreach($files[$mediatype] as $file => $location) { + if(preg_match('#' .$xcl . '#',$file) ) { + continue; + } + $display = str_replace(fullpath(DOKU_INC), '', fullpath($file)); + $css_ckg_content .= "\n/* XXXXXXXXX $display XXXXXXXXX */\n"; + $css_ckg_content .= css_ckg_loadfile($file, $location); + } + switch ($mediatype) { + case 'screen': + $css .= NL.'@media screen { /* START screen styles */'.NL.$css_ckg_content.NL.'} /* /@media END screen styles */'.NL; + break; + case 'all': + default: + $css .= NL.'/* START rest styles */ '.NL.$css_ckg_content.NL.'/* END rest styles */'.NL; + break; + } + } + + // apply style replacements + $css = css_ckg_applystyle($css, $styleini['replacements']); + // parse less + $css = css_ckg_parseless($css); + + // embed small images right into the stylesheet + if($conf['cssdatauri']){ + $base = preg_quote(DOKU_BASE,'#'); + $css = preg_replace_callback('#(url\([ \'"]*)('.$base.')(.*?(?:\.(png|gif)))#i','css_ckg_datauri',$css); + } + + $css = preg_replace("/(\#?|\.?|div\.)dokuwiki\.?/", '', $css); + + $css = "@import 'additional.css';\n/* template: $tpl */\n@media screen {\n.$tpl{color:#ccc;}\n}\n" . $css; + $css .= ' + span.multi_p_open { + display: block; + } + body,html { + background-color: #fff; + background-image:none; + } + blockquote { + padding-left: .5em; + margin-left: 1.5em; + } +' . "\n"; + + if( io_saveFile($path . 'Styles/_style.css' ,$css)) { + if(isset($copy_path)) { ; + $retv = io_saveFile($copy_path,$css); + if(!$retv) msg("failed: " . $copy_path); + } + return 0; + } + else { + return 1; + } +} + +/** + * Uses phpless to parse LESS in our CSS + * + * most of this function is error handling to show a nice useful error when + * LESS compilation fails + * + * @param $css + * @return string + */ +function css_ckg_parseless($css) { + $less = new lessc(); + $less->importDir[] = DOKU_INC; + + try { + return $less->compile($css); + } catch(Exception $e) { + // get exception message + $msg = str_replace(array("\n", "\r", "'"), array(), $e->getMessage()); + + // try to use line number to find affected file + if(preg_match('/line: (\d+)$/', $msg, $m)){ + $msg = substr($msg, 0, -1* strlen($m[0])); //remove useless linenumber + $lno = $m[1]; + + // walk upwards to last include + $lines = explode("\n", $css); + for($i=$lno-1; $i>=0; $i--){ + if(preg_match('/\/(\* XXXXXXXXX )(.*?)( XXXXXXXXX \*)\//', $lines[$i], $m)){ + // we found it, add info to message + $msg .= ' in '.$m[2].' at line '.($lno-$i); + break; + } + } + } + + // something went wrong + $error = 'A fatal error occured during compilation of the CSS files. '. + 'If you recently installed a new plugin or template it '. + 'might be broken and you should try disabling it again. ['.$msg.']'; + + msg($error); + + exit; + } +} + +/** + * Does placeholder replacements in the style according to + * the ones defined in a templates style.ini file + * + * This also adds the ini defined placeholders as less variables + * (sans the surrounding __ and with a ini_ prefix) + * + * @author Andreas Gohr + */ +function css_ckg_applystyle($css, $replacements) { + // we convert ini replacements to LESS variable names + // and build a list of variable: value; pairs + $less = ''; + foreach((array) $replacements as $key => $value) { + $lkey = trim($key, '_'); + $lkey = '@ini_'.$lkey; + $less .= "$lkey: $value;\n"; + + $replacements[$key] = $lkey; + } + + // we now replace all old ini replacements with LESS variables + $css = strtr($css, $replacements); + + // now prepend the list of LESS variables as the very first thing + $css = $less.$css; + return $css; +} + +/** + * Load style ini contents + * + * Loads and merges style.ini files from template and config and prepares + * the stylesheet modes + * + * @author Andreas Gohr + * @param string $tpl the used template + * @return array with keys 'stylesheets' and 'replacements' + */ +function css_ckg_styleini($tpl) { + $stylesheets = array(); // mode, file => base + $replacements = array(); // placeholder => value + + // load template's style.ini + $incbase = tpl_incdir($tpl); + $webbase = tpl_basedir($tpl); + $ini = $incbase.'style.ini'; + if(file_exists($ini)){ + $data = parse_ini_file($ini, true); + + // stylesheets + if(is_array($data['stylesheets'])) foreach($data['stylesheets'] as $file => $mode){ + $stylesheets[$mode][$incbase.$file] = $webbase; + } + + // replacements + if(is_array($data['replacements'])){ + $replacements = array_merge($replacements, css_ckg_fixreplacementurls($data['replacements'],$webbase)); + } + } + + // load configs's style.ini + $webbase = DOKU_BASE; + $ini = DOKU_CONF."tpl/$tpl/style.ini"; + $incbase = dirname($ini).'/'; + if(file_exists($ini)){ + $data = parse_ini_file($ini, true); + + // stylesheets + if(isset($data['stylesheets']) && is_array($data['stylesheets'])) foreach($data['stylesheets'] as $file => $mode){ + $stylesheets[$mode][$incbase.$file] = $webbase; + } + + // replacements + if(isset($data['replacements']) && is_array($data['replacements'])){ + $replacements = array_merge($replacements, css_ckg_fixreplacementurls($data['replacements'],$webbase)); + } + } + + return array( + 'stylesheets' => $stylesheets, + 'replacements' => $replacements + ); +} + +/** + * Amend paths used in replacement relative urls, refer FS#2879 + * + * @author Chris Smith + */ +function css_ckg_fixreplacementurls($replacements, $location) { + foreach($replacements as $key => $value) { + $replacements[$key] = preg_replace('#(url\([ \'"]*)(?!/|data:|http://|https://| |\'|")#','\\1'.$location,$value); + } + return $replacements; +} + +/** + * Prints classes for interwikilinks + * + * Interwiki links have two classes: 'interwiki' and 'iw_$name>' where + * $name is the identifier given in the config. All Interwiki links get + * an default style with a default icon. If a special icon is available + * for an interwiki URL it is set in it's own class. Both classes can be + * overwritten in the template or userstyles. + * + * @author Andreas Gohr + */ +function css_ckg_interwiki(&$css){ + + // default style + $css .= 'a.interwiki {'; + $css .= ' background: transparent url('.DOKU_BASE.'lib/images/interwiki.png) 0px 1px no-repeat;'; + $css .= ' padding: 1px 0px 1px 16px;'; + $css .= '}'; + + // additional styles when icon available + $iwlinks = getInterwiki(); + foreach(array_keys($iwlinks) as $iw){ + $class = preg_replace('/[^_\-a-z0-9]+/i','_',$iw); + if(@file_exists(DOKU_INC.'lib/images/interwiki/'.$iw.'.png')){ + $css .= "a.iw_$class {"; + $css .= ' background-image: url('.DOKU_BASE.'lib/images/interwiki/'.$iw.'.png)'; + $css .= '}'; + }elseif(@file_exists(DOKU_INC.'lib/images/interwiki/'.$iw.'.gif')){ + $css .= "a.iw_$class {"; + $css .= ' background-image: url('.DOKU_BASE.'lib/images/interwiki/'.$iw.'.gif)'; + $css .= '}'; + } + } +} + +/** + * Prints classes for file download links + * + * @author Andreas Gohr + */ +function css_ckg_filetypes(&$css){ + + // default style + $css .= '.mediafile {'; + $css .= ' background: transparent url('.DOKU_BASE.'lib/images/fileicons/file.png) 0px 1px no-repeat;'; + $css .= ' padding-left: 18px;'; + $css .= ' padding-bottom: 1px;'; + $css .= '}'; + + // additional styles when icon available + // scan directory for all icons + $exts = array(); + if($dh = opendir(DOKU_INC.'lib/images/fileicons')){ + while(false !== ($file = readdir($dh))){ + if(preg_match('/([_\-a-z0-9]+(?:\.[_\-a-z0-9]+)*?)\.(png|gif)/i',$file,$match)){ + $ext = strtolower($match[1]); + $type = '.'.strtolower($match[2]); + if($ext!='file' && (!isset($exts[$ext]) || $type=='.png')){ + $exts[$ext] = $type; + } + } + } + closedir($dh); + } + foreach($exts as $ext=>$type){ + $class = preg_replace('/[^_\-a-z0-9]+/','_',$ext); + $css .= ".mf_$class {"; + $css .= ' background-image: url('.DOKU_BASE.'lib/images/fileicons/'.$ext.$type.')'; + $css .= '}'; + } +} + +/** + * Loads a given file and fixes relative URLs with the + * given location prefix + */ +function css_ckg_loadfile($file,$location=''){ + $css_ckg_file = new DokuCssFile($file); + return $css_ckg_file->load($location); +} + +/** + * Helper class to abstract loading of css/less files + * + * @author Chris Smith + */ +class DokuCssFile { + + protected $filepath; // file system path to the CSS/Less file + protected $location; // base url location of the CSS/Less file + private $relative_path = null; + + public function __construct($file) { + $this->filepath = $file; + } + + /** + * Load the contents of the css/less file and adjust any relative paths/urls (relative to this file) to be + * relative to the dokuwiki root: the web root (DOKU_BASE) for most files; the file system root (DOKU_INC) + * for less files. + * + * @param string $location base url for this file + * @return string the CSS/Less contents of the file + */ + public function load($location='') { + if (!file_exists($this->filepath)) return ''; + + $css = io_readFile($this->filepath); + if (!$location) return $css; + + $this->location = $location; + + $css = preg_replace_callback('#(url\( *)([\'"]?)(.*?)(\2)( *\))#',array($this,'replacements'),$css); + $css = preg_replace_callback('#(@import\s+)([\'"])(.*?)(\2)#',array($this,'replacements'),$css); + + return $css; + } + + /** + * Get the relative file system path of this file, relative to dokuwiki's root folder, DOKU_INC + * + * @return string relative file system path + */ + private function getRelativePath(){ + + if (is_null($this->relative_path)) { + $basedir = array(DOKU_INC); + + $basedir = array_map('preg_quote_cb', $basedir); + $regex = '/^('.join('|',$basedir).')/'; + $this->relative_path = preg_replace($regex, '', dirname($this->filepath)); + } + + return $this->relative_path; + } + + /** + * preg_replace callback to adjust relative urls from relative to this file to relative + * to the appropriate dokuwiki root location as described in the code + * + * @param array see http://php.net/preg_replace_callback + * @return string see http://php.net/preg_replace_callback + */ + public function replacements($match) { + + // not a relative url? - no adjustment required + if (preg_match('#^(/|data:|https?://)#',$match[3])) { + return $match[0]; + } + // a less file import? - requires a file system location + else if (substr($match[3],-5) == '.less') { + if ($match[3]{0} != '/') { + $match[3] = $this->getRelativePath() . '/' . $match[3]; + } + } + // everything else requires a url adjustment + else { + $match[3] = $this->location . $match[3]; + } + + return join('',array_slice($match,1)); + } +} + +/** + * Convert local image URLs to data URLs if the filesize is small + * + * Callback for preg_replace_callback + */ +function css_ckg_datauri($match){ + global $conf; + + $pre = unslash($match[1]); + $base = unslash($match[2]); + $url = unslash($match[3]); + $ext = unslash($match[4]); + + $local = DOKU_INC.$url; + $size = @filesize($local); + if($size && $size < $conf['cssdatauri']){ + $data = base64_encode(file_get_contents($local)); + } + if($data){ + $url = 'data:image/'.$ext.';base64,'.$data; + }else{ + $url = $base.$url; + } + return $pre.$url; +} + + + +/** + * Very simple CSS optimizer + * + * @author Andreas Gohr + */ +function css_ckg_compress($css){ + //strip comments through a callback + $css = preg_replace_callback('#(/\*)(.*?)(\*/)#s','css_ckg_comment_cb',$css); + + //strip (incorrect but common) one line comments + $css = preg_replace('/(? 1em) + $css = preg_replace('/(? + */ +function css_ckg_comment_cb($matches){ + if(strlen($matches[2]) > 4) return ''; + return $matches[0]; +} + diff --git a/lib/plugins/ckgedit/scripts/draft_delete.php b/lib/plugins/ckgedit/scripts/draft_delete.php new file mode 100644 index 0000000..406a480 --- /dev/null +++ b/lib/plugins/ckgedit/scripts/draft_delete.php @@ -0,0 +1,24 @@ +str('draft_id'); +$cname = urldecode($cname); +if(!preg_match("#/data/cache/\w/[a-f0-9]{32}\.draft$#i", $cname)) return; +$ckgedit_cname = $cname . '.fckl'; + + +if(file_exists($cname)) { + io_lock($cname); + if(file_exists($ckgedit_cname)) { + unlink($ckgedit_cname); + } + unlink($cname); + + exit; +} + +echo "done"; + diff --git a/lib/plugins/ckgedit/scripts/mediamgr.js b/lib/plugins/ckgedit/scripts/mediamgr.js new file mode 100644 index 0000000..7fd5fc8 --- /dev/null +++ b/lib/plugins/ckgedit/scripts/mediamgr.js @@ -0,0 +1,54 @@ + + if (opener != null && opener.CKEDITOR !== undefined) { + window.onload = function () { + var _action = '?ns=&edid=wiki__text&onselect=ckg_edit_mediaman_insert&ckg_media=img&CKEditor=wiki__text&CKEditorFuncNum=1&langCode=en'; + + if ((location.search.split("ckg_media=")[1]||"").split("&")[0] == "link") { + _action = '?ns=&edid=wiki__text&onselect=ckg_edit_mediaman_insertlink&ckg_media=link&CKEditor=wiki__text&CKEditorFuncNum=1&langCode=en'; + jQuery(".select").on("click", function(event) { + var $link, id; + event.preventDefault(); + $link = jQuery(this); + id = $link.attr("id").substr(2); + dw_mediamanager.insert(id); + return; + }); + } else if ((location.search.split("ckg_media=")[1]||"").split("&")[0] == "img") { + jQuery("#media__linkbtn4").css("display", "none"); + ckg_nonimage_overlay(); + } + + /* update search form action */ + var valu = jQuery("#dw__mediasearch input[type='text").val(); + if(valu == ""){ + var url = jQuery("form#dw__mediasearch").attr('action'); + jQuery("form#dw__mediasearch").attr('action', url+_action); + }; + + jQuery(document).ajaxComplete(function() { + ckg_nonimage_overlay(); + + jQuery("form[action]").each(function(index, val){ + var url = jQuery(this).attr('action'); + url = url + _action; + jQuery(this).attr('action',url); + }); + }); + }; + + if(!opener.oDokuWiki_FCKEditorInstanceInLinkDialog) { + jQuery( ".odd, .even" ).each( function( index, element ){ + if(!this.title.match(/\.(jpg|jpeg|png|tiff?|gif)$/)){ + jQuery( this ).html(LANG.plugins.ckgedit.mediamgr_notice+": " + this.title +""); + } + }); + } + + } + + function ckg_nonimage_overlay() { + if ((location.search.split("ckg_media=")[1]||"").split("&")[0] !== "img") { + return; + } + } + diff --git a/lib/plugins/ckgedit/scripts/parse_wiki-cmpr.js b/lib/plugins/ckgedit/scripts/parse_wiki-cmpr.js new file mode 100644 index 0000000..36d54d8 --- /dev/null +++ b/lib/plugins/ckgedit/scripts/parse_wiki-cmpr.js @@ -0,0 +1 @@ +function parse_wikitext(C){if(ckgedit_dwedit_reject){var f=GetE("ebut_cancel");f.click();return true}var A=getComplexTables();function F(){var i=/\>\s+(\*\*|__|\/\/|'')\s+_\s+\1\s+<\/font>/gm;r=r.replace(i,function(v){v=v.replace(/\s+/g,"");return v});i=new RegExp("\\>(.*?)(\\]\\]\\<\\/font\\>)|(\\<\\/font\\>\\]\\])","gm");if(r.match(i)){return true}i=new RegExp("(\\{\\{(.*?)\\.\\w{2,4})\\|\\\\{\\{(.*?)\\.\\w+\\<\\/font\\>\\b","gm");if(r.match(i)){return true}return false}function n(W,X,v){var U=new Array();for(var T=X;T0){var V=W[T][S].text;U.push({row:T,column:S,spans:W[T][S].rowspan,text:V});if(!v){break}}}}return U}function E(V,v,T,U,i){var S=U[V][v].colspan?U[V][v].colspan:0;U[V][v].rowspan=0;for(N=0;N",del:"",s:"",p:"\n\n",a:"[[",img:"{{",strong:"**",h1:"\n====== ",h2:"\n===== ",h3:"\n==== ",h4:"\n=== ",h5:"\n== ",td:"|",th:"^",tr:" ",table:"\n\n",ol:" - ",ul:" * ",li:"",code:"''",pre:"\n<",hr:"\n\n----\n\n",sub:"",font:"",blockquote:"

",sup:"",div:"\n\n",span:"\n",dl:"\n",dd:"\n",dt:"\n"};var o={del:"",s:"",strike:"",p:" ",br:" ",a:"]]",img:"}}",h1:" ======\n",h2:" =====\n",h3:" ====\n",h4:" ===\n",h5:" ==\n",td:" ",th:" ",tr:"|\n",ol:" ",ul:" ",li:"\n",pre:"\n",sup:" ",div:"\n\n",p:"\n\n",font:"",span:" ",blockquote:"
"};H.temp_u="CKGE_TMP_u";H.temp_strong="CKGE_TMP_strong";H.temp_em="CKGE_TMP_em";H.temp_i="CKGE_TMP_i";H.temp_b="CKGE_TMP_b";H.temp_del="CKGE_TMP_del";H.temp_strike="CKGE_TMP_strike";H.temp_code="CKGE_TMP_code";H.temp_sup="CKGE_TMP_sup";H.temp_csup="CKGE_TMP_csup";H.temp_sub="CKGE_TMP_sub";H.temp_csub="CKGE_TMP_csub";H.temp_del="CKGE_TMP_del";H.temp_cdel="CKGE_TMP_cdel";H.temp_strike="CKGE_TMP_del";H.temp_cstrike="CKGE_TMP_cdel";H.temp_s="CKGE_TMP_del";H.temp_cs="CKGE_TMP_cdel";var l={CKGE_TMP_b:"**",CKGE_TMP_strong:"**",CKGE_TMP_em:"//",CKGE_TMP_u:"__",CKGE_TMP_sup:"",CKGE_TMP_sub:"",CKGE_TMP_cdel:"",CKGE_TMP_csub:"",CKGE_TMP_csup:"",CKGE_TMP_del:"",CKGE_TMP_strike:"",CKGE_TMP_code:"''"};H.blank="";H.fn_start="((";H.fn_end="))";H.row_span=":::";H.p_insert="_PARA__TABLE_INS_";H.format_space="_FORMAT_SPACE_";H.pre_td="<";var t={strong:true,b:true,i:true,em:true,u:true,del:true,strike:true,code:true,sup:true,sub:true,s:true};var r="";var R=false;var s=false;var b=false;var M=false;var h=false;var K=false;var O=false;var L=false;var g=false;var J=false;var q=false;var Q=false;HTMLLinkInList=false;var P=false;var B;var c=new Array();var y=new Array();var e=false;var d=H.p_insert;var I="(br|co|coMULTI|es|kw|me|nu|re|st|sy)[0-9]";String.prototype.splice=function(i,S,v){return(this.slice(0,i)+v+this.slice(i+Math.abs(S)))};String.frasl=new RegExp("⁄|⁄|⁄|⁄","g");I=new RegExp(I);HTMLParser(CKEDITOR.instances.wiki__text.getData(),{attribute:"",link_title:"",link_class:"",image_link_type:"",td_align:"",in_td:false,td_colspan:0,td_rowspan:0,rowspan_col:0,last_column:-1,row:0,col:0,td_no:0,tr_no:0,current_row:false,in_table:false,in_multi_plugin:false,is_rowspan:false,list_level:0,prev_list_level:-1,list_started:false,xcl_markup:false,in_link:false,link_formats:new Array(),last_tag:"",code_type:false,in_endnotes:false,is_smiley:false,geshi:false,downloadable_code:false,export_code:false,code_snippet:false,downloadable_file:"",external_mime:false,in_header:false,curid:false,format_in_list:false,prev_li:new Array(),link_only:false,in_font:false,using_fonts:false,interwiki:false,bottom_url:false,font_family:"inherit",font_size:"inherit",font_weight:"inherit",font_color:"inherit",font_bgcolor:"inherit",font_style:"inherit",is_mediafile:false,end_nested:false,mfile:false,backup:function(T,S){var V=r.lastIndexOf(T);var v=r.indexOf(S,V);if(V==-1||v==-1){return}if(T.length+v==v){var U=r.substring(0,V);var i=r.substring(v);r=U+i;return true}return false},is_iwiki:function(S,U){var T=S.match(/iw_(\w+\.?\w{0,12})/);var i=U.split(/\/\//);var v=i[i.length-1];if(!v.match(/oIWIKIo.*?cIWIKIc/)){v="oIWIKIo"+v+"cIWIKIc"}v=v.replace(/^.*?oIWIKIo/,"oIWIKIo");v=v.replace(/cIWIKIc.*/,"cIWIKIc");T[1]=T[1].replace(/_(\w{2})/g,".$1");this.attr=T[1]+">"+decodeURIComponent(v);q=true;this.interwiki=true},start:function(aw,aa,ak){if(H[aw]){if(t[aw]&&this.in_link){this.link_formats.push(aw);return}if(t[aw]&&(this.in_font||this.in_header)){r+=" ";var ar="temp_"+aw;r+=H[ar];r+=" ";return}else{if(aw=="acronym"){return}}if(t[aw]&&this.in_endnotes){if(aw=="sup"){return}}if(aw=="ol"||aw=="ul"){this.prev_list_level=this.list_level;this.list_level++;if(this.list_level==1){this.list_started=false}if(this.list_started){this.prev_li.push(H.li)}H.li=H[aw];return}else{if(!this.list_level){H.li="";this.prev_li=new Array()}}this.is_mediafile=false;if(aw=="img"){var av="?";var v;var T;var ax=false;var ai="";var ad="";var aj=false;this.is_smiley=false;this.in_link=false}if(aw=="a"){var ah=true;var aD="";this.xcl_markup=false;this.in_link=true;this.link_pos=r.length;this.link_formats=new Array();this.footnote=false;var ab=false;this.id="";this.external_mime=false;var aC=false;this.export_code=false;this.code_snippet=false;this.downloadable_file="";var ag=false;this.link_only=false;save_url="";this.interwiki=false;this.bottom_url=false;this.link_title=false;var ap="";var ae=""}if(aw=="p"){this.in_link=false;if(this.in_table){aw="p_insert";M=true}}if(aw=="table"){this.td_no=0;this.tr_no=0;this.in_table=true;this.is_rowspan=false;this.row=-1;this.rows=new Array();B=this.rows;this.table_start=r.length}else{if(aw=="tr"){this.tr_no++;this.td_no=0;this.col=-1;this.row++;this.rows[this.row]=new Array();this.current_row=this.rows[this.row]}else{if(aw=="td"||aw=="th"){this.td_no++;this.col++;this.current_row[this.col]={type:aw,rowspan:0,colspan:0,text:""};this.cell_start=r.length;this.current_cell=this.current_row[this.col];if(this.td_rowspan&&this.rowspan_col==this.td_no&&this.td_no!=this.last_column){this.is_rowspan=true;this.td_rowspan--}else{this.is_rowspan=false}}}}var S;this.attr=false;this.format_tag=false;if(t[aw]){this.format_tag=true}var ac=false;for(var aA=0;aA1){this.attr=aa[aA].value;this.code_type=Y[0]}else{this.attr=aa[aA].escaped;this.code_type=this.attr}if(this.downloadable_code){this.attr=this.attr.replace(/\s*code\s*/,"");this.code_type="file"}s=true;if(this.in_table){aw="pre_td"}break}}else{if(aw=="img"){if(aa[aA].name=="alt"){ad=aa[aA].value}if(aa[aA].name=="type"){this.image_link_type=aa[aA].value}if(aa[aA].name=="src"){var al="";if(S=aa[aA].escaped.match(/fetch\.php.*?(media=.*)/)){var Y=S[1].split("=");al=Y[1];if(S=aa[aA].escaped.match(/(media.*)/)){var Y=S[1].split("=");var W=Y[1];al=decodeURIComponent?decodeURIComponent(W):unescape(W)}if(!al.match(/https?:/)&&!al.match(/^:/)){al=":"+al}}else{if(aa[aA].escaped.match(/https?:\/\//)){al=aa[aA].escaped;al=al.replace(/\?.*?$/,"")}else{if(S=aa[aA].escaped.match(/\/_media\/(.*)/)){var Y=S[1].split(/\?/);al=Y[0];al=al.replace(/\//g,":");if(!al.match(/^:/)){al=":"+al}}else{if(S=aa[aA].escaped.match(/\/lib\/exe\/fetch.php\/(.*)/)){var Y=S[1].split(/\?/);al=Y[0];if(!al.match(/^:/)){al=":"+al}}else{S=aa[aA].escaped.match(/^.*?\/userfiles\/image\/(.*)/);if(!S&&typeof config_animal!=="undefined"){var V=new RegExp(config_animal+"/image/(.*)$");S=aa[aA].escaped.match(V)}if(!S){var V=doku_base+"data/media/";V=V.replace(/([\/\\])/g,"\\$1");V="^.*?"+V+"(.*)";V=new RegExp(V);S=aa[aA].escaped.match(V)}if(S&&S[1]){al=S[1].replace(/\//g,":");al=":"+al}else{al=decodeURIComponent?decodeURIComponent(aa[aA].escaped):unescape(aa[aA].escaped);if(al.search(/data:image.*?;base64/)>-1){aj=true}}}}}}if(al&&al.match(/lib\/images\/smileys/)){this.is_smiley=true}this.attr=al;if(this.attr&&this.attr.match&&this.attr.match(/%[a-fA-F0-9]{2}/)){this.attr=decodeURIComponent(safe_convert(this.attr));this.attr=decodeURIComponent(safe_convert(this.attr))}}else{if(aa[aA].name=="width"&&!ax){v=aa[aA].value}else{if(aa[aA].name=="height"&&!ax){T=aa[aA].value}else{if(aa[aA].name=="style"){var X=aa[aA].escaped.match(/width:\s*(\d+)/);if(X){v=X[1];var X=aa[aA].escaped.match(/height:\s*(\d+)/);if(X){T=X[1]}}}else{if(aa[aA].name=="align"||aa[aA].name=="class"){if(aa[aA].escaped.match(/(center|middle)/)){ai="center"}else{if(aa[aA].escaped.match(/right/)){ai="right"}else{if(aa[aA].escaped.match(/left/)){ai="left"}else{ai=""}}}}}}}}}}}if(this.is_smiley){if(ad){r+=ad+" ";ad=""}this.is_smiley=false;return}if(this.link_only){aw="img"}if(aw=="br"){if(this.in_multi_plugin){r+="\n";return}if(!this.code_type){R=true}else{if(this.code_type){r+="\n";return}}if(this.in_table){r+=d;return}if(this.list_started){r+="_LIST_EOFL_"}else{r+="\\\\ ";return}}else{if(aw.match(/^h(\d+|r)/)){var af=r.length;if(aw.match(/h(\d+)/)){this.in_header=true}if(af){if(r.charCodeAt(af-1)==32){r=r.replace(/\x20+$/,"")}}}else{if(this.last_col_pipes){if(t[aw]){r+=H[aw]}aw="blank"}else{if(ac){r+=ac;return}}}}if(aw=="b"||aw=="i"&&this.list_level){if(r.match(/(\/\/|\*)(\x20)+/)){r=r.replace(/(\/\/|\*)(\x20+)\-/,"$1\n$2-")}}if(aw=="li"&&this.list_level){if(this.list_level==1&!this.list_started){r+="\n";this.list_started=true}r=r.replace(/[\x20]+$/,"");for(var at=0;at1){r+=" "}}if(this.prev_list_level>0&&H.li==H.ol){this.prev_list_level=-1}}if(aw=="a"&&this.list_level){HTMLLinkInList=true}if(aw=="a"&&ah){this.xcl_markup=true;return}else{if(aw=="a"&&(this.export_code||this.code_snippet)){return}else{if(aw=="a"&&this.footnote){aw="fn_start"}else{if(aw=="a"&&ab){c.push(this.id)}else{if(aw=="a"&&this.external_mime){if(this.in_endnotes){this.link_class="media";return}if(aC&&aC=="mediafile"){r+=H.img;r+=this.attr+"|";this.is_mediafile=true}return}else{if(this.in_font){if(aw=="a"){r=r.replace(/__STYLE__/,"[["+this.attr+"|");this.in_font=false}return}}}}}}if(this.in_endnotes&&aw=="a"){return}if(this.code_type&&aw=="span"){aw="blank"}if(this.mfile&&!this.attr){this.attr=this.mfile}r+=H[aw];if(aw=="td"||aw=="th"||(this.last_col_pipes&&this.td_align=="center")){if(this.is_rowspan){r+=H.row_span+" | ";this.is_rowspan=false}if(this.td_align=="center"||this.td_align=="right"){r+=" "}}else{if(aw=="a"&&this.attr){this.attr=this.attr.replace(/%7c/,"%257c");r+=this.attr+"|"}else{if(aw=="img"){var aq=this.image_link_type;this.image_link_type="";if(this.link_only){aq="link_only"}if(!aq||aj){aq="nolink"}else{if(aq=="detail"){aq=""}}if(aq=="link_only"){av="?linkonly"}else{if(aq){av+=aq+"&"}}if(v&&T){av+=v+"x"+T}else{if(v){av+=v}else{if(!aq){av=""}}}if(ai&&ai!="left"){r+=" "}this.attr+=av;if(ai=="center"||ai=="left"){this.attr+=" "}if(ad){r+=this.attr+"|"+ad+"}}"}else{r+=this.attr+"}}"}this.attr="src"}else{if(aw=="pre"||aw=="pre_td"){if(this.downloadable_file){this.attr+=" "+this.downloadable_file}if(!this.attr){this.attr="code"}r+=this.attr+">";this.downloadable_file="";this.downloadable_code=false}}}}}},end:function(ah){if(t[ah]&&(this.in_font||this.in_header)){r+=" ";if(ah=="sup"||ah=="sub"||ah=="del"||ah=="strike"||ah=="s"){var ag="temp_c"+ah}else{var ag="temp_"+ah}r+=H[ag];r+=" ";return}if(this.in_endnotes&&ah=="a"){return}if(this.in_link&&t[ad]&&this.link_formats.length){return}else{if(ah=="a"&&!this.link_formats.length){this.in_link=false}}if(this.link_only){this.link_only=false;return}if(!H[ah]){return}if(ah=="sup"&&this.attr=="dwfcknote"){return}if(this.is_smiley){this.is_smiley=false;if(ah!="li"){return}}if(ah=="span"&&this.in_font&&!ckgedit_xcl_styles){ah="font";var ab="";var ae=ab.match(/(inherit)/g);if(ae&&ae.length<3){P=true}var X=r.lastIndexOf("__STYLE__");r=r.splice(X,9,ab);r=r.replace(/_FORMAT_SPACE_"}else{var S=r.lastIndexOf("code");var U=r.lastIndexOf("file");if(U>S){this.code_type="file"}else{this.code_type="code"}ah+=this.code_type+">"}this.code_type=false}else{if(o[ah]){ah=o[ah]}else{if(this.attr=="u"&&ah=="em"){ah="u"}else{if(ah=="acronym"){}else{ah=H[ah]}}}}}}if(ad=="tr"){if(this.last_col_pipes){ah="\n";this.last_col_pipes=""}if(this.td_rowspan&&this.rowspan_col==this.td_no+1){this.is_rowspan=false;this.last_column=this.td_no;this.td_rowspan--;ah="|"+H.row_span+"|\n"}}else{if(ad=="td"||ad=="th"){this.last_col_pipes="";this.in_td=false}else{if(ad.match(/h\d+/)){this.in_header=false}}}if(H.li){if(r.match(/\n$/)&&!this.list_level){ah=""}}if(this.in_endnotes&&ad=="sup"){return}r+=ah;if(t[ad]){if(this.list_level){this.format_in_list=true;g=true}r+=H.format_space;K=H.format_space}this.last_tag=ad;if(this.td_colspan&&!A){if(this.td_align=="center"){r+=" "}var T="|";if(ad=="th"){T="^"}var W=T;for(var Y=1;Y\n")}if(U.match(/~~CLOSE_HTML_BLOCK~~/)){U=U.replace(/~~CLOSE_HTML_BLOCK~~\n*/gm,"\n\n\n~~CLOSE_HTML_BLOCK~~\n\n")}if(this.interwiki){}if(this.interwiki&&r.match(/>\w+\s*\|$/)){this.interwiki=false;if(this.attr){r+=U}else{r=r.replace(/>\w+\s*\|$/,">"+U)}return}if(this.in_multi_plugin){U=U.replace("< ","<")}U=U.replace(/'/g,"'");U=U.replace(/^(>)+/,function(W,V){return(W.replace(/(>)/g,"__QUOTE__"))});U=U.replace(/¬ags/g,"¬ags");r=r.replace(/([\/\*_])_FORMAT_SPACE_([\/\*_]{2})_FORMAT_SPACE_$/,"$1$2@@_SP_@@");if(U.match(/^&\w+;/)){r=r.replace(/_FORMAT_SPACE_\s*$/,"")}if(this.link_only){if(U){replacement="|"+U+"}} ";r=r.replace(/\}\}\s*$/,replacement)}return}if(!this.code_type){if(!this.last_col_pipes){U=U.replace(/\x20{6,}/," ");U=U.replace(/^( )+\s*$/,"_FCKG_BLANK_TD_");U=U.replace(/( )+/," ")}if(this.format_tag){if(!this.list_started||this.in_table){U=U.replace(/^\s+/,"@@_SP_@@")}}else{if(this.last_tag=="a"){U=U.replace(/^\s{2,}/," ")}else{if(!this.using_fonts){U=U.replace(/^\s+/,"")}}}if(U.match(/nowiki>/)){L=true}if(this.format_in_list||(Q&&this.list_started)){U=U.replace(/^[\n\s]+$/g,"");if(U.match(/\n{2,}\s{1,}/)){U=U.replace(/\n{2,}/,"\n")}}if(this.in_td&&!U){this.in_td=false}}else{U=U.replace(/<\s/g,"<");U=U.replace(/\s>/g,">");var i=U.match(/^\s*geshi:\s+(.*)$/m);if(i){r=r.replace(/<(code|file)>\s*$/,"<$1 "+i[1]+">");U=U.replace(i[0],"")}}if(this.attr&&this.attr=="dwfcknote"){if(U.match(/fckgL\d+/)){return}if(U.match(/^[\-,:;!_]/)){r+=U}else{r+=" "+U}return}if(this.downloadable_code&&(this.export_code||this.code_snippet)){this.downloadable_file=U;return}if(this.last_tag=="a"&&U.match(/^[\.,;\:\!]/)){r=r.replace(/\s$/,"")}if(this.in_header){U=U.replace(/---/g,"—");U=U.replace(/--/g,"–")}if(this.list_started){r=r.replace(/_LIST_EOFL_\s*L_BR_K\s*$/,"_LIST_EOFL_")}if(!this.code_type){if(!r.match(/\[\[\\\\.*?\|$/)&&!U.match(/\w:(\\(\w?))+/)){if(!U.match(/\\\\[\w\.\-\_]+\\[\w\.\-\_]+/)){U=U.replace(/([\\])/g,"%%$1%%")}U=U.replace(/([\*])/g,"_CKG_ASTERISK_")}}if(this.in_endnotes&&c.length){if(U.match(/\w/)&&!U.match(/^\s*\d\)\s*$/)){U=U.replace(/\)\s*$/,"_FN_PAREN_C_");var v=c.length-1;if(this.bottom_url){if(this.link_class&&this.link_class=="media"){U="{{"+this.bottom_url+"|"+U+"}}"}else{U="[["+this.bottom_url+"|"+U+"]]"}}if(y[c[v]]){U=U.replace("(","L_PARgr");U=U.replace(")","R_PARgr");y[c[v]]+=" "+U}else{U=U.replace("(","L_PARgr");U=U.replace(")","R_PARgr");y[c[v]]=U}}this.bottom_url=false;return}if(U&&U.length){r+=U}r=r.replace(/(&\w+;)\s*([\*\/_]{2})_FORMAT_SPACE_(\w+)/,"$1$2$3");if(this.list_level&&this.list_level>1){r=r.replace(/(\[\[.*?\]\])([ ]+[\*\-].*)$/," $1\n$2")}try{var T=new RegExp("([*/_]{2,})_FORMAT_SPACE_([*/_]{2,})("+RegExp.escape(U)+")$");if(r.match(T)){r=r.replace(T,"$1$2$3")}}catch(S){}if(!e){if(U.match(/</)){e=true}}},comment:function(i){},dbg:function(v,i){if(v.replace){v=v.replace(/^\s+/g,"");v=v.replace(/^\n$/g,"");v=v.replace(/&/g,"&").replace(//g,">");if(!v){return}}if(i){i=""+i+"\n"}HTMLParser_DEBUG+=i+v+"\n__________\n"}});r=r.replace(/(\[\[\\\\)(.*?)\]\]/gm,function(i,S,v){v=v.replace(/\\/g,"_SMB_");return S+v+"]]"});r=r.replace(/%%\\%%/g,"_ESC_BKSLASH_");r=r.replace(/%*\\%*([^\w\\]{1})%*\\%*/g,"$1");r=r.replace(/_SMB_/g,"\\");r=r.replace(/(\s*={2,}).*?CKGE_TMP_(\w+)(.*?).*?CKGE_TMP_c?\2.*?\1/gm,function(S,i){S=S.replace(/CKGE_TMP_\w+/gm,"");var T=jQuery("#formatdel").val();if(!T){jQuery("#dw__editform").append('')}return S});r=r.replace(/\s?(CKGE_TMP_\w+)\s?/gm,function(v,i){if(l[i]){return l[i]}return v});r=r.replace(/(\s*={2,})(.*?)(\[\[|\{\{)(.*?)(\]\]|\}\})(.*?)\1/gm,function(i,S,Y,W,U,V,X){X=X.replace(/\[\[(.*?)\|(.*?)\]\]/g,"$2");X=X.replace(/\{\{(.*?)\|(.*?)\}\}/g,"$2");i=S+" "+Y+" "+U.replace(/.*?\|(.*?)/,"$1")+" "+X+" "+S;var T=jQuery("#formatdel").val();if(!T){jQuery("#dw__editform").append('')}return i});if(C=="test"){if(!HTMLParser_test_result(r)){return}}r=r.replace(/\{ \{ rss>Feed:/mg,"{{rss>http://");r=r.replace(/\{ \{ rss>sFeed:/mg,"{{rss>https://");r=r.replace(/~ ~ (NOCACHE|NOTOC)~ ~/mg,"~~$1~~");if(q){var u=function(i,v){tag_1=i.replace(/oIWIKIo(.*)cIWIKIc/,"$1");if(tag_1==v){return true}v=v.replace(/\s/,"%20");return(v==tag_1)};r=r.replace(/\[\[(\w+\.?\w{0,12})>(.*?)\|(.*?)\]\]/gm,function(v,T,S,i){if(S=="oIWIKIocIWIKIc"){S=i}if((S=="oIWIKIo"+i.replace(/\s/,"%20")+"cIWIKIc")||(S==i)||u(S,i)){i=""}else{i="|"+i}return("[["+T+">"+S+i+"]]")})}r=r.replace(/>.*?oIWIKIo(.*?)cIWIKIc/mg,">$1");if(K){if(h){r=r.replace(/\s*([\|\^]+)((\W\W_FORMAT_SPACE_)+)/gm,function(i,v,S){S=S.replace(/_FORMAT_SPACE_/g,"");return(S+v)})}r=r.replace(/"/g,'"');var j=new RegExp(K+"([\\-]{2,})","g");r=r.replace(j," $1");r=r.replace(/\]\](\*\*|\/\/|\'\'|__|<\/del>)_FORMAT_SPACE_/,"]]$1@@_SP_@@");var j=new RegExp("(&|\\W|\\w|\\d)(\\*\\*|\\/\\/|\\'\\'|__|)+"+K+"(\\w|\\d)","g");r=r.replace(j,"$1$2$3");var j=new RegExp(K+"@@_SP_@@","g");r=r.replace(j," ");r=r.replace(/([\*\/_]{2})@@_SP_@@(&\w+;)/g,"$1 $2");r=r.replace(/\n@@_SP_@@\n/g,"");r=r.replace(/@@_SP_@@\n/g,"");r=r.replace(/@@_SP_@@/g," ");var j=new RegExp(K+"([^\\)\\]\\}\\{\\-\\.,;:\\!?\"\x94\x92\u201D\u2019'])","g");r=r.replace(j," $1");j=new RegExp(K,"g");r=r.replace(j,"");if(g){r=r.replace(/^(\s+[\-\*_]\s*)([\*\/_\']{2})(.*?)(\2)([^\n]*)\n+/gm,function(S,i,U,V,v,T){return(i+U+V+v+T+"\n")})}}if(HTMLLinkInList){r=r.replace(/(\*|-).*?(\[\[|\{\{).*?(\]\]|\}\})([\s\w\/\-\x3A-\x40\x5B-\x60\x7B-\x7F,;\>\<\&]+)\n\n/mg,function(T,S,i,U,v){T=T.replace(/[\n]$/,"");return(T)})}var p="\\\\";if(R){r=r.replace(/(L_BR_K)+/g,p);r=r.replace(/L_BR_K/gm,p);r=r.replace(/(\\\\)\s+/gm,"$1 \n")}if(s){r=r.replace(/\s+<\/(code|file)>/g,"\n");if(b){r=r.replace(/\s+;/mg,";");r=r.replace(/<\s+/mg,"<");r=r.replace(/\s+>/mg,">")}}if(M){r+="\n"+p+"\n";var j=new RegExp(d,"g");r=r.replace(j," "+p+" ");r=r.replace(/(\||\^)[ ]+(\||\^)\s$/g,"$1\n");r=r.replace(/(\||\^)[ ]+(\||\^)/g,"$1")}r=r.replace(/_FCKG_BLANK_TD_/g," ");if(e){r=r.replace(/\/\/<\/\/\s*/g,"<")}if(Q){String.prototype.font_link_reconcile=function(i){if(i==1){j=/\[\[(.*?)(]+>)([^<]+(\]\])?)[^\>]+\/font>\s*(\]\])/gm}else{j=/(\{]+>)\{\{(:?.*?)\|(:?.*?)<\/font>/gm}return(this.replace(j,function(S,T,v,V){T=T.replace(/\n/gm,"");T=T.replace(/\s/gm,"");T=T.replace(/[\[\]\{\}]/g,"");T=T.replace(/\|/g,"");V=V.replace(/\n/gm,"");V=V.replace(/[\[\]\}\{]/g,"");if(i==1){V="[["+T+"|"+V+"]]"}else{V="{{"+v+"|"+V+"}}"}var U=prompt(LANG.plugins.ckgedit.font_err_1+"\n"+V+"\n"+LANG.plugins.ckgedit.font_err_2);if(U==null){if(ckgedit_to_dwedit){ckgedit_to_dwedit=false;return V}else{throw new Error(LANG.plugins.ckgedit.font_err_throw)}}if(U){return U}return V}))};if(P){r=r.replace(/<\/font>\s{1}/gm,"")}if(F()){if(confirm(LANG.plugins.ckgedit.font_conflict)){return}var G=jQuery("#fontdel").val();if(!G){jQuery("#dw__editform").append('')}}r=r.font_link_reconcile(1);r=r.font_link_reconcile(2);var j=/\>\s+(\*\*|__|\/\/|'')\s+_\s+\1\s+<\/font>/gm;r=r.replace(j,function(i){i=i.replace(/\s+/g,"");return i});r=r.replace(/\[\[(.*?)\|(]+>)(.*?)(<\/font>)\s*(\]\])\s*/gm,function(U,S,i,V){U="[["+S+"|"+V+"]]";var T=jQuery("#fontdel").val();if(!T){jQuery("#dw__editform").append('')}return U});r=r.replace(/(\s*={2,})\s*(.*?)(]+>)(.*?)(<\/font>)(.*?)\s*\1/gm,function(S){S=S.replace(/<\/font>/g," ");S=S.replace(//g," ");var i=jQuery("#formatdel").val();if(!i){jQuery("#dw__editform").append('')}return S})}if(c.length){r=r.replace(/\(\(\){2,}\s*<\/sup>/g,"");r=r.replace(/\(\(+(\d+)\)\)+/,"(($1))");for(var N in y){var a=N.match(/_(\d+)/);var k=new RegExp("()*[(]+"+a[1]+"[)]+()*");y[N]=y[N].replace(/(\d+)_FN_PAREN_C_/,"");r=r.replace(k,"(("+y[N].replace(/_FN_PAREN_C_/g,") ")+"))")}r=r.replace(/<\/sup>/g,"");r=r.replace(/((\(\(\d+\)\)\)?<\/sup>))/mg,function(i){if(!i.match(/p>\(\(\d+/)){return""}return i})}r=r.replace(/(={3,}.*?)(\{\{.*?\}\})(.*?={3,})/g,"$1$3\n\n$2");r=r.replace(/()*\s*\[\[\s*\]\]\s*(<\/sup>)*\n*/g,"");r=r.replace(/\s*\(\(\d+\)\)\s*<\/sup>/mg,"");if(O){r=r.replace(/<\s+/g,"<");r=r.replace(/<\s+/g,"<")}if(L){var x="%";var j=new RegExp("(["+x+"])","g");r=r.replace(/(<nowiki>)(.*?)(<\/nowiki>)/mg,function(v,T,i,S){i=i.replace(/%%(.)%%/mg,"NOWIKI_$1_");return T+i.replace(j,"NOWIKI_$1_")+S})}r=r.replace(/__SWF__(\s*)\[*/g,"{{$1");r=r.replace(/\|.*?\]*(\s*)__FWS__/g,"$1}}");r=r.replace(/(\s*)__FWS__/g,"$1}}");r=r.replace(/\n{3,}/g,"\n\n");r=r.replace(/_LIST_EOFL_/gm," "+p+" ");if(A){if(r.indexOf("~~COMPLEX_TABLES~~")==-1){r+="~~COMPLEX_TABLES~~\n"}}if(!A){r=r.replace(/~~COMPLEX_TABLES~~/gm,"")}r=r.replace(/_CKG_ASTERISK_/gm,"*");r=r.replace(/_ESC_BKSLASH_/g,"\\");r=r.replace(/divalNLine/gm,"\n");if(C=="test"){if(HTMLParser_test_result(r)){alert(r)}return}var D=GetE("dw__editform");D.elements.fck_wikitext.value=r;if(C=="bakup"){return}if(C){var f=GetE(C);f.click();return true}}jQuery(document).ready(function(){var a=false;jQuery(document).on("keypress","input#edit__summary",function(b){if(b.which==13){a=true;jQuery("#save_button").trigger("mousedown")}});jQuery("#ebut_test").mousedown(function(){parse_wikitext("test")});jQuery("#ebtn__delete").click(function(){if(a){a=false;return}return confirm(JSINFO.confirm_delete)});jQuery("#ebtn__delete").mouseup(function(){draft_delete()});jQuery("#ebtn__dwedit").click(function(){ckgedit_to_dwedit=true;setDWEditCookie(2,this);parse_wikitext("edbtn__save");this.form.submit()});jQuery("#ebtn__fbswitch").click(function(){if(getCookie("ckgFbOpt")=="dokuwiki"){document.cookie="ckgFbOpt=ckgedit;SameSite=Lax"}else{document.cookie="ckgFbOpt=dokuwiki;SameSite=Lax"}parse_wikitext("edbtn__save");this.form.submit()});jQuery("#ckgedit_draft_btn").click(function(){ckgedit_get_draft()});jQuery("#backup_button").click(function(){renewLock(true)});jQuery("#revert_to_prev_btn").click(function(){revert_to_prev()});jQuery("#no_styling_btn").click(function(){this.form.styling.value="no_styles";this.form.prefix.value="";this.form.suffix.value="";this.form.rev.value=""});jQuery("#ebut_cancel").mouseup(function(){if(this.form.template&&this.form.template.value=="tpl"){return}if(window.dwfckTextChanged){return}draft_delete()});jQuery("#save_button").mousedown(function(){if(this.form.template&&this.form.template.value=="tpl"){window.dwfckTextChanged=true}if(!window.dwfckTextChanged&&!JSINFO.cg_rev){ckgedit_dwedit_reject=true;parse_wikitext("ebut_cancel")}else{parse_wikitext("edbtn__save")}})}); \ No newline at end of file diff --git a/lib/plugins/ckgedit/scripts/parse_wiki.js.unc b/lib/plugins/ckgedit/scripts/parse_wiki.js.unc new file mode 100644 index 0000000..87a9a20 --- /dev/null +++ b/lib/plugins/ckgedit/scripts/parse_wiki.js.unc @@ -0,0 +1,1994 @@ +function parse_wikitext(id) { + if (ckgedit_dwedit_reject) { + var dom = GetE('ebut_cancel'); + dom.click(); + return true; + } + var useComplexTables = getComplexTables(); + + + function fontConflict() { + + var regex = /\>\s+(\*\*|__|\/\/|'')\s+_\s+\1\s+<\/font>/gm; + results = results.replace(regex, function(m) { + m = m.replace(/\s+/g, ""); + return m; + }); + + regex = new RegExp("\\>(.*?)(\\]\\]\\<\\/font\\>)|(\\<\\/font\\>\\]\\])", "gm"); + if (results.match(regex)) return true; + + regex = new RegExp("(\\{\\{(.*?)\\.\\w{2,4})\\|\\\\{\\{(.*?)\\.\\w+\\<\\/font\\>\\b', 'gm'); + if (results.match(regex)) return true; + + return false; + + } + /** + table debugging code; + */ + function check_rowspans(rows, start_row, ini) { + var tmp = new Array(); + for (var i = start_row; i < rows.length; i++) { + for (var col = 0; col < rows[i].length; col++) { + if (rows[i][col].rowspan > 0) { + var _text = rows[i][col].text; + tmp.push({ + row: i, + column: col, + spans: rows[i][col].rowspan, + text: _text + }); + if (!ini) break; + } + } + } + return tmp; + } + + function insert_rowspan(row, col, spans, rows, shift) { + + var prev_colspans = rows[row][col].colspan ? rows[row][col].colspan : 0; + rows[row][col].rowspan = 0; + for (i = 0; i < spans - 1; i++) { + //debug_row(rows,row,col,"insert_rowspan start"); + rows[++row].splice(col, 0, { + type: 'td', + rowspan: 0, + colspan: prev_colspans, + prev_colspan: prev_colspans, + text: " ::: " + }); + + } + } + + + + function reorder_span_rows(rows) { + var tmp_start = check_rowspans(rows, 0, true); + var num_spans = tmp_start.length; + if (!num_spans) return false; + + + var row = tmp_start[0].row; + var col = tmp_start[0].column; + insert_rowspan(row, col, tmp_start[0].spans, rows); + + num_spans--; + for (var i = 0; i < num_spans; i++) { + row++; + var tmp = check_rowspans(rows, row, false); + if (tmp.length) { + insert_rowspan(tmp[0].row, tmp[0].column, tmp[0].spans, rows); + } + } + return true; + + } + + function insert_table(rows) { + if (!useComplexTables) return; + for (var i = 0; i < rows.length; i++) { + if (!reorder_span_rows(rows)) break;; + } + + results += "\n"; + for (var i = 0; i < rows.length; i++) { + results += "\n"; + for (var col = 0; col < rows[i].length; col++) { + var type = rows[i][col].type == 'td' ? '|' : '^'; + results += type; + var align = rows[i][col].align ? rows[i][col].align : false; + if (align == 'center' || align == 'right') { + results += " "; + } + + results += rows[i][col].text; + if (align == 'center' || align == 'left') { + results += " "; + } + + if (rows[i][col].colspan) { + for (var n = 0; n < rows[i][col].colspan - 1; n++) { + results += type; + } + } + } + + results += '|'; + + } + } + + + window.dwfckTextChanged = false; + if (id != 'bakup') draft_delete(); + var line_break = "\nL_BR_K \n"; + var markup = { + 'b': '**', + 'i': '//', + 'em': '//', + 'u': '__', + 'br': line_break, + 'strike': '', + 'del': '', + 's': '', + p: "\n\n", + 'a': '[[', + 'img': '\{\{', + 'strong': '**', + 'h1': "\n====== ", + 'h2': "\n===== ", + 'h3': "\n==== ", + 'h4': "\n=== ", + 'h5': "\n== ", + 'td': "|", + 'th': "^", + 'tr': " ", + 'table': "\n\n", + 'ol': " - ", + 'ul': " * ", + 'li': "", + 'code': "\'\'", + 'pre': "\n<", + 'hr': "\n\n----\n\n", + 'sub': '', + 'font': "", + 'blockquote': '
', + 'sup': '', + 'div': "\n\n", + 'span': "\n", + 'dl': "\n", + 'dd': "\n", + 'dt': "\n" + }; + var markup_end = { + 'del': '', + 's': '', + 'strike': '', + 'p': " ", + 'br': " ", + 'a': ']]', + 'img': '\}\}', + 'h1': " ======\n", + 'h2': " =====\n", + 'h3': " ====\n", + 'h4': " ===\n", + 'h5': " ==\n", + 'td': " ", + 'th': " ", + 'tr': "|\n", + 'ol': " ", + 'ul': " ", + 'li': "\n", + 'pre': "\n', + 'sup': ' ', + 'div': "\n\n", + 'p': "\n\n", + 'font': "", + 'span': " ", + 'blockquote': '
', + }; + + markup['temp_u'] = "CKGE_TMP_u"; + markup['temp_strong'] = "CKGE_TMP_strong"; + markup['temp_em'] = "CKGE_TMP_em"; + markup['temp_i'] = "CKGE_TMP_i"; + markup['temp_b'] = "CKGE_TMP_b"; + markup['temp_del'] = "CKGE_TMP_del"; + markup['temp_strike'] = "CKGE_TMP_strike"; + markup['temp_code'] = "CKGE_TMP_code"; + markup['temp_sup'] = "CKGE_TMP_sup"; + markup['temp_csup'] = "CKGE_TMP_csup"; + markup['temp_sub'] = "CKGE_TMP_sub"; + markup['temp_csub'] = "CKGE_TMP_csub"; + markup['temp_del'] = "CKGE_TMP_del"; + markup['temp_cdel'] = "CKGE_TMP_cdel"; + markup['temp_strike'] = "CKGE_TMP_del"; + markup['temp_cstrike'] = "CKGE_TMP_cdel"; + markup['temp_s'] = "CKGE_TMP_del"; + markup['temp_cs'] = "CKGE_TMP_cdel"; + + var $FORMAT_SUBST = { + 'CKGE_TMP_b': '**', + 'CKGE_TMP_strong': '**', + 'CKGE_TMP_em': '\/\/', + 'CKGE_TMP_u': '__', + 'CKGE_TMP_sup': '', + 'CKGE_TMP_sub': '', + 'CKGE_TMP_cdel': '', + 'CKGE_TMP_csub': '', + 'CKGE_TMP_csup': '', + 'CKGE_TMP_del': '', + 'CKGE_TMP_strike': '', + 'CKGE_TMP_code': "\'\'" + }; + + markup['blank'] = ""; + markup['fn_start'] = '(('; + markup['fn_end'] = '))'; + markup['row_span'] = ":::"; + markup['p_insert'] = '_PARA__TABLE_INS_'; + markup['format_space'] = '_FORMAT_SPACE_'; + markup['pre_td'] = '<'; //removes newline from before < which corrupts table + var format_chars = { + 'strong': true, + 'b': true, + 'i': true, + 'em': true, + 'u': true, + 'del': true, + 'strike': true, + 'code': true, + 'sup': true, + 'sub': true, + 's': true + }; + + var results = ""; + var HTMLParser_LBR = false; + var HTMLParser_PRE = false; + var HTMLParser_Geshi = false; + var HTMLParser_TABLE = false; + var HTMLParser_COLSPAN = false; + var HTMLParser_FORMAT_SPACE = false; + var HTMLParser_MULTI_LINE_PLUGIN = false; + var HTMLParser_NOWIKI = false; + var HTMLFormatInList = false; + var HTMLAcroInList = false; + var HTML_InterWiki = false; + var HTMLParserFont = false; + HTMLLinkInList = false; + var HTMLParserFontInfix = false; + var CurrentTable; + + var HTMLParserTopNotes = new Array(); + var HTMLParserBottomNotes = new Array(); + var HTMLParserOpenAngleBracket = false; + var HTMLParserParaInsert = markup['p_insert']; + + var geshi_classes = '(br|co|coMULTI|es|kw|me|nu|re|st|sy)[0-9]'; + String.prototype.splice = function(idx, rem, s) { + return (this.slice(0, idx) + s + this.slice(idx + Math.abs(rem))); + }; + String.frasl = new RegExp("⁄\|⁄\|⁄\|⁄", 'g'); + geshi_classes = new RegExp(geshi_classes); + HTMLParser(CKEDITOR.instances.wiki__text.getData(), { + attribute: "", + link_title: "", + link_class: "", + image_link_type: "", + td_align: "", + in_td: false, + td_colspan: 0, + td_rowspan: 0, + rowspan_col: 0, + last_column: -1, + row: 0, + col: 0, + td_no: 0, + tr_no: 0, + current_row: false, + in_table: false, + in_multi_plugin: false, + is_rowspan: false, + list_level: 0, + prev_list_level: -1, + list_started: false, + xcl_markup: false, + in_link: false, + link_formats: new Array(), + last_tag: "", + code_type: false, + in_endnotes: false, + is_smiley: false, + geshi: false, + downloadable_code: false, + export_code: false, + code_snippet: false, + downloadable_file: "", + external_mime: false, + in_header: false, + curid: false, + format_in_list: false, + prev_li: new Array(), + link_only: false, + in_font: false, + using_fonts: false, + interwiki: false, + bottom_url: false, + font_family: "inherit", + font_size: "inherit", + font_weight: "inherit", + font_color: "inherit", + font_bgcolor: "inherit", + font_style: "inherit", + is_mediafile: false, + end_nested: false, + mfile: false, + + backup: function(c1, c2) { + var c1_inx = results.lastIndexOf(c1); // start position of chars to delete + var c2_inx = results.indexOf(c2, c1_inx); // position of expected next character + if (c1_inx == -1 || c2_inx == -1) return; + if (c1.length + c2_inx == c2_inx) { + var left_side = results.substring(0, c1_inx); //from 0 up to but not including c1 + var right_side = results.substring(c2_inx); //from c2 to end of string + results = left_side + right_side; + return true; + } + return false; + }, + is_iwiki: function(class_name, title) { + var iw_type = class_name.match(/iw_(\w+\.?\w{0,12})/); + var iw_title = title.split(/\/\//); + var interwiki_label = iw_title[iw_title.length - 1]; + if (!interwiki_label.match(/oIWIKIo.*?cIWIKIc/)) { + interwiki_label = 'oIWIKIo' + interwiki_label + 'cIWIKIc'; + } + interwiki_label = interwiki_label.replace(/^.*?oIWIKIo/, 'oIWIKIo'); + interwiki_label = interwiki_label.replace(/cIWIKIc.*/, 'cIWIKIc'); + iw_type[1] = iw_type[1].replace(/_(\w{2})/g, "." + "$1"); + this.attr = iw_type[1] + '>' + decodeURIComponent(interwiki_label); + HTML_InterWiki = true; + this.interwiki = true; + }, + start: function(tag, attrs, unary) { + /** if table debugging code: + this_debug = this.dbg; + */ + if (markup[tag]) { + if (format_chars[tag] && this.in_link) { + this.link_formats.push(tag); + return; + } + if (format_chars[tag] && (this.in_font || this.in_header)) { + results += " "; + var t = 'temp_' + tag; + results += markup[t]; + results += " "; + return; + } else if (tag == 'acronym') { + return; + } + if (format_chars[tag] && this.in_endnotes) { + if (tag == 'sup') return; + } + if (tag == 'ol' || tag == 'ul') { + this.prev_list_level = this.list_level; + this.list_level++; + if (this.list_level == 1) this.list_started = false; + if (this.list_started) this.prev_li.push(markup['li']); + markup['li'] = markup[tag]; + + return; + } else if (!this.list_level) { + markup['li'] = ""; + this.prev_li = new Array(); + } + + this.is_mediafile = false; + + if (tag == 'img') { + var img_size = "?"; + var width; + var height; + var style = false; + var img_align = ''; + var alt = ""; + var from_clipboard = false; + this.is_smiley = false; + this.in_link = false; + } + + if (tag == 'a') { + var local_image = true; + var type = ""; + this.xcl_markup = false; // set to false in end() as well, double sure + this.in_link = true; + this.link_pos = results.length; + this.link_formats = new Array(); + this.footnote = false; + var bottom_note = false; + this.id = ""; + this.external_mime = false; + var media_class = false; + this.export_code = false; + this.code_snippet = false; + this.downloadable_file = ""; + var qs_set = false; + this.link_only = false; + save_url = ""; + this.interwiki = false; + this.bottom_url = false; + this.link_title = false; + var interwiki_title = ""; + var interwiki_class = ""; + } + + if (tag == 'p') { + this.in_link = false; + if (this.in_table) { + tag = 'p_insert'; + HTMLParser_TABLE = true; + } + } + + + if (tag == 'table') { + this.td_no = 0; + this.tr_no = 0; + this.in_table = true; + this.is_rowspan = false; + this.row = -1; + this.rows = new Array(); + CurrentTable = this.rows; + this.table_start = results.length; + } else if (tag == 'tr') { + this.tr_no++; + this.td_no = 0; + this.col = -1; + this.row++; + this.rows[this.row] = new Array(); + this.current_row = this.rows[this.row]; + } else if (tag == 'td' || tag == 'th') { + this.td_no++; + this.col++; + this.current_row[this.col] = { + type: tag, + rowspan: 0, + colspan: 0, + text: "" + }; + this.cell_start = results.length; + this.current_cell = this.current_row[this.col]; + if (this.td_rowspan && this.rowspan_col == this.td_no && this.td_no != this.last_column) { + this.is_rowspan = true; + this.td_rowspan--; + } else { + this.is_rowspan = false; + } + + + } + + + var matches; + this.attr = false; + this.format_tag = false; + + if (format_chars[tag]) this.format_tag = true; + var dwfck_note = false; + + for (var i = 0; i < attrs.length; i++) { + + // if(!confirm(tag + ' ' + attrs[i].name + '="' + attrs[i].escaped + '"')) exit; + if (tag == 'td' || tag == 'th') { + if (attrs[i].name == 'colspan') { + this.current_row[this.col].colspan = attrs[i].value; + } + if (attrs[i].name == 'class') { + if ((matches = attrs[i].value.match(/(left|center|right)/))) { + this.current_row[this.col].align = matches[1]; + } + } + if (attrs[i].name == 'rowspan') { + this.current_row[this.col].rowspan = attrs[i].value + } + } + if (attrs[i].escaped == 'u' && tag == 'em') { + tag = 'u'; + this.attr = 'u' + break; + } + + if (tag == 'div') { + if (attrs[i].name == 'class' && attrs[i].value == 'footnotes') { + tag = 'blank'; + this.in_endnotes = true; + } + break; + } + if (tag == 'dl' && attrs[i].name == 'class' && attrs[i].value == 'file') { + this.downloadable_code = true; + HTMLParser_Geshi = true; + return; + } + if (tag == 'span' && attrs[i].name == 'class') { + if (attrs[i].value == 'np_break') return; + } + + if (tag == 'span' && attrs[i].name == 'class') { + if (attrs[i].value == 'curid') { + this.curid = true; + return; + } + if (attrs[i].value == 'multi_p_open') { + this.in_multi_plugin = true; + HTMLParser_MULTI_LINE_PLUGIN = true; + return; + } + if (attrs[i].value == 'multi_p_close') { + this.in_multi_plugin = false; + return; + } + if (attrs[i].value.match(geshi_classes)) { + tag = 'blank'; + this.geshi = true; + break; + } + } + + + if (tag == 'span' && !ckgedit_xcl_styles) { + if (attrs[i].name == 'style') { + if (!this.in_font) results += "__STYLE__"; + this.in_font = true; + this.using_fonts = true; + matches = attrs[i].value.match(/font-family:\s*([\w\-\s,]+);?/); + if (matches) { + this.font_family = matches[1]; + } + + //matches = attrs[i].value.match(/font-size:\s*(\d+(\w+|%));?/); + matches = attrs[i].value.match(/font-size:\s*(.*)/); + if (matches) { + matches[1] = matches[1].replace(/;/, ""); + this.font_size = matches[1]; + } + matches = attrs[i].value.match(/font-weight:\s*(\w+);?/); + if (matches) { + this.font_weight = matches[1]; + } + matches = attrs[i].value.match(/.*?color:\s*(.*)/); + var bgcolor_found = false; + if (matches) { + matches[1] = matches[1].replace(/;/, ""); + if (matches[0].match(/background/)) { + this.font_bgcolor = matches[1]; + } else { + this.font_color = matches[1]; + } + } + if (!bgcolor_found) { //catch MS Word which uses background:color-name instead of background-color:color-name + matches = attrs[i].value.match(/background:\s*(\w+)/); + if (matches && matches[0].match(/background/)) { + this.font_bgcolor = matches[1]; + } + + } + } + + } + if (tag == 'td' || tag == 'th') { + if (tag == 'td') { + results = results.replace(/\^$/, '|'); + } + this.in_td = true; + if (attrs[i].name == 'align') { + this.td_align = attrs[i].escaped; + + } else if (attrs[i].name == 'class') { + matches = attrs[i].value.match(/\s*(\w+)align/); + if (matches) { + this.td_align = matches[1]; + } + } else if (attrs[i].name == 'colspan') { + HTMLParser_COLSPAN = true; + this.td_colspan = attrs[i].escaped; + } else if (attrs[i].name == 'rowspan') { + this.td_rowspan = attrs[i].escaped - 1; + this.rowspan_col = this.td_no; + } + + HTMLParser_TABLE = true; + } + + if (tag == 'a') { + + // if(!confirm(attrs[i].name + '="' + attrs[i].escaped + '"')) exit; + if (attrs[i].name == 'title') { + this.link_title = attrs[i].escaped; + if (interwiki_class) { + interwiki_title = attrs[i].escaped; + } else this.link_title = this.link_title.replace(/\s+.*$/, ""); + } else if (attrs[i].name == 'class') { + if (attrs[i].value.match(/fn_top/)) { + this.footnote = true; + } else if (attrs[i].value.match(/fn_bot/)) { + bottom_note = true; + } else if (attrs[i].value.match(/mf_(png|gif|jpg|jpeg)/i)) { + this.link_only = true; + } else if (attrs[i].value.match(/interwiki/)) { + attrs[i].value = attrs[i].value.replace(/\./g, '_'); + this.link_class = attrs[i].value; + continue; + } + + this.link_class = attrs[i].escaped; + media_class = this.link_class.match(/mediafile/); + } else if (attrs[i].name == 'id') { + this.id = attrs[i].value; + } else if (attrs[i].name == 'type') { + type = attrs[i].value; + } else if (attrs[i].name == 'href' && !this.code_type) { + var http = attrs[i].escaped.match(/https*:\/\//) ? true : false; + if (http) save_url = attrs[i].escaped; + if (attrs[i].escaped.match(/\/lib\/exe\/detail.php/)) { + this.image_link_type = 'detail'; + } else if (attrs[i].escaped.match(/exe\/fetch.php/)) { + this.image_link_type = 'direct'; + } + + if (this.link_class && this.link_class.match(/media/) && !this.link_title) { + var link_find = attrs[i].escaped.match(/media=(.*)/); + if (link_find) this.link_title = link_find[1]; + } + // required to distinguish external images from external mime types + // that are on the wiki which also use {{url}} + var media_type = attrs[i].escaped.match(/fetch\.php.*?media=.*?\.(png|gif|jpg|jpeg)$/i); + if (media_type) media_type = media_type[1]; + + if (attrs[i].escaped.match(/^https*:/)) { + this.attr = attrs[i].escaped; + local_image = false; + } + if (attrs[i].escaped.match(/^ftp:/)) { + this.attr = attrs[i].escaped; + local_image = false; + } else if (attrs[i].escaped.match(/do=export_code/)) { + this.export_code = true; + } else if (attrs[i].escaped.match(/^nntp:/)) { + this.attr = attrs[i].escaped; + local_image = false; + } else if (attrs[i].escaped.match(/^mailto:/)) { + this.attr = attrs[i].escaped.replace(/mailto:/, ""); + local_image = false; + } else if (attrs[i].escaped.match(/m-files/)) { + this.attr = attrs[i].escaped; + this.mfile = attrs[i].escaped; + local_image = false; + } else if (attrs[i].escaped.match(/^file:/)) { //samba share + var url = attrs[i].value.replace(/file:[\/]+/, ""); + url = url.replace(/[\/]/g, '\\'); + url = '\\\\' + url; + this.attr = url; + local_image = false; + } + // external mime types after they've been saved first time + else if (http && !media_type && (matches = attrs[i].escaped.match(/fetch\.php(.*)/))) { + if (matches[1].match(/media=/)) { + elems = matches[1].split(/=/); + this.attr = elems[1]; + } else { // nice urls + matches[1] = matches[1].replace(/^\//, ""); + this.attr = matches[1]; + } + + if (typeof config_animal !== 'undefined') { + var regex = new RegExp(config_animal + '\/file\/(.*)'); + matches = attrs[i].escaped.match(regex); + if (matches && matches[1]) this.attr = matches[1]; + if (this.attr) this.attr = this.attr.replace(/\//g, ':'); + } + local_image = false; + + this.attr = decodeURIComponent ? decodeURIComponent(this.attr) : unescape(this.attr); + if (!this.attr.match(/^:/)) { + this.attr = ':' + this.attr; + } + this.external_mime = true; + } else { + local_image = false; + + matches = attrs[i].escaped.match(/doku.php\?id=(.*)/); + if (matches && save_url) { + var rx = DOKU_BASE + 'doku.php'; + if (!attrs[i].escaped.match(rx)) { + this.link_class == 'urlextern'; + this.attr = save_url; + matches = null; + } + } + if (!matches) { + matches = attrs[i].escaped.match(/doku.php\/(.*)/); + } + /* previously saved internal link with query string + requires initial ? to be recognized by DW. In Anteater and later */ + if (matches) { + if (!matches[1].match(/\?/) && matches[1].match(/&/)) { + qs_set = true; + matches[1] = matches[1].replace(/&/, '?') + } + } + if (matches && matches[1]) { + if (!matches[1].match(/^:/)) { + this.attr = ':' + matches[1]; + } else { + this.attr = matches[1]; + } + + if (this.attr.match(/\.\w+$/)) { // external mime's first access + if (type && type == 'other_mime') { + this.external_mime = true; + } else { + for (var n = i + 1; n < attrs.length; n++) { + if (attrs[n].value.match(/other_mime/)) + this.external_mime = true; + break; + } + + } + } + + } else { + matches = attrs[i].value.match(/\\\\/); // Windows share + if (matches) { + this.attr = attrs[i].escaped; + local_image = false; + } + } + } + + if (this.link_class == 'media') { + if (attrs[i].value.match(/http:/)) { + local_image = false; + } + } + + if (!this.attr && this.link_title) { + + if (matches = this.link_class.match(/media(.*)/)) { + this.link_title = decodeURIComponent(safe_convert(this.link_title)); + this.attr = this.link_title; + var m = matches[1].split(/_/); + if (m && m[1]) { + media_type = m[1]; + } else if (m) { + media_type = m[0]; + } else media_type = 'mf'; + if (!this.attr.match(/^:/) && !this.attr.match(/^https?\:/)) { + this.attr = ':' + this.attr.replace(/^\s+/, ""); + } + this.external_mime = true; + local_image = false; + } + } + + if (this.attr.match && this.attr.match(/%[a-fA-F0-9]{2}/) && (matches = this.attr.match(/userfiles\/file\/(.*)/))) { + matches[1] = matches[1].replace(/\//g, ':'); + if (!matches[1].match(/^:/)) { + matches[1] = ':' + matches[1]; + } + this.attr = decodeURIComponent ? decodeURIComponent(matches[1]) : unescape(matches[1]); + this.attr = decodeURIComponent ? decodeURIComponent(this.attr) : unescape(this.attr); + this.external_mime = true; + + } else if (this.attr && this.attr.match(/%[a-fA-F0-9]{2}/)) { + this.attr = decodeURIComponent(this.attr); + this.attr = decodeURIComponent(this.attr); + } + + // alert('title: ' + this.link_title + ' class: ' + this.link_class + ' export: ' +this.export_code); + if (this.link_title && this.link_title.match(/Snippet/)) this.code_snippet = true; + + /* anchors to current page without prefixing namespace:page */ + if (attrs[i].value.match(/^#/) && this.link_class.match(/wikilink/)) { + this.attr = attrs[i].value; + this.link_title = false; + } + + /* These two conditions catch user_rewrite not caught above */ + if (this.link_class.match(/wikilink/) && this.link_title) { + this.external_mime = false; + if (!this.attr) { + this.attr = this.link_title; + } + if (!this.attr.match(/^:/)) { + this.attr = ':' + this.attr; + } + if (this.attr.match(/\?.*?=/)) { + var elems = this.attr.split(/\?/); + elems[0] = elems[0].replace(/\//g, ':'); + this.attr = elems[0] + '?' + elems[1]; + } else { + this.attr = this.attr.replace(/\//g, ':'); + } + + /* catch query strings attached to internal links for .htacess nice urls */ + if (!qs_set && attrs[i].name == 'href') { + if (!this.attr.match(/\?.*?=/) && !attrs[i].value.match(/doku.php/)) { + var qs = attrs[i].value.match(/(\?.*)$/); + if (qs && qs[1]) this.attr += qs[1]; + } + + } + } else if (this.link_class.match(/mediafile/) && this.link_title && !this.attr) { + this.attr = this.link_title; + this.external_mime = true; + + if (!this.attr.match(/^:/)) { + this.attr = ':' + this.attr; + } + } else if (this.link_class.match(/interwiki/)) { + interwiki_class = this.link_class; + } + + if (this.link_class == 'urlextern' && !this.mfile && save_url) { + this.attr = save_url; + this.external_mime = false; // prevents external links to images from being converted to image links + } + if (this.in_endnotes) { + if (this.link_title) { + this.bottom_url = this.link_title; //save for bottom urls + } else if (this.attr) { + this.bottom_url = this.attr; + } + } + this.link_title = ""; + this.link_class = ""; + // break; + } + } + + if (interwiki_class && interwiki_title) { + this.is_iwiki(interwiki_class, interwiki_title); + interwiki_class = ""; + interwiki_title = ""; + } + + if (tag == 'sup') { + if (attrs[i].name == 'class') { + matches = attrs[i].value.split(/\s+/); + if (matches[0] == 'dwfcknote') { + this.attr = matches[0]; + tag = 'blank'; + if (oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj.notes[matches[1]]) { + dwfck_note = '((' + oDokuWiki_FCKEditorInstance.oinsertHtmlCodeObj.notes[matches[1]] + '))'; + } + break; + } + } + } + + if (tag == 'pre') { + if (attrs[i].name == 'class') { + + var elems = attrs[i].escaped.split(/\s+/); + if (elems.length > 1) { + this.attr = attrs[i].value; + this.code_type = elems[0]; + } else { + this.attr = attrs[i].escaped; + this.code_type = this.attr; + } + if (this.downloadable_code) { + this.attr = this.attr.replace(/\s*code\s*/, ""); + this.code_type = 'file'; + } + HTMLParser_PRE = true; + if (this.in_table) tag = 'pre_td'; + break; + } + + } else if (tag == 'img') { + if (attrs[i].name == 'alt') { + alt = attrs[i].value; + } + if (attrs[i].name == 'type') { + this.image_link_type = attrs[i].value; + } + + if (attrs[i].name == 'src') { + // alert(attrs[i].name + ' = ' + attrs[i].value + ', fnencode=' + oDokuWiki_FCKEditorInstance.dwiki_fnencode); + + var src = ""; + // fetched by fetch.php + if (matches = attrs[i].escaped.match(/fetch\.php.*?(media=.*)/)) { + var elems = matches[1].split('='); + src = elems[1]; + if (matches = attrs[i].escaped.match(/(media.*)/)) { + var elems = matches[1].split('='); + var uri = elems[1]; + src = decodeURIComponent ? decodeURIComponent(uri) : unescape(uri); + } + if (!src.match(/https?:/) && !src.match(/^:/)) src = ':' + src; + } else if (attrs[i].escaped.match(/https?:\/\//)) { + src = attrs[i].escaped; + src = src.replace(/\?.*?$/, ""); + } + // url rewrite 1 + else if (matches = attrs[i].escaped.match(/\/_media\/(.*)/)) { + var elems = matches[1].split(/\?/); + src = elems[0]; + src = src.replace(/\//g, ':'); + if (!src.match(/^:/)) src = ':' + src; + } + // url rewrite 2 + else if (matches = attrs[i].escaped.match(/\/lib\/exe\/fetch.php\/(.*)/)) { + var elems = matches[1].split(/\?/); + src = elems[0]; + if (!src.match(/^:/)) src = ':' + src; + } else { + // first insertion from media mananger + matches = attrs[i].escaped.match(/^.*?\/userfiles\/image\/(.*)/); + if (!matches && typeof config_animal !== 'undefined') { + var regex = new RegExp(config_animal + '\/image\/(.*)$'); + matches = attrs[i].escaped.match(regex); + } + if (!matches) { // windows style + var regex = doku_base + 'data/media/'; + regex = regex.replace(/([\/\\])/g, "\\$1"); + regex = '^.*?' + regex + '(.*)'; + regex = new RegExp(regex); + matches = attrs[i].escaped.match(regex); + } + if (matches && matches[1]) { + src = matches[1].replace(/\//g, ':'); + src = ':' + src; + } else { + src = decodeURIComponent ? decodeURIComponent(attrs[i].escaped) : unescape(attrs[i].escaped); + if (src.search(/data:image.*?;base64/) > -1) { + from_clipboard = true; + } + } + + } + if (src && src.match(/lib\/images\/smileys/)) { + // src = 'http://' + window.location.host + src; + this.is_smiley = true; + } + this.attr = src; + if (this.attr && this.attr.match && this.attr.match(/%[a-fA-F0-9]{2}/)) { + this.attr = decodeURIComponent(safe_convert(this.attr)); + this.attr = decodeURIComponent(safe_convert(this.attr)); + } + + + + } // src end + else if (attrs[i].name == 'width' && !style) { + width = attrs[i].value; + + } else if (attrs[i].name == 'height' && !style) { + height = attrs[i].value; + } else if (attrs[i].name == 'style') { + var match = attrs[i].escaped.match(/width:\s*(\d+)/); + if (match) { + width = match[1]; + var match = attrs[i].escaped.match(/height:\s*(\d+)/); + if (match) height = match[1]; + } + } else if (attrs[i].name == 'align' || attrs[i].name == 'class') { + if (attrs[i].escaped.match(/(center|middle)/)) { + img_align = 'center'; + } else if (attrs[i].escaped.match(/right/)) { + img_align = 'right'; + } else if (attrs[i].escaped.match(/left/)) { + img_align = 'left'; + } else { + img_align = ''; + } + } + } // End img + } // End Attributes Loop + + if (this.is_smiley) { + if (alt) { + results += alt + ' '; + alt = ""; + } + this.is_smiley = false; + return; + } + if (this.link_only) tag = 'img'; + if (tag == 'br') { + if (this.in_multi_plugin) { + results += "\n"; + return; + } + + if (!this.code_type) { + HTMLParser_LBR = true; + } else if (this.code_type) { + results += "\n"; + return; + } + + if (this.in_table) { + results += HTMLParserParaInsert; + return; + } + if (this.list_started) { + results += '_LIST_EOFL_'; /* enables newlines in lists: abc \\def */ + } else { + results += '\\\\ '; + return; + } + } else if (tag.match(/^h(\d+|r)/)) { + var str_len = results.length; + if (tag.match(/h(\d+)/)) { + this.in_header = true; + } + if (str_len) { + if (results.charCodeAt(str_len - 1) == 32) { + results = results.replace(/\x20+$/, ""); + } + } + } else if (this.last_col_pipes) { + if (format_chars[tag]) results += markup[tag]; + tag = 'blank'; + } else if (dwfck_note) { + results += dwfck_note; + return; + } + + if (tag == 'b' || tag == 'i' && this.list_level) { + if (results.match(/(\/\/|\*)(\x20)+/)) { + results = results.replace(/(\/\/|\*)(\x20+)\-/, "$1\n" + "$2-"); + } + } + + if (tag == 'li' && this.list_level) { + if (this.list_level == 1 & !this.list_started) { + results += "\n"; + this.list_started = true; + } + results = results.replace(/[\x20]+$/, ""); + + for (var s = 0; s < this.list_level; s++) { + // this handles format characters at the ends of list lines + if (results.match(/_FORMAT_SPACE_\s*$/)) { + results = results.replace(/_FORMAT_SPACE_\s*$/, "\n"); + } + if (this.list_level > 1) { + results += ' '; + } + } + + if (this.prev_list_level > 0 && markup['li'] == markup['ol']) { + this.prev_list_level = -1; + } + } + if (tag == 'a' && this.list_level) { + HTMLLinkInList = true; + } + if (tag == 'a' && local_image) { + this.xcl_markup = true; + return; + } else if (tag == 'a' && (this.export_code || this.code_snippet)) { + return; + } else if (tag == 'a' && this.footnote) { + tag = 'fn_start'; + } else if (tag == 'a' && bottom_note) { + HTMLParserTopNotes.push(this.id); + } else if (tag == 'a' && this.external_mime) { + if (this.in_endnotes) { + this.link_class = 'media'; + return; + } + + if (media_class && media_class == 'mediafile') { + results += markup['img']; + results += this.attr + '|'; + this.is_mediafile = true; + } + + return; + } else if (this.in_font) { + if (tag == 'a') { + results = results.replace(/__STYLE__/, '[[' + this.attr + '|'); + this.in_font = false; + } + return; + /* */ + } + + if (this.in_endnotes && tag == 'a') return; + if (this.code_type && tag == 'span') tag = 'blank'; + if (this.mfile && !this.attr) { + this.attr = this.mfile; + } + results += markup[tag]; // Set tag + + if (tag == 'td' || tag == 'th' || (this.last_col_pipes && this.td_align == 'center')) { + if (this.is_rowspan) { + results += markup['row_span'] + ' | '; + this.is_rowspan = false; + } + if (this.td_align == 'center' || this.td_align == 'right') { + results += ' '; + } + + } else if (tag == 'a' && this.attr) { + this.attr = this.attr.replace(/%7c/, '%257c'); + results += this.attr + '|'; + } else if (tag == 'img') { + var link_type = this.image_link_type; + this.image_link_type = ""; + if (this.link_only) link_type = 'link_only'; + if (!link_type || from_clipboard) { + link_type = 'nolink'; + } else if (link_type == 'detail') { + link_type = ""; + } + + if (link_type == 'link_only') { + img_size = '?linkonly'; + } else if (link_type) { + img_size += link_type + '&'; + } + if (width && height) { + img_size += width + 'x' + height; + } else if (width) { + img_size += width; + } else if (!link_type) { + img_size = ""; + } + if (img_align && img_align != 'left') { + results += ' '; + } + this.attr += img_size; + if (img_align == 'center' || img_align == 'left') { + this.attr += ' '; + } + if (alt) { + results += this.attr + '|' + alt + '}}'; + } else results += this.attr + '}}'; + this.attr = 'src'; + } else if (tag == 'pre' || tag == 'pre_td') { + if (this.downloadable_file) this.attr += ' ' + this.downloadable_file; + if (!this.attr) this.attr = 'code'; + results += this.attr + '>'; + this.downloadable_file = ""; + this.downloadable_code = false; + } + + } // if markup tag + }, + + end: function(tag) { + + if (format_chars[tag] && (this.in_font || this.in_header)) { + results += " "; + if (tag == 'sup' || tag == 'sub' || tag == 'del' || tag == 'strike' || tag == 's') { + var t = 'temp_c' + tag; + } else var t = 'temp_' + tag; + results += markup[t]; + results += " "; + return; + } + if (this.in_endnotes && tag == 'a') return; + if (this.in_link && format_chars[current_tag] && this.link_formats.length) { + return; + } else if (tag == 'a' && !this.link_formats.length) this.in_link = false; + + if (this.link_only) { + this.link_only = false; + return; + } + + if (!markup[tag]) return; + + if (tag == 'sup' && this.attr == 'dwfcknote') { + return; + } + if (this.is_smiley) { + this.is_smiley = false; + if (tag != 'li') return; + } + if (tag == 'span' && this.in_font && !ckgedit_xcl_styles) { + tag = 'font'; + // + var font_str = '"; + var inherits = font_str.match(/(inherit)/g); + if (inherits && inherits.length < 3) HTMLParserFontInfix = true; + var font_start = results.lastIndexOf('__STYLE__'); + results = results.splice(font_start, 9, font_str); + results = results.replace(/_FORMAT_SPACE_, delete link markup + if (this.backup('\[\[', '\{')) return; + } + + if (this.end_nested) { + this.end_nested = false; + return; // prevent newline from being inserted between end of nested list and return to previous nested level + } + + if (tag == 'ol' || tag == 'ul') { + this.list_level--; + if (!this.list_level) this.format_in_list = false; + if (this.prev_li.length) { + markup['li'] = this.prev_li.pop(); + this.end_nested = true; + return; + } + tag = "\n\n"; + } else if (tag == 'a' && this.external_mime) { + this.external_mime = false; + if (this.is_mediafile) { + tag = '}} '; + } else return; + + } else if (tag == 'pre') { + tag = markup_end[tag]; + if (this.code_type) { + tag += this.code_type + ">"; + } else { + var codeinx = results.lastIndexOf('code'); + var fileinx = results.lastIndexOf('file'); + if (fileinx > codeinx) { + this.code_type = 'file'; + } else this.code_type = 'code'; + tag += this.code_type + ">"; + } + this.code_type = false; + + } else if (markup_end[tag]) { + tag = markup_end[tag]; + } else if (this.attr == 'u' && tag == 'em') { + tag = 'u'; + } else if (tag == 'acronym') {} else { + tag = markup[tag]; + } + + if (current_tag == 'tr') { + if (this.last_col_pipes) { + tag = "\n"; + this.last_col_pipes = ""; + } + + if (this.td_rowspan && this.rowspan_col == this.td_no + 1) { + this.is_rowspan = false; + this.last_column = this.td_no; + this.td_rowspan--; + tag = '|' + markup['row_span'] + "|\n"; + } + } else if (current_tag == 'td' || current_tag == 'th') { + this.last_col_pipes = ""; + this.in_td = false; + } else if (current_tag.match(/h\d+/)) { + this.in_header = false; + } + + + if (markup['li']) { + if (results.match(/\n$/) && !this.list_level) { + tag = ""; + } + + } + + + if (this.in_endnotes && current_tag == 'sup') { + return + } + results += tag; + + if (format_chars[current_tag]) { + if (this.list_level) { + this.format_in_list = true; + HTMLFormatInList = true; + } + results += markup['format_space']; + HTMLParser_FORMAT_SPACE = markup['format_space']; + } + this.last_tag = current_tag; + + if (this.td_colspan && !useComplexTables) { + if (this.td_align == 'center') results += ' '; + var _colspan = "|"; + if (current_tag == 'th') + _colspan = '^'; + var colspan = _colspan; + for (var i = 1; i < this.td_colspan; i++) { + colspan += _colspan; + } + this.last_col_pipes = colspan; + results += colspan; + this.td_colspan = false; + } else if (this.td_align == 'center') { + results += ' '; + this.td_align = ''; + } + + if (current_tag == 'a' && this.link_formats.length) { + var end_str = results.substring(this.link_pos); + var start_str = results.substring(0, this.link_pos); + var start_format = ""; + var end_format = ""; + for (var i = 0; i < this.link_formats.length; i++) { + var fmt = markup[this.link_formats[i]]; + var endfmt = markup_end[this.link_formats[i]] ? markup_end[this.link_formats[i]] : fmt; + start_format += markup[this.link_formats[i]]; + end_format = endfmt + end_format; + } + + start_str += start_format; + end_str += end_format; + results = start_str + end_str; + this.link_formats = new Array(); + this.in_link = false; + } else if (current_tag == 'a') { + this.link_formats = new Array(); + this.in_link = false; + + } + }, + + chars: function(text) { + text = text.replace(/\t/g, " "); + if (this.code_type == 'code') { + text = text.replace(/(\n?|\s+)\\/gm, "$1CBL__Bksl"); + } + if (text.match(/~~START_HTML_BLOCK~~/)) { + text = text.replace(/~~START_HTML_BLOCK~~\n*/, "~~START_HTML_BLOCK~~\n\n"); + } + if (text.match(/~~CLOSE_HTML_BLOCK~~/)) { + text = text.replace(/~~CLOSE_HTML_BLOCK~~\n*/gm, "\n\n\n~~CLOSE_HTML_BLOCK~~\n\n"); + } + + /*interwiki frasl refactoring*/ + if (this.interwiki) { + // text = text.replace(String.frasl,"\/"); + } + if (this.interwiki && results.match(/>\w+\s*\|$/)) { + this.interwiki = false; + if (this.attr) { + results += text; + } else { + results = results.replace(/>\w+\s*\|$/, '>' + text); + } + return; + } + if (this.in_multi_plugin) { + text = text.replace('< ', '<'); + } + text = text.replace(/'/g, "'"); //replace single quote entities with single quotes + text = text.replace(/^(>)+/, function(match, quotes) { + return (match.replace(/(>)/g, "\__QUOTE__")); + }); + text = text.replace(/¬ags/g, '¬ags'); //replace ¬ entity in include notags param + //adjust spacing on multi-formatted strings + results = results.replace(/([\/\*_])_FORMAT_SPACE_([\/\*_]{2})_FORMAT_SPACE_$/, "$1$2@@_SP_@@"); + if (text.match(/^&\w+;/)) { + results = results.replace(/_FORMAT_SPACE_\s*$/, ""); // remove unwanted space after character entity + } + + if (this.link_only) { + if (text) { + replacement = '|' + text + '}} '; + results = results.replace(/\}\}\s*$/, replacement); + } + return; + } + if (!this.code_type) { + if (!this.last_col_pipes) { + text = text.replace(/\x20{6,}/, " "); + text = text.replace(/^( )+\s*$/, '_FCKG_BLANK_TD_'); + text = text.replace(/( )+/, ' '); + } + + if (this.format_tag) { + if (!this.list_started || this.in_table) text = text.replace(/^\s+/, '@@_SP_@@'); + } else if (this.last_tag == 'a') { + text = text.replace(/^\s{2,}/, " "); + } else if (!this.using_fonts) text = text.replace(/^\s+/, ''); + + if (text.match(/nowiki>/)) { + HTMLParser_NOWIKI = true; + } + + if (this.format_in_list || (HTMLParserFont && this.list_started)) { + text = text.replace(/^[\n\s]+$/g, ''); + if (text.match(/\n{2,}\s{1,}/)) { + text = text.replace(/\n{2,}/, "\n"); + } + } + + if (this.in_td && !text) { + // text = "_FCKG_BLANK_TD_"; + this.in_td = false; + } + } else { + text = text.replace(/<\s/g, '<'); + text = text.replace(/\s>/g, '>'); + var geshi = text.match(/^\s*geshi:\s+(.*)$/m); + if (geshi) { + results = results.replace(/<(code|file)>\s*$/, '<' + "$1" + ' ' + geshi[1] + '>'); + text = text.replace(geshi[0], ""); + } + + } + + + if (this.attr && this.attr == 'dwfcknote') { + if (text.match(/fckgL\d+/)) { + return; + } + if (text.match(/^[\-,:;!_]/)) { + results += text; + } else { + results += ' ' + text; + } + return; + } + + + + if (this.downloadable_code && (this.export_code || this.code_snippet)) { + this.downloadable_file = text; + return; + } + + /* remove space between link end markup and following punctuation */ + if (this.last_tag == 'a' && text.match(/^[\.,;\:\!]/)) { + results = results.replace(/\s$/, ""); + } + + if (this.in_header) { + text = text.replace(/---/g, '—'); + text = text.replace(/--/g, '–'); + } + if (this.list_started) { + results = results.replace(/_LIST_EOFL_\s*L_BR_K\s*$/, '_LIST_EOFL_'); + } + if (!this.code_type) { // keep special character literals outside of code block + // don't touch samba share or Windows path backslashes + if (!results.match(/\[\[\\\\.*?\|$/) && !text.match(/\w:(\\(\w?))+/)) { + if (!text.match(/\\\\[\w\.\-\_]+\\[\w\.\-\_]+/)) { + text = text.replace(/([\\])/g, '%%$1%%'); + } + text = text.replace(/([\*])/g, '_CKG_ASTERISK_'); + } + } + + if (this.in_endnotes && HTMLParserTopNotes.length) { + + if (text.match(/\w/) && !text.match(/^\s*\d\)\s*$/)) { + text = text.replace(/\)\s*$/, "_FN_PAREN_C_"); + var index = HTMLParserTopNotes.length - 1; + if (this.bottom_url) { + if (this.link_class && this.link_class == 'media') { + text = '{{' + this.bottom_url + '|' + text + '}}'; + } else text = '[[' + this.bottom_url + '|' + text + ']]'; + } + if (HTMLParserBottomNotes[HTMLParserTopNotes[index]]) { + text = text.replace('(', 'L_PARgr'); + text = text.replace(')', 'R_PARgr'); + HTMLParserBottomNotes[HTMLParserTopNotes[index]] += ' ' + text; + } else { + text = text.replace('(', 'L_PARgr'); + text = text.replace(')', 'R_PARgr'); + HTMLParserBottomNotes[HTMLParserTopNotes[index]] = text; + } + } + this.bottom_url = false; + return; + } + + + if (text && text.length) { + results += text; + } + // remove space between formatted character entity and following character string + results = results.replace(/(&\w+;)\s*([\*\/_]{2})_FORMAT_SPACE_(\w+)/, "$1$2$3"); + + if (this.list_level && this.list_level > 1) { + results = results.replace(/(\[\[.*?\]\])([ ]+[\*\-].*)$/, " $1\n$2"); + } + + try { // in case regex throws error on dynamic regex creation + var regex = new RegExp('([\*\/\_]{2,})_FORMAT_SPACE_([\*\/\_]{2,})(' + RegExp.escape(text) + ')$'); + if (results.match(regex)) { + // remove left-over space inside multiple format sequences + results = results.replace(regex, "$1$2$3"); + } + } catch (ex) {} + + if (!HTMLParserOpenAngleBracket) { + if (text.match(/</)) { + HTMLParserOpenAngleBracket = true; + } + } + }, + + comment: function(text) { + // results += ""; + }, + + dbg: function(text, heading) { + if (text.replace) { + text = text.replace(/^\s+/g, ""); + text = text.replace(/^\n$/g, ""); + text = text.replace(/&/g, "&").replace(//g, ">"); + if (!text) return; + } + if (heading) { + heading = '' + heading + "\n"; + } + HTMLParser_DEBUG += heading + text + "\n__________\n"; + } + + }); + + + /* + we allow escaping of troublesome characters in plugins by enclosing them withinback slashes, as in \*\ + the escapes are removed here together with any DW percent escapes + */ + + results = results.replace(/(\[\[\\\\)(.*?)\]\]/gm, function(match, brackets, block) { + block = block.replace(/\\/g, "_SMB_"); + return brackets + block + ']]'; + }); + + results = results.replace(/%%\\%%/g, '_ESC_BKSLASH_'); + results = results.replace(/%*\\%*([^\w\\]{1})%*\\%*/g, "$1"); + + results = results.replace(/_SMB_/g, "\\"); + + results = results.replace(/(\s*={2,}).*?CKGE_TMP_(\w+)(.*?).*?CKGE_TMP_c?\2.*?\1/gm, function(m, tag) { //remove formats from headers + m = m.replace(/CKGE_TMP_\w+/gm, ""); + var v = jQuery("#formatdel").val(); + if (!v) { + jQuery('#dw__editform').append(''); + } + return m; + }); + results = results.replace(/\s?(CKGE_TMP_\w+)\s?/gm, function(m, tag) { + if ($FORMAT_SUBST[tag]) return $FORMAT_SUBST[tag]; + return m; + }); + + results = results.replace(/(\s*={2,})(.*?)(\[\[|\{\{)(.*?)(\]\]|\}\})(.*?)\1/gm, function(m, h_markup, whatever, bracket_1, inner, bracket_2, end_str) { + end_str = end_str.replace(/\[\[(.*?)\|(.*?)\]\]/g, "$2"); + end_str = end_str.replace(/\{\{(.*?)\|(.*?)\}\}/g, "$2"); + m = h_markup + " " + whatever + " " + inner.replace(/.*?\|(.*?)/, "$1") + " " + end_str + " " + h_markup; + var v = jQuery("#formatdel").val(); + if (!v) { + jQuery('#dw__editform').append(''); + } + return m; + }); + + if (id == 'test') { + if (!HTMLParser_test_result(results)) return; + } + + results = results.replace(/\{ \{ rss>Feed:/mg, '{{rss>http://'); + results = results.replace(/\{ \{ rss>sFeed:/mg, '{{rss>https://') + results = results.replace(/~ ~ (NOCACHE|NOTOC)~ ~/mg, '~~' + "$1" + '~~'); + if (HTML_InterWiki) { + var ReplaceLinkMatch = function(tag, link) { + tag_1 = tag.replace(/oIWIKIo(.*)cIWIKIc/, "$1"); + if (tag_1 == link) return true; + link = link.replace(/\s/, '%20'); + return (link == tag_1); + }; + results = results.replace(/\[\[(\w+\.?\w{0,12})>(.*?)\|(.*?)\]\]/gm, function(match, id, iw_replace, link_text) { + if (iw_replace == 'oIWIKIocIWIKIc') iw_replace = link_text; + + if ((iw_replace == 'oIWIKIo' + link_text.replace(/\s/, '%20') + 'cIWIKIc') || (iw_replace == link_text) || ReplaceLinkMatch(iw_replace, link_text)) { + link_text = ""; + } else { + link_text = "|" + link_text; + } + + return ('[[' + id + '>' + iw_replace + link_text + ']]'); + }); + } + + results = results.replace(/>.*?oIWIKIo(.*?)cIWIKIc/mg, '>' + "$1"); + + if (HTMLParser_FORMAT_SPACE) { + if (HTMLParser_COLSPAN) { + results = results.replace(/\s*([\|\^]+)((\W\W_FORMAT_SPACE_)+)/gm, function(match, pipes, format) { + format = format.replace(/_FORMAT_SPACE_/g, ""); + return (format + pipes); + }); + } + results = results.replace(/"/g, '"'); + var regex = new RegExp(HTMLParser_FORMAT_SPACE + '([\\-]{2,})', "g"); + results = results.replace(regex, " $1"); + + results = results.replace(/\]\](\*\*|\/\/|\'\'|__|<\/del>)_FORMAT_SPACE_/, "]]$1@@_SP_@@"); + + var regex = new RegExp("(&|\\W|\\w|\\d)(\\*\\*|\\/\\/|\\'\\'|__|<\/del>)+" + HTMLParser_FORMAT_SPACE + '(\\w|\\d)', "g"); + results = results.replace(regex, "$1$2$3"); + + var regex = new RegExp(HTMLParser_FORMAT_SPACE + '@@_SP_@@', "g"); + results = results.replace(regex, ' '); + + //spacing around entities with double format characters + results = results.replace(/([\*\/_]{2})@@_SP_@@(&\w+;)/g, "$1 $2"); + + results = results.replace(/\n@@_SP_@@\n/g, ''); + results = results.replace(/@@_SP_@@\n/g, ''); + results = results.replace(/@@_SP_@@/g, ' '); + var regex = new RegExp(HTMLParser_FORMAT_SPACE + '([^\\)\\]\\}\\{\\-\\.,;:\\!\?"\x94\x92\u201D\u2019' + "'" + '])', "g"); + results = results.replace(regex, " $1"); + regex = new RegExp(HTMLParser_FORMAT_SPACE, "g"); + results = results.replace(regex, ''); + + if (HTMLFormatInList) { + /* removes extra newlines from lists */ + results = results.replace(/^(\s+[\-\*_]\s*)([\*\/_\']{2})(.*?)(\2)([^\n]*)\n+/gm, + function(match, list_type, format, text, list_type_close, rest) { + return (list_type + format + text + list_type_close + rest + "\n"); + }); + } + } + + /* Fixes for links in lists*/ + if (HTMLLinkInList) { + /*fix for links in lists at ends of lines, which cause loss of line-feeds + results = results.replace(/(\]\]|\}\})(\s+)(\*|-)/mg, + function(match,link,spaces,type) { + spaces = spaces.replace(/\n/,""); + return (link + "\n" + spaces+type); + }); + /*fix for links in lists before ends of lines, which cause extra line-feeds */ + results = results.replace(/(\*|-).*?(\[\[|\{\{).*?(\]\]|\}\})([\s\w\/\-\x3A-\x40\x5B-\x60\x7B-\x7F,;\>\<\&]+)\n\n/mg, + function(all, type, b, c, tail) { + all = all.replace(/[\n]$/, ""); + return (all); + }); + + } + + var line_break_final = "\\\\"; + if (HTMLParser_LBR) { + results = results.replace(/(L_BR_K)+/g, line_break_final); + results = results.replace(/L_BR_K/gm, line_break_final); + results = results.replace(/(\\\\)\s+/gm, "$1 \n"); + } + + if (HTMLParser_PRE) { + results = results.replace(/\s+<\/(code|file)>/g, "\n"); + if (HTMLParser_Geshi) { + results = results.replace(/\s+;/mg, ";"); + results = results.replace(/<\s+/mg, "<"); + results = results.replace(/\s+>/mg, ">"); + + } + } + + if (HTMLParser_TABLE) { + results += "\n" + line_break_final + "\n"; + var regex = new RegExp(HTMLParserParaInsert, "g"); + results = results.replace(regex, ' ' + line_break_final + ' '); + + // fix for colspans which have had text formatting which cause extra empty cells to be created + results = results.replace(/(\||\^)[ ]+(\||\^)\s$/g, "$1\n"); + results = results.replace(/(\||\^)[ ]+(\||\^)/g, "$1"); + } + // prevents valid empty td/th cells from being removed above + results = results.replace(/_FCKG_BLANK_TD_/g, " "); + + if (HTMLParserOpenAngleBracket) { + results = results.replace(/\/\/<\/\/\s*/g, '<'); + } + + if (HTMLParserFont) // HTMLParserFont start + { + + String.prototype.font_link_reconcile = function(v) { + + if (v == 1) { + regex = /\[\[(.*?)(]+>)([^<]+(\]\])?)[^\>]+\/font>\s*(\]\])/gm; + } else regex = /(\{]+>)\{\{(:?.*?)\|(:?.*?)<\/font>/gm; + + + return ( + this.replace( + regex, + function(m, a, b, c) { + a = a.replace(/\n/gm, ""); + a = a.replace(/\s/gm, ""); + a = a.replace(/[\[\]\{\}]/g, ""); + a = a.replace(/\|/g, ""); + c = c.replace(/\n/gm, ""); + // c = c.replace(/\s/gm, ""); + c = c.replace(/[\[\]\}\{]/g, ""); + if (v == 1) + c = '[[' + a + '|' + c + ']]'; + else c = '{{' + b + '|' + c + '}}'; + + var val = prompt(LANG.plugins.ckgedit.font_err_1 + "\n" + c + "\n" + LANG.plugins.ckgedit.font_err_2); + if (val == null) { + if (ckgedit_to_dwedit) { + ckgedit_to_dwedit = false; + return c; + } else throw new Error(LANG.plugins.ckgedit.font_err_throw); + } + if (val) return val; + return c; + } + ) + ); + } + if (HTMLParserFontInfix) { + results = results.replace(/<\/font>\s{1}/gm, ""); + } + + if (fontConflict()) { + if (confirm(LANG.plugins.ckgedit.font_conflict)) return; + var v = jQuery("#fontdel").val(); + if (!v) { + jQuery('#dw__editform').append(''); + } + } + results = results.font_link_reconcile(1); + results = results.font_link_reconcile(2); + + var regex = /\>\s+(\*\*|__|\/\/|'')\s+_\s+\1\s+<\/font>/gm; + results = results.replace(regex, function(m) { + m = m.replace(/\s+/g, ""); + return m; + }); + + results = results.replace(/\[\[(.*?)\|(]+>)(.*?)(<\/font>)\s*(\]\])\s*/gm, function(match, a, b, c) { + match = '[[' + a + '|' + c + ']]'; + var v = jQuery("#fontdel").val(); + if (!v) { + jQuery('#dw__editform').append(''); + } + return match; + }); + + results = results.replace(/(\s*={2,})\s*(.*?)(]+>)(.*?)(<\/font>)(.*?)\s*\1/gm, function(match) { + match = match.replace(/<\/font>/g, " "); + match = match.replace(//g, " "); + var v = jQuery("#formatdel").val(); + if (!v) { + jQuery('#dw__editform').append(''); + } + return match; + }); + + } // HTMLParserFont end + + if (HTMLParserTopNotes.length) { + results = results.replace(/\(\(\){2,}\s*<\/sup>/g, ""); + results = results.replace(/\(\(+(\d+)\)\)+/, "(($1))"); + for (var i in HTMLParserBottomNotes) { // re-insert DW's bottom notes at text level + var matches = i.match(/_(\d+)/); + var pattern = new RegExp('(\)*[\(]+' + matches[1] + '[\)]+(<\/sup>)*'); + HTMLParserBottomNotes[i] = HTMLParserBottomNotes[i].replace(/(\d+)_FN_PAREN_C_/, ""); + results = results.replace(pattern, '((' + HTMLParserBottomNotes[i].replace(/_FN_PAREN_C_/g, ") ") + '))'); + } + results = results.replace(/<\/sup>/g, ""); + results = results.replace(/((\(\(\d+\)\)\)?<\/sup>))/mg, function(fn) { + if (!fn.match(/p>\(\(\d+/)) { + return ""; + } + return fn; + }); + + } + + results = results.replace(/(={3,}.*?)(\{\{.*?\}\})(.*?={3,})/g, "$1$3\n\n$2"); + // remove any empty footnote markup left after section re-edits + results = results.replace(/()*\s*\[\[\s*\]\]\s*(<\/sup>)*\n*/g, ""); + // remove piled up sups with ((notes)) + + results = results.replace(/\s*\(\(\d+\)\)\s*<\/sup>/mg, ""); + + if (HTMLParser_MULTI_LINE_PLUGIN) { + results = results.replace(/<\s+/g, '<'); + results = results.replace(/<\s+/g, '<'); + } + + if (HTMLParser_NOWIKI) { + /* any characters escaped by DW %%%% are replaced by NOWIKI_ + is restored in save.php + */ + var nowiki_escapes = '%'; //this technique allows for added chars to attach to NOWIKI_$1_ + var regex = new RegExp('([' + nowiki_escapes + '])', "g"); + + results = results.replace(/(<nowiki>)(.*?)(<\/nowiki>)/mg, + function(all, start, mid, close) { + mid = mid.replace(/%%(.)%%/mg, "NOWIKI_$1_"); + return start + mid.replace(regex, "NOWIKI_$1_") + close; + }); + } + + results = results.replace(/__SWF__(\s*)\[*/g, "{{$1"); + results = results.replace(/\|.*?\]*(\s*)__FWS__/g, "$1}}"); + results = results.replace(/(\s*)__FWS__/g, "$1}}"); + results = results.replace(/\n{3,}/g, '\n\n'); + results = results.replace(/_LIST_EOFL_/gm, " " + line_break_final + " "); + + if (useComplexTables) { + if (results.indexOf('~~COMPLEX_TABLES~~') == -1) { + results += "~~COMPLEX_TABLES~~\n"; + } + } + if (!useComplexTables) { + results = results.replace(/~~COMPLEX_TABLES~~/gm, ""); + } + results = results.replace(/_CKG_ASTERISK_/gm, '*'); + results = results.replace(/_ESC_BKSLASH_/g, '\\'); + results = results.replace(/divalNLine/gm, "\n"); + if (id == 'test') { + if (HTMLParser_test_result(results)) { + alert(results); + } + return; + } + + var dwform = GetE('dw__editform'); + dwform.elements.fck_wikitext.value = results; + + if (id == 'bakup') { + return; + } + if (id) { + var dom = GetE(id); + dom.click(); + return true; + } +} + +jQuery(document).ready(function() { + var edit__summary = false; + jQuery(document).on("keypress", "input#edit__summary", function(e) { + if (e.which == 13) { + edit__summary = true; + jQuery("#save_button").trigger("mousedown"); + } + }); + + jQuery("#ebut_test").mousedown(function() { + parse_wikitext('test'); + }); + + jQuery("#ebtn__delete").click(function() { + if (edit__summary) { + edit__summary = false; + return; + } + return confirm(JSINFO['confirm_delete']); + }); + + jQuery("#ebtn__delete").mouseup(function() { + draft_delete(); + }); + + jQuery("#ebtn__dwedit").click(function() { + ckgedit_to_dwedit = true; + setDWEditCookie(2, this); + parse_wikitext('edbtn__save'); + this.form.submit(); + }); + + jQuery("#ebtn__fbswitch").click(function() { + if (getCookie('ckgFbOpt') == 'dokuwiki') { + document.cookie = 'ckgFbOpt=ckgedit;SameSite=Lax'; + } else { + document.cookie = 'ckgFbOpt=dokuwiki;SameSite=Lax'; + } + parse_wikitext('edbtn__save'); + this.form.submit(); + }); + + jQuery("#ckgedit_draft_btn").click(function() { + ckgedit_get_draft(); + }); + jQuery("#backup_button").click(function() { + renewLock(true); + }); + jQuery("#revert_to_prev_btn").click(function() { + revert_to_prev(); + }); + + jQuery("#no_styling_btn").click(function() { + this.form.styling.value = "no_styles"; + this.form.prefix.value = ""; + this.form.suffix.value = ""; + this.form.rev.value = ""; + }); + + jQuery("#ebut_cancel").mouseup(function() { + if (this.form.template && this.form.template.value == 'tpl') return; + if (window.dwfckTextChanged) return; + draft_delete(); + }); + jQuery("#save_button").mousedown(function() { + if (this.form.template && this.form.template.value == 'tpl') window.dwfckTextChanged = true; + if (!window.dwfckTextChanged && !JSINFO['cg_rev']) { + ckgedit_dwedit_reject = true; + parse_wikitext('ebut_cancel'); + } else { + parse_wikitext('edbtn__save'); + } + }); +}); \ No newline at end of file diff --git a/lib/plugins/ckgedit/scripts/safeFN_class-cmpr.js b/lib/plugins/ckgedit/scripts/safeFN_class-cmpr.js new file mode 100644 index 0000000..8686560 --- /dev/null +++ b/lib/plugins/ckgedit/scripts/safeFN_class-cmpr.js @@ -0,0 +1 @@ +var SafeFN={plain:"-./[_0123456789abcdefghijklmnopqrstuvwxyz",pre_indicator:"%",post_indicator:"]",changeSafeBase:function(a,c,b){if(isNaN(c)||c<2||c>36||isNaN(b)||b<2||b>36){throw (new RangeError("Illegal radix. Radices must be integers between 2 and 36, inclusive."))}a=parseInt(a,c);if(c==36){return a}return a.toString(b)},get_u_array:function(b){var c=new Array();for(var a=0;a>6))+this.chr(128+(a&63))}if(a<65536){return this.chr(224+(a>>12))+this.chr(128+((a>>6)&63))+this.chr(128+(a&63))}if(a<2097152){return this.chr(240+(a>>18))+this.chr(128+((a>>12)&63))+this.chr(128+((a>>6)&63))+this.chr(128+(a&63))}},_utf8Decode:function(g){var f=new Array();var e,b,a,h,c=0;for(var d=0;d127){b=g.charCodeAt(d++)}if(e>223){a=g.charCodeAt(d++)}if(e>239){h=g.charCodeAt(d++)}if(e<128){f[c++]=this.chr(e)}else{if(e<224){f[c++]=this.chr(((e-192)<<6)+(b-128))}else{if(e<240){f[c++]=this.chr(((e-224)<<12)+((b-128)<<6)+(a-128))}else{f[c++]=this.chr(((e-240)<<18)+((b-128)<<12)+((a-128)<<6)+(h-128))}}}}return f.join("")},utf8Decode:function(d){var c=new Array();var e=0;var a="";var b=0;while((e=d.search(/[^\x00-\x7F]/))!=-1){a=d.match(/([^\x00-\x7F]+[\x00-\x7F]{0,10})+/)[0];c[b++]=d.substr(0,e)+this._utf8Decode(a);d=d.substr(e+a.length)}c[b++]=d;return c.join("")}};function SafeFN_encode(a){return SafeFN.encode(a)}function SafeFN_decode(a){return SafeFN.decode(a)}function dwikiUTF8_encodeFN(a,b){if(b=="utf-8"){return a}if(a.match(/^[a-zA-Z0-9\/_\-\.%\]]+$/)){return a}if(b=="safe"){return SafeFN_encode(a)}a=encodeURIComponent(a);a=a.replace(/%2F/g,"/");return a}function dwikiUTF8_decodeFN(a,b){if(b=="utf-8"){return a}if(b=="safe"){return SafeFN_decode(a)}return decodeURIComponent(a)}; \ No newline at end of file diff --git a/lib/plugins/ckgedit/scripts/safeFN_class.js b/lib/plugins/ckgedit/scripts/safeFN_class.js new file mode 100644 index 0000000..17dd00c --- /dev/null +++ b/lib/plugins/ckgedit/scripts/safeFN_class.js @@ -0,0 +1,273 @@ + /** + * Upgraded + * !!Do not modify the above line!! + */ + /** + * SafeFN is a Javascript implementation of Christopher Smith's php + * SafeFN class which was written for Dokuwiki + * + * @author Myron Turner + * @copyright Myron Turner (C) GPL 2 or greater + */ + +var SafeFN = { + plain: '-./[_0123456789abcdefghijklmnopqrstuvwxyz', // these characters aren't converted + pre_indicator: '%', + post_indicator:']', + + /** + * convert numbers from base 10 to base 36 and base 36 to base 10 + * + * @param string representing an integer or integer num number to be converted + * @param integer from base from which to convert + * @param integer to base to which to convert + * + * @return array int an array of unicode codepoints + * + * @author Myron Turner + */ + + changeSafeBase: function(num, from, to) { + if(isNaN(from) || from < 2 || from > 36 || isNaN(to) || to < 2 || to > 36) { + throw (new RangeError("Illegal radix. Radices must be integers between 2 and 36, inclusive.")); + } + num = parseInt(num, from); + if(from == 36) return num; + return num.toString(to); + }, + + + /** + * convert a UTF8 string into an array of unicode code points + * + * @param UTF8 string + * @return array int an array of unicode codepoints + * + * @author Myron Turner + */ + + get_u_array: function(utf8str) { + var unicode_array = new Array(); + for (var i=0; i + * @author Myron Turner + */ + safe_to_unicode: function(safe) { + var unicode = new Array(); + var regex = new RegExp('(?=[' + this.pre_indicator + '\\' + this.post_indicator + '])'); + var split_array = safe.split(regex); + var converted = false; + + for (var i = 0; i + * @author Myron Turner + */ + unicode_to_safe: function (unicode) { + var safe = ''; + var converted = false; + var plain_str = this.plain + this.post_indicator; + + for (var i=0; i< unicode.length; i++) { + codepoint = unicode[i]; + var match = ''; + if(String.fromCharCode(codepoint) != '\\') { + var regex = new RegExp(String.fromCharCode(codepoint)); + var match = plain_str.match(regex); + } + + if (codepoint < 127 && match) { + if (converted) { + safe += this.post_indicator; + converted = false; + } + safe += String.fromCharCode(codepoint); + + } else if (codepoint == this.pre_indicator.charCodeAt(0)) { + safe += this.pre_indicator; + converted = true; + } else { + safe += this.pre_indicator + this.changeSafeBase((codepoint-32), 10, 36); + converted = true; + } + } + if(converted) safe += this.post_indicator; + + return safe; + }, + + /** + * Convert an UTF-8 string to a safe ASCII String + * + * + * @param string filename a utf8 string, should only include printable characters - not 0x00-0x1f + * @return string an encoded representation of filename using only 'safe' ASCII characters + * + * @author Myron Turner + */ + encode: function(filename) { + return this.unicode_to_safe(this.get_u_array(filename)); + }, + + /** + * decode a 'safe' encoded file name and return a UTF8 string + * + * @param string filename a 'safe' encoded ASCII string, + * @return string decoded utf8 string + * + * @author Myron Turner + */ + + decode: function (filename) { + var unic = this.safe_to_unicode(filename); + + // convert unicode code points to utf8 + var str = new Array(); + for (var i=0; i < unic.length; i++) { + str[i] = this.code2utf(unic[i]); + } + // return the decoded string + return this.utf8Decode(str.join('')); + }, + +/* UTF8 encoding/decoding functions + * Copyright (c) 2006 by Ali Farhadi. + * released under the terms of the Gnu Public License. + * see the GPL for details. + * + * Email: ali[at]farhadi[dot]ir + * Website: http://farhadi.ir/ + */ + +//an alias of String.fromCharCode +chr: function (code) +{ + return String.fromCharCode(code); +}, + +//returns utf8 encoded charachter of a unicode value. +//code must be a number indicating the Unicode value. +//returned value is a string between 1 and 4 charachters. +code2utf: function (code) +{ + if (code < 128) return this.chr(code); + if (code < 2048) return this.chr(192+(code>>6)) + this.chr(128+(code&63)); + if (code < 65536) return this.chr(224+(code>>12)) + this.chr(128+((code>>6)&63)) + this.chr(128+(code&63)); + if (code < 2097152) return this.chr(240+(code>>18)) + this.chr(128+((code>>12)&63)) + this.chr(128+((code>>6)&63)) + this.chr(128+(code&63)); +}, + +//it is a private function for internal use in utf8Decode function +_utf8Decode: function (utf8str) +{ + + var str = new Array(); + var code,code2,code3,code4,j = 0; + for (var i=0; i 127) code2 = utf8str.charCodeAt(i++); + if (code > 223) code3 = utf8str.charCodeAt(i++); + if (code > 239) code4 = utf8str.charCodeAt(i++); + + if (code < 128) str[j++]= this.chr(code); + else if (code < 224) str[j++] = this.chr(((code-192)<<6) + (code2-128)); + else if (code < 240) str[j++] = this.chr(((code-224)<<12) + ((code2-128)<<6) + (code3-128)); + else str[j++] = this.chr(((code-240)<<18) + ((code2-128)<<12) + ((code3-128)<<6) + (code4-128)); + + } + return str.join(''); +}, + +//Decodes a UTF8 formated string +utf8Decode: function (utf8str) +{ + var str = new Array(); + var pos = 0; + var tmpStr = ''; + var j=0; + while ((pos = utf8str.search(/[^\x00-\x7F]/)) != -1) { + tmpStr = utf8str.match(/([^\x00-\x7F]+[\x00-\x7F]{0,10})+/)[0]; + str[j++]= utf8str.substr(0, pos) + this._utf8Decode(tmpStr); + utf8str = utf8str.substr(pos + tmpStr.length); + } + + str[j++] = utf8str; + return str.join(''); +} + +}; + +function SafeFN_encode(filename) { + return SafeFN.encode(filename); +} + +function SafeFN_decode(filename) { + return SafeFN.decode(filename); +} + + +function dwikiUTF8_encodeFN(file, encoding){ + + if(encoding == 'utf-8') return file; + + if(file.match(/^[a-zA-Z0-9\/_\-\.%\]]+$/)){ + return file; + } + + if(encoding == 'safe'){ + return SafeFN_encode(file); + } + + file = encodeURIComponent(file); + file = file.replace(/%2F/g,'/'); + return file; +} + + +function dwikiUTF8_decodeFN(file, encoding){ + + if(encoding == 'utf-8') return file; + + if(encoding == 'safe'){ + return SafeFN_decode(file); + } + + return decodeURIComponent(file); +} diff --git a/lib/plugins/ckgedit/scripts/safeFN_cmpr.js b/lib/plugins/ckgedit/scripts/safeFN_cmpr.js new file mode 100644 index 0000000..8686560 --- /dev/null +++ b/lib/plugins/ckgedit/scripts/safeFN_cmpr.js @@ -0,0 +1 @@ +var SafeFN={plain:"-./[_0123456789abcdefghijklmnopqrstuvwxyz",pre_indicator:"%",post_indicator:"]",changeSafeBase:function(a,c,b){if(isNaN(c)||c<2||c>36||isNaN(b)||b<2||b>36){throw (new RangeError("Illegal radix. Radices must be integers between 2 and 36, inclusive."))}a=parseInt(a,c);if(c==36){return a}return a.toString(b)},get_u_array:function(b){var c=new Array();for(var a=0;a>6))+this.chr(128+(a&63))}if(a<65536){return this.chr(224+(a>>12))+this.chr(128+((a>>6)&63))+this.chr(128+(a&63))}if(a<2097152){return this.chr(240+(a>>18))+this.chr(128+((a>>12)&63))+this.chr(128+((a>>6)&63))+this.chr(128+(a&63))}},_utf8Decode:function(g){var f=new Array();var e,b,a,h,c=0;for(var d=0;d127){b=g.charCodeAt(d++)}if(e>223){a=g.charCodeAt(d++)}if(e>239){h=g.charCodeAt(d++)}if(e<128){f[c++]=this.chr(e)}else{if(e<224){f[c++]=this.chr(((e-192)<<6)+(b-128))}else{if(e<240){f[c++]=this.chr(((e-224)<<12)+((b-128)<<6)+(a-128))}else{f[c++]=this.chr(((e-240)<<18)+((b-128)<<12)+((a-128)<<6)+(h-128))}}}}return f.join("")},utf8Decode:function(d){var c=new Array();var e=0;var a="";var b=0;while((e=d.search(/[^\x00-\x7F]/))!=-1){a=d.match(/([^\x00-\x7F]+[\x00-\x7F]{0,10})+/)[0];c[b++]=d.substr(0,e)+this._utf8Decode(a);d=d.substr(e+a.length)}c[b++]=d;return c.join("")}};function SafeFN_encode(a){return SafeFN.encode(a)}function SafeFN_decode(a){return SafeFN.decode(a)}function dwikiUTF8_encodeFN(a,b){if(b=="utf-8"){return a}if(a.match(/^[a-zA-Z0-9\/_\-\.%\]]+$/)){return a}if(b=="safe"){return SafeFN_encode(a)}a=encodeURIComponent(a);a=a.replace(/%2F/g,"/");return a}function dwikiUTF8_decodeFN(a,b){if(b=="utf-8"){return a}if(b=="safe"){return SafeFN_decode(a)}return decodeURIComponent(a)}; \ No newline at end of file diff --git a/lib/plugins/ckgedit/scripts/setsamesite.php b/lib/plugins/ckgedit/scripts/setsamesite.php new file mode 100644 index 0000000..aafb5cd --- /dev/null +++ b/lib/plugins/ckgedit/scripts/setsamesite.php @@ -0,0 +1,22 @@ += 7.3 (when we get there) + * From: https://github.com/GoogleChromeLabs/samesite-examples/blob/master/php.md and https://stackoverflow.com/a/46971326/2308553 + */ + function setcookieSameSite($name, $value, $expire=0, $path ='/', $domain="", $httponly="HttpOnly", $secure=false, $samesite="Lax") + { + if (PHP_VERSION_ID < 70300) { + setcookie($name, $value, $expire, "$path; samesite=$samesite", $domain, $secure, $httponly); + } + else { + setcookie($name, $value, [ + 'expires' => $expire, + 'path' => $path, + 'domain' => $domain, + 'samesite' => $samesite, + 'secure' => $secure, + 'httponly' => $httponly, + ]); + } + } +?> diff --git a/lib/plugins/ckgedit/scripts/table_debugging_code.js.unc b/lib/plugins/ckgedit/scripts/table_debugging_code.js.unc new file mode 100644 index 0000000..843c772 --- /dev/null +++ b/lib/plugins/ckgedit/scripts/table_debugging_code.js.unc @@ -0,0 +1,51 @@ + var this_debug; + + function show_rowspans(rows) { + + if(!useComplexTables) return; + var str = ""; + + for(var i=0; i < rows.length; i++) { + str+="ROW" + i + "\n"; + + for(var col=0; col + diff --git a/lib/plugins/ckgedit/style.css b/lib/plugins/ckgedit/style.css new file mode 100644 index 0000000..01bc5e5 --- /dev/null +++ b/lib/plugins/ckgedit/style.css @@ -0,0 +1,5 @@ +.backup_msg_area { color: __text_alt__; font-size:9pt; text-align:center; } +.backup_msg_close { font-size:9pt; } +.backup_msg { background-color: __background_alt__; text-align:center; height: 14pt;} +.editButtons { margin-top: 5px; } +.editButtons input { margin-bottom: 5px; } diff --git a/lib/plugins/ckgedit/syntax/font.php b/lib/plugins/ckgedit/syntax/font.php new file mode 100644 index 0000000..66c3278 --- /dev/null +++ b/lib/plugins/ckgedit/syntax/font.php @@ -0,0 +1,98 @@ + + */ + +// Syntax: + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); +require_once(DOKU_PLUGIN.'syntax.php'); + +/** + * All DokuWiki plugins to extend the parser/rendering mechanism + * need to inherit from this class + */ +class syntax_plugin_ckgedit_font extends DokuWiki_Syntax_Plugin { + + + + function getType(){ return 'formatting'; } + function getAllowedTypes() { return array('formatting', 'substition', 'disabled'); } + function getSort(){ return 158; } + function connectTo($mode) { $this->Lexer->addEntryPattern('(?=.*?)',$mode,'plugin_ckgedit_font'); } + function postConnect() { $this->Lexer->addExitPattern('','plugin_ckgedit_font'); } + + + /** + * Handle the match + */ + function handle($match, $state, $pos, Doku_Handler $handler){ + + + switch ($state) { + case DOKU_LEXER_ENTER : + list($size, $face) = preg_split("/\//u", substr($match, 6, -1), 2); + if(isset($size) && strpos($size,':') !== false) { + list($size,$weight) = explode(':',$size); + $size = "font-size:$size;"; + if(isset($weight) && $weight) { + list($weight,$fstyle) = explode(',',$weight); + $size .= " font-weight:$weight; "; + if($fstyle) $size .= " font-style:$fstyle; "; + } + + } + else $size = "font-size:$size;"; + return array($state, array($size, $face)); + + case DOKU_LEXER_UNMATCHED : return array($state, $match); + case DOKU_LEXER_EXIT : return array($state, ''); + } + return array(); + } + + /** + * Create output + */ + function render($mode, Doku_Renderer $renderer, $data) { + if($mode == 'xhtml'){ + list($state, $match) = $data; + + switch ($state) { + case DOKU_LEXER_ENTER : + list($style, $face) = $match; + if(isset($face)) { + list($face,$fg,$bg) = explode(';;',$face); + if(isset($fg)) { + $color = " color: $fg; "; + $style .= $color; + + } + if(isset($bg)) { + $color = " background-color: $bg "; + $style .= $color; + + } + + } + $style = "font-family: $face; $style"; + $renderer->doc .= ""; + break; + + case DOKU_LEXER_UNMATCHED : $renderer->doc .= $renderer->_xmlEntities($match); break; + case DOKU_LEXER_EXIT : $renderer->doc .= ""; break; + } + return true; + } + return false; + } + + +} +?> diff --git a/lib/plugins/ckgedit/syntax/specials.php b/lib/plugins/ckgedit/syntax/specials.php new file mode 100644 index 0000000..f859500 --- /dev/null +++ b/lib/plugins/ckgedit/syntax/specials.php @@ -0,0 +1,123 @@ + +*/ + +// must be run within Dokuwiki +if(!defined('DOKU_INC')) die(); + +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); +require_once(DOKU_PLUGIN.'syntax.php'); +//define ('CKGEDIT_IMAGES', DOKU_URL . 'lib/plugins/ckgedit/images/'); +//define ('CK_IMG_PATH',DOKU_INC . 'lib/plugins/ckgedit/images/'); +if(!defined('DOKU_LF')) define ('DOKU_LF',"\n"); +if(!defined('DOKU_TAB')) define ('DOKU_TAB',"\t"); + +/** + * All DokuWiki plugins to extend the parser/rendering mechanism + * need to inherit from this class + */ +class syntax_plugin_ckgedit_specials extends DokuWiki_Syntax_Plugin { + + + /** + * What kind of syntax are we? + */ + function getType(){ + return 'substition'; + } + + /** + * What about paragraphs? + */ + + function getPType(){ + // return 'stack'; + return 'block'; + } + + /** + * Where to sort in? + */ + function getSort(){ + return 155; + } + + + /** + * Connect pattern to lexer + */ + function connectTo($mode) { + + $this->Lexer->addSpecialPattern('~~MULTI_PLUGIN_OPEN~~',$mode,'plugin_ckgedit_specials'); + $this->Lexer->addSpecialPattern('~~MULTI_PLUGIN_CLOSE~~',$mode,'plugin_ckgedit_specials'); + $this->Lexer->addSpecialPattern('~~COMPLEX_TABLES~~',$mode,'plugin_ckgedit_specials'); + $this->Lexer->addSpecialPattern('~~NO_STYLING~~',$mode,'plugin_ckgedit_specials'); + $this->Lexer->addEntryPattern('~~START_HTML_BLOCK~~(?=.*?~~CLOSE_HTML_BLOCK~~)',$mode,'plugin_ckgedit_specials'); + $this->Lexer->addSpecialPattern('~~AUTO_INTERNAL_LINKS~~',$mode,'plugin_ckgedit_specials'); + + + } + function postConnect() { $this->Lexer->addExitPattern('~~CLOSE_HTML_BLOCK~~','plugin_ckgedit_specials'); } + + /** + * Handle the match + */ + function handle($match, $state, $pos, Doku_Handler $handler){ + + $class = ""; + $xhtml = ""; + switch($state) { + case DOKU_LEXER_SPECIAL: + if(preg_match('/OPEN/', $match)) { + return array($state, "" ); + } + elseif(preg_match('/CLOSE/', $match)) { + return array($state, "" ); + } + elseif(preg_match('/(TABLES|STYLING|AUTO_INTERNAL)/', $match)) { + return array($state, "" ); + } + case DOKU_LEXER_ENTER : return array($state, ''); + case DOKU_LEXER_UNMATCHED : + $match = str_replace('
',"",$match); + $match = preg_replace('/<\/?code>/ms',"",$match); + return array($state, $match); + case DOKU_LEXER_EXIT : return array($state, ''); + } + return array($state, "" ); + + } + + /** + * Create output + */ + function render($mode, Doku_Renderer $renderer, $data) { + if($mode == 'xhtml'){ + list($state, $xhtml) = $data; + switch ($state) { + case DOKU_LEXER_SPECIAL: + $renderer->doc .= DOKU_LF . $xhtml . DOKU_LF; + return true; + case DOKU_LEXER_ENTER : $renderer->doc .= ""; break; + case DOKU_LEXER_UNMATCHED : + $renderer->doc .= $xhtml; break; + case DOKU_LEXER_EXIT : $renderer->doc .= ""; break; + } + return true; + } + return false; + } + + function write_debug($what) { + $handle = fopen("blog_pats.txt", "a"); + fwrite($handle,"$what\n"); + fclose($handle); + } +} + + diff --git a/lib/plugins/ckgedit/version b/lib/plugins/ckgedit/version new file mode 100644 index 0000000..3f546ab --- /dev/null +++ b/lib/plugins/ckgedit/version @@ -0,0 +1,2 @@ +master_21-Sep_08-08_14 + diff --git a/lib/plugins/color/images/picker_blue_gray.png b/lib/plugins/color/images/picker_blue_gray.png new file mode 100644 index 0000000..ebed38b Binary files /dev/null and b/lib/plugins/color/images/picker_blue_gray.png differ diff --git a/lib/plugins/color/images/picker_gold.png b/lib/plugins/color/images/picker_gold.png new file mode 100644 index 0000000..bb6ded7 Binary files /dev/null and b/lib/plugins/color/images/picker_gold.png differ diff --git a/lib/plugins/color/images/picker_green.png b/lib/plugins/color/images/picker_green.png new file mode 100644 index 0000000..5c6b41f Binary files /dev/null and b/lib/plugins/color/images/picker_green.png differ diff --git a/lib/plugins/color/images/picker_lavender.png b/lib/plugins/color/images/picker_lavender.png new file mode 100644 index 0000000..14d9aa1 Binary files /dev/null and b/lib/plugins/color/images/picker_lavender.png differ diff --git a/lib/plugins/color/images/picker_light_gray.png b/lib/plugins/color/images/picker_light_gray.png new file mode 100644 index 0000000..1eb568c Binary files /dev/null and b/lib/plugins/color/images/picker_light_gray.png differ diff --git a/lib/plugins/color/images/picker_light_turquoise.png b/lib/plugins/color/images/picker_light_turquoise.png new file mode 100644 index 0000000..84c545e Binary files /dev/null and b/lib/plugins/color/images/picker_light_turquoise.png differ diff --git a/lib/plugins/color/images/picker_light_yellow.png b/lib/plugins/color/images/picker_light_yellow.png new file mode 100644 index 0000000..4da4af2 Binary files /dev/null and b/lib/plugins/color/images/picker_light_yellow.png differ diff --git a/lib/plugins/color/images/picker_lime.png b/lib/plugins/color/images/picker_lime.png new file mode 100644 index 0000000..95472c2 Binary files /dev/null and b/lib/plugins/color/images/picker_lime.png differ diff --git a/lib/plugins/color/images/picker_orange.png b/lib/plugins/color/images/picker_orange.png new file mode 100644 index 0000000..ddbac08 Binary files /dev/null and b/lib/plugins/color/images/picker_orange.png differ diff --git a/lib/plugins/color/images/picker_red.png b/lib/plugins/color/images/picker_red.png new file mode 100644 index 0000000..8b29b45 Binary files /dev/null and b/lib/plugins/color/images/picker_red.png differ diff --git a/lib/plugins/color/images/picker_rose.png b/lib/plugins/color/images/picker_rose.png new file mode 100644 index 0000000..d23e0c8 Binary files /dev/null and b/lib/plugins/color/images/picker_rose.png differ diff --git a/lib/plugins/color/images/picker_turquoise.png b/lib/plugins/color/images/picker_turquoise.png new file mode 100644 index 0000000..21cae0a Binary files /dev/null and b/lib/plugins/color/images/picker_turquoise.png differ diff --git a/lib/plugins/color/images/picker_yellow.png b/lib/plugins/color/images/picker_yellow.png new file mode 100644 index 0000000..0204813 Binary files /dev/null and b/lib/plugins/color/images/picker_yellow.png differ diff --git a/lib/plugins/color/images/toolbar_icon.png b/lib/plugins/color/images/toolbar_icon.png new file mode 100644 index 0000000..988d637 Binary files /dev/null and b/lib/plugins/color/images/toolbar_icon.png differ diff --git a/lib/plugins/color/plugin.info.txt b/lib/plugins/color/plugin.info.txt new file mode 100644 index 0000000..ec0cde6 --- /dev/null +++ b/lib/plugins/color/plugin.info.txt @@ -0,0 +1,7 @@ +base color +author Harald Hanche-Olsen +email harald.hanche-olsen@ntnu.no +date 2018-10-12 +name color syntax plugin +desc Write colored text in DokuWiki. +url https://www.dokuwiki.org/plugin:color diff --git a/lib/plugins/color/script.js b/lib/plugins/color/script.js new file mode 100644 index 0000000..6f9388a --- /dev/null +++ b/lib/plugins/color/script.js @@ -0,0 +1,91 @@ +/* JavaScript function to create color toolbar in Dokuwiki */ +/* see http://www.dokuwiki.org/plugin:color for more info */ + +color_icobase = "../../plugins/color/images/"; + +if(window.toolbar != undefined) { + toolbar[toolbar.length] = { + "type":"picker", + "title":"Color Text", + "icon":color_icobase+"toolbar_icon.png", + "list":[{ + "type":"format", + "title":"Gray Colored Text", + "icon":color_icobase+"picker_light_gray.png", + "open":"", + "close":"" + }, { + "type":"format", + "title":"Rose Highlighted Text", + "icon":color_icobase+"picker_rose.png", + "open":"", + "close":"" + }, { + "type":"format", + "title":"Red Highlighted Text", + "icon":color_icobase+"picker_red.png", + "open":"", + "close":"" + }, { + "type":"format", + "title":"Orange Highlighted Text", + "icon":color_icobase+"picker_orange.png", + "open":"", + "close":"" + }, { + "type":"format", + "title":"Gold Highlighted Text", + "icon":color_icobase+"picker_gold.png", + "open":"", + "close":"" + }, { + "type":"format", + "title":"Yellow Highlighted Text", + "icon":color_icobase+"picker_yellow.png", + "open":"", + "close":"" + }, { + "type":"format", + "title":"Light Yellow Highlighted Text", + "icon":color_icobase+"picker_light_yellow.png", + "open":"", + "close":"" + }, { + "type":"format", + "title":"Green Highlighted Text", + "icon":color_icobase+"picker_green.png", + "open":"", + "close":"" + }, { + "type":"format", + "title":"Lime Highlighted Text", + "icon":color_icobase+"picker_lime.png", + "open":"", + "close":"" + }, { + "type":"format", + "title":"Turquoise Highlighted Text", + "icon":color_icobase+"picker_turquoise.png", + "open":"", + "close":"" + }, { + "type":"format", + "title":"Light Turquoise Highlighted Text", + "icon":color_icobase+"picker_light_turquoise.png", + "open":"", + "close":"" + }, { + "type":"format", + "title":"Blue-Gray Highlighted Text", + "icon":color_icobase+"picker_blue_gray.png", + "open":"", + "close":"" + }, { + "type":"format", + "title":"Lavender Highlighted Text", + "icon":color_icobase+"picker_lavender.png", + "open":"", + "close":"" + }] + }; +} \ No newline at end of file diff --git a/lib/plugins/color/syntax.php b/lib/plugins/color/syntax.php new file mode 100644 index 0000000..f137d03 --- /dev/null +++ b/lib/plugins/color/syntax.php @@ -0,0 +1,116 @@ + + */ + +// must be run within DokuWiki +if(!defined('DOKU_INC')) die(); + +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); +require_once(DOKU_PLUGIN.'syntax.php'); + +/** + * All DokuWiki plugins to extend the parser/rendering mechanism + * need to inherit from this class + */ +class syntax_plugin_color extends DokuWiki_Syntax_Plugin { + + function getType(){ return 'formatting'; } + function getAllowedTypes() { return array('formatting', 'substition', 'disabled'); } + function getSort(){ return 158; } + function connectTo($mode) { $this->Lexer->addEntryPattern('(?=.*?)',$mode,'plugin_color'); } + function postConnect() { $this->Lexer->addExitPattern('','plugin_color'); } + + + /** + * Handle the match + */ + function handle($match, $state, $pos, Doku_Handler $handler){ + switch ($state) { + case DOKU_LEXER_ENTER : + list($color, $background) = preg_split("/\//u", substr($match, 6, -1), 2); + if ($color = $this->_isValid($color)) $color = "color:$color;"; + if ($background = $this->_isValid($background)) $background = "background-color:$background;"; + return array($state, array($color, $background)); + + case DOKU_LEXER_UNMATCHED : return array($state, $match); + case DOKU_LEXER_EXIT : return array($state, ''); + } + return array(); + } + + /** + * Create output + */ + function render($mode, Doku_Renderer $renderer, $data) { + if($mode == 'xhtml'){ + list($state, $match) = $data; + switch ($state) { + case DOKU_LEXER_ENTER : + list($color, $background) = $match; + $renderer->doc .= ""; + break; + + case DOKU_LEXER_UNMATCHED : $renderer->doc .= $renderer->_xmlEntities($match); break; + case DOKU_LEXER_EXIT : $renderer->doc .= ""; break; + } + return true; + } + if($mode == 'odt'){ + list($state, $match) = $data; + switch ($state) { + case DOKU_LEXER_ENTER : + list($color, $background) = $match; + if (class_exists('ODTDocument')) { + $renderer->_odtSpanOpenUseCSS (NULL, 'style="'.$color.$background.'"'); + } + break; + + case DOKU_LEXER_UNMATCHED : + $renderer->cdata($match); + break; + + case DOKU_LEXER_EXIT : + if (class_exists('ODTDocument')) { + $renderer->_odtSpanClose(); + } + break; + } + return true; + } + if($mode == 'metadata'){ + list($state, $match) = $data; + switch ($state) { + case DOKU_LEXER_UNMATCHED : + if ($renderer->capture) $renderer->cdata($match); + break; + } + return true; + } + return false; + } + + // validate color value $c + // this is cut price validation - only to ensure there is nothing harmful + // recognize rgb, rgba, hsl, hsla but don't try to valiedate their arguments, + // just ensure that no illegal characters are included therein + // and that the number of characters is reasonable + // leave it to the browsers to ignore a faulty colour specification + function _isValid($c) { + $c = trim($c); + + $pattern = "/^\s*( + ([a-zA-Z]+)| #colorname - not verified + (\#([0-9a-fA-F]{3,8}))| #colorvalue including possible alpha + ((rgba?|hsla?)\([0-9%., ]{5,40}\)) #rgb[a], hsl[a] + )\s*$/x"; + + if (preg_match($pattern, $c)) return trim($c); + + return ""; + } +} +?> diff --git a/lib/plugins/dw2pdf/DokuImageProcessorDecorator.php b/lib/plugins/dw2pdf/DokuImageProcessorDecorator.php new file mode 100644 index 0000000..8ac719a --- /dev/null +++ b/lib/plugins/dw2pdf/DokuImageProcessorDecorator.php @@ -0,0 +1,95 @@ + + */ + +use dokuwiki\plugin\dw2pdf\DokuImageProcessorDecorator; + +require_once __DIR__ . '/vendor/autoload.php'; + +/** + * Class DokuPDF + * Some DokuWiki specific extentions + */ +class DokuPDF extends \Mpdf\Mpdf +{ + + /** + * DokuPDF constructor. + * + * @param string $pagesize + * @param string $orientation + * @param int $fontsize + */ + function __construct($pagesize = 'A4', $orientation = 'portrait', $fontsize = 11) + { + global $conf; + + if (!defined('_MPDF_TEMP_PATH')) define('_MPDF_TEMP_PATH', $conf['tmpdir'] . '/dwpdf/' . rand(1, 1000) . '/'); + io_mkdir_p(_MPDF_TEMP_PATH); + + $format = $pagesize; + if ($orientation == 'landscape') { + $format .= '-L'; + } + + switch ($conf['lang']) { + case 'zh': + case 'zh-tw': + case 'ja': + case 'ko': + $mode = '+aCJK'; + break; + default: + $mode = 'UTF-8-s'; + + } + + // we're always UTF-8 + parent::__construct( + array( + 'mode' => $mode, + 'format' => $format, + 'fontsize' => $fontsize, + 'ImageProcessorClass' => DokuImageProcessorDecorator::class, + 'tempDir' => _MPDF_TEMP_PATH //$conf['tmpdir'] . '/tmp/dwpdf' + ) + ); + + $this->autoScriptToLang = true; + $this->baseScript = 1; + $this->autoVietnamese = true; + $this->autoArabic = true; + $this->autoLangToFont = true; + + $this->ignore_invalid_utf8 = true; + $this->tabSpaces = 4; + } + + /** + * Cleanup temp dir + */ + function __destruct() + { + io_rmdir(_MPDF_TEMP_PATH, true); + } + + /** + * Decode all paths, since DokuWiki uses XHTML compliant URLs + * + * @param string $path + * @param string $basepath + */ + function GetFullPath(&$path, $basepath = '') + { + $path = htmlspecialchars_decode($path); + parent::GetFullPath($path, $basepath); + } +} diff --git a/lib/plugins/dw2pdf/MenuItem.php b/lib/plugins/dw2pdf/MenuItem.php new file mode 100644 index 0000000..6aaf6b5 --- /dev/null +++ b/lib/plugins/dw2pdf/MenuItem.php @@ -0,0 +1,45 @@ +params['at'] = $DATE_AT; + } elseif($REV) { + $this->params['rev'] = $REV; + } + } + + /** + * Get label from plugin language file + * + * @return string + */ + public function getLabel() { + $hlp = plugin_load('action', 'dw2pdf'); + return $hlp->getLang('export_pdf_button'); + } +} diff --git a/lib/plugins/dw2pdf/README b/lib/plugins/dw2pdf/README new file mode 100644 index 0000000..40ae8af --- /dev/null +++ b/lib/plugins/dw2pdf/README @@ -0,0 +1,40 @@ +dw2pdf Plugin for DokuWiki + +Export DokuWiki pages to PDF + +All documentation for this plugin can be found at +http://www.dokuwiki.org/plugin:dw2pdf + +If you install this plugin manually, make sure it is installed in +lib/plugins/dw2pdf/ - if the folder is called different it +will not work! + +Please refer to http://www.dokuwiki.org/plugins for additional info +on how to install plugins in DokuWiki. + +---- + +Notes on updating the mpdf library. The library is installed by composer +but results are checked into the plugin repository. Similar to what we do +in DokuWiki core. Because mpdf has some dependencies that are already +satisfied in DokuWiki core, they do not need to be installed by the plugin +again. To do so we declare them as replaced in the composer.json. The +.gitignore is used to skip checking in unneeded library files like examples +etc. + +Updating should be done via composer update --no-dev --prefer-dist + +---- +Copyright (C) Andreas Gohr , + Luigi Micco + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +See the COPYING file in your DokuWiki folder for details diff --git a/lib/plugins/dw2pdf/_test/ActionPagenameSortTest.php b/lib/plugins/dw2pdf/_test/ActionPagenameSortTest.php new file mode 100644 index 0000000..d946e59 --- /dev/null +++ b/lib/plugins/dw2pdf/_test/ActionPagenameSortTest.php @@ -0,0 +1,104 @@ +assertLessThan(0, $action->_pagenamesort(['id' => 'bar'], ['id' => 'bar:start'])); + $this->assertGreaterThan(0, $action->_pagenamesort(['id' => 'bar:bar'], ['id' => 'bar:start'])); + } + + /** + * @return array + * @see testPageNameSort + */ + public function providerPageNameSort() + { + return [ + [ + 'start pages sorted', + [ + 'bar', + 'bar:start', + 'bar:alpha', + 'bar:bar', + ], + ], + [ + 'pages and subspaces mixed', + [ + 'alpha', + 'beta:foo', + 'gamma', + ], + ], + [ + 'full test', + [ + 'start', + '01_page', + '10_page', + 'bar', + 'bar:start', + 'bar:1_page', + 'bar:2_page', + 'bar:10_page', + 'bar:22_page', + 'bar:aa_page', + 'bar:aa_page:detail1', + 'bar:zz_page', + 'foo', + 'foo:start', + 'foo:01_page', + 'foo:10_page', + 'foo:foo', + 'foo:zz_page', + 'ns', + 'ns:01_page', + 'ns:10_page', + 'ns:ns', + 'ns:zz_page', + 'zz_page', + ], + ], + ]; + } + + /** + * @dataProvider providerPageNameSort + * @param string $comment + * @param array $expected + */ + public function testPagenameSort($comment, $expected) + { + // prepare the array as expected in the sort function + $prepared = []; + foreach ($expected as $line) { + $prepared[] = ['id' => $line]; + } + + // the input is random + $input = $prepared; + shuffle($input); + + // run sort + $action = new \action_plugin_dw2pdf(); + usort($input, [$action, '_pagenamesort']); + + $this->assertSame($prepared, $input); + } +} + diff --git a/lib/plugins/dw2pdf/_test/DokuImageProcessorTest.php b/lib/plugins/dw2pdf/_test/DokuImageProcessorTest.php new file mode 100644 index 0000000..a15dfd0 --- /dev/null +++ b/lib/plugins/dw2pdf/_test/DokuImageProcessorTest.php @@ -0,0 +1,67 @@ +assertEquals($expected_file, $actual_file, '$file ' . $msg); + $this->assertEquals($expected_orig_srcpath, $actual_orig_srcpath, '$orig_srcpath ' . $msg); + } + +} diff --git a/lib/plugins/dw2pdf/_test/GeneralTest.php b/lib/plugins/dw2pdf/_test/GeneralTest.php new file mode 100644 index 0000000..8c6d5b0 --- /dev/null +++ b/lib/plugins/dw2pdf/_test/GeneralTest.php @@ -0,0 +1,86 @@ +assertFileExists($file); + + $info = confToHash($file); + + $this->assertArrayHasKey('base', $info); + $this->assertArrayHasKey('author', $info); + $this->assertArrayHasKey('email', $info); + $this->assertArrayHasKey('date', $info); + $this->assertArrayHasKey('name', $info); + $this->assertArrayHasKey('desc', $info); + $this->assertArrayHasKey('url', $info); + + $this->assertEquals('dw2pdf', $info['base']); + $this->assertRegExp('/^https?:\/\//', $info['url']); + $this->assertTrue(mail_isvalid($info['email'])); + $this->assertRegExp('/^\d\d\d\d-\d\d-\d\d$/', $info['date']); + $this->assertTrue(false !== strtotime($info['date'])); + } + + /** + * Test to ensure that every conf['...'] entry in conf/default.php has a corresponding meta['...'] entry in + * conf/metadata.php. + */ + public function testPluginConf(): void + { + $conf_file = __DIR__ . '/../conf/default.php'; + $meta_file = __DIR__ . '/../conf/metadata.php'; + + if (!file_exists($conf_file) && !file_exists($meta_file)) { + self::markTestSkipped('No config files exist -> skipping test'); + } + + if (file_exists($conf_file)) { + include($conf_file); + } + if (file_exists($meta_file)) { + include($meta_file); + } + + $this->assertEquals( + gettype($conf), + gettype($meta), + 'Both ' . DOKU_PLUGIN . 'dw2pdf/conf/default.php and ' . DOKU_PLUGIN . 'dw2pdf/conf/metadata.php have to exist and contain the same keys.' + ); + + if ($conf !== null && $meta !== null) { + foreach ($conf as $key => $value) { + $this->assertArrayHasKey( + $key, + $meta, + 'Key $meta[\'' . $key . '\'] missing in ' . DOKU_PLUGIN . 'dw2pdf/conf/metadata.php' + ); + } + + foreach ($meta as $key => $value) { + $this->assertArrayHasKey( + $key, + $conf, + 'Key $conf[\'' . $key . '\'] missing in ' . DOKU_PLUGIN . 'dw2pdf/conf/default.php' + ); + } + } + + } +} diff --git a/lib/plugins/dw2pdf/_test/RendererTest.php b/lib/plugins/dw2pdf/_test/RendererTest.php new file mode 100644 index 0000000..4c5ebd0 --- /dev/null +++ b/lib/plugins/dw2pdf/_test/RendererTest.php @@ -0,0 +1,43 @@ + $level) { + $actualbookmarklevel = $this->callInaccessibleMethod($Renderer, 'calculateBookmarklevel', [$level]); + $this->assertEquals($expectedbookmarklevels[$i], $actualbookmarklevel, "index:$i, lvl:$level"); + } + } +} diff --git a/lib/plugins/dw2pdf/_test/SyntaxExportLinkTest.php b/lib/plugins/dw2pdf/_test/SyntaxExportLinkTest.php new file mode 100644 index 0000000..d0a6a2b --- /dev/null +++ b/lib/plugins/dw2pdf/_test/SyntaxExportLinkTest.php @@ -0,0 +1,46 @@ +.:|Foo~~'); + $expected_parser_response = array( + 'plugin', + array( + 'dw2pdf_exportlink', + array( + 'link' => '?do=export_pdfns&book_ns=foo:bar&book_title=Foo', + 'title' => 'Export namespace "foo:bar:" to file Foo.pdf', + 5, + 1, + ), + 5, + '~~PDFNS>.:|Foo~~', + ), + 1, + ); + $this->assertEquals($expected_parser_response, $parser_response[2]); + $renderer_response = p_render('xhtml', $parser_response, $info); + $expected_renderer_response = 'doku.php?id=foo:bar:start&do=export_pdfns&book_ns=foo:bar&book_title=Foo" class="wikilink2" title="foo:bar:start" rel="nofollow" data-wiki-id="foo:bar:start">Export namespace "foo:bar:" to file Foo.pdf'; + $trimmed_renderer_response = substr($renderer_response, strpos($renderer_response, 'doku.php'), -5); + $trimmed_renderer_response = trim($trimmed_renderer_response); + $this->assertEquals($expected_renderer_response, $trimmed_renderer_response); + } +} + diff --git a/lib/plugins/dw2pdf/action.php b/lib/plugins/dw2pdf/action.php new file mode 100644 index 0000000..726aa5f --- /dev/null +++ b/lib/plugins/dw2pdf/action.php @@ -0,0 +1,1032 @@ + + * @author Andreas Gohr + */ + +/** + * Class action_plugin_dw2pdf + * + * Export html content to pdf, for different url parameter configurations + * DokuPDF which extends mPDF is used for generating the pdf from html. + */ +class action_plugin_dw2pdf extends DokuWiki_Action_Plugin { + /** + * Settings for current export, collected from url param, plugin config, global config + * + * @var array + */ + protected $exportConfig = null; + /** @var string template name, to use templates from dw2pdf/tpl/