typo iconscriptaculous icon

Typo Themes Viewer 0.2

Posted in , Sat, 01 Jul 2006 23:41:00 GMT

I updated the Typo Themes Viewer with the following features:

  • Lucid theme: No longer a drab gray :) The theme viewer currently uses a fluid layout for non-IE browsers and a fixed layout for IE since I ran into some issues using the fluid layout on IE. Even with the wider left and right margins, I can still get 6 thumbnails across on my 1400x1050 screen for easy viewing.
  • Lightbox image viewer: The Scriptaculous Sortable effect has been removed and replaced with Lightbox (which relies on Scriptaculous). When you click on the thumbnail now a medium sized graphic will appear. Let me know how it works for you.

As before, I'm more than happy to add new themes as they become available. Just post a comment here with the uri(s).

The new look:

Typo Themes Viewer

Using Lightbox:

Typo Themes Viewer with Lightbox

On a final note, Lightbox 1.x allowed you to close the lightboxed image by clicking on it. In Lightbox 2.x, this has been disbled to allow the group feature to function. If you are only using single images or run separate copies of lightbox.js for singles and groups you can make the following mod to allow closing by clicking on the single lightboxed image:

// look for the following line:
objImageContainer.appendChild(objLightboxImage);
// then add this after:
objImageContainer.onclick
  = function() { myLightbox.end(); return false; };

Thanks to Tyler Mulligan for this solution.

del.icio.us:Typo Themes Viewer 0.2 digg:Typo Themes Viewer 0.2 reddit:Typo Themes Viewer 0.2 spurl:Typo Themes Viewer 0.2 wists:Typo Themes Viewer 0.2 simpy:Typo Themes Viewer 0.2 newsvine:Typo Themes Viewer 0.2 blinklist:Typo Themes Viewer 0.2 furl:Typo Themes Viewer 0.2 fark:Typo Themes Viewer 0.2 blogmarks:Typo Themes Viewer 0.2 Y!:Typo Themes Viewer 0.2 smarking:Typo Themes Viewer 0.2 magnolia:Typo Themes Viewer 0.2 segnalo:Typo Themes Viewer 0.2

2 comments

prototype icondojo iconmochikit icon

Should there be a standard X-Ajax-Engine request header?

Posted in , , , Fri, 30 Jun 2006 17:49:00 GMT

A little while ago I was looking at JSON and Catalyst::View::JSON (a server-side library to provide some JSON repsonse magic for Catalyst) and I discovered that AJAX libraries auto-eval JSON differently, Dojo looks in the response body and Prototype looks in the X-JSON header (read about X-JSON problems with IE 6). This got me thinking that there's no standard way for the server to tell what kind of AJAX library is making the request. Prototype sets the X-Requested-With and X-Prototype-Version as:

var requestHeaders =
  ['X-Requested-With', XMLHttpRequest',
   'X-Prototype-Version', Prototype.Version,

For Dojo, some people are manually sending a request header along the lines of isDojo:true. MochiKit doesn't currently send an identifier.

I tend to prefer a bit more information such as the library version. Does it make sense for AJAX libraries to send a standard User-Agent along the lines of X-XMLHttpRequest-User-Agent (X-AJAX-User-Agent is shorter but may not be as correct; subsequent to the initial post, a discussion with Alex Russell generated the X-Ajax-Engine name which has been incorporated below). Something shorter is preferable but this is just an initial proposal. It would also remove the need for Prototype's separate X-Requested-With header since having X-Ajax-Engine set at all would indicate XMLHttpRequest. The format could follow the one established for User-Agent:

X-Ajax-Engine: <library_name>/<library_version>

This can be done manually with Dojo, MochiKit and Prototype as follows:

// in a Dojo.io.bind call:
headers: {
 'X-Ajax-Engine':'Dojo/'+dojo.version
}
// for MochiKit:
req.setRequestHeader(
  'X-Ajax-Engine',
  'MochiKit/'+MochiKit.Async.VERSION
)
// in a Prototype AJAX.Request call:
requestHeaders: [
  'X-Ajax-Engine',
  'Prototype/'+Prototype.Version
]

Optional information could be added in parenthesis afterwards, e.g. Dojo Toolkit could include the edition name or something along the lines of "Custom Build" like (I'm not sure if other libraries have a reason to do this):

X-Ajax-Engine: Dojo/0.3.1 (BrowserIO)

If client libraries started using this or something similar, server-side identification could start (attempting to) depend on something that was standardized. Standardization can even be proposed as an addition to the W3C's XMLHttpRequest efforts. I think standardization would be great because it will probably happen eventually and for now it would make server-side identification more reliable.

UPDATE 1: Less than a week after I posted this, a related issue came up on the MochiKit Google Group involving adding a X-MochiKit-Version header to mimic X-Prototype-Version. I put in a word for standardization and after discussing this with Alex Russell (see below) posted back to the group. Seems like we may get a defacto standardization on X-Ajax-Engine which would be nice.

UPDATE 2: I spoke to Alex Russell of Dojo Toolkit about this and he thought this is a good idea. Apparently if you set sendTransport in dojo.io.bind, an identifier (but not version number) will get sent, however it seems not many people know about this. We discussed shorter names and Alex came up with X-Ajax-Engine. He mentioned he could bring this up at the OpenAjax Alliance.

del.icio.us:Should there be a standard X-Ajax-Engine request header? digg:Should there be a standard X-Ajax-Engine request header? reddit:Should there be a standard X-Ajax-Engine request header? spurl:Should there be a standard X-Ajax-Engine request header? wists:Should there be a standard X-Ajax-Engine request header? simpy:Should there be a standard X-Ajax-Engine request header? newsvine:Should there be a standard X-Ajax-Engine request header? blinklist:Should there be a standard X-Ajax-Engine request header? furl:Should there be a standard X-Ajax-Engine request header? fark:Should there be a standard X-Ajax-Engine request header? blogmarks:Should there be a standard X-Ajax-Engine request header? Y!:Should there be a standard X-Ajax-Engine request header? smarking:Should there be a standard X-Ajax-Engine request header? magnolia:Should there be a standard X-Ajax-Engine request header? segnalo:Should there be a standard X-Ajax-Engine request header?

5 comments

rails icontypo icon

Adding a TOC to Typo

Posted in , , Mon, 26 Jun 2006 21:37:00 GMT

I've been using MediaWiki for a while and wanted its ability to auto-generate Table of contents for pages with multiple articles such as the homepage and the category pages. Typo is a Ruby on Rails app so you'll need to be somewhat familiar with it to make enhancments. I have this running on Typo 4.1.1, 4.0.0 r1188 and 2.6.0.

I came up with the following but it's still in the early stages:

Read more...
del.icio.us:Adding a TOC to Typo digg:Adding a TOC to Typo reddit:Adding a TOC to Typo spurl:Adding a TOC to Typo wists:Adding a TOC to Typo simpy:Adding a TOC to Typo newsvine:Adding a TOC to Typo blinklist:Adding a TOC to Typo furl:Adding a TOC to Typo fark:Adding a TOC to Typo blogmarks:Adding a TOC to Typo Y!:Adding a TOC to Typo smarking:Adding a TOC to Typo magnolia:Adding a TOC to Typo segnalo:Adding a TOC to Typo

20 comments

mysql icon

Lessons from MySQL

Posted in , Mon, 26 Jun 2006 21:36:00 GMT

I picked up a copy for Fortune Magazine's Secrets of Greatness: Teamwork! issue for the flight to YAPC::NA. There was an insightful article on MySQL. MySQL has 350 workers in 25 countries and 70% of them telecommute. This structure has led to some hiring practices contrary to the norm in other organizations.

  • Employee characteristics: Given the decentralized nature of its organization, MySQL for skills, not the ability to play nice with a team.
  • Finding talent: MySQL finds some of its talent (50+ employees) through open source cntributions to its code base. Others also look for developers among those that actively check in good code.
  • Work schedule: CEO Marten Mickos says:
    The brightest engineers like the calmness and coolness of the night
    and likes hearing the following from prospective employees:
    question: How do you plan your day?
    answer: I always sleep until 11 A.M., and then I start working

While working late at night seemed common when I was in college, when I got to the workplace many developers seemed to work a regular schedule leaving around 5-6pm, albeit in a regular office environment as opposed to MySQL's telecommuting environment. Do you like to work at night and is it common to come in "late" and work late at places other than MySQL? Also, in a non-telecommunting situation, is this mostly for developers without kids? If you do have a start late / work late schedule, why do you like it and what time to you tend to start work?

del.icio.us:Lessons from MySQL digg:Lessons from MySQL reddit:Lessons from MySQL spurl:Lessons from MySQL wists:Lessons from MySQL simpy:Lessons from MySQL newsvine:Lessons from MySQL blinklist:Lessons from MySQL furl:Lessons from MySQL fark:Lessons from MySQL blogmarks:Lessons from MySQL Y!:Lessons from MySQL smarking:Lessons from MySQL magnolia:Lessons from MySQL segnalo:Lessons from MySQL

no comments

perl iconyapc icon

Unofficial YAPC::NA 2006 Badge

Posted in , , , Thu, 22 Jun 2006 07:22:00 GMT

The YAPC::NA conference doesn't have a blog badge yet so I edited one from another event. It's not official and just for fun:

YAPC::NA badge

You can add it to your blog with the following:

In your HTML:

<div id="yapc_badge">
<a href="http://www.yapcchicago.org/" title="YAPC::NA">
<img src="http://www.dev411.com/images/logos/  \
  badge_yapcna2006.gif" alt="YAPC::NA badge" />
</a>
</div>

In your CSS:

#yapc_badge {
  position: absolute;
  top: 0; /* 10px works for Blogger */
  right: 0;
}

UPDATE 1: This is now on the YAPC::NA Chicago homepage and Planet YAPC Chicago. Show your support :)

YAPC::NA 2006 Header Image

UPDATE 2: This is also seen in Jonathan Rockway's Catalyst Weblog Software presentation.

del.icio.us:Unofficial YAPC::NA 2006 Badge digg:Unofficial YAPC::NA 2006 Badge reddit:Unofficial YAPC::NA 2006 Badge spurl:Unofficial YAPC::NA 2006 Badge wists:Unofficial YAPC::NA 2006 Badge simpy:Unofficial YAPC::NA 2006 Badge newsvine:Unofficial YAPC::NA 2006 Badge blinklist:Unofficial YAPC::NA 2006 Badge furl:Unofficial YAPC::NA 2006 Badge fark:Unofficial YAPC::NA 2006 Badge blogmarks:Unofficial YAPC::NA 2006 Badge Y!:Unofficial YAPC::NA 2006 Badge smarking:Unofficial YAPC::NA 2006 Badge magnolia:Unofficial YAPC::NA 2006 Badge segnalo:Unofficial YAPC::NA 2006 Badge

1 comment

typo icon

Typo Theme Viewer

Posted in Wed, 21 Jun 2006 22:42:00 GMT

I just put together a dual-purpose Typo Theme Viewer. The first purpose is to allow quick scanning of all the themes at Typo Garden which are currently spread out over 14 pages. The second purpose is to provide an example using the Scriptaculous' Sortable effect. I've been interested in using it along with a fluid layout for a while but haven't had an application. Even here, it's more of a demo than some especially useful functionality but it's nice to see the effect in action on something more than a few random graphics. I'm still thinking about how to make the Web 2.0 functionality more useful.

Typo Themes Viewer

The theme viewer lets you select how many themes you want to view per page so you can adjust it to however many look good in your browser. The pages will change accordingly. You can also see all the themes at once which I find very convenient.

There are some more enhancements I've been thinking about as Scriptaculous (or Dojo) experiments. Let me know what you think of it and what would make it better.

UPDATE: The theme viewer has been upgraded from the screenshot and description here.

del.icio.us:Typo Theme Viewer digg:Typo Theme Viewer reddit:Typo Theme Viewer spurl:Typo Theme Viewer wists:Typo Theme Viewer simpy:Typo Theme Viewer newsvine:Typo Theme Viewer blinklist:Typo Theme Viewer furl:Typo Theme Viewer fark:Typo Theme Viewer blogmarks:Typo Theme Viewer Y!:Typo Theme Viewer smarking:Typo Theme Viewer magnolia:Typo Theme Viewer segnalo:Typo Theme Viewer

3 comments

mysql icontypo iconapache iconlighttpd icon

Birth of a Typo Blog

Posted in , , , Wed, 21 Jun 2006 22:04:00 GMT

I'm giving Typo a shot after hearing some good things about it and having performance problems at a hosted blog service. It's been pretty good so far. Let's see how it runs in action.

I'm currently using the Lucid theme. So far I've played with Azure (the default), Lucid and Phokus. The default font size seems smaller than normal on other sites. Let me know if it's too small or there are other issues.

Up until now, my wiki has been the only app at this domain. I'm leaning towards putting commentary, questions, short summaries and the like in the blog while the wiki would still contain reference type information. To that end, I put up some detailed Typo install instructions covering MySQL, Apache, lighttpd and FastCGI on the wiki. Right now it just covers installation as I'm just getting into customizing the template. Let me know what you think.

del.icio.us:Birth of a Typo Blog digg:Birth of a Typo Blog reddit:Birth of a Typo Blog spurl:Birth of a Typo Blog wists:Birth of a Typo Blog simpy:Birth of a Typo Blog newsvine:Birth of a Typo Blog blinklist:Birth of a Typo Blog furl:Birth of a Typo Blog fark:Birth of a Typo Blog blogmarks:Birth of a Typo Blog Y!:Birth of a Typo Blog smarking:Birth of a Typo Blog magnolia:Birth of a Typo Blog segnalo:Birth of a Typo Blog

no comments

dojo icon

Dojo - Setting the ComboBox Default Value

Posted in , , Wed, 14 Jun 2006 08:39:00 GMT

Dojo Toolkit's ComboBox doesn't take a default value but one can be written in using JavaScript. The default value in the ComboBox dojoType is lost during onLoad when the dojoType widget is rendered. To get around this we can use JavaScript to fill in the value during dojo.addOnLoad. Here's the relevant JavaScript:

function init() {
  var mycombobox = dojo.widget.byId('mycombobox');
  mycombobox.textInputNode.value = 'Seattle';
}

// method 1
dojo.addOnLoad( init );

// method 2
dojo.addOnLoad( function() {
  init()
} )
// won't work b/c you want to send an object
// not call a function
dojo.addOnLoad( init() );

The HTML:

<input dojoType="ComboBox"
  id="mycombobox"
  value="this should never be seen - it is replaced!"
  dataUrl="comboBoxData.js" style="width: 300px;" name="foo.bar"
  onValueChanged="setVal2"
>

A more detailed example of this technique is available on the wiki at Dojo Toolkit: Setting the Combobox Default Value.

del.icio.us:Dojo - Setting the ComboBox Default Value digg:Dojo - Setting the ComboBox Default Value reddit:Dojo - Setting the ComboBox Default Value spurl:Dojo - Setting the ComboBox Default Value wists:Dojo - Setting the ComboBox Default Value simpy:Dojo - Setting the ComboBox Default Value newsvine:Dojo - Setting the ComboBox Default Value blinklist:Dojo - Setting the ComboBox Default Value furl:Dojo - Setting the ComboBox Default Value fark:Dojo - Setting the ComboBox Default Value blogmarks:Dojo - Setting the ComboBox Default Value Y!:Dojo - Setting the ComboBox Default Value smarking:Dojo - Setting the ComboBox Default Value magnolia:Dojo - Setting the ComboBox Default Value segnalo:Dojo - Setting the ComboBox Default Value

3 comments

Localization - Language Fallback?

Posted in Wed, 14 Jun 2006 07:05:00 GMT

Playing around with browser locale settings and the resulting HTTP_ACCEPT_LANGUAGE values, I've started to realize that websites often don't fallback to the language if you are using a two part locale they don't support but they do support the language only. Let's say a browser has the following preferences set up:

1. en-us
2. de

A website that only has en and de will typically fail on en-us and then return German. My intuition tells me the server would be more user friendly if it parsed en-us to try the language portion, en, before moving on to the next locale but there would be situations where the user won't get exactly what s/he wants? What do you think? Should servers fallback from two part locales to a one part language or should it be up to the user to manage it correctly in their browser?

del.icio.us:Localization - Language Fallback? digg:Localization - Language Fallback? reddit:Localization - Language Fallback? spurl:Localization - Language Fallback? wists:Localization - Language Fallback? simpy:Localization - Language Fallback? newsvine:Localization - Language Fallback? blinklist:Localization - Language Fallback? furl:Localization - Language Fallback? fark:Localization - Language Fallback? blogmarks:Localization - Language Fallback? Y!:Localization - Language Fallback? smarking:Localization - Language Fallback? magnolia:Localization - Language Fallback? segnalo:Localization - Language Fallback?

no comments

YouTube - Financially Viable?

Posted in , Wed, 14 Jun 2006 06:32:00 GMT

YouTube may be the most popular video sharing website but according to a recent article on The Register they've burned through nearly $11.5 million in venture funding without any revenue channels. I've often wondered about this. What is YouTube's business model? It looks suspiciously like chasing eyeballs at the moment but I'm hoping one will emerge soon.

The article's main issue, that people give YouTube a "worldwide, non-exclusive, royalty-free, sublicenseable and transferable" license to use their work is also of interest. I wonder when we'll see them start to use those rights and in what ways. Will there be a backlash? For now it seems people either don't know about it or are trusting YouTube to do no evil.

del.icio.us:YouTube - Financially Viable? digg:YouTube - Financially Viable? reddit:YouTube - Financially Viable? spurl:YouTube - Financially Viable? wists:YouTube - Financially Viable? simpy:YouTube - Financially Viable? newsvine:YouTube - Financially Viable? blinklist:YouTube - Financially Viable? furl:YouTube - Financially Viable? fark:YouTube - Financially Viable? blogmarks:YouTube - Financially Viable? Y!:YouTube - Financially Viable? smarking:YouTube - Financially Viable? magnolia:YouTube - Financially Viable? segnalo:YouTube - Financially Viable?

no comments

Older posts: 1 ... 5 6 7 8 9