Mods to Blog

Just a post to talk about the add ons that i’ve done to the blog today
If you look in the comments you will notice that it now notifies the country of the poster, plus what browser & OS they were using when they made the post
It utilises two plugins to WordPress which are linked to below. I also want to add some details as it is not very well documented
The easier of the two is the one that produces the OS and browser and is fully documented in the below link:
Priyadi’s Place WordPress Browser Detection Plugin
I will not add anything to this as it is very comprehensive and links to where to download the plugin, what to add to your files and contains links to download the images
The plugin to add the country is not as well documented, so I will detail it below

1. Go to the IP to Nation WordPress Plugin Site
2. On the site download the plugin from this link
3. Rename the file to have a .php suffix as opposed to the .txt suffix that it will download as, and upload it to the plugins folder on your WordPress site
4. Download the Flags from this site – note that although the link is to a zip file you need to click the link on the site as it is not a direct link to the zip file.
5. Unzip the file and upload the folder to the root level of your blog
6. Enable the plugin in WordPress

Now for the tricky part (I have deliberately separated this bit from the rest of the guide in order to ensure that you understand what is going on)

I am providing a guide for PHPMyAdmin, because that is the easiest way to go about installing anything MySQL as not only do I not have the SQL knowledge to run through how to do it manually, but also PHPMyAdmin is so much easier. Download it & install from PHPMyAdmin if your webhost does not already have it installed – most good ones do, but some don’t.
Right, now you have the tools and are ready to do the tricky part
1. Download the SQL Dump file from ip2nation.com and decompress it if necessary
2. Log into your webserver’s PHPMyAdmin Control Panel – all of them are different, so I won’t attempt to explain how to do this. If you get confused, now would be a good time to stop the mod
3. Use PHPMyAdmin to BACKUP your MySQL data – if it goes wrong, this will form the backup for your blog which you can restore from – you do this by clicking the export button – ensure all the tables are checked and choose to save to file, then click go – a file we be downloaded to your downloads folder – check that this is ok!
From now on I assume no responsibility for corruption to your data, but if you follow the instructions, and have a backup nothing should go wrong – this is just a provisor – you have been warned
4. Choose your database from the pull down menu and you will see the tables in the right hand frame
5. You will see in the toolbar the button SQL – click it
It will look like:
phpmyadmin
though since I have already imported the tables required they are already there on the left hand side – when you see this screen they will not be there
(you should probably also ignore the address bar and all the other tabs i’ve got open – i’m far too lazy to edit the screenshot so that it doesn’t show my site’s IP address or any of the other junk on there)
6. Click the “Choose File” button
7. Find your SQL dump file you downloaded earlier and select it however your OS would open a file
8. Click the “Go” button
You should now have completed everything involved with PHPMyAdmin and have two new tables added to your MySQL database called:
ip2nation
ip2nationCountries

You now need to add the PHP coding to your comments.php following the examples shown in the IP to Nation WordPress Plugin Site
This isn’t very clear, but with a bit of PHP knowhow, you should be able to figure it out. Don’t worry if you get a parse error or two while trying to add it – remember work on a BACKUP and you can always restore it back to as it was.
If it’s anything like my experience, adding the browser sniff plugin will be much easier as it makes more sense. Don’t forget to add the < ?php and ?> tags when typing the commands into the comments.php file and with a bit of luck it should go well

I’m willing to help you through it if it goes pearshaped, and also remember depending on your theme, you may have to add the information in different places compared to mine – the joys of WordPress themes

Again, I add the proviser that I am not responsible if you ruin your Blog’s data, as my guide is just intended to make the instructions more user friendly. Do read the site for the plugins to get the full information before going ahead with this modification to your WordPress Blog

Happy Modding!!