我开发的:
≮完美竞猜≯ FOR DZ5.X (DZ5.0 DZ5.5 RECOMMENDED) FINAL
其实图文混排很简单!~~~ 对现有图文混排的增强
看很多人要,就提供了
1. 后台添加box代码
box
<div class="box" style="background-color: {1}">{2}</div>
[box=文字底色]文字内容[/box]
文字底色
2
1
文字底色 文字内容
2. 修改CSS.htm
最后加入- /* 文字底色 By Ray @ Btimes.org */
- .box {
- margin:5px;
- padding:2px 5px;
- border:{BORDERCOLOR} dashed 1px;
- }
- /* 文字底色 By Ray @ Btimes.org */
复制代码 3. 修改post_bbinsert.htm
找- <td id="{$editorid}_popup_forecolor" title="{lang post_discuzcode_forecolor}" onclick="editorMenu(this)"><div class="editor_buttonnormal" onMouseOver="menuContext(this, 'mouseover')" onMouseOut="menuContext(this, 'mouseout')">
- <table cellpadding="0" cellspacing="0" border="0" unselectable="on">
- <tr>
- <td class="editor_colormenunormal" unselectable="on" id="{$editorid}_colormenu"><img src="images/common/bb_color.gif" width="21" height="16" alt="{lang post_discuzcode_forecolor}"><br><img src="images/common/bb_clear.gif" id="{$editorid}_color_bar" style="background-color:black" width="21" height="4"></td>
- <td unselectable="on"><img src="images/common/bb_menupop.gif" width="7" height="4"></td>
- </tr>
- </table>
- </div></td>
- <td><img src="images/common/bb_separator.gif" width="6" height="20"></td>
复制代码 下增加- <!--文字底色 By Ray @ Btimes.org-->
- <td id="{$editorid}_popup_boxcolor" title="文字底色" onclick="editorMenu(this)"><div class="editor_buttonnormal" onMouseOver="menuContext(this, 'mouseover')" onMouseOut="menuContext(this, 'mouseout')">
- <table cellpadding="0" cellspacing="0" border="0" unselectable="on">
- <tr>
- <td class="editor_colormenunormal" unselectable="on" id="{$editorid}_boxcolor"><img src="images/common/bb_color.gif" width="21" height="16" alt="文字底色"><br><img src="images/common/bb_clear.gif" id="{$editorid}_color_bar" style="background-color:black" width="21" height="4"></td>
- <td unselectable="on"><img src="images/common/bb_menupop.gif" width="7" height="4"></td>
- </tr>
- </table>
- </div></td>
- <td><img src="images/common/bb_separator.gif" width="6" height="20"></td>
- <!--/文字底色 By Ray @ Btimes.org-->
复制代码 再找- <div class="popupmenu_popup" id="{$editorid}_popup_forecolor_menu" style="display: none">
- <table cellpadding="4" cellspacing="0" border="0" unselectable="on"><tr>
- <!--{loop $coloroptions $key $colorname}-->
- <td class="editor_colornormal" onClick="discuzcode('forecolor', '$colorname')" unselectable="on" onMouseOver="colorContext(this, 'mouseover')" onMouseOut="colorContext(this, 'mouseout')"><div style="background-color: $colorname" unselectable="on"></div></td><!--{if ($key + 1) % 8 == 0}--></tr><tr><!--{/if}-->
- <!--{/loop}-->
- </tr></table></div>
复制代码 下增加- <!--/文字底色 By Ray @ Btimes.org-->
- <div class="popupmenu_popup" id="{$editorid}_popup_boxcolor_menu" style="display: none">
- <table cellpadding="4" cellspacing="0" border="0" unselectable="on"><tr>
- <!--{loop $coloroptions $key $colorname}-->
- <td class="editor_colornormal" onClick="discuzcode('boxcolor', '$colorname')" unselectable="on" onMouseOver="colorContext(this, 'mouseover')" onMouseOut="colorContext(this, 'mouseout')"><div style="background-color: $colorname" unselectable="on"></div></td><!--{if ($key + 1) % 8 == 0}--></tr><tr><!--{/if}-->
- <!--{/loop}-->
- </tr></table>
- </div>
- <!--/文字底色 By Ray @ Btimes.org-->
复制代码 4. 修改 include/javascript/editor.js
找- case 'forecolor':
- wrapTags('color', argument);
- break;
复制代码 下增加- //-- 文字底色 By Ray @ Btimes.org --
- case 'boxcolor':
- wrapTags('box', argument);
- break;
- //-- 文字底色 By Ray @ Btimes.org --
复制代码 完成, 记得更新Css缓存
[ 本帖最后由 阿Ray 于 2007-4-6 14:39 编辑 ] |