Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: KirkhamsEbooks - maaliskuu 16, 2009, 05:29:35 IP

Otsikko: Increasing admin characters in message body
Kirjoitti: KirkhamsEbooks - maaliskuu 16, 2009, 05:29:35 IP
The heading asks it all. Is there a way in 2.o irc to increase the number of characters allowd in the message body for the admin only?

Rick
Otsikko: Re: Increasing admin characters in message body
Kirjoitti: Kermit - maaliskuu 16, 2009, 06:18:30 IP
Sources/Post.php

Koodi (find) [Valitse]

elseif (!empty($modSettings['max_messageLength']) && $smcFunc['strlen']($_POST['message']) > $modSettings['max_messageLength'])
$post_errors[] = 'long_message';


Koodi (replace with) [Valitse]

elseif (!empty($modSettings['max_messageLength']) && $smcFunc['strlen']($_POST['message']) > $modSettings['max_messageLength'] && !$context['user']['is_admin'])
$post_errors[] = 'long_message';


After that there will be no character limitations for the admins
Otsikko: Re: Increasing admin characters in message body
Kirjoitti: KirkhamsEbooks - maaliskuu 16, 2009, 08:09:25 IP
Thanks

This will be my first attempt at real php modification

I'd better back up that file
Rick
Otsikko: Re: Increasing admin characters in message body
Kirjoitti: KirkhamsEbooks - maaliskuu 16, 2009, 09:46:09 IP
Something else needs to be done Here's the code as it stands

The message exceeds the maximum allowed length (20000 characters).


}
elseif (!empty($modSettings['max_messageLength']) && $smcFunc['strlen']($_POST['message']) > $modSettings['max_messageLength'] && !$context['user']['is_admin'])
{
$post_errors[] = 'long_message';
unset($_POST['message']);
}
else
{
// Aeva - START
// On Quick Edit - Only call if message is set.
if (!empty($_POST['message']))
{
global $sourcedir;
@include_once($sourcedir . '/Subs-Aeva.php');
if (function_exists('aeva_onposting'))
$_POST['message'] = aeva_onposting($_POST['message']);
}
Otsikko: Re: Increasing admin characters in message body
Kirjoitti: Kermit - maaliskuu 17, 2009, 06:04:27 AP
The code,which i gave above,should work and it's working,i've recently tested that again and there is no problem for the admins
Otsikko: Re: Increasing admin characters in message body
Kirjoitti: KirkhamsEbooks - maaliskuu 17, 2009, 01:01:51 IP
I don't suppose multiple forums could make a difference as long as they're all using different folders and databases

Rick
Otsikko: Re: Increasing admin characters in message body
Kirjoitti: KirkhamsEbooks - maaliskuu 17, 2009, 07:31:39 IP
FOUND IT!

There's two instances of the code that need to be changed not just one.

Thanks, my first successful php edit thanks to you guys (gals included of course)

Rick