design@brightcherry.co.uk
Call us on   01279- 729075

htaccess fun

htaccess- Redirect Entire Website To New Domain While Preserving URL Structure

Here’s a piece of htaccess code which you can use to 301 redirect an old website onto a new domain, while preserving the same URL structure for every page. Obviously,…

jQuery Scripts & Helpful Snippets

Google Maps Won’t Show Centralised Inside jQuery Tabs

I was working on a client’s website earlier today, and I ran into a real head-scratcher of a problem. Basically, the page had multiple content tabs, and each tab would…

Wordpress

MySQL Queries Used When Moving WordPress Site To A New Domain

When we’re developing our websites, we always develop in a local testing environment, so the URL for the website will be something like http://dev.testexample.com. Once the website is ready to…

Wordpress

Use WordPress Environment/Functions In An External File

If you want the ability to use WordPress functions/environment features in a section of the website which is outside of the WordPress environment (/blog/wp-content/themes/theme_dir/), then you just need to add…

Wordpress

WordPress- Set Featured Image Link Missing

I have no idea why, but now and then the “set featured image” link is missing from the “add new post” page. I’ve also noticed that a lot of other…

PHP Scripts, Tips & Tricks

PHP- Get URLs/Links From A String

The following function puts all URLs/links from a string into an array. The function uses the preg_match function, and looks for URLs/links with http/https. Please note, the function does NOT…

Wordpress

WordPress- Custom Excerpt Length

Here’s a bit of code that allows you to to create a custom excerpt length, based on the amount of characters you want to display. Code Add the following code…

PHP Scripts, Tips & Tricks

PHP- Display Certain Amount Of Words From String/Variable

If you want to display a specific amount of characters from a string, you can use the PHP built-in function substr, but from what I’m aware, there isn’t a PHP…

PHP Scripts, Tips & Tricks

PHP- Show Your Latest Tweet On Your Website With PHP

In the archives, there’s a post that shows you how to show your latest tweet on your website using jQuery. While that method was OK, I found it rather temperamental….

PHP Scripts, Tips & Tricks

PHP- How To Show An Excerpt/Teaser From A String

Here’s a quick function that will limit the amount of words that will display from a string of words, so you effectively get a excerpt/teaser. For example, let’s assume you…

jQuery Scripts & Helpful Snippets

jQuery – Start jQuery After Page Has Fully Loaded

If you want your jQuery to start executing after the page is fully loaded, you can use the following code: 1 2 3 4 5 <script type="text/javascript"> $(window).load(function() { //…

jQuery Scripts & Helpful Snippets

Using jQuery Lightbox With live()

I’ve noticed a few people struggling with the following issue in a few forums, so I thought i’d write a blog post on how to overcome it. I looked through…

jQuery Scripts & Helpful Snippets

jQuery – Uploadify Returning HTTP 401 Error On Mac OS

Not sure how useful this is going to be for anyone else, but I was on the verge of throwing my computer out the window earlier today while trying to…

jQuery Scripts & Helpful Snippets

jQuery- Show On Click, Hide On Hover Out Function

Not sure how many people would be looking for a function like this, but I needed it, so I suspect someone else out there might too. The code below is…

jQuery Scripts & Helpful Snippets

jQuery – Second Click Function Examples

Here are a few ways in which you can use the “click” event to trigger an action on the first click, and then trigger another action on the second click….

MySQL Functions, Tips & Tricks

MySQL – SELECT Rows Where First Character Is Not A Letter

Here are two methods of SELECTING rows where the first character is not a letter. For example, if you have the following data: So let’s say you want to select…

Javascript

Javascript – Passing Variables Into window.location

I’m quickly going to show you how to pass a variable into window.location – I’ve recently read a few discussion forums where people have been struggling with this. It’s really…

PHP Scripts, Tips & Tricks

PHP- Alternative To The Depreciated mime_content_type Function And Fileinfo Functions

You’ve probably landed on this page because you want to find the Content-type of a file by using the mime_content_type function. But when you tried using the function, you were…

jQuery Scripts & Helpful Snippets

How To Display Latest Tweet From Twitter On Your Website

The code below no longer works, since the Twitter API updated to 1.1 on the 11th June 1013. The 1.1 API requires oAuth which requires a server side component. But…

Javascript

Javascript – Get The Hash Tag Value From A URL

So, you have the following URL: http://www.example.com/page/#comment-12 You want to get the value after the hash tag (#), which is comment-12 The following Javascript code will help you achieve what…

htaccess fun

htaccess- 301 Redirect Old URLs With Spaces

Here’s a quick and easy htaccess 301 redirect tip. So, you have a URL like this: http://www.example.co.uk/this is_a_file.html and you want to redirect it to: http://www.example.co.uk/this_is_a_file.html All you need to…

jQuery Scripts & Helpful Snippets

jQuery- Show The Height And Width Of The Browser Viewport in Real-Time

Strange. I looked around everywhere for this code, and couldn’t find it anymore online. I simply wanted jQuery code that would show the height and width of the browser viewport…

PHP Scripts, Tips & Tricks

PHP- List All Directories/Folders From A Specified Location

This is a quick extension/counterpart to my existing blog post that explains how to List All Files In A Directory in PHP. But instead of listing all files, I’m quickly…

htaccess fun

htaccess- Hide File Extension

I only used this code for the first time last week, but seems to work pretty well. The same code is plastered all over the internet on various websites, so…

MySQL & PHP

MySQL / PHP – Optimize MySQL Tables Script

The MySQL Optimize Table command will effectively de-fragment a mysql table; it’s useful for tables which are frequently updated and/or rows are deleted. Optimizing will will help with overall performance….

Wordpress

WordPress Excerpt Function Showing CSS #gallery-1

I had the strangest problem earlier. A client had reported that CSS code was showing on a category page, where only excerpts of a post should be showing. This is…

Javascript

Javascript – Make Div Into A Clickable Link

From what I’m aware, you can’t make a div into a clickable link with just HTML. The only way I’ve ever known is by using Javascript. Open in new window…

jQuery Scripts & Helpful Snippets

Simple JQuery / PHP Image Gallery

I previously wrote a Simple, Pure CSS Image Gallery. But times have changed since then, and now everyone seems to be keen on AJAX technologies. So I’ve written a nice…

PHP Scripts, Tips & Tricks

PHP – Changing Date Format

A friend of mine has been struggling to format a date string he’s pulling out from a MySQL table. He’s just started learning PHP, so he’s still getting to grips…

jQuery Scripts & Helpful Snippets

JQuery – Hover And Show Next Element

So, this JQuery code shows the next element (a DIV in this case) when you hover over a “trigger” (in this case, the triggers are hyperlinks), and then hides the…

Learning & sharing

This is where we store some of our Web Development thoughts, tips and tricks for both our own uses and for others to learn from. Sharing is caring.

Please feel free to contrinute to our blog posts; perhaps even teach us a few tricks of your own. We'd love to hear your thoughts.

Page 1 of 3123

HTML/XHTML

PHP

JavasScript

jQuery / AJAX

CSS

XML

MySQL / Databases

Adobe Photoshop

Adobe After Effects

Adobe Premiere

Expertise

Our team collectively have a broad range of web and graphic design skills in-house, some of which we specialise in more than others. You will find a list of those specialised talents on the left.