Igorek
Junior Member | Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору Хак наз-ся Get rid of Redirects Находится здесь http://www.ibresource.com/index.php?pg=db&mod=1023 Вот описание: Save your Viewers some time getting to the next page and yourself some bandwidth. The time part is obvious, the bandwidth need elaboration. Semi-Worst Case Scenario for IBResource.Com... At the time I'm Typing this, 13656 Registered Members. The Redirect page for a Search is 7kb. If every one of those members did 1 search today, that'd mean 95.6mb of bandwidth. Now if each registered member did 1 search a day for 30 days... 2.9gb worth of Transfer. Not to mention when people Log In And Out, and when multiple users do multiple searches. Just think about how many redirects come up. After posts... Do everyone a favor and use this. Или сам хак: В файле /sources/functions.php найти: Код: function redirect_screen($text="", $url="") { global $ibforums, $skin_universal, $DB; if ($ibforums->input['debug']) { flush(); exit(); } $url = $start . "?s={$ibforums->session_id}&".$url; $ibforums->lang['stand_by'] = stripslashes($ibforums->lang['stand_by']); $css = "\n<style>\n<!--\n".str_replace( "<#IMG_DIR#>", $ibforums->skin['img_dir'], $ibforums->skin['css_text'] )."\n//-->\n</style>"; $htm = $skin_universal->Redirect($text, $url, $css); $TAGS = $DB->query("SELECT macro_value, macro_replace FROM ibf_macro WHERE macro_set='{$ibforums->skin['macro_id']}'"); while ( $row = $DB->fetch_row($TAGS) ) { if ($row['macro_value'] != "") { $htm = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $htm ); } } $htm = str_replace( "<#IMG_DIR#>", $ibforums->skin['img_dir'], $htm ); // Close this DB connection $DB->close_db(); // Start GZIP compression if ($ibforums->vars['disable_gzip'] != 1) { ob_start ('ob_gzhandler'); } $this->do_headers(); echo ($htm); exit; } | Заменить на: Код: function redirect_screen($text="", $url="") { global $DB, $std, $ibforums; if ($ibforums->input['debug']) { flush(); exit(); } $url = $start . "?s={$ibforums->session_id}&".$url; $css = "\n<style>\n<!--\n".str_replace( "<#IMG_DIR#>", $ibforums->skin['img_dir'], $ibforums->skin['css_text'] )."\n//-->\n</style>"; $TAGS = $DB->query("SELECT macro_value, macro_replace FROM ibf_macro WHERE macro_set='{$ibforums->skin['macro_id']}'"); while ( $row = $DB->fetch_row($TAGS) ) { if ($row['macro_value'] != "") { $htm = str_replace( "<{".$row['macro_value']."}>", $row['macro_replace'], $htm ); } } $htm = str_replace( "<#IMG_DIR#>", $ibforums->skin['img_dir'], $htm ); $DB->close_db(); if ($ibforums->vars['disable_gzip'] != 1) { ob_start ('ob_gzhandler'); } $std->boink_it($url); echo ($htm); exit; } | Загрузить файл на место и пользоваться |