From: shizuki Date: Wed, 4 Feb 2009 06:12:49 +0000 (+0000) Subject: git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@898 1ca29b6e-896d... X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=32e74abbda0012b4099201b644f55883571e1f04;p=nucleus-jp%2Fnucleus-plugins.git git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@898 1ca29b6e-896d-4ea0-84a5-967f57386b96 --- diff --git a/NP_ArchiveListEX/branches/ver-06/NP_ArchiveListEX.php b/NP_ArchiveListEX/branches/ver-06/NP_ArchiveListEX.php new file mode 100644 index 0000000..1bc45e8 --- /dev/null +++ b/NP_ArchiveListEX/branches/ver-06/NP_ArchiveListEX.php @@ -0,0 +1,269 @@ +[Required] template: name of the template to use
[Optional] mode: [month]shows an entry for each month , [day]shows an entry for each day
[Optional] limit: limits the amount of links shown (e.g. if you only want to show links to the past 3 months)

Usage1: <%ArchiveListEX(default)%> or <%ArchiveListEX(default,month)%> instead of <%archivelist(default)%>,
Usage2: <%ArchiveListEX(default,day,5)%> instead of <%archivedaylist(default,5)%>,
Usage3: <%ArchiveListEX(default,5)%>'; + } + + function doSkinVar($skinType, $template = 'default', $mode = 'month', $limit = 0) { + global $manager, $blog, $CONF, $catid, $itemid; + + $params = func_get_args(); + if ($params[1]){ $template = $params[1]; } + if ($params[2]){ + if ($params[2] == 'month' | $params[2] == 'day'){ $mode = $params[2]; } + else{ $limit = intval($params[2]); } + } + if ($params[3]){ $limit = intval($params[3]); } + + if ($blog) { + $b =& $blog; + } else { + $b =& $manager->getBlog($CONF['DefaultBlog']); + } + $blogid = $b->getID(); + + if ($catid) { + $this->linkparams = array('catid' => $catid); + } + +switch($skinType) { + case 'archivelist': + +//********************************************** +if($_REQUEST['mode'] == "remarks"){ + + $numberOfWritebacks = 50; // defaults to 50 + + // select + $query = "SELECT c.cnumber, c.cuser, c.cbody, c.citem, c.cmember, c.ctime ,UNIX_TIMESTAMP(c.ctime) as ctimest ,i.inumber, i.ititle + FROM nucleus_comment c ,nucleus_item i + WHERE c.citem = i.inumber + ORDER by ctime DESC + LIMIT 0,".$numberOfWritebacks; + + $comments = mysql_query($query); +// echo '