TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

March 28, 2024, 08:53:26 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,104
  • Total Topics: 21,212
  • Online today: 212
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 207
  • Total: 208
  • illori

Articles and comments

Started by kohai.raul, June 17, 2015, 06:09:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kohai.raul

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,


kohai.raul

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)