XML_RPC to 1.3.3
Fixing several bugs and vulnerabilities. (nohn)
+ * Allow plugins to contain more than one HTML nuggets which can be
+ WYSIWYGized. (garvinhicking)
+
* Fix editing a draft article to be properly displayed as draft
in PostgreSQL setups. Thanks to Penny Leach! (garvinhicking)
<br />
<table border="0" cellspacing="0" cellpadding="3" width="100%">
<?php
+ $elcount = 0;
+ $htmlnugget = array();
foreach ($config_names as $config_item) {
+ $elcount++;
$cbag = new serendipity_property_bag;
$plugin->introspect_config_item($config_item, $cbag);
case 'html':
case 'text':
?>
- <tr>
- <td colspan="2"><strong><?php echo $cname; ?></strong>
- <span style="color: #5E7A94; font-size: 8pt;"> <?php echo $cdesc; ?></span>
- </td>
- </tr>
-
<tr>
<td colspan="2">
<div>
- <textarea class="direction_<?php echo $lang_direction; ?>" style="width: 100%" id="nugget" name="serendipity[plugin][<?php echo $config_item; ?>]" rows="20" cols="80"><?php echo $hvalue; ?></textarea>
+ <textarea class="direction_<?php echo $lang_direction; ?>" style="width: 100%" id="nugget<?php echo $elcount; ?>" name="serendipity[plugin][<?php echo $config_item; ?>]" rows="20" cols="80"><?php echo $hvalue; ?></textarea>
</div>
</td>
</tr>
<?php
if ($cbag->get('type') == 'html') {
- serendipity_emit_htmlarea_code('nugget', 'nugget');
+ $htmlnugget[] = $elcount;
+ serendipity_emit_htmlarea_code('nugget' . $elcount, 'nugget' . $elcount);
}
break;
<div>
<?php echo $plugin->example() ?>
</div>
+<?php
+ }
+
+ if (isset($serendipity['wysiwyg']) && $serendipity['wysiwyg'] && count($htmlnugget) > 0) {
+?>
+ <script type="text/javascript">
+ function Spawnnugget() {
+ <?php foreach($htmlnugget AS $htmlnuggetid) { ?>
+ Spawnnugget<?php echo $htmlnuggetid; ?>();
+ <?php } ?>
+ }
+ </script>
<?php
}
?>