VBulletinHACK-read vBulletinHACK about two HACK about typographical. the reason for "simple text layout implemented by vB code" is that this is not found in version 1.1.4, the famous UBBHACK home in China has added a lot of UBB code (vB code) for text formatting ). Advantage: only a few lines are required. "> <L
Simple text layout implemented with vB code
Cause: this is not available in version 1.1.4, and the famous ubb hack home in China adds a lot of UBB code (vB code) for text layout ).
Advantage: only a few lines are required.
Disadvantage: nesting is required, so if the user does not write well, it will affect the style of other content in the post, and even affect the entire topic.
Self-evaluation: in fact, this is only to implement more HTML code in the form of vB code, in order to let people learn how to typeset Web text from another perspective, instead of learning HTML, for security.
Step: Open global. php and find"
Function bbcodeparse2 ($ bbcode, $ forumid = 0, $ allowsmilie = 1 ){
", The proper location before [code] and other HACK, such as"
// Execute reference Reply
$ Bbcode = eregi_replace ("quote \]", "quote]", $ bbcode); // lowercase
$ Bbcode = str_replace ("[quote] rn ","
Reference: ", $ Bbcode );
$ Bbcode = str_replace ("[quote]","
Reference: ", $ Bbcode );
$ Bbcode = str_replace ("[/quote] rn ","
", $ Bbcode );
$ Bbcode = str_replace ("[/quote]","
", $ Bbcode );
", Add"
// Hack color, font, size, style, center
$ Bbcode = eregi_replace ("\ [color = ["] {0, 1} (# [a-z0-9-] {6}) ["] {0, 1} \]", "", $ bbcode); // [color =]
$ Bbcode = eregi_replace ("\ [/color \]", "", $ bbcode); // [/color];
$ Bbcode = eregi_replace ("\ [size = ["] {0, 1} ([0-9] {1}) ["] {0, 1} \]", "", $ bbcode); // [size =]
$ Bbcode = eregi_replace ("\ [/size \]", "", $ bbcode); // [/size]
$ 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
.
Examples can be referred:
Prohibit JavaScript
Cause: vBulletin does not take any special treatment on Javascript scripts. Therefore, if HTML code is opened on the forum, it may be attacked by alert or window. open.
Step: Open global. php and find"
If ($ dohtml = 0 ){
// Delete HTML code
$ Bbcode = str_replace ("&", "&", $ bbcode );
$ Bbcode = str_replace ("<", "<", $ bbcode );
$ Bbcode = str_replace (">", ">", $ bbcode );
}
", Before the last curly braces, add"
} Else {
$ Bbcode = eregi_replace ("<([/] {0, 1} script [^ <] *)>", "<\ 1>", $ bbcode );
", Complete!
[This article is copyrighted by the author and osuo. if you need to reprint it, please indicate the author and its source]