Deprecated: Assigning the return value of new by reference is deprecated in /customers/ajaxorized.com/ajaxorized.com/httpd.www/wp-includes/cache.php on line 36

Deprecated: Assigning the return value of new by reference is deprecated in /customers/ajaxorized.com/ajaxorized.com/httpd.www/wp-includes/query.php on line 15

Deprecated: Assigning the return value of new by reference is deprecated in /customers/ajaxorized.com/ajaxorized.com/httpd.www/wp-includes/theme.php on line 505

Deprecated: Assigning the return value of new by reference is deprecated in /customers/ajaxorized.com/ajaxorized.com/httpd.www/wp-content/plugins/CodeHighlighter/codehighlighter.php on line 42
Ajaxorized » 2007 » July
Ajaxorized

Top 5 FireFox plugins for serious webdevelopment

July 10, 2007

Once, long before the Ajax and Web 2.0 era , there was a time we used HTML <center> for text-alignment and javascripts stunning alert() function for debugging our websites and applications. But times are changing. To develop high performance Web 2.0 'killer apps', we need more tools and better applications to create web applications based upon Javascript frameworks (such as prototype, jQuery, scriptaculous, moo tools etc.) feeded by PHP as a backend. Below I will sum up some free Firefox-extensions to build web applications quick, efficient and flawless. Ok, almost flawless then. (more...)

Add to: del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Windows Live Yahoo
topFiled under: Ajaxorized, Ajax, Javascript | Willem @ 9:50 pm | Comments (1)

Include Google Analytics in your static HTML website

A few months ago I was assigned to a project where a company, while their new site was being developed, wanted to track the visitors on their website for marketing purposes. The only problem was that their current website was constructed with Frontpage a few years ago and consisted of hundreds of static HTML pages. Since I'm (very) lazy I was not planning to copy paste the whole thing, I figured out a way to include the GA code in every static html page.

First, I wrote a .htaccess file which rewrites all (including files in subdirs) .html and .htm pages to addgoogleanalytics.php:

RewriteEngine on
RewriteRule ^(.*).html?$ addgoogleanalytics.php?file=$0

Wow, it that all? Yes it is. So helloworld.html will be rewrited to addgoogleanalytics.php?file=helloworld.html, and the user won't even notice. Now, take a look at addgoogleanalytics.php:

<?php
/* Open the given file and add the google analytics code */
$sData = file_get_contents($_GET['file']);
$sData = str_replace("</body>", "
<script src=\"http://www.google-analytics.com/urchin.js\" type=\"text/javascript\">
</script>
<script type=\"text/javascript\">
_uacct = \"UA-1808705-3\";
urchinTracker();
</script>
 
</body>", $sData);
echo $sData;
?>

Enjoy.

Add to: del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Windows Live Yahoo
topFiled under: Uncategorized, PHP, Apache, Code | Willem @ 12:10 pm | Comments (1)

ajaxorized.start();

July 5, 2007

Ignition, takeoff, we're started! Enjoy!

-Will

Add to: del.icio.us Reddit Slashdot Digg Facebook Technorati Google StumbleUpon Windows Live Yahoo
topFiled under: Uncategorized | Willem @ 1:11 pm | Comments (1)