Gloss & Stripes

About Programming, Mac, Design and Everything that's somehow Arty or Open Source.

Archive for Mai, 2005

A Musical Baton [en][de]

Diesen Artikel in deutscher Sprache lesen.

I received the musical baton currently wandering around by visiting Stefko’s site.
The titles are linked to the specific album at amazon.de.

Total volume of music files on my computer:
36,26 GB – about 21 days of music
The last CD I bought:
Jack Johnson – In Between Dreams
Song playing right now:
Patrice – “Done (Where Is Love To Be Found)”
Five songs I listen to a lot, or that mean a lot to me:
Five aren’t enough at all to list my favorites but here is a mix of my current rotation and classics that mean something to me.
5 People to whom I’m passing the baton

I can’t list any more people that didn’t already receive the baton. Therefore I’m doing it like Stefko and ‘stick the baton next to the comment-box’ . :) Who didn’t get one yet?

RT @dertimbo A Musical Baton

I wrote some JavaScript and PHP that allows to switch a posts language if you use Basic Bilingual for Wordpress. I’m proudly presenting the product: A WordPress-Plugin.

Read the full entry "Language switching for Basic Bilingual"

RT @dertimbo Language switching for Basic Bilingual

Seit Spam Karma auf meiner Seite läuft (sogar Spam Karma 2) muss ich mir keine Gedanken mehr um dumme Spam-Kommentare machen. Und noch besser: Ich muss nicht mal eines moderieren. SK2 regelt alles automatisch und macht einen Super-Job dabei.

Soweit nichts Neues – olle Kamellen, aber heute hat Spam Karma etwas gefressen, was ich noch nie gesehen habe und es niemandem vorenthalten möchte:

Ein Spammer hat sich wirklich darüber beschwert, dass sein Spam nicht als Kommentar auftaucht, nachdem er acht(8) von seinen “whatever.funny-ringtones-trash.com”-Domains mit redundant schwachsinnigen Linktexten als ‘ein Kommentar’ abgeben wollte. Dazu eine Lobhymne wie toll doch ‘funny ringtones’ sind.

Hier ein Screenshot beider Comments zur allgemeinen Erheiterung. (Hab mir extra die Mühe gemacht, die Täter nochmal in die Moderations-Queue einzureihen).

betroffene Post befasst sich zwar mit audiovisuellem Handyspielkram, aber durchaus dagegen.

In der Hinsicht war der Spammer rücksichtsvoll, beim Spammen wenigstens nicht ins Off-Topic zu rutschen.

RT @dertimbo Let Spam Entertain You

I have studied some alternatives on Sitepoint and discussions in the Webstandardsgroup that use DOM-Scripting to open external links in a new browser window. My developement started by implementing a relationship Tag for links and a simple JavaScript function.

Hint

You can also discard the JavaScript part and only use the CSS to provide visual information that the current link being clicked will result in leaving your site.

  1. The usual scenario

    I'll start with a simple link that points to nothing:

    This is a link

    HTML:
    1. <a href="#">This is a link</a>

  2. Setting a relationship:

    To differentiate between 'normal' links and those that shall be opened in a new window I add a relationship attribute: rel="external" to the link:

    Open link in new window

    HTML:
    1. <a rel="external" href="#">Open link in new window</a>

  3. Styling

    As a visual indicator that a link will open in a new browser window you can provide a style rule that includes
    a background image for external links. To recognize the links that are marked with rel="external" we're using a CSS3 Selector:

    CSS:
    1. /* add icon to external links */
    2. a[rel=external]{
    3. background: url(external.gif) no-repeat center right;
    4. padding-right: 10px;
    5. }
    6. /* change Icon on mouse over */
    7. a:hover[rel=external]{
    8. background: url(external-h.gif) no-repeat center right;
    9. }

    Feel free to grab my icons I use for external Links:

    Icon External: icon external

    Icon External:hover icon external hover

  4. Scripting

    Now we implement a small JavaScript that grabs all links on a page and deploys event handlers for links that have a rel=external attribute.

    JavaScript:
    1. function prepareExternalLinks() {
    2.  
    3. if (!document.getElementsByTagName) return false;
    4. var hrefs = document.getElementsByTagName("a");
    5. var linkrel;
    6.  
    7. for (var i=0; i <hrefs.length; i++) {
    8. linkrel= hrefs[i].getAttribute("rel");
    9. if (linkrel != null){
    10. if (linkrel.indexOf("external") == -1) continue;
    11.  
    12. hrefs[i].onclick = function() {
    13. window.open(this.href);
    14. return false;
    15. }
    16. // make links accessible for keyboard
    17. hrefs[i].onkeypress = hrefs[i].onclick;
    18. }
    19. }
    20. }
    21.  
    22. function initialize(){
    23. prepareExternalLinks();
    24. }
    25.  
    26. window.onload = initialize;

There we go: An elegant, webstandard-compliant way of opening external links without the _target-attribute. If the user is surfing with JavaScript disabled the link will surely work too, additionally providing information that an external link resource is just about to be opened.

Not THAT elegant

Unfortunately, this script prevents links to be opened in a new broswer-TAB in Firefox when pressing CTRL. But you can still select a new tab using the context menu (Strange behaviour).

Nevertheless, this is a cut in the user's freedom of choice, so use it wisely on links. (e.g. open validating sites in an external window. They can be closed immediately after checking).

related links:

RT @dertimbo Open external links in a new browser window

I am planning to release a Wordpress theme. I am currently busy with re-structuring the CSS and make the theme a more accessible one.

Read the full entry "Spring officially announced"

RT @dertimbo Spring officially announced

12 oder 15-inch Powerbook [de][en]

Read this article in english.

Nachdem mein Notebook letztes Jahr beim Einbruch in Dänemark abhanden gekommen war, dachte ich natürlich gleich an einen 1:1 Ersatz sobald das Geld von der Versicherung gezahlt würde. Da aber damals noch anderer Ärger finanziell zu tilgen war, wurde aus diesem Plan ersteinmal nichts.
(Zur Info: Ich hatte ein schönes 15'' Acer Travelmate 802LMiB- 1,5GHz Intel Centrino mit dem ich eigentlich ziemlich zufrieden war. Bildschirmauflösung: 1400x1050!)

Seitenwechsel

Inzwischen bin ich soweit, mir ein Apple Powerbook zuzulegen, da es für meine Ansprüche leistungsfähiger, zeitloser und nur geringfügig teurer ist als PC-Notebooks die ich mir kaufen würde.

Read the full entry "12 oder 15-inch Powerbook"

RT @dertimbo 12 oder 15-inch Powerbook

Who is this?

freshlabs journal is the bi-lingual weblog and digital playground of Tim Isenheim, designer and webdeveloper from Hamburg, Germany. More →

Longer entries are truncated. Click the headline of an entry to read it in its entirety.
  • Download Summersun, a sunny theme for WordPress
  • Download WP SIMILE Timeline, a lifestream plugin for WordPress

Topics

Archives

Tag Cosmos

3D ajax Apple blogging browser comedy comments contest copenhagen css Design dom firefox flash fuckedup gallery google html interface javascript music mythbusters offline opensource osx photo photoshop php plugin powerbook programming projects psp skype Software spam studyabroad switch video w3c wallpaper webdesign webstandards westciv Wordpress

Full Tag Cloud