Notions

Blogging on the iPad

·April 19th, 2010·

This is just an entry to write about using the iPad to post blog entries using the Wordpress blogging app. While this app gives you the basics, I believe that it is only the beginning. Given the power of this device, I can see them improving upon it to allow for all sorts of features including drag&drop for images, improved formatting capabilities, and cool stuff like inserting maps and media.

I find this touchscreen keyboard is adequate enough to write blog entries of any length—although I do prefer a real keyboard and if needed, I could use the stealthy Apple wireless aluminum keyboard if needed. But who needs the extra baggage.

To also test this app, I am attaching a screenshot of the interface. I think this is going to change how people share ideas and their thoughts.

Defining Wordpress Shortcodes

·March 20th, 2010·

When I first started creating Wordpress themes and sites, I really didn’t muck around too much with the functions.php file too much other than to define dynamic sidebars.  However, my recent contract to redesign a local non-profit organization’s website has changed that.

This organization has a lot of content requiring many pages and subpages.  I found that I kept entering similar code into pages and posts, mainly dealing with design elements.  This led me to explore the use of shortcodes to speed up the process and also simplify entry for whomever will be maintaining the site.

The offical Wordpress area to learn more on the syntax of shortcodes is: Shortcode API « WordPress Codex

Here are a couple that I used to streamline my programming.  First of all open up your functions.php file for your theme.  If you are using someone else’s theme, the best place to put a new function/shortcode definition is at the end of the file before the ?> ending.  Also, when you save the file, make sure you don’t have a line return, or spaces after the ?>

I have two spacer divs I use to create whitespace within an article or page.  Instead of always typing out the entire code, why not create a shortcode?  The classes are defined in my styles.css file.

Example 1:

108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
// Large spacer shortcode //
function lgspace_shortcode() {
   	return '
<div class="lgspace"></div>
 
';
	}
add_shortcode('lgspace', 'lgspace_shortcode');
 
// Small spacer shortcode //
function smspace_shortcode() {
   	return '
<div class="lgspace"></div>
 
';
	}
add_shortcode('smspace', 'smspace_shortcode');

This way I just type [smspace] or [lgspace] to add spacing. The second thing I needed was to add a unique title image to each page along with a clearing div

for the float.  That’s a lot of code to keep repeating.  So this was solved by a shortcode.


Example 2:

120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// Head image shortcode //
function heading_shortcode($atts, $content = null) {
    extract( shortcode_atts( array(
    'name' => '',
    'ext' => 'gif',
    'path' => '/pathtoyour/images/',
    'url' => ''
    ), $atts ) );
    $file=ABSPATH."$path$name.$ext";
    if (file_exists($file)) {
        $size=getimagesize($file);
        if ($size!==false) $size=$size[3];
        $output = "<img src='".get_option('siteurl')."$path$name.$ext' $size class='floatright' />
       <br class='clear' />
<div class='smspace'></div>
 
";
        if ($url) $output = "<a href='$url' title='$name'>".$output.'</a>';
        return $output;
    }
    else {
        trigger_error("'$path$name.$ext' image not found", E_USER_WARNING);
        return '';
    }
}
add_shortcode('head','heading_shortcode');

Since each title image was a gif file and I stuck to a specific naming convention, inserting these images was a matter of typing [head name=nameofimage]. I didn’t even need to put the extention.

Now isn’t that much easier? Try experimenting with creating some shortcodes to make your programming/blogging much easier. Hope this was helpful!

History of Desire

·February 14th, 2010·

History of Desire

History of Desire

by Tony Hoagland

When you're seventeen, and drunk
on the husky, late-night flavor
of your first girlfriend's voice
along the wires of the telephone

what else to do but steal
your father's El Dorado from the drive,
and cruise out to the park on Driscoll Hill?
Then climb the county water tower

 

and aerosol her name in spraycan orange
a hundred feet above the town?
Because only the letters of that word,
DORIS, next door to yours,

in yard-high, iridescent script,
are amplified enough to tell the world
who's playing lead guitar
in the rock band of your blood.

You don't consider for a moment
the shock in store for you in 10 A.D.,
a decade after Doris, when,
out for a drive on your visit home,

you take the Smallville Road, look up
and see RON LOVES DORIS
still scorched upon the reservoir.
This is how history catches up—

by holding still until you
bump into yourself.
What makes you blush, and shove
the pedal of the Mustang

almost through the floor
as if you wanted to spray gravel
across the features of the past,
or accelerate into oblivion?

Are you so out of love that you
can't move fast enough away?
But if desire is acceleration,
experience is circular as any

Indianapolis. We keep coming back
to what we are—each time older,
more freaked out, or less afraid.
And you are older now.

You should stop today.
In the name of Doris, stop.

Future of iPad

·January 27th, 2010·

iPad1Now that the mysterious Apple device has been unveiled, the techies & opinionated media “gurus” are making their voices heard.  This is my opinion and hunch as to why this will be an important device.

First of all let’s just stop it with the feminine hygiene nonsense.  Yes it is called the iPad–deal with it.  No matter what they called it there would be detractors.  I personally liked “Palette,” “iTab,” or something sexy like “Tabula” with dropping the”i” prefix.  Regardless, that is my last concern with buying the product.  When someone asks you for a notepad in the office do you immediately chuckle and think you are getting a panty shield to write on?  I didn’t think so.

Next there were complaints about the large bezel around the screen.  My hunch is that it serves two purposes: one to let you handle it easily without interacting with the screen. The other is there are most likely components, antennae and chips behind it.  Given the device’s thin profile, i’m sure they needed some extra real estate.

Finally, with regard to 3G–how many people believe someone is not going to come up with an iPhone teathering solution for when you are not at a wifi hotspot?  I can do it with my iPhone and Macbook now.  It is only a matter of time.

iPad2The true import of this device is the delivery of content and productivity.  This device will deliver sharp, watchable movies, podcasts along with your music.  Coupled with something like the Orb program on the iPhone, you will be able to remotely access your home media library.  This is huge!  I do that now on my iPhone, but watching a movie/podcast on the small screen is a last resort (i.e. on a plane trip).  This makes that proposition much more palatable.

Another HUGE difference is iWork on the device.  Having the ability to work on presentations, documents and spreadsheets with a larger sized keyboard and touch screen gestures will take mobile productivity to the next level.  I already do many of these things in a pinch on the phone and on a smaller surface.  I often will FTP into my site and directly edit php, html & CSS files to make quick changes.  I feel developers will be coming up with mobile blogging/webdev apps to run on this device.  I would much rather carry this in my backpack than the laptop knowing I can do most anything with it.

When I say most anything, just think about when the iPhone first came out.  You were pretty limited to what you could do with it.  Now, there are productivity programs for almost everything.  Adobe comes to mind when I think about possibilities.  I could envision Lightroom for iPad to give you photo editing capabilities.  PS has an app for the phone.  Now with extra real estate and gestures, photo editing may be taken to the next level wherever you may be.  Especially since there is an interface to allow one to access photos directly from your camera.  Cool stuff!

Finally, the entry price point for the device is perfect to take on Kindle and the other readers.  Why buy a monochrome “reader” when for a couple hundred more, you can so much at your fingertips.  This is a remarkable achievement.  I was thinking it was going to be $699, which is where the top wifi model is priced.

All in all I feel this iPad will prove to be an important device built on a flexible, established OS which already has millions of apps ready to run.  Developers will be clamoring to design tools, applications and games to take advantage of the increased footprint.  I, for one will be among those taking advantage of what it has to offer and will in the future.