Papermashup

Latest Posts


Subscribe


Tweets


"RT @cpray86: Good to see the receptionist's Jpeg of an Excel file is coming along nicely... #TheApprentice https://t.co/uiPGhf64U3"

@ashleyford 3 days ago

"Translation wrong for this paper it should be: Bitte nicht den Horror-Clown (Please not the Horror-clown) https://t.co/RYOD6aND6s via @bandt"

@ashleyford 3 weeks ago
Papermashup

Web design and development tutorials, scripts and downloads designed for beginners right through to advanced developers


PHP Clever Caching

This clever bit of code checks if a page has been modified since it was last displayed and if it hasn’t, it sends a “304 not modified” header and exits, otherwise the content is loads as normal. Add the code below to the top of each PHP page you want to apply it to. It’s especially useful if you serve static content [...]

AshleyAshley

Fade between a background image with CSS3

Creating an image rollover is pretty easy with CSS. Give the element a background-image, Then absolute position a span element within the div. Then you just need to set the opacity of the span element to 0, and animate the opacity on span:hover. This method uses a CSS sprite image, you could easily use two images but it’s best to save [...]

AshleyAshley

Show Google Plus’s – PHP function

Following on from yesterdays function to get likes and share data for a URL here’s a function to get Google Plus’s for any URL. The Code It’s worth pointing out you must have CURL enabled on your web server, I believe it’s enabled by default on PHP5 setups. Also the Key below Isn’t a unique API key you must leave [...]

AshleyAshley

Display Facebook likes / Shares PHP function

We launched a new product at Harkable last week called Daily Pulse – which tracks social data for any URL, you can also subscribe to receive email reports. I thought i’d share a bit of functionality similar to how we engineer Daily Pulse. The Code Below is a super simple function that retrieves a JSON feed of comments, likes and [...]

AshleyAshley

jQuery dynamic number ticker

This is a fascinating little script that helps you display a dynamic JSON feed of numbers that automatically updates on the page by animating up or down to the current number. A great addition as part of a realtime analytical dashboard. The Code There are three functions in total. The first one ‘format_number’ which works the same [...]

AshleyAshley

Automatic jQuery site subscription lightbox

I’ve had many of you email me asking for a tutorial that shows how to create the subscription lightbox that used to activate┬áthe first time you visit the site, and I’ve finally got around to writing it up. Getting Started You’ll need to include the jQuery library as well as the Colorbox lightbox JS and CSS which are included [...]

AshleyAshley

6 Useful PHP code snippets

Here’s a selection of really useful PHP code snippets that I find using on a weekly basis. You could use these as is or expand them as part of other applications or add them to a php class. Adjust server time If you have a server in a different timezone to you then you might be seeing funny things happen when you add the time to a MySQL [...]

AshleyAshley