Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[补丁] 参照OY老大代码按钮写的加入背景图片插件代码按钮

[复制链接]
秋舞叶 发表于 2005-9-27 15:09:20 | 显示全部楼层 |阅读模式
首先感谢oytktk (靖飒) 帮我做了那个图文混排的代码按钮,没有他的示例,我也做不出下面的补丁,谢谢他。。。

首先安装图片背景插件
原帖:https://discuz.dismall.com/viewthread.php?tid=165126&fpage=1&highlight=%B1%B3%BE%B0###

附件图片上传至IMAGES目录中各模板目录下

post_bbinsert.htm
        
查找:

  1. <a href="javascript:quote()"><img src="{IMGDIR}/bb_quote.gif" border="0" alt="{lang post_discuzcode_quote}"></a>
复制代码


上面加:(这是后台启用标准DZ代码就可以显示的,如果要全部代码才可显示搜索上面的,加到第2前面)

  1. <a href="javascript:bgimgs()"><img src="{IMGDIR}/bb_bgimg.gif" border="0" alt="{lang post_discuzcode_bgimgs}"></a>
复制代码


查找:

  1. var image_normal = "{lang post_discuzcode_image_normal}";
复制代码


下面加:(这里也是后台启用标准DZ代码就可以显示的,如果要全部代码才可显示搜索上面的,加到第2前面)


  1. var bgimgs_help = "{lang post_discuzcode_bgimgs_help}";
  2. var bgimgs_input1 = "{lang post_discuzcode_bgimgs_input1}";
  3. var bgimgs_input2 = "{lang post_discuzcode_bgimgs_input2}";
复制代码


include/bbcode.js


文章最后加上:


  1. function bgimgs() {
  2.         if (helpmode) {
  3.                 alert(bgimgs_help);
  4.         } else if (getSelectedText()) {
  5.                 var        range =        document.selection.createRange();
  6.                 range.text = "[sig=1]" + range.text +        "[/sig]";
  7.         } else if (advmode)        {
  8.                 AddTxt="[sig=1] [/sig]";
  9.                 AddText(AddTxt);
  10.         } else {
  11.                 txt2=prompt(bgimgs_input1,"");
  12.                 if (txt2!=null)        {
  13.                         txt=prompt(bgimgs_input2,"1");          
  14.                         if (txt!=null) {
  15.                                 if (txt2=="") {
  16.                                         AddTxt="[sig="+txt+"]";
  17.                                         AddText(AddTxt);
  18.                                         AddText("[/sig]");
  19.                                 } else {
  20.                                         AddTxt="[sig="+txt+"]"+txt2;
  21.                                         AddText(AddTxt);
  22.                                         AddText("[/sig]");
  23.                                 }                  
  24.                         }
  25.                 }
  26.         }
  27. }
复制代码


templates.lang.php

查找:

  1. 'post_discuzcode_list_normal_input' => '请输入列表项目内容,如果留空表示项目结束。',
复制代码


下面加:

  1. 'post_discuzcode_bgimgs' => '插入背景图片',
  2. 'post_discuzcode_bgimgs_help' => '插入一个背景图片用做文字背景,文字显示在上面',
  3. 'post_discuzcode_bgimgs_input1' => '请输入加入背景图片中要显示的文字:',
  4. 'post_discuzcode_bgimgs_input2' => '请输入加入背景图片的序列号码(1-n 选择):',
复制代码


完成!!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
yhome 发表于 2005-9-27 15:20:01 | 显示全部楼层
哈哈哈哈,我的沙发
回复

使用道具 举报

oytktk 发表于 2005-9-27 15:24:04 | 显示全部楼层
哇噻.......楼主太棒了~
回复

使用道具 举报

 楼主| 秋舞叶 发表于 2005-9-27 15:31:46 | 显示全部楼层
原帖由 oytktk 于 2005-9-27 15:24 发表
哇噻.......楼主太棒了~

回复

使用道具 举报

Pteranodon 发表于 2005-9-27 15:33:09 | 显示全部楼层
原帖由 oytktk 于 2005-9-27 15:24 发表
哇噻.......楼主太棒了~

您這不等於讚自己嗎
回复

使用道具 举报

beecheung 发表于 2005-9-27 16:03:44 | 显示全部楼层
原帖由 Pteranodon 于 2005-9-27 15:33 发表

您這不等於讚自己嗎

回复

使用道具 举报

爱雨冷雪 发表于 2005-9-27 17:33:06 | 显示全部楼层
这个好..嘻嘻..
回复

使用道具 举报

爱雨冷雪 发表于 2005-9-27 18:01:31 | 显示全部楼层
嘻,加上这个了,,谢谢
回复

使用道具 举报

Pteranodon 发表于 2005-9-27 18:28:44 | 显示全部楼层
原帖由 beecheung 于 2005-9-27 16:03 发表


嘿嘿, 我沒說錯吧?
回复

使用道具 举报

jimmyjimmyqqq 发表于 2005-9-27 18:58:53 | 显示全部楼层
樓主太強了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-4-30 18:17 , Processed in 0.113804 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表