echo '<p>' . t('This will return brut text content.') . ' ' .\r
t('First line is a block id the second line the edit/delete code.') . '<br /></p>';\r
\r
+ echo '<h3>' . t('Get block size') . ':</h3>';\r
+ echo '<p>';\r
+ echo t('Send a GET query to') . ': <i>' . $web_root . 'script.php?get_block_size</i><br />';\r
+ echo '<br />';\r
+ echo t('Parameters') . ':<br />';\r
+ echo "<b>id=</b>block_id<i> (" . t('Required') . ")</i> <br />";\r
+ echo '</p>';\r
+ echo '<p>' . t('This will return asked data or "Error" string.') . '<br /></p>';\r
+\r
echo '<h3>' . t('Read data in a block') . ':</h3>';\r
echo '<p>';\r
echo t('Send a GET query to') . ': <i>' . $web_root . 'script.php?read_block</i><br />';\r
else\r
echo jirafeau_block_init ($_POST['size']);\r
}\r
+/* Get block size. */\r
+elseif (isset ($_GET['get_block_size']) && $cfg['enable_blocks'])\r
+{\r
+ if (!isset ($_POST['id']))\r
+ echo "Error";\r
+ else\r
+ echo jirafeau_block_get_size ($_POST['id']);\r
+}\r
/* Read data in block. */\r
elseif (isset ($_GET['read_block']) && $cfg['enable_blocks'])\r
{\r