"Simple text typesetting by VB code"
Reason: 1.1. The 4 version does not have these, and the domestic more famous Ubb hack House adds a lot of UBB code (VB code) for the text typesetting.
Advantages: Only a few lines, can be achieved, very simple.
Cons: Because of the need to nest, so if the user is not well written, it will affect the style of other content of the post, even the whole topic.
Self-assessment: In fact, this is just more HTML code in the form of VB code to achieve, let people from another angle to learn how to do the Web text layout without learning HTML, but also for security.
Step: Open global.php, look for "
function Bbcodeparse2 ($bbcode, $forumid =0, $allowsmilie =1) {
"In the appropriate place before [code] and other hack, for example"
Perform a reference reply
$bbcode =eregi_replace ("quote\", "quote]", $bbcode); lowercase
$bbcode =str_replace ("Reference content rn", "
citation: ", $bbcode);
$bbcode =str_replace ("[quote]", "
Citation: ", $bbcode);
$bbcode =str_replace ("RN",
"", $bbcode);
$bbcode =str_replace ("[/quote]", "
", $bbcode);
", add in later"
Hack Color,font,size,style,center
$bbcode =eregi_replace ("\{0,1} (#[a-z0-9-]{6}) ["]{0,1}\] "," ", $bbcode); [Color=]
$bbcode =eregi_replace ("\[/color\", "" ", $bbcode); // ;
$bbcode =eregi_replace ("\{0,1} ([0-9]{1}) ["]{0,1}\] "," ", $bbcode); [Size=]
$bbcode =eregi_replace ("\[/size\", "" ", $bbcode); //
$bbcode =eregi_replace ("\[font=["]{0,1} ([^\[]*) ["]{0,1}\]", "", $bbcode);//[font=]
$bbcode =eregi_replace ("\[/font\", "" ", $bbcode); [/font]
$bbcode =eregi_replace ("\[style=["]{0,1} ([^\[]*) ["]{0,1}\]", " ", $bbcode); [Style=]
$bbcode =eregi_replace ("\[/style\]", "", $bbcode); [/style]
$bbcode =eregi_replace ("\[center\]", "
", $bbcode); [Center=]
$bbcode =eregi_replace ("\[/center\]", "
", $bbcode); [/center]
End Hack Color Size style
", complete.
Examples can be consulted:
"Ban JavaScript"
Cause: vbulletin does not have any special treatment for JavaScript scripts, so if the forum opens up HTML code, it could be attacked by alert or window.open.
Step: Open global.php, look for "
if ($dohtml ==0) {
Remove HTML code
$bbcode =str_replace ("&", "&", $bbcode);
$bbcode =str_replace ("<", "<", $bbcode);
$bbcode =str_replace (">", ">", $bbcode);
}
"Before the last curly brace, add"
} else {
$bbcode =eregi_replace ("< ([/]{0,1}script[^<]*) >", "<\1>", $bbcode);
", Finish!
"The copyright of this article is owned by the author and house Orso near net, if need to reprint, please specify the author and source"