[pmwiki-users] MarkupExpressionsExtensions

The Editor editor at fast.st
Mon Apr 16 11:19:33 CDT 2007


Also, this does not work at all...  I had this problem before and
forgot I had never figured it out.  The problem is the $p value even
though it shows up as expected, the strpos cannot find a " " in it, so
it can't make the test or return the right value

$MarkupExpr['wiki'] = 'MkExpExtWiki($params)';
function MkExpExtWiki($p) {
	global $MkExpExtDirectives, $MkExpExtZap;
	$c = substr($p, 0, strpos($p, " "));
	$p = substr($p, strpos($p, " "));
	$pmlist = explode(",", $MkExpExtDirectives);
	if (in_array($c, $pmlist)) return stripslashes("(:$c $p:)");
	if ((substr($c, 0, 3) == 'zap') && ($MkExpExtZap == true)) return
stripslashes("(:$c $p:)");
	return '';
	}

SDV($MkExpExtDirectives,
'table,tableend,cell,cellnr,include,if,pagelist,input,messages,redirect,title');
SDV($MkExpExtZap, false);

Perplexing...

Cheers,
Dan



More information about the pmwiki-users mailing list