edit edit_toolbar_standard and edit_toolbar_wysiwyg
then edit bbcode so on
一、编辑_boolbar_standard模板edit
查找:
<td><div class="imagebutton"><a href="#" οnclick="namedlink('EMAIL')"><img src="$stylevar[imgdir_editor]/email.gif" alt="$vbphrase[insert_email_link]" width="21" height="20" border="0" /></a></div></td>
在下面加:
<td><div class="imagebutton"><a href="#" οnclick="namedlink('MONEY')"><img src="$stylevar[imgdir_editor]/money.gif" alt="$vbphrase[insert_money]" width="21" height="20" border="0" /></a></div></td>
查找:
<if condition="$show['html_bbcode']">
<td><div class="imagebutton"><a href="#" οnclick="return vbcode('HTML', '')"><img src="$stylevar[imgdir_editor]/html.gif" alt="$vbphrase[wrap_html_tags]" width="21" height="20" border="0" /></a></div></td>
</if>
在下面加:
<td><div class="imagebutton"><a href="#" οnclick="return vbcode('HIDE', '')"><img src="$stylevar[imgdir_editor]/hide.gif" alt="$vbphrase[wrap_hide_tags]" width="21" height="20" border="0" /></a></div></td>
查找:
<if condition="$show['php_bbcode']">
<td><div class="imagebutton"><a href="#" οnclick="return vbcode('PHP', '')"><img src="$stylevar[imgdir_editor]/php.gif" alt="$vbphrase[wrap_php_tags]" width="21" height="20" border="0" /></a></div></td>
</if>
在下在加:
<td><div class="imagebutton"><a href="#" οnclick="return vbcode('WMA', '')"><img src="$stylevar[imgdir_editor]/wma.gif" alt="$vbphrase[wrap_wma_tags]" width="21" height="20" border="0" /></a></div></td>
<td><div class="imagebutton"><a href="#" οnclick="return vbcode('RA', '')"><img src="$stylevar[imgdir_editor]/ra.gif" alt="$vbphrase[wrap_ra_tags]" width="21" height="20" border="0" /></a></div></td>
<td><div class="imagebutton"><a href="#" οnclick="return vbcode('MP3', '')"><img src="$stylevar[imgdir_editor]/mp3.gif" alt="$vbphrase[wrap_mp3_tags]" width="21" height="20" border="0" /></a></div></td>
<td><div class="imagebutton"><a href="#" οnclick="return vbcode('SWF', '')"><img src="$stylevar[imgdir_editor]/swf.gif" alt="$vbphrase[wrap_swf_tags]" width="21" height="20" border="0" /></a></div></td>
二、修改edit_toolbar_wysiwyg模板
查找:
<if condition="$show['url_bbcode']">
<td><div class="imagebutton" id="cmd_createlink"><img src="$stylevar[imgdir_editor]/createlink.gif" alt="$vbphrase[insert_link]" width="21" height="20" /></div></td>
<td><div class="imagebutton" id="cmd_unlink"><img src="$stylevar[imgdir_editor]/unlink.gif" alt="$vbphrase[remove_link]" width="21" height="20" /></div></td>
<td><div class="imagebutton" id="cmd_wrap1_email"><img src="$stylevar[imgdir_editor]/email.gif" alt="$vbphrase[insert_email_link]" width="21" height="20" /></div></td>
</if>
在下面加:
<td><div class="imagebutton" id="cmd_wrap1_money"><img src="$stylevar[imgdir_editor]/money.gif" alt="$vbphrase[insert_money]" width="21" height="20" /></div></td>
查找:
<if condition="$show['html_bbcode']">
<td><div class="imagebutton" id="cmd_wrap0_html"><img src="$stylevar[imgdir_editor]/html.gif" alt="$vbphrase[wrap_html_tags]" width="21" height="20" /></div></td>
</if>
在下面加:
<td><div class="imagebutton" id="cmd_wrap0_hide"><img src="$stylevar[imgdir_editor]/hide.gif" alt="$vbphrase[wrap_hide_tags]" width="21" height="20" /></div></td>
查找:
<if condition="$show['php_bbcode']">
<td><div class="imagebutton" id="cmd_wrap0_php"><img src="$stylevar[imgdir_editor]/php.gif" alt="$vbphrase[wrap_php_tags]" width="21" height="20" /></div></td>
</if>
在下面加:
<td><div class="imagebutton" id="cmd_wrap0_wma"><img src="$stylevar[imgdir_editor]/wma.gif" alt="$vbphrase[wrap_wma_tags]" width="21" height="20" /></div></td>
<td><div class="imagebutton" id="cmd_wrap0_ra"><img src="$stylevar[imgdir_editor]/ra.gif" alt="$vbphrase[wrap_ra_tags]" width="21" height="20" /></div></td>
<td><div class="imagebutton" id="cmd_wrap0_mp3"><img src="$stylevar[imgdir_editor]/mp3.gif" alt="$vbphrase[wrap_mp3_tags]" width="21" height="20" /></div></td>
<td><div class="imagebutton" id="cmd_wrap0_swf"><img src="$stylevar[imgdir_editor]/swf.gif" alt="$vbphrase[wrap_swf_tags]" width="21" height="20" /></div></td>
三、修改clientscript/vbulletin_stdedit.js文件
查找:
linktext = prompt(vbphrase["enter_link_text"], dtext);
替换成:
if (thetype != "MONEY")
{
linktext = prompt(vbphrase["enter_link_text"], dtext);
}
else
{
linktext = prompt("请输入出售内容(必填):", dtext);
}
查找:
if (thetype == "URL")
{
prompt_text = vbphrase["enter_link_url"];
prompt_contents = "http://";
}
else
{
prompt_text = vbphrase["enter_email_link"];
prompt_contents = "";
}
替换成:
if (thetype == "URL")
{
prompt_text = vbphrase["enter_link_url"];
prompt_contents = "http://";
}
else{
if (thetype == "EMAIL")
{
prompt_text = vbphrase["enter_email_link"];
prompt_contents = "";
}
else
{
prompt_text = "请输入出售价格(默认100):";
prompt_contents = "100";
}
}
查找:
if ((linkurl != null) && (linkurl != ""))
{
if ((linktext != null) && (linktext != ""))
{
AddTxt = "[" + thetype + "=" + linkurl + "]" + linktext + "[/" + thetype + "]" + extraspace;
AddText(AddTxt);
}
else
{
AddTxt = "[" + thetype + "]" + linkurl + "[/" + thetype + "]" + extraspace;
AddText(AddTxt);
}
}
}
替换成:
if ((linkurl != null) && (linkurl != ""))
{
if (thetype != "MONEY"){
if ((linktext != null) && (linktext != ""))
{
AddTxt = "[" + thetype + "=" + linkurl + "]" + linktext + "[/" + thetype + "]" + extraspace;
AddText(AddTxt);
}
else
{
AddTxt = "[" + thetype + "]" + linkurl + "[/" + thetype + "]" + extraspace;
AddText(AddTxt);
}
}
else
{
if ((linktext != null) && (linktext != ""))
{
AddTxt = "[" + thetype + "=" + linkurl + "]" + linktext + "[/" + thetype + "]" + extraspace;
AddText(AddTxt);
}
else
{
alert("必须 输入 或 选中 要出售的内容!");
AddTxt =linktext;
AddText(AddTxt);
}
}
}
}
四、打开clientscript/vbulletin_wysiwyg.js文件
查找:
case "unlink":
{
if (is_ie)
{
do_format("unlink", true, null);
}
else
{
if (moz_get_html() == "")
{
alert(vbphrase["must_select_text_to_use"]);
break;
}
do_format("unlink", false, null);
}
}
break;
在下面加:
case "wrap1_money":
{
if ((!document.selection) || (document.selection.type == "None"))
{
alert ("必须先选中出售内容!")
break;
}
if (elm.cmd.substr(0, 4) == "wrap")
{
wrap_tags(elm.cmd.substr(6).toUpperCase(), "[", "]", elm.cmd.substr(4, 1));
}
else
{
do_format(elm.cmd, false, null);
}
}
break;
查找:
if (useoption == 1)
{
thingy = prompt(construct_phrase(vbphrase["enter_tag_option"], (openbrace + tagname + closebrace)), "");
替换成:
if (useoption == 1)
{
if (tagname.toLowerCase() == "money")
{
thingy = prompt(construct_phrase("请输入出售价格:(默认100)", (openbrace + tagname + closebrace)), "100");
}
else
{
thingy = prompt(construct_phrase(vbphrase["enter_tag_option"], (openbrace + tagname + closebrace)), "");
}
四、将压缩包内的所有gif文件上传到images/editor目录下。
完成!