Programming on the Internet

Drupal Installation Venting!

ARRRRGGGHHHH!!! I hate moving to new hosts. Something always goes wrong. Maybe it's me. So here's a venting blog entry about my recent ordeal with a Drupal Installation on HostGator which I just solved a few minutes ago. Call it a debrief on my experience and see what lessons I can learn from my mistakes. There isn't anything wrong with HostGator. I realise now what I was doing wrong.

I always go about Drupal installations systematically. Actually I wasn't leaving my long time hosting service (MediaTemple). I just wanted another host and wanted to try out another service (and also to use them as a backup, in case anything happens).

So I sign up to HostGator (which was painless except for the hip pocket - although their hosting prices are competitive). I bought a new domain name from GoDaddy and another from a company called IntaServe which offer registrations for *.com.au's. I've had experience with GoDaddy before - so that went smoothly - although for the uninitiated - you'll probably get lost in the jungle of promotions that they have. I'm slightly annoyed with Intaserve. I guess that's where my attitude started down a downward spiral. I came into the new project all optimistic and now this Australian registrar is screwing my workflow. Why? Because their business systems are screwed. I think they need to have a look at their registration systems: just a few tweaks with their wording in their emails and automated systems and they would be really good. But no, it took me a while, emails to Intaserve took a while to get answered. I was emailing HostGator at 11pm on a Sunday night in Australia and I was getting a response from them. So I had to give Intaserve a call to fix things. In five minutes the pain was all over. Thank God I don't have to deal with Intaserve again until the next time I need to renew my domain.

Place a Live Digg Button on Your Website

From the Digg Blog:
Once your story has been successfully submitted you can now display the number of diggs and allow users to digg your content directly by using the following syntax:


<script>
digg_url = 'URLOFSTORY';
</script>
<script src="http://digg.com/api/diggthis.js"></script>

Australia wins RoboCup 2006!

An Australian Team from Newcastle University wins RoboCup 2006. RoboCup is a competition of Sony AIBO robotic dogs playing soccer without any human intervention during the game. Yes, it's all run with pre-programmed Artificial Intelligence (AI). In the final game - played overnight - the University of Newcastle's NUBots beat the University of New South Wales' rUNSWift team 7-3.

Ciao Blog Marco!

Check this basic website hack out here. The programmers behind this promotional website made it too easy to mess around with the promo text: Just change the parameters for "firstname=" in the URL and you can get the nun to say virtually anything. In my opinion, they should have implemented basic encryption strategy to stop users from changing parameters - after all, it is a banking website and the impression of security to the webuser should be the utmost importance. Have fun with it while you can. Ciao Blog Marco!

Selling A Website for n00bs: Transfer Domain

There comes a time in a webmaster's life when they lose the passion they once had in building, designing, promoting and maintaining a website. And that time came for BetterWeddingIdeas.com. One of my first websites other than this blog of mine. That passion was lost, I stopped updating the site and my baby started losing visitors. I didn't want that to happen so I sold it off on a webmasters forum. I set the auction going but it eventually sold just a few hours at BIN (Buy It Now) price. some may say I could have received a higher price for that website but I'm happy because the site is going to a trustworthy person who already owns a wedding website. The true purpose of the sale is to see my baby grow more, and with me it had no potential to do so, and now it has the chance to become a successful website. right now I'm in the process of finalising the transaction and transferring the domain name and the servers.

Yet another Firefox Extension - a Simple Ruler

Firefox Extensions are simple the best. They allow so much extra functionality to the web surfer and better still for website developers.

As a websurfer I love the AdBlock extension as it allows you to block any image/javascript on the page - I've effectively blocked out every advertisement on all the sites i frequent.

Anyway I stumbled on yet another nifty firefox extension - a simple measuring tool for the computer screen - a ruler with units of pixels. Handy for any website developer. (Instead of using the old screenshot and ruler process to measure elements of the browser window/website)

Download and Install the Ruler Extension.

PHP and Javascript: Logical Operators and Conditional Statements

Here are some mathematical operators that could be used for PHP and Javascript:
+ addition
- subtraction
* multiplication
/ division
% modulus (this is the remainder when you divide something)

Logical Operators could be used in IF statements in PHP and Javascript to control the flow of the program and can form part of conditional statements:
&& AND
|| OR
! NOT

Comparison Operators could be used in IF statements in PHP and Javascript to control the flow of the program and can form part of conditional statements:
> Greater Than
< Less Than
>= Greater Than or equal to
<= Less Than or equal to
== Equal to (remember, the "=" sign assigns a value to a variable, the "==" compares two values for equality.)
!= Not equal to

You can use these Logical and Comparison Operators in the following fashion in coding PHP and Javascript:
if (conditional statement)
{
JavaScript/PHP statements...
}
else
{

Javascript Bust out of frames from Google Image search

Javascript Bust out of frames from Google Image search...

It's simple: Just paste these lines in your code:

if (parent.frames.length
> 0) top.location.replace(document.location);

The main concern it that Google images can suck bandwidth from your website - and this technique eliminates any frame - especially for Google Images - So you can potentially monetize your visitor.

The Sources: (They both seem to have the same content?)
SEO Black Hat Black Hat SEO BlogFrame-Buster Best. Javascript. Ever.
Frame busting Google Images

PHP fetching and PHP wrapping content

Here are some links regarding PHP fetching and PHP wrapping content:

Free PHP Scripts-Content Retrieval -PHP Scripts-News Headlines Stock Quotes Weather XML RSS Feeds-Free PHP Scripts

Drupal: How to wrap content from another site in drupal: code snippet?

Content Wrapping Code Snippet

The PHP Resource Index Documentation Examples and Tutorials Content Retrieval

php leech content -anti - Google Search

PHP Web Fetching Tutorials

How to hire great open source developers

"Many companies have employment policies that stipulate that the company owns anything its employees develop. What happens

when an employee works on an open source project? How is it possible for your employee to give away their developments while

fulfilling the requirements of his or her employment agreement?"
How to hire great open source developers

Web Design Inspiration

NewYorkCity.com

Site has a clear and simple web design, yet it delivers a lot of information in an effective manner.

Features:
- Text box input with sample text - disappears once clicked, but reappears if there was no input
- Horizontal Header menu system
- Banner top image
- Unique front page with Adsense
- Free Email @nyc.com
- New Yorker Blogs
- NYC Events and other info
http://www.newyorkcity.com/

Eatability

Purple layout!
Features:
- Restaurant Review, ratings and listing for Sydney
- Allows user input
- Uses Maporama

for location maps of restaurant

http://www.eatability.com.au/
Another Competitor:Time2Dine

Made for Adsense - Proverbs Website

A proverbs site with Adsense galore

and one proverb on the page - "You can lead a horse to water, but you can't make him drink."

Updated website! New theme - fully CSS mate!

Needed to take a well earned two hour break from studying integrals and trig functions and the dreaded Circuit Analysis.

I've been working on this new theme for the past few months... some people may have seen me working on it on my laptop on my long train rides ;)

Its CSS (Cascaded Style Sheets) based - yep - no tables!

Have a bit of trouble with the image pages though... it acts up in IE explorer - the right sidebar drops off and in Firefox the image falls under the right sidebar.

I'm working on a solution right now... to bust those sidebars for image pages. I'll probably have it up in the next month.

Good riddance to the old theme.

And Ken Vo... thanks for telling me the site looked pretty bad in it's old state. (I was actually working on the new theme when you made your comments)

and now I'm going to take another break. Its such a nice day out - i'm going for a bike ride.

More surfing details... This time its about PHP sessions and other Programming websites...

More surfing details... This time it's about building and developing websites.

Now I'm going to delve into my website project to which I put under wraps for the moment. I'm not going to tell you exactly what I was making, but just stuff about programming it.

Here is a useful website if you want to share code with other people on forums...PHPriot's PHPaste...

I installed a localhost type setup aka a "development environment" on my laptop to speed up the website development process. So instead of writing code and uploading it by FTP and loading it up in the browser, all I have to do is save the file and hit refresh on the browser! My local setup has the latest versions of PHP, MySQL and Apache in a Windows XP environment.

Of course, the install wasn't a clean install for the first or second or even third tries... Eventually the setup worked. Installing this software is not for the faint hearted - it takes hours of tweaking and looking around the internet to troubleshoot your problems. It takes even longer if you have totally have no idea what you are doing. (like me)

Anyway, its well worth the effort if you take web development seriously.

Apache - Attache

Now how to do you pronounce Apache - as in the Apache Indians and the Apache software the software that is the backbone of many Internet servers? This question came up a few weeks back when I was installing the Apache server on my laptop.

Is it, Apa'chi (Apachi)? or Apa'shey (Apashey)?

According to my dictionary there are two Apache's... Or rather more than that.
Four nouns and one adjective usage.
One noun is Apache is a member of a tribe of Indians living in the south west of US.
Second noun is the tribe iteself.
Third usage is their language.
The last noun usage is spelled with a lower case 'a' - apache. In this form it describes a rough or rowdy person, especially one a band of toughs or gangsters who operate in Brussels or Paris.
The adjective form of apache describes a kind of energetic dance in which the partners are dressed like an apache and his woman.

The first three usages and the final two have different pronounciation.

The first pronounciation is like "Apa-Chi" describing the Indians - and the software.

The second pronounciation is simply "Apash-"

This surprised me as I assumed Apache owuld be similar to Attache as in an attache case or a staff member of an ambassador. Attache is pronounced as "Atta-shey" if you get the drift.

MySQL error #1064

I was trying to upload my database I've made on my local server "localhost" to my live site when I came accross this error: #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'collate latin1_general_ci NOT NULL default '', `type` varchar.