Posts about Computing

AddToAny WordPress Plugin Fix for the Google +1 Button

June 23rd, 2011

I just added the AddToAny links on my blog but could see that it gave a parsing error when I tried to use the Google +1 button.

Having looked at the code it’s easy to see the error, in line 371 the code says this:

'https://plusone.google.com/u/0/_/%2B1/button#url=' . $linkurl_enc . '&size=medium&count='

Whereas the ampersands should be encoded as & (as they are in all the other services), just change the line to read this and all is well.

'https://plusone.google.com/u/0/_/%2B1/button#url=' . $linkurl_enc . '&size=medium&count='

Update – I entered the bug onto the forum and the developer responded within a few hours saying it will be fixed for the next release. It’s nice when a developer is so responsive.

Here’s the forum thread.

Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

Server MIME Type for Android APK files

March 9th, 2011

I uploaded my test Android App to my website but found that the server was just treating the file as plain text so it just appeared in the browser as a regular page.

To force the app to download through a browser was very easy, just edit your .htaccess file to add the following line (assuming you use Apache of course).

AddType application/vnd.android.package-archive apk

Now the phone browser will force a file download so it can be installed by the app installer, easy.

Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

Packages Removed from Fedora 13

April 16th, 2010

After finally getting the Fedora 13 Beta release installed on Virtualbox (the Fedora 13 Alpha wouldn’t install due to problems with X) I was disappointed to see that gnome-applet-netspeed is no longer available.

Here’s the list of removed packages but the good news is that gnome-applet-netspeed may be saved.

Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

Does the iPad provide the best way to browse the web?

April 14th, 2010

It’s a quote that’s been discussed over and over in the last few weeks since the launch of the iPad.

Being a geek I understand that Flash is not good for the web and I’ll be more than happy if there can be agreement on a video codec (maybe Googles own VP8) to use in the HTML5 specification. I’d much rather that video ran natively in the browser rather than relying on a plugin.

But just because I understand all these things doesn’t mean my girlfriend cares the same way I do.

We recently talked about the iPad (she’s not normally into ‘tech’ stuff but the iPad has been so heavily promoted that it’s hard to miss) and we talked about how such a device would be ideal for her.

She doesn’t have laptop and her computer is in our daughters bedroom so we can’t use it after she has gone to bed. Her requirements are also very minimal, email, web and that’s about it….oh except for those online Flash games.

And there’s the crunch. The iPad may be a great piece of hardware but she doesn’t want to know why Flash won’t work on the iPad, she just wants it to work. Usually Apple get this.

So for this reason alone I’ll never buy an iPad. Maybe I’ll buy her a Google tablet instead.

Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

Wireless Network Scanner

March 30th, 2010

I recently came across a free, open source wireless network scanner. It available from the MetaGeek website and is called inSSIDer.

It’s very simple to use, just select the wireless adapter and start scanning. The graph displays all the wireless networks with their signal strengths and shows both 2.4GHz and 5GHz bands.

I ran the scan from my flat and found 52 access points, but fortunately mine was the only one running on the 5GHz band :-)

Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

Using Shadowbox with Virtuemart

March 24th, 2010

I forgot to mention in my previous post that when using Virtuemart and Shadowbox you end up with double popups if you enable the lightbox option in Virtuemart.

It’s easy to fix just following the instructions on the Virtuemart formum

To summarise you just locate the file administrator/components/com_virtuemart/classes/htmlTools.class.php and find this line at line 899.

$link = vmCommonHTML::hyperLink( $image_link, $text, '', $title, 'rel="lightbox'.$image_group.'"' );

Replace it with this instead.

$link = vmCommonHTML::hyperLink( $image_link, $text, '', $title, 'rel="shadowbox'.$image_group.'"' );
Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

Looking at Joomla

March 24th, 2010

I’ve never really looked at Joomla before, mainly because I had no need and am using WordPress as my blogging platform.

However a work colleague recently asked me to help migrate a Jooma 1.0 site to Joomla 1.5. Their site was a small online shop using the Virtuemart shopping cart.

In the end someone else did the work but it got me looking at Joomla in more detail.

It took me a while to work out the sections and categories as well as all the modules but after the rather steep learning curve I can see that Joomla is a very powerful CMS.

I made a test install using WampServer and had the site up and runnig in just a few minutes. The install instructions are very easy to follow and the install went very smoothly.

After that I installed Virtuecart, Joom!Fish and Ninja shadowbox.

JoomFish makes adding translations extremely easy (I live in Denmark so many sites are in Danish and English) and getting a basic site working was a pleasure.

Card Processing Fees

Looking at Joomla got me thinking about on-line shops so I investigated the cost of processing card payments in Denmark. Most people here use Dankort (a debit card) but to use this you have to sign up with PBS to get a merchant ID. Looking at their costs made me realise that a problem is the cost of traditional card processing companies.

PBS charges are shown here. For an account that only accepts Danish cards you pay DKK300 per month for 100 transaction (that’s about US $54) which seems a ridiculously large amount for a completely automated system.

PBS prices

If you want to accept VISA/Mastercard etc. then the prices is US $145 per month for 500 transactions.

I’ve read quite a few articles on companies trying to break this monopoly, most recently this one in Wired.

Hopefully these start-ups can change the balance of power and really open up micro payments and on-line shops to the masses.

Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

Adding CSS Opacity Using JQuery

February 24th, 2010

I recently read about using rgba values for the background CSS property, it’s very easy to apply using JQuery, for example.

$("#element").css("background","rgba(255,63,73,0.5)")

The last value of 0.5 is just the opacity. Of course this doesn’t work in IE so you need to use.

$("#marker").css("filter","alpha(opacity=50)")

Finally to get the RGB values from the hex colour codes you can use these functions I found here.

function HexToR(col) {return parseInt((cutHex(col)).substring(0,2),16)}
function HexToG(col) {return parseInt((cutHex(col)).substring(2,4),16)}
function HexToB(col) {return parseInt((cutHex(col)).substring(4,6),16)}
function cutHex(col) {return (col.charAt(0)=="#") ? col.substring(1,7):col}
Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

User Styles Extension for Firefox and Chrome

February 11th, 2010

I’ve recently had a problem when using EPIServer with either Firefox or Google Chrome. We’re using version 5 and the HTML editor used, HTMLarea, does not support either browser.

I should also mention that the HTML editor is pretty terrible especially when compared to CKEEditor, for example.

As an example, if I write some style rule like this using the source code:

style="border:0"

then after saving the editor manages to mangle to HTML so it looks like this:

style="BORDER-TOP:0;BORDER-BOTTOM:0;BORDER-LEFT:0;BORDER-RIGHT:0

It manages to expand a simple rule plus add ALL CAPS into the mix (which will not validate as valid XHTML by the way).

But to get back to the point, since the editor is not supported I end up with a very small textarea in Firefox that’s hard to use.

To try and solve the problem I tried the Firefox addon called Resizeable Textarea but this doesn’t work in Firefox 3.6 plus it requires manual resizing every time.

The solution that worked for me is the Stylish addon that allows me to override the CSS rules for any site. I simply made a new rule to resize the textarea looking like this.

@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document url-prefix("http://intranet/login") {
textarea.epitextareaeditor  {height:20em !important}
.episize500 {width:800px !important}
}

A similar extension, called Chrome Stylist, is available for Google Chrome that works almost identically.

Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

They Can’t Really Be That Bad

January 29th, 2010

I just found this URL today, http://thesource.ofallevil.com/ that’s apparently a CNAME for microsoft.com.

If you look at http://ofallevil.com/ using Firefox and Firebug you can see the server runs Apache on CentOS 5.2, but the link to Microsoft loads all the data from Microsoft running IIS 7.5

It’s silly but it brought a smile to my face today.

Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

Switch to our mobile site