]>
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:" />'
59 'type' => BBCODE
::TYPE_ROOT
,
60 'childs' => ['ul','url','img','b','i']
63 'type' => BBCODE
::TYPE_NOARG
64 //TODO: by default open tag = <KEY> and close tag = </KEY>
67 'type' => BBCODE
::TYPE_NOARG
70 'type' => BBCODE
::TYPE_NOARG
,
74 'type' => BBCODE
::TYPE_NOARG
,
76 'childs' => ['url','img','b','i']
79 'type' => BBCODE
::TYPE_OPTARG
,
80 'open_tag' => '<a href="{PARAM}">',
81 'close_tag' => '</a>',
82 'default_arg' => '{CONTENT}',
83 'parent' => [ '', 'li', 'b', 'i' ]
87 ':)' => '<img src="smiley.gif" alt=":)" />',
88 ':(' => '<img src="sad.gif" alt=":(" />',
89 ':D' => '<img src="happy.gif" alt=":D" />',
90 ':p' => '<img src="tong.gif" alt=":p" />',
91 ':|' => '<img src="special.gif" alt=":|" />',
92 ':6:' => '<img src="six.gif" alt=":6:" />'
99 'type' => BBCODE
::TYPE_ROOT
,
100 'childs' => ['ul','url','img','b','i']
103 'type' => BBCODE
::TYPE_NOARG
104 //TODO: by default open tag = <KEY> and close tag = </KEY>
107 'type' => BBCODE
::TYPE_NOARG
110 'type' => BBCODE
::TYPE_NOARG
,
114 'type' => BBCODE
::TYPE_NOARG
,
116 'childs' => ['url','img','b','i']
119 'type' => BBCODE
::TYPE_OPTARG
,
120 'open_tag' => '<a href="{PARAM}">',
121 'close_tag' => '</a>',
122 'default_arg' => '{CONTENT}',
123 'parent' => [ '', 'li', 'b', 'i' ]
127 ':)' => '<img src="smiley.gif" alt=":)" />',
128 ':(' => '<img src="sad.gif" alt=":(" />',
129 ':D' => '<img src="happy.gif" alt=":D" />',
130 ':p' => '<img src="tong.gif" alt=":p" />',
131 ':|' => '<img src="special.gif" alt=":|" />',
132 ':6:' => '<img src="six.gif" alt=":6:" />'
138 var_dump($obj2 = clone $obj);
139 var_dump($obj3 = clone $obj);
140 var_dump($obj4 = clone $obj);
141 var_dump($obj5 = clone $obj);
142 var_dump($obj6 = clone $obj);
143 var_dump($obj2 = clone $obj);
144 //var_dump(new $module(BBCode::TYPE_ARG, 'tutu'));
146 //$str = $function($module);
148 $str = "Module $module is not compiled into PHP";
155 'type'=>BBCODE_TYPE_NOARG,
156 'open_tag'=>'<b class="sub">',
158 'flags'=>BBCODE_FLAGS_REMOVE_IF_EMPTY
161 'type'=>BBCODE_TYPE_NOARG,
164 'flags'=>BBCODE_FLAGS_SMILEYS_OFF | BBCODE_FLAGS_REMOVE_IF_EMPTY | BBCODE_FLAGS_SMILEYS_OFF
167 'type'=>BBCODE_TYPE_NOARG,
170 'flags'=>BBCODE_FLAGS_REMOVE_IF_EMPTY