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:04:33 AM

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

Article can still be edited when it is locked for edit

Started by alan, March 02, 2012, 08:57:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

alan

When an article is locked for edit the author can still edit the article even though it is shown as locked.

I'm a little concerned over this because it means the author can edit the article without the administrators knowledge that any changes have taken place.

IchBin

Did you see the information at the top of the post screen when you created a new topic? I can't really give you any help unless you provide that information. Hard to read people's minds about what software they are using. :)

[b]Link to my site:[/b] http://www.yourdomain.com
[b]SMF version:[/b] SMF ver. here
[b]TP version:[/b] TP ver. here
[b]Default Forum Language:[/b] Your Default Forum Language here
[b]Theme name and version:[/b] Theme name here
[b]Browser Name and Version: [/b] Browser name/version here
[b]Mods installed:[/b] Mods listed here
[b]Related Error messages:[/b] Error message here

alan

I'm sorry I did see the information but I don't think my problem is related to most of those things in that list but here is the completed list. You won't be able to see the problem on my site because the permissions are set so that only authorised users and admins can create or edit articles.

The problem I have is that if an article is locked it doesn't stop the author of that article from editing his article.

Link to my site:http:/bws.hostoi.com/smf1 http://www.yourdomain.com
SMF version:SMF 2.0.2 SMF ver. here
TP version: TinyPortal 1.106 TP ver. here
Default Forum Language:English Your Default Forum Language here
Theme name and version:Yabb SE Classic 2.0 VPF Theme name here
Browser Name and Version:Chrome 17, Safari 10. IE9 Browser name/version here
Mods installed:Aeva Media 1.4w, Mobile Themes mod 1.0 Mods listed here
Related Error messages: None Error message here

IchBin

It may not seem related to you. But at a minimum, the version of SMF and TP are precisely related. :) I'll take a look and see if I have the same problem.

ETA: After testing I see that when you view the "My Articles" section in your profile, that the edit icon is no longer there. But the edit link when viewing the article is still available and allows the person to edit it. I'll see what I can do to fix this.

alan

Many thanks, it will be appreciated.

This mod is just what I've been looking for

Alan

IchBin

alan, it is looking like this feature hasn't fully been implemented throughout the different places that it should affect. Right now this is what I'm thinking we should do. Add a check into the code when an article is going to be edited whether it is locked or not. If it is locked, simply throw an error on the screen that the article is locked for editing.

However, at this point I'm thinking it won't really be possible to add a check for the edit link shown at the top of the articles (only on the front page) to not show it if the article is locked. Reason being is because of how articles are handled when all of them are grabbed and pulled together. The locked status will be really hard to check because of the way the arrays are setup. So it will still be incomplete, but at least it shouldn't allow an edit when it's locked. I'll try to post the code fix if it's small. Otherwise, you'll have to wait until the final release which I'm hoping is next. :D

IchBin

Ok, maybe not. lol It would seem the changes to make this work by hiding the links in the frontpage and when viewing an article will actually work unlike I said before. I've committed a fix. There's about 5 different files so I'm not going to post it. If you can't wait let me know and I'll point you to the code repo I have so you can download and test the files yourself.

alan

I'd be happy to test the code (btw that's what I do for a living, test software)

Alan

IchBin

Well lets see. You can download the files from here.
http://www.github.com/IchBin/TinyPortal/downloads

Just click the download button in the middle of the screen there and it should give you the latest files from the repository. You can then unzip and replace your files with those. I believe the changes were in TPsubs.template.php, TPmodules.php, TPmodules.english.php, and maybe TPortal.php if you want to try by only replacing those.

alan

Hello,

Sorry that I've been a while getting back, I've been a bit distracted by another project.

Many thanks for the download link, I've tested with just the files you listed and that seems to have fixed the problem.

Thank you very much for the very prompt fix, I can now get on with putting my site together.

Alan