Не могу никак понять…может кто-то знает?
Код: Выделить всё
##############################################################
## MOD Title: Site warning
## MOD Author: alcaeus < alcaeus@gmx.net > Alca Eus (www.alcae.us.tt)
## MOD Description: Adds a customizable warning to the database. The warning then is displayed in
## overall_header.tpl, meaning that it is visible on every page in your forum. You can modify the
## looks of that warning, the template only contains the message, making this very customizable.
## MOD Version: 1.0.2
##
## Installation Level: (Easy)
## Installation Time: ~5 Minutes
## Files To Edit: admin/admin_board.php
## includes/page_header.php
## language/lang_english/lang_admin.php
## templates/subSilver/admin/board_config_body.tpl
## templates/subSilver/overall_header.tpl
## Included Files: (n/a)
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes: The MOD should work on phpBB 2.0.6 or higher
##############################################################
## MOD History:
##
## 2004-08-25 - Version 1.0.1
## - Minor bugfix
##
## 2004-08-24 - Version 1.0.0
## - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ SQL ]------------------------------------------
#
# If you have a different table prefix then change this command accordingly.
# I have used the default table prefix!
#
INSERT INTO phpbb_config VALUES ('site_warning', 'If you can see this, the MOD was installed successfully. Now change the message in the ACP.');
#
#-----[ OPEN ]------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------
#
"L_DISABLE_BOARD_EXPLAIN" => $lang['Board_disable_explain'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
"L_SITE_WARNING" => $lang['Site_warning'],
"L_SITE_WARNING_EXPLAIN" => $lang['Site_warning_explain'],
#
#-----[ FIND ]------------------------------------------
#
"S_DISABLE_BOARD_NO" => $disable_board_no,
#
#-----[ AFTER, ADD ]------------------------------------------
#
"SITE_WARNING" => $new['site_warning'],
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
$template->pparse('overall_header');
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// Warning to all users?
//
if ($board_config['site_warning'])
{
$template->assign_block_vars('site_warning', array(
'SITE_WARNING' => $board_config['site_warning'])
);
}
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Board_disable_explain'] = 'This will make the board unavailable to users. Administrators are able to access the Administration Panel while the board is disabled.';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$lang['Site_warning'] = 'Warning';
$lang['Site_warning_explain'] = 'Enter a warning which will be displayed at the top of every site. If you don\'t want to show a warning, leave this field empty.';
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1">{L_DISABLE_BOARD}<br /><span class="gensmall">{L_DISABLE_BOARD_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="board_disable" value="1" {S_DISABLE_BOARD_YES} /> {L_YES} <input type="radio" name="board_disable" value="0" {S_DISABLE_BOARD_NO} /> {L_NO}</td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<tr>
<td class="row1">{L_SITE_WARNING}<br /><span class="gensmall">{L_SITE_WARNING_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" size="40" maxlength="255" name="site_warning" value="{SITE_WARNING}" /></td>
</tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
<a name="top"></a>
#
#-----[ AFTER, ADD ]------------------------------------------
# This can be added anywhere you want it to be
# You can also modify the appearance
<!-- BEGIN site_warning -->
<table width="100%" border="0">
<tr>
<td>
<span class="gen" style="color:#FF0000; font-weight:bold;">{site_warning.SITE_WARNING}</span>
</td>
</tr>
</table>
<!-- END site_warning -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM