[pmwiki-devel] Parse Args & Strings
Craige Leeder
craige at internetadvisor.ca
Tue Nov 21 14:48:56 CST 2006
Hans wrote:
>It should work. Can you show the markup definition and the start of
>the function with ParseArg?
>
>
>Hans
>
>
Sure can:
// Markup() Calls
Markup( 'map', '_begin', '/\(:map(-location\s|\s)(.*?):\)/ie',
'CvtMarkup(\'$1\', \'$2\');' );
and:
function GenerateMap( $params )
{
global $GoogleMapDefaults, $HTMLHeaderFmt, $HeadFmt, $ParsedArgs;
$loctype = null;
/*
* Time to parse the arguments
*/
// Check the location paramater
// Is it quoted, and thus an address?
if ( preg_match('/"(.*\s*)?"/', $params['location']) ||
!empty($TempLocation) )
{
$loctype = 'addr'; // It's an address
$ParsedArgs['location']['address'] = str_replace('"', '',
$params['location']);
}
More information about the pmwiki-devel
mailing list