[pmwiki-users] custom markup q.

noskule noskule at gmx.net
Sun Apr 20 14:11:47 CDT 2008


hi
I'v got a problem with a custom markup. It renders the function 
("MakeCont....) instead of executing it it:
Anyone an idea whats wrong?
thanks for any hints
nos

Markup:
(:contentbox title="titlename" style="border:1px solid gray; width:300px":)
content content
content content
(:contentboxend:)


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

Function:
function MakeContentbox($pagename, $args) {
    $title = $args['title'];
    $style = $args['style'];
  $sargs = $args[''];
    $out = "
    div class='contentboxbox' style='$style'>\n
        <span class='boxhead'>$title</span>\n
        <div class='contentbox'>\n
        $2
        \n
    </div>\n
    </div>\n
    ";
    return $out;
    }



More information about the pmwiki-users mailing list