News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[TIP/TRICK] Unlimited Edit Time For A Single Board

Started by [SiNaN], August 23, 2008, 12:16:43 PM

Previous topic - Next topic

[SiNaN]

Question: How can I set an unlimited edit time for a single board?
Original Topic: http://www.simplemachines.org/community/index.php?topic=244332.0

Post.php

We have 3.

Find:

if (!empty($modSettings['edit_disable_time']) && $row['posterTime'] + ($modSettings['edit_disable_time'] + 5) * 60 < time())
Replace:

if (!empty($modSettings['edit_disable_time']) && $row['posterTime'] + ($modSettings['edit_disable_time'] + 5) * 60 < time() && $board != 'ID_BOARD')

Display.php

Find:

'can_modify' => (!$context['is_locked'] || allowedTo('moderate_board')) && (allowedTo('modify_any') || (allowedTo('modify_replies') && $context['user']['started']) || (allowedTo('modify_own') && $message['ID_MEMBER'] == $ID_MEMBER && (empty($modSettings['edit_disable_time']) || $message['posterTime'] + $modSettings['edit_disable_time'] * 60 > time()))),

Replace:

'can_modify' => (!$context['is_locked'] || allowedTo('moderate_board')) && (allowedTo('modify_any') || (allowedTo('modify_replies') && $context['user']['started']) || (allowedTo('modify_own') && $message['ID_MEMBER'] == $ID_MEMBER && (empty($modSettings['edit_disable_time']) || $board == 'ID_BOARD' || $message['posterTime'] + $modSettings['edit_disable_time'] * 60 > time()))),

Find:

global $memberContext, $context, $messages_request, $topic, $ID_MEMBER, $attachments;

Replace:

global $memberContext, $context, $messages_request, $topic, $ID_MEMBER, $attachments, $board;

Change the 'ID_BOARD' in the code as the ID of the board.
Former SMF Core Developer | My Mods | SimplePortal

Advertisement: