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:
parent
3f0c9bf8a1
commit
13dc0b6cb4
@ -64,7 +64,8 @@
|
|||||||
$params['count'] = isset($_REQUEST['count'])? $_REQUEST['count'] : $defcount;
|
$params['count'] = isset($_REQUEST['count'])? $_REQUEST['count'] : $defcount;
|
||||||
$params['page'] = isset($_REQUEST['paged'])? $_REQUEST['paged'] : 1;
|
$params['page'] = isset($_REQUEST['paged'])? $_REQUEST['paged'] : 1;
|
||||||
isset($_REQUEST['category'])? $params['category'] = $_REQUEST['category'] : $params['category'] = 'all';
|
isset($_REQUEST['category'])? $params['category'] = $_REQUEST['category'] : $params['category'] = 'all';
|
||||||
$params['fullparse']=true;
|
$params['fullparse']=false;
|
||||||
|
$params['comments']=true;
|
||||||
$fpdb->query($params);
|
$fpdb->query($params);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -45,13 +45,13 @@
|
|||||||
<thead><tr>{*<th>{$panelstrings.sel}</th>*}
|
<thead><tr>{*<th>{$panelstrings.sel}</th>*}
|
||||||
<th>{$panelstrings.date}</th>
|
<th>{$panelstrings.date}</th>
|
||||||
<th class="main-cell">{$panelstrings.title}</th>
|
<th class="main-cell">{$panelstrings.title}</th>
|
||||||
<th>{$panelstrings.author}</th>
|
<!-- <th>{$panelstrings.author}</th> -->
|
||||||
<th>{$panelstrings.comms}</th>
|
<th>{$panelstrings.comms}</th>
|
||||||
<th>{$panelstrings.action}</th></tr></thead>
|
<th>{$panelstrings.action}</th></tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{entry}
|
{entry}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{$date|date_format:"%D, %T"}</td>
|
<td>{$id|entry_idtotime|date_format:"%D, %T"}</td>
|
||||||
<td class="main-cell">
|
<td class="main-cell">
|
||||||
{if in_array('draft',$categories)}
|
{if in_array('draft',$categories)}
|
||||||
(<em class="entry-flag">{$lang.entry.flags.short.draft}</em>)
|
(<em class="entry-flag">{$lang.entry.flags.short.draft}</em>)
|
||||||
@ -61,7 +61,7 @@ href="{$panel_url|action_link:write}&entry={$id}">
|
|||||||
{$subject|truncate:70}
|
{$subject|truncate:70}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>{$author}</td>
|
<!-- <td>{$author}</td> -->
|
||||||
<td><a class="link-general"
|
<td><a class="link-general"
|
||||||
href="{$panel_url|action_link:commentlist}&entry={$id}">
|
href="{$panel_url|action_link:commentlist}&entry={$id}">
|
||||||
{* Compatibility with pre-0.702 *}
|
{* Compatibility with pre-0.702 *}
|
||||||
|
@ -151,4 +151,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -359,6 +359,11 @@
|
|||||||
return date('ymdHis', $time);
|
return date('ymdHis', $time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function entry_idtotime($id) {
|
||||||
|
$date = date_from_id($id);
|
||||||
|
return $date['time'];
|
||||||
|
}
|
||||||
|
|
||||||
function entry_list() {
|
function entry_list() {
|
||||||
|
|
||||||
trigger_error('function deprecated', E_USER_ERROR);
|
trigger_error('function deprecated', E_USER_ERROR);
|
||||||
|
@ -74,7 +74,13 @@
|
|||||||
//$this->_listFiles($this->_directory);
|
//$this->_listFiles($this->_directory);
|
||||||
return $this->_list;
|
return $this->_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function count() {
|
||||||
|
if (!isset ($this->count))
|
||||||
|
$this->count = count($this->_list);
|
||||||
|
return $this->count;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class fs_pathlister extends fs_filelister {
|
class fs_pathlister extends fs_filelister {
|
||||||
|
@ -50,11 +50,16 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($params['fullparse'])) {
|
if (isset($params['fullparse'])) {
|
||||||
|
|
||||||
$this->fullparse =
|
$this->fullparse =
|
||||||
is_string($params['fullparse'])?
|
is_string($params['fullparse'])?
|
||||||
($params['fullparse'] != 'false')
|
($params['fullparse'] != 'false')
|
||||||
:
|
:
|
||||||
$params['fullparse'];
|
$params['fullparse'];
|
||||||
|
|
||||||
|
if ($this->fullparse)
|
||||||
|
$this->comments = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -105,6 +110,10 @@
|
|||||||
if (isset($params['category'])) {
|
if (isset($params['category'])) {
|
||||||
$this->category = intval($params['category']);
|
$this->category = intval($params['category']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($params['comments'])) {
|
||||||
|
$this->comments = true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -350,12 +359,6 @@
|
|||||||
|
|
||||||
$cont = entry_parse($id);
|
$cont = entry_parse($id);
|
||||||
|
|
||||||
if ($cont) {
|
|
||||||
$this->comments =& new FPDB_CommentList($id, comment_getlist($id));
|
|
||||||
|
|
||||||
$cont['comments'] = $this->comments->getCount();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@ -363,10 +366,17 @@
|
|||||||
$cont = array('subject' => $this->walker->current_value());
|
$cont = array('subject' => $this->walker->current_value());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
$post['id'] = $id;
|
||||||
|
|
||||||
$var = array(&$id, &$cont);
|
$var = array(&$id, &$cont);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user