Now compatible with Enano 1.1.6.
authorDan
Tue, 05 May 2009 19:08:45 -0400
changeset 34 5e9bd8e5c6bf
parent 33 6dc190e2158b
child 35 1dd30d7bf29f
Now compatible with Enano 1.1.6.
plugins/gallery/browser.css
plugins/gallery/browser.php
plugins/gallery/viewimage.php
--- a/plugins/gallery/browser.css	Thu Jan 29 02:06:06 2009 -0500
+++ b/plugins/gallery/browser.css	Tue May 05 19:08:45 2009 -0400
@@ -12,7 +12,7 @@
   margin: 0 auto;
   padding: 4px;
   width: 80px;
-  white-space: nowrap;
+  /* white-space: nowrap; */
 }
 
 div.gallery_icon:hover {
@@ -36,8 +36,10 @@
   float: left;
   list-style-type: none !important;
   list-style-image: none !important;
+  background-image: none !important;
   width: 80px;
   margin-right: 15px;
+  display: block;
 }
 
 a.snapr-imagelink {
@@ -62,6 +64,7 @@
   padding: 4px;
   text-align: left;
   min-width: 100px;
+  max-width: 250px;
   font-family: arial, helvetica, sans-serif;
   font-size: 8pt;
 }
--- a/plugins/gallery/browser.php	Thu Jan 29 02:06:06 2009 -0500
+++ b/plugins/gallery/browser.php	Tue May 05 19:08:45 2009 -0400
@@ -441,7 +441,7 @@
     'img_id' => array($renderer, 'render')
     );
   
-  $renderer->icons_per_row = $rows_in_browser;
+  $renderer->icons_per_row = 5;
   
   $start = 0;
   if ( isset($_GET['start']) && preg_match('/^[0-9]+$/', $_GET['start']) )
--- a/plugins/gallery/viewimage.php	Thu Jan 29 02:06:06 2009 -0500
+++ b/plugins/gallery/viewimage.php	Tue May 05 19:08:45 2009 -0400
@@ -460,12 +460,42 @@
       {
         // Image not found
         $this->exists = false;
+        $this->cdata = array(
+            'urlname' => $this->page_id,
+            'namespace' => $this->namespace,
+            'name' => 'Image not found',
+            'special' => 0,
+            'visible' => 0,
+            'comments_on' => 0,
+            'protected' => 0,
+            'delvotes' => 0,
+            'delvote_ips' => '',
+            'wiki_mode' => 0,
+            'page_exists' => false,
+            'page_format' => getConfig('default_page_format', 'wikitext')
+          );
       }
       else
       {
         $this->image_info = $db->fetchrow();
         $this->exists = true;
+        $this->cdata = array(
+            'urlname' => $this->page_id,
+            'namespace' => $this->namespace,
+            'name' => $this->image_info['img_title'],
+            'special' => 1,
+            'visible' => 1,
+            'comments_on' => 1,
+            'protected' => 0,
+            'delvotes' => 0,
+            'delvote_ips' => '',
+            'wiki_mode' => 0,
+            'page_exists' => true,
+            'page_format' => getConfig('default_page_format', 'wikitext')
+          );
       }
+      $this->title =& $this->cdata['name'];
+      $this->cdata = Namespace_Default::bake_cdata($this->cdata);
       
       $db->free_result();
     }