function getURL()
{
- return 'http://nakahara21.com';
+ return 'http://nakahara21.com/';
}
function getVersion()
}
if ($skinType == 'archive') {
- sscanf($archive,'%04d-%02d-%02d', $y, $m, $d);
+ sscanf($archive,'%d-%d-%d', $y, $m, $d);
//store ArchiveMonth
$archiveMonth = $y . '-' . $m;
$naviUnit[] = array(
$res = sql_query($query);
if ($ares = mysql_fetch_row($res)) {
// $prev_date = $ares[0];
- sscanf($ares[0],'%d-%d-%d', $y, $m, $d);
- $prev_date = sprintf('%04d-%02d-%02d', $y, $m, $d);
+ sscanf($ares[0], '%d-%d-%d', $y, $m, $d);
+ if (empty($d)) {
+ $prev_date = sprintf('%04d-%02d', $y, $m);
+ } else {
+ $prev_date = sprintf('%04d-%02d-%02d', $y, $m, $d);
+ }
$prev_alink = createArchiveLink($blogid, $prev_date, $this->linkparams);
$subNaviUnit[1] = '<a href="' . htmlspecialchars($prev_alink) . '" class="prevlink" rel="prev">' .
' « ' . htmlspecialchars($prev_date) . '</a>';
if ($ares = mysql_fetch_row($res)) {
// $next_date = $ares[0];
sscanf($ares[0],'%d-%d-%d', $y, $m, $d);
- $next_date = sprintf('%04d-%02d-%02d', $y, $m, $d);
+ if (empty($d)) {
+ $next_date = sprintf('%04d-%02d', $y, $m);
+ } else {
+ $next_date = sprintf('%04d-%02d-%02d', $y, $m, $d);
+ }
$next_alink = createArchiveLink($blogid, $next_date, $this->linkparams);
$subNaviUnit[2] = '<a href="' . htmlspecialchars($next_alink) . '" class="nextlink" rel="next">'
. htmlspecialchars($next_date) . ' »</a>';
}
for ($i=0;$i<count($reqTags);$i++) {
$tag = trim($reqTags[$i]);
- $taglist[$i] = '<a href="' .
- $tagPlugin->creatTagLink($tag, 0) .
- '" title="' . htmlspecialchars($tag) .
- '">' .
- htmlspecialchars($tag) .
- '</a>';
+ $taglist[$i] = '<a href="' . $tagPlugin->creatTagLink($tag, 0) . '">'
+ . htmlspecialchars($tag) . '</a>';
}
echo ' <small style="font-family:Tahoma;">';
// echo ' (Tag for "'.$tagPlugin->_rawdecode(requestVar('tag')).'")';
}
- function getParenta($subcat_id, $blogid = 0)
+ function getParenta($subcat_id, $blogid=0)
{
- global $manager;
$subcat_id = intval($subcat_id);
$blogid = intval($blogid);
$r = array();
- $mplugin =& $manager->getPlugin('NP_MultipleCategories');
- $subrequest = $mplugin->getRequestName(array());
$que = 'SELECT scatid, parentid, sname, catid FROM %s WHERE scatid = %d';
$res = sql_query(sprintf($que, sql_table('plug_multiple_categories_sub'), $subcat_id));
list ($sid, $parent, $sname, $cat_id) = mysql_fetch_row($res);
if (intval($parent) != 0) {
$this->r[] = $this->getParenta(intval($parent), $blogid);
- $this->linkparams[$subrequest] = $sid;
+ $this->linkparams[subcatid] = $sid;
$r = array(
0 => $sname,
1 => createBlogidLink($blogid, $this->linkparams),
2 => createArchiveListLink($blogid, $this->linkparams)
);
}else{
- $this->linkparams[$subrequest] = $sid;
+ $this->linkparams[subcatid] = $sid;
$r = array(
0 => $sname,
1 => createBlogidLink($blogid, $this->linkparams),
return $r;
}
-/* function getParent($subcat_id)
+ function getParent($subcat_id)
{
$subcat_id = intval($subcat_id);
$que = 'SELECT scatid, parentid, sname FROM %s WHERE scatid = %d';
$r = "<a href=$subcat_id>" . htmlspecialchars($sname) . "</a>";
}
return $r;
- }*/
+ }
function getChildren($subcat_id)
{
$subcat_id = intval($subcat_id);
- $que = 'SELECT scatid, parentid, sname FROM %s WHERE scatid = %d';
+ $que = 'SELECT scatid, parentid, sname FROM %s WHERE parentid = %d';
$res = sql_query(sprintf($que, sql_table('plug_multiple_categories_sub'), $subcat_id));
while ($so = mysql_fetch_object($res)) {
$r .= $this->getChildren($so->scatid) . '/' . intval($so->scatid);
}
}
-?>
\ No newline at end of file
+?>