taenzer.me blog http://blog.taenzer.me Random stuff from Poppelsdorf posterous.com Mon, 16 May 2011 07:06:00 -0700 Fast and simple 3-level-navigation for Wordpress: show top level, parent and subpages only when on a subpage http://blog.taenzer.me/fast-and-simple-3-level-navigation-for-wordpr http://blog.taenzer.me/fast-and-simple-3-level-navigation-for-wordpr

Every now and then, we're using Wordpress as a CMS for clients' sites that require only basic content and navigation. 

What bugs me every time is the navigation. For me, a reasonable navigation is able to show up to 3 sublevels, and when a menu item is clicked, it lists all of its subpages, and when a subpage is clicked, it lists its subpages and so on.

What's important here is to have the parent and ancestor pages (or top level pages) stay where they are when you dig deeper. Even if there is a breadcrumb available, most users tend to use the main navigation to return to the previous level. Plus, this sort of step-by-step navigation gives the user a reasonable overview of his or her possible options. 

Navigation ( active links are bold):

a)

  • Home
  •   -Subpage 1
  •   -Subpage 2
  •   -Subpage 3

b)

Subpage 1 

  • Subpage 1
  •   -Subpage 1.1
  •   -Subpage 1.2
  • -Subpage 2 (this site has children too, but they only show when the item is clicked)
  • -Subpage 3

c)

Subpage 1 

  • Subpage 1
  •   -Subpage 1.1
  •   -Subpage 1.2
  • -Subpage 2
  • -Subpage 3

There are many ways to create that sort of navigation, but they all have in common that you need to have a certain level of PHP knowledge. 

The basic code snippet to get a list of pages is <?php wp_list_pages(); ?> with its arguments. You can combine it with a walker function if you need more specific functions. 

I have to admit I prefer writing my own function than using any kind of plugin to do it for me. But this time I'm giving in. 

The Simple Section Navigation Plugin does exactly what we need, and nothing else. It's slim and it works. You can use it as a widget in your sidebar, but you can as well call it from inside of your template file. 

Bildschirmfoto_2011-05-16_um_16

It also puts the title of the top level page above the navigation. If you don't want that, go into the plugin's php-file and on line 96 simply change

echo $before_widget.$before_title.$sect_title.$after_title."<ul>"; 

to

echo $before_widget."<ul>";

By this you only prevent the output of this part of the widget. (h3 and section title)

Other useful code snippets:

1) Echo the title of the top level page (in a 3-level-navigation level 0)

global $post; $post_ancestors = get_post_ancestors($post); $top_page = $post_ancestors ? end($post_ancestors) : $post->ID; $toptitle = get_the_title($top_page); echo $toptitle;

2) Echo the title of the parent page (in a 3-level-navigation level 1 or 2, depending on which subpage you're on)

$parent_title = get_the_title($post->post_parent); echo $parent_title;

(Plugin Version 2.1., Wordpress 3.1.2)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/402614/Foto_am_22-01-2010_um_13.51__2.jpg http://posterous.com/users/3ssW4it9s95T Christiane Tänzer ctaenzer Christiane Tänzer
Mon, 06 Dec 2010 05:28:48 -0800 Abfalltermine Bonn iCal-Generator http://blog.taenzer.me/abfalltermine-bonn-ical-generator http://blog.taenzer.me/abfalltermine-bonn-ical-generator Die Stadt Bonn bietet unter bonn.de die Möglichkeit, die Abfalltermine in Tabellenform anzuzeigen und auszudrucken. Einmal im Jahr flattert der Abfallplaner auch per Post in's Haus. Einen Download der Termine für den eigenen Rechner gibt es aber leider nicht.

Hier schafft unser Tool Abhilfe: Es generiert nach Angabe von Anschrift und Jahr eine iCal-Kalenderdatei als Download, die Sie dann z.B. in Outlook, iCal etc. importieren und z.B. mit iPhone & Co synchronisieren können.

Der iCal-Generator verwendet die Originaldaten der Webseite der Stadt Bonn, indem via Python-Script mittels urllib & BeautifulSoup die Tabellen der Abfalltermine ausgelesen werden und daraus mit dem tollen iCalendar package fertige ics-Dateien generiert werden . Wir können daher für die Funktionsfähigkeit des Generators keine Haftung übernehmen, werden aber bei Änderungem am Quellcode von bonn.de das Tool entsprechend aktualisieren.

Link: http://abfall.taenzer.me

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Wed, 01 Dec 2010 05:56:42 -0800 Mein Senf zum Jugendmedienschutz-Staatsvertrag (JMStV) http://blog.taenzer.me/mein-senf-zum-jugendmedienschutz-staatsvertra http://blog.taenzer.me/mein-senf-zum-jugendmedienschutz-staatsvertra Vor wenigen Minuten flatterte die fünfte besorgte Anfrage eines Kunden zum neuen Jugendmedienschutz Staatsvertrag, der 2011 in Kraft treten soll, in meinen Posteingang. Ich habe mich in den vergangenen Tagen intensiv mit dem Thema auseinandergesetzt und auch die hitzigen Diskussionen in Onlineportalen, Blogs, Facebook, Twitter und anderen Social Networks verfolgt und muss feststellen, dass in den meisten Fällen auch nur mit Wasser gekocht wird.

Link: PDF Finaler Entwurf JMStV http://www.fsm.de/inhalt.doc/Synopse_JMStV_final.pdf

Konkret sieht der neue JMStV ab Anfang 2011 vor, dass alle Inhalte im Internet nach Altersvorgaben ähnlich der FSK bei Filmen von 0 - 18 Jahren klassifiziert werden, um so z.B. Jugendschutz-Software und anderen EDV-Systemen auf technischer Ebene eine Filterung nicht geeigneter Inhalte zu ermöglichen.
Da die "beteiligten Institutionen" bisher noch nicht konkret geworden sind, wie das technisch umgesetzt werden soll, ist das aber zur Zeit alles noch viel heiße Luft. Eine einfache Realisation mittels neuer META-Tags im Header einer jeden Webseite wäre vermutlich die technisch einfachste Lösung und auf dieser Ebene auch für jedermann relativ einfach umzusetzen und von jeder Software einfach auszulesen. Dadurch wird man natürlich nicht den Forderungen einer Zugangsverhinderung für Inhalte mit FSK12, 16 oder 18 gerecht, aber für 90% aller Webseiten sollte das Thema damit erledigt sein. Zumindest die üblichen Firmenwebseiten ohne Werbung und Links auf youporn etc. sind damit eigentlich aus dem Schneider.
Was ist aber, wenn es sich um Portale mit vielen Autoren und vielen unterschiedlichen Themen handelt? Als praktisches Beispiel fällt mir hier neon.de ein, wo beim besten Willen nicht nur jugendfreie Inhalte veröffentlich werden. Oder was ist mit Seiten, die Google Adwords nutzen? Hier besteht fast keine Möglichkeit, die angezeigten Werbebanner zu beeinflussen. In solchen Fällen sieht der Gesetzesentwurf vor, dass die Inhalte entweder durch ein Jugendschutzsystem nur für entsprechende Altersgruppen zugänglich gemacht werden (was i.d.R. immer mit Kosten verbunden ist) oder eine Zugänglichkeit nur in den Zeiten, in denen die jüngeren Zielgruppen nicht online sind (sprich z.B. von 23-6 Uhr bei FSK18). Hier merkt man schnell, wie unausgereift der Gesetzesentwurf ist. Noch absurder wird es, wenn man davon ausgeht, dass sich das Gesetz nur auf den deutschen Raum bezieht. Seiten ausserhalb dieses Raums, die die neue Kennzeichnung nicht verwenden, wird man dann bei Nutzung eines entsprechenden Filters, nicht mehr aufrufen können?

Ich persönlich werde erst einmal gar nichts unternehmen und abwarten, was tatsächlich passiert. Keine unserer Kundenseiten fällt überhaupt in die kennzeichnungspflichtigen Sparten. Ich rate Kunden daher ebenfalls, das Thema gelassen zu nehmen und abzuwarten, bis das Gesetz tatsächlich durchgewunken wird. Ob das passiert, sehe ich zum jetzigen Zeitpunkt noch nichtmal als ganz sicher an, auch wenn die Zeichen der Zeit darauf hindeuten.

Davon auszugehen, dass diese Kennzeichnung dazu führt, dass Jugendliche nur noch die für sie geeigneten Inhalte konsumieren werden ist realitätsfremd. In Summe ein weiteres Bürokratiewerkzeug, das Deutschland nicht braucht.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Thu, 11 Nov 2010 03:49:00 -0800 PDFs als JPEG Speichern (MacOS) http://blog.taenzer.me/pdfs-als-jpegs-speichern-macos http://blog.taenzer.me/pdfs-als-jpegs-speichern-macos

Convert_PDF_to_JPEG.app.zip Download this file

Für ein Projekt müssen PDF-Dokumente als Einzelseiten im JPEG-Format exportiert werden. Das geht zwar mit dem Acrobat, aber die exportieren JPEG-Dateien sind nicht immer von brauchbarer Qualität. Ich habe dafür einen Automator-Ablauf erstellt. Einfach die PDF-Datei auf die Aktion ziehen. Danach erfolgt eine Abfrage der Umbenennungsoptionen (durchlaufende Nummer etc.) und danach kann ein Ordner angegeben werden, in welchem die generierten JPEG-Dateien abgelegt werden. Klappt wunderbar und geht vor allem wesentlich schneller als mit Photoshop oder Acrobat.

Die Konvertierungs-Einstellungen (Auflösung etc.) kann man in der Automator-Aktion selber festlegen/ändern. Dazu die Aktion mit dem Automator öffnen und den entsprechenden Schritt bearbeiten.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Fri, 05 Nov 2010 05:11:00 -0700 PIL 1.1.6 fails to build on Debian Lenny 64bit http://blog.taenzer.me/pil-116-fails-to-build-on-debian-lenny-64bit http://blog.taenzer.me/pil-116-fails-to-build-on-debian-lenny-64bit

Error message:

_imagingtk.c:20:16: error: tk.h: Datei oder Verzeichnis nicht gefunden
_imagingtk.c:20:16: error: tk.h: No such file or directory

Solution:

Download PIL 1.1.6 and extract files from ZIP.
The problem seems to be that the setup doesn't find tk.h
Edit setup.py and add this after line 190:

add_directory(include_dirs, "/usr/include/tcl8.5")

After that either tar the folder and use easy_install
or do a simple python setup.py install.

Worked like a charm then.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Tue, 02 Nov 2010 03:42:00 -0700 Firefox-bug: Close button of Lightbox2-Plugin with Wordpress not working, producing a scrollbar and blue outline instead of closing http://blog.taenzer.me/firefox-bug-close-button-of-lightbox2-plugin http://blog.taenzer.me/firefox-bug-close-button-of-lightbox2-plugin

We're using Wordpress and NextGenGallery plugin for a client's site, with the possibility to open images with lightbox in full screen size. We're using Stimuli's Lightbox 2-plugin for this. It's working fine in Safari.

But in Firefox and Internet Explorer, somehow all images get a blue outline, and the close-button (which is an image) underneath the opened lightbox-image gets one. Clicking the close button would also produce a scrollbar, and only second click would close the image. I believed this to be a line-height or height problem, and in fact it is. Firefox and IE add this 1px blue outline to links as such and links or images in focus. So putting only the border to 0px won't work.

Scrollbar

Instead, my fix is this:

a, a img, a:focus, a img:focus{
    border: 0px;
    outline: none;
}   

Afterwards, the close button won't show this odd behaviour anymore and clicking the "X" will close the image.

In addition, if you happen to experience the close button not working at all, adding

#stimuli_imageData a#stimuli_bottomNavClose {

    position: relative;   
    z-index: 1000;

}

will do the trick. There is some overlaying issue causing this.

 

 

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/402614/Foto_am_22-01-2010_um_13.51__2.jpg http://posterous.com/users/3ssW4it9s95T Christiane Tänzer ctaenzer Christiane Tänzer
Mon, 11 Oct 2010 08:07:00 -0700 Coworking Bonn geht an den Start! http://blog.taenzer.me/coworking-bonn-geht-an-den-start http://blog.taenzer.me/coworking-bonn-geht-an-den-start

Es ist zwar noch nicht alles perfekt, aber nachdem einige "Beta-Tester" uns versichert haben, dass man an unseren Coworking-Schreibtischen in Poppelsdorf wunderbar entspannt arbeiten kann, haben wir unsere Webseite einfach schonmal online gestellt: http://cowobo.de


Die Coworking-Arbeitsplätze sind seit dem 1.10. einsatzbereit. Wer also noch nach einem Arbeitsplatz in Bonn sucht, ist jederzeit gerne willkommen. Am besten schreibt ihr uns eine E-Mail an info@taenzer.me, um zu klären, ob noch Plätze frei sind. Alles weitere könnt ihr auch den Webseiten entnehmen, v.a. die FAQ dürfte für die meisten interessant sein.

Wir arbeiten derzeit aktiv an einem Online-Buchungssystem, das die automatische Verwaltung der Buchungen übernimmt, sowie einer kleinen Community rund um unseren Coworking-Space. Kritik und Verbesserungsvorschläge sind jederzeit erwünscht!
Happy coworking :-)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Tue, 24 Aug 2010 03:16:30 -0700 coworking Bonn Logo - Final! http://blog.taenzer.me/coworking-bonn-logo-final http://blog.taenzer.me/coworking-bonn-logo-final Nach angeregten Diskussionen und diversen Zwischenvarianten haben wir uns für das coworking bonn Logo auf die Kombination schwarz/rot (in Anlehnung an das Stadt Bonn Logo) festgelegt.

Logo-cowobo-final

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Wed, 18 Aug 2010 12:47:50 -0700 coworking bonn Logo - Update http://blog.taenzer.me/coworking-bonn-logo-update http://blog.taenzer.me/coworking-bonn-logo-update Endlich heute die Zeit gefunden, das coworking bonn Logo zu aktualisieren - vielen Dank für eure Anregungen!
In der neuen Variante sind neue Farben im Spiel und die Typographie wurde den "Personen" am Tisch angepasst.

Coworking-bonn

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Tue, 17 Aug 2010 08:36:56 -0700 coworking Bonn Logo http://blog.taenzer.me/coworking-bonn-logo http://blog.taenzer.me/coworking-bonn-logo
Coworking-bonn-logo

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Sun, 08 Aug 2010 23:03:42 -0700 Tutorial: Netzwerklaufwerke unter MacOS beim Start verbinden (NAS, Time Capsule) http://blog.taenzer.me/tutorial-netzwerklaufwerke-unter-macos-beim-s http://blog.taenzer.me/tutorial-netzwerklaufwerke-unter-macos-beim-s Wir betreiben im Büro mehrere NAS, u.a. die Buffalo Linkstation Duo und auch eine Time Capsule. Um diese unter MacOS automatisch beim Start zu mounten, ohne dabei nach Passwörtern und Benutzern gefragt zu werden, verwenden wir folgendes bash-Script:

#!/bin/bash # define user and password here USER="user:password" # create directory to mount share in /Volumes mkdir "/Volumes/Media1" # mount shared folder to the directory we just created mount_afp "afp://$USER@192.168.0.251/Media1" "/Volumes/Media1"

Dieses einfache Script, bei dem nur user und passwort eingestellt werden müssen, erzeugt erst das Verzeichnis zum Mounten unter /Volumes und mounted dann das Netzwerk-Volume via mount_afp. Das funktiniert auch mit der Time Capsule von Apple, wobei hierbei zwei Dinge zu beachten sind:

- der Laufwerksname (einzustellen unter Airport-Dienstprogramm - Laufwerke) darf keine Sonderzeichen (auch keinen Bindestrich) enthalten, sonst klappt es nicht und man erhält diverse Fehlermeldungen)
- die Dateifreigabe sollte im Airport-Dienstprogramm auf "Mit Accounts" eingestellt sein, damit eine Authentifizierung mit Benutzer/Passwort möglich ist

Dieses Script speichert man dann als "network.command" (wichtig ist die Endung .command, damit aus dem Bash-Script ein selbstausführbares Programm wird) und lässt man dann unter Systemsteuerung - Benutzer - Startobjekte beim Anmelden ausführen (einfach per Drag&Drop in die Liste der auszuführenden Programme ziehen)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Mon, 02 Aug 2010 23:18:47 -0700 Eindrücke aus dem neuen Büro http://blog.taenzer.me/eindrucke-aus-dem-neuen-buro http://blog.taenzer.me/eindrucke-aus-dem-neuen-buro Das neue Büro im Vorderhaus kann eigentlich als fertig bezeichnet werden - es fehlen nur noch einige Bilder an ein paar Wänden. Das tänzermedien-Team hat sich jedenfalls schon gut eingelebt und steht wieder wie gewohnt zur Verfügung.

Es liegen 4 Wochen harte Umbauarbeiten hinter uns und ich bin mit dem Ergebnis sehr zufrieden. Natürlich wurde aus einem Altbau dadurch kein Neubau, aber es ist schön zu sehen, wie die Vorabplanungen in die Realität umgesetzt wurden und dass zum Beispiel unsere Idee mit der Büroküche im Besprechungsraum so gut umgesetzt werden konnte. Die ersten Rückmeldungen von Kunden, Freunden und Bekannten bestätigen, dass die neuen Räume Ihren Charme und Persönlichkeit haben und ich freue mich in Zukunft auf viele konstruktive und kreative Projekte, die wir in den neuen Räumen umsetzen werden. Der zusätzliche Besprechungsraum hat sich schon bewährt und wird in Zukunft entspannte Meetings ermöglichen, was vorher so im Hinterhaus nicht möglich war.

In Kombination mit unserem Coworking-Space im Hinterhaus kommen wir unserem Ziel, dem kleinen "Medien-Cluster" in Poppelsdorf, doch wieder ein Stück näher. Ich bin gespannt, wie es weitergeht,

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Mon, 02 Aug 2010 05:15:56 -0700 Coworking-Aufbau geht weiter... http://blog.taenzer.me/coworking-aufbau-geht-weiter http://blog.taenzer.me/coworking-aufbau-geht-weiter Von der Coworking-Insel sind wir jetzt bei Einzeltischen "gestrandet" - damit maximal zwei Personen gegenübersitzen. Dazugekommen sind IKEA-Expedit als Ablageflächen und Bücherregale (irgendwo muss ja unser PAGE-Abo hin...) und lustige Tischlampen, deren Zuleitungen in praktischen Kabelführungen verschwinden. Kleine Sammlerboxen werden wir mit allerlei Büromaterial füllen, unter den Tischen warten schon Mülleimer gefüllt zu werden und für's Grün sorgen fünf kleine Tischpflanzen.
Es wird auf jeden Fall fröhlich bunt, yeah!

Coming soon:
- Lampen umhängen und mit neuen Neonröhren bestücken (wärmeres Arbeitslicht!)
- Steckdosenleisten auf den Schreibtischen
- WLAN-Hotspot (sobald die neue Firewall da ist)

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Thu, 29 Jul 2010 07:38:00 -0700 Unsere Coworking-"Insel" wächst! http://blog.taenzer.me/unsere-coworking-insel-wachst http://blog.taenzer.me/unsere-coworking-insel-wachst

Es geht weiter! Nachdem wir mit den Umbauarbeiten in den neuen Büros im Vorderhaus soweit durch sind geht es jetzt mit der Einrichtung des Coworking-Raums los. Hier können bald bis zu 5 Coworker arbeiten und die Büroinfrastruktur mit WLAN, Drucker, Kopierer, Scanner & Fax sowie dem neuen "Mini-Cafe/Bar" im Vorderhaus mitnutzen.

Wir haben eben jedenfalls schon die geplante Coworking-"Insel" aus Schreibtischen zusammengebaut. In den nächsten Tagen folgen Kabelkanäle unter den Tischen, Lampen, Ablage- und Büroutensilien-Boxen etc. pp.

Was erwartet ihr von einem Coworking-Arbeitsplatz? Was ist euch wichtig?

Haltet ihr unsere Idee einer großen zusammenhängenden Arbeitsfläche für praktisch oder bevorzugt ihr getrennte Schreibtische?

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Tue, 29 Jun 2010 17:00:00 -0700 JScrollPane and Lazy Loading: How to avoid endless loading of a page when two javascript plugins collide http://blog.taenzer.me/jscrollpane-and-lazy-loading-how-to-avoid-end http://blog.taenzer.me/jscrollpane-and-lazy-loading-how-to-avoid-end

At our company we use the really flexible Content Management System ZMS which is based on Zope and works with DTML and Python.

For some time now we're using a specially written Content Object for Google Maps integration.It's based upon the general Google Maps API and the code provided in the API docs.

A client of ours recently asked for a site where the inner content is scrollable (like with iFrames, you probably remember). The implementation was supposed to be in a Web 2.0-ish way, valid and widely accessible (screenreaders).

Vertical scrollbars can be added via CSS very easily: via

overflow-y: scroll; 

and a value for "height".

The problem is that this scrollbar is only visible when content flows over the given height. Our client had several pages with little content though where there would show up a large vertical blank gap on the right content edge. Really ugly.

The solution came in form of the jScrollPane-Plugin by Kelvin Luck. It simulates scrollbars via jQuery and makes them easily customizable. When there isn't enough content, the background closes with the right edge without leaving a gap - beautiful solution!

Collision of JavaScripts(?)

It so happened that shortly after implementing this, I added the Google Maps object to load the map frame. 

When loading the page in Firefox 3.5 (Mac), it would instantly turn blank and start loading it endlessly. Safari seemed to be able to prevent this. 

Firefox threw some indefinite error at me: 

Error: _mF is not defined

Source File: http://maps.gstatic.com/intl/en_us/mapfiles/193c/maps2.api/main.js Line: 1

 

It took me about 3-4 hours to find something on the Internet about this, so I thought it to be valuable to post it here.

Reference link for the existence of this problem was www.mediawiki.org which finally lead me to this Google Newsgroup for so-called "Lazy Loading" where a Google employee posted the solution: Lazy Loading or Dynamic Loading.

About Lazy Loading

Lazy Loading is generally a programming term for the delay of execution of a script to the exact point where it is needed. Thus you can avoid heavy loading at the visit of a site.

The Solution (aka the workaround)

Google Maps API implementation usually looks like this:

function loadMap() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng(37.4419, -122.1419), 13); } } function loadScript() { var script = document.createElement("script"); script.setAttribute("src", "http://maps.google.com/maps?file=api&v=2.x&key=ABQIAAAA-O3c-Om9OcvXMOJXreXHAxTPZYElJSBeBUeMSX5xXgq6lLjHthQK56gfyM5NBqKVAIOX7Pg8-ceW5A&c&async=2&callback=loadMap"); script.setAttribute("type", "text/javascript"); document.documentElement.firstChild.appendChild(script); }

 

 

I took this code from the link the Google employee provided for testing. Pay attention to the bold part: 

&async=2&callback=loadMap

which is appended to the unique Google Map API. The callback gets the name of your function (see above, "loadMap"). Though I left this part out and it's still working with only the "&async=2".

 

Again, I can't exactly tell you what it does, but my assumption is that this is a short tag for calling the Google Map function on demand not before everything else on your page has loaded.

There seems to be a problem with the empty <script>-tag that contains the API which tries to load the map but somehow fails and keeps loading, crashing the page.

This bug seems to be related only to Firefox 3.5x and higher, and in this case only in combination with JScrollPane. I witnessed it only on FF 3.65 on a Mac. The fact that other users report it without using JScrollPane (but maybe a similar script) shows that either these scripts collide due to the loading failure of Google Map or due to a bad call within the function.

If anyone reading this who's as easy with Java Script to dig into this a little more, please leave a comment if you found something.

As for me, with a close deadline, I was relieved to have found this simple workaround, even if I'd liked to spend much more time to find the How's and Why's...

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/402614/Foto_am_22-01-2010_um_13.51__2.jpg http://posterous.com/users/3ssW4it9s95T Christiane Tänzer ctaenzer Christiane Tänzer
Mon, 31 May 2010 07:29:00 -0700 Solution to ugly list-style-image-positioning in IE http://blog.taenzer.me/solution-to-ugly-list-style-image-positioning http://blog.taenzer.me/solution-to-ugly-list-style-image-positioning

When setting up a list, Safari and Firefox place the list-style-image for a list item at the top left, even with a two- or three-line item.

IE7 and 8 don't. The list-style-image sits centered on the bottom line when having more than one line.

Ie_list_image_1

The solution to getting the image to the top left i.e. the first line is using a background-image of a bullet or square which can be positioned to your liking.
It's important to use background-image/background: url(../img/img.gif); since list-style-image with the exact same image only centers the bullet:

Code: list-style-image: url('../img/bullet.gif');

Ie_list_image_2

To get a "normal" list-image-position I used in my ie.css

#content ul li {
padding: 0 0 0 20px;
background: url('../img/bullet.gif') no-repeat 0px 3px;
list-style-type: none;
}

which looks like this:

Ie_list_image_3

Looks great, doesn't it?
But wait, there is still one more thing to do: Your client might want to print out the site. Since background-images won't be printed, your list will lack the bullets and thus be confusing to the reader.
So you have to tell your list in your print-stylesheet (print.css) to print bullets by using the previous code:


#content ul li {
list-style-image: url('../img/bullet.gif');
}

Don't forget to include the print-stylesheet in your HTML-header!

I am aware that this is only a workaround, but I searched the web for any solution and couldn't find one, so I thought I post this. Comments and corrections always appreciated!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/402614/Foto_am_22-01-2010_um_13.51__2.jpg http://posterous.com/users/3ssW4it9s95T Christiane Tänzer ctaenzer Christiane Tänzer
Tue, 27 Apr 2010 05:45:40 -0700 Textmate: Open files from FTP in tabs with Transmit 4 http://blog.taenzer.me/textmate-open-files-from-ftp-in-tabs-with-tra http://blog.taenzer.me/textmate-open-files-from-ftp-in-tabs-with-tra

Bildschirmfoto_2010-04-27_um_1

Want your files you edit from FTP with Textmate to open in tabs (i.e. in project mode)? Some of you out there might be using the Transmit tabs solution that Stuart posted back in 2006 and it stopped working with the latest version of Transmit. Since the release of Transmit 4 today the path for cached files has changed. Basically you just have to remove the old folder saved in your Textmate project and add a new one at Userfolder/Library/Caches/Cleanup At Startup/Transmit. This isn't as easy as it sounds as this folder is not visible in Finder or any app.

So either you just open your existing Transmit project with Textedit for example and change the <string>...</string> tag or you just use my project file attached to this post. Love to get feedback if that project file works for you.

A different approach is to create a new project (this is also the solution for those not working with tabs in Textmate except on local projects, yet):

1. Open Textmate, close all files and projects. In Transmit edit a file from FTP with Textmate (which then opens in single file mode, i.e. no tabs yet).
2. In Textmate go to "File" - "Save as...". The dialogue window pops up inside a folder with a cryptic name. Switch to the "Cleanup At Startup" folder and just leave it there.
Then click "Cancel", but leave your file open.

0bildschirmfoto_2010-04-27_um_1

3. Create a new project ("File" - "New project...") and open the project drawer sidebar.

1bildschirmfoto_2010-04-27_um_1

If you don't see the "Drag Files And Folders Here" sidebar open it with "View" - "Show project drawer". 
Click on the third icon on the left and choose "Add existing files..."
It should open up in the "Cleanup At Startup" folder. Go to the Transmit folder and click "Open".

Your sidebar should look like this now:

2bildschirmfoto_2010-04-27_um_1

4. Save this project on your desktop or whereever you want to permanently store it. 
You'll need to open it before you want to edit all files from Transmit in project mode, i.e. in tabs.

transmit.tmproj Download this file

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Fri, 16 Apr 2010 04:01:58 -0700 Wahre Worte zum Thema Datenschutz http://blog.taenzer.me/wahre-worte-zum-thema-datenschutz http://blog.taenzer.me/wahre-worte-zum-thema-datenschutz
Img_0361

"Privacy ist eine Grundvoraussetzung für eine freiheitliche Gesellschaft" 

Miriam Meckel auf der re:publica.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Thu, 15 Apr 2010 03:24:21 -0700 re:publica makerbot panel. http://blog.taenzer.me/republica-makerbot-panel http://blog.taenzer.me/republica-makerbot-panel This is like the coolest think I have seen in a long time: The makerbot (http://www.makerbot.com/) is a robot, a 3D printer, that makes things. You can even "print" your own Lego bricks.

Foto

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer
Tue, 13 Apr 2010 04:49:16 -0700 re:publica 2010 wir kommen! http://blog.taenzer.me/republica-2010-wir-kommen http://blog.taenzer.me/republica-2010-wir-kommen Das TÄNZER MEDIEN Team wird dieses Jahr wieder auf der re:publica in Berlin vertreten sein. Christiane, Katrin und ich brechen heute abend Richtung Hauptstadt auf und werden pünktlich zum Opening im Friedrichsstadtpalast sitzen. iPhones sind geladen, Macbooks eingepackt. Da kann nicht mehr viel schief gehen. Würde mich freuen, mit dem ein oder anderen bekannten oder unbekannten Gesicht aus der Twitteria 'nen Kaffee trinken zu dürfen.

Berlin, Berlin, wir fahren nach Berlin!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/229029/Bild_1_bigger.png http://posterous.com/users/36UO2ezRFvXP Sebastian Tänzer taenzerme Sebastian Tänzer