From 32e74abbda0012b4099201b644f55883571e1f04 Mon Sep 17 00:00:00 2001 From: shizuki Date: Wed, 4 Feb 2009 06:12:49 +0000 Subject: [PATCH] git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@898 1ca29b6e-896d-4ea0-84a5-967f57386b96 --- .../branches/ver-06/NP_ArchiveListEX.php | 269 ++++++++++++++++++++ NP_ArchiveListEX/trunk/NP_ArchiveListEX.php | 275 +++++++-------------- NP_ArchiveListEX/trunk/sharedlibs/miniajax.js | 12 + 3 files changed, 376 insertions(+), 180 deletions(-) create mode 100644 NP_ArchiveListEX/branches/ver-06/NP_ArchiveListEX.php create mode 100644 NP_ArchiveListEX/trunk/sharedlibs/miniajax.js 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 '