Dell Sigmatel delayed sounds in Vista

September 14th, 2007 Mark No comments

I’ve now got a couple of machines that run Windows Vista and I noticed with the first machine that Vista’s event sounds were somewhat delayed from the event occuring, e.g. the sound you experience when UAC prompt pops up wouldn’t be in sync with the actual popup of the dialog box, but a second or so later.

Anyway, I googled it and the solution is to disable enhancements for the playback device in use. Screenshot below!

Screenshot

Categories: Hardware, Windows Tags:

WordPress Upgrade

August 13th, 2007 Mark No comments

I’ve upgraded WordPress on this domain to the latest version and will be upgrading all my other WordPress installs as soon as possible. Someone managed to upload an eggdrop via a WordPress 2.0.6 exploit..

Some stuff isn’t looking quite right, e.g. code in posts is currently bursting out of the content space into the sides – I’ll fix it as soon as I get a minute

Categories: Website Tags:

Loss of traffic headache!!

July 18th, 2007 Mark No comments

If you change the structure of your website, check the damn AdWords Ads still point to the correct location!

Doh..

Categories: Website Tags:

*nix – deleting all files in a folder (0000′s)

May 8th, 2007 Mark No comments

When ‘rm’ says ‘too many arguments’, use the following to erase all the files in a folder:

find . -type f -print | xargs -n 20 rm
Categories: Linux, SysAdmin, Website Tags:

Tiscali DSL issue and solution

April 17th, 2007 Mark No comments

Yesterday something went a bit weird with my parents DSL.. it was working all right up until then. Apparently around 4:30pm, the router lost its connection and then reconnected. My dad told me there were a few BT vans in the street so I’m not sure if they were messing with DSLAMs in the green boxes something like that.

Anyway, what happened after the reset had me a bit stumped until this morning when I realised what was happening. The symptoms of the problem were that basically only a few random websites were working.. Google happened to be one of them and a handful of others. The others would sit on ‘loading’ but never actually load the page. MSN messenger wouldn’t work. SSH would work until a certain number of characters had been transferred… that was what made me think of MTU..

So I managed to view a few sites about Tiscali MTU via Google Cache. They all said Tiscali’s recommened MTU was 1500, however that’s what the routers WAN interface was already set to. I Googled a bit more and found BT’s DSL recommended MTU was 1458… 10 seconds later I’d changed the Speedtouch 510v4 to use this value and everything worked!

So there you go, 15 hours of downtime because of some shitty MTU problem! Hope this solves the issue if anybody else encounters such a weird problem!

Categories: Hardware, Internet Tags:

Why isn’t Amavis scanning certain mails?

October 19th, 2006 Mark No comments

Doh.. because they’re too big!

I noticed in my mail server logs that some emails weren’t getting SA scanned and tagged and wondered why.. they weren’t internal emails and should have been scanned.. then I remembered that there’s a size limit to the scanning :)

Categories: SysAdmin, Website Tags:

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:


   start_wp();

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

Usage

The syntax is similar for all three:

[ifilm=width,height,id]description[/ifilm]

[youtube=width,height,id]description[/youtube]

[gvid=width,height,id]description[/gvid]

Example:
CoopersGuns Health, Fitness & BodyBuilding Forums Post

Categories: Internet, Programming, Website Tags:

WordPress 2.0.4

August 17th, 2006 Mark 1 comment

I’ve just updated this site to use WordPress 2.0.4 (was using 2.0.3 + a plugin which fixed a few 2.0.3 flaws).

Unfortunately I forgot that I’d manually modified the k2 theme and overwrote my changes with the update.  My sidebar has therefore resorted to its former glory and is missing my dugg items and Google starred items.. did I have a backup anywhere?  of course I didn’t!

Oh well, I’ll add them back again when I get a minute

Thankfully, I’m feeling a little better now, still have a nasty cough though which is quite annoying

Categories: Website Tags: