Video news feed

I’ve just put together a bit of HTML code that lets you display the latest party video on your website as follows.

The basic code is:

<script type="text/javascript"
src="http://petitions.libdems.org.uk/showTV.php">
</script>

To set a particular width in pixels, just add some code like ?width=200 to set the width of your video box, giving something like:

<script type="text/javascript"
src="http://petitions.libdems.org.uk/showTV.php?width=200">
</script>

To get the code in a form suitable for including in a PHP readfile, add &format=html to your URL.

@readfile("http://petitions.libdems.org.uk/showTV.php?width=200&format=html")

This should automatically update whenever a new video is added…

Lib Dem buttons via Javascript

Another nifty piece of Javascript for you all…

This one generates the following party campaign buttons shown on the right hand side front page of this site (just below the Lib Dem blogs box):

<script type="text/javascript" 
   src="http://petitions.libdems.org.uk/showButtons.php"></script>

And when new campaigns are launched nationally, the buttons should update automatically.

Now to widgetise it…