• R/O
  • HTTP
  • SSH
  • HTTPS

nucleus-plugins: Commit

Nucleus CMS日本語版用プラグインのうち、日本語版開発者がサポートしているもの


Commit MetaInfo

Revisionbf5861ea45f766eea106c1051d20d34e1730a943 (tree)
Time2006-10-05 23:30:35
Authorshizuki <shizuki@1ca2...>
Commitershizuki

Log Message

bug fix
コピペミス orz

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@422 1ca29b6e-896d-4ea0-84a5-967f57386b96

Change Summary

Incremental Difference

--- a/trunk/NP_ItemNaviEX/NP_ItemNaviEX.php
+++ b/trunk/NP_ItemNaviEX/NP_ItemNaviEX.php
@@ -40,7 +40,7 @@ class NP_ItemNaviEX extends NucleusPlugin
4040
4141 function getURL()
4242 {
43- return 'http://nakahara21.com';
43+ return 'http://nakahara21.com/';
4444 }
4545
4646 function getVersion()
@@ -297,7 +297,7 @@ class NP_ItemNaviEX extends NucleusPlugin
297297 }
298298
299299 if ($skinType == 'archive') {
300- sscanf($archive,'%04d-%02d-%02d', $y, $m, $d);
300+ sscanf($archive,'%d-%d-%d', $y, $m, $d);
301301 //store ArchiveMonth
302302 $archiveMonth = $y . '-' . $m;
303303 $naviUnit[] = array(
@@ -329,8 +329,12 @@ class NP_ItemNaviEX extends NucleusPlugin
329329 $res = sql_query($query);
330330 if ($ares = mysql_fetch_row($res)) {
331331 // $prev_date = $ares[0];
332- sscanf($ares[0],'%d-%d-%d', $y, $m, $d);
333- $prev_date = sprintf('%04d-%02d-%02d', $y, $m, $d);
332+ sscanf($ares[0], '%d-%d-%d', $y, $m, $d);
333+ if (empty($d)) {
334+ $prev_date = sprintf('%04d-%02d', $y, $m);
335+ } else {
336+ $prev_date = sprintf('%04d-%02d-%02d', $y, $m, $d);
337+ }
334338 $prev_alink = createArchiveLink($blogid, $prev_date, $this->linkparams);
335339 $subNaviUnit[1] = '<a href="' . htmlspecialchars($prev_alink) . '" class="prevlink" rel="prev">' .
336340 ' &laquo; ' . htmlspecialchars($prev_date) . '</a>';
@@ -352,7 +356,11 @@ class NP_ItemNaviEX extends NucleusPlugin
352356 if ($ares = mysql_fetch_row($res)) {
353357 // $next_date = $ares[0];
354358 sscanf($ares[0],'%d-%d-%d', $y, $m, $d);
355- $next_date = sprintf('%04d-%02d-%02d', $y, $m, $d);
359+ if (empty($d)) {
360+ $next_date = sprintf('%04d-%02d', $y, $m);
361+ } else {
362+ $next_date = sprintf('%04d-%02d-%02d', $y, $m, $d);
363+ }
356364 $next_alink = createArchiveLink($blogid, $next_date, $this->linkparams);
357365 $subNaviUnit[2] = '<a href="' . htmlspecialchars($next_alink) . '" class="nextlink" rel="next">'
358366 . htmlspecialchars($next_date) . ' &raquo;</a>';
@@ -401,12 +409,8 @@ class NP_ItemNaviEX extends NucleusPlugin
401409 }
402410 for ($i=0;$i<count($reqTags);$i++) {
403411 $tag = trim($reqTags[$i]);
404- $taglist[$i] = '<a href="' .
405- $tagPlugin->creatTagLink($tag, 0) .
406- '" title="' . htmlspecialchars($tag) .
407- '">' .
408- htmlspecialchars($tag) .
409- '</a>';
412+ $taglist[$i] = '<a href="' . $tagPlugin->creatTagLink($tag, 0) . '">'
413+ . htmlspecialchars($tag) . '</a>';
410414 }
411415 echo ' <small style="font-family:Tahoma;">';
412416 // echo ' (Tag for "'.$tagPlugin->_rawdecode(requestVar('tag')).'")';
@@ -419,27 +423,24 @@ class NP_ItemNaviEX extends NucleusPlugin
419423
420424 }
421425
422- function getParenta($subcat_id, $blogid = 0)
426+ function getParenta($subcat_id, $blogid=0)
423427 {
424- global $manager;
425428 $subcat_id = intval($subcat_id);
426429 $blogid = intval($blogid);
427430 $r = array();
428- $mplugin =& $manager->getPlugin('NP_MultipleCategories');
429- $subrequest = $mplugin->getRequestName(array());
430431 $que = 'SELECT scatid, parentid, sname, catid FROM %s WHERE scatid = %d';
431432 $res = sql_query(sprintf($que, sql_table('plug_multiple_categories_sub'), $subcat_id));
432433 list ($sid, $parent, $sname, $cat_id) = mysql_fetch_row($res);
433434 if (intval($parent) != 0) {
434435 $this->r[] = $this->getParenta(intval($parent), $blogid);
435- $this->linkparams[$subrequest] = $sid;
436+ $this->linkparams[subcatid] = $sid;
436437 $r = array(
437438 0 => $sname,
438439 1 => createBlogidLink($blogid, $this->linkparams),
439440 2 => createArchiveListLink($blogid, $this->linkparams)
440441 );
441442 }else{
442- $this->linkparams[$subrequest] = $sid;
443+ $this->linkparams[subcatid] = $sid;
443444 $r = array(
444445 0 => $sname,
445446 1 => createBlogidLink($blogid, $this->linkparams),
@@ -449,7 +450,7 @@ class NP_ItemNaviEX extends NucleusPlugin
449450 return $r;
450451 }
451452
452-/* function getParent($subcat_id)
453+ function getParent($subcat_id)
453454 {
454455 $subcat_id = intval($subcat_id);
455456 $que = 'SELECT scatid, parentid, sname FROM %s WHERE scatid = %d';
@@ -461,12 +462,12 @@ class NP_ItemNaviEX extends NucleusPlugin
461462 $r = "<a href=$subcat_id>" . htmlspecialchars($sname) . "</a>";
462463 }
463464 return $r;
464- }*/
465+ }
465466
466467 function getChildren($subcat_id)
467468 {
468469 $subcat_id = intval($subcat_id);
469- $que = 'SELECT scatid, parentid, sname FROM %s WHERE scatid = %d';
470+ $que = 'SELECT scatid, parentid, sname FROM %s WHERE parentid = %d';
470471 $res = sql_query(sprintf($que, sql_table('plug_multiple_categories_sub'), $subcat_id));
471472 while ($so = mysql_fetch_object($res)) {
472473 $r .= $this->getChildren($so->scatid) . '/' . intval($so->scatid);
@@ -475,4 +476,4 @@ class NP_ItemNaviEX extends NucleusPlugin
475476 }
476477
477478 }
478-?>
\ No newline at end of file
479+?>
--- a/trunk/NP_TagEX/NP_TagEX.php
+++ b/trunk/NP_TagEX/NP_TagEX.php
@@ -1085,6 +1085,7 @@ tagIndexSeparator
10851085 $linkparams['catid'] = intval($catid);
10861086 }
10871087 if ($subcatid) {
1088+ $mplugin = $manager->getPlugin('NP_MultipleCategories');
10881089 $subrequest = $mplugin->getRequestName(array());
10891090 $linkparams[$subrequest] = intval($subcatid);
10901091 }
Show on old repository browser