Uutiset:

Wondering if this will always be free?  See why free is better.

Main Menu
Advertisement:

Increasing admin characters in message body

Aloittaja KirkhamsEbooks, maaliskuu 16, 2009, 05:29:35 IP

« edellinen - seuraava »

KirkhamsEbooks

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

Kermit

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
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Lainaa
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

KirkhamsEbooks

Thanks

This will be my first attempt at real php modification

I'd better back up that file
Rick

KirkhamsEbooks

#3
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']);
}

Kermit

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
My Mods
Please don't PM/mail me for support,unless i invite you
Formerly known as Duncan85
Lainaa
"Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe."

A. Einstein

KirkhamsEbooks

I don't suppose multiple forums could make a difference as long as they're all using different folders and databases

Rick

KirkhamsEbooks

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

Advertisement: