<?php header('Content-Type: application/json'); /* yadl_spaceid - Skip Stamping */ include 'exampleslib.inc'; // Use Services_JSON require_once 'JSON.php'; $json = new Services_JSON(); $h = getRawData('height'); $w = getRawData('width'); $t = getRawData('top'); $l = getRawData('left'); $data = 'Height: ' . $h; $data .= ', Width: ' . $w; $data .= ', Top: ' . $t; $data .= ', Left: ' . $l; $response = new stdclass(); $response->data = '<p>This example does not really resize, but here is the data we received: ' . $data . '</p><p>If we used ImageMagick & PHP we could issue this command: convert yui.jpg -crop [' . $w . ' x ' . $h . ' + ' . $l . ' + ' . $t . '] yui-new.jpg</p>'; echo $json->encode($response);
</div> <div id="header"> <h1 id="title">Editing <?php print getPage(); ?> </h1> </div> <div id="form"> <form method="post" action="<?php print getPostURL(); ?> "> <p><textarea name="data" cols="80" rows="20" style="width: 100%"><?php print getRawData(); ?> </textarea></p> <p><input type="submit" value="publish" /></p> </form> </div> <div id="footer" style='text-align: left;'> <p class='syntax'> <span style='font-weight: bold;'>Syntax:</span> Besides normal HTML code (e.g. <code><b>Bold</b></code>), the following markup is available as well: <ul> <li><code>[SomePage]</code>: Internal link to SomePage</li> <li><code>h1. Section</code>, <code>h2. Subsection</code>: Section headers</li>