⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ubb2.java

📁 struts spring hibernate制作的留言本
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
    public final String reShadow(final String sourceIn) {
        String source = sourceIn;
        Matcher shadowMatcher = shadowPattern.matcher(source);
        boolean result = shadowMatcher.find();

        String group2 = null;
        String group4 = null;
        String group6 = null;
        String group8 = null;

        if (result) {
            group2 = shadowMatcher.group(2);
            group4 = shadowMatcher.group(4);
            group6 = shadowMatcher.group(6);
            group8 = shadowMatcher.group(8);
        }

        while (result) {
            source = replace(source,
                    "[shadow=" + group2 + "," + group4 + "," + group6
                    + "]" + group8 + "[/shadow]",
                    "<table width=\"" + group2
                    + "\" style=\"filter:shadow(color=" + group4
                    + ", direction=" + group6 + ")\">" + group8
                    + "</table>");
            result = shadowMatcher.find();
        }

        return source;
    }

    /**
     * 替换[glow]标签.
     * @since 2005-12-30 12:15
     * @author Lingo
     * @param sourceIn 输入
     * @return String 输出
     */
    public final String reGlow(final String sourceIn) {
        String source = sourceIn;
        Matcher glowMatcher = glowPattern.matcher(source);
        boolean result = glowMatcher.find();

        String group2 = null;
        String group4 = null;
        String group6 = null;
        String group8 = null;

        if (result) {
            group2 = glowMatcher.group(2);
            group4 = glowMatcher.group(4);
            group6 = glowMatcher.group(6);
            group8 = glowMatcher.group(8);
        }

        while (result) {
            source = replace(source,
                    "[glow=" + group2 + "," + group4 + "," + group6 + "]"
                    + group8 + "[/glow]",
                    "<table width=\"" + group2
                    + "\" style=\"filter:glow(color=" + group4
                    + ", strength=" + group6 + ")\">" + group8
                    + "</table>");
            result = glowMatcher.find();
        }

        return source;
    }

    /**
     * 替换[blur]标签.
     * @since 2005-12-30 12:24
     * @author Lingo
     * @param sourceIn 输入
     * @return String 输出
     */
    public final String reBlur(final String sourceIn) {
        String source = sourceIn;
        Matcher blurMatcher = blurPattern.matcher(source);
        boolean result = blurMatcher.find();

        String group2 = null;
        String group4 = null;
        String group6 = null;
        String group8 = null;

        if (result) {
            group2 = blurMatcher.group(2);
            group4 = blurMatcher.group(4);
            group6 = blurMatcher.group(6);
            group8 = blurMatcher.group(8);
        }

        while (result) {
            source = replace(source,
                    "[blur=" + group2 + "," + group4 + "," + group6 + "]"
                    + group8 + "[/blur]",
                    "<table width=\"" + group2
                    + "\" style=\"filter:blur(Add=0,direction=" + group4
                    + ", strength=" + group6 + ")\">" + group8
                    + "</table>");
            result = blurMatcher.find();
        }

        return source;
    }

    /**
     * 替换[quote]标签.
     * @since 2005-12-30 11:48
     * @author Lingo
     * @param sourceIn 输入
     * @return String 输出
     */
    public final String reQuote(final String sourceIn) {
        String source = sourceIn;
        Matcher quoteMatcher = quotePattern.matcher(source);
        boolean resquotet = quoteMatcher.find();

        String group2 = null;

        if (resquotet) {
            group2 = quoteMatcher.group(2);
        }

        while (resquotet) {
            source = replace(source, "[quote]" + group2 + "[/quote]",
                    "<hr noshade size=\"1\"><blockquote>" + group2
                    + "</blockquote><hr noshade size=\"1\">");
            resquotet = quoteMatcher.find();
        }

        return source;
    }

    /**
     * 替换[code]标签.
     * @since 2005-12-30 11:48
     * @author Lingo
     * @param sourceIn 输入
     * @return String 输出
     */
    public final String reCode(final String sourceIn) {
        String source = sourceIn;
        Matcher codeMatcher = codePattern.matcher(source);
        boolean rescodet = codeMatcher.find();

        String group2 = null;

        if (rescodet) {
            group2 = codeMatcher.group(2);
        }

        while (rescodet) {
            source = replace(source, "[code]" + group2 + "[/code]",
                    "<table bgcolor=\"black\"><tr><td><font color=white>"
                    + group2 + "</font></td></tr></table>");
            rescodet = codeMatcher.find();
        }

        return source;
    }

    /**
     * 替换[size=]标签.
     * size只能是1到9,否则无法解析
     * @since 2005-12-30 12:52
     * @author Lingo
     * @param sourceIn 输入
     * @return String 输出
     */
    public final String reTxtSize(final String sourceIn) {
        String source = sourceIn;
        Matcher txtSizeMatcher = txtSizePattern.matcher(source);
        boolean result = txtSizeMatcher.find();

        String group2 = null;
        String group4 = null;

        if (result) {
            group2 = txtSizeMatcher.group(2);
            group4 = txtSizeMatcher.group(4);
        }

        while (result) {
            source = replace(source,
                    "[size=" + group2 + "]" + group4 + "[/size]",
                    "<font size=\"" + group2 + "\">" + group4 + "</font>");
            result = txtSizeMatcher.find();
        }

        return source;
    }

    /**
     * 替换[swf=]标签.
     * @since 2005-12-30 13:11
     * @author Lingo
     * @param sourceIn 输入
     * @return String 输出
     */
    public final String reSwf(final String sourceIn) {
        String source = sourceIn;
        Matcher swfMatcher = swfPattern.matcher(source);
        boolean result = swfMatcher.find();

        String group2 = null;
        String group4 = null;
        String group6 = null;

        if (result) {
            group2 = swfMatcher.group(2);
            group4 = swfMatcher.group(4);
            group6 = swfMatcher.group(6);
        }

        while (result) {
            source = replace(source,
                    "[swf=" + group2 + "," + group4 + "]" + group6
                    + "[/swf]",
                    "<a href=\"" + group6
                    + "\" target=\"_blank\" title=\"全屏播放\">全屏播放</a><br>"
                    + "<OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/"
                    + "swflash.cab#version=4,0,2,0 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width="
                    + group2 + " height=" + group4
                    + "><PARAM NAME=movie VALUE=\"" + group6
                    + "\"><PARAM NAME=quality VALUE=high><embed src=\""
                    + group6
                    + "\" quality=high pluginspage='<img align=absmiddle src=pic/url.gif border=0>"
                    + "<a target=_blank href=http://www.macromedia.com/shockwave/download/"
                    + "index.cgi?P1_Prod_Version=ShockwaveFlash'>"
                    + "http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version="
                    + "ShockwaveFlash'</a> type='application/x-shockwave-flash' width="
                    + group2 + " height=" + group4
                    + ">http://</embed></OBJECT>");
            result = swfMatcher.find();
        }

        return source;
    }

    /**
     * 替换[sk=]标签.
     * @since 2005-12-30 14:05
     * @author Lingo
     * @param sourceIn 输入
     * @return String 输出
     */
    public final String reSk(final String sourceIn) {
        String source = sourceIn;
        Matcher skMatcher = skPattern.matcher(source);
        boolean result = skMatcher.find();

        String group2 = null;
        String group4 = null;
        String group6 = null;

        if (result) {
            group2 = skMatcher.group(2);
            group4 = skMatcher.group(4);
            group6 = skMatcher.group(6);
        }

        while (result) {
            source = replace(source,
                    "[sk=" + group2 + "," + group4 + "]" + group6
                    + "[/sk]",
                    "<object classid=clsid:166B1BCA-3F9C-11CF-8075-444553540000 "
                    + "codebase=http://download.macromedia.com/pub/shockwave/cabs/director/"
                    + "sw.cab#version=7,0,2,0 width=" + group2
                    + " height=" + group4 + "><param name=src value="
                    + group6
                    + "><embed src=\\3 pluginspage=http://www.macromedia.com/shockwave/download/ width="
                    + group2 + " height=" + group4 + "></embed></object>");
            result = skMatcher.find();
        }

        return source;
    }

    /**
     * 替换[rm=]标签.
     * @since 2005-12-30 14:17
     * @author Lingo
     * @param sourceIn 输入
     * @return String 输出
     */
    public final String reRm(final String sourceIn) {
        String source = sourceIn;
        Matcher rmMatcher = rmPattern.matcher(source);
        boolean result = rmMatcher.find();

        String group2 = null;
        String group4 = null;
        String group6 = null;

        if (result) {
            group2 = rmMatcher.group(2);
            group4 = rmMatcher.group(4);
            group6 = rmMatcher.group(6);
        }

        while (result) {
            source = replace(source,
                    "[rm=" + group2 + "," + group4 + "]" + group6
                    + "[/rm]",
                    "<OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA class=OBJECT id=RAOCX width="
                    + group2 + " height=" + group4
                    + "><PARAM NAME=SRC VALUE=" + group6
                    + "><PARAM NAME=CONSOLE VALUE=Clip1><PARAM NAME=CONTROLS VALUE=imagewindow>"
                    + "<PARAM NAME=AUTOSTART VALUE=true></OBJECT><br>"
                    + "<OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA id=video2 width="
                    + group2 + " height=" + group4
                    + "><PARAM NAME=SRC VALUE=" + group6
                    + "><PARAM NAME=AUTOSTART VALUE=-1><PARAM NAME=CONTROLS VALUE=controlpanel>"
                    + "<PARAM NAME=CONSOLE VALUE=Clip1></OBJECT>");
            result = rmMatcher.find();
        }

        return source;
    }

    /**
     * 替换[mp=]标签.
     * @since 2005-12-30 18:31
     * @author Lingo
     * @param sourceIn 输入
     * @return String 输出
     */
    public final String reMp(final String sourceIn) {
        String source = sourceIn;
        Matcher mpMatcher = mpPattern.matcher(source);
        boolean result = mpMatcher.find();

        String group2 = null;
        String group4 = null;
        String group6 = null;

        if (result) {
            group2 = mpMatcher.group(2);
            group4 = mpMatcher.group(4);
            group6 = mpMatcher.group(6);
        }

        while (result) {
            source = replace(source,
                    "[mp=" + group2 + "," + group4 + "]" + group6
                    + "[/mp]",
                    "<object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 "
                    + "class=OBJECT id=MediaPlayer width=" + group2
                    + " height=" + group4
                    + " ><param name=ShowStatusBar value=-1><param name=Filename value="
                    + group6
                    + "><embed type=application/x-oleobject codebase=http://activex.microsoft.com/"
                    + "activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp src="
                    + group6 + " width=" + group2 + " height=" + group4
                    + "></embed></object>");
            result = mpMatcher.find();
        }

        return source;
    }

    /**
     * 替换[qt=]标签.
     * @since 2005-12-30 19:03
     * @author Lingo
     * @param sourceIn 输入
     * @return String 输出
     */
    public final String reQt(final String sourceIn) {
        String source = sourceIn;
        Matcher qtMatcher = qtPattern.matcher(source);
        boolean result = qtMatcher.find();

        String group2 = null;
        String group4 = null;
        String group6 = null;

        if (result) {
            group2 = qtMatcher.group(2);
            group4 = qtMatcher.group(4);
            group6 = qtMatcher.group(6);
        }

        while (result) {
            source = replace(source,
                    "[qt=" + group2 + "," + group4 + "]" + group6
                    + "[/qt]",
                    "<embed src=" + group6 + " width=" + group2
                    + " height=" + group4
                    + " autoplay=true loop=false controller=true playeveryframe=false cache=false "
                    + "scale=TOFIT bgcolor=#000000 kioskmode=false targetcache=false "
                    + "pluginspage=http://www.apple.com/quicktime/>");
            result = qtMatcher.find();
        }

        return source;
    }

    /**
     * 替换[sound=]标签.
     * @since 2005-12-30 19:18
     * @author Lingo
     * @param sourceIn 输入
     * @return String 输出
     */
    public final String reSound(final String sourceIn) {
        String source = sourceIn;
        Matcher soundMatcher = soundPattern.matcher(source);
        boolean result = soundMatcher.find();

        String group2 = null;

        if (result) {
            group2 = soundMatcher.group(2);
        }

        while (result) {
            source = replace(source, "[sound]" + group2 + "[/sound]",
                    "<EMBED SRC=" + group2
                    + " HIDDEN=TRUE AUTOSTART=TRUE LOOP=TRUE>");
            result = soundMatcher.find();
        }

        return source;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -