Уважаемые пользователи!
C 7 ноября 2020 года phpBB Group прекратила выпуск обновлений и завершила дальнейшее развитие phpBB версии 3.2.
С 1 августа 2024 года phpBB Group прекращает поддержку phpBB 3.2 на официальном сайте.
Сайт официальной русской поддержки phpBB Guru продолжит поддержку phpBB 3.2 до 31 декабря 2024 года.
С учетом этого, настоятельно рекомендуется обновить конференции до версии 3.3.

Site warning

Ответы на вопросы, связанные с модами для phpBB 2.0.x, кроме относящихся к форуму Для авторов (phpBB 2.0.x).
Аватара пользователя
YarNET
phpBB 2.0.6
Сообщения: 518
Стаж: 19 лет 5 месяцев

Site warning

Сообщение YarNET »

Это мод для защиты базы данных от разных неприятностей? Или это некоторая сигнализация, которая дает знать, что с bd что-то не так?
Не могу никак понять…может кто-то знает?

Код: Выделить всё

##############################################################
## 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}&nbsp;&nbsp;<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 
Проверь, за что ты платишь деньги провайдеру?
Тестирование скорости соединения с INNTERNET
Аватара пользователя
crash
Former team member
Сообщения: 6517
Стаж: 19 лет 9 месяцев
Откуда: Бердск

Сообщение crash »

YarNET
помоему это просто предупреждение можно выводить на каждой странице форума
Как правильно задавать вопросы
Для особо одаренных: поиск - это есть круто.
FAQ v.2 | FAQ v.3 | Шаблон запроса

Вернуться в «Поддержка модов для phpBB 2.0.x»