CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Feature #13755

Comment count in lastest post widget

Added by Christian Hennecke about 2 years ago.

Status:New Start date:2011-03-10
Priority:Should have Due date:
Assignee:- % Done:

0%

Category:-
Target version:-
Votes: 0

Description

Could you please add the field comment_count to the latest post widget, too? The "Comments: x" string is too long for many designs.

This can be done by adding one comma and a line in pi1/widgets/latestPostNav/class.latestPostNav.php:

$data = array(
                    'title'=>t3blog_div::getSingle(array(
                            'text'        => $row['title'],
                            'uid'        => $row['uid'],
                            'author'    => t3blog_div::getAuthorByUid($row['author']),
                            'lll:author'    => $this->pi_getLL('author'),
                            'date'        => $row['date'],
                            'blogUid'    => t3blog_div::getBlogPid(),
                            'comments'    => $this->pi_getLL('comments').t3blog_db::getNumberOfCommentsByPostUid($row['uid']),
                            'comment_count' => t3blog_db::getNumberOfCommentsByPostUid($row['uid'])
                        ),'link', $this->conf
                    ),
                    'blogUid'    => t3blog_div::getBlogPid(),
                    'contentUids' => implode(',', $contentUidArray),
                    'date'=> $row['date'],
                    'text'=> $row['text'],
                    'uid'=> $row['uid'],
                    'pid' => $row['pid']
                );

Also available in: Atom PDF