]> git.mjollnir.org Git - s9y.git/commitdiff
new c'custom' property bag type
authorgarvinhicking <garvinhicking>
Sat, 3 Jun 2006 21:56:04 +0000 (21:56 +0000)
committergarvinhicking <garvinhicking>
Sat, 3 Jun 2006 21:56:04 +0000 (21:56 +0000)
docs/NEWS
include/functions_plugins_admin.inc.php

index 8286cade59351700a946ddb992c17336bf7e4961..d1fe6aa6cf39b12a7519fcf203bc33b745939727 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,12 @@
 Version 1.1-alpha6()
 ------------------------------------------------------------------------
 
+    * Add new "custom" property bag type, which can emit any kind of
+      custom HTML/JS values. Current property bag value can be referenced
+      by DOM GetElementById('config_plugin_XXX') if you want to emit
+      specific JavaScript. Can also be used by template configurator for
+      heavily customized output. (garvinhicking)
+
     * Fix bug #1494653: Non-Unique index constraint for 'exits' table.
       Thanks to Markus Brueckner! (garvinhicking)
       
index 06d95e931c5cccac56ea8d861526092127b005b5..462bfdd58e55fc9a2e2f169fbab3858819045e24 100644 (file)
@@ -180,7 +180,7 @@ function show_plugins($event_only = false)
 
         echo '</ol></td>';
     }
-    
+
 ?>
         <tr>
             <td colspan="3" align="right"><?php printf(PLUGIN_AVAILABLE_COUNT, $total); ?></td>
@@ -270,7 +270,7 @@ function placement_box($name, $val, $is_plugin_editable = false, $is_event = fal
     } else {
         $gopts = &$opts;
     }
-    
+
     $x = "\n<select name=\"$name\">\n";
     foreach ($gopts as $k => $v) {
         if (!$is_plugin_editable && $k == 'hide') {
@@ -519,6 +519,13 @@ function serendipity_plugin_config(&$plugin, &$bag, &$name, &$desc, &$config_nam
                 ?><tr><td colspan="2"><?php echo $cbag->get('default'); ?></td></tr><?php
                 break;
 
+            case 'custom':
+                ?><tr><td colspan="2">
+                    <input type="hidden" id="config_<?php echo $postKey; ?>_<?php echo $config_item; ?>" name="serendipity[<?php echo $postKey; ?>][<?php echo $config_item; ?>]" value="<?php echo $hvalue; ?>" size="30" />
+                    <?php echo $cbag->get('custom'); ?>
+                  </td></tr><?php
+                break;
+
             case 'hidden':
                 ?><tr><td colspan="2"><input class="direction_<?php echo $lang_direction; ?>" type="hidden" name="serendipity[<?php echo $postKey; ?>][<?php echo $config_item; ?>]" value="<?php echo $cbag->get('value'); ?>" /></td></tr><?php
                 break;