diff --git a/README.txt b/README.txt
index b0b5e521..325e895f 100644
--- a/README.txt
+++ b/README.txt
@@ -101,6 +101,22 @@ For a list of permissions, see core/userclass.class.php
Development Info
~~~~~~~~~~~~~~~~
+ui-* cookies are for the client-side scripts only; in some configurations
+(eg with varnish cache) they will be stripped before they reach the server
+
+shm-* CSS classes are for javascript to hook into; if you're customising
+themes, be careful with these, and avoid styling them, eg:
+
+- shm-thumb = outermost element of a thumbnail
+ - data-tags
+ - data-post-id
+- shm-toggler = click this to toggle elements that match the selector
+ - data-toggle-sel
+- shm-unlocker = click this to unlock elements that match the selector
+ - data-unlock-sel
+- shm-clink = a link to a comment, flash the target element when clicked
+ - data-clink-sel
+
http://shimmie.shishnet.org/doc/
Please tell me if those docs are lacking in any way, so that they can be
diff --git a/core/basethemelet.class.php b/core/basethemelet.class.php
index ef9b3a42..70e01ab1 100644
--- a/core/basethemelet.class.php
+++ b/core/basethemelet.class.php
@@ -54,9 +54,9 @@ class BaseThemelet {
$tsize = get_thumbnail_size($image->width, $image->height);
}
- return ''.
- ''.
- ''.
+ return "".
+ "
".
+ "".
"\n";
}
diff --git a/core/config.class.php b/core/config.class.php
index 8fc7b4d9..4fdfc2b4 100644
--- a/core/config.class.php
+++ b/core/config.class.php
@@ -120,6 +120,20 @@ abstract class BaseConfig implements Config {
}
+/**
+ * For testing, mostly
+ */
+class HardcodeConfig extends BaseConfig {
+ public function __construct($dict) {
+ $this->values = $dict;
+ }
+
+ public function save(/*string*/ $name=null) {
+ // static config is static
+ }
+}
+
+
/**
* Loads the config list from a PHP file; the file should be in the format:
*
diff --git a/ext/blotter/main.php b/ext/blotter/main.php
index 21c87d8c..f02e1461 100644
--- a/ext/blotter/main.php
+++ b/ext/blotter/main.php
@@ -43,6 +43,7 @@ class Blotter extends Extension {
$config->set_default_string("blotter_position", "subheading");
}
+
public function onSetupBuilding(SetupBuildingEvent $event) {
global $config;
$sb = new SetupBlock("Blotter");
@@ -51,12 +52,14 @@ class Blotter extends Extension {
$sb->add_choice_option("blotter_position", array("Top of page" => "subheading", "In navigation bar" => "left"), "
Position: ");
$event->panel->add_block($sb);
}
+
public function onUserBlockBuilding(UserBlockBuildingEvent $event) {
global $user;
if($user->is_admin()) {
$event->add_link("Blotter Editor", make_link("blotter/editor"));
}
}
+
public function onPageRequest(PageRequestEvent $event) {
global $page, $database, $user;
if($event->page_matches("blotter")) {
@@ -105,7 +108,7 @@ class Blotter extends Extension {
$page->set_redirect(make_link("blotter/editor"));
}
break;
- case "":
+ case "list":
/**
* Displays all blotter entries
*/
diff --git a/ext/blotter/script.js b/ext/blotter/script.js
index 9527de26..e2f4f892 100644
--- a/ext/blotter/script.js
+++ b/ext/blotter/script.js
@@ -1,16 +1,15 @@
-
$(document).ready(function() {
- $("#blotter2-toggle").click(function() {
- $("#blotter2").slideToggle("slow", function() {
- if($("#blotter2").is(":hidden")) {
- $.cookie("blotter2-hidden", 'true', {path: '/'});
+ $(".shm-blotter2-toggle").click(function() {
+ $(".shm-blotter2").slideToggle("slow", function() {
+ if($(".shm-blotter2").is(":hidden")) {
+ $.cookie("ui-blotter2-hidden", 'true', {path: '/'});
}
else {
- $.cookie("blotter2-hidden", 'false', {path: '/'});
+ $.cookie("ui-blotter2-hidden", 'false', {path: '/'});
}
});
});
- if($.cookie("blotter2-hidden") == 'true') {
- $("#blotter2").hide();
+ if($.cookie("ui-blotter2-hidden") == 'true') {
+ $(".shm-blotter2").hide();
}
});
diff --git a/ext/blotter/theme.php b/ext/blotter/theme.php
index 29581c1d..9fe9dd79 100644
--- a/ext/blotter/theme.php
+++ b/ext/blotter/theme.php
@@ -12,8 +12,9 @@ class BlotterTheme extends Themelet {
public function display_blotter_page($entries) {
global $page;
$html = $this->get_html_for_blotter_page($entries);
- $page->set_mode("data");
- $page->set_data($html);
+ $page->set_title("Blotter");
+ $page->set_heading("Blotter");
+ $page->add_block(new Block("Blotter Entries", $html, "main", 10));
}
public function display_blotter($entries) {
@@ -95,10 +96,8 @@ class BlotterTheme extends Themelet {
* This one displays a list of all blotter entries.
*/
global $config;
- $i_color = $config->get_string("blotter_color","#FF0000");
- $html = "";
- $html .= "
"; + $i_color = $config->get_string("blotter_color", "#FF0000"); + $html = ""; return $html; } @@ -143,14 +144,17 @@ class BlotterTheme extends Themelet { } $entries_list .= ""; $num_entries = count($entries); for ($i = 0 ; $i < $num_entries ; $i++) { @@ -110,13 +109,15 @@ class BlotterTheme extends Themelet { $i_close = ""; $id = $entries[$i]['id']; $messy_date = $entries[$i]['entry_date']; - $clean_date = date("m/d/y",strtotime($messy_date)); + $clean_date = date("y/m/d", strtotime($messy_date)); $entry_text = $entries[$i]['entry_text']; - if($entries[$i]['important'] == 'Y') { $i_open = ""; $i_close=""; } + if($entries[$i]['important'] == 'Y') { + $i_open = ""; + $i_close=""; + } $html .= "{$i_open}{$clean_date} - {$entry_text}{$i_close}"; + $html .= "
"; } - - $html .= "