* @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>';
Example #2
0
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;
}
 * 
 * You should have received a copy of the GNU General Public License
 * along with SWIS.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * END Copyright
 *  
 * @copyright 2007-2010 Stephen E Slevinski Jr 
 * @author Steve (slevin@signpuddle.net)  
 * @license http://www.opensource.org/licenses/gpl-3.0.html GPL
 * @access public
 * @package SWIS
 * @version 1.2.0
 * @filesource
 *   
 */
$st = new SignText($bsw, $size, $height - $top_pad, $spacing, $offset);
$cols = $st->getCols();
$posX = $st->getPosX();
$posY = $st->getPosY();
$bsw = $cols[$col];
$units = bsw2unit($bsw);
$xpos = $posX[$col];
$ypos = $posY[$col];
$data = '';
foreach ($units as $u => $unit) {
    $xadj = $xpos[$u];
    $yadj = $ypos[$u];
    $first = substr($unit, 0, 3);
    if (isPunc($first)) {
        $data .= $unit . num2hex(-$xadj) . num2hex($yadj);
    } else {