[pmwiki-users] custom markup problem

Hans design5 at softflow.co.uk
Mon Apr 28 12:03:09 CDT 2008


Monday, April 28, 2008, 9:36:21 AM, noskule wrote:

> I have a problem with a cutom markup.

try this:

Markup('contentbox', '<split',
        '/\\(:contentbox\\s+(.*?)\\s*:\\)(.*?)\\(:contentboxend:\\)/se',
        "MakeContentbox(\$pagename, PSS('$1'), PSS('$2'))");

function MakeContentbox($pagename, $args, $content) {
    $args = ParseArgs($args);
    $title = $args['title'];
    $style = $args['style'];
    if ( $style != '' ) $style = "style='$style'";
    $out = "<div class='contentboxframe' $style><span class='boxhead'>$title</span>
<div class='contentbox'>\n
$content
\n
</div>\n
</div>\n";
    return $out;
}



  ~Hans




More information about the pmwiki-users mailing list