News: Welcome to the TinyPortal Support site.

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

April 02, 2020, 08:57:45 AM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 189572
  • Total Topics: 20808
  • Online Today: 381
  • Online Ever: 917
  • (January 21, 2020, 09:02:26 AM)
Users Online
Users: 0
Guests: 50
Total: 50

Author Topic: Article can still be edited when it is locked for edit  (Read 9527 times)

0 Members and 1 Guest are viewing this topic.

Offline alan

  • Jr. Member
  • **
  • Posts: 13
Article can still be edited when it is locked for edit
« on: March 02, 2012, 01:57:21 PM »
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.

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: Article can still be edited when it is locked for edit
« Reply #1 on: March 02, 2012, 02:06:59 PM »
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. :)

Code: [Select]
[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

Offline alan

  • Jr. Member
  • **
  • Posts: 13
Re: Article can still be edited when it is locked for edit
« Reply #2 on: March 02, 2012, 03:22:11 PM »
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

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: Article can still be edited when it is locked for edit
« Reply #3 on: March 02, 2012, 03:36:52 PM »
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.

Offline alan

  • Jr. Member
  • **
  • Posts: 13
Re: Article can still be edited when it is locked for edit
« Reply #4 on: March 03, 2012, 04:20:01 AM »
Many thanks, it will be appreciated.

This mod is just what I've been looking for

Alan

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: Article can still be edited when it is locked for edit
« Reply #5 on: March 05, 2012, 05:01:46 PM »
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

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: Article can still be edited when it is locked for edit
« Reply #6 on: March 05, 2012, 08:25:51 PM »
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.

Offline alan

  • Jr. Member
  • **
  • Posts: 13
Re: Article can still be edited when it is locked for edit
« Reply #7 on: March 06, 2012, 05:39:36 AM »
I'd be happy to test the code (btw that's what I do for a living, test software)

Alan

Offline IchBin™

  • Developer
  • *
  • Posts: 16228
    • My Website
Re: Article can still be edited when it is locked for edit
« Reply #8 on: March 06, 2012, 07:25:57 AM »
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.

Offline alan

  • Jr. Member
  • **
  • Posts: 13
Re: Article can still be edited when it is locked for edit
« Reply #9 on: March 20, 2012, 05:52:00 PM »
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