LBS修改- 发表文章、评论时将内容自动复制到剪贴板

This item was filled under [ 建站笔记 ]

因为网络的原因,最近在博客上提交评论或留言的时候老是提示“没有权限”或者“超时”的问题,从“生活笔谈”那里找到这篇文章,给自己用下,正好解决下这个问题,添加在发表文章、评论及留言时将内容自动复制到剪贴板这一功能。具体步骤如下:

第一步:修改messageform.js,查找到:

theForm.submit()

在其上添加:

saveToClipBoard();

然后再在文档末尾添加:

function saveToClipBoard(){
var isCopy, theForm;
isCopy=document.all.iscopy.checked;
theForm=document.inputform;
if(isCopy==true){
clipboardData.setData(”Text”,theForm.message.value);
}
}

第二步:修改article.asp,查找到:

<input name=”e_smilies” type=”checkbox” value=”true”<%if(objArticle.ubbFlags!=”html” && objArticle.ubbFlags.substr(4,1)==”1″) write(” checked=\”checked\”")%> /> <%=lang["e_smilies"]%>

修改成:

<input name=”e_smilies” type=”checkbox” value=”true”<%if(objArticle.ubbFlags!=”html” && objArticle.ubbFlags.substr(4,1)==”1″) write(” checked=\”checked\”")%> /> <%=lang["e_smilies"]%><br />
<input name=”iscopy” type=”checkbox” value=”true” checked=”checked” />自动复制

第三步:修改global.asp,查找到:

<input name=”comm_hidden” type=”checkbox” value=”true”<%if(bHidden) write(” checked=\”checked\”")%> /> <%=lang["comm_hidden"]%>

在其上面添加:

<input name=”iscopy” type=”checkbox” value=”true” checked=”checked” />自动复制<br />

然后再查找到:

<input type=”submit” name=”btnSubmit” value=” <%=lang["post_comment"]%> ” onclick=”this.disabled=true;document.inputform.submit();” class=”button” />

修改成:

<input type=”submit” name=”btnSubmit” value=” <%=lang["post_comment"]%> ” onclick=”this.disabled=true;saveToClipBoard();document.inputform.submit();” class=”button” />

Tagged with: [ , , ]

引用163相册相片的使用方法

This item was filled under [ 建站笔记 ]

众所周知,如果在163.com以外的地方引用163相册的图片是行不通的,好在我们这里有高手解决了这个难题,写了个asp的文件,通过它的引用便可实现了163图片的引用,
使用举例:在编辑框里输入下面的代码:
[code][align=center][img]163pic.asp?url=http://img.blog.163.com/photo/NKenPYrODw9SaTKS4OTn8Q==/3946560648460328243.jpg[/img][/align]
[/code]
显示结果如下:
[align=center][img]163pic.asp?url=http://img.blog.163.com/photo/NKenPYrODw9SaTKS4OTn8Q==/3946560648460328243.jpg[/img][/align]
因为我使用的是已经集成好的版本,所以想使用本功能的朋友请下载下面的文件,自己安装使用。如果你没有这个功能则下面的东西可以不用看了。[url=http://lifeboke.cn/blog/uploads/200604/28_124300_163.rar]破解文件[/url] 附件是破解的ASP源代码,如果你的空间支持ASP,那么直接传到你空间去就可以了.
我在这里想要调整的是后续的修改工作,在添加图片(点击img功能钮)的时候会自动的添加引用文件(asp)的链接,免去输入或忘记文件名的麻烦,如果不是引用的163图片,则直接删除前面的引用文件就可以了.呵呵,懒人呀!

打开messageform.js文件找到下面的代码?

[code]function image() {
if (advmode) {
AddTxt=”[img] [/img]“;
AddText(AddTxt);
} else {
txt=prompt(image_normal,”http://”);
if(txt!=null) {
AddTxt=”\n[img]“+txt;
AddText(AddTxt);
AddText(”[/img]“);
}
}
}

[/code]
用下面的代码替换,
[code]
function image() {
if (advmode) {
AddTxt=”[img]163pic.asp?url= [/img]“;
AddText(AddTxt);
} else {
txt=prompt(image_normal,”163pic.asp?url=http://”);
if(txt!=null) {
AddTxt=”\n[img]“+txt;
AddText(AddTxt);
AddText(”[/img]“);
}
}
}
[/code]

Tagged with: [ , , ]

LBS修改-文章的后面添加两大搜索引擎!

This item was filled under [ 建站笔记 ]

打开article.asp文件,搜索到

<!– TB Spam –>
<script type=”text/javascript”>
var tb_url_text = “<%=theCache.settings["baseURL"]+”trackback.asp?id=”+theArticle.id%>&key=<%=func.HTMLEncode(theCache.settings["trackbackcode"])%>”;
</script>
<!– TB Spam –>

在其上一行插入下面的搜索代码:

<!– Search Google Start –>
<center>
<form method=”get” action=”http://www.google.cn/custom” target=”google_window”>
<tr><td nowrap=”nowrap” valign=”top” align=”left” height=”32″>
<img src=”http://www.google.com/logos/Logo_25wht.gif” border=”0″ alt=”Google Search” align=”middle”></img>
<input type=”text” name=”q” value=”<%=func.HTMLEncode(theArticle.title)%>” class=”text search-field” style=”width: 68%” /></input>
<input type=”submit” name=”sa” value=”<%=lang["search"]%>” class=”button” /></input>
<input type=”hidden” name=”client” value=”pub-9928792648942112″></input>
<input type=”hidden” name=”forid” value=”1″></input>
<input type=”hidden” name=”hl” value=”zh-CN”></input>
<input type=hidden value=UTF-8 name=ie></input>
<input type=hidden value=UTF-8 name=oe></input>
<input type=hidden value=zh-CN name=hl></input></form>
</td></tr>
</form>
</center>
<!– Search Google End –>

<!– Search Baidu Start –>
<div align=”center”>
<form action=”http://www.baidu.com/baidu” target=”_blank”>
<img src=”http://img.baidu.com/search/img/baidulogo_clarity_80_29.gif” border=”0″ alt=”Baidu Search” align=”middle”></img>
<input type=”text” name=”word” value=”<%=func.HTMLEncode(theArticle.title)%>” class=”text search-field” style=”width: 68%” /></input>
<input type=”submit” name=”sa” value=”<%=lang["search"]%>” class=”button” /></input>
<input type=hidden name=”tn” value=sale925></input>
<input type=hidden value=UTF-8 name=ie></input>
<input type=hidden value=UTF-8 name=oe></input>
<input type=hidden value=zh-CN name=hl></input></form>
</div>
<!– Search Baidu End –>

保存后就可以实现我现在使用的效果!

Tagged with: [ , , ]

google ADsense设置代码

This item was filled under [ 建站笔记 ]

都说可以通过google adsense挣钱,不知道真假,估计与网站的浏览量或流量有关系吧,至少我目前还达不到这种规模,不过还是可以先装上用用,也方便自己找东西吗?贴子设成隐藏的,给自己留个备用参考,也省得别人说我给自己做广告。

1、google adsense 搜索模块(AdSense for Search)
在页面的适当位置放置下面的代码即可实现google搜索功能.
[code]
<!– Search Google –>
<form method=”get” action=”http://www.google.com/custom” target=”google_window”>
<table >
<tr><td nowrap=”nowrap” valign=”top” align=”left” height=”32″>
<input type=”text” name=”q” size=”15″ maxlength=”255″ value=”www.sale925.cn” ></input>
<input type=”submit” name=”sa” value=”Google” class=”button” ></input>
<input type=”hidden” name=”client” value=”pub-9928792648942112″></input>
<input type=”hidden” name=”forid” value=”1″></input>
<input type=”hidden” name=”channel” value=”1752202669″></input>
<input type=”hidden” name=”ie” value=”GB2312″></input>
<input type=”hidden” name=”oe” value=”GB2312″></input>
<input type=”hidden” name=”cof” ></input>
<input type=”hidden” name=”hl” value=”zh-CN”></input>
</td></tr></table>
</form>
<!– Search Google –>
[/code]

2、google adsense的页面广告功能( AdSense for Content)
在你想加入广告的页面位置处放置下面的代码即可实现google广告功能.本广告的显示大小为468*60的格式。
[code]<script type=”text/javascript”><!–
google_ad_client = “pub-9928792648942112″;
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = “468×60_as”;
google_ad_type = “image”;
google_ad_channel = “”;
google_ui_features = “rc:10″;
//–>
</script>
<script type=”text/javascript”
src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>
[/code]

Tagged with: [ , , ]
第 46 页,共 51 页« 第一页Nothing«4445464748»Nothing最后一页 »