Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: helenbpd on November 23, 2004, 03:39:51 PM

Title: maximum time-limit for modifying own posts - question re modify button
Post by: helenbpd on November 23, 2004, 03:39:51 PM
Hello there.

We needed to limit posters to only editing their posts for an hour or so after posting -- too many problems with people going back days later to edit/delete their own debate posts, annoying everyone.   
(This is a different function than the courtesy edit time.)

So.   I got the editing time limit installed a la this tip:
http://www.simplemachines.org/community/index.php?topic=1441.0

Works great.

Now all I need to do is to get the 'modify post' button to vanish after that 60 minutes.  As it stands, they can still click the modify button after 60 min, but then they get the 'denied' screen only AFTER they've spend time modifing their post.  Not good.

Recap: I need:
code to insert into my files to make the "modify" button disappear from general member's own posts after their 60-min editing limit has lapsed.  Mods/admins need to keep those buttons forever.  Can someone help with exactly what I insert where?

(I'm a RAW newbie and am able to download and alter php files by hand using BBEdit, but don't know the fancy tricks for making the changes via any other way.  But I'm learning fast.)

Ever so grateful.  First-born child available on request.

Helen
Title: Re: maximum time-limit for modifying own posts - question re modify button
Post by: helenbpd on November 23, 2004, 05:25:13 PM
Argh.  Cancel that.  With the changes I linked, the editing limit works great ... but members can't post or reply!  Had to revert to original.

... help?
Title: Re: maximum time-limit for modifying own posts - question re modify button
Post by: [Unknown] on November 23, 2004, 09:00:05 PM
Hmm, that topic looks very old (1441 < 20408) so I would guess it's for a much older version of SMF.

In other words, you're looking to hide the modify button after 60 minutes, but if they spend 20 minutes modifying it after waiting 50 minutes, you still want them to be able to modify it... right?

-[Unknown]
Title: Re: maximum time-limit for modifying own posts - question re modify button
Post by: helenbpd on November 23, 2004, 09:31:46 PM
Right.  Is that do-able?  But if there's no other way to configure the limit, I'm willing to do a flat cut-off, too.  We really need this change.

Thanks!
Helen
Title: Re: maximum time-limit for modifying own posts - question re modify button
Post by: [Unknown] on November 24, 2004, 11:13:30 AM
Make the changes I described here:

http://www.simplemachines.org/community/index.php?topic=1441.msg156498#msg156498

But use $modSettings['edit_wait_time'] * 120 instead of $modSettings['edit_wait_time'] * 60 in the first step.

-[Unknown]
Title: Re: maximum time-limit for modifying own posts - question re modify button
Post by: helenbpd on November 24, 2004, 07:13:28 PM
Thank you so much for your time!  Sorry to be a pain.  But a question:

I made the changes from your linked post,
http://www.simplemachines.org/community/index.php?topic=1441.msg156498#msg156498
and whereas the edit time worked beautifully (except for modify buttons not disappearing after 60 min), it disabled everyone from creating new posts or replying to any post at all after 60 min. 

Will changing the "* 60" to "* 120" in the code fix that problem as well?  (Perhaps I goofed somewhere in the code; I'll try it again in the meantime.)

And is there a way to make the "modify" button disappear after 60 min too?

Helen
Title: Re: maximum time-limit for modifying own posts - question re modify button
Post by: helenbpd on November 24, 2004, 07:20:11 PM
OK - much searching and I found this mod:

http://www.simplemachines.org/community/index.php?topic=16996.0

That'll do the trick too.  Will holler if (when) I run into trouble.   ::)

You've been fab.
H