Show Views on viewtopic

Shows the number of topic views next to the pagination info

Requested by NguyTieuNhan in this topic.

#
#-----[ OPEN ]------------------------------------------
#
language/en/viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
       'VIEW_TOPIC_POSTS'      => '%d posts',
#-----[ AFTER ADD ]------------------------------------------
#
       'VIEW_TOPIC_VIEW'      => '1 view',
       'VIEW_TOPIC_VIEWS'      => '%d views',
#
#-----[ OPEN ]------------------------------------------
#
styles/prosilver/template/viewtopic_body.html
#
#-----[ FIND ]------------------------------------------
#
    {TOTAL_POSTS}
#
#-----[ IN_LINE FIND ]------------------------------------------
#
    {TOTAL_POSTS}
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
    {TOTAL_VIEWS} • 

This find is option, if you also want the topic views to show at the bottom of the page

#
#-----[ FIND ]------------------------------------------
#
    {TOTAL_POSTS}
#
#-----[ IN_LINE FIND ]------------------------------------------
#
    {TOTAL_POSTS}
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
    {TOTAL_VIEWS} • 
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
        'TOTAL_POSTS'            => ($total_posts == 1) ? $user->lang['VIEW_TOPIC_POST'] : sprintf($user->lang['VIEW_TOPIC_POSTS'], $total_posts),     
#
#-----[ AFTER ADD ]------------------------------------------
#
        'TOTAL_VIEWS'            => ($topic_data['topic_views'] == 1) ? $user->lang['VIEW_TOPIC_VIEWS'] : sprintf($user->lang['VIEW_TOPIC_VIEWS'], $topic_data['topic_views']),