今天看见有一个朋友用别名插件了,于是从bo-blog论坛找了下。把自己安装的过程写下来了。
1.上传admin下的tranlate到admin下
3.修改文件admin/cp_edit.php
<textarea style="width: 95%; height: 100px" name="entrysummary" id="entrysummary">{$records['entrysummary']}</textarea> 
<br>{$lna[1116]}
</div>
</td>
</tr>在下面插入:
<script type="text/javascript">
function alias_result() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
//alert(http_request.responseText);
document.getElementById("blogalias").value =http_request.responseText;
document.getElementById("blogalias").disabled=false;
document.getElementById("trans").disabled=false;
} else {
alert("There was a problem with the request. Check your permission or contact with administrator."+http_request.responseText);
}
}
}
function tranlate_english(){
var mydata="title=" + document.getElementById('title').value;
document.getElementById("blogalias").value="正在转换...";
document.getElementById("blogalias").disabled=true;
document.getElementById("trans").disabled=true;
makeRequest('admin/tranlate/tranlate_english.php',alias_result,"POST",mydata);
}
function tranlate_pinyin(){
var mydata="title=" + document.getElementById('title').value;
document.getElementById("blogalias").value="正在转换...";
document.getElementById("blogalias").disabled=true;
document.getElementById("trans").disabled=true;
makeRequest('admin/tranlate/tranlate_pinyin.php',alias_result,"POST",mydata);
}
</script>找到:
<td width=100 
align=center>{$lna[1117]}</td><td><input type=text name='blogalias' id='blogalias' value="{$records['blogalias']}" size="50"> {$lna[102]}在后面插入:
<input type='button' id='trans' onclick="tranlate_english()" value='英文转换'/> <input type='button' id='trans' onclick="tranlate_pinyin()" value='拼音转换'/>4.上传cp_edit.php覆盖admin/cp_edit.php。搞定~!
注意:
1.复制代码的时候特别要注意代码换行的部分,不然按钮就失效了。比如说要注意There was a problem with the request. Check your permission or contact with administrator."+http_request.responseText等等这些话
您也可用OpenID登入:
绿色的代理软件
web操作系统一枝独秀


February 12, 2008 01:47 |
<br>
if (http_request.readyState == 4) 
















![KuMoo's Blog - [ Box Stop Here ]](http://www.kumoo.net/logo.gif)





