orjinal hali 3 saatlik olan modun light hale getirilmiş ilk denemesidir...
- Kod: Tümünü seç
########################################
## MOD Title: OptimizeBB Light
## MOD Author: Oyo < oyo@u-web.org > (n/a) http://u-web.org
## MOD Author2: yakusha < yakusha@tnn.net > (sabri ünal) http://www.yakusha.net
##
## MOD Description:
## İlgili modun light hale getirilmiş halidir... Bu mod sunucuya binen veritabanı yükünü
## hafifletmeye yardımcı olmaktır. Verilen satır numaraları 2.0.18 sürümü içindir. sonraki sürümlerle
## uyuşmayabilir.
## MOD Version: 1.0.3
##
## Installation Level: İleri
## Installation Time: ~ 60 Dakika
## Files To Edit: (sayılmadı)
## --- liste eksik :common.php, ---
## Included Files: (n/a)
##
#########################################
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
#########################################
## Author Notes:## Bir faydası olduğu kanıtlanmamıştır. teorik olarak çalışması gerekmektedir fakat sunucu üstünde
## bunu test edecek bir deneme yapılmamıştır...
########################################
## MOD History:
##
## 2006-08-18 - Version 1.0.2
## - Light Version by yakusha - beta
##
## 2006-08-15 - Version 1.0.2
## - Light Version by yakusha - Alfa
##
## 2006-05-12 - Version 1.0.0
## - Première Version
##
#########################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#########################################
#
#-----[ OPEN ]---------------------------------------------
#
common.php, modcp.php, viewforum.php
#
#-----[ FIND ]---------------------------------------------
# Line 24
die("Hacking attempt");
}
//
#
#-----[ REPLACE WITH ]---------------------------------------------
#
die('Hacking attempt');
}
//
#
#-----[ FIND ]---------------------------------------------
# Line 28
error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
// The following code (unsetting globals)
// Thanks to Matt Kavanagh and Stefan Esser for providing feedback as well as patch files
#
#-----[ AFTER, ADD ]---------------------------------------------
#
@ini_set('register_globals',0);
@ini_set('variables_order','GPC');
@ini_set('register_argc_argv',0);
@ini_set('expose_php',0);
@ini_set('default_socket_timeout',10);
@ini_set('allow_url_fopen',0);
//@ini_set('display_errors','Off');
#
#-----[ FIND ]---------------------------------------------
# Line 52
if (isset($HTTP_POST_VARS['GLOBALS']) || isset($HTTP_POST_FILES['GLOBALS']) || isset($HTTP_GET_VARS['GLOBALS']) || isset($HTTP_COOKIE_VARS['GLOBALS']))
{
die("Hacking attempt");
}
// Protect against HTTP_SESSION_VARS tricks
if (isset($HTTP_SESSION_VARS) && !is_array($HTTP_SESSION_VARS))
{
die("Hacking attempt");
}
#
#-----[ REPLACE WITH ]---------------------------------------------
#
if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS']))
{
die("Hacking attempt");
}
// Protect against _SESSION tricks
if (isset($_SESSION) && !is_array($_SESSION))
{
die("Hacking attempt");
}
#
#-----[ FIND ]---------------------------------------------
# Line 216
while ( $row = $db->sql_fetchrow($result) )
{
$board_config[$row['config_name']] = $row['config_value'];
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ OPEN ]---------------------------------------------
#
modcp.php
#
#-----[ FIND ]---------------------------------------------
# Line 128
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}
$topic_row = $db->sql_fetchrow($result);
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ OPEN ]---------------------------------------------
#
viewforum.php
#
#-----[ FIND ]---------------------------------------------
# Line 128
WHERE forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 199
{
message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 220
{
message_die(GENERAL_ERROR, 'Could not query forum moderator information', '', __LINE__, __FILE__, $sql);
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 252
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain limited topics count information', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ OPEN ]---------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]---------------------------------------------
# Line 81
LIMIT 1";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain newer/older topic information', '', __LINE__, __FILE__, $sql);
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 123
message_die(GENERAL_ERROR, "Could not obtain newer/older topic information", '', __LINE__, __FILE__, $sql);
}
#
#-----[ REPLACE WITH ]---------------------------------------------
#
message_die(GENERAL_ERROR, 'Could not obtain newer/older topic information', '', __LINE__, __FILE__, $sql);
}
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 166
//
#
#-----[ REPLACE WITH ]---------------------------------------------
#
$db->sql_freeresult($result);
//
#
#-----[ FIND ]---------------------------------------------
# Line 221
message_die(GENERAL_ERROR, "Could not obtain topic watch information", '', __LINE__, __FILE__, $sql);
}
#
#-----[ REPLACE WITH ]---------------------------------------------
#
message_die(GENERAL_ERROR, 'Could not obtain topic watch information', '', __LINE__, __FILE__, $sql);
}
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 238
message_die(GENERAL_ERROR, "Could not delete topic watch information", '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ REPLACE WITH ]---------------------------------------------
#
message_die(GENERAL_ERROR, 'Could not delete topic watch information', '', __LINE__, __FILE__, $sql);
}
$db->sql_freeresult($result);
}
#
#-----[ FIND ]---------------------------------------------
# Line 262
message_die(GENERAL_ERROR, "Could not update topic watch information", '', __LINE__, __FILE__, $sql);
}
}
}
}
#
#-----[ REPLACE WITH ]---------------------------------------------
#
message_die(GENERAL_ERROR, 'Could not update topic watch information', '', __LINE__, __FILE__, $sql);
}
$db->sql_freeresult($result);
}
}
}
#
#-----[ FIND ]---------------------------------------------
# Line 280
message_die(GENERAL_ERROR, "Could not insert topic watch information", '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ REPLACE WITH ]---------------------------------------------
#
message_die(GENERAL_ERROR, 'Could not insert topic watch information', '', __LINE__, __FILE__, $sql);
}
$db->sql_freeresult($result);
}
#
#-----[ FIND ]---------------------------------------------
# Line 333
message_die(GENERAL_ERROR, "Could not obtain limited topics count information", '', __LINE__, __FILE__, $sql);
}
#
#-----[ REPLACE WITH ]---------------------------------------------
#
message_die(GENERAL_ERROR, 'Could not obtain limited topics count information', '', __LINE__, __FILE__, $sql);
}
$db->sql_freeresult($result);
/**** includes klasörleri **********/
#
#-----[ OPEN ]---------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]---------------------------------------------
# Line 52
{
return false;
}
$row = $db->sql_fetchrow($result);
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 217
$category_rows = array();
while ( $row = $db->sql_fetchrow($result) )
{
$category_rows[] = $row;
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 227
ORDER BY cat_id, forum_order";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql);
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 413
WHERE themes_id = ' . $board_config['default_style'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not query database for theme info');
}
//bende aşağıdaki gibi geçiyor o kısım
/***********************************
WHERE themes_id = ' . (int) $board_config['default_style'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not query database for theme info');
}
**************************************/
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 426
if ( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, 'Could not update user theme info');
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 634
{
$orig_word[] = '#\b(' . str_replace('\*', '\w*?', preg_quote($row['word'], '#')) . ')\b#i';
$replacement_word[] = $row['replacement'];
}
while ( $row = $db->sql_fetchrow($result) );
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ OPEN ]---------------------------------------------
#
includes/functions_admin.php
#
#-----[ FIND ]---------------------------------------------
# Line 73
while( $row = $db->sql_fetchrow($result) )
{
sync('forum', $row['forum_id']);
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 87
while( $row = $db->sql_fetchrow($result) )
{
sync('topic', $row['topic_id']);
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 180
}
$db->sql_freeresult($result);
}
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
/********** admin klasörleri *************/
#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_disallow.php
#
#-----[ FIND ]---------------------------------------------
# Line 116
$disallow_select .= '<option value="' . $disallowed[$i]['disallow_id'] . '">' . $disallowed[$i]['disallow_username'] . '</option>';
}
}
$disallow_select .= '</select>';
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_forums.php
#
#-----[ FIND ]---------------------------------------------
# Line 99
$sql = "SELECT *
FROM $table
WHERE $idfield = $id";
#
#-----[ REPLACE WITH ]---------------------------------------------
#
$db->sql_freeresult($result);
$sql = 'SELECT *
FROM '.$table.'
WHERE '.$idfield.' = '.$id;
#
#-----[ FIND ]---------------------------------------------
# Line 105
#
#-----[ FIND ]---------------------------------------------
# Line 112
$return = $db->sql_fetchrow($result);
$return['number'] = $count;
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 159
{
$s = " selected=\"selected\"";
}
$catlist .= "<option value=\"$row[$idfield]\"$s>" . $row[$namefield] . "</option>\n";
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 282
}
#
#-----[ FIND ]---------------------------------------------
# Line 285
}
#
#-----[ FIND ]---------------------------------------------
# Line 290
}
#
#-----[ REPLACE WITH ]---------------------------------------------
#
$db->sql_freeresult($result);
}
#
#-----[ FIND ]---------------------------------------------
# Line 494
$row = $db->sql_fetchrow($result);
$max_order = $row['max_order'];
$next_order = $max_order + 10;
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ FIND ]---------------------------------------------
# Line 784
}
else
{
$select_to = $lang['Nowhere_to_move'];
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_groups.php
#
#-----[ FIND ]---------------------------------------------
# Line 384
do
{
$select_list .= '<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
}
while ( $row = $db->sql_fetchrow($result) );
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_smilies.php
#
#-----[ FIND ]---------------------------------------------
# Line 526
$smilies = $db->sql_fetchrowset($result);
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_ug_auth.php
#
#-----[ FIND ]---------------------------------------------
# Line 966
do
{
$select_list .= '<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
}
while ( $row = $db->sql_fetchrow($result) );
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]---------------------------------------------
# Line 992
$rank_id = $row['rank_id'];
$selected = ( $this_userdata['user_rank'] == $rank_id ) ? ' selected="selected"' : '';
$rank_select_box .= '<option value="' . $rank_id . '"' . $selected . '>' . $rank . '</option>';
}
#
#-----[ AFTER, ADD ]---------------------------------------------
#
$db->sql_freeresult($result);
#
#-----[ SAVE/CLOSE ALL FILES ]---------------------------------------------
#
#EOM
--------------[ OPTIONALS ]-----------------------------------------------
#
#-----[ OPEN ]---------------------------------------------
# open all php files in your forum's
root/*.*.php
#
#-----[ FIND ]---------------------------------------------
#
Couldn't
#
#-----[ REPLACE ]---------------------------------------------
#
Could not
#
#-----[ SAVE/CLOSE ALL FILES ]---------------------------------------------
#
#EOM