function efSWMPRenderSignText($input, $args, $parser) { global $wgScriptPath; $input = preg_replace('/\\s+/m', '', $input); $parser->disableCache(); //should solve caching problem. $output = '<table cellpadding=5>'; $output .= '<tr><td>'; $size = 0.7; $height = 400; //quick hack so scripts works chdir('extensions/swmp/swis'); $st = new SignText($input, $size, $height); chdir('../../..'); $cols = $st->getCols(); $cnt = count($cols); $pre = '<div class="signtextcolumn" '; //should be in style sheet $pre .= 'style="position: relative;float:left;padding:10px;border: 2px #cccccc solid;">'; $pre .= '<img src="' . $wgScriptPath . '/extensions/swmp/swis/column.php?size=' . $size; if ($cnt > 1) { $pre .= '&height=' . $height; } foreach ($cols as $col) { $output .= $pre . '&bsw=' . $col . '"></div>'; } if ($cnt == 0) { $output .= '<div class="signtextcolumn" '; $output .= 'style="position: relative;float:left;padding:10px;border: 2px #cccccc solid;">'; $output .= '<img src="' . $wgScriptPath . '/extensions/swmp/swis/glyphogram.php?bsw=0fb10038d39b49c4a110038d3934b4498&size=.4"></div>'; } $output .= '</td></tr></table>'; # sneak past the parser due to added <p>'s return $output; }
* @filesource * */ /** * include, attributes, and header */ include 'bsw.php'; include 'swclasses.php'; $bsw = $_REQUEST['bsw']; $size = $_REQUEST['size']; $height = $_REQUEST['height']; if (!$size) { $size = 1; } if (!$height) { $height = 1919; } echo '<html><head>'; echo '<link href="columns.css" rel="stylesheet" type="text/css" media="all">'; echo '</head><body>'; $st = new SignText($bsw, $size, $height); $cols = $st->getCols(); $cnt = count($cols); $pre = '<div class="signtextcolumn"><img src="column.php?size=' . $size; if ($cnt > 1) { $pre .= '&height=' . $height; } foreach ($cols as $col) { echo $pre . '&bsw=' . $col . '"></div>'; } echo '</body></html>';