In template fileList add a td on line 83:
_tpl_vars['rid']; ?>
" style="text-align:right">_tpl_vars['f']['counter']; ?>
In template fileList add a td on line 99:
_tpl_vars['rid']; ?>
">
Add the following logic in lib/modules/default/files.inc.php on line 402:
$filec=$finfo[$num];
$filec['counter']=$finfo[$num]['counter']+1;
app()->db->update('files',$filec,array('id' => $finfo[$num]['id']),array('counter'));
The above code is wrong. Why are you modifying the templates_c files???? It's INSANE!
Please modify the fileList.tpl file in templates/default and simply add a column in the html table (also add the header).
{$f.counter}
Last edit: Alessandro Briosi 2014-05-02
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
you'll need to implement a plugin to do this.
Here is the code ( by Alessandro )
Add a integer column, counter, in the file table.
In template fileList add a th on line 25:
_tag_stack[] = array('tr', array()); $_block_repeat=true;smarty_block_tr($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);while ($_block_repeat) { ob_start(); ?>Downloads
In template fileList add a td on line 83:
_tpl_vars['rid']; ?>
" style="text-align:right">_tpl_vars['f']['counter']; ?>
In template fileList add a td on line 99:
_tpl_vars['rid']; ?>
">
Add the following logic in lib/modules/default/files.inc.php on line 402:
_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat); } array_pop($this->_tag_stack); ?>$filec=$finfo[$num];
$filec['counter']=$finfo[$num]['counter']+1;
app()->db->update('files',$filec,array('id' => $finfo[$num]['id']),array('counter'));
The above code is wrong. Why are you modifying the templates_c files???? It's INSANE!
{$f.counter}Please modify the fileList.tpl file in templates/default and simply add a column in the html table (also add the header).
Last edit: Alessandro Briosi 2014-05-02