[pmwiki-users] Help With Custom Markup (I'll PayPal you...)

Eemeli Aro eemeli at gmail.com
Wed Mar 12 09:07:11 CDT 2008

On Wed, Mar 12, 2008 at 1:00 PM, Dominique Faure
<dominique.faure at gmail.com> wrote:
>  Eemeli Aro solution is working but require to alter core scripts.
>  Here's a way to prevent this. At the end of your config.php, add:
>  if (IsEnabled($EnableStdConfig,1)) {
>   include_once("$FarmD/scripts/stdconfig.php");
>   $MarkupTable['^img']['rep']
>     = preg_replace('/<(\/)?div>/', '<$1p>',
>                    $MarkupTable['^img']['rep']);
> }

Actually, you probably should have the following, since there are
quite a few dependencies between the script files:

if (IsEnabled($EnablePrefs, 1))
if (IsEnabled($EnableSimulEdit, 1))
if (IsEnabled($EnableDrafts, 0))
  include_once("$FarmD/scripts/draft.php");        # after simuledit + prefs
if (IsEnabled($EnableSkinLayout,1))
  include_once("$FarmD/scripts/skins.php");        # must come after prefs
if (@$Transition || IsEnabled($EnableTransitions, 0))
  include_once("$FarmD/scripts/transition.php");   # must come after skins
if (@$LinkWikiWords || IsEnabled($EnableWikiWords, 0))
  include_once("$FarmD/scripts/wikiwords.php");    # must come before stdmarkup
if (IsEnabled($EnableStdConfig,1)) {
  include_once("$FarmD/scripts/stdconfig.php");    # must come after transition
  $MarkupTable['^img']['rep'] =
    preg_replace('/<(\/)?div>/', '<$1p>', $MarkupTable['^img']['rep']);

Hence my suggestion to just make two very small edits directly to stdmarkup.php.


More information about the pmwiki-users mailing list