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

Diff of /contributions/modules/freelinking/freelinking.module

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

revision 1.32.2.11.2.2.2.14, Wed Nov 4 23:04:15 2009 UTC revision 1.32.2.11.2.2.2.15, Thu Nov 5 22:05:48 2009 UTC
# Line 237  function freelinking_settings() { Line 237  function freelinking_settings() {
237      '#description' => t('Use Markdown syntax [Title](plugin:url) in place of Freelinking syntax [[plugin:url|Title]]'),      '#description' => t('Use Markdown syntax [Title](plugin:url) in place of Freelinking syntax [[plugin:url|Title]]'),
238    );    );
239    
240      $form['freelinking_wrapper'] = array(
241        '#type' => 'checkbox',
242        '#title' => t('Wrap links in') . ' <span>',
243        '#default_value' => variable_get('freelinking_wrapper', FALSE),
244        '#description' => t('Used for advanced CSS styling.'),
245      );
246    
247    // loop through plugin settings functions, adding a fieldset for each    // loop through plugin settings functions, adding a fieldset for each
248    foreach ($plugin_with_settings as $plugin=>$callback) {    foreach ($plugin_with_settings as $plugin=>$callback) {
249      $form[$plugin] = array(      $form[$plugin] = array(
# Line 336  function theme_freelink($plugin = NULL, Line 343  function theme_freelink($plugin = NULL,
343    if ($link['extra']) {    if ($link['extra']) {
344      unset($link['extra']);      unset($link['extra']);
345    }    }
346    return call_user_func_array('l', $link);    $rendered = call_user_func_array('l', $link);
347      if (variable_get('freelinking_wrapper', FALSE)) {
348        $rendered = '<span class="' . $link[2]['attributes']['class'] . '">'
349          . $rendered . '</span>';
350      }
351      return $rendered;
352  }  }
353    
354  /**  /**
# Line 346  function theme_freelink_error($plugin = Line 358  function theme_freelink_error($plugin =
358    if($message) {    if($message) {
359      $message = ': ' . $message;      $message = ': ' . $message;
360    }    }
361    return '<code class="freelink freelink-error freelink-$plugin"    return '<span class="freelink freelink-error freelink-$plugin"
362      . " freelink-error-$plugin">[' . t('Bad Link') . $message . ']</code>';      . " freelink-error-$plugin">[' . t('Bad Link') . $message . ']</code>';
363  }  }
364    

Legend:
Removed from v.1.32.2.11.2.2.2.14  
changed lines
  Added in v.1.32.2.11.2.2.2.15

  ViewVC Help
Powered by ViewVC 1.1.2