How to Make Your Website Work Better

I’ve always concentrated on just building websites and when I started out first it was nearly enough to just have a website. There were fewer sites around, less competition and more room for success but the internet is so crowded these days that you really need to work at getting your new site noticed and having it bring in revenue.

I’m hoping to move more into the “Performance” side of web design so if you feel you need help with any of the following for your existing website, give me a shout:

  • Search Engine Optimization (SEO),
  • SEO Reports,
  • Keyword Research,
  • Competitor Research,
  • Google Analytics,
  • Sitemaps,
  • Internet Marketing/Online Advertising,
  • Social Media/Networking Integration,
  • Blogging,
  • Website Upgrades/Added Functionality,
  • Content Management Systems (CMS),
  • Email Marketing/Newsletter Systems,
  • Viral Marketing (Image & Video),
  • One to One Mentoring.

Leon

Samsung Kies – Galaxy S2 Connection & Upgrade Problems Solved

I heard there were long awaited Android updates available for my Samsung Galaxy S2 but when I went into Settings – About Phone – Check for Update, there were none. Others with the same phone and on the same network got the updates fine so I’d no clue what was up. A quick call to 3 Tech support revealed that the update might be available via Samsung Kies so I went and downloaded that and tried in vain for nearly an hour to get the computer and phone to connect either via WiFi or USB.

It turned out you need to disable USB Debugging on the phone via Settings – Applications – Development – USB debugging. See below:

USB Debugging

Doing that and restarting both Phone and PC, then connecting the phone to the PC via USB should start Kies on the phone automatically and allow Kies on the PC to connect to it and present the full suite of options, ie – Phone Backup, Sync, Firmware Update etc..

I managed to install Android 4.1.2 Jelly Bean via Kies in the end.

Note: Turning off USB Debugging on the phone means you can’t connect it to the PC in USB mode unless you re-enable USB debugging again.

Can’t Edit Posts in WordPress

A friend was asking advice on an issue he was having with his WordPress Blog whereby since upgrading to WordPress 3.5.1, he couldn’t edit any posts. He would try to edit the text, then save but none of the changes were saved. The only strange thing he’d done was to add a new user and delete the old one. Posts were showing as un-assigned to any user and refused to allow themselves to be re-assigned.

After a bit of messing around with the usual fixes such as de-activating plugins, re-uploading WordPress files manually etc..I decided to do a Check and Repair on the database in Cpanel and after a couple of goes, all was working again.

In Cpanel click on the “MySQL Databases” icon and then Check & Repair as below for the database in question:

Corrupt Database

Different Sidebar Content on Different Pages in WordPress

Ok, this is an old one and easy to do these days with free WordPress plugins but here’s an alternative method of having different sidebar content on different pages in WordPress. It involves a little bit of adjusting of the default sidebar.php template file. I’m using the sidebar template from the default Twenty Twelve theme here.

Here’s the edited code:

<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
<div id="secondary" class="widget-area" role="complementary">
<?php if ( is_page('home') ) { echo "Home Page sidebar content'";
} elseif ( is_page('about') ) { echo "About Page sidebar content'";
} elseif ( is_page(contact') ) { echo "Contact Page sidebar content'";
} else { dynamic_sidebar( 'sidebar-1' );
} ?>
</div><!-- #secondary -->
<?php endif; ?>

Basically, what the above code does is tells WordPress via some if/else PHP statements to show different content depending on which page you’re on and if you are not on any of the pages mentioned, just show the default sidebar. The “if is page” bit can be the Page ID, Slug or Full name. I’ve used slugs in the example above. You need to get the spellings exactly right.

Leon

How To Replace the Heating Element on your Beko Tumble Dryer

Our Beko Tumble Dryer went tits up after just over a year usage from new. The warranty had just expired and money was a bit tight to hire an appliance repair guy so I Googled around and armed myself with enough information to be confident of the problem diagnosis, spare part required and replacement process involved. I sourced the part from SpareParts.ie (took a while as spares aren’t usually available for newish models) and went about replacing it as outlined below. The whole process took about 30 mins.

I am gonna guess the process is roughly the same for most tumble driers but my model is the Beko DCU9330W.

Here’s what a Heating Element Assembly looks like for my dryer at least. There’s heating coils inside the box and Thermostats/Thermistors on the top to regulate temperature. These can blow but can’t be easily replaced on their own without the full assembly:

Beko Heating Element Assembly

Step 1:

Unplug the machine! Remove the ton of screws holding the funny shaped back plate on. Locations as below. The screws are all a little different so take note which ones go where. I put the screws on the counter in the same rough shape as the back plate to easily remember.

Back Cover

Step 2:

Remove the top cover of the machine to give access to the heater element connectors inside. There’s 3 screws at the back on my model holding the top cover in place. You can now disconnect the 2 connectors as marked below (plus cable tie) and pull the cable through from the back:

Connectors

Step 3:

Replace the heating element unit. There’s 3 screws at the top of mine and when removed the unit slides up and off easily. Reverse the process to add the new unit and feed the cables through the hole to the left for connection inside the drier as above. Replace any cable ties removed when taking out the old heater to prevent cables causing problems for the drum.

Heater Unit

You’re welcome.

Leon

Photoshop Human Shadow Study

Adding shadows to simple objects in Photoshop is no big deal but adding them to irregular objects like people with awkward stances can be a bit tricky. Here I outline simply how I normally do it.

Assets

A decent hi-res image of a person against a neutral, single colour background.

Process

I bring my image of a girl into Photoshop and cut her out of her background using the Pen tool. I’ve just started using Vector Masks so when finished tracing her outline with the Pen, right-click inside the outline and select “Create Vector Mask”. Make sure you’re not working on a background layer for this. Creating the Vector Mask will automatically cut out the object and leave the rest of the image transparent which is what we need here. The benefit of using a Vector Mask is that you can go back and adjust the Path/Shape at a later stage. Handy sometimes.

Once the girl is cut out, I duplicate her layer and rasterize it to remove the vector mask then using the Transform – Skew or Distort tool, I drag the duplicated layer to the rough angle and shape that her shadow would be, paying particular attention to the light source in the photo. Once you’re happy with that, darken this layer totally using Hue/Saturation. You might find after Transforming that the feet don’t line up properly with the shadow so using Transform – Warp, drag things back into line.

Next, add a Layer Mask to the shadow layer and apply a Black to White gradient along the direction of the shadow with black at the feet and white at the head. Next, apply some Gaussian Blur (about 10 radius depending on photo resolution) to the shadow layer and make a rectangular selection over the top half of the shadow, Feather it about 100px and apply more Gaussian Blur, this time about 30px radius. These steps give the shadow a more non linear and realistic look, fading and softening the shadow the further from the subject it is.

Finally some tidying up around the feet in the original layer where they meet an invisible floor by painting in some under-shoe shadow on a new layer with a very soft Black Brush. Change the opacity on both this and the shadow layer to about 85% to soften a little.

And yes, it is more fun to work on images of sexy girls..

Final image:

Girl Shadow

How to Increase the WordPress File Upload Limit on Shared Hosting

The upload limit on my clients shared hosting is a measly 2MB which in this day and age is pretty useless as it wouldn’t allow for uploading of most media files, in particular Audio & Video. There are several workarounds, most of which I tried but the following is the only one that seemed to work for me.

Right-click your desktop and select New – Text Document and copy and paste the following lines into the new file:

upload_max_filesize = 32M
post_max_size = 32M
file_uploads = On

You can change the 32M to whatever you like but don’t go mental. Keep disk space in mind!

Next, save the new file as “php.ini” and upload it to the “wp-admin” folder of your WordPress install via FTP or your hosts File Manager.

If you now navigate to Media – Add New in the WordPress admin, you should see 32MB mentioned as the max file size at the bottom. See below:

Media - Upload

How To Hide Deprecated PHP Errors in OS-Commerce

This problem cropped up recently where an old os-commerce installation started showing “Deprecated function” errors all of a sudden. I think it coincided with a server and php upgrade here but the main reason is os-commerce being an old piece of software. The site functionality was fine but there was a shit load of php errors all over the place which totally messed up the design and layout:

Deprecated: Function ereg_replace() is deprecated in /home/nautybit/public_html/includes/classes/seo.class.php on line 1299

That particular line above is from a module I added to this os-commerce but there were other areas of the site showing errors for default os-commerce functions.

Basically, you need to turn off php error reporting in your script/app or at least change it to not show deprecated errors. I done that in os-commerce by editing the following lines in “includes/application_top.php” and “admin/includes/application_top.php”.

Change:

error_reporting(E_ALL & ~E_NOTICE);

To:

error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);

Leon

How to Remove ‘Eval Base 64’ Virus Code From Your WordPress Site

I use WordPress a lot and any time mine or a client’s WordPress site gets hacked, it seems to be the same way, ie multiple blocks of code get injected into all the site’s files, particularly files in the ‘wp-content’ folder, so your theme and plugin files. The code always seems to start with “eval(base64_decode” followed by a long string of random looking characters. I won’t pretend to know how the code works, what it does or how it gets in in the first place but here’s how to get rid of it.

Removal:

First off I would do a manual upgrade of WordPress core as opposed to using the auto update function in WordPress admin which probably only updates certain files. A manual upgrade involves deleting all wordpress files and folders off the server via ftp EXCEPT the following ones:

  • wp-content
  • .htaccess
  • wp-config.php

And any other files you’ve customised or added, eg – Google Webmaster files, etc..

Then upload a fresh set of files from the latest WordPress version taking care not to upload any of the skipped files above or you’ll overwrite important settings and content.

Visit http://www.your-website.com/wp-admin and you’ll be prompted to upgrade the WordPress database so do that.

Next, download the above files and folders, wp-content, .htaccess & wp-config.php. You may need to turn off your anti-virus program as I did or it won’t let you download the files. It’s safe enough to do temporarily. Look in one or two of the downloaded php files for virus code similar to below:

Virus Code

Select & copy one instance of the virus code and use a program capable of doing Search and Replace in multiple files. I use Dreamweaver as below which lets me search for the same code in all files within a certain folder and replace it with blank space, which is the same as just deleting it. So I pick the root folder that contains all my website/wordpress files:

Dreamweaver

When Dreamweaver’s removed all the dodgy code from the site files, same them and re-upload.

Secure Your WordPress Site:

Now that you’ve cleaned out your viruses, make sure they don’t get back in by doing the following:

  • Change your Hosting, FTP, WordPress Admin & Database passwords.
  • Pick a long password (12 characters) and include upper & lower case, numbers and even symbols.
  • Add some security plugins to WordPress, WP Security Scan & SI Captcha Anti-Spam are 2 I use.

Stay safe.

Leon