OSDN Git Service

NP_PubMed v 0.2.1
[nucleus-jp/nucleus-plugins.git] / trunk / NP_ShowBlogs / NP_ShowBlogs.php
index 2b2c4b1..5d65cf5 100644 (file)
  * @author    Original Author nakahara21
  * @copyright 2005-2006 nakahara21
  * @license   http://www.gnu.org/licenses/gpl.txt  GNU GENERAL PUBLIC LICENSE Version 2, June 1991
- * @version   2.66.2
+ * @version   2.71
  * @link      http://japan.nucleuscms.org/wiki/plugins:showblogs
  *
+ * 2.71     fix typo
  * 2.7      add doIf function requier Nucleus version 3.3 or later
  *              ex. <%ifnot(ShowBlogs,page)%>top page contents<%else%>other pages contents<%endif%>
  *              ex. <%if(ShowBlogs,cstik|bmode|stick|amont|tmplt,1|all|23|5|myTemplate)%><%endif%>
@@ -109,8 +110,8 @@ class NP_ShowBlogs extends NucleusPlugin
                $this->createOption('ads',           _ADCODE_1,   'textarea', '' . "\n");
                $this->createOption('ads2',          _ADCODE_2,   'textarea', '' . "\n");
                $this->createOption('tagMode',       _TAG_MODE,   'select',   '2', _TAG_SELECT);
-               $this->createBlogOption('prevLabel', _SB_NEXTL,   'text',     'Next&raquo;');
-               $this->createBlogOption('nextLabel', _SB_PREVL,   'text',     '&laquo;Prev');
+               $this->createBlogOption('nextLabel', _SB_NEXTL,   'text',     'Next&raquo;');
+               $this->createBlogOption('prevLabel', _SB_PREVL,   'text',     '&laquo;Prev');
 /* todo can't install ? only warning ?
  * douyatte 'desc' ni keikoku wo daseba iinoka wakaranai desu
                $ver_min = (getNucleusVersion() < $this->getMinNucleusVersion());
@@ -683,8 +684,8 @@ class NP_ShowBlogs extends NucleusPlugin
                if ($page_str == 'page_') {
                        $lastpagelink .= '.html';
                }
-               $nextLinkLabel = $this->BloggetOption($this->nowbid, 'nextLabel');
-               $prevLinkLabel = $this->BloggetOption($this->nowbid, 'prevLabel');
+               $nextLinkLabel = $this->getBlogOption($this->nowbid, 'nextLabel') ? $this->getBlogOption($this->nowbid, 'nextLabel') : 'Next&raquo;';
+               $prevLinkLabel = $this->getBlogOption($this->nowbid, 'prevLabel') ? $this->getBlogOption($this->nowbid, 'prevLabel') : '&laquo;Prev';
 
                if ($type >= 1) {
                        $buf .= '<div class="pageswitch">' . "\n";
@@ -759,9 +760,9 @@ class NP_ShowBlogs extends NucleusPlugin
                                        $nextpagelink .= '.html';
                                }
                                $buf .= '| <a href="' . $nextpagelink . '" title="Next page" rel="Next">'
-                                         . '<span class="npsb_nextlink">' . $prevLinkLabel . '</span></a>' . "\n";
+                                         . '<span class="npsb_nextlink">' . $nextLinkLabel . '</span></a>' . "\n";
                        } elseif ($type >= 2) {
-                               $buf .= "| {$prevLinkLabel}\n";
+                               $buf .= "| " . $nextLinkLabel . "\n";
                        }
 //                     $buf .= " | <a rel=\"last\" title=\"Last page\" href=\"{$lastpagelink}\">&lt;LAST&gt;</a>\n";
                        $buf .= "</div>\n";