TinyPortal

Development => Feedback => Bugs/Errors => Topic started by: kohai.raul on June 17, 2015, 06:09:35 PM

Title: Articles and comments
Post by: kohai.raul on June 17, 2015, 06:09:35 PM
Hi all!

I'm testing comments on articles, but it seems there are some strange behaviours. 

by checking  "Allow comments" and "show comments underneath..." I don't get to see the comments when reading full article, nor the textarea to answer.

Instead, by seeing the list of articles on category's page (entering through the article header)  I can see the textarea to answer below the intro text.

Moreover, the captcha is not shown. I can see an input box and some messages that always shown "No definido aún" (Not defined yet).

How can I restrict comments visualisation and answering only when reading full article?

Best Regards,

Title: Re: Articles and comments
Post by: kohai.raul on June 18, 2015, 06:21:11 PM
Partially solved! you can to be sure that

Search into TPSubs.template.php
function article_comments($render = true)
{
global $scripturl, $txt, $settings, $context;

$code = '';

if(in_array('comments', $context['TPortal']['article']['visual_options'])


Add
&& $context['TPortal']['single_article']

Result must be
function article_comments($render = true)
{
global $scripturl, $txt, $settings, $context;

$code = '';

if(in_array('comments', $context['TPortal']['article']['visual_options']) && $context['TPortal']['single_article'])
{


Anyway, this is to be sure that comments and form will not be visible onto a category page.


By now, I'm trying to get a clear map about the difference between article-category's template and the template of a single article (I don't know where is it)