BÜYÜK HARFLERLE yazılan mesajları otomatik olarak küçük harflerle yazar. Sadece cümlenin Baş Harfi BÜYÜK yazılır.
Dikkat !
Modifikasyonu etkinleştirmek için Admin-->Mesajlar ve Konular-->Mesajların büyük harflerle yazılmasını engelle seçeneğini aktif ediniz.
Admin.turkish.php
Bul ve öncesine ekleKod:
?>
Kod:
$txt['disable_shouting_title'] = 'Mesajların büyük harflerle yazılmasını engelle';
$txt['disable_shouting_warning'] = 'Konu başlıklarındaki ve mesajlardaki büyük harfleri küçültür.';
Admin.template.php
Bul ve değiştirKod:
<td valign="top">
<input type="checkbox" name="enableSpellChecking" id="enableSpellChecking_check"', empty($modSettings['enableSpellChecking']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>
Kod:
<td valign="top">
<input type="checkbox" name="enableSpellChecking" id="enableSpellChecking_check"', empty($modSettings['enableSpellChecking']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="disableShouting_check"></label>', $txt['disable_shouting_title'], ' :
<div class="smalltext" style="font-weight: normal;">', $txt['disable_shouting_warning'], '</div>
</th>
<td valign="top">
<input type="checkbox" name="disableShouting" id="disableShouting"', empty($modSettings['disableShouting']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>
Sources/ManagePosts.php
Bul ve altına ekle Kod:
// Update the actual settings.
updateSettings(array(
Kod:
'disableShouting' => empty($_POST['disableShouting']) ? '0' : '1',
Sources/Subs-Post.php
Bul ve altına ekle Kod:
$posterOptions['ip'] = empty($posterOptions['ip']) ? $user_info['ip2'] : $posterOptions['ip'];
Kod:
/*
*************************************************************
Block shouting in posts if enabled.
*************************************************************
How do we decide?
After close thinking using strtoupper checking will not work.
They need only use one lower to beat it.
Best way - loop through each char and count it as upper or lower.
If over 3/4 are upper - lower it.
*/
if ($modSettings['disableShouting'])
{
$Temp = preg_replace('~[^a-z]~i', '', $msgOptions['subject']);
$Margin = strlen($Temp) / 3;
$Count = 0;
for ($i = 0; $i < strlen($Temp); $i++)
{
if (strtoupper($Temp{$i}) == $Temp{$i})
++$Count;
}
$msgOptions['subject'] = ($Count < $Margin) ? $msgOptions['subject'] : ucfirst(strtolower($msgOptions['subject']));
}
if ($modSettings['disableShouting'])
{
$Temp = preg_replace('~[^a-z]~i', '', $msgOptions['body']);
$Margin = strlen($Temp) / 3;
$Count = 0;
for ($i = 0; $i < strlen($Temp); $i++)
{
if (strtoupper($Temp{$i}) == $Temp{$i})
++$Count;
}
$msgOptions['body'] = ($Count < $Margin) ? $msgOptions['body'] : ucfirst(strtolower($msgOptions['body']));
}
Bul ve altına ekle Kod:
$topicOptions['lock_mode'] = isset($topicOptions['lock_mode']) ? $topicOptions['lock_mode'] : null;
$topicOptions['sticky_mode'] = isset($topicOptions['sticky_mode']) ? $topicOptions['sticky_mode'] : null;
Kod:
/*
*************************************************************
Block shouting in posts if enabled.
*************************************************************
How do we decide?
After close thinking using strtoupper checking will not work.
They need only use one lower to beat it.
Best way - loop through each char and count it as upper or lower.
If over 3/4 are upper - lower it.
*/
if ($modSettings['disableShouting'])
{
$Temp = preg_replace('~[^a-z]~i', '', $msgOptions['subject']);
$Margin = strlen($Temp) / 3;
$Count = 0;
for ($i = 0; $i < strlen($Temp); $i++)
{
if (strtoupper($Temp{$i}) == $Temp{$i})
++$Count;
}
$msgOptions['subject'] = ($Count < $Margin) ? $msgOptions['subject'] : ucfirst(strtolower($msgOptions['subject']));
}
if ($modSettings['disableShouting'])
{
$Temp = preg_replace('~[^a-z]~i', '', $msgOptions['body']);
$Margin = strlen($Temp) / 3;
$Count = 0;
for ($i = 0; $i < strlen($Temp); $i++)
{
if (strtoupper($Temp{$i}) == $Temp{$i})
++$Count;
}
$msgOptions['body'] = ($Count < $Margin) ? $msgOptions['body'] : ucfirst(strtolower($msgOptions['body']));
}
Dikkat !
Modifikasyonu etkinleştirmek için Admin-->Mesajlar ve Konular-->Mesajların büyük harflerle yazılmasını engelle seçeneğini aktif ediniz.
Admin.turkish.php
Bul ve öncesine ekleKod:
?>
Kod:
$txt['disable_shouting_title'] = 'Mesajların büyük harflerle yazılmasını engelle';
$txt['disable_shouting_warning'] = 'Konu başlıklarındaki ve mesajlardaki büyük harfleri küçültür.';
Admin.template.php
Bul ve değiştirKod:
<td valign="top">
<input type="checkbox" name="enableSpellChecking" id="enableSpellChecking_check"', empty($modSettings['enableSpellChecking']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>
Kod:
<td valign="top">
<input type="checkbox" name="enableSpellChecking" id="enableSpellChecking_check"', empty($modSettings['enableSpellChecking']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="disableShouting_check"></label>', $txt['disable_shouting_title'], ' :
<div class="smalltext" style="font-weight: normal;">', $txt['disable_shouting_warning'], '</div>
</th>
<td valign="top">
<input type="checkbox" name="disableShouting" id="disableShouting"', empty($modSettings['disableShouting']) ? '' : ' checked="checked"', ' class="check" />
</td>
</tr>
Sources/ManagePosts.php
Bul ve altına ekle Kod:
// Update the actual settings.
updateSettings(array(
Kod:
'disableShouting' => empty($_POST['disableShouting']) ? '0' : '1',
Sources/Subs-Post.php
Bul ve altına ekle Kod:
$posterOptions['ip'] = empty($posterOptions['ip']) ? $user_info['ip2'] : $posterOptions['ip'];
Kod:
/*
*************************************************************
Block shouting in posts if enabled.
*************************************************************
How do we decide?
After close thinking using strtoupper checking will not work.
They need only use one lower to beat it.
Best way - loop through each char and count it as upper or lower.
If over 3/4 are upper - lower it.
*/
if ($modSettings['disableShouting'])
{
$Temp = preg_replace('~[^a-z]~i', '', $msgOptions['subject']);
$Margin = strlen($Temp) / 3;
$Count = 0;
for ($i = 0; $i < strlen($Temp); $i++)
{
if (strtoupper($Temp{$i}) == $Temp{$i})
++$Count;
}
$msgOptions['subject'] = ($Count < $Margin) ? $msgOptions['subject'] : ucfirst(strtolower($msgOptions['subject']));
}
if ($modSettings['disableShouting'])
{
$Temp = preg_replace('~[^a-z]~i', '', $msgOptions['body']);
$Margin = strlen($Temp) / 3;
$Count = 0;
for ($i = 0; $i < strlen($Temp); $i++)
{
if (strtoupper($Temp{$i}) == $Temp{$i})
++$Count;
}
$msgOptions['body'] = ($Count < $Margin) ? $msgOptions['body'] : ucfirst(strtolower($msgOptions['body']));
}
Bul ve altına ekle Kod:
$topicOptions['lock_mode'] = isset($topicOptions['lock_mode']) ? $topicOptions['lock_mode'] : null;
$topicOptions['sticky_mode'] = isset($topicOptions['sticky_mode']) ? $topicOptions['sticky_mode'] : null;
Kod:
/*
*************************************************************
Block shouting in posts if enabled.
*************************************************************
How do we decide?
After close thinking using strtoupper checking will not work.
They need only use one lower to beat it.
Best way - loop through each char and count it as upper or lower.
If over 3/4 are upper - lower it.
*/
if ($modSettings['disableShouting'])
{
$Temp = preg_replace('~[^a-z]~i', '', $msgOptions['subject']);
$Margin = strlen($Temp) / 3;
$Count = 0;
for ($i = 0; $i < strlen($Temp); $i++)
{
if (strtoupper($Temp{$i}) == $Temp{$i})
++$Count;
}
$msgOptions['subject'] = ($Count < $Margin) ? $msgOptions['subject'] : ucfirst(strtolower($msgOptions['subject']));
}
if ($modSettings['disableShouting'])
{
$Temp = preg_replace('~[^a-z]~i', '', $msgOptions['body']);
$Margin = strlen($Temp) / 3;
$Count = 0;
for ($i = 0; $i < strlen($Temp); $i++)
{
if (strtoupper($Temp{$i}) == $Temp{$i})
++$Count;
}
$msgOptions['body'] = ($Count < $Margin) ? $msgOptions['body'] : ucfirst(strtolower($msgOptions['body']));
}