- Help Please, #CodeIgniter and #fpdf pdf generation http://codeigniter.com/forums/viewthread/45365/P15/#685785 #
- RT @mike9r: HP is going to learn how social media can kill you: their webcams are racist http://idek.net/p0i (via @iA) #
- I just successfully restored a files from 2 weeks ago #thanks #apple #timemachine ! #
- RESOLVED: RT: @sheldonlendrum: Help Please, #CodeIgniter and #fpdf pdf generation http://codeigniter.com/forums/viewthread/139181/ #
- pretty – firefox 4 windows screenshots
http://blog.stephenhorlander.com/2009/12/21/windows-themeui-update/ # - RT @vodafoneNZ: RT @SitaMitaBita and others: RT @flyairnz: from our friends @grabaseat wildlife – The Cougar – http://bit.ly/6bqBFQ #
- Sweet mac Growl theme #mono http://fixedgear.ca/ #
- I just saw the #trademe guy in http://www.trademe.co.nz/Community/OfficeCam.aspx picking his nose !!! #
- Thanks @google – Merry Christmas ! http://www.google.com/advertising/holiday2009/
- When advertising goes bad http://i.imgur.com/uoJi0.png (via @timothymarshall) #
- RT @mike9r: Microsoft loses patent appeal, is ordered to stop selling Word and Office starting January 11th. Wow! http://idek.net/phI #
- At the mall, kmart is sold out of sellotape !! #fml #
- I'm watching Forrest Gump – classic! #
- Even Santa bends the rules sometimes… http://pics.livejournal.com/photognome/pic/005fk3zq.jpg (via @photognome) #
- Did you get some last night or something ?
Hm. I'm in a good mood today.
(via @dustindikes) # - RT @vodafoneNZ: RT @nigelramsay: RT @daaanpace: adidas star wars collection http://bit.ly/8DByU4 sweet! #gottagetmeoneofthose #
- 1 working hour of 2009 to go – ish… #
- @mwproductions I have heard 3d isthe ONLY way to see Avatar ! in reply to mwproductions #
Monthly Archives: December 2009
Twitter Weekly Updates for 2009-12-20
- I took it and so should you—The Survey For People Who Make Websites, 2009: http://aneventapart.com/survey2009 #
- Sequel Pro, can you import a 120mg mySQL database ? #
- Yes, yes you can ! I remember when you would crash with a 2mg import
Happy times ! # - RT @iPhonewzealand: For those of you with a US iTunes account, check out the free 20-track iTunes Holiday Sampler . http://bit.ly/5ZC9Uo #
- @rowanbeentje Thanks, yeah, worked well, Great App BTW ! in reply to rowanbeentje #
- @rowanbeentje I have SP 0.9.6, checked for updates, there is no 0.9.7 ? in reply to rowanbeentje #
- RT @totalinz: RT @iPhonewzealand Latest…Kiwi App Review: NZRSS http://bit.ly/79J67o / #2 thanks to you
http://yfrog.com/4eaqtj # - My Niece made me and the misses a christmas video.
http://elfyourself.jibjab.com/view/B5aXdb2F7p4RHCr9xSoY # - This morning's work at @totalinz – Merry Christmas from the Vodafone Warriors
- Check out my latest game of Clown Town! http://yfrog.com/3lpyytzj (http://rampchamp.com/) #
- Check out my latest game of Icon Garden! http://yfrog.com/33vhyqj (http://rampchamp.com/) #
- Check out my Blue Kazoo in @RampChamp! http://yfrog.com/3g25oj (http://rampchamp.com/) #
- Got an iPhone ? Get this !! http://bit.ly/7E2GsZ #
- Hey I Google number 1 for 'sheldon'
http://yfrog.com/aukp6p
( Maybe a little bias ) # - Best church Christmas billboard evar: http://bit.ly/915lEG (via @gnat) #
- I'm at the @glassartnz workshop http://yfrog.com/4e7amgj #
- Try @totalinz
RT @gnat: dear lazyweb: who in NZ has business experience around open content (text, audio, video, interactive)? # - home time, home time, home time. #
- Hey @telecomnz, Does your pro account has 80gig data allowance now ? http://yfrog.com/1ybccyj #
- I just upgraded in to wordpress 2.9 on my blog http://sheldon.lendrum.co.nz #
- Sweet Deal.
@sheldonlendrum for a limited time it does, details here http://bit.ly/8jDU3i ^DM (via @TelecomNZ) #
- CAn anyones help as to why my #php #fpdf PDF generation is not creating new files, but juts adding new pages ? #
- Who drinked my cougar ? http://yfrog.com/3laviuj #
Yahoo – sheldon.lendrum and torrents
How do I rank number 1 for ‘torrent.com’ ?
I found this out on here!! http://sheldon.lendrum.co.nz/search-rank-for-sheldonlendrumconz/ – God I have to post more !
Javascript URI Address Segment Selection
I use the great CodeIgniter, PHP Framework a lot, Most site’s now days I create use it. One of the many good things is that way it handles pages request’s and PHP $_SERVER['REQUEST_URI'] to find which page we are on.
Here is how it works;
http://www.sheldon.lendrum.co.nz/posts/my-segment/my-page/15/2009/12
Now the way we do things, is break the site up, based on the ‘segments or the URI.
EG:
I am in the ‘posts ( segment 1 )’ part of the site. from ther directs to to the particular post I am on.
Here is some VERY simple javascript to find out any segment I am in.
var currentLocation = window.location.toString(); // find out what page we are on
var hostName = 'http://'+ window.location.hostname; // find our current domain name
var uriString = currentLocation.replace(hostName, ''); // get our segments minus our domain name
var uriSegment = uriString.split('/'); create our segment array
A simple example of usage would be, if you were using a GREAT MOOTOOLS accordion for your navigation, and having one open, based on the address of your page
// set out Accordion toggler elements
var togglers = $$('h3.toggler');
// set out menu var
var showMenu;
// loop our toggler elements, and see if our URI segment matches their name ( in my example. )
togglers.each(function(item, index){
if(item.get('html').toLowerCase() == uriSegment[1]) showMenu = index;
});
// if our URI segment matched nothing, set a default ( closed in my example )
if(showMenu == undefined) showMenu = -1;
// create our Accordion
new Accordion(togglers , $$('ul.element'), {
duration: 250,
display: showMenu,
initialDisplayFx: false,
onActive: function(toggler, element) {
toggler.set('class', 'active');
},
onBackground: function(toggler, element) {
toggler.set('class', '');
}
});
