VBulletinHACK ---- two HACK about typographical layout

Source: Internet
Author: User
Tags bbcode
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]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.