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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,027
  • Total Topics: 21,334
  • Online today: 519
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

Caused by Guest Comments ???

Started by wildenborch, September 15, 2015, 09:21:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wildenborch

Illori,

If you look at the "showcomments" functionality you will probably agree that it looks like that if you click on the article link you will be redirected to that specific comment. However, you are only redirected to the top of the article.

see example http://vanveen-nl.com/index.php?page=149#tp-comment

The link of the comment itself looks like:
http://vanveen-nl.com/index.php?page=151#comment225

To me it looks like something is not working as it should be.
Can you take a look at this?

Another issue in the comments listing is that the comment itself is missing.

I managed to include this in this listing by adding (in tpmodules.php) the var.value2

$request = $smcFunc['db_query']('', '
SELECT art.subject, memb.real_name as author, art.author_id as authorID, var.id, var.value1, var.value2, var.value3,
var.value5, var.value4, mem.real_name as realName,


and

'comment' => $row['value2'],

and in TPmodiles.template.php

</a><div class="smalltext"> ' , $mes['comment'] , '</div>


<tr class="windowbg' , $mes['is_read']==0 ? '3' : '2' , '">
<td><a href="'.$scripturl.'?page='.$mes['page'].'#tp-comment">' . $mes['subject'] . '
' , $mes['is_read']==0 ? ' <img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="" />' : '' , '
      </a><div class="smalltext"> ' , $mes['comment'] , '</div>
      </a><div class="smalltext"> ' , $mes['ID'] , '</div>
</td>
<td width="10%"><a href="'.$scripturl.'?action=profile;u='.$mes['authorID'].'">' . $mes['author'] . '</a></td>
<td width="25%">' . $mes['time'] . '</td>
<td width="10%"><a href="'.$scripturl.'?action=profile;u='.$mes['member_id'].'">' . $mes['membername'] . '</a></td>



Can you inform me if this is correct or not?


illori

no idea why it is giving you issues. it works for me. try the attached file. I did see the issue with the anchor, I  can look into that later.

I would recommend you revert your changes.

wildenborch

Illori,

I guess I did something wrong somewhere. I shall change all tpportal files with original ones and see what happens than.

Best regards

Fred

lurkalot

Quote from: wildenborch on September 15, 2015, 09:21:05 AM
I/m not sure if the following is also caused by the new functionality that guests can post comments but if I click the show latest comments in the USER block in the left menu I get the message Sorry, you are not allowed to comment

When, in the addressbar I type ?action=tpmod;sa=showcomments;showall
I see all comments. Without the ;showall i get te message Sorry, you are not allowed to comment.

BTW, it would be nice if this showall listing would also include a delete comment button (if logged in as admin!)

Best regards,
Fred

Rodebaert.nl
smf version 2.0.10
TP version 1.1
Default Forum Language is english
Browser Firefox
No mods installed

Strange, I never noticed this while testing, but you can see this exact behaviour here on this very site.

Look at the User block on the left of page, click the "Show latest comments" link

You see what you described http://www.tinyportal.net/index.php?action=tpmod;sa=showcomments

Remove the www from the address http://tinyportal.net/index.php?action=tpmod;sa=showcomments you get the correct result, but you appear not to be logged in.  :o




illori

2 different subdomains so being a guest is expected.

lurkalot

Quote from: illori on September 18, 2015, 07:41:06 PM
2 different subdomains so being a guest is expected.

Thanks Illori.  But hat I'm saying is it gives the correct result from the link like this.

But being logged in you just see "Sorry, you are not allowed to comment"

illori

strange, on my test install i cant duplicate the issue.

if i cant duplicate it i cant try to fix it.

lurkalot

Quote from: illori on September 18, 2015, 09:10:38 PM
strange, on my test install i cant duplicate the issue.

if i cant duplicate it i cant try to fix it.

Illori, I agree it's strange.  I can replicate it on my local install, and here on tinyportal.net  ???

illori

took a while... i have duplicated the issue and will look into it.

lurkalot

Quote from: illori on September 19, 2015, 12:21:38 PM
took a while... i have duplicated the issue and will look into it.

Thank you.  You're a star.  O0

This website is proudly hosted on Crocweb Cloud Website Hosting.