Автоматично рефрешване на форума ви
Ето как да направите форума си, автоматично да се рефрешва през определено време. Този мод е полезен в случая когато някой потребител остави форума отворен и има някаде работа то автоматично ще се рефрешва и така потребитела няма да се логаутне. 😉
#
#-----[ SQL ]------------------------------------------------
#
INSERT INTO `phpbb_config` VALUES ('refresh_time', '60');
#
#-----[ ОТВОРИ ]------------------------------------------------
#
index.php
#
#-----[ НАМЕРИ ]------------------------------------------------
#
// End session management
//
#
#-----[ СЛЕД ТОЗИ РЕД, ДОБАВИ ]-----------------------------------------
#
$refresh_time_enable = TRUE;
#
#-----[ ОТВОРИ ]------------------------------------------------
#
viewforum.php
#
#-----[ НАМЕРИ ]------------------------------------------------
#
// End session management
//
#
#-----[ СЛЕД ТОЗИ РЕД, ДОБАВИ ]-----------------------------------------
#
$refresh_time_enable = TRUE;
#
#-----[ ОТВОРИ ]------------------------------------------------
#
admin/admin_board.php
#
#-----[ НАМЕРИ ]------------------------------------------------
#
"L_ENABLE_PRUNE" => $lang['Enable_prune'],
#
#-----[ СЛЕД ТОЗИ РЕД, ДОБАВИ ]-----------------------------------------
#
"L_REFRESH_TIME" => $lang['Refresh_time'],
"L_REFRESH_TIME_EXPLAIN" => $lang['Refresh_time_explain'],
#
#-----[ НАМЕРИ ]------------------------------------------------
#
"PRUNE_NO" => $prune_no,
#
#-----[ СЛЕД ТОЗИ РЕД, ДОБАВИ ]-----------------------------------------
#
"REFRESH_TIME" => $new['refresh_time'],
#
#-----[ ОТВОРИ ]------------------------------------------------
#
includes/page_header.php
#
#-----[ НАМЕРИ ]------------------------------------------------
#
//
// Get basic (usernames + totals) online
#
#-----[ ПРЕДИ ТОЗИ РЕД, ДОБАВИ ]-----------------------------------------
#
if ($refresh_time_enable)
{
$refresh_time = $board_config['refresh_time'];
} else {
$refresh_time = -1;
}
if ( $refresh_time > 1 )
{
$template->assign_block_vars('switch_auto_refresh_on',array() );
}
#
#-----[ НАМЕРИ ]------------------------------------------------
#
'PRIVMSG_IMG' => $icon_pm,
#
#-----[ СЛЕД ТОЗИ РЕД, ДОБАВИ ]-----------------------------------------
#
'REFRESH_TIME' => $refresh_time,
#
#-----[ ОТВОРИ ]------------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ НАМЕРИ ]------------------------------------------------
#
$lang['Enable_prune'] = 'Enable Forum Pruning';
#
#-----[ СЛЕД ТОЗИ РЕД, ДОБАВИ ]-----------------------------------------
#
$lang['Refresh_time'] = 'Auto-Refresh Time (seconds)';
$lang['Refresh_time_explain'] = 'This will cause the page to automatically refresh so users can see new posts/information. If anything smaller than 1 is entered, the MOD will be disabled.';
#
#-----[ ОТВОРИ ]------------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ НАМЕРИ ]------------------------------------------------
#
</head>
#
#-----[ ПРЕДИ ТОЗИ РЕД, ДОБАВИ ]-----------------------------------------
#
<!-- BEGIN switch_auto_refresh_on -->
<noscript>
<meta http-equiv="refresh" content="{REFRESH_TIME}">
</noscript>
<script language="JavaScript">
<!--
setTimeout('location.href = location.href',1000*{REFRESH_TIME});
//-->
</script>
<!-- END switch_auto_refresh_on -->
#
#-----[ ОТВОРИ ]-----------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ НАМЕРИ ]------------------------------------------------
#
<tr>
<td class="row1">{L_ENABLE_PRUNE}</td>
<td class="row2"><input type="radio" name="prune_enable" value="1" {PRUNE_YES} /> {L_YES} <input type="radio" name="prune_enable" value="0" {PRUNE_NO} /> {L_NO}</td>
</tr>
#
#-----[ ПРЕДИ ТОЗИ РЕД, ДОБАВИ ]-----------------------------------------
#
<tr>
<td class="row1">{L_REFRESH_TIME}<br /><span class="gensmall">{L_REFRESH_TIME_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="refresh_time" size="4" maxlength="4" value="{REFRESH_TIME}" /></td>
</tr>
#
#-----[ SAVE И ЗАТВОРИ ВСИЧКИ ФАЙЛОВЕ ]--------------------------------
#


