vbulletin vbulletin HACK----two HACK on typography

Source: Internet
Author: User
Tags bbcode vbulletin
"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 ("[Quote]rn", "
citation: ", $bbcode);
$bbcode =str_replace ("[quote]", "
Citation: ", $bbcode);
$bbcode =str_replace ("[/quote]rn",
"" ", $bbcode);
$bbcode =str_replace ("[/quote]", "
", $bbcode);
", add in later"
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 ("\[f face=" \1 ">", $bbcode);//[F]
$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"

The above describes the VBulletin vBulletin HACK----about the layout of two HACK, including the content of the vBulletin, I hope to be interested in PHP tutorial friends helpful.

  • 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.