Endlich habe ich wieder die Wahl

… nämlich am Sonntag. Zum ersten mal darf ich mir meinen Landesvater für NRW heraussuchen. Nein, nicht weil ich noch so jung bin, sondern weil ich ja noch keine fünf Jahre in NRW wohne. Obwohl, wählen kann ich mir den Landesvater ja auch nicht – muss ja eine Partei wählen.

Ich denke es ist im Interesse meiner Leser, wenn ich keine gelben oder schwarzen Gesichter wähle. Die kann ich nämlich nicht mehr ersehen. Selbst bei hellrot bekomm’ ich Ausschlag.

In diesem Sinne: Happy Voting!

yab_navigation – A navigation management plugin for Textpattern

Grab it here
yab_navigation_v0.1.beta.zip
or here
yab_navigation_v0.1.beta.tar.gz

There are a couple of browser issues this time, namely for Opera, all Internet Explorer versions and Konqueror. Some are CSS-related, some Javascript related. Because of these issues this is a beta release. I will try to fix these issues asap.

Feature Screencast

Feature Screencast of yab_navigation from trenc on Vimeo.

What you need to know

The navigation used and generated by yab_navigation is based on a »simple« template of Textpattern tags (<txp:variable />, <txp:section_list />, <txp:article_custom /> etc.). This navigation will be saved in a form called »yab_navigation« (Opps!). This form will be created automatically.

Since the navigation is saved in this form you can call the navigation with the following command in your page template:

<txp:output_form form="yab_navigation" />

And your articles you can call simply with:

<txp:if_individual_article>
  <txp:article status="4" limit="1" />
<txp:else />
  <txp:article status="5" limit="1" />
</txp:if_individual_article>

in your page template(s).

For your frontpage you need a section with the value »On front page« set to »yes« and the same title as the home_title in the configuration (see below).

That’s all actually, but

What you really need to know

Since Textpattern sections and articles are completly different in behaviour and database structure and they are not only pages – as maybe known from other CMS – this plugin can only be an approach, of course. For understanding the concept I have to explain something.

The first section on the left side in your backend navigation will represent your frontpage aka your home. So the name of this section is only shown in the plugin, The real name, which is shown as a link in your frontend navigation is set in the config (see below).

The first article (first list point) of every section in the backend navigation will represent the parent section in the frontend navigation. This article will always be fixed (status 5) and is not displayed in the frontend navigation. So the name of the article is only shown in the backend navigation.

The rest of the articles will be shown in the frontend navigation in the order you choose.

What you maybe need to know

When you install the plugin and you go to the backend navigation, your whole navigation is shown of the right.

Reload the site again

Now your navigation should be shown on the left side but maybe it looks weird. This is because the plugin reads the whole stuff from database and not from a navigation template, because this is still empty. You have to move a section to force the generating of the navigation template. When done, reload the backend page again.

Now you should see on the right side a place where you can see hidden or new detected sections – if they exist.

If something won’t work or you can’t see the navigation on the left side, go to you form templates and empty the yab_navigation form. Then begin anew in the navigation backend.

Useful things you need to know

Every new created section is hidden by default, you have to move it from the right side in your backend navigation. Every created article is hidden by default, except if it is the first article of a section, then it’s fixed.

Btw. hiding the first article of a section doesn’t really make sense. :)

Renaming a section or an article will not change the name of section or the URI of the article. It will only rename the title of the element. I’ve decided for this behaviour because of the URI consistence (»Cool URI’s don’t change!«).

If you ever delete or rename a section in the Textpattern section menu you are lost.
Not really but …
If you have deleted a section this way you only have to hide this section in the backend navigation. Next time (or after a reload) this section will disappear.
If you have renamed a section this way … uh … fucked up! You have have to empty the yab_navigation form and build your navigation in the backend anew. Sorry!

Really useful things you need to know

There are configuration options for the plugin. You will find them in an array $yab_nav_prefs in the plugin code:

Option Description Default
home_title The title of the frontpage. Has to be the same title as your frontpage section title. Home
sort The sort order for the articles position asc
active_class Active class for sections or articles active
passive_class Passive class for sections or articles passive
exclude_sections Here you can completly exclude sections from navigation listing (comma delimited) (empty)
exclude_articles Here you can set sections, which articles will not be listed in the navigation. Useful for a news section or a section which does not have a single article as content. And you can’t move other articles in this section in the backend. (comma delimted) (empty)
section_default_page Default page template when creating a section default
section_default_css Default CSS when creating a section default
section_default_rss Should be created sections include in RSS Feed? 0
section_default_frontpage Should be created sections on frontpage? 0
section_default_searchable Should be created sections searchable? 1
jquery_ui The link to the jQueryUI Script min. JS from Google CDN
article_limit Hard limit for backend navigation article list 30

If you develop sites locally with no internet connection or you don’t like Google, you can change the jquery_ui link to a local jQueryUI framework. If you want to minfy the script, you don’t need to load the complete jQueryUI framework. The only things you need are Core, Widget, Mouse and Sortable. (http://jqueryui.com/download)

The function yab_nav_gTxt below the configuration array is used for the localisation and language. You can edit this on your own.

Other things you need to know

Deleting sections or articles will not be implemented. For deleting sections or articles you have to go the standard way.
The rights management (user privileges) could be bypassed by this plugin, if you set the rights for this plugin lazier than other rights are (for example access to editing sections in the section tab).
The plugin does only know the article status fixed (5), live (4) and hidden (2). Other status – as draft or pending – will be overwritten!

Things you really don’t want to know

This plugin is made with some Javascript, jQuery, jQuery UI, XML (really), AJAX, PHP, Textpattern, Debian, Kate, Firefox/Iceweasel. I like the Allman style for php coding with a maximal measure of 80 chars – if you ever look at the plugin code. And if you have seen the feature screencast, this is made with recordMyDesktop and converted with mencoder.

Trauriger Jahresanfang

Nach einer Woche kann ich langsam darüber schreiben auch wenn es immer noch schmerzt: Letzten Montag ist unsere Mietz Nr. 1 – Lucia – verstorben. Mit einem Herzklappenfehler konnte und wollte Sie nicht mehr gegen eine innere Entzündung ankämpfen. :(

Lucia High Key

12 Jahre voll Freude und viel Schmuserei bleiben in Erinnerung.
Ein paar ältere Bilder gibt’s noch in der Premium-Content-Kategorie.

Mehdorns Vermächtnis

Leipzig Hauptbahnhof, Regionalzug nach Lutherstadt Wittenberg. Auf dem Nebengleis steht der ICE nach Dresden mit dem schönen Namen “Rathenow” (gut lesbar an der Außenhaut aufge“malt”). Kommentar des blonden Mädchens in der Sitzgruppe hinter mir: “Wow, hätte ja nicht gedacht, dass es einen ICE nach Rathenow gibt, ist doch nur so ein kleines Nest bei Berlin!”

WTF?!

Dass bei Neuinstallation oder Update von Software der Rechner (bzw. Windows) neu gestartet werden muss, ist zwar inzwischen immer mehr die Ausnahme, kommt aber hin und wieder doch vor. Die Frechheit, den Rechner ohne jeglichen Hinweis oder Rückfrage allerdings einfach neu zu booten habe ich allerdings gerade zum ersten Mal erlebt. Vielen Dank an die Logitech-G15-Software.

libdevmapper1.02 missing LSB tags and overrides

Sollte jemandem die Meldung bei einem Update auftauchen – genauer bei einem Update zum »dependency based boot system« – einfach mal nachschauen, ob libdevmapper1.02.1 schon bzw. zusätzlich installiert ist. In dieser Version sind die fehlenden LSB-Header gefixt. Wenn ja, die veraltete (deprecated) Version entfernen (purge):

apt-get remove --purge libdevmapper1.02

und die Umstellung auf das neue Bootsystem erneut anstoßen:

dpkg-reconfigure sysv-rc

neuere Einträge | ältere Einträge