Welcome, Guest. Please Login or Register.
May 14, 2025, 07:01:51 PM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Edit locked posts « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Edit locked posts  (Read 1072 times)
MarshallBanana
Noobie
*
Posts: 11


noob

WWW
Edit locked posts
« on: July 26, 2003, 05:00:25 AM »
Reply with quote

hey, I'm looking for a way to let members edit their posts after they've been locked.  Don't know if anything like this exists, but any help would be appreciated.  Don't think it's too complicated.
Logged
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:Edit locked posts
« Reply #1 on: July 26, 2003, 09:40:00 AM »
Reply with quote

Don't know why you would want to but...

open modifymessage.php

Search for:

   if ($row['locked'] == 1 && $settings[7] != 'Administrator' && $settings[7] != 'Global Moderator' && !in_array($username, $moderators))
      fatal_error($txt[90]);

and either remove it or comment it out (surround in /* */)

NOTE: It appears TWICE in modifymessage.php so delete both versions (or comment out both versions!)

Open up display.php and search for:
      if (!$mstate || $settings[7] == 'Administrator' || $settings[7] == 'Global Moderator' || in_array($username,$moderators)){         $messageButtons[] = '<a href="' . $cgi . ';action=post;threadid=' . $viewnum . ';quote=' . $mid . ';title=' . URLencode($txt[116]) . ';start=' . $start . ';sesc=' . $sc . '">' . $img['replyquote'] . '</a>';
         if (in_array($username, $moderators) || $settings[7] == 'Administrator' || $settings[7] == 'Global Moderator' || ($ID_MEMBER == $muserID && $ID_MEMBER != -1))
         {
            $messageButtons[] = '<a href="' . $cgi . ';action=modify;msg=' . $mid . ';threadid=' . $viewnum . ';start=' . $start . ';sesc=' . $sc . '">' . $img['modify'] . '</a>';
            $messageButtons[] = '<a href="javascript:DoConfirm(\'' . $txt[154] . "?','" . $cgi . ';action=modify2;threadid=' . $viewnum . ';msg=' . $mid . ';d=1;start=' . $start . ';sesc=' . $sc . '\');">' . $img['delete'] . '</a>';
         }
         if (in_array($username, $moderators) || $settings[7] == 'Administrator' || $settings[7] == 'Global Moderator')
            $messageButtons[] = '<a href="' . $cgi . ';action=splitthreads;thread=' . $viewnum . ';at=' . $mid . '">' . $img['split'] . '</a>';
      }


and replace with:
      if (!$mstate || $settings[7] == 'Administrator' || $settings[7] == 'Global Moderator' || in_array($username,$moderators))
      {
         $messageButtons[] = '<a href="' . $cgi . ';action=post;threadid=' . $viewnum . ';quote=' . $mid . ';title=' . URLencode($txt[116]) . ';start=' . $start . ';sesc=' . $sc . '">' . $img['replyquote'] . '</a>';
}
         if (in_array($username, $moderators) || $settings[7] == 'Administrator' || $settings[7] == 'Global Moderator' || ($ID_MEMBER == $muserID && $ID_MEMBER != -1))
         {
            $messageButtons[] = '<a href="' . $cgi . ';action=modify;msg=' . $mid . ';threadid=' . $viewnum . ';start=' . $start . ';sesc=' . $sc . '">' . $img['modify'] . '</a>';
            $messageButtons[] = '<a href="javascript:DoConfirm(\'' . $txt[154] . "?','" . $cgi . ';action=modify2;threadid=' . $viewnum . ';msg=' . $mid . ';d=1;start=' . $start . ';sesc=' . $sc . '\');">' . $img['delete'] . '</a>';
         }
         if (in_array($username, $moderators) || $settings[7] == 'Administrator' || $settings[7] == 'Global Moderator')
            $messageButtons[] = '<a href="' . $cgi . ';action=splitthreads;thread=' . $viewnum . ';at=' . $mid . '">' . $img['split'] . '</a>';
      


(Basically moved the if state to only cover the top button)

Anyway - this SHOULD work but as always I haven't tested it ;)
Logged
MarshallBanana
Noobie
*
Posts: 11


noob

WWW
Re:Edit locked posts
« Reply #2 on: July 26, 2003, 07:04:15 PM »
Reply with quote

Why I would want to:

I run a poetry message board, and suddenly we have a flood of young members. Some of them... have issues with proofreading their posts before they post them. Normally it wouldn't be a huge issue, but it has gotten so bad that we added a rule that mods could lock a poem with excessive spelling and grammatical errors until the user cleans it up. The problem is... they can't clean it up if it's locked ;D
Logged
Grudge
Global Moderator
Full Member
*****
Posts: 178


Damn llama's don't like me :(

Re:Edit locked posts
« Reply #3 on: July 26, 2003, 07:56:49 PM »
Reply with quote

ah ha - nice idea :)

Did the code I posted work then? If not I shall try again :D
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  Edit locked posts « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.037 seconds with 21 queries.