You need to upgrade your Flash Player to version 10 or newer.

About

Three Lefts One Right, LLC was established early 2010. While the company is young, the experience behind it is not. Our team is highly skilled in their area of work. To make it short, we are the people to do the job for you.

We hope you find our information useful. Feel free to follow us on twitter at @3l1r

1
2

Photo Manipulation 1

Working with Google Namespaces using SimpleXML

Recently, I was working on creating a custom solution where we needed Google Calendar events to be viewable from the custom PHP application.

This will mainly cover dealing with the namespaces, if you need help accessing the data see the API Reference Guide. If you need more help see this article.

Some error messages I’m running into depending on how I’m referencing the “when” node with attribute “startTime” (my ultimate goal in this anecdote) are as follows:

Fatal error: Call to a member function attributes() on a non-object in .../googlecalendarwrapper.php on line 226 when it looks like 'startTime'=> (string) $cal->when->attributes()->startTime,

GoogleCalendarWrapper_Model::getEventsList() [googlecalendarwrapper-model.geteventslist]: Node no longer exists when it looks like 'startTime'=> strval($cal->when->attributes()->startTime),

strval() [function.strval]: Node no longer exists when it looks like 'startTime'=> strval($cal->when->attributes()), and 'startTime'=> strval($cal->when->attributes('startTime')),

The non-working code looks like:

$xml = new SimpleXMLElement($this->get($url, $header));

$calendars = array();
foreach ($xml->entry as $cal){
$calendars[] = array(
'id'=>strval($cal->id),
'published'=>strval($cal->published),
'updated'=>strval($cal->updated),
'title'=>strval($cal->title),
'content'=>strval($cal->content),
'link'=>strval($cal->link->attributes()->href),
'authorName'=>strval($cal->author->name),
'authorEmail'=>strval($cal->author->email),
'startTime'=> strval($cal->when->attributes()),
);
}

According to this article: http://www.sitepoint.com/blogs/2005/10/20/simplexml-and-namespaces/ You have to approach namespaces a tad differently with SimpleXMLElement. The solution is as follows:

$xml = new SimpleXMLElement($this->get($url, $header));
$xml->asXML();

$calendars = array();
foreach ($xml->entry as $cal){
$ns_gd = $cal->children('http://schemas.google.com/g/2005');
$calendars[] = array(
'id'=>strval($cal->id),
'published'=>strval($cal->published),
'updated'=>strval($cal->updated),
'title'=>strval($cal->title),
'content'=>strval($cal->content),
'link'=>strval($cal->link->attributes()->href),
'authorName'=>strval($cal->author->name),
'authorEmail'=>strval($cal->author->email),
'startTime'=> strval($ns_gd->when->attributes()->startTime),
);
}

Note the $ns_gd = $cal->children('http://schemas.google.com/g/2005'); – this defines the namespace. Then from there, $ns_gd->when->attributes()->startTime gets the attribute from gd:when named startTime.

Psalms 25:7

Remember not the sins of my youth and my rebellious ways; according to Your love remember me, for You are good O Lord.

Psalms 25:7 is such an awesome scripture. I put them into wallpaper for the desktop and iPhone/iPod Touch wallpaper. Feel free to download and use as you would like.

3L1R Mix 3

Enjoy mix 3! The play order is as follows:

  1. Skekina – Blindside
  2. Paperthin Hymn – Anberlin
  3. Do It For Me Now – Angels and Airwaves
  4. Rebellion (Lies) – Arcade Fire
  5. The Day I Lost My Voice – Copeland
  6. Hot Knives – Bright Eyes
  7. Girlfriend – Avril Lavigne
  8. VCR – The xx
  9. Slow to Learn – Manchester Orchestra
  10. I Can Feel A Hot One – Manchester Orchestra

The mix is inspired by a mix I made for a friend with poor taste in music. I pulled out 10 songs from a list of 33.

Listen to 3L1R Mix 3

James 4 Wallpaper

I put one of my favorite scriptures into a wallpaper for the desktop and iPhone. Feel free to use it if you would like.

I love this scripture because it shows how God has the ultimate plan and no matter what we do, His will trumps all. So therefore, why worry about tomorrow? Or why try and predict where we’ll be.

Design Resources Set 1

I figured I’d share with you a folder in my bookmarks that is entitled “Web Elements”. Hopefully you might be able to find some of these tools useful too.

http://quicktr.im/dn – Horizontal Subnav with CSS

Not too long ago I wrote a tutorial on how to create a drop down menu with CSS & jQuery, today I would like to go over how to create a simple navigation with a horizontal subnav.

http://quicktr.im/dp – ie6-upgrade-warning

The ie6-upgrade-warning is a little script (7.9kb) that displays a warning message politely informing the user to upgrade the browser to a newer version (links to newest IE, Firefox, Opera, Safari, Chrome are provided).

http://quicktr.im/dq – 108 Free Crumpled Paper Social Networking Icons

Self explanatory, the 108 Free Crumpled Paper Social Networking Icons is a web treat is a promo pack of 108 free high resolution crumpled paper social networking icons.

http://quicktr.im/dr – Royalty Free Icons & Clipart Stock Images

Icons Etc is pleased to offer 122,570 free icons and clipart stock images for web design, application design, graphic design, and many other purposes.

http://quicktr.im/ds – Background Etc

Backgrounds Etc. is pleased to offer free high quality background images fordesktop wallpapers, graphic design, twitter, myspace and other purposes.

http://quicktr.im/dt – Webtreats Etc

All sorts of useful treats for web designers.

http://quicktr.im/du – JonDesign’s SmoothGallery

Using mootools v1.11, this javascript gallery and slideshow system allows you to have simple and smooth (cross-fading…) image galleries, slideshows, showcases and other cool stuff on your website…

http://quicktr.im/dv – 33 Killer Web Icon Sets for Free

Everybody loves free. This is especially true for something of value and the icons we’ve listed below have just that. If you’re a designer or developer, you can’t go wrong with adding some spice to your design or application using any of these icons.

http://quicktr.im/dw – 30 Best jQuery Photo Plugins

Images add life to a website. But plain simple images are now outdated. Splashy, layouts for images are the current hot trends in webdesigns. So here, I am going to provide the 30 best jQuery Photo Plugins that will help you to add an artistic and professional image galleries and slideshows to your website.

http://quicktr.im/dx – SQL for keyword Search

Search options are common in web pages and we can give option to visitors to search for keywords to locate the article or data within a site. Here we will apply the search to an existing table.

http://quicktr.im/dy – MySQL – order by relevance

Ordering results by how well they matched a given query

http://quicktr.im/dz – Mega Drop Down Menus w/ CSS & jQuery

Like the Horizontal Subnav with CSS link above (http://quicktr.im/dn), this is from Sohtanaka. Shows you how to create a huge drop down list.

http://quicktr.im/d2 – Programmers Dream

This collection is for all you programmers out there who need clean and modern graphics for your website! From Graphic River.

http://quicktr.im/d3 – Icon Fever

Icon Fever is a collection of great icons for websites. “Helping you find the best icons”.

This Should Never Be Forgotten

One of the best songs ever recorded possibly. This should forever remain with us.

Entitled, “The Peach Stand”.

The Peach Stand

3L1R Mix 2

Here’s Mix 2 for you today.

The order goes:

I’m Safer On An Airplane – Copeland

After We Have Left Our Homes – MuteMath

Ghost of York – As Tall As Lions

Naive Orleans – Anberlin

The Only One – Manchester Orchestra

Listen to 3L1R Mix 2

3L1R Mix 1

Here is 3L1R’s first mix. Something I hope to be dishing out every once and a while. I hope you like it. Let me know if you would like to see something in particular in these mixes.

Bullet Proof – La Roux

Merry Happy – Kate Nash

Maggot Brain (Alternative Mix) – Funkadelic

Us – Regina Spektor

Stars – The xx

Listen to 3L1R Mix 1

Using Skype, Automator, and Applescript to Do a Call on Repeat

So after a friend of mine had a friend on a dancing tv show, I was inspired to create a script that would call in the toll free number on repeat. I bring to you, the product of that.

So create an automator file that runs applescript. And paste in the following code:

activate application "Skype"
repeat
tell application "System Events"
delay 1
tell process "Skype"
click button 4 of window 1
set value of text field 1 of window 1 to "+15555555555"
click button 6 of window 1
delay 6
click button 1 of window 1
key code 36
end tell
end tell
end repeat

Obviously update the number to fit your needs but basically what I’m doing here is focusing in on Skype, opening up the System Events for Skype, telling Skype to click the 4th button of the active window (which corresponds with the call button), making the first editable text field in the window that popped up to the phone number, clicking the 6th button (which is the make call button). Wait 6 seconds – enough time to connect and then close out the window, confirming that you want to hang up the call.

I have recorded a video of what all this looks like which you can find on Youtube:

Call on Repeat Via Skype

Submitting...