Keith Baker's Digital Life - tagged with example http://keif.name/feed en-us http://blogs.law.harvard.edu/tech/rss Sweetcron god.dreams@gmail.com Patrick Wied | Software Architect, Web Developer http://keif.name/items/view/33571/patrick-wied-software-architect-web-developer ]]> Wed, 27 Jul 2011 13:06:00 -0600 http://keif.name/items/view/33571/patrick-wied-software-architect-web-developer SEOmoz | 4 Ways to Improve Your SEO Site Audit http://keif.name/items/view/15944/seomoz-4-ways-to-improve-your-seo-site-audit ]]> Thu, 20 May 2010 12:21:00 -0600 http://keif.name/items/view/15944/seomoz-4-ways-to-improve-your-seo-site-audit htaccess rewrite, htaccess http://keif.name/items/view/14901/htaccess-rewrite-htaccess ]]> Mon, 26 Apr 2010 11:37:00 -0600 http://keif.name/items/view/14901/htaccess-rewrite-htaccess gaddons - Project Hosting on Google Code http://keif.name/items/view/8908/gaddons-project-hosting-on-google-code ]]> Wed, 18 Nov 2009 14:24:00 -0700 http://keif.name/items/view/8908/gaddons-project-hosting-on-google-code Writing plug-ins in Python http://keif.name/items/view/8524/writing-plug-ins-in-python ]]> Mon, 02 Nov 2009 09:20:00 -0700 http://keif.name/items/view/8524/writing-plug-ins-in-python Horstmann: Big Java, 3rd Edition - Student Companion Site http://keif.name/items/view/8016/horstmann-big-java-3rd-edition-student-companion-site ]]> Mon, 28 Sep 2009 04:11:00 -0600 http://keif.name/items/view/8016/horstmann-big-java-3rd-edition-student-companion-site Common Regular Expressions/Data Validation using RegEx -> 10 Regular Expressions http://keif.name/items/view/7383/common-regular-expressionsdata-validation-using-regex-gt-10-regular-expressions ]]> Sun, 02 Aug 2009 08:47:00 -0600 http://keif.name/items/view/7383/common-regular-expressionsdata-validation-using-regex-gt-10-regular-expressions MooTools Development in Dojo Land http://keif.name/items/view/5241/mootools-development-in-dojo-land ]]> Wed, 03 Jun 2009 17:09:00 -0600 http://keif.name/items/view/5241/mootools-development-in-dojo-land Create a REST API with PHP « Gen X Design | Ian Selby http://keif.name/items/view/4469/create-a-rest-api-with-php-gen-x-design-ian-selby ]]> Fri, 22 May 2009 10:21:00 -0600 http://keif.name/items/view/4469/create-a-rest-api-with-php-gen-x-design-ian-selby jPlayer : the only CSS styleable jQuery mp3 player plugin http://keif.name/items/view/3768/jplayer-the-only-css-styleable-jquery-mp3-player-plugin

Very cool, full control of the UI so flash handles the audio but JS handles the commands.

]]>
Wed, 06 May 2009 12:36:00 -0600 http://keif.name/items/view/3768/jplayer-the-only-css-styleable-jquery-mp3-player-plugin
cssgallery.info » Mootools with touch events http://keif.name/items/view/3721/cssgalleryinfo-mootools-with-touch-events ]]> Wed, 06 May 2009 08:23:00 -0600 http://keif.name/items/view/3721/cssgalleryinfo-mootools-with-touch-events How to Import and Display RSS Feeds in WordPress • Perishable Press http://keif.name/items/view/3280/how-to-import-and-display-rss-feeds-in-wordpress-perishable-press ]]> Sun, 26 Apr 2009 22:39:00 -0600 http://keif.name/items/view/3280/how-to-import-and-display-rss-feeds-in-wordpress-perishable-press SlideItMoo v1.1 - image slider http://keif.name/items/view/2679/slideitmoo-v11-image-slider ]]> Thu, 09 Apr 2009 01:15:00 -0600 http://keif.name/items/view/2679/slideitmoo-v11-image-slider AbhiTech: HOW-TO: Build A Simple Online Feed-reader With SimplePie, jQuery and PHP http://keif.name/items/view/2366/abhitech-how-to-build-a-simple-online-feed-reader-with-simplepie-jquery-and-php ]]> Tue, 31 Mar 2009 00:20:00 -0600 http://keif.name/items/view/2366/abhitech-how-to-build-a-simple-online-feed-reader-with-simplepie-jquery-and-php mooStack http://keif.name/items/view/1962/moostack

Kind of an image shuffler. Very cool, I think better than some of the slideshows I've seen.

]]>
Fri, 20 Mar 2009 07:46:00 -0600 http://keif.name/items/view/1962/moostack
PBB MagicWheel | Pokemon_JOJO http://keif.name/items/view/1963/pbb-magicwheel-pokemon-jojo

A slightly different revolver/cover flow. The only thing I don't like is it's constantly in motion, but I haven't dove into the code so who knows what else is in place.

]]>
Fri, 20 Mar 2009 07:45:00 -0600 http://keif.name/items/view/1963/pbb-magicwheel-pokemon-jojo
mParallax http://keif.name/items/view/1681/mparallax ]]> Thu, 05 Mar 2009 22:36:00 -0700 http://keif.name/items/view/1681/mparallax Are you coding obtrusively? http://keif.name/items/view/22/are-you-coding-obtrusively

“Power tends to corrupt, and absolute power corrupts absolutely. Great men are almost always bad men.” -Lord Acton, in a letter to Bishop Mandell Creighton, 1887 I’ve noticed a disturbing trend that I myself have fallen victim to. I’m seeing sites coded where we do more in javascript for our styling needs and interaction, with no fall back support for non-javascript users. Styles are called explicity from javascript (which requires a lot of transversal to find out “is it this #000 or that #000?”). onclick events. Onblur. Really? Use the power of your framework! Don’t do the work if you don’t have to! For example, mootools allows us to grab any item on the page and add events to it:

$$('a').addEvent('mouseenter',function(e){ alert('you entered the anchor!'); });

Why stop with one event? (straight from the mootools documentation!)

$('myElement').addEvents({ 'mouseover': function(){ alert('mouseover'); }, 'click': function(){ alert('click'); } });

Using mootools we can make our code totally unobtrusive. No more onclicks littering the pages. We can leave the HREF tag pointing to static pages. We can inject elements on teh fly, so if someone doesn’t have flash/javascript we don’t show certain elements:

// don't have flash? if(Browser.Plugins.Flash.version !== 9) { // hide stuff! $$('.flashNeeded').setStyle('display','none'); // show stuff! $$('.noFlashNeeded').setStyle('display','block'); }

The same idea can be done for javascript detection - we only show certain elements if javascript is present, so we do element injection. But not to forget our jQuery bretheren (we’re all one big family)… Let’s do the same in jQuery!

// single event $('a').mouseover(function(){ alert('you entered the anchor!'); });

// multiple events $('a').bind('focus', function(){ alert('focused!'); }).bind('mouseover', function(){ alert('moused over!'); });

jQuery doesn’t do Flash out of the box… At least, I can’t dig it up - but that’s not a bad thing! The users of jQuery (A hearty, formidable group) have created the jQuery plug-in to detect flash versions! It’s all a matter of preference and opinion and bias as to whether it should be included with the main library or not. The Framework Wars are dead. We see similar abilities in all the frameworks - and instead of bickering about “being the best” we should work on contributing and learning these frameworks. Toby Miller put it best - “One framework at a time, please!” One framework at a time, please! You wouldn’t hand-over JSP code to a PHP client, would you? I really hate stumbling on sites that think just because there is a “no conflict” version we should just jam as many frameworks together that we can. That, to me, defines a lazy developer. I fight that battle - instead of being lazy and saying “I know this one better, so let’s turn no-conflict on” we should instead be saying “the client uses library X so we should develop accordingly - even if that means learning a new code! Copyright © 2008 iKeif - tech and social media geek, mootools fan, and a ton of links. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@ikeif.net so we can take legal action immediately.Plugin by Taragana

]]>
Tue, 11 Nov 2008 10:00:00 -0700 http://keif.name/items/view/22/are-you-coding-obtrusively
Using MooTools and Google Analytics to track outbound links http://keif.name/items/view/25/using-mootools-and-google-analytics-to-track-outbound-links

This seems to be something that people always want to do at some point - are people clicking on my outbound links? How Google recommends external tracking They currently recommend you tag your links like: <a href="http://www.example.com" onClick="[removed] pageTracker._trackPageview("/G1/example.com");"> Just as a point of reference - the /G1/example.com is purely symbolic - you can use the artificial pagename as the Goal URL in your analytics, as google shows: /G1/example_com or http://mysite.com/G1/example_com Kind of tedious, wouldn’t you say? Do you really want to run through your site and specifically tag each link that goes somewhere else? I’ve seen functions attached that basically duplicate this functionality - but if you’re moving the “onclick” into a function, it seems pretty much a moot effort. So, boom goes the dynamite, and in comes javascript. Add outbound tracking javascript This code from Jamie Huskisson accomplishes it simply:

if (document.getElementsByTagName){ var ahrefs = document.getElementsByTagName('a'); for(var i=0;i<ahrefs .length;i++){ if(ahrefs[i].href.indexOf('http://ikeif.net') == -1 &amp;&amp; !ahrefs[i].onclick){ ahrefs[i].onclick = function(){ var track = this.href + "pageTracker._trackPageview('/outgoing/'"+track.substring(7)); } } } }

Nice and succint, as code should be. In this example, it checks to see if we can grab tags - grabs all anchors, and then we check to see if they reference my site and there is no onclick event, and if so - assign the onclick! Technically, you don’t necessarilly need the track.substring(7) - you can call it something else if you like. Do the same - but with MooTools! As I’m sure you’ve figured it out, I’m a fan of mootools - one of the many well done javascript frameworks. The above code is just as easilly executed:

window.addEvent('domready',function(){ if ($$('a')){ $$('a').each(function(anchor){ var href = anchor.get('href'); if(href.indexOf('http://ikeif.net') == -1 &amp;&amp; href.indexOf('/') !== 0) { anchor.addEvent('click', function(e){ var track = this.href +"pageTracker._trackPageview('/outgoing/'" + track.substring(7); } } }); } });

[Edit: It just so happens that David Walsh hit the same topic!] Copyright © 2008 iKeif - tech and social media geek, mootools fan, and a ton of links. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please contact legal@ikeif.net so we can take legal action immediately.Plugin by Taragana

]]>
Tue, 14 Oct 2008 09:46:00 -0600 http://keif.name/items/view/25/using-mootools-and-google-analytics-to-track-outbound-links