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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,970
  • Latest: bynw
Stats
  • Total Posts: 196,055
  • Total Topics: 21,337
  • Online today: 572
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

New TP version 1.1 and guest comments

Started by wildenborch, September 14, 2015, 02:11:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wildenborch

#10
Yes I am able to delete comments when logged in as Admin.

wildenborch

Hi Lurkalot,

I/m not sure if the following is also caused by the new functionality that guest can post 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,

PS, if I should make a new topic for this, please let me know.

lurkalot

Quote from: wildenborch on September 15, 2015, 08:23:16 AM
Yes I am!

Thanks, at least that bit's working.  Phew was worried there forma minute. ;)

I had to ask that because the login you sent me doesn't seem to work. I did reply to you PM, but the it's not easy to see you have any replies with the theme on here.

lurkalot

Quote from: wildenborch on September 15, 2015, 08:52:33 AM

PS, if I should make a new topic for this, please let me know.


Might be an idea to keep separate, will make it easier to track.

Thanks. 

wildenborch

You should now be able to login.

Best regards,
Fred


lurkalot

Quote from: wildenborch on September 15, 2015, 09:19:31 AM
You should now be able to login.

Best regards,
Fred

Thanks.  I'm investigating your issues as I type. Might take sometime to come up with something, so please bare with me. Unless someone else on the team has the answer that is.  ;)

lurkalot

Quote from: IchBin™ on September 15, 2015, 04:59:27 AM
The code you changed is not correct wildenborch.  I think the code is correct on the TP side. I'm just not sure allowing guests to delete comments is a good idea?

IchBin™ There doesn't seem to be any other way to hide that delete button for guests, other than edit that code, like wildenborch has.  Am I missing something obvious?


illori

Quote from: wildenborch on September 14, 2015, 02:11:05 PM
Hi,

First I would like to thank you for the update to version 1.1!

I just want to know if it is correct that guest users can push the remove comment button (although the comments are not deleted??

In any case I changed line 1731 the TPsubs.template.php into

if(allowedTo('tp_articles') || $comment['posterID'] == $context['user']['id']['is_logged'])


Best regards,
Fred
The Netherlands!

if you have debug enabled or check your error log you will find this causes errors.

Warning: Illegal string offset 'is_logged' in D:\wamp\www\clean5\Themes\default\TPsubs.template.php on line 1731

seems like a better fix is...

if(allowedTo('tp_articles') || $comment['posterID'] == $context['user']['id'] && !$context['user']['is_guest'])

wildenborch

Illori,

This change is indeed working perfectly!

Best regards,
Fred

This website is proudly hosted on Crocweb Cloud Website Hosting.