New Wiki site for Football FanCast

Date: 20th July 2009 at 5:30 pm | Filed under: development, portfolio | Author: Sam Burdge | Tags: , , ,

fanswiki-screen

I have recently been working on my first project on the MediaWiki platform, a football wiki site for FootballFanCast.com. The Football Fans Wiki is a wiki written from the fans perspective, with information about each team's stadium, transport info, where to eat & drink locally, songs, programmes, merchandise store, links,video clips & more.

Key features that I added as MediaWiki extensions:

  • Register and login from the FFC site instead of through MediaWiki itself
  • News & blog feeds on the wiki homepage

Check it out now: Fans Wiki

2 Responses to “New Wiki site for Football FanCast”

  • Comment by Andy
    Date: September 15th, 2009 at 1:09 pm

    Brilliant work mate. Was looking into doing something like this for my Scottish Football site but don’t know where to start etc.

  • Comment by fashion storm
    Date: October 23rd, 2009 at 6:33 am

    i am using your amazing wordpress layout and i love it but i was wondering how i can change the header to a custom one that i have. it doesn’t blink or anything it is just a png. file. help! please. you can mail me back at the email i gave you. thanks!

Leave a Comment

New e-commerce module for Admin76 CMS

Date: 26th June 2009 at 12:16 am | Filed under: blog, development | Author: Sam Burdge | Tags: , ,

I have been working for some months now to develop an e-commerce module for Admin76,  the CMS which is currently exclusive to 76 Creative. The e-commerce module, called Cart76, utilises many of the nice features of Admin76 such as drag n drop functionality, advanced image gallery management, etc. It is now in it's final stages of development, so if you are interested in running your self-managed site on the Admin76 platform, or if you require a self-managed online store please contact 76 Creative for more info.

1 Response to “New e-commerce module for Admin76 CMS”

  • Comment by Ben
    Date: December 15th, 2009 at 5:40 am

    That’s nice topic. But I had a hard time viewing your site in IE. What could be wrong?

Leave a Comment

WordPress attachments hack

Date: 9th June 2009 at 3:19 pm | Filed under: blog, development, scripts, wordpress | Author: Sam Burdge | Tags: , , , , , ,

While working on a WordPress site recently I came up against a problem that had never occurred to me before. The client wanted each post excerpt on the homepage to include an image which when clicked would link to the main post (permalink) itself. The built in functions of wordpress when inserting an image allow you to link to either the 'File URL' (i.e. the full size version of the image) or to the 'Post URL' which is actually an attachment page in wordpress which displays the image, but does not include the text of the actual post itself. However, without either editing the html of each post (not an option for this client) or inserting the image without a link, and then adding the permalink to the image (too long winded) there was no simple way to create the image links in the way they wanted them.

My solution to this was to create a very basic hack which would allow them to use the 'Post URL' link when inserting images, but instead of linking to the attachment page, the link would automatically be updated to link to the post's permalink itself.

Here is the basic php function that you would need to insert into your theme's functions.php file:

function lose_attachment($content){
return preg_replace('/<a(.*?)href="(.*?)\/attachment\/(.*?)"/i', '<a$1href="$2"', $content);
}

add_filter('the_excerpt', 'lose_attachment',2);

This will remove the 'attachment/name-of-image-file' part from the URL making it link to the post's permalink itself.  I hope someone out there finds this useful!

5 Responses to “WordPress attachments hack”

  • Comment by akshay
    Date: June 14th, 2009 at 3:27 pm

    really good post….tutorial is very helpful for me …thanks a lot for giving out such good tutorials

  • Comment by Alex Holsgrove
    Date: June 29th, 2009 at 8:54 am

    This was a great help. Thanks for sharing the code

  • Comment by Abeon
    Date: July 13th, 2009 at 10:26 pm

    This is a great little hack :)
    Simple but effective!

  • Comment by Nate
    Date: August 12th, 2009 at 1:21 pm

    I can’t wait to try this out.

  • Comment by Betaclick SEO Company
    Date: September 17th, 2009 at 7:32 pm

    Thanks for the code dude, i need to try this out on my wordpress blog! As im learning advanced use of it.

Leave a Comment

Forcing a file to download using php headers

Date: 4th May 2009 at 11:57 am | Filed under: development, scripts | Author: Sam Burdge | Tags: , , ,

If you create a hyperlink to a media file that can be opened within the browser such as an mp3, mpg, jpg, pdf, etc. a single left click will open the file in the web browser instead of triggering a download. To download the file you need to right click (CTRL + click for mac) and choose 'Save File As...' from the dropdown.

If your intention is to create a link for the user to download the file rather than viewing it in their browser you can do so using a simple php script. Create a file called 'download.php' and copy in the following php:

<?php
$download_file = $_GET['file'];
$download_file_name = $_GET['name'];
$handle = fopen($download_file, "r");
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.$download_file_name);
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($download_file));
ob_clean();
flush();
readfile($download_file);
fclose($handle);
exit;
?>

You can then create your download links like so:

www.example.com/download.php?file=images/example.jpg&name=hello.jpg

The URL should include the path to the file to be downloaded, and the name you want to give the file. In the above example the file is 'images/example.jpg' but the name of the file downloaded by the user would be 'hello.jpg'

When using PHP headers it is important to note that the headers will only be executed if they are called before any text is output to the page. Any html, or php echo tags, before the headers will cause the headers to be ignored. A line break or space before the opening php tag will also prevent headers from working.

Leave a Comment

Video Gallery - Neil Stewart / Fella Pictures

Date: 21st April 2009 at 3:41 pm | Filed under: development, portfolio | Author: Sam Burdge | Tags: , , ,

This week I have been working on improving the 'Moving Image' section of photoneil.com. When I first built the site (designed and built by 76 Creative) the Moving Image page featured Neil's video showreel, since then video has become a more prominent aspect of his work so I have created a video gallery page for the site, allowing him to showcase a range of his video work under different categories.

As this video gallery uses seperate pages for the video list and the player itself I programmed it in PHP using the Longtail / JW Player to play the flv videos. For more information about encoding video for Flash as flv see my article: Encoding FLV

The video gallery also offers the option to download higher quality Quicktime Movies of each video. I encoded the quicktimes using the mpeg-4 codec and reducing the frame size slightly to allow for higher picture and sound quality while keeping the filesizes reasonable for a download.

Check it out: www.photoneil.com/movingimage.php

Leave a Comment