自动加入网址别名集合版

| |
[不指定 February 12, 2008 01:47 | KuMoo ]

今天看见有一个朋友用别名插件了,于是从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等等这些话


效果图: 点击在新窗口中浏览此图片

Tags: ,
Net.Design » BO-BLOG | 评论(0) | 引用(0) | 阅读(2086)
To BookMarks:百度搜藏 Google书签 Del.icio.us Yahoo收藏 新浪ViVi收藏夹 365天天网摘 天极网摘 我摘·网摘·网络书签 POCO网摘 YouNote网摘 和讯网摘 Bolaa博拉博客收录中心 igooi网摘 天下图摘
您也可用OpenID登入:
发表评论

Visitor's Name:           PassWord:

虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号
打开HTML 打开UBB 打开表情 隐藏