FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » [SOLVED] Group Manager: Post Editing disabled is being ignored
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
[SOLVED] Group Manager: Post Editing disabled is being ignored [message #163153] Sun, 03 October 2010 10:39 Go to next message
tux99   Switzerland
Messages: 44
Registered: September 2010
Karma: 0
Member
Hi,
I'm not sure if this is a bug or if I misunderstood something.

I used the Group Manager to disable "Edit" for some sub-forums for the group "All Registered Users", but when i log on as a normal user and try to edit my posts in that sub-forum I'm still able to edit them.

So it looks like the setting is being ignored or do I need to do something else to disable Edit?

Shouldn't the Edit button disappear from all posts of that group when Edit is disabled?

[Updated on: Fri, 08 October 2010 03:00]

Report message to a moderator

Re: Group Manager: Post Editing disabled is being ignored [message #163168 is a reply to message #163153] Mon, 04 October 2010 16:34 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I don't think it's a bug. This is how I think it is evaluated:

1. Group Manager decides if you can edit all the messages or not.
2. If you CANNOT, but EDIT_TIME_LIMIT > 0, you will be given the opportunity to edit your own posts for a short period of time.
Re: Group Manager: Post Editing disabled is being ignored [message #163172 is a reply to message #163168] Mon, 04 October 2010 22:35 Go to previous messageGo to next message
tux99   Switzerland
Messages: 44
Registered: September 2010
Karma: 0
Member
naudefj wrote on Mon, 04 October 2010 18:34
I don't think it's a bug. This is how I think it is evaluated:

1. Group Manager decides if you can edit all the messages or not.
2. If you CANNOT, but EDIT_TIME_LIMIT > 0, you will be given the opportunity to edit your own posts for a short period of time.


Hmmm, thanks for the explanation, but the behaviour doesn't seem logical to me.

If in group manager i disable edit, then editing should not be allowed in that group.

To explain the reason why I want editing disabled in some subforums:
in the imported ML subforums, any posts added there should not be editable as by definition ML posts cannot be edited since they have already been posted to the ML.
So if a user can edit his posts in a ML subforum on the forum, then the post on the forum doesn't match anymore the post that the ML subscribers received.

Is there any other way to achieve this?
Re: Group Manager: Post Editing disabled is being ignored [message #163178 is a reply to message #163172] Tue, 05 October 2010 09:02 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
Set EDIT_TIME_LIMIT (Edit Time Limit (minutes): ) to 0 in Admin Control Panel -> Global Settings Manager

Re: Group Manager: Post Editing disabled is being ignored [message #163180 is a reply to message #163178] Tue, 05 October 2010 11:09 Go to previous messageGo to next message
tux99   Switzerland
Messages: 44
Registered: September 2010
Karma: 0
Member
Ernesto wrote on Tue, 05 October 2010 11:02
Set EDIT_TIME_LIMIT (Edit Time Limit (minutes): ) to 0 in Admin Control Panel -> Global Settings Manager


I have that already at zero, I think it was the default anyway, but I don't see how that makes a difference.
Doesn't EDIT_TIME_LIMIT zero mean unlimited?
Re: Group Manager: Post Editing disabled is being ignored [message #163185 is a reply to message #163180] Tue, 05 October 2010 20:58 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Yes, the default is zero, or unlimited.

You can always change the logic in ./data/src/drawmsg.inc.t

Look for this line:
if (_uid && ($perms & 16 || (_uid == $obj->poster_id && (!$GLOBALS['EDIT_TIME_LIMIT'] || __request_timestamp__ - $obj->post_stamp < $GLOBALS['edit_TIME_LIMIT'] * 60)))) {

For example, you could add the following to disable "Edit" on external messages:
&& empty($obj->mlist_msg_id)

My personal favourite is to disable editing after the first reply with:
&& $obj->id == $obj->last_post_id
Re: Group Manager: Post Editing disabled is being ignored [message #163187 is a reply to message #163185] Wed, 06 October 2010 12:53 Go to previous messageGo to next message
tux99   Switzerland
Messages: 44
Registered: September 2010
Karma: 0
Member
Thanks for your suggestions, but I really think there is a bug here.
For example I have the following subforum:
http://mageia.linuxtech.net/forum/index.php?t=msg&th=9

In "Group Manager" I have configured for the Group of this subforum "All Registered Users"+"Anonymous" Edit=No.
"Edit Time Limit" is set to "0" in the Admin Control Panel.
Nontheless a normal user has "Edit" buttons on his/her own posts and editing his/her own posts succeeds.

So the "Group Manager" setting of Edit=No seems to have no effect at all.

[Updated on: Wed, 06 October 2010 12:54]

Report message to a moderator

Re: Group Manager: Post Editing disabled is being ignored [message #163196 is a reply to message #163187] Wed, 06 October 2010 16:37 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
It really isn't a bug. See documentation at Moderation:
"Edit = The ability to edit messages posted by other users."
Re: Group Manager: Post Editing disabled is being ignored [message #163197 is a reply to message #163196] Wed, 06 October 2010 16:44 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
Yes, but with Edit Time Limit set to 0, the users shouldn't be able to see the edit button, nor edit their posts. That is the problem he is describing, I think you missunderstood naudefj =)

Re: Group Manager: Post Editing disabled is being ignored [message #163198 is a reply to message #163197] Wed, 06 October 2010 17:58 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Zero will allow unlimited editing of their own posts.

Set to -1 to disable (user's won't see the button).
Re: Group Manager: Post Editing disabled is being ignored [message #163199 is a reply to message #163198] Wed, 06 October 2010 18:11 Go to previous messageGo to next message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
Finally we come to the correct and awesome answer. Yay for naud!

Re: Group Manager: Post Editing disabled is being ignored [message #163200 is a reply to message #163199] Wed, 06 October 2010 19:02 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Well, for those of us who don't speak English,
(!$GLOBALS['EDIT_TIME_LIMIT'] || __request_timestamp__ - $obj->post_stamp < $GLOBALS['edit_TIME_LIMIT'] * 60)
makes much more sense! Smile
Re: Group Manager: Post Editing disabled is being ignored [message #163202 is a reply to message #163199] Wed, 06 October 2010 20:02 Go to previous messageGo to next message
tux99   Switzerland
Messages: 44
Registered: September 2010
Karma: 0
Member
Ok I tried the "-1" setting and now editing is disabled everywhere and the edit buttons have disapeared so that works fine, thanks naudefj.

I still think though that it would be useful to be able to disable editing own posts per subforum rather than only globablly, i.e. in the Groups Manager maybe there should be two edit switches, one for editing all posts yes/no and one for own posts yes/no.
But I guess that's a feature request, not a bug.

[Updated on: Wed, 06 October 2010 20:03]

Report message to a moderator

Re: Group Manager: Post Editing disabled is being ignored [message #163204 is a reply to message #163202] Thu, 07 October 2010 15:41 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
You can add your feature requests to FUDforum 3.0.3.

I need to finish what I'm busy with and stabilize the base for the FUDforum 3.0.2 release.
Re: Group Manager: Post Editing disabled is being ignored [message #163205 is a reply to message #163204] Thu, 07 October 2010 19:00 Go to previous messageGo to next message
tux99   Switzerland
Messages: 44
Registered: September 2010
Karma: 0
Member
Ok no problem, for now I can live with the current global edit disabled setting, but I have added the suggestion in the wiki.

BTW, I noticed now after setting EDIT_TIME_LIMIT to -1 that when a user adds a new message, next to the edit window the following slightly confusing text appears: "Editing Time Limit: -1 minutes".

IMHO this looks confusing for a user, why is the edit time limit displayed at all? I think it shouldn't be shown at all.
Re: Group Manager: Post Editing disabled is being ignored [message #163206 is a reply to message #163205] Thu, 07 October 2010 20:30 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Yes, it shouldn't show.
Here's the patch: http://fudforum.svn.sourceforge.net/fudforum/?rev=5023&view=rev
Re: Group Manager: Post Editing disabled is being ignored [message #163208 is a reply to message #163206] Fri, 08 October 2010 02:59 Go to previous message
tux99   Switzerland
Messages: 44
Registered: September 2010
Karma: 0
Member
naudefj wrote on Thu, 07 October 2010 22:30
Yes, it shouldn't show.
Here's the patch: http://fudforum.svn.sourceforge.net/fudforum/?rev=5023&view=rev


Thanks, I have applied the change and it seems to work fine, no more confusing time limit message.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: odd issue with it complaining about invalid links when posting...
Next Topic: User Administration System: max 50 users displayed
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 05:10:48 GMT 2024

Total time taken to generate the page: 0.03640 seconds