]>
Raphaƫl G. Git Repositories - bbcode/blob - test.php
2 $br = (php_sapi_name() == "cli")? "":"<br>";
4 if(!extension_loaded('bbcode')) {
5 dl('bbcode.' . PHP_SHLIB_SUFFIX
);
8 $functions = get_extension_funcs($module);
9 /*echo "Functions available in the test extension:$br\n";
10 foreach($functions as $func) {
14 $function = 'confirm_' . $module . '_compiled';
15 if (extension_loaded($module)) {
19 'type' => BBCODE
::TYPE_ROOT
,
20 'childs' => ['ul','url','img','b','i']
23 'type' => BBCODE
::TYPE_NOARG
24 //TODO: by default open tag = <KEY> and close tag = </KEY>
27 'type' => BBCODE
::TYPE_NOARG
30 'type' => BBCODE
::TYPE_NOARG
,
34 'type' => BBCODE
::TYPE_NOARG
,
36 'childs' => ['url','img','b','i']
39 'type' => BBCODE
::TYPE_OPTARG
,
40 'open_tag' => '<a href="{PARAM}">',
41 'close_tag' => '</a>',
42 'default_arg' => '{CONTENT}',
43 'parent' => [ '', 'li', 'b', 'i' ]
47 ':)' => '<img src="smiley.gif" alt=":)" />',
48 ':(' => '<img src="sad.gif" alt=":(" />',
49 ':D' => '<img src="happy.gif" alt=":D" />',
50 ':p' => '<img src="tong.gif" alt=":p" />',
51 ':|' => '<img src="special.gif" alt=":|" />',
52 ':6:' => '<img src="six.gif" alt=":6:" />'
60 'type' => BBCODE
::TYPE_ROOT
,
61 'childs' => ['ul','url','img','b','i']
64 'type' => BBCODE
::TYPE_NOARG
65 //TODO: by default open tag = <KEY> and close tag = </KEY>
68 'type' => BBCODE
::TYPE_NOARG
71 'type' => BBCODE
::TYPE_NOARG
,
75 'type' => BBCODE
::TYPE_NOARG
,
77 'childs' => ['url','img','b','i']
80 'type' => BBCODE
::TYPE_OPTARG
,
81 'open_tag' => '<a href="{PARAM}">',
82 'close_tag' => '</a>',
83 'default_arg' => '{CONTENT}',
84 'parent' => [ '', 'li', 'b', 'i' ]
88 ':)' => '<img src="smiley.gif" alt=":)" />',
89 ':(' => '<img src="sad.gif" alt=":(" />',
90 ':D' => '<img src="happy.gif" alt=":D" />',
91 ':p' => '<img src="tong.gif" alt=":p" />',
92 ':|' => '<img src="special.gif" alt=":|" />',
93 ':6:' => '<img src="six.gif" alt=":6:" />'
100 'type' => BBCODE
::TYPE_ROOT
,
101 'childs' => ['ul','url','img','b','i']
104 'type' => BBCODE
::TYPE_NOARG
105 //TODO: by default open tag = <KEY> and close tag = </KEY>
108 'type' => BBCODE
::TYPE_NOARG
111 'type' => BBCODE
::TYPE_NOARG
,
115 'type' => BBCODE
::TYPE_NOARG
,
117 'childs' => ['url','img','b','i']
120 'type' => BBCODE
::TYPE_OPTARG
,
121 'open_tag' => '<a href="{PARAM}">',
122 'close_tag' => '</a>',
123 'default_arg' => '{CONTENT}',
124 'parent' => [ '', 'li', 'b', 'i' ]
128 ':)' => '<img src="smiley.gif" alt=":)" />',
129 ':(' => '<img src="sad.gif" alt=":(" />',
130 ':D' => '<img src="happy.gif" alt=":D" />',
131 ':p' => '<img src="tong.gif" alt=":p" />',
132 ':|' => '<img src="special.gif" alt=":|" />',
133 ':6:' => '<img src="six.gif" alt=":6:" />'
140 #var_dump(clone $obj);
141 //var_dump(new $module(BBCode::TYPE_ARG, 'tutu'));
143 //$str = $function($module);
145 $str = "Module $module is not compiled into PHP";
152 'type'=>BBCODE_TYPE_NOARG,
153 'open_tag'=>'<b class="sub">',
155 'flags'=>BBCODE_FLAGS_REMOVE_IF_EMPTY
158 'type'=>BBCODE_TYPE_NOARG,
161 'flags'=>BBCODE_FLAGS_SMILEYS_OFF | BBCODE_FLAGS_REMOVE_IF_EMPTY | BBCODE_FLAGS_SMILEYS_OFF
164 'type'=>BBCODE_TYPE_NOARG,
167 'flags'=>BBCODE_FLAGS_REMOVE_IF_EMPTY