allowing quick parsing to display comment count, in order to list entries quickly; changed admin panel accordingly (no author column anymore)

This commit is contained in:
real_nowhereman 2008-09-08 09:06:54 +00:00
parent 3f0c9bf8a1
commit 13dc0b6cb4
6 changed files with 36 additions and 14 deletions

View File

@ -64,7 +64,8 @@
$params['count'] = isset($_REQUEST['count'])? $_REQUEST['count'] : $defcount;
$params['page'] = isset($_REQUEST['paged'])? $_REQUEST['paged'] : 1;
isset($_REQUEST['category'])? $params['category'] = $_REQUEST['category'] : $params['category'] = 'all';
$params['fullparse']=true;
$params['fullparse']=false;
$params['comments']=true;
$fpdb->query($params);
return 0;

View File

@ -45,13 +45,13 @@
<thead><tr>{*<th>{$panelstrings.sel}</th>*}
<th>{$panelstrings.date}</th>
<th class="main-cell">{$panelstrings.title}</th>
<th>{$panelstrings.author}</th>
<!-- <th>{$panelstrings.author}</th> -->
<th>{$panelstrings.comms}</th>
<th>{$panelstrings.action}</th></tr></thead>
<tbody>
{entry}
<tr>
<td>{$date|date_format:"%D, %T"}</td>
<td>{$id|entry_idtotime|date_format:"%D, %T"}</td>
<td class="main-cell">
{if in_array('draft',$categories)}
(<em class="entry-flag">{$lang.entry.flags.short.draft}</em>)
@ -61,7 +61,7 @@ href="{$panel_url|action_link:write}&amp;entry={$id}">
{$subject|truncate:70}
</a>
</td>
<td>{$author}</td>
<!-- <td>{$author}</td> -->
<td><a class="link-general"
href="{$panel_url|action_link:commentlist}&amp;entry={$id}">
{* Compatibility with pre-0.702 *}

View File

@ -359,6 +359,11 @@
return date('ymdHis', $time);
}
function entry_idtotime($id) {
$date = date_from_id($id);
return $date['time'];
}
function entry_list() {
trigger_error('function deprecated', E_USER_ERROR);

View File

@ -75,6 +75,12 @@
return $this->_list;
}
function count() {
if (!isset ($this->count))
$this->count = count($this->_list);
return $this->count;
}
}
class fs_pathlister extends fs_filelister {

View File

@ -50,11 +50,16 @@
}
if (isset($params['fullparse'])) {
$this->fullparse =
is_string($params['fullparse'])?
($params['fullparse'] != 'false')
:
$params['fullparse'];
if ($this->fullparse)
$this->comments = true;
}
@ -106,6 +111,10 @@
$this->category = intval($params['category']);
}
if (isset($params['comments'])) {
$this->comments = true;
}
}
function parse_string($str) {
@ -350,12 +359,6 @@
$cont = entry_parse($id);
if ($cont) {
$this->comments =& new FPDB_CommentList($id, comment_getlist($id));
$cont['comments'] = $this->comments->getCount();
}
} else {
@ -364,9 +367,16 @@
}
if (!$cont) {
return false;
}
if ($qp->comments) {
$this->comments =& new FPDB_CommentList($id, comment_getlist($id));
$cont['comments'] = $this->comments->getCount();
}
$post = $cont;
$post =& $cont;
$post['id'] = $id;
$var = array(&$id, &$cont);