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

Diff of /contributions/modules/marksmarty/marksmarty.module

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

revision 1.16, Sat Jul 15 20:17:14 2006 UTC revision 1.17, Sat Jul 15 20:35:19 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: marksmarty.module,v 1.15 2006/05/16 01:23:06 teradome Exp $  // $Id: marksmarty.module,v 1.16 2006/07/15 20:17:14 teradome Exp $
3    
4  ini_set('include_path', ini_get('include_path') . ':' . getcwd() . '/modules/marksmarty/');  ini_set('include_path', ini_get('include_path') . ':' . getcwd() . '/modules/marksmarty/');
5    
# Line 67  function _marksmarty_process($text, $for Line 67  function _marksmarty_process($text, $for
67    if (variable_get("marksmarty_is_smarty_on_$format", 1) == 1) {    if (variable_get("marksmarty_is_smarty_on_$format", 1) == 1) {
68      global $smartypants_attr;      global $smartypants_attr;
69      $smartypants_attr = variable_get("marksmarty_smarty_hyphens_$format", 0) + 1;      $smartypants_attr = variable_get("marksmarty_smarty_hyphens_$format", 0) + 1;
70      return SmartyPants(Markdown($text));      $text = SmartyPants($text);
71    }    }
72    else {    if (variable_get("marksmarty_is_markdown_on_$format", 1) == 1) {
73      return Markdown($text);      $text = Markdown($text);
74    }    }
75      return $text;
76  }  }
77    
78  function _marksmarty_settings($format) {  function _marksmarty_settings($format) {
# Line 83  function _marksmarty_settings($format) { Line 84  function _marksmarty_settings($format) {
84    );    );
85    $form['markdown_settings']['help'] = array(    $form['markdown_settings']['help'] = array(
86      '#type' => 'markup',      '#type' => 'markup',
87      '#value' => '<p>Markdown is enabled. Please read the <a href="http://daringfireball.net/projects/markdown/syntax">Markdown documentation</a> for full details on its formatting syntax.</p>',      '#value' => '<p>Please read the <a href="http://daringfireball.net/projects/markdown/syntax">Markdown documentation</a> for full details on its formatting syntax.</p>',
88      );
89      $form['markdown_settings']["marksmarty_is_markdown_on_$format"] = array(
90        '#type' => 'select',
91        '#title' => t('Enable Markdown?'),
92        '#default_value' => variable_get("marksmarty_is_markdown_on_$format", 1),
93        '#options' => array(0 => t('No'), 1 => t('Yes')),
94    );    );
95    $form['markdown_settings']["marksmarty_is_smarty_on_$format"] = array(    $form['markdown_settings']["marksmarty_is_smarty_on_$format"] = array(
96      '#type' => 'select',      '#type' => 'select',

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.2