ss_blog_claim=88d0a386a6277415f42c9ee5561ded98

Archive for February, 2007

Cross Browser Compatability (Or Total Lack Of)

So I’m editing my blog some more, and I decided to view it in IE. In my recent post about backing up your Wordpress Database, I used the code block to display my php script. Apprently it doesn’t play well with IE6 (and maybe IE7, I havent tested) and decides to display the whole block of code in one big horizontal chunk. I also fixed the small Get Firefox div that shows if you’re using IE (*evil laugh*). Firefox for World Domination!

If you liked this post, buy me a coffee!

How-To: Backup Your Wordpress Database

Introduction

Okay, so too often this happens to everyone. Here’s the scenario - You’re writing your brand new post, you’ve just published it and you’ve put hours of work into it and you’re proud of your efforts. An hour later your host/provider has a server fart and your database and all your hard work goes down the drain. Your instant reaction is most likely rage. Your first thought is most likely: “there goes all my hard work! I can’t be motivated to write it again, so I’ll just sit back and wait until the urge builds up to rewrite the post.” And to think all of this grief could be saved with 5 minutes work. Here’s a few methods how:

Method One - cPanel

If you happen to be using a host that has cPanel, you can find the script I have written below to be quite useful for backing up your Wordpress database (or any other database for that matter, which is why I love it because it is not restricted to Wordpress). Either select the code, copy + paste it into a new file and save it as anything you want, as long as the extension of the file is .php. Otherwise, click the link below the code box to download the PHP source file. Simply change the file extension to .php and save it.

<?php
#!/usr/local/bin/php -q 
 
 
function get_database_file($database_name, $domain, $username, $password)
{
        //Construct the URL out of all our little pieces
        $url = 'http://' . $username . ':' . $password .'@'.  $domain .'/getsqlbackup/'. $database_name .'.gz';
        //Return the file's contents
        return(file_get_contents($url));
}
 
function send_database_file($to, $from, $subject, $message)
{
        global $database_name, $domain, $username, $password;
        $unique_sep = md5(uniqid(time()));
        $headers .= "From: $from\\n".
        "MIME-Version: 1.0\\nContent-Type: multipart/mixed;boundary=\\"$unique_sep\\";\\n".
        "charset=\\"iso-8859-1\\"\\nContent-Transfer-Encoding: 7bit\\n\\n" .
        "--$unique_sep\\n".
        "Content-Type: text/plain; charset=\\"iso-8859-1\\"\\n".
        "Content-Transfer-Encoding: 7bit\\n\\n".
        $message."\\n\\n".
        "--$unique_sep\\n".
        "Content-Type: gz; name=\\"wp.gz\\"\\n".
        "Content-Transfer-Encoding: base64\\n".
        "Content-Disposition: attachment\\n\\n";
        $file = get_database_file($database_name, $domain, $username, $password);
        $headers .= chunk_split(base64_encode($file)) . "--$unique_sep--\\n";
        if(mail($to, $subject, $message, $headers))
        {
                return true;
        }
        else
        {
                return false;
        }
}
 
$database_name = "<Database name without cPanel username Prefix (eg: user_wrdp1 without user_)>";
$domain = "yourdomain:2082"; // Do not change the port number (:2082)
$username = "cpanel_username";
$password = "cpanel_password";
$to = "your.email@domain.com";
$from = "backups@domain.com";
 
send_database_file($to, $from, $database_name ." Database Backup", "The backup of ". $database_name ." was performed at ". date("g:i A F j, Y"));
 
?>
 

Download this code: backup-sql-wp.phps

SECURITY WARNING

Now using your favourite FTP client, upload your newly created file In the directory under public_html/ or www/. I emphasised that because it is absolutely critical that this is where you upload it, otherwise you will be left open to someone being able to download your database information. And now we’re ready to roll onto the next step..

Now presuming you’ve either created a new php file or downloaded the file and renamed it, you need to login to cPanel and find the Cron Jobs icon. If you’re having trouble finding it, reference findcron.jpg for help. Note that the image you say may differ to your cPanel interface. Once you have found it, click it (duh) and youll be greeted with two buttons: Standard or Advaned. For now, choose standard and you’ll be greeted with a few boxes and inputs. See croninput.jpg for an idea of what you need to put in all these boxes. The settings I have selected in this image are that my backup will be emailed to me every day at 3am (Server Time). If you would like to change this, simply do so by using the boxes. If you have trouble understanding what to do, don’t hesitate to leave a comment or email me using the email page.

Method Two - Wordpress Plugin

So there’s many great plugins out there for Wordpress which can do everything from add ajax goodness on pages to backup your database, which is exactly what we want. For this tutorial, I have used WP-DB-Backup which was originally developed by skippy.net but was since abandoned and taken up by Austin Matzko and has since been rereleased for WP 2.1. Simply head on over to the WP-DP-Backup page, download the plugin and read the simple installation instructions. I would repost the incstructions here, but you can simply view them after you click the link. I myself have not used this plugin, as I am a faithful user of the above mentioned Method One.

Method Three - Wordpress Internal Backup

As far as I can tell from reading and watching a short video, this method makes the above mentioned Method Two of using a plugin obsolete (although having not used the plugin myself, it may offer extra functionality that the Wordpress Backup Tool does not). To save me explaining this method, a video on TubeTutorial which can be viewed via this link explains the method in great detail.

Conclusion

So there’s three methods to hopefully save you some grief in the long run if you do happen to lose your database(s). Just a quick shout out to the guys and girls at TubeTutorial for the use of their video in Method Three which is part of their series: 7 Essential Wordpress Hacks. It’s well worth a look.

If you feel I have missed anything in this guide drop me a line in the comments or use this revolutionary new technology called Email and get in contact, stranger.

Thanks for reading!

Technorati Tags: , ,

If you liked this post, buy me a coffee!

A Talking Blog? Highly Unlikely..

Have you ever heard your blog whisper to you: “Use me to make money.” No? Me either.

So anyway, onto the real story…

A while ago I was broswing around one of the many CSS showcases on the internet and came across RockStartup. As you may or may not know, RockStartUp is a podcast about how PayPerpost, the blog marketing site started out and worked its way up to internatiol blogging fame. Now, this is a great tool for high traffic and low traffic bloggers alike. You simply write a blog post, wait for approval and then leave the post up for thirty (30) days and your payment will either be sent by cheque or paypal. I recently recieved my first few payments via Paypal and purchased myself a Killswitch Engage t-shirt. Sure, maybe if you decide to join you you’ll put your money to better use. You even have the option of donating the amount that you would earn for a post to Charity.

Also, PPP has also recently introduced their Segmentation System. It is used to award those bloggers out there whose blogs get those all important hits in large numbers. Sure we all wish we could recieve that high traffic. But for the lucky ones, you can go join PayPerPost and have a chance at getting $1,000 (no joke, I did say $1000) dollars just for a single post on your blog. So if you do happen to have a blog that meets the requirements set out for these high paying posts, I suggest that you visit PayPerPost now and signup before you miss out. Just a note on the side, all PayPerPost sponsored posts require that any sponsored post on your Blog must be disclosed as such (as I do in all my sponsored posts).

See, it’s the all important sponsored post badge! Bask in all it’s Glory.

If you liked this post, buy me a coffee!

Things Ive Done and Need To Do

Done:

  • Changed Wordpress Theme, almost finished customising.
  • Wrote the Subscribe page
  • Written a rant on Snap Preview Anywhere
  • Written a little bit more on my About page
  • To Do:

  • Finish main site (has this ever left the Todo section?)
  • Fix up the css issue with the comments box when viewing a single post
  • Finish writing blog pages (namely the About page)
  • World Domination (no todo list would be compelte without it)
  • Okay, so it’s not a huge comprehensive list of what I need to do, but it’s a start.

    If you liked this post, buy me a coffee!

    Why I Hate Snap Preview Anywhere

    Surprise, surprise. I’ve joined an internet majority, and that is the haters of Snap Preview Anywhere. Sure, its an appealing concept: Roll over a link and see an image popup in a small bubble of the site that the link points to. But not only is it annoying, web browser slowing; it’s just plain instrusive. I mean, sure it may be handy to some people, but you’re about to click the link, can’t you wait the whole 2 seconds for the page to load and look at the website? SPA claims it saves ‘wasted clicks’ and you can ‘look before you leap’. Why not leap, look and if you dont like it, leap back? I mean, there is a thing called the back button, maybe Snap users should try it someday. Probably 100% of the time when you hover over a link, you have the intention of clicking it, so why do you need to see a preview of what the site looks like of you want to see it. The Snap preview isn’t saving you a wasted click, it’s wasting you time. And to add to the annoyances list; usually you have to click a link several times before it works because of the Snap previews delaying the rendering time by loading it’s stupid javascript popup.

    SPA is annoying for a few simple reasons, but the main one is distraction. I’m browsing a blog, and I move my mouse or scroll using the scroll wheel and happen to stop on a link. Bam! Instantly your concentration is taking from the article to the shiny bubble that has popped up. Doesn’t anybody understand this is losing them readership or taking attention away from what really matters - the content? I’ve seen shopping sites using Snap.

    And even highly acclaimed bloggers such as Matt Mullenweg, the founder of Wordpress endorses the nonsense javascript widget. The same with TechCrunch.com. To me, Snap provides no functionality, just headaches. Whatever happened to the title, over even id elements in the link tag?

    Blogging is about providing your opinions and winning over readers. Snap isn’t going to win you readers, if anything, it’s going to push them away, including myself because as you can tell, I’m writing this post because SPA pisses me off. I want to go to a blog and be able to read the content and click the links without being interrupted by a so-called ‘cool’, shiny gadget. Of course it’s a great example of how to gain attention of your links, but a very annoying one. Maybe someone should put the concept to better use and into a better form then an annoying javascript popup.

    So if you’re like me and hate this damn thing, there are a few ways you can disable it:

  • Go to a site using the horrible, horrible widget and mouseover a link and wait for the preview to show. At the top you will see an Options link, click and and in the middle of the resulting page, click ‘Disable Snap Preview Anywhere for All Sites’
  • Go to the SPA faq and click the link in the yellow blox that says ‘Deactivate’
  • If you’re using the wonderful Firefox browser and the annoyance saving extension Adblock Plus, you can block the widget by adding a block in Adblock Plus by pressing ctrl+shift+A, then clicking ‘Add filter’ and entering the follow address: spa.snap.com/snap_preview_anywhere.js and then press ctrl+f5 on the offending page(s) and your troubles should be gone
  • If you’re too lazy to try any of the above, or for some insane reason none of them are working, write abusive emails to the offending site(s) owners until they remove the widget
  • In my opinion, a popup is a popup and any amount of cosmetics, Web2.0ness or site previews will change the fact that popups are blatantly annoying.

    And just a small note to anyone using Snap previews, I won’t read your blog because of the reasons outlined in this post.

    Please direct all complaints, abuse, ignorance or stupidity to my inbox or leave a comment below.

    Technorati Tags: , , , ,

    If you liked this post, buy me a coffee!

    Agloco: Get Paid for Your Internet Habits

    Agloco, or A global company, is a relatively new site which was created to earn money and shares in the company itself for it’s participants. It has been listed with the London stock exchange, so you know they mean business, so certainly join Agloco ASAP.

    What do I need to do?

    The answer is simple. Join Agloco. It’s currently in Beta stage, but are encouraging as many members as possible to sign up and to refer others (like I am) to maximize their chances of generating an income. You earn money for your referrals’ participation, so your efforts are multiplied with each person who signs up under you, and then each person who signs up under that person etc. In the coming future, Agloco will provide a viewbar which will be used by the members to surf the internet. Agloco displays ads, and this is where the income is generated for the user. You can surf for a maximum of 5 hours a month. They also pass along commissions to the end-user (that’s you!) from searches, product sales and referral fees. Every action that creates revenue for other companies will now be available to you even if you don’t have a blog or a website. The more active referrals you sign up, the more you earn. You can use Agloco’s member calculator to estimate your monthly earnings if you choose to sign up with Agloco.

    How do I get paid?

    Once more, a simple answer. You earn for every money and shares in Agloco for every action you take. I am yet to find an answer to how they will pay, but Cheque/Paypal is looking good, although I am unsure which method they will use (or if they will use both). They say that they are in the process of drafting paperwork which will allow Agloco’s users to donate to charity so you can give and receive.

    Agloco’s membership is growing steadily. It’s free to join, so certinaly register ASAP. The earlier you join, the more you have the chance to earn. So why not sign up, get those referrals and get paid for every action you take on the net.

    If you liked this post, buy me a coffee!

    The Painters Have Been In

    Yes, the theme has been changed. I finally found a new theme, which I will be customising in the period of about the next week to suit my liking. For now, enjoy, and if not, nag me to change the theme back or just use the Theme Switcher to change the site to how you like it. I will be deleting the vanilla theme installs, so you’ll still have a few themes to choose from, just not the ones I was using as tests. Enjoy the new theme.

    edit: all vanilla themes have been deleted, I have started customising the theme and there are a few bugs which i have to iron out, one being when viewing a single post towards the bottom near the comment form, it expands out past the sidebar and creates some ugliness, probably a css issue. I will try to resolve it soon.

    If you liked this post, buy me a coffee!

    Help Me, Anyone?

    I’m looking for suggestions on a new Wordpress theme that has a sidebar with links and categories, etc. or, something like this (click the link, it will change my blog theme to Qwilm! which will store a cookie which will automatically change to that theme when you visit my site.) To change the cookie back, or choose another theme to view my blog in if you like, use the Theme Switch Page. There are also a few other themes on the Theme Switcher page that I was considering but none suit my needs, a few of the themes on there are also just vanilla installs so nothing is customised.

    Anyway, back to what I originally wanted.. The theme doesnt have to be exactly like Qwilm with the links running up the left side. I am looking for 2 or 3 columns preferably. Leave a comment or drop me an email, your suggestions won’t go unappreciated as I’ve scoured long lists to no avail.

    If you liked this post, buy me a coffee!

    Happy Valentines Day

    The title says it all, really. So go tell that special someone how you feel. Get into the spirit.

    If you liked this post, buy me a coffee!

    Adding To The Anna Nicole Smith Hype

    So you may or may not have heard that Anna Nicole Smith died recently. (If you haven’t heard I strongly suggest you lift up your rock or commission someone to install a television antenna/set beneath your humble rock). Anyway, browsing around the web (as you do) I stumbled across this link: Anna’s fridge after death which is quite interesting to read, I guess. Amaze your friends by knowing what Anna Nicole Smith kept in her fridge.. or marvel at it. Your choice entirely.

    If you liked this post, buy me a coffee!

    An Experiment by Paul O’Flaherty

    So, I was invited once more by Paul O’Flaherty to participate in his little experiment with the strange name of Irish In Denmark. So go on, spread the word and help Paul in his experiment. I would give you more details on it, but you know as much as I do!

    If you liked this post, buy me a coffee!




    February 2007
    M T W T F S S
    « Jan   Mar »
     1234
    567891011
    12131415161718
    19202122232425
    262728  

    RSS  


    Posts (RSS) Posts     Comments (RSS) Comments
     Add to Technorati Favorites


    advertisements  






    top commentators