From 4faa4c0b44e4fdf33e99ce57c5873e643398c5ad Mon Sep 17 00:00:00 2001 From: vargenau Date: Sat, 17 Oct 2009 15:14:00 +0000 Subject: [PATCH] ENABLE_MARKUP_TEMPLATE removed, it had to be true so that Wikicreole syntax for images work git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@7215 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- config/config-default.ini | 1 - config/config-dist.ini | 4 ---- configurator.php | 3 --- g | 3 --- lib/BlockParser.php | 11 +++++++++++ lib/IniConfig.php | 2 +- lib/InlineParser.php | 7 ++++++- lib/plugin/Template.php | 5 ++--- locale/de/pgsrc/Hilfe%2FVorlagePlugin | 3 +-- themes/MonoBook/themeinfo.php | 2 -- 10 files changed, 21 insertions(+), 20 deletions(-) diff --git a/config/config-default.ini b/config/config-default.ini index 559c6064d..1fae171e0 100644 --- a/config/config-default.ini +++ b/config/config-default.ini @@ -152,7 +152,6 @@ AUTHORPAGE_URL = "http://phpwiki.org/ThePhpWikiProgrammingTeam" TOC_FULL_SYNTAX = true ENABLE_MARKUP_COLOR = true -ENABLE_MARKUP_TEMPLATE = false DISABLE_MARKUP_WIKIWORD = false ENABLE_MARKUP_DIVSPAN = false PLUGIN_MARKUP_MAP = "" diff --git a/config/config-dist.ini b/config/config-dist.ini index 1a840455b..77e8b7b96 100644 --- a/config/config-dist.ini +++ b/config/config-dist.ini @@ -1039,10 +1039,6 @@ CHARSET = utf-8 ; Default: true ;ENABLE_MARKUP_COLOR = false -; Enable Mediawiki-style {{TemplatePage|vars=value|...}} syntax. -; Default: undefined. Enabled automatically on the MonoBook theme if undefined. -;ENABLE_MARKUP_TEMPLATE = true - ; Disable automatic linking of camelcase (wiki-)words to pages. ; Internal page links must be forced with [ pagename ] then. ; Default: false diff --git a/configurator.php b/configurator.php index 4f63489c3..90615c5c6 100644 --- a/configurator.php +++ b/configurator.php @@ -1432,9 +1432,6 @@ new boolean_define_optional('TOC_FULL_SYNTAX'); $properties["ENABLE_MARKUP_COLOR"] = new boolean_define_optional('ENABLE_MARKUP_COLOR'); -$properties["ENABLE_MARKUP_TEMPLATE"] = -new boolean_define_optional('ENABLE_MARKUP_TEMPLATE'); - $properties["DISABLE_MARKUP_WIKIWORD"] = new boolean_define_optional('DISABLE_MARKUP_WIKIWORD'); diff --git a/g b/g index a10166306..601085126 100644 --- a/g +++ b/g @@ -107,9 +107,6 @@ if (!$group_id || !$project) { // Allow ".jpeg" as extension define('INLINE_IMAGES', 'png|jpg|jpeg|gif'); - // Allow template with MediaWiki syntax - define('ENABLE_MARKUP_TEMPLATE', true); - // Allow parsing of headers for CreateToc define('TOC_FULL_SYNTAX', true); diff --git a/lib/BlockParser.php b/lib/BlockParser.php index 180ea3f26..fce140848 100644 --- a/lib/BlockParser.php +++ b/lib/BlockParser.php @@ -1115,6 +1115,17 @@ class Block_table_mediawiki extends Block_pre } } +/** + * Template syntax similar to Mediawiki + * {{template}} + * => < ? plugin Template page=template ? > + * {{template|var1=value1|var2=value|...}} + * => < ? plugin Template page=template var=value ... ? > + * + * The {{...}} syntax is also used for: + * - Wikicreole images + * - videos + */ class Block_template_plugin extends Block_pre { var $_re = '{{'; diff --git a/lib/IniConfig.php b/lib/IniConfig.php index 7eff518ad..5bf66fc89 100644 --- a/lib/IniConfig.php +++ b/lib/IniConfig.php @@ -197,7 +197,7 @@ function IniConfig($file) { 'BLOG_DEFAULT_EMPTY_PREFIX', 'DATABASE_PERSISTENT', 'ENABLE_DISCUSSION_LINK', 'ENABLE_CAPTCHA', 'ENABLE_WYSIWYG', 'WYSIWYG_DEFAULT_PAGETYPE_HTML', - 'DISABLE_MARKUP_WIKIWORD', 'ENABLE_MARKUP_COLOR', 'ENABLE_MARKUP_TEMPLATE', + 'DISABLE_MARKUP_WIKIWORD', 'ENABLE_MARKUP_COLOR', 'ENABLE_MARKUP_DIVSPAN', 'USE_BYTEA', 'UPLOAD_USERDIR', 'DISABLE_UNITS', 'ENABLE_SEARCHHIGHLIGHT', 'DISABLE_UPLOAD_ONLY_ALLOWED_EXTENSIONS', 'ENABLE_AUTH_OPENID', 'INSECURE_ACTIONS_LOCALHOST_ONLY', diff --git a/lib/InlineParser.php b/lib/InlineParser.php index fe02946bb..dabf9d622 100644 --- a/lib/InlineParser.php +++ b/lib/InlineParser.php @@ -1003,12 +1003,17 @@ class Markup_wikicreole_preformatted extends SimpleMarkup } } -/** ENABLE_MARKUP_TEMPLATE +/** * Template syntax similar to Mediawiki * {{template}} * => < ? plugin Template page=template ? > * {{template|var1=value1|var2=value|...}} * => < ? plugin Template page=template var=value ... ? > + * + * The {{...}} syntax is also used for: + * - Wikicreole images + * - videos + * - predefined icons */ class Markup_template_plugin extends SimpleMarkup { diff --git a/lib/plugin/Template.php b/lib/plugin/Template.php index 18d525119..1a6c8e080 100644 --- a/lib/plugin/Template.php +++ b/lib/plugin/Template.php @@ -2,6 +2,7 @@ rcs_id('$Id$'); /* Copyright 2005,2007 $ThePhpWikiProgrammingTeam + Copyright 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent This file is part of PhpWiki. @@ -47,9 +48,7 @@ rcs_id('$Id$'); * .. is only expanded in pages using the template, * not in the template itself. * - * See also: - * - ENABLE_MARKUP_TEMPLATE = true: (lib/InlineParser.php) - * Support a mediawiki-style syntax extension which maps + * We support a mediawiki-style syntax extension which maps * {{TemplateFilm|title=Some Good Film|year=1999}} * to * diff --git a/locale/de/pgsrc/Hilfe%2FVorlagePlugin b/locale/de/pgsrc/Hilfe%2FVorlagePlugin index 678bf7ff2..c02428fc5 100644 --- a/locale/de/pgsrc/Hilfe%2FVorlagePlugin +++ b/locale/de/pgsrc/Hilfe%2FVorlagePlugin @@ -1,4 +1,4 @@ -Date: Sun, 5 Jul 2009 21:04:20 +0000 +Date: Sat, 17 Oct 2009 17:03:32 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.3.13) X-Rcs-Id: $Id$ Content-Type: application/x-phpwiki; @@ -60,7 +60,6 @@ The following predefined variables are automatically expanded if existing: .. is stripped ==== In work: -* ENABLE_MARKUP_TEMPLATE = true: (lib/InlineParser.php) Support a mediawiki-style syntax extension which maps {{{ {{Template/Film|title=Some Good Film|year=1999}} diff --git a/themes/MonoBook/themeinfo.php b/themes/MonoBook/themeinfo.php index 0a02d1f4c..3204f06ad 100644 --- a/themes/MonoBook/themeinfo.php +++ b/themes/MonoBook/themeinfo.php @@ -18,8 +18,6 @@ rcs_id('$Id$'); */ require_once('lib/WikiTheme.php'); require_once('themes/wikilens/themeinfo.php'); -if (!defined("ENABLE_MARKUP_TEMPLATE")) - define("ENABLE_MARKUP_TEMPLATE", true); function ActionButton ($action, $label = false, $page_or_rev = false, $options = false) { global $WikiTheme; -- 2.45.2