Nucleus CMS日本語版用プラグインのうち、日本語版開発者がサポートしているもの
Revision | bf5861ea45f766eea106c1051d20d34e1730a943 (tree) |
---|---|
Time | 2006-10-05 23:30:35 |
Author | shizuki <shizuki@1ca2...> |
Commiter | shizuki |
bug fix
コピペミス orz
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@422 1ca29b6e-896d-4ea0-84a5-967f57386b96
@@ -40,7 +40,7 @@ class NP_ItemNaviEX extends NucleusPlugin | ||
40 | 40 | |
41 | 41 | function getURL() |
42 | 42 | { |
43 | - return 'http://nakahara21.com'; | |
43 | + return 'http://nakahara21.com/'; | |
44 | 44 | } |
45 | 45 | |
46 | 46 | function getVersion() |
@@ -297,7 +297,7 @@ class NP_ItemNaviEX extends NucleusPlugin | ||
297 | 297 | } |
298 | 298 | |
299 | 299 | if ($skinType == 'archive') { |
300 | - sscanf($archive,'%04d-%02d-%02d', $y, $m, $d); | |
300 | + sscanf($archive,'%d-%d-%d', $y, $m, $d); | |
301 | 301 | //store ArchiveMonth |
302 | 302 | $archiveMonth = $y . '-' . $m; |
303 | 303 | $naviUnit[] = array( |
@@ -329,8 +329,12 @@ class NP_ItemNaviEX extends NucleusPlugin | ||
329 | 329 | $res = sql_query($query); |
330 | 330 | if ($ares = mysql_fetch_row($res)) { |
331 | 331 | // $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 | + } | |
334 | 338 | $prev_alink = createArchiveLink($blogid, $prev_date, $this->linkparams); |
335 | 339 | $subNaviUnit[1] = '<a href="' . htmlspecialchars($prev_alink) . '" class="prevlink" rel="prev">' . |
336 | 340 | ' « ' . htmlspecialchars($prev_date) . '</a>'; |
@@ -352,7 +356,11 @@ class NP_ItemNaviEX extends NucleusPlugin | ||
352 | 356 | if ($ares = mysql_fetch_row($res)) { |
353 | 357 | // $next_date = $ares[0]; |
354 | 358 | 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 | + } | |
356 | 364 | $next_alink = createArchiveLink($blogid, $next_date, $this->linkparams); |
357 | 365 | $subNaviUnit[2] = '<a href="' . htmlspecialchars($next_alink) . '" class="nextlink" rel="next">' |
358 | 366 | . htmlspecialchars($next_date) . ' »</a>'; |
@@ -401,12 +409,8 @@ class NP_ItemNaviEX extends NucleusPlugin | ||
401 | 409 | } |
402 | 410 | for ($i=0;$i<count($reqTags);$i++) { |
403 | 411 | $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>'; | |
410 | 414 | } |
411 | 415 | echo ' <small style="font-family:Tahoma;">'; |
412 | 416 | // echo ' (Tag for "'.$tagPlugin->_rawdecode(requestVar('tag')).'")'; |
@@ -419,27 +423,24 @@ class NP_ItemNaviEX extends NucleusPlugin | ||
419 | 423 | |
420 | 424 | } |
421 | 425 | |
422 | - function getParenta($subcat_id, $blogid = 0) | |
426 | + function getParenta($subcat_id, $blogid=0) | |
423 | 427 | { |
424 | - global $manager; | |
425 | 428 | $subcat_id = intval($subcat_id); |
426 | 429 | $blogid = intval($blogid); |
427 | 430 | $r = array(); |
428 | - $mplugin =& $manager->getPlugin('NP_MultipleCategories'); | |
429 | - $subrequest = $mplugin->getRequestName(array()); | |
430 | 431 | $que = 'SELECT scatid, parentid, sname, catid FROM %s WHERE scatid = %d'; |
431 | 432 | $res = sql_query(sprintf($que, sql_table('plug_multiple_categories_sub'), $subcat_id)); |
432 | 433 | list ($sid, $parent, $sname, $cat_id) = mysql_fetch_row($res); |
433 | 434 | if (intval($parent) != 0) { |
434 | 435 | $this->r[] = $this->getParenta(intval($parent), $blogid); |
435 | - $this->linkparams[$subrequest] = $sid; | |
436 | + $this->linkparams[subcatid] = $sid; | |
436 | 437 | $r = array( |
437 | 438 | 0 => $sname, |
438 | 439 | 1 => createBlogidLink($blogid, $this->linkparams), |
439 | 440 | 2 => createArchiveListLink($blogid, $this->linkparams) |
440 | 441 | ); |
441 | 442 | }else{ |
442 | - $this->linkparams[$subrequest] = $sid; | |
443 | + $this->linkparams[subcatid] = $sid; | |
443 | 444 | $r = array( |
444 | 445 | 0 => $sname, |
445 | 446 | 1 => createBlogidLink($blogid, $this->linkparams), |
@@ -449,7 +450,7 @@ class NP_ItemNaviEX extends NucleusPlugin | ||
449 | 450 | return $r; |
450 | 451 | } |
451 | 452 | |
452 | -/* function getParent($subcat_id) | |
453 | + function getParent($subcat_id) | |
453 | 454 | { |
454 | 455 | $subcat_id = intval($subcat_id); |
455 | 456 | $que = 'SELECT scatid, parentid, sname FROM %s WHERE scatid = %d'; |
@@ -461,12 +462,12 @@ class NP_ItemNaviEX extends NucleusPlugin | ||
461 | 462 | $r = "<a href=$subcat_id>" . htmlspecialchars($sname) . "</a>"; |
462 | 463 | } |
463 | 464 | return $r; |
464 | - }*/ | |
465 | + } | |
465 | 466 | |
466 | 467 | function getChildren($subcat_id) |
467 | 468 | { |
468 | 469 | $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'; | |
470 | 471 | $res = sql_query(sprintf($que, sql_table('plug_multiple_categories_sub'), $subcat_id)); |
471 | 472 | while ($so = mysql_fetch_object($res)) { |
472 | 473 | $r .= $this->getChildren($so->scatid) . '/' . intval($so->scatid); |
@@ -475,4 +476,4 @@ class NP_ItemNaviEX extends NucleusPlugin | ||
475 | 476 | } |
476 | 477 | |
477 | 478 | } |
478 | -?> | |
\ No newline at end of file | ||
479 | +?> |
@@ -1085,6 +1085,7 @@ tagIndexSeparator | ||
1085 | 1085 | $linkparams['catid'] = intval($catid); |
1086 | 1086 | } |
1087 | 1087 | if ($subcatid) { |
1088 | + $mplugin = $manager->getPlugin('NP_MultipleCategories'); | |
1088 | 1089 | $subrequest = $mplugin->getRequestName(array()); |
1089 | 1090 | $linkparams[$subrequest] = intval($subcatid); |
1090 | 1091 | } |