[datapress] r151 committed - added ability to inject arbitrary html into the top of the exhibit con...

0 views
Skip to first unread message

codesite...@google.com

unread,
Feb 23, 2011, 10:11:14 PM2/23/11
to datapres...@googlegroups.com
Revision: 151
Author: edward.benson
Date: Wed Feb 23 19:10:18 2011
Log: added ability to inject arbitrary html into the top of the exhibit
configuration
http://code.google.com/p/datapress/source/detail?r=151

Modified:
/trunk/plugin/configurator/exhibit-inputbox-display.php
/trunk/plugin/save-exhibit.php
/trunk/plugin/wp-exhibit-insert-exhibit.php

=======================================
--- /trunk/plugin/configurator/exhibit-inputbox-display.php Tue Mar 31
14:27:45 2009
+++ /trunk/plugin/configurator/exhibit-inputbox-display.php Wed Feb 23
19:10:18 2011
@@ -19,7 +19,10 @@
}
if ($exhibitConfig->get('height', true) != NULL) {
$height = $exhibitConfig->get('height');
- }
+ }
+ if ($exhibitConfig->get('custom_html') != NULL) {
+ $custom_html = $exhibitConfig->get('custom_html');
+ }
}
?>

@@ -38,6 +41,13 @@
<td><i>Attach custom CSS<br /> (provide URL)</i></td>
<td><input style="width: 300px;" name="display-configuration-css"
id="display-configuration-css" value="<?php echo $css ?>" /></td>
</tr>
+ <tr>
+ <td><i>Custom HTML</i></td>
+ <td>This will be inserted into the Exhibit configuration<br />
+ <textarea name="display-configuration-custom-html"
id="display-configuration-custom-html" rows="10" cols="40"><?php echo
$custom_html ?></textarea>
+ </td>
+
+
</table>
</div>

=======================================
--- /trunk/plugin/save-exhibit.php Wed Feb 2 12:42:10 2011
+++ /trunk/plugin/save-exhibit.php Wed Feb 23 19:10:18 2011
@@ -85,6 +85,9 @@
if ($custom_html) {
$ex_exhibit->set('custom_html', $custom_html);
}
+ else {
+ $ex_exhibit->set('custom_html', NULL);
+ }
$ex_exhibit->save();
echo $ex_exhibit->get('id');
}
=======================================
--- /trunk/plugin/wp-exhibit-insert-exhibit.php Thu Dec 10 12:01:32 2009
+++ /trunk/plugin/wp-exhibit-insert-exhibit.php Wed Feb 23 19:10:18 2011
@@ -111,7 +111,13 @@
$right_facet_html = "<td width=\"15%\"> $right_facet_html
</td>";
}

+ $custom_html = "";
+ if ($exhibit->get('custom_html') != NULL) {
+ $custom_html .= $exhibit->get('custom_html');
+ }
+
$exhibit_html = "
+ $custom_html
$lens_html
<table class=\"dpcontainer\" width=\"100%\">
<tr>

Reply all
Reply to author
Forward
0 new messages