1, 'by-nd' => 1, 'by-nc-nd' => 1, 'by-nc' => 1, 'by-nc-sa' => 1, 'by-sa' => 1, 'pd' => 1, )); SDVA($LicenseFmt, array( 'cc' => '[[https://creativecommons.org/licenses/%s/%s/ | https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/%s.svg"$[Creative Commons License]"]]', 'pd' => '[[https://creativecommons.org/publicdomain/zero/1.0/ | https://mirrors.creativecommons.org/presskit/buttons/88x31/svg/pd.svg"$[Public Domain Dedication]"]]', )); SDV($LicenseDefault, 'by-nc-nd'); Markup('license', 'directives', '/\\(:license(\\s.*?)?:\\)/', "FmtLicense"); function FmtLicense($m) { extract($GLOBALS['MarkupToHTML']); global $LicenseFmt, $LicenseTypeFmt, $LicenseVersion, $LicenseDefault; $args = ParseArgs(@$m[1]); $cc = strtolower(strval(@$args[''][0])); if (! $cc) $cc = $LicenseDefault; $fmt = @$LicenseTypeFmt[$cc]; if (!$fmt) return "unrecognized license $cc"; if ($fmt === 1) { # new formats $fmt = isset($LicenseFmt[$cc])? $LicenseFmt[$cc] : $LicenseFmt['cc']; $fmt = sprintf($fmt, $cc, $LicenseVersion, $cc); } #else old formats, customized at some point return FmtPageName($fmt, $pagename); }