Pełna wersja: Unofficial modifications
nieoficjalne modyfikacje for?w phpBB by Przemo
 
lo - fi version Unofficial modifications index

Blockade for typing in ShoutBox if warned
Kliknij tutaj aby przejśc do pełnej wersji tematu

 
       Unofficial modifications Strona Główna -> Foreign support
Poprzedni temat :: Następny temat  
kidzior Wysłany: Pon 30 Kwi, 2007  

Modification Author: qbs
http://mody.lastinn.info/...ezenia-t47.html
Translate: kidzior http://www.niezal.org

Wiadomo?? ukryta / Hidden messageAby zobaczy? wiadomo?? postaw piwo autorowi piwo.OPEN: shoutbox_view.php

FIND:
Kod
if ( !$too_long && !$flood_msg && !$shoutbox_banned && $is_auth_send )
{
$msg_id = $db->sql_nextid();

$sql = "INSERT INTO " . SHOUTBOX_TABLE . "
VALUES($msg_id, $sb_user_id, '" . str_replace("\'", "''", $msg) . "', '" . CR_TIME . "')";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert shoutbox message', '', __LINE__, __FILE__, $sql);
}


$start = CR_TIME - $shoutbox_config['delete_days'] * 86400;

$sql = "DELETE FROM " . SHOUTBOX_TABLE . "
WHERE timestamp < $start";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not delete shoutbox messages', '', __LINE__, __FILE__, $sql);
}

sql_cache('clear', 'sb_count');
}
}



REPLACE:

Kod<?php

if ( !$too_long && !$flood_msg && !$shoutbox_banned && $is_auth_send )
{
if ( $userdata['user_id'] > 1 )
{
$sql = "SELECT count(*) as ile FROM " . WARNINGS_TABLE . " WHERE userid = '" . $userdata['user_id'] . "' AND archive = '0'";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain warnings info', '', __LINE__, __FILE__, $sql);
}
}
$warns = $db->sql_fetchrow($result);
if ( $warns['ile'] < 1 )
{

$msg_id = $db->sql_nextid();

$sql = "INSERT INTO " . SHOUTBOX_TABLE . "
VALUES($msg_id, $sb_user_id, '" . str_replace("\'", "''", $msg) . "', '" . CR_TIME . "')";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert shoutbox message', '', __LINE__, __FILE__, $sql);
}



$start = CR_TIME - $shoutbox_config['delete_days'] * 86400;

$sql = "DELETE FROM " . SHOUTBOX_TABLE . "
WHERE timestamp < $start";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not delete shoutbox messages', '', __LINE__, __FILE__, $sql);
}

sql_cache('clear', 'sb_count');
}
else
{
echo '<body onload="window.scrollTo(0,0);" />
<table cellpadding="0" cellspacing="0" align="center"><tr><td align="center"><span class="gensmall">
<b>' . $lang['Too_many_warns'] . '</b></span></td></tr></table>';
}
}


OPEN: lang_main.php

FIND:
Kod//
// That's all Folks!
// -------------------------------------------------

BEFORE, ADD:
Kod$lang['Too_many_warns'] = 'You have recived too many warnings. You can not write in ShoutBox anymore';
 
       Unofficial modifications Strona Główna -> Foreign support
Strona 1 z 1
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.