HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media


Welcome to TinyPortal. Please login or sign up.

December 02, 2023, 08:49:16 AM

Login with username, password and session length
  • Total Posts: 194,608
  • Total Topics: 21,188
  • Online today: 89
  • Online ever: 3,540
  • (September 03, 2022, 01:38:54 AM)
Users Online
Users: 0
Guests: 67
Total: 67

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.


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.


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]
[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


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:/
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


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.


Many thanks, it will be appreciated.

This mod is just what I've been looking for



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


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.


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



Well lets see. You can download the files from here.

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.



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.




Glad you got it going and thanks 4 letting us know!
gonna mark solved now!

But Mama, That's Where all the fun is!



I replaced TPsubs.template.php, TPmodules.php, TPmodules.english.php, and TPortal.php from the download listed above which successfully fixed the problem I had.

I would now like to upgrade to the TinyPortal 1.0 Final, what is the best method for me to do the upgrade.




Upload the new package, click install. Easy peasy!!! :)

I prefer to uninstall the old first (making sure to not select the option to delete the tables). Always make backups before you do any changes like this though.


I ran the uninstall and got the following message.

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 316161 bytes) in /home/a9623288/public_html/forum/Sources/Subs-Package.php on line 2072

Then if I try to access my forum I get

Warning: require_once(/home/a9623288/public_html/forum/Sources/TPortal.php) [function.require-once]: failed to open stream: No such file or directory in /home/a9623288/public_html/forum/index.php on line 55


Fatal error: require_once() [function.require]: Failed opening required '/home/a9623288/public_html/forum/Sources/TPortal.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/a9623288/public_html/forum/index.php on line 55

And can no longer access my forum.

Luckily I did a full backup before I started.


Looks like your server timed out before it was able to complete the uninstall process. You may want to try to up your memory limit on your server if you attempt it again. If it doesn't work, you may have to uninstall manually.


I did a manual uninstall, not sure if I got everything.

Installed "TinyPortal 1.0 Final" l had an error where I had removed too many lines from index.php during uninstall, fixed that and all seems to be working at the moment.

This was all on my test/development installation. I'm a bit nervous about doing it on my live forum as my test/development install was unusable for a while.

I don't think I can configure memory limit on my host.