Archive for September, 2006

Google Reader Makeover

September 29th, 2006 Mark 2 comments

My feed reader of choice, Google Reader has had quite a makeover


I much prefer this new interface, it looks more like bloglines now but a couple of things really impressed me..

Infinite scroll

In the screenshot I’ve selected “All Items”, Google Reader will pull approx 20 at a time, when you near the bottom of the list a further 20 are added to the bottom.. scroll forever!

Mark as read

As you scroll through stories reading them, as a story comes into your view and reaches the top, it is automatically marked as read

I’ll continue to explore the new features but it seems like a winner to me.. more later!

Categories: Internet Tags:

WordPress: Speed up ‘Manage Pages’ admin page

September 25th, 2006 Mark 1 comment

One of my websites about health, fitness and bodybuilding uses a lot of pages in WordPress (i.e. uses WordPress as a CMS)

The Manage -> Pages screen always times out (php script >30sec execution time)

The solution is to edit admin-functions.php and find the ‘page_rows()’ function

Now comment out the following line:


so it looks like this:

   // start_wp();

Voila, almost instant listing of all pages. I’m quite sure that ‘start_wp()’ function has no place there anyway after reading the description of what it does

Categories: Website Tags:

phpBB mods: bbcode for ifilm, youtube and google video embedding

September 21st, 2006 Mark 16 comments

I wanted to be able to embed videos from various services into forum posts on CoopersGuns Health, Fitness & BodyBuilding Forums so I decided to have a play with modifying the bbcode processor and here’s what I’ve come up with..

Modification instructions

Make the following modifications to forum/includes/bbcode.php

  • Find the bbencode_first_pass function
  • Locate the end of the function

	// Remove our padding from the string..
	return substr($text, 1);
  • Add the following just before the above:

	// [ifilm] and [/ifilm]
	$text = preg_replace("#\[ifilm=([0-9]+[,][0-9]+[,][0-9]+)\](.*?)\[/ifilm\]#si", "[ifilm=\\1:$uid]\\2[/ifilm:$uid]", $text);

	// [youtube] and [/youtube]
	$text = preg_replace("#\[youtube=([0-9]+[,][0-9]+[,][0-9a-z\-_]+)\](.*?)\[/youtube\]#si", "[youtube=\\1:$uid]\\2[/youtube:$uid]", $text);

	// [gvid] and [/gvid]
	$text = preg_replace("#\[gvid=([0-9]+[,][0-9]+[,][0-9a-z\-_]+)\](.*?)\[/gvid\]#si", "[gvid=\\1:$uid]\\2[/gvid:$uid]", $text);
  • Find the bbencode_second_pass function
  • Locate the part that deals with [QUOTE]

	// [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff.
	$text = str_replace("[quote:$uid]", $bbcode_tpl['quote_open'], $text);
	$text = str_replace("[/quote:$uid]", $bbcode_tpl['quote_close'], $text);
  • Add the following code after the above:

	// [ifilm] and [/ifilm]
	$text = preg_replace("#\[ifilm=([0-9]+)[,]([0-9]+)[,]([0-9]+):$uid\](.*?)\[/ifilm:$uid\]#si", "", $text); 	

	// [youtube] and [/youtube]
	$text = preg_replace("#\[youtube=([0-9]+)[,]([0-9]+)[,]([0-9a-z\-_]+):$uid\](.*?)\[/youtube:$uid\]#si", ""."[/youtube:$uid]", $text);
	$text = str_replace("[/youtube:$uid]", "", $text); 		

	// [gvid] and [/gvid]
	$text = preg_replace("#\[gvid=([0-9]+)[,]([0-9]+)[,]([0-9a-z\-_]+):$uid\](.*?)\[/gvid:$uid\]#si", ""."[/gvid:$uid]", $text);
	$text = str_replace("[/gvid:$uid]", "", $text);
  • Save your changes to bbcode.php and upload the modified file (if you downloaded it to modify)

That’s it.. you can now embed iFilm, YouTube and Google Video videos into your forum posts


The syntax is similar for all three:




CoopersGuns Health, Fitness & BodyBuilding Forums Post

Categories: Internet, Programming, Website Tags: