Page 2 of 2

Re: Adding CrawlTrack

PostPosted: Sat Nov 17, 2007 8:18 am
Author: CaNNon
Now that you have access to the tool page check the suppress a bot, (don't do it though as you will stop the bot) if you manage to find anything not on the list let me know. <img>

PostPosted: Sat Nov 17, 2007 9:59 am
Author: richiebgood
I deleted the crawler code from portal.php and index.php and instead added it to includes/page_tail.php instead.

Now crawtracker tracks the whole site and now just entry pages.

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' ])? $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;          //-- adding CrawlTracker ( location 1 ) ----------------------------------------------------$crawltsite=1;require_once("/home/irishpai/public_html/paintballer/crawltrack/crawltrack.php");// end add            //// 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;  ?>

Re: Adding CrawlTrack

PostPosted: Sat Nov 17, 2007 11:58 am
Author: CaNNon
double check the security link I pm'ed you and check times I would like to know if it picked up that attempt while it was in the tail or the portal and index.

I'm wondering, might it be better to use 3 locations for the extra security?

PostPosted: Sat Nov 17, 2007 12:05 pm
Author: richiebgood
Oh I see what you mean now. The attack happened yesterday, I only changed the code into the page_tail today about 5 hours ago.

Re: Adding CrawlTrack

PostPosted: Sat Nov 17, 2007 12:07 pm
Author: CaNNon
Yea I want the best of both worlds <img>

maybe even checking for a better spot to add our line. I don't have the traffic you do I'm just using this on a clan site.

PostPosted: Sat Nov 17, 2007 12:21 pm
Author: richiebgood
I don't really know where is the best place to add or if it makes a difference. The only knowledge i have of php is to keep changing stuff untill i get an error, undo, and do something else <img>

I now have crawl tracker security on and cracker on, so i should be save enough. Perhaps some more senior members can assist with the correct / proper placement of the code.

Re: Adding CrawlTrack

PostPosted: Wed Nov 21, 2007 12:12 am
Author: CaNNon
Try adding the code to the top of common.php with portal.php richie. I'm testing it now. JidÃÂ ©bÃÂ © offered it as a possible solution in his forum.

It seems to be covering everything but i would like you to test it too.

[Tip] Add your own url to crawl track trusted sites

PostPosted: Wed Nov 21, 2007 2:48 pm
Author: richiebgood
Don't forget, once you have crawltracker installed, add your own url to the trusted sites list via the tool page. If you don't, things like the 'email topic' button in IM will get blocked.

Re: Adding CrawlTrack

PostPosted: Wed Nov 21, 2007 9:52 pm
Author: CaNNon
Ok common.php is the way to go, I have edited the first post with the change.

After 24 hours of watching it, I get all the forum links like you wanted plus the security I wanted think were good to go. <img>

PostPosted: Fri Mar 07, 2008 10:29 am
Author: salmercker
has anything changed for this would love to add it to my site and my friend __chandler__ site. I am the one that does 90% of the code edits, upgrades, and mods.

Re: Adding CrawlTrack

PostPosted: Fri Mar 07, 2008 5:20 pm
Author: CaNNon
Yep everything was keep up to date in my first post. <img>
Everything else just do as the crawltracker install file says.