Download all your friends tagged facebook photos

March 9, 2010
0 Comments >>

So, there are lots of facebook applications out there that claim to download all your photos. However most end up with credit limits or only downloading a maximum number of photos.

There is a relatively new release is a small piece of software. You can find it over at http://code.google.com/p/photograbber/. It not only allows you do download all your tagged photos, but also any of your friends. It’s brilliant for downloading all the tagged photos of yourself, but not so great for downloading individual albums.

For that, I’d use FacePad, a firefox plugin that allows you to right-click on albums and download them all. It’s important to note that facePad will only download the first 20 photos unless you have set the default language to that of your facebook by going to tools > options > addons.

Either way, try it out!

Internet Explorer Compatibility Mode Fix

February 25, 2010
0 Comments >>

Got problems with your web pages when Internet Explorer isn’t in compatibility mode (eg. Is running as Internet Explorer 8)?

Try using this meta tag in the header of your pages;

<meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″>

Free online photoshop alternative

February 5, 2010
0 Comments >>

Just a quick one guys; If you need photoshop but don’t have it installed on your local machine try PIXLR. It’s an online replacement to photoshop if you don’t have it to hand. It’s not as good as photoshop (but what is, hey?) but it is handy to know.

Tell me what you think, and If youv’e used it.

Windows bootable disk driver issue

February 5, 2010
0 Comments >>

After downloading Windows 7 from MSDN Academic allience (blog to come soon) I burnt the ISO to a disk and went about formatting to install and test it out. However, shortly into the installation process an error message appeard stating that the drivers for the disk-srive (which windows was reading the disk from) couldn’t be found.

Again, google was my first source, but there were a lot of possible solutions but required a second CD drive and alterations to the motherboard (RAID related) which I didn’t perticularly want to do.

My solution was to re-burn the installation DVD using MagicISO (previously used Nero) and set the ‘mode’ to “Mode 2 / XA”. I also burnt the disk at a slower speed (x16). Reformatting again I awaited the dreaded error, but to my supprise it didn’t come up. Instead it went streight to the disk partition stage! Success!

I’m not sure if it was in fact a faulty disk or the burn method – Either way the installation completed perfectly and I’m now running Windows 7. Try MagicISO if all else fails, it just seems to work!

Simple Email Form with validation code: Part 2

February 1, 2010
0 Comments >>

Part 2 of this tutorial gives code to validate the form designed in part one, stopping spam and fake users submitting data.

Here is the code (it uses javascript);

<script>
function validate(form){
var name = form.name.value;
var company = form.company.value;
var description = form.description.value;
var telephone = form.telephone.value;
var contact = form.contact.value;
var AtPos = contact.indexOf(“@”);
var StopPos = contact.lastIndexOf(“.”);
if (description.length < 1) {
alert(“You must enter a description.”);
return false;
}
if (company.length < 1) {
alert(“You must enter a company.”);
return false;
}
if (name.length < 1) {
alert(“You must enter a name.”);
return false;
}
if (telephone.length < 11 || telephone.length > 20) {
alert(“You must enter a telephone number between 11 and 20 characters.”);
return false;
}
if (contact.length < 1) {
alert(“You must enter an email address.”);
return false;
}
if (AtPos == -1 || StopPos == -1) {
alert (“Invalid Email Address.”)
return false;
}
if (StopPos < AtPos) {
alert (“Invalid Email Address.”)
return false;
}
if (StopPos – AtPos == 1) {
alert (“Invalid Email Address.”)
return false;
}
return true;
}
</script>

The first thing that happens is that the function is named and given a single variable, which is called ‘form’. In the form design we used an onsubmit to use ‘this’ (i.e. the form itself) as the variable content.

Function specific variables are defined, calling in the input values of the form.

Now it’s relatively simple; a bunch of IF statements to return false unless the criteria (for example more than one character) is met. If none of the IF’s are called then the function returns true and consequently the form can send! It’s litterally that simple! Have a play with the code, and you will get the hang of it soon enough.

I hope this tutorial helped at least one person, as I looked for ages online to find an all-in-one solution for designing and validating a form with little success!

Simple Email Form with validation code: Part 1

February 1, 2010
0 Comments >>

This is my first real tutorial (more commented code than a real tutorial), and is as much for myself as everyone else (I’m using the blog as a sort of resource store for myself, with the added bonus that everyone else can see it too!).

Anyway, the idea here is some explained code to produce a simple online form which will email a person/s the data from the form. It also includes validation to ensure that the form can not be sent unless the data is precise and relevant.

On to part one – The Form and the mail functionality.

The first thing we need to do is create the form itself for the user to put there data in.

<form method=”post” onsubmit=”return validate(this);” action=”formPage.php”>
<input id=”name” size=”50″/>
<input id=”company” size=”50″ />
<input id=”contact” size=”50″ />
<input id=”telephone” size=”50″ />
<textarea cols=”38″ rows=”5″ id=”description”></textarea>
<input id=”quantity” size=”4″ />
<input value=”Submit”/>
<input value=”Reset” />
</form>

The opening form tag contains method=”post” used to actually post the data, onsubmit which is used to call the validation function and action which links back to itself. The .php file in the action will have to be renamed the same as the page the form is being displayed on. There are two buttons at the bottom (‘input values’) one of which will submit the form (method, onsubmit and action) and the other will clear all data from the form. Simple!

Next, the code to email the data to the admin:

<?php

if(isset($_POST['contact'])){
$admin = “recipient@sendToEmailAddress.com”;
$name = $_POST['name'];
$company = $_POST['company'];
$contact = $_POST['contact'];
$telephone = $_POST['telephone'];
$description = $_POST['description'];
$quantity = $_POST['quantity'];
mail($admin, ‘Subject Title’, “This email was generated using the Product Resource Form at www.johnalexanderrowley.com.\n
Name: $name
Company: $company
Email: $contact
Telephone: $telephone
Description: $description
Quantity: $quantity”, ‘from: fromAddress@fromaddressEmail.com’);
?>
<script>
alert(“Thank you for using the formPage.\n Your request has been sent to the Relevant person.”);
</script>
<?php
}
?>

The IF statement checks if the input field (in this case ‘contact’) has been filled in. If it has then the following mail code is ran. This stops the form submitting when the page is loaded.

The various variables are set, including the ‘$admin’ variable which contains the email address that the data is to be sent to. The other variables pull in the previously posted form values. The form ‘input id’ is the text contained within the square brackets in each case.

Now the variables have been set the mail can actually take place; The ‘mail’ php function is called which requires a recipient, subject title, content and header information separated by commas. These are defined in the normal brackets using the various variables. Note that the content is comprised of various variables and no commas are used.

Finally, a javascript script is used to display a thank you message, and the IF statement is closed!

Hay presto, the form is created and will email the admin.

To add validation to the form, please view Part 2!

CAPTCHA on blogs

February 1, 2010
0 Comments >>

Opened wp-admin page this morning to find 65 comments. Thought for a moment that I may have had a huge responce to a post but it turns out that over 80% of them were spam! Time for a bit of spam prevention.

I used a simple CAPTCHA wordpress plugin which doesn’t require real people to input any characters and garuntees 100% success. I’m not holding my breath. If the plugin doesn’t work I’ll have to resport to user-input methods to decide between bots and the living, which I don’t perticularly like doing. However, desperate times and all that.

CAPTCHA software has always got my back up; Just seem’s like there could be better ways to determine between the two sources. However I’m starting to think that Wordpress should include CAPTCHA as default to it’s posts… something I didn’t think i’d ever admit!

MKV file format audio issues

January 29, 2010
0 Comments >>

I recently acquired some video files in the matroska video’ (.MKV) file format. Using VLC Player I ran one, to find that the video worked perfectly, as did the background noise but not the actual speech. I did a bit of research into the issue and it turns out that MKV files send different audio tracks to separate speakers.

For example, the audio in this case was being sent to ‘rear speakers’ on a 5.1 system. Although I have a 5.1 system it wasn’t being picked up (or was very quiet, at least). To solve the issue I opened the audio settings of VLC player and set the playback to ‘Stereo’ rather than ’surround’.

Worked a treat, but it’s a handy little tip to know, and could save a lot of time googling the answer.

UK Music File Sharing site cleared of fraud

January 17, 2010
0 Comments >>

The UK’s first “illegal music downloading website” court case ended today with all charges being dropped for website OINK!’s owner and developer.

The site made over $300,000 in donations, which were claimed to be used to rent servers and eventually buy one. OINK! didn’t host any illegal files on the servers, it simply indexed music files that people held on their own computers and were prepared to share. Between 2004 and 2007 the site generated over 21,000,000 music downloads.

OINK!’s originator gave this reasoning behind the development of the website in court this week; “It was to further my skills. To better my skills for employability.”

Attacks on Google exploited Internet Explorer

January 17, 2010
0 Comments >>

It has emerged this week that the attacks on Chinese human rights activists were made from, yes you guessed it, Internet Explorer. Microsoft’s director of Security was quoted earlier this week saying that the attacks were “targeted and limited” and were mainly “exploiting Internet Explorer 6″. Similarly, McAfee stated that the weeks attacks “showed a level of sophistication above that of typical, isolated cyber criminal efforts”.

In Germany the government has urged Internet users to find alternatives to Internet Explorer. In the same article (taken form BBC News) Sophos (an Internet security firm) told readers that the warning should be adhered to IE6, IE7 and even IE8 as the exploits had not only been proven to work on all these browsers but also the details of how to do so posted publicly on the Internet. Google has come under even more criticism as of late, with an open letter from security firms and lawyers asking why the security settings to enable HTTPS 100% of the time when accessing Gmail, Docs and other Google applications is so hard to find.

Google is reportedly considering it’s options regarding their operations in china. It may be that the years of strict censorship over the Chinese Internet has finally built to a head, and the recent attacks have broke the camels back. Either way, Google pulling out of China would be a devastating event for Chinese companies and civilians alike.

Not according to one company; ‘Baidu’, Chinese search engine giants recently posted the following on their blog:

“Google claims it will quit China. What it’s proved is not what the Google fans have claimed, that Google is a ‘Human Rights fighter’. Just the contrary. It’s proved that Google is a hypocrite.”

It’s a bit of a legal battle at the moment – let’s hope Google and China manage to come to some sort of agreement soon.