Who knows about the changes made to page_tail.php?

Support for IntegraMOD 141

Moderator: Integra Moderator

Who knows about the changes made to page_tail.php?

PostAuthor: Frost » Fri Mar 02, 2007 1:49 am

Your phpBB Version: 2.0.
phpBB Type: Integramod 141
MODs: No
Your knowledge: Advanced Knowledge
Board URL: http://www.black-fusion.com/forum/

PHP Version:
MySQL Version:


What was done before the problem appeared?
N/A


What was done to try to solve the problem?
N/A



De.scription and Message

Hey I was wanting to know who knows about the changes made to page_tail.php because I have a mod I want to use but I cant because the original code was altered.

Funny thing is, it says right in the mod to use it with integramod's built in bots management... but the code to find isn't there...

Here is the part of the mod in question (whole mod available if needed)

Code: Select all
##-----[ OPEN ]------------------------------------------#  includes/page_tail.php  ##-----[ FIND ]------------------------------------------#  if ( $do_gzip_compress ){     //     // Borrowed from php.net!     //     $gzip_contents = ob_get_contents();     ob_end_clean();       $gzip_size = strlen($gzip_contents);     $gzip_crc = crc32($gzip_contents);       $gzip_contents = gzcompress($gzip_contents, 9);     $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);       echo "x1fx8bx08x00x00x00x00x00";     echo $gzip_contents;     echo pack('V', $gzip_crc);     echo pack('V', $gzip_size);}  ##-----[ REPLACE, WITH  ]------------------------------------------#  if ( $do_gzip_compress ){     //     // Borrowed from php.net!     //     $gzip_contents = ob_get_contents();     ob_end_clean();     echo rewrite_urls($contents);     global $dbg_starttime;           $gzip_size = strlen($gzip_contents);     $gzip_crc = crc32($gzip_contents);       $gzip_contents = gzcompress($gzip_contents, 9);     $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);       echo "x1fx8bx08x00x00x00x00x00";     echo $gzip_contents;     echo pack('V', $gzip_crc);     echo pack('V', $gzip_size);}else{     $contents = ob_get_contents();     ob_end_clean();     echo rewrite_urls($contents);     global $dbg_starttime;}  


And here is my page_tail.php

Code: Select all
<php>sql_query($sql)) )       {           message_die(GENERAL_ERROR, "Couldn't update banners data", "", __LINE__, __FILE__, $sql);       }  }      // End add - Complete banner MOD      global $do_gzip_compress;      //  // Show the overall footer.  //  include_once($phpbb_root_path . 'includes/functions_jr_admin.' . $phpEx);  $admin_link = jr_admin_make_admin_link();  $cookies_link = '<a>' . $lang['cookies_link'] . '</a>';      $template->set_filenames(array(       'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')  );      include_once($phpbb_root_path . 'ctracker/engines/ct_footer.' . $phpEx);  $output_login_status = ($userdata['ct_enable_ip_warn'])? $lang['ctracker_ma_on'] : $lang['ctracker_ma_off'];      //Begin Lo-Fi Mod  $path_parts = pathinfo($_SERVER['PHP_SELF']);  $lofi = '<a>' . (empty($_COOKIE['lofi']) ? ($lang['Lofi']) : ($lang['Full_Version']) ) . '</a><br>';  $template->assign_vars(array(       'L_LOFI' => $lang['Lofi'],       'LOFI' => $lofi,       'L_FULL_VERSION' => $lang['Full_Version'])  );  //End Lo-Fi Mod      //  // IM Portal  //      if(!$layout_forum_wide_flag&&$portal_config['portal_tail']&&(!defined('HAS_DIED'))&&(!defined('IN_LOGIN')))  {       $template->set_filenames(array(           'portal_tail'         => 'portal_page_tail.tpl')       );       portal_parse_blocks($portal_config['default_portal'], TRUE, 'tail');       $template->assign_vars(array('PORTAL_TAIL' => portal_assign_var_from_handle($template, 'portal_tail')));  }              include($phpbb_root_path . 'includes/pseudocron.'.$phpEx);      //  // Close our DB connection.  //  $db->sql_close();          /* Un-comment the line below to restrict Admins only to view page generation info */      //if( ($userdata['session_logged_in']) and ($userdata['user_level'] == ADMIN) )  //{       $gzip_text = ($board_config['gzip_compress']) ? 'GZIP enabled' : 'GZIP disabled';           $debug_text = (DEBUG == 1) ? 'Debug on' : 'Debug off';           $excuted_queries = $db->num_queries;           $mtime = microtime();       $mtime = explode(" ",$mtime);       $mtime = $mtime[1] + $mtime[0];       $endtime = $mtime;           $gentime = round(($endtime - $starttime), 4);           $sql_time = round($db->sql_time, 4);           $sql_part = round($sql_time / $gentime * 100);       $php_part = 100 - $sql_part;      //}*/  if( defined('DEBUG') )  {       $debug_out = '<div>[Page generation time: '. $gentime .'s (PHP: '. $php_part .'% | SQL: '. $sql_part .'%) | SQL queries: '. $excuted_queries .' | '. $gzip_text .' | '. $debug_text .']</div>';  }  else  {       $debug_out = '<br>';  }      $template->assign_vars(array(       'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? ' ' . '2' . $board_config['version'] : '',       'INTEGRAMOD_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? ' ' . $board_config['integramod_version'] : '',       'BLOCKED'    => str_replace('%T%', '<b>'. number_format($board_config['phpBBSecurity_total_attempts']) .'</b>', $lang['PS_blocked_line']),       'PROTECTED'  => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? ' ' . $lang['PS_blocked_line2'].' :: ' : 'Protected by phpBB Security ÂÂÂ © <a>phpBB-Amod</a> ::',       'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : ''),       'COOKIES_LINK' => $cookies_link,       'CRACKER_TRACKER_FOOTER' => create_footer_layout($ctracker_config->settings['footer_layout']),       'L_STATUS_LOGIN' => ($ctracker_config->settings['login_ip_check'])? sprintf($lang['ctracker_ipwarn_info'], $output_login_status) : '',       'ADMIN_LINK' => $admin_link,       //'INTEGRAMODCOPY' => "Powered by <a>IntegraMOD</a> $iversion ÂÂÂ © 2004, 2005, 2006 The Integramod Group",       'STYLECW' => "Style <a>Integra2 </a> ÂÂÂ © IntegraMod Team 2007",       )  );      $template->pparse('overall_footer');      echo $debug_out;      //  // Compress buffered output if required and send to browser  //  if( $do_gzip_compress && headers_sent() != TRUE )  {       $gzip_contents = ob_get_contents();       ob_end_clean();       $gzip_size = strlen($gzip_contents);       $gzip_crc = crc32($gzip_contents);       $gzip_contents = gzcompress($gzip_contents, 9);       $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);       $gzip_contents .= pack("V",$gzip_crc) . pack("V", $gzip_size);       header("Content-Encoding: gzip");       header("Vary: Accept-Encoding");       header("Content-Length: ".strlen($gzip_contents));       header('X-Content-Encoded-By: Integramod '.$board_config['integramod_version']);       echo "x1fx8bx08x00x00x00x00x00";       echo $gzip_contents;  }  exit;      ?>


Apparently the requested segment has been turned into a global, so how would I add the bit for the mod to work?

Original mod in question is [url=http]HERE[/url]
Last edited by Frost on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[size=99px]PhpBB3 Themes[/url] ]PhpBB3 Development Center[/url] [/size]

Frost
Sr Integra Member
Sr Integra Member
 
Posts: 776
Likes: 0 post
Liked in: 0 post
Joined: Wed Sep 13, 2006 2:04 am
Cash on hand: 0.00
Location: Photoshop CS3

Re: Who knows about the changes made to page_tail.php?

PostAuthor: Frost » Fri Mar 02, 2007 1:57 am

Well, after looking closer I decided to try changing replacing original code with this...

Code: Select all
//  if( $do_gzip_compress && headers_sent() != TRUE )  {       $gzip_contents = ob_get_contents();       ob_end_clean();       echo rewrite_urls($contents);       global $dbg_starttime;         $gzip_size = strlen($gzip_contents);       $gzip_crc = crc32($gzip_contents);       $gzip_contents = gzcompress($gzip_contents, 9);       $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);       $gzip_contents .= pack("V",$gzip_crc) . pack("V", $gzip_size);       header("Content-Encoding]);       echo "x1fx8bx08x00x00x00x00x00";       echo $gzip_contents;}  else{     $contents = ob_get_contents();     ob_end_clean();     echo rewrite_urls($contents);     global $dbg_starttime;}  exit;


I haven't saved yet so I'm about to test it out :-?

Dont tell me something like this was already included in Imod..

Edit - RE:Follow up...

Oops <img>
[code]Parse error]

Removed } I left before exit;
Last edited by Frost on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[size=99px]PhpBB3 Themes[/url] ]PhpBB3 Development Center[/url] [/size]

Frost
Sr Integra Member
Sr Integra Member
 
Posts: 776
Likes: 0 post
Liked in: 0 post
Joined: Wed Sep 13, 2006 2:04 am
Cash on hand: 0.00
Location: Photoshop CS3

Re: Who knows about the changes made to page_tail.php?

PostAuthor: Frost » Fri Mar 02, 2007 2:16 am

ok... this apparently does not work <img>

Code: Select all
The requested URL /viewforum.php was not found on this server.


The url at the time of the error was "http://www.black-fusion.com/forum/updates-vf1.html"

The url before the mod was "http://www.black-fusion.com/forum/viewforum.php?f=1"

So basically it did change the urls to html but that part of the mod is messing it up or there is a conflict somewhere else. I've replaced backups for now, but it would have been cool if it would have worked lol
Last edited by Frost on Wed Dec 31, 1969 5:00 pm, edited 1 time in total.
[size=99px]PhpBB3 Themes[/url] ]PhpBB3 Development Center[/url] [/size]

Frost
Sr Integra Member
Sr Integra Member
 
Posts: 776
Likes: 0 post
Liked in: 0 post
Joined: Wed Sep 13, 2006 2:04 am
Cash on hand: 0.00
Location: Photoshop CS3


Return to IntegraMOD 141

Who is online

Registered users: App360MonitorBot, Bing [Bot], Google [Bot]