Added new optional parameter for plugin config type "text": rows.

This commit is contained in:
Grischa Brockhaus 2009-07-05 14:58:31 +00:00
parent e853839403
commit d9b0ccb3f4
2 changed files with 11 additions and 1 deletions

View File

@ -3,6 +3,9 @@
Version 1.5 ()
------------------------------------------------------------------------
* Added new optional parameter for plugin config type "text": rows.
(brockhaus)
* pingbacks were not counted as entry trackbacks (also added to entries)
(brockhaus)

View File

@ -419,6 +419,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
$radio = array();
$select = array();
$per_row = null;
$text_rows = null;
$is_multi_select = false;
$ctype = $cbag->get('type');
@ -565,6 +566,12 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
case 'html':
case 'text':
if (empty($text_rows)) {
$text_rows = $cbag->get('rows');
if (empty($text_rows)) {
$text_rows = 20;
}
}
?>
<tr>
<td colspan="2"><strong><?php echo $cname; ?></strong>
@ -575,7 +582,7 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
<tr>
<td colspan="2">
<div>
<textarea class="direction_<?php echo $lang_direction; ?>" style="width: 100%" id="nuggets<?php echo $elcount; ?>" name="serendipity[<?php echo $postKey; ?>][<?php echo $config_item; ?>]" rows="20" cols="80"><?php echo $hvalue; ?></textarea>
<textarea class="direction_<?php echo $lang_direction; ?>" style="width: 100%" id="nuggets<?php echo $elcount; ?>" name="serendipity[<?php echo $postKey; ?>][<?php echo $config_item; ?>]" rows="<?php echo $text_rows; ?>" cols="80"><?php echo $hvalue; ?></textarea>
</div>
</td>
</tr>