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

Diff of /contributions/modules/service_links/service_links.module

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

revision 1.26.4.6, Fri Aug 14 04:42:52 2009 UTC revision 1.26.4.7, Tue Aug 18 17:54:03 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: service_links.module,v 1.26.4.5 2009/08/14 00:36:27 robloach Exp $  // $Id: service_links.module,v 1.26.4.6 2009/08/14 04:42:52 robloach Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 14  define('SERVICE_LINKS_STYLE_IMAGE',2); Line 14  define('SERVICE_LINKS_STYLE_IMAGE',2);
14  define('SERVICE_LINKS_STYLE_IMAGE_AND_TEXT',3);  define('SERVICE_LINKS_STYLE_IMAGE_AND_TEXT',3);
15  define('SERVICE_LINKS_STYLE_FISHEYE',4);  define('SERVICE_LINKS_STYLE_FISHEYE',4);
16    
17    define('SERVICE_LINKS_DISABLED', 0);
18    define('SERVICE_LINKS_IN_TEASER', 1);
19    define('SERVICE_LINKS_IN_FULL', 2);
20    define('SERVICE_LINKS_IN_BOTH', 3);
21    
22  /**  /**
23   * Implementation of hook_help().   * Implementation of hook_help().
24   */   */
# Line 121  function service_links_link($type, $node Line 126  function service_links_link($type, $node
126    $links = array();    $links = array();
127    
128    switch (variable_get('service_links_in_links', 0)) {    switch (variable_get('service_links_in_links', 0)) {
129      case 0:      case SERVICE_LINKS_DISABLED:
130        $show_links = FALSE;        $show_links = FALSE;
131        break;        break;
132      case 1:      case SERVICE_LINKS_IN_TEASER:
133        $show_links = $teaser ? TRUE : FALSE;        $show_links = $teaser ? TRUE : FALSE;
134        break;        break;
135      case 2:      case SERVICE_LINKS_IN_FULL:
136        $show_links = $teaser ? FALSE : TRUE;        $show_links = $teaser ? FALSE : TRUE;
137        break;        break;
138      case 3:      case SERVICE_LINKS_IN_BOTH:
139        $show_links = TRUE;        $show_links = TRUE;
140        break;        break;
141      default:      default:
# Line 428  function theme_service_links_build_link( Line 433  function theme_service_links_build_link(
433          break;          break;
434        case SERVICE_LINKS_STYLE_IMAGE:        case SERVICE_LINKS_STYLE_IMAGE:
435          $link = array(          $link = array(
436            'title' => theme('image', $icon, $text),            'title' => theme('image', $image, $text),
437            'href' => $url[0],            'href' => $url[0],
438            'query' => $url[1],            'query' => $url[1],
439            'attributes' => $attributes,            'attributes' => $attributes,

Legend:
Removed from v.1.26.4.6  
changed lines
  Added in v.1.26.4.7

  ViewVC Help
Powered by ViewVC 1.1.2