Many congratulations to the button server for serving over a million button impressions in September.
Not a bad start for a small bit of PHP/javascript code initially thrown together one Sunday morning in June!
… and you ain’t seen nothing yet …
Politics, innovation and technology…
Many congratulations to the button server for serving over a million button impressions in September.
Not a bad start for a small bit of PHP/javascript code initially thrown together one Sunday morning in June!
… and you ain’t seen nothing yet …
For some reason the original post for the new video news feed didn’t appear in Lib Dem Blogs, so here’s a link to the original post which explains how to add the party’s new (test) video feed to your site.
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…
The server hosting the script to display buttons is behaving a bit strangely, so I’ve had to update the Widget script to default to javascript if the standard readfile
command returns a null result.
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…