OSDN Git Service

NP_TrimImage v2.4.1
authorhsur <hsur@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Thu, 11 Dec 2008 16:51:07 +0000 (16:51 +0000)
committerhsur <hsur@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Thu, 11 Dec 2008 16:51:07 +0000 (16:51 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@718 1ca29b6e-896d-4ea0-84a5-967f57386b96

trunk/NP_TrimImage/NP_TrimImage.php

index 441ebba..7bdbb7a 100644 (file)
@@ -2,10 +2,10 @@
 // vim: tabstop=2:shiftwidth=2\r
 \r
 /**\r
-  * NP_TrimImage ($Revision: 1.64 $)\r
+  * NP_TrimImage ($Revision: 1.67 $)\r
   * by nakahara21 ( http://nakahara21.com/ )\r
   * by hsur ( http://blog.cles.jp/np_cles/ )\r
-  * $Id: NP_TrimImage.php,v 1.64 2008/12/10 15:05:51 hsur Exp $\r
+  * $Id: NP_TrimImage.php,v 1.67 2008/12/11 07:06:43 hsur Exp $\r
   *\r
   * Based on NP_TrimImage 1.0 by nakahara21\r
   * http://nakahara21.com/?itemid=512\r
@@ -72,6 +72,7 @@
 //                     refactor listup(), exarray()\r
 //                     add $maxPerPage\r
 \r
+\r
 define('NP_TRIMIMAGE_FORCE_PASSTHRU', true); //passthru(standard)\r
 //define('NP_TRIMIMAGE_FORCE_PASSTHRU', false); //redirect(advanced)\r
 \r
@@ -96,7 +97,7 @@ class NP_TrimImage extends NucleusPlugin {
        }\r
 \r
        function getVersion() {\r
-               return '2.4.0';\r
+               return '2.4.1';\r
        }\r
 \r
        function supportsFeature($what) {\r
@@ -268,8 +269,8 @@ class NP_TrimImage extends NucleusPlugin {
                                $title = ($filelist[$i][2]) ? $filelist[$i][2] : $filelist[$i][4];\r
 \r
                        echo '<img src="'.$src.'"'                      \r
-                               . ( $wsize ? ' width="'.$wsize.'"'  : '' )\r
-                               . ( $hsize ? ' height="'.$hsize.'"' : '' )\r
+                               . ( $wsize ? ' width="'.$wsize.'" '  : '' )\r
+                               . ( $hsize ? ' height="'.$hsize.'" ' : '' )\r
                                . ' alt="'.htmlspecialchars($title, ENT_QUOTES)\r
                                . '" title="'.htmlspecialchars($title, ENT_QUOTES).'"/>';\r
                        echo "</a>\n";\r
@@ -377,7 +378,9 @@ class NP_TrimImage extends NucleusPlugin {
                $this->imglists = array ();\r
                $this->imgfilename = array ();\r
 \r
-               $q = 'SELECT ibody as body, imore as more, ititle as title FROM '.sql_table('item').' WHERE inumber='.intval($item->itemid);\r
+               $q  = 'SELECT inumber as itemid, ititle as title, ibody as body, iauthor, itime, imore as more, ';\r
+               $q .= 'icat as catid, iclosed as closed ';\r
+               $q .= 'FROM '.sql_table('item').' WHERE inumber='.intval($item->itemid);\r
                $r = sql_query($q);\r
                $it = mysql_fetch_object($r);\r
                $this->_parseItem($it, $maxAmount, $includeImg);\r
@@ -402,11 +405,11 @@ class NP_TrimImage extends NucleusPlugin {
                                        $title = ($img[4]) ? $img[4] : $img[2];\r
                                \r
                                echo '<img src="'.$src.'" '                     \r
-                                       . ( $wsize ? 'width="'.$wsize.'"'  : '' )\r
-                                       . ( $hsize ? 'height="'.$hsize.'"' : '' )\r
-                                       . 'alt="'.htmlspecialchars($title, ENT_QUOTES)\r
-                                       . '" title="'.htmlspecialchars($title, ENT_QUOTES).'"/>';\r
-                               }\r
+                                       . ( $wsize ? 'width="'.$wsize.'" '  : '' )\r
+                                       . ( $hsize ? 'height="'.$hsize.'" ' : '' )\r
+                                       . ' alt="'.htmlspecialchars($title, ENT_QUOTES)\r
+                                       . '" title="'.htmlspecialchars($title, ENT_QUOTES).'" />';\r
+                       }\r
                }\r
        }\r
 \r