Phoca dowload plugin filelist 获取文件创建时间

Phoca dowload plugin filelist 获取文件创建时间

./plugins/content/phocadownload/phocadownload.php
找到case 'filelist':
$query = 'SELECT a.id, a.title,a.date, a.alias, a.filename_play, a.filename_preview, a.link_external, c.id as catid, a.confirm_license, c.title as cattitle, c.alias as catalias,'
                        . ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\':\', a.id, a.alias) ELSE a.id END as slug,'
                        . ' CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(\':\', c.id, c.alias) ELSE c.id END as catslug'
                        . ' FROM #__phocadownload AS a'
                        . ' LEFT JOIN #__phocadownload_categories AS c ON a.catid = c.id';
在查询语句中添加a.date,date这个字段需要确定数据库中记录文件上传的时间字段名
约278行:
$output .= '<div class="phocadownloadfilelist'.(int)$iSize.'"><a href="'. JRoute::_($link).'" '.$targetOutput.'>'.$textOutput.'('.date("d F Y",strtotime(($item->date))).')'.'</a></div>';
添加:'('.date("d F Y",strtotime(($item->date))).')'

 

 

提交评论

安全码
刷新

附加信息