FancyBox is a plugin for jQuery that allows you to easily display images in the same window with a simple yet effective code. The plugin takes no time to set up and all that is required is that you include the jQuery javascript library within the pages that you are using the FancyBox plugin on.
Features:
- Display single images
- Create image galleries
- Display iFrame
- Execute Ajax
- Include Flash, movies or audio files
Using FancyBox
First of all we need to link to the jQuery and FancyBox file after we have downloaded.
<script type="text/javascript" src="path-to-file/jquery.js"></script> <script type="text/javascript" src="path-to-file/jquery.fancybox.js"></script>
Every website needs a way of contacting the people behind it and putting an email on a page is not such a good idea; because bots can easily pick up this email address and send spam to it. This is where a contact form comes in very useful because people can send you messages but do not get your email address. (more...)
A few days ago I was developing a website for a client. They required that there be a map showing where addresses are that were retrieved from a database. I have never properly looked at the Google Maps API before because I have never needed to use it; so for the first time I looked at it and gave it a try. Then after playing around with it for a bit i realised that reverse geocoding was needed to convert the address into latitude and longitude figures.
Because I was programming this website in PHP I thought I would have a look around for a PHP class to see if there was a quicker way of doing this. Luckily enough I found a PHP class called PHP GoogleMapAPI. It took me a few minutes to read through the documentation for this class but it was so straight forward and simple. All in all it takes only 6 lines of code using this class to create a google map and locate it to an address; because it does all the other work for you that you don't need to know about if you're not going to be programming Google Maps every day of your life.
The plugin that I'm going to show you how to create within this post is a plugin that I created for MakeUseOf.
Creating plugins for WP is relatively easy and uses actions to call functions that are included in pages within the main WP files. To learn more about creating plugins for WP go here.
Ok so lets get started with creating the plugin.
When creating a plugin for WP make sure that you include your own unique word or acronym to your functions so that they don't conflict with any other plugins that may be installed.
Because I created this for MakeUseOf the acronym I use is MUO and then AF because I named the plugin author footer so every function within this plugin begins with MUO_AF.
(more...)
I'm sure if you've been programming for a few years that you've come across when you need to check if something equals something than do something else a few times.
Well the best way to do this is like so.
Say for example we have a variable called $num and the value of it is 5.
(more...)
I'm writing this tutorial for someone who posted a comment on Basic Actionscript 3 Game Part 1 called sstng so if you would like to know how to do a certain thing in a language then feel free to post a comment and ask.
Timers in Actionscript 3 are really simple and easy to use and understand.
Sstng wanted to know how to create a timer that is triggered after 100 seconds.
Email is used by most people that use the internet and is good for sending activation codes and notifications to users when you have a website.
To send an email you use the mail() function and it requires 3 parameters.
RSS Feeds are widely used throughout the internet today and on all kinds of websites. From websites like Digg to most blogs. If you want to display an RSS feed on your website its probably easier than you think.
For this example I'm going to show you how to display the RSS feed for The Tutorial Blog using PHP.
