Archive for the 'Tips & Tricks' Category

May
27th 2009
Watch out for a buggy Skype extension on Firefox

Posted under Tips & Tricks

I recently installed the shiny new Skype 4.0 and it is a big leap forward as a software program.

One unexpected side-effect however of installing the Skype Firefox Add-On is that it blocks all JavaScript pop-ups on every website in firefox. Given that the majority of e-commerce and utility websites need javascript pop-ups to work properly, its a massive bug that Skype have given birth to.

The fix is simple:

In Firefox, click on “Tools > Options”

Then click on “Add-Ons”

Find the “Skype Extension for Firefox” add-on

Click “Uninstall” and then restart the browser.

No Comments »

August
2nd 2008
PayPal Country Codes

Posted under Tips & Tricks

This is a very specific issue I experienced when integrating PayPal (website standard) with a form for simple online payments. I was using formspring.com to generate my form, but that doesn’t really matter. A form can pre-populate the fields in PayPal such as Price, Quantity, Name, Address and a host of other values.

I was having trouble getting the “Country” field to pass on from my form to PayPal when I found quite a simple solution. Basically the “Country” field can be very important because of currency and taxes, not to mention having the correct delivery address of the customer of course.

The problem with the “Country” field I experienced was caused by the fact that my form was sending the wrong value to PayPal.

I will explain: my form used Country Names = Country Values.

Therefore if a customer selected “Jamaica” as their “Country”, then the value sent to PayPal would also be “Jamaica”. Should be fine you might think…not so

PayPal only recognise the official ISO 2-letter country codes.  In this case “Jamaica” = “JM”

I have made this list available in CSV format for your convenience, it is taken directly from the ISO page but I took out one value because it was only a reference and would upset the form.

Here is the link to the CSV list >>

Another small point I would like to add is that if you want to apply taxes in PayPal, simply click on Profile > Selling Options > Selling Taxes and add the tax rates you want for each jurisdiction. These rates will be applied to everything that you sell through that merchant account.

No Comments »

April
28th 2008
Internet Explorer and Empty Div Elements

Posted under Tips & Tricks & Programming

Internet Explorer (both 6 and 7) has a niggly habit of rendering vertical spacing due to an empty div element e.g. <div id=”testdiv”></div> renders as vertical whitespace in IE but not in Firefox or Opera. It would be easy to prevent this happening by using CSS to hide the div using “display:none” however what if on certain pages content will appear in that div for example when loaded via dynamic code such as PHP? We want IE to hide the div when its empty but show all the content correctly when so loaded. The solution is blank HTML comments. Simply by popping in <!– –> at the beginning of your div code will cause IE to hide the div if there is no further content e.g. <div id=”testdiv”><!– –> dynamic content follows</div>. Negative margins begone!

3 Comments »

April
26th 2008
Some handy & lifesaving coding tools

Posted under Tips & Tricks & Programming & Technology

Some handy apps for my fellow codemonkeys out there:

ComponentSoftware Diff (CSDiff) is a free advanced file difference analysis tool for Windows. Use it to analyze what changes have been made between two revisions of the same file, folder or archived folder. CSDiff is commonly used to analyze program source files, HTML documents and MS-Word documents. I use this a lot for comparing folders of PHP code to track any changes I may have forgotten to document. http://www.componentsoftware.com/

PowerGREP is a powerful Windows grep tool. Quickly search through large numbers of files on your PC or network, including text and binary files, compressed archives, MS Word documents, Excel spreadsheets and PDF files, etc. Find the information you want with powerful text patterns (regular expressions) specifying the form of what you want, instead of literal text. Search and replace with one or many regular expressions to comprehensively maintain web sites, source code, reports, etc. Extract statistics and knowledge from logs files and large data sets. This really is a great tool. I use a lot of third party component for Joomla! and isolating a particular code section can be time consuming. A simple search of the code folder with PowerGREP can unearth that code very quickly. http://www.powergrep.com/

Firebug is a plugin for Mozilla Firefox that puts a wealth of web development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page. This is a genius little tool and saves you having to repetitively upload code changes to your CSS/HTML/Javascript when you can live edit them in the Firebug toolbar to see what effect that has. Very good for finding the right sizes for your div elements. Also check out the YSlow plugin for Firebug which analyzes your web pages and recommends mechanisms for speeding up the load times of each page. http://www.getfirebug.com/ http://www.yahooapis.com/yslow/

No Comments »

April
23rd 2008
CSS Positioning - it’s simple when you know how

Posted under Tips & Tricks

If you are interested in web design then you will be familiar with CSS I hope!

Positioning an element in “absolute” terms is very useful, but the element will position itself according to the window size of your browser rather than the containing “div” unless you do the following:

The PARENT “container” div must be positioned relative if the CHILD “insider” div is to position itself absolute according to the edges of the PARENT rather than say 20px from the left/top edges of your screen. Subtle difference but very important if you’re working with moving/fluid layouts.

div#container{
position: relative;}

div#insider{
position: absolute;
top: 20px;
left:20px;}

This article at Barely Fitz Designs must take the credit for what I have learned.

No Comments »

April
16th 2008
I take it all back Bill - Microsoft Office 2007 is brilliant

Posted under Tips & Tricks

The latest version of Word, Powerpoint, Excel and all those fidgety Microsoft applications that the whole planet depends on have been revolutionised in there new format. An adjustment period might be painful for some users but there is such an improvement in 2007 that it is like going from Black and White to Colour TV.

As a usability expert I admire some of the brave changes that have been introduced on the interface by the Microsoft team. Powerpoint 2007 is a masterpiece in productivity and graphic production. Excel is much improved, while Word’d pernickity formatting options have been greatly simplified.
By the way, one little tiny problem I did experience in Word 2007 was inserting Page X of Y in the “Footer” section of the documents. This clever person has the solution on techrepublic.com 

Anyway, while “Google Docs” and “Open Office” pretend to the throne of office automation, Microsoft are back in front by a long, long way again. It’s expensive but it’s the best money you will spend on software this year.

Now why don’t the people who made this wonderful product please start replacing Windows Vista please with something more humane!

Slán agus buíochas

No Comments »

March
11th 2008
Give Your Hyperlink Cursor a “Hand” in CSS

Posted under Tips & Tricks

hand pointer

If you use the web you will be familiar with this little “hand” cursor that appears over hyperlinks and buttons.

Normal Arrow CursorOccasionally people will notice that certain Navigation Menus or links are missing the “hand” cursor and appear just as a normal “Arrow” cursor like this >>

Well if you use CSS and you are interested in web development then there is a simple way to change the cursor to appear as the “hand” and there are actually a number of other choices too.

All you have to do is apply a class to the linked item, (e.g. a hyperlink) in your html code.
<a href=”www.google.ie” class=”any_class_at_all”>Google</a>

Now follow up in your CSS Stylesheet with this simple porperty:

.any_class_at_all{ cursor: pointer; }

(And yes, a “pointer” does refer to alittle hand, not an arrow cursor!)

I hope this helps! It worked for me anyway. Slán go fóill!

2 Comments »

February
19th 2008
Cutenews - A simple and basic solution for Content Management

Posted under Tips & Tricks

Cute news is a powerful and easy to use news management system. It supports commenting, archives, search function, file upload management, backup & restore, IP banning and flood protection. Its easy to install and it’s a great way to update news content on your site.

The WYSIWYG editor means you can add news stories to your site through a user-friendly interface and you can then edit or archive them at a later stage without messing around with the website’s backend. It also allows for four user permission levels (admin, editors, journalists and commentors) which offers good security and control options.

checkout cutephp.com

you might find these CuteNews parameters useful when you’re adding the code to your html:

$category = ‘X’;
Use this to only show news from a specific category. The “X” stands for the category id (the number of the category). You may add multiple, in the following format:
$category = ‘1,3,5′;
By default, CuteNews will show all news items.

$template = ‘X’;
This parameter is used to display the category with a specific template. You can edit/add templates in the “Edit Templates” section of the cutenews options panel. The “X” stands for the template name, watch out though, the name is case-sensitive!
By default, it will show the news using the “Default” template, which cannot be deleted.

$number = X;
The number of news to display. The “X” should obviously be replaced with the number. CuteNews will automatically use news from (multiple) archives, if the active news count is below the $number parameter.
By default, CuteNews will show all of the active news, but will not show any news from the archives.

$start_from = X;
Start displaying the news from a given number of news. You should always set the $number parameter for this to work. replacing “X” with “5″ and setting $number to “5″ for example, will show news 6 to 10. The prev/next buttons will not work when using this parameter.
By default, it will show the news from the beginning, and it will change the start from variable when you click the prev/next templates.

$reverse = true;
Obviously, this will reverse the news. Nothing to configure here.
Default: not reversed.

$static = true;
This will not show the full story and comment pages. This is useful for headlines, when you do want to show the full story in another include on the same page, but do want to show the active news in the headlines include.
Default: not static, so will show the full story and comment pages.

$PHP_SELF = ‘X.php’;
Use this to point all of the cutenews links to another page. Useful if you want to show the full story on another page. In the second page, you should add some kind of cutenews include code where you want to show the news. You should not add a ?var=value etc to the end of the link, use $QUERY_STRING to do that. Note that the prev/next buttons will also point to the new page.
The default page is the page where you added the news to.

$QUERY_STRING = ‘X’;
When you want to point the news to another page, but when the page uses a link like page.php?var1=value1&var2=value2, you would set $PHP_SELF to “page.php” and you would replace the X with “var1=value1&var2=value2″.
Default: The variables passed the current page, but with the CuteNews variables stripped off, so when the current page is: “http://site.com/cutenews/show_news.php?subaction=showcomments&id=1090228158&archive=&start_from=&ucat=&myvar=value”, the $QUERY_STRING parameter would be set to “myvar=value” (subaction, id,archive,start_from and ucat are cutenews variables).

$only_active = true;
If $number was set higher than the amount of active news, and this option is set, cutenews will not “fill” the missing entries with items from the archives.
Default: Not set, cutenews will try to merge archived news items to the active news items if there are fewer news items than $number.

visit the cutenews forum for more more helpful Q&A’s

No Comments »

February
19th 2008
A Superb free paper-saving PDF printer!

Posted under Tips & Tricks

Primo PDF is a free easy to install program that gives you the option of printing to PDF instead of your regular printer. This can be very good for saving paper and keeping backups of online invoices and documents.

http://www.primopdf.com/

A must have for anybody and everybody!

1 Comment »

Close
E-mail It