sabri ünal 23.05.2006, 12:31
Mod testi sonucu: Cache klasörü chmod izinleri 777 olduğu sürece hata vermiyor... Yönetim ANA sayfasının hızlanmasında bir hayli katkısı oluyor ve gereksiz yere ana sayfa her tıklandığında phpBB ana sitesine bağlanmaya çalışmıyor....
- Kod: Tümünü seç
################################################################## MOD Title: Version Cache mod
## MOD Version: 0.03
## MOD Author: CyberAlien <no@public_email> (Vjacheslav Trushkin) http://www.phpbbstyles.com
## MOD Description:
## Versiyon bilgisini 24 saatliğine bellekler ve böylece yönetim panelinin daha hızlı çalışmasını sağlar
##
## Installation Level: Easy
## Installation Time: 2 Dakika
## Files To Edit (1): admin/index.php
##############################################################
## 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/
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ AÇ ]---------------------------------------------
#
admin/index.php
#
#-----[ BUL ]---------------------------------------------
# around line 570
if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr, 10))
{
#
#-----[ ÖNCESİNE EKLE ]---------------------------------------
#
// Version cache mod start
// Change following two variables if you need to:
$cache_update = 86400; // 24 hours cache timeout. change it to whatever you want
$cache_file = '../cache/phpbb_update_' . $board_config['default_lang'] . $board_config['version'] . '.php'; // file where to store cache
$do_update = true;
if(@file_exists($cache_file))
{
$last_update = 0;
$version_info = '';
@include($cache_file);
if($last_update && !empty($version_info) && $last_update > (time() - $cache_update))
{
$do_update = false;
}
else
{
$version_info = '';
}
}
if($do_update)
{
// Version cache mod end
#
#-----[ BUL ]---------------------------------------------
# around line 641
$version_info .= '<p>' . $lang['Mailing_list_subscribe_reminder'] . '</p>';
#
#-----[ SONRASINA EKLE ]---------------------------------------
#
// Version cache mod start
if(@$f = fopen($cache_file, 'w'))
{
$search = array('\\', '\'');
$replace = array('\\\\', '\\\'');
fwrite($f, '<' . '?php $last_update = ' . time() . '; $version_info = \'' . str_replace($search, $replace, $version_info) . '\'; ?' . '>');
fclose($f);
@chmod($cache_file, 0777);
}
}
// Version cache mod end
#
#-----[ KAYDET - KAPAT ]------------------------------------------
#
# EoM
En son sabri ünal tarafından, 04.01.2007, 09:59 tarihinde değiştirildi, toplamda 1 değişiklik yapıldı.
Mutluyum, biraz komedi takılıyorum! sakın kızmayın yakında geçer, sebebini ben de bilmiyorum! yeni bir aşk da bulmuş değilim!