101 Incredibly Good WordPress Plugins

So you’ve just installed your shiny new WordPress blog and you know it’s going to make you into the next Internet sensation but your wondering ‘What’s next? How can I make this blog MY blog? How can get it to do everything I want to do? Well, how about some customization to make that blog … Read more

Hardware Discovery and Fault Diagnostics

A Couple of neat tricks I learned while trying to establish a wi-fi Internet connection through the command line are the command line instructions for discovering a computer’s hardware and the device drivers that make them work. Those commands are:

lshw
lspci
lsusb

and

lsdev

The first three of those commands are available on most, if not all, Linux environments. lsdev must be installed using sudo apt-get install procinfo .

You should run them as the root user either by adding sudo before the command else by typing sudo su (followed by pressing the return) key as your first instruction. If you use sudo su then remember to type exit after you’ve finished issuing commands.

Bloody Linux Wireless Networking

A few of days ago I updated my Linux distro with the usual sudo apt-get dist-upgrade. I’ve been on a fucking steep learning curve ever since. I’m glad I ran the update but I wish it hadn’t buggered up my operating system by removing my desktop environment.

Trust me, it’s only after you’ve had to use a computer without a graphical desktop that has a nice graphical file manager and a nice graphical web browser that you appreciate how much you depend on them and the developers who build them.

Don’t get me wrong, I know how to navigate the command line to find, backup and edit files but it’s so much easier to command a computer with a mouse than to issue textual instructions.

I can hear you forming the question: “Why didn’t you just re-run the update or re-install the removed components?”

Believe me, if only it had been so easy… Something I learned through all of this: Linux, Command Line and Wi-Fi Adapters do not mix.

For two days, the only Internet access I’ve had through this computer is via my trustee Kubuntu Live Disk.

Getting Linux to use a Wi-Fi adapter without a graphical desktop is damn near impossible. I spent plenty of time surfing the Net, checking manual pages and posting in the Kubuntu forum. I’ve learned a few tricks, I’ve learned new things about Linux, I have something new to write about; and I’m happy about that; but none of this new knowledge helped.

How to Disable Right Click

It’s not really advisable because it makes life difficult for visitors who like to right-click links to open pages in new tabs and windows plus anything that can be done from the right-click menu can be done with short-cuts and menu bar items so disabling right-click doesn’t really achieve much; but if you really want to know how to do it… insert this script into your web page’s header:

Auto Rotating Ad Banner, No iFrame, No Page Refresh..And It’s Free!

I’ve spent the last two days looking for a free script that will rotate an ad banner without requiring a page refresh, an iFrame with a meta refresh tag or anything else that might need visitors to perform an action to get the ads to rotate. Two days! But I found one :)

Updated Script and Instructions Here

I originally wanted a php script so that all the work would be done by my server and not require Javascript to be enabled in a visitor’s browser. I quickly found that it’s easy to find a php script that rotates banners and text on page refreshes but not easy to find one that requires no user interaction to effect the ad rotation. I did find one php solution but it required me to set-up a banner exchange (yes, it was banner exchange software) and that’s a little too much work for what I want.

The solution I’ve settled on uses Javascript. Not what I was looking for but it does exactly what I need. I found my script at Dynamic Drive. It isn’t designed for ad banners, it’s designed to auto scroll images without page refreshes. I had to make few changes to the css and html to make it function as required but it works just fine.

To see it in action visit JournalXtra’s Webmaster Tools Portal and view the ad at the top right-hand side of the page. Yes, it dynamically loads ads without user interaction.

The script is known to work  in Firefox 1+, Internet Explorer 6+ and Opera 9+. It didn’t work in Konqueror but that might relate to my Java settings. I use AdBlock Plus in Firefox 3 and I am still able to see ads rotate in the ad box.

This script is often incompatible with meta refresh tagsSome readers have had problems getting this script to work when their web pages contain a meta refresh tag between their <head></head> tags. If your ads fails to display properly you should remove any meta refresh tags to confirm whether or not they are affecting the proper functioning of the script.

The Instructions

The Header

Copy and paste the below code into your page’s head section (i.e between its <head> and </head> tags):

The Javascript and CSS

Next, upload the Javascript and CSS files referenced by the above code. Put them in the same directory (folder) as your web page. For example, if your web page is browsed from my-site.com/index.php then you should upload the CSS and JS files to your site’s top most directory (the root directory); if your web page is browsed at my-site.com/my-folder/index.php then upload the CSS and JS files to the “my-folder” directory.

Here is the JS file:

featuredcontentglider.js

Copy the code found at that page and paste it into a file called “featuredcontentglider.js”.

The original CSS is unsuited to our purpose so here is an edited version of it. Copy and paste the edited version into a file called “featuredcontentglider.css”:

The original CSS is available from:

featuredcontentglider.css

The Ad Display Code

Next, you must place some code into your web page to display your ads. I’ve encased the code between <div></div> tags with an id of “rotatedads”:

Substitute your own advert code wherever it says “Advert Code One”, “Advert Code Two” and “Advert Code Three”. Create more advert code <div></div> boxes if required.

You might wonder why I chose to hide the toggle box (shown by <div id=”p-select”> instead of just removing it. The toggle box forms part of the script. When it’s fully removed, the script no longer works; so keep it in.

More information about this featured content glider’s settings options is available from Dynamic Drive.

Please leave a comment if you need help converting the code to display your adverts. I’ll do my best to help you.

  Copyright secured by Digiprove © 2010

Huge Text File, Need to Extract Specific Lines? Here’s How

If like me, you have to manipulate huge text files containing thousands of lines of data and you hate trawling through them manually, slowly, one-by-one, line-by-line then boy do I have a few tricks to teach you.

These tricks of mass manipulation of text files will turn your week long, heart-wrenching job into a 5 minute heart-lifting pleasure bordering on the orgasmic [just trying to liven things-up].

I used to export and paste my text files into an Open Office spreadsheet then sort them before cutting and pasting. Doing so used to cut in half the time taken to edit my text files. I even pseudo-shuffled lines of data by typing letters of the alphabet beside each data line then sorting them into groups of like letters (e.g alla’s together, all b’s together…). They were the Dark Years (o.k Weeks ;-) but I’m allowed ) to tell my tale my way; and if I want to make people feel sorry for us lonely, depressed webmasters then I will. I’m glad those days are over.

I like to get things done as quickly as possible. I don’t like to dawdle. A trait that has put me out of really good jobs and embarrassed others at the same time: I’ve built spreadsheets and devised processes that convert week-long jobs into 2 hour, Monday morning tasks; who needs an extra employee once he’s killed his job position :-? But that didn’t bother me. Progress and evolution, onwards and upwards; they are mymottos.