Author Archives | lost-in-code

lost-in-code - who has written 71 posts on Lost-In-Code.

I (Antonie Potgieter) am a software engineer/web developer located in South Africa. My full-time work is the management of Tribulant Software and the development of its software packages.

Contact the author

WordPress: Add RSS feed to sidebar

Friday, February 3, 2012

0 Comments

You can easily add any RSS feed (remote or local feed) to your WordPress sidebar using a sidebar widget. To do this, go to Appearance > Widgets in your WordPress dashboard and locate the RSS sidebar widget. Then you’ll drag the RSS sidebar widget to one of your sidebars where you would like it to [...]

Continue reading...

PHP: HTML to PDF

Tuesday, January 31, 2012

0 Comments

I’ve pretty much tried all the PDF libraries out there for saving HTML to PDF appropriately and correctly using PHP and came to a conclusion (continue reading). The one that worked the fastest and most efficiently was the HTML to PDF class on PHP Classes but eventually this EasySW remote HTML to PDF service in [...]

Continue reading...

10% OFF all premium WordPress plugins

Saturday, January 28, 2012

0 Comments

Tribulant Software has a promotion running throughout the year of 2012. Use the coupon code “2012” to get 10% OFF all premium WordPress plugins. http://blog.tribulant.com/general-news/happy-new-year-2012/ 

Continue reading...

Safari: Open links in new tab instead of new window

Friday, January 27, 2012

0 Comments

By default, Safari 5 will open links with a target _blank attribute in a new Safari window. I don’t like this as I prefer to browse in one window. Many of you might have the preference of opening links in a new instead of a new window. To do this, go to Safari > Preferences [...]

Continue reading...

PHP: URL inside Regex

Thursday, January 19, 2012

0 Comments

Using special, regular expression characters in regular expressions require you to escape them in the regular expression pattern. I had an issue with dynamically getting an array of URLs from HREF attribute from links using PHP preg_match_all and then wanted to replace this array of URLs dynamically in a loop again with their Bit.ly links [...]

Continue reading...

jQuery Cancel Other Ajax Requests

Saturday, January 14, 2012

0 Comments

For some reason, you might be submitting Ajax requests to the same URL for the same purpose and returning the same results but it happens that there are multiple Ajax requests just being redundant. Possibly a user interface where a user is making multiple selections on a page, one after the other and running multiple [...]

Continue reading...

DomPDF images not working

Thursday, January 5, 2012

1 Comment

Are you having problems with images not displaying in DomPDF generated PDFs? The probable reason is because you’re linking your images in HTML with a path from the script or with an absolute URL like this: <img src="images/myimage.jpg" /> OR <img src="http://domain.com/images/myimage.jpg" /> The solution is to change the image SRC to the absolute path [...]

Continue reading...

Canada Post API StatusCode -3001

Thursday, January 5, 2012

0 Comments

If you are getting a ‘statusCode‘ as “-3001″ and a ‘statusMessage‘ as “Destination Postal Code/State Name/ Country is illegal.” from the Canada Post API, it means that the city/state/country is causing problems. At this stage, you’re obviously getting an XML response so the credentials, port, etc… should be perfectly fine. Ensure that your XML request [...]

Continue reading...

jQuery delay function/method

Monday, August 29, 2011

2 Comments

New jQuery delay() method. More information and examples of the jQuery delay() function/method. Here is a quick example: jQuery(‘#mydiv’).attr(‘value’, "Button Text").delay(1500).queue(function() { alert(‘button text was changed’); });

Continue reading...

Apache: Prevent Directory Browsing

Monday, July 18, 2011

0 Comments

Are web users able to browse the directories on your website and server and see all the files like folders with images in them and sub-folders?

Continue reading...