News: Welcome to the TinyPortal Support site.

Login  |  Register
HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

October 18, 2019, 08:32:25 PM

Login with username, password and session length

Recent

Members
  • Total Members: 3756
  • Latest: Ocean
Stats
  • Total Posts: 189090
  • Total Topics: 20764
  • Online Today: 73
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 0
Guests: 31
Total: 31

Author Topic: Articles and comments  (Read 6680 times)

0 Members and 1 Guest are viewing this topic.

Offline kohai.raul

  • Jr. Member
  • **
  • Posts: 19
Articles and comments
« on: June 17, 2015, 11:09:35 AM »
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,


Offline kohai.raul

  • Jr. Member
  • **
  • Posts: 19
Re: Articles and comments
« Reply #1 on: June 18, 2015, 11:21:11 AM »
Partially solved! you can to be sure that

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

$code = '';

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

Add
Code: [Select]
&& $context['TPortal']['single_article']
Result must be
Code: [Select]
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)