/[drupal]/contributions/modules/t9nlinks/t9nlinks.module
ViewVC logotype

Diff of /contributions/modules/t9nlinks/t9nlinks.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1, Fri Jan 9 06:27:39 2009 UTC revision 1.2, Wed Jul 1 03:40:04 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: $  // $Id: t9nlinks.module,v 1.1 2009/01/09 06:27:39 bevan Exp $
3  /**  /**
4   * @file   * @file
5   *  Creates links to translations in convenient places for semi-multi-lingual sites, such as next to teaser titles, as local tasks (aka tabs) and on node/edit pages.   *  Creates links to translations in convenient places for semi-multi-lingual sites, such as next to teaser titles, as local tasks (aka tabs) and on node/edit pages.
# Line 16  function t9nlinks_menu() { Line 16  function t9nlinks_menu() {
16    $items = array();    $items = array();
17    
18    // Create menu items for each enabled language.  Most get hidden dynamically by the access callback.    // Create menu items for each enabled language.  Most get hidden dynamically by the access callback.
19    foreach (locale_language_list() as $langcode => $language) {    foreach (locale_language_list('native') as $langcode => $language) {
20      // Node VIEW menu items, to view nodes by language.      // Node VIEW menu items, to view nodes by language.
21      $items["node/%node/view/t9n-$langcode"] = array(      $items["node/%node/view/t9n-$langcode"] = array(
22        'title' => $language,        'title' => $language,
# Line 142  function t9nlinks_preprocess_node(&$vars Line 142  function t9nlinks_preprocess_node(&$vars
142        if (!empty($t9ns)) {        if (!empty($t9ns)) {
143          // Add css for the styling of the links.          // Add css for the styling of the links.
144          drupal_add_css(drupal_get_path('module', 't9nlinks') . '/theme/node-teaser-title-links.css');          drupal_add_css(drupal_get_path('module', 't9nlinks') . '/theme/node-teaser-title-links.css');
         if (module_exists('themer')) {  
           // This CSS is dependendant on an HTC file callback provided by Themer module.  
           drupal_add_css(drupal_get_path('module', 't9nlinks') . '/theme/node-teaser-title-links-ie-border-radius.css');  
         }  
145    
146          // Get language names by language code, and unique indices ($ids) per language code.          // Get language names by language code, and unique indices ($ids) per language code.
147          $languages = language_list();          $languages = language_list();

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.2