/[drupal]/contributions/modules/drutex/drutex_verbatim.inc
ViewVC logotype

Contents of /contributions/modules/drutex/drutex_verbatim.inc

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


Revision 1.8 - (show annotations) (download) (as text)
Wed Sep 6 02:25:41 2006 UTC (3 years, 2 months ago) by dfg
Branch: MAIN
CVS Tags: DRUPAL-4-7--1-0, DRUPAL-5--1-1, DRUPAL-5--1-0, DRUPAL-5--1-3, DRUPAL-5--1-2, HEAD
Branch point for: DRUPAL-5--2, DRUPAL-5, DRUPAL-4-7, DRUPAL-6--1
Changes since 1.7: +12 -0 lines
File MIME type: text/x-php
Added sorting of submodules by weight.
1 <?php
2 // $Id$
3
4 /**
5 * @file
6 * Provide verbatim environments (these will be hidden by all further DruTeX parsing).
7 *
8 * Note that a missing subhook_info() means that this submodule cannot be disabled (without hacking).
9 */
10
11 /**
12 * Implementation of subhook_info().
13 */
14 function drutex_verbatim_info($format = -1) {
15 return (object) array(
16 'title' => t('Numbering / Referencing'),
17 'description' => t('Provide verbatim environments (these will be hidden by all further DruTeX parsing).'),
18 'toggle' => false,
19 'weight' => 20
20 );
21 }
22
23 /**
24 * Implementation of subhook_defaults().
25 */
26 function drutex_verbatim_defaults() {
27 $D['drutex_verbatim_active'] = true;
28 return $D;
29 }
30
31 /**
32 * Implementation of subhook_node2html().
33 */
34 function drutex_verbatim_node2html() {
35 $E = array();
36
37 /* <code>*</code> */
38 $E[] = (object) array(
39 'pattern' => '@<code>(.+?)</code>@se',
40 'replacement' => "_drutex_hide('set', '$0')",
41 'weight' => -100,
42 );
43
44 /* <notex>*</notex> */
45 $E[] = (object) array(
46 'pattern' => '@<notex>(.+?)</notex>@se',
47 'replacement' => "_drutex_hide('set', '$1')",
48 'weight' => -100,
49 );
50
51 return $E;
52 }

  ViewVC Help
Powered by ViewVC 1.1.2