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

Recent

Welcome to TinyPortal. Please login or sign up.

April 30, 2024, 06:14:50 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,174
  • Total Topics: 21,220
  • Online today: 147
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 128
  • Total: 128

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

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!

Ken.

Hi wildenborch
We are glad you like the new version.  8)

Please give us a little more information so that we are better able to help, the posting guidelines would help a lot.

What comments are you asking about? If it's the Articles, you can set permissions so that a guest can see comments, but not see any controls, like the Delete button.
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

wildenborch

Hi Ken,

When I post a article comment, I see the following after the comment is posted:
See attachment.

Since the comment is not deleted if I (as guest) push the delete button and because I'm redirected to the forum change line 1731 of the TPsubs.template.php making it umpossible for a guest to delete his comments.

When logged in as admin the delete behaviouw is working as it should be.

I have created a test site:

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

lurkalot

Hi wildenborch

Thanks for choosing Tinyportal.  8)

On your test site I don't see any comments on that article.  Have you got a example where were can see the problem in action.

wildenborch

Hi Lurkalot,

Thanks for your reply but there is one article on the frontpage of this site.

I have now renamed it to Test for Ken and Lurkalot! and added some text.
here's the link http://rodebaert.nl/index.php?page=1


Best regards,
Fred

Ken.

Quote from: wildenborch on September 14, 2015, 09:32:32 PM
Hi Lurkalot,

Thanks for your reply but there is one article on the frontpage of this site.

I have now renamed it to Test for Ken and Lurkalot! and added some text.
here's the link http://rodebaert.nl/index.php?page=1

Best regards,
Fred


Fred, I just checked the site and tried the 'Delete' button and it appeared to let me delete the article, but it returned with a page refresh.
How are your permissions set for 'Guests'?

EDIT: when logged in the 'Delete' button is not showing.
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

lurkalot

Quote from: Ken. on September 14, 2015, 11:06:47 PM
Quote from: wildenborch on September 14, 2015, 09:32:32 PM
Hi Lurkalot,

Thanks for your reply but there is one article on the frontpage of this site.

I have now renamed it to Test for Ken and Lurkalot! and added some text.
here's the link http://rodebaert.nl/index.php?page=1

Best regards,
Fred


Fred, I just checked the site and tried the 'Delete' button and it appeared to let me delete the article, but it returned with a page refresh.
How are your permissions set for 'Guests'?

EDIT: when logged in the 'Delete' button is not showing.

Ken, this is a guest related issue. I don't think its a permissions problem (as in a setting) I think there's a problem which was missed somewhere.

wildenborch, Sorry, we'll have to look into it a bit further to see what happened.

IchBin

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?

wildenborch

#8
Hi Ichbin,

You are right. Guest should not remove comments (also not the ones they made!) In fact that's not possible because if they push the delete button they are only directed to the forum and the comment is not removed at all!

The code I changed does prevent guests from seeing the delete button.
I tested this in another side.
Only logged in memebers can now see the delete button.

But if you say that the change I made is not correct at all... than you are probably right because I have no knowledge of PHP. I simply tried something (which seems to work).

Another thing I did (on the other site) is to create in the sql_Members table a ID_member 0 with Member_name Guest. I was then able to see the guest comments in your Recent Comments block. http://www.tinyportal.net/index.php?topic=31176.msg279657#msg279657

The main side where Tinyportal is used is not even used as a forum. I simply use Tinyportal as Blog / article writer. In my opinion Tinyportal is simply the best CMS tool for doing that. (I tried them all!) If you wish just look at: www.vanveen-nl.com. It's in Dutch!
On the right side you will find the recent comments block ( Recente Reacties )
Gast = Guest (the ID_member 0 )!

lurkalot

wildenborch are you able to delete those guest comments as admin?