Page 2 of 4

Posted: Wed Mar 23, 2005 7:56 pm
by *=Matt=*
Hey on your forums how did you get the bots stuff on your forums??? what mod is it

Posted: Wed Mar 23, 2005 8:07 pm
by MarcN
This MOD look really cool! I give it a try ;)

Posted: Thu Mar 24, 2005 12:05 am
by lowjoel
Oh the bots stuff is something that I'm currently coding and testing... I will release it once I have collected enough meta information about the robots. I am working on building the list of robots that crawl.

Posted: Thu Mar 24, 2005 4:34 pm
by *=Matt=*
ok cool :) when it is done can you hook me up with it to beta test it :)

Posted: Sun Apr 10, 2005 4:18 am
by lowjoel
sure why not? i have been busy adding bots to the definition list

Posted: Mon Apr 11, 2005 12:57 pm
by amjohnno
MOD works great, but I've just noticed a tiny little thing with the code:

Code: Select all

<br /><img src="{S_GZIP_IMG}" alt="{L_GZIP_ON}" /> {L_GZIP_ON}&nbsp;&nbsp;<img src="{S_QUERIES_IMG}" alt="{L_NUMBER_QUERIES}" alt="{L_NUMBER_QUERIES}" />{L_NUMBER_QUERIES}&nbsp;&nbsp;<img src="{S_GENERATION_IMG}" alt="{L_GENERATION_TIME}" /> {L_GENERATION_TIME}

Code: Select all

<img src="{S_QUERIES_IMG}" alt="{L_NUMBER_QUERIES}" alt="{L_NUMBER_QUERIES}" />
You've put two alt's instead of one. No big deal though. :)

Posted: Mon Apr 11, 2005 1:16 pm
by lowjoel
woops.... lol maybe its one of my mistakes.... but its weird that my board passes W3C xHTML validation even with this exact mod installed :?

Posted: Mon May 23, 2005 2:31 am
by callumw
I'm getting an error where the Generation time is 1 decimal to the left

therefore it shows 6.543 instead of 0.6543

Anyone think why?

FYI:
Intel Server
PHP Version 4.3.11
phpBB 2.0.15

Posted: Mon May 23, 2005 5:00 am
by lowjoel
it firstly depends on where the server is located (unlikely though - internationalizaation settings apply), but more likely, I think your server IS slow. Mine sometimes grinds to a halt and my page generation time can be up to 60+ seconds.

Posted: Mon May 23, 2005 9:29 am
by callumw
Trust me - it's not

Refresh is <1 sec so I know the problem is in the decimal

I shall PM you the link so you can see for yourself as the forum's not ready for public viewing yet

Posted: Mon May 23, 2005 10:38 am
by lowjoel
yea sure thanks :D i'll look into it.

Posted: Mon Jun 13, 2005 12:45 am
by ninosportif
Hi, I am having this problem folks.

Can someone help pls?
Parse error: parse error, unexpected $ in /var/www/html/phpbb/includes/page_tail.php on line 83


I have check 4 times, but i receive the same problem.

Can someone look at the code and tell me where was wrong?

Code: Select all

if ( !defined('IN_PHPBB') )
{
	die('Hacking attempt');
}

//
// Show the overall footer.
//
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';

$template->set_filenames(array(
	'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl')
);

$template->assign_vars(array(
	'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '',
	'ADMIN_LINK' => $admin_link)
);

//-------------------------- MOD: Forum Information MOD --------------------------
//delete
//$template->pparse('overall_footer');
//-------------------------- End MOD: Forum Information MOD --------------------------
//
// Close our DB connection.
//
$db->sql_close();

//
// Compress buffered output if required and send to browser
//
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);

//-------------------------- MOD: Forum Information MOD --------------------------
$endtime = microtime(); 
$endtime = explode(" ", microtime()); 
$endtime = $endtime[1] + $endtime[0]; 
$gentime = round(($endtime - $starttime), 5);
$template->assign_vars(array(
  'L_GENERATION_TIME' => sprintf($lang['L_GENERATION_TIME'], $gentime),
  'L_NUMBER_QUERIES' => sprintf($lang['L_MYSQL_QUERIES'],  $db->num_queries),
  'L_GZIP_ON' =>  ($board_config['gzip_compress']) ? $lang['L_GZIP_ENABLED'] : $lang['L_GZIP_DISABLED'],
  'S_GZIP_IMG' => $images['gzip'],
  'S_QUERIES_IMG' => $images['queries'],
  'S_GENERATION_IMG' => $images['generation']
)
);
$template->pparse('overall_footer');
//-------------------------- End MOD: Forum Information MOD --------------------------

exit;

?>
One thing is the line 83 is

Code: Select all

//-------------------------- End MOD: Forum Information MOD --------------------------
in here so do i need to change the

Code: Select all

$template->pparse('overall_footer');
somewhere else?

Just to let you know that i am using SubSilver and Aqua Template and those seems to be fine apart from the parse. So can someone help me pls?

Posted: Mon Jun 13, 2005 1:17 pm
by lowjoel
You made a few mistakes, let me point it out to you:

Code: Select all

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);
then you immediately jumped to my forum information code.

add

Code: Select all

	echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
	echo $gzip_contents;
	echo pack('V', $gzip_crc);
	echo pack('V', $gzip_size);
}
after the mentioned code above and it will parse perfectly. It throws this error coz a { was left out of the code.

Thanks for using my MOD,
Joel

Posted: Mon Jun 13, 2005 1:28 pm
by ninosportif
Great LowJoel

:p i just check that i have not got that code in my /includes/ page.tail.php

It must be the tireness from last night which i made this mistake.

Thx for pointing out and i have check again i miss this part of code... hehehe thx....

Posted: Mon Jun 13, 2005 1:38 pm
by lowjoel
no problemo :P lol just call me joel lol low's my last name... coz i dont see any other joels posting over in this topic! lol