Stoppt die Vorratsdatenspeicherung! Jetzt klicken &handeln! Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:

Archived entries for PHP

Drupal: Mega-Menus

Einfach Mega Menus mit Views in Drupal erstellen.

Menu Views allows administrators to attach a view inside a menu item.
This is useful when creating “mega-menus” with content such as:

  • Recent blog, node, or user posts
  • Complex views that contain graphics and other HTML structures.

This module adds an “Attach view” fieldset on any add/edit menu item on any menu (admin/structure/menu/manage) where you can select a view, display and pass arguments.

Optionally, if you wish to display only the view, you may set the menu item’s path to . This will ensure the title and path (link) is not rendered.

Drupal: Field API

Felix Hofmann zeigt an einigen Beispielen wie man mit der Field-API einzelne Felder rendert.

<?php
 // Wir holen uns das Node-Objekt über node_load().
 $node = node_load($nid);
 // Unser Konfigurationsarray.
 $display = array(
 'type' => 'image', // Der Feld-Typ z.B. image, file, text.
 'settings' => array( // Formatter-settings.
 'image_style' => 'your_image_style', // Bild mit einem angelegtem Bildstil ausgeben.
 'image_link' => 'content', // Und das Bild noch auf den Inhalt verlinken.
 ),
 );
 // Wir holen uns alle Elemente des Feldes
 $items = field_get_items('node', $node, 'field_name');
 // Value für das erste Element des Feldes
 $variables['output'] = field_view_value('node', $node, $item[$delta], $display);
 // für die Ausgabe
 print render($output);
?>

New Features in Joomla! 2.5

Die Übersicht der neuen Features in Joomla 2.5 sieht sehr gut aus.

Joomla 2.5, due out in January 2012, will have a host of new features including new search functionality, multi-database support, and update notification. (…) Moving from 1.7 to 2.5 can be done with the one-click upgrade within Joomla and most extensions that run on 1.7 should also run on 2.5.

Based on Finder, which was developed by jXtended, Joomla 2.5 has added an exciting new natural language search function. This feature incorporated auto-completion and stemming. Stemming is the ability for the search to use the root of the word you entered to locate matches. While there is still work to be done, this search is also much better at searching in languages other than English.

This new search is faster and more versatile that the standard search. The data is indexed to get this flexibility and speed. New plugins are required to use this search. Joomla ships with the new core extension plugins, but other extension developers will need to create their own plugins to work with this new search. By default, the standard search is active and this new search is disabled. You can enable the plugin and index your files when the extensions you want to search have the new plugins.

Ich werde die Beta 2 die Tage mal testen.

Typo3: ttnews Breadcrumbs

Praktischer Tip vom typo3blogger:

Da Single-Ansichten wie bei tt_news faktisch (im Normalfall) auf einer Page-ID, also auf einer Seite stattfinden, müssen dem Nutzer trotzdem über den angepassten title und der angepassten Rootline vorgegaukelt werden es sind unterschiedliche Einzelseiten.

Das kann man für tt_news z.B über ein RECORDS-Objekt einbinden, das der normalen Breadcrumb angefügt wird:

[globalVar = GP:tx_ttnews|tt_news > 0]
lib.rootline.20 = RECORDS
lib.rootline.20 {
 dontCheckPid = 1
 tables = tt_news
 source.data = GPvar:tx_ttnews|tt_news
 conf.tt_news = TEXT
 conf.tt_news.field = title
 conf.tt_news.wrap = <strong>|</strong>
}
[end]

WordPress: Konstanten

WPEngineer listet alle PHP Konstanten einer WordPress Installation auf.

Das muss ich mir noch mal genauer ansehen. Bisher verwende ich hautsächlich WP_HOME und WP_SITEURL aber EMPTY_TRASH_DAYS und WP_POST_REVISIONS klingen auch sinnvoll.



Copyright © 2004–2009. All rights reserved. – Impressum

RSS Feed. This blog is proudly powered by Wordpress and uses Modern Clix, a theme by Rodrigo Galindez.