forked from kaimallea/php-bbcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests.php
71 lines (43 loc) · 1.18 KB
/
tests.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
require "bbcode.php";
$text=<<<EOF
[b]This is bold text[/b]
[i]This is italic text[/i]
[code]This is pre-formatted text[/code]
[quote]This is a quote[/quote]
[quote="Obama"]This is a quote by a specific person[/quote]
[size=30]This text's size is set at 30%[/size]
[s]This text has a strikethrough[/s]
[u]This text is underlined.[/u]
[center]This text is centered[/center]
[color=red]This is red text[/color]
[email]someone@somewhere.com[/email]
[email=someone@somewhere.com]An e-mail link[/email]
[url]http://www.google.com/[/url]
[url=http://www.google.com/]Google.com yo![/url]
[img]http://i.imgur.com/WqYEO.jpg[/img]
An image as a link:
[url=http://en.wikipedia.org/wiki/Ninja][img]http://i.imgur.com/8d7Yu.jpg[/img][/url]
This is an unordered list:
[list]
[*]list item #1
[*]list item #2
[*][b]bold list item #3[/b]
[/list]
This is an ordered (numbered) list:
[list=1]
[*]list item #1
[*]list item #2
[*][b]bold list item #3[/b]
[/list]
This is an ordered (alpha) list:
[list=a]
[*]list item #1
[*]list item #2
[*][b]bold list item #3[/b]
[/list]
[youtube]http://www.youtube.com/watch?v=DabwEqsWWiA[/youtube]
EOF;
$bbcode = new BBCode;
echo $bbcode->toHTML($text);
?>