Project 52

Writings for the Project 52 initiaitve

Monday, June 14, 2010

Project 52…

So what does it mean when the person starting an initiative doesn’t have time for it?

Project 52 was a bit of an eye-opener. Think it’s hard to write? Try forcing yourself to write once a week, on something of value.

It seems the initiative died last week, or month…hard to tell…and the connecting website that makes all of this possible just disappeared. It’s probably not the workload for writing, but instead I believe there was a great underestimation of how much coordination was required to get this going.

I too found myself lost for words. Hopefully should this happen again, we’ll all be better prepared.  wink

Until that time, I return to my regularly unscheduled schedule.

Posted by admin on 06/14 at 03:01 AM
Posted in: Idle Chatter   Personal   Project 52  
(0) TrackbacksPermalink

Monday, May 31, 2010

Font Management in OS X, 10.4-10.6

Fonts in OS X seems to change in every version. They’re a mystery, wrapped in a puzzle, often dotted with a umlaut and an accent-grave. Whether you’re a a Flash developer wondering why your final Helvetica looks larger than it should be, or a print designer who’s output looks strangely un-kerned, this link is for you…

I know nothing about JKL Studios other than they’ve got the most detailed and easy-to-understand overview I’ve seen about Mac font management.

Read it.
Learn it.
Live it.

And download the PDF for when you stupidly remove the LucidaGrande.dfont from your /System/Library/Fonts/ directory.

No…I admit to nothing.

Posted by admin on 05/31 at 09:28 AM
Posted in: Gadgetry   IT notes   Project 52  
Permalink

Wednesday, March 24, 2010

Multiple Languages - a “How-To” using PutYourLightsOn’s Multi-Language module

I’m building a dual-language website now that will feature English and Dutch, and I’ve been digging and culling information on this for a few weeks now. I’m putting my experiences down into this “How-To” help others stuck at 2am.

The focus on this is specifically using the Multi Language Module from PutYourLightOn but there are enough smaller tips in here that it’s worth putting in one place. There are also other means to do multiple languages that don’t require a commercial module, but this worked for me. YMMV. If this isn’t the right place, admins, let me know and I’ll move it.

Caveats:
• This was developed for the EE 1.6x but it should be very similar in 2.1x installations
• Requires the use of jQuery for the Control Panel extension and the commercial Multi-Language Module from PutYourLightsOn.net
• This presumes 2 languages, but more can be used following the guide
• We try for pure EE-solutions whenever possible - no hacking or php/js and exposing the security
• Since we’re describing EE tags, normally they can’t be displayed inline (because the system immediately processes them). Using the code tag will ruin the reading, so when you see something like [base_path] realize the parenthesis are replaced by brackets.

Start - Setting-up the different language paths and removing the index.php from the URL:

We’re presuming you have a default language (in my case English) set in your General Preferences > Site Language setting. All you need to do is add the module, add the extra languages and add some files to make sure the [base_url] starts out of the correct path.

• Install the module (follow the directions on that - easy enough)

• Add a additional language in the module using the correct ISO 639-1 code for your extra language (en = english, nl = dutch, es = spanish, etc)

• Add a directory to the root of your site for each additional language using the matching ISO 639-1 code. This is always lower-case.

• Modify your path.php file to add 2 new variables [base_url] & [user_language]. The important bit is at the bottom:

$global_vars = array(); // This array must be associative 

changes to point to your default language (replace “mysite” with your site and your particular base language)

// $global_vars = array(); // This array must be associative
    
$global_vars = array(
    
"base_url" => "http://www.mysite.com/"
    
"user_language" => "en"
    
); 

• Now add .htaccess to the root using the EXCLUDE LIST method of removing the index.php. You’re including only the directories you want the system to look into:

RewriteEngine on
RewriteCond 
$!^(nl|css|images|system|themes|index\.php[NC]
RewriteRule 
^(.*)$ /index.php/$1 [L] 

• The module comes with spanish and italian directory file example - use one of them and move the 3 files to the server
- index.php = you can leave alone
- .htaccess = modify the path in the Rewrite Rule to point to your desired language, in my case it’s Dutch

RewriteRule ^(.*)$ /nl/index.php/$1 [L] 

- path.php = modify the last lines like the above default language, but this time to add the new language path

$global_vars = array(
    
"base_url" => "http://www.mysite.com/nl/"
    
"user_language" => "nl"
); // This array must be associative 

There are enough folks out there having trouble with removing index.php - removing two of them is worth pointing out. This caught me a few times.

The module’s instructions are clear enough; there are 2 basic methods for language replacement: the tag method, where you add a tag via the module and it does the swapping:

{exp:multi_language:phrase index="hello"

and Conditionals based on your current [base_path]:

{exp:weblog:entries weblog="my_weblog"}
{if user_language 
== "en"}{title}{if:else}{title_{user_language}}{/if}
{
/exp:weblog:entries} 

You’ll note that it uses the default [title] but also an alternative [title_] field. In my custom fields, right after title I’ve added a title_nl field, keeping the lowercase iso convention. This is the method of doing dynamic content - each language element having its own field (I loop through using a FieldFrame set, for example).

Links are your first enemy in multiple languages, so you need to find an alternative to [permalink] and [auto_path]. Let’s re-write that example to add a link:

{exp:weblog:entries weblog="my_weblog"}
<a href="{base_url}template_dir/template/{url_title}">
  
{if user_language == "en"}{title}
  {if
:else}{title_{user_language}}
  {
/if}
</a>
{/exp:weblog:entries} 

So what happens here is that depending on your current [base_path], the link does away with the [title_permalink] and rebuilds the path from the root up to the article. If I had a templates directory called “site” and in there an article view page called “view”, it’d look like this:

<a href="{base_url}site/view/{url_title}">
  
{if user_language == "en"}{title}
  {if
:else}{title_{user_language}}
  {
/if}
</a

Pagination doesn’t use [title_permalink] but rather [auto_path]. Specifically for Pagination, you’d want to add a new [paginate_base] parameter to your [entries] tag:

{exp:weblog:entries weblog="workshops" limit="5" status="open" 
paginate_base="{if user_language != 'en'}{user_language}
{/if}/template_group/template"

This points the Pagination auto links used by [if next_page] [if previous_page] to the correct language.

The next time you’ll see [auto_path] is in a site search, and unfortunately there doesn’t seem to be a similar method for a search_base. What I’ve done in this situation is to use the weblog_id to point me to the correct category link:

{if weblog_id == "3"}
  
<td width="30%" valign="top"><b><a href="{base_url}site/static/{url_title}">{title}</a></b></td>
{if:elseif weblog_id == "4"}
  
<td width="30%" valign="top"><b><a href="{base_url}site/workshop/{url_title}">{title}</a></b></td>
{/if} 

and then just use different results pages for each language.

Calendars are a bugger too - I’m working on a solution here, but it looks to be one where you’ll have to check segment_1 and then use swapping method on days and months. When I have that sorted, I’ll add it here.

Anyway, that’s my solution. Remember that many conditionals can slow you down, so I built many blocks to reduce the number of queries and conditionals. Depending on your needs, it might make mode sense to just check once if you’re in a language, then spill all the right fields out, instead of doing it on a field-by-field basis. All said though, this system is quite robust and I’m really happy with it.

As I learn new things I’ll add them here. The developer Ben at PutYourLightsOn has been amazingly helpful, working out many problems in my particularly wonky situation. Hopefully this will reduce his support workload a little. 

If anyone has more ideas, solutions or questions concerning languages and working with this module, please add them below.  Cheers!

Posted by admin on 03/24 at 08:53 AM
Posted in: IT notes   Project 52  
Permalink

Wednesday, February 03, 2010

Podcasts not syncing - here’s the fix

Can’t sync your podcasts? Playlists with podcasts don’t show up on your iPhone? Here’s the fix..

Previously the Podcast bug affected only the playlist order, but in the current iTunes 9.0.3 and iPhone 3.1.3 firmware (for example) the bug will remove any Podcast in a playlist from the iPod section of the device. If the Playlist is comprised of only podcasts, the playlist will not even be visible on the device (it will show in the iTunes sync).

To return podcasts to a playlist, you have to use the iTunes 9 trick:

  • Right-click your particular playlist and choose EDIT SMART PLAYLIST
  • Turn off LIVE UPDATING
  • SYNC
  • Then your podcasts return in a playlist in the correct order, but you’ll have to toggle it on again to update the playlist list.

    This bug has existed since iTunes 9 and it seems to only be getting worse. Hopefully Apple will fix it soon - I can’t believe they don’t want us to listen to podcasts in a playlist! C’mon Apple - fix this already!

    Posted by admin on 02/03 at 02:18 PM
    Posted in: Gadgetry   IT notes   Project 52  
    Permalink

    Thursday, January 28, 2010

    Who Got What Wrong - After the Apple Event

    Guessing what Steve will pull out is a bit of a “mug’s game”. We all should know that by now.

    Part of the mystery is not in the device or service, but what fantastical future we see Apple providing for us. Apple doesn’t promote or market these events…in fact, they hardly say a word, sending out only a invitation. In watching the media frenzy, I wonder how many people understand this, because when the blog-o-sphere doesn’t get what “they” want, the collective hue and cry makes them seem like a slighted lover holding a padded bra.

    Not Apple’s fault you got your hopes up. You wanted to believe in every fantasy out there and so you did. That’s about your religion - not Apple.

    Then there’s the Whispers. About a sales rep speaking higher than his pay grade, he’s a “insider with exclusive access”. Some CEO who blabs for a bit of self-promotion on every front page (but he’s not at the event…hmmm).  Part of this is genuinely newsworthy - but for week’s we’ve seen fanboy renders and ridiculous articles that make the product everything from the Second Coming to the moment Apple lost it. Speculation, endless speculation, that drives traffic, that angers readers, that drives traffic, that engorges fanboys, that drive’s traffic, that also drives stock prices unnaturally high in expectation and hinders entire market segments. If you’re financially involved in Apple, in some commercial way, shape or form, I’d imagine you’d feel it almost your ouroborostic duty to create, conflate, regurgitate and re-gorge on every other bit of speculation out there.

    Not Apple’s fault your stock dropped after the launch. You wanted people to believe you knew something you didn’t, that you were something you were not. Makes writing easier if you get your own “Princess Diana” to promote/slate/reconcile, I guess. A proper journalistic source? Sorry - you don’t even appear relevant this morning - you’ve been caught with a sock in your pants.

    This is not a healthy ecosystem. Replace “the media” with “the banks” and We The People would have had them in front of Congress by now.

    If you’re disappointed in Apple this morning, I’d say you’re blaming the wrong people.

    Posted by admin on 01/28 at 08:35 AM
    Posted in: IT notes   Project 52  
    Permalink
    Page 1 of 2 pages  1 2 >