Question: you want to be able to see the word count for each post in phpBB3. How do you do that?
Answer: You need to edit two files in the phpBB3 code to get this to work. Read on.
We need to set up a variable called MESSAGE_ROW_COUNT, and display that in the template.
First of all, open /<phpbb3>/viewtopic.php and go to near line 1401. This is where the $postrow array is created.
$postrow = array(
// more code setting up $postrow elements
);
Somewhere in the middle, add this additional element:
'MESSAGE_WORD_COUNT' => str_word_count($message),
Then go to /styles/prosilver/template/ and go to line 189, and add this line:
<!-- IF postrow.POSTER_POSTS != '' --><dd><strong>Word Count:</strong> {postrow.MESSAGE_WORD_COUNT}</dd><!-- ENDIF -->
I put this in line 189, where it is just below the name and details of the person who posted the article. However, you may prefer to put it somewhere else.
0 Responses to “Viewing word count for topics in phpBB3”