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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
<?php
#############################################################
# VS-Gästebuch #
# Autor: Hans Reisenauer - http://www.virtualsystem.de #
# #
# Die Copyright Hinweise dürfen nicht entfernt #
# oder unkenntlich gemacht werden! #
# #
# Auf Kommerziellen Webseiten darf das Script nur mit einer #
# gültigen NC-Lizenz eingesetzt werden. #
# #
# This Script ist not free Software! #
# Please don't remove any (c) #
#############################################################
if(!defined('VSGB_SCRIPT_NAME')) { die ('Unzulässiger Scriptaufruf!'); }
#############################################################
# --> Smilies ersetzen ----------------------------------------------- #
$vsgb_smilies = array(
":smile:" => "<img src=\"".GB_SMILIES."/smile.gif\" border=\"0\" alt=\"Smile\">",
":cool:" => "<img src=\"".GB_SMILIES."/cool.gif\" border=\"0\" alt=\"cool\">",
":happy:" => "<img src=\"".GB_SMILIES."/happy.gif\" border=\"0\" alt=\"happy\">",
":fluut:" => "<img src=\"".GB_SMILIES."/fluut.gif\" border=\"0\" alt=\"fluut\">",
":grin:" => "<img src=\"".GB_SMILIES."/grin.gif\" border=\"0\" alt=\"grin\">",
":biggrin:" => "<img src=\"".GB_SMILIES."/biggrin.gif\" border=\"0\" alt=\"Bigggrin\">",
":cry:" => "<img src=\"".GB_SMILIES."/cry.gif\" border=\"0\" alt=\"cry\">",
":laugh:" => "<img src=\"".GB_SMILIES."/laugh.gif\" border=\"0\" alt=\"laugh\">",
":confused:" => "<img src=\"".GB_SMILIES."/confused.gif\" border=\"0\" alt=\"confused\">",
":razz:" => "<img src=\"".GB_SMILIES."/razz.gif\" border=\"0\" alt=\"razz\">",
":kiss:" => "<img src=\"".GB_SMILIES."/kiss.gif\" border=\"0\" alt=\"kiss\">",
":zzz:" => "<img src=\"".GB_SMILIES."/zzz.gif\" border=\"0\" alt=\"zzz\">",
":thumbsup:" => "<img src=\"".GB_SMILIES."/thumbsup.gif\" border=\"0\" alt=\"Thumbs-Up\">",
":yes:" => "<img src=\"".GB_SMILIES."/yes.gif\" border=\"0\" alt=\"yes\">",
":no:" => "<img src=\"".GB_SMILIES."/no.gif\" border=\"0\" alt=\"no\">",
":unsure:" => "<img src=\"".GB_SMILIES."/smile.gif\" border=\"0\" alt=\"Smile\">", # !!! #
":angel:" => "<img src=\"".GB_SMILIES."/smile.gif\" border=\"0\" alt=\"Smile\">", # !!! #
":redface:" => "<img src=\"".GB_SMILIES."/redface.gif\" border=\"0\" alt=\"Redface\">",
":blush:" => "<img src=\"".GB_SMILIES."/redface.gif\" border=\"0\" alt=\"Redface\">", # !!! #
":ermm:" => "<img src=\"".GB_SMILIES."/ermm.gif\" border=\"0\" alt=\"ermm\">",
":neutral:" => "<img src=\"".GB_SMILIES."/neutral.gif\" border=\"0\" alt=\"Neutral\">",
":huh:" => "<img src=\"".GB_SMILIES."/neutral.gif\" border=\"0\" alt=\"Neutral\">", # !!! #
":sad:" => "<img src=\"".GB_SMILIES."/sad.gif\" border=\"0\" alt=\"sad\">",
":alien:" => "<img src=\"".GB_SMILIES."/alien.gif\" border=\"0\" alt=\"alien\">",
":ohmy:" => "<img src=\"".GB_SMILIES."/ohmy.gif\" border=\"0\" alt=\"ohmy\">",
":wink:" => "<img src=\"".GB_SMILIES."/wink.gif\" border=\"0\" alt=\"wink\">",
":rolleyes:" => "<img src=\"".GB_SMILIES."/rolleyes.gif\" border=\"0\" alt=\"rolleyes\">",
":love:" => "<img src=\"".GB_SMILIES."/love.gif\" border=\"0\" alt=\"love\">",
":wacko:" => "<img src=\"".GB_SMILIES."/smile.gif\" border=\"0\" alt=\"wacko\">",
":teehee:" => "<img src=\"".GB_SMILIES."/teehee.gif\" border=\"0\" alt=\"teehee\">",
":angry:" => "<img src=\"".GB_SMILIES."/angry.gif\" border=\"0\" alt=\"angry\">",
":idea:" => "<img src=\"".GB_SMILIES."/idea.gif\" border=\"0\" alt=\"Idea\">",
":question:" => "<img src=\"".GB_SMILIES."/question.gif\" border=\"0\" alt=\"Question\">",
":exclaim:" => "<img src=\"".GB_SMILIES."/exclaim.gif\" border=\"0\" alt=\"Exclaim\">"
);
foreach($vsgb_smilies as $key => $value)
{
$u_inhalt = str_replace($key, $value, $u_inhalt);
$GBShow['adm_comment'] = str_replace($key, $value, $GBShow['adm_comment']);
}
# --> BBCode Formatierungen Umwandlung -------------------------- #
$GB_BB_Vars = array('#\[URL=(.*)\ (.*)\](.*)\[/URL\]#Uis',
'#\[URL\](.*)\ (.*)\[/URL\]#Uis',
'#\[B](.*?)\[/B\]#',
'#\[I](.*?)\[/I\]#',
'#\[U](.*?)\[/U\]#',
'#\[S](.*?)\[/S\]#',
'#\[IMG]([a-z]+?://){1}(.*?)\[/IMG]#',
'#\[IMG](.*?)\[/IMG\]#',
'#\[IMGL](.*?)\[/IMGL\]#',
'#\[IMGR](.*?)\[/IMGR\]#'
);
$replace = array('<a href="\1" target="\2">\3</a>',
'<a href="\1" target="\2">\1</a>',
'<b>\1</b>',
'<i>\1</i>',
'<u>\1</u>',
'<strike>\1</strike>',
'<img src="\1\2" alt="">',
'<img src="\1\2" align="center" alt="">',
'<img src="\1\2" align="left" alt="">',
'<img src="\1\2" align="right" alt="">'
);
$u_inhalt = preg_replace($GB_BB_Vars, $replace, $u_inhalt);
$GBShow['adm_comment'] = preg_replace($GB_BB_Vars, $replace, $GBShow['adm_comment']);
# --> Replace Fontcolor
$u_inhalt = preg_replace("/\[COLOR=(.*?)\](.*?)\[\/COLOR\]/", "<span style=\"color:\\1\">\\2</span>", $u_inhalt);
$u_inhalt = str_replace("[BR]", "<br>", $u_inhalt);
$GBShow['adm_comment'] = str_replace("[BR]", "<br>", $GBShow['adm_comment']);
$GBShow['adm_comment'] = preg_replace("/\[COLOR=(.*?)\](.*?)\[\/COLOR\]/", "<span style=\"color:\\1\">\\2</span>", $GBShow['adm_comment']);
?>
|