Recent Topics

1 May 11, 2006 12:34    

Hi all

I want to have my static page set a cookie when loaded.

Is there anyway to customise the static page generation to insert code at the top of the page for the cookie??

Cheers!

2 May 11, 2006 13:16

You'd need to hack admin/b2blogs.php, find this bit of code and add what you need to $page :-

<?php
$page = ob_get_contents();
		ob_end_clean();
		unset( $generating_static );
?>

example :-


<?php
$content_to_add = '<?php echo \'hello world\'; ?>';

$page = $content_to_add.ob_get_contents();
?>

You'll also need to goto admin > blogs > <blogname> > advanced and change the static filename to be a php page.

¥

3 May 11, 2006 14:11

Excellent - Worked like a charm - thanks for the speedy reply


Form is loading...