⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.js

📁 投稿 文章管理 员文章评论回复无限引用简易留言功能简易RSS功...
💻 JS
字号:
var settings = {
	commentURI:SiteDir+"/action.php?do=comment&action=",
	diggURI:SiteDir+"/action.php?do=digg&action=do"
}
function digg(act,aid,cid){
	if(act=='up'||act=='against'){
		var pars = {'id':aid,'cid':cid,'ajax':'1',t: Math.random()};
		$.getJSON(settings.commentURI+act,pars, function(json){
		 	if(json.state=='1'){
			 	var Num=parseInt($("#"+act+"_"+cid).text());
			 	$("#"+act+"_"+cid).text(Num+1); 
		 	}
		 	if(json.state=='0'){
		 	 	alert(json.text);
		 	 }
		});
		return;
	}
	if(act=='digg'){
		var pars = {'id':aid,'t': Math.random()};
		$.getJSON(settings.diggURI,pars, function(json){
		 	if(json.state=='1'){
			 	var Num=parseInt($("#"+act+"_"+aid).text());
			 	$("#"+act+"_"+aid).text(Num+1); 
		 	}
		 	if(json.state=='0'){
		 	 	alert(json.text);
		 	 }
		});
		return;
	}
}
function quote(cid){
	addHTML('<div style="border:1px solid #999999; padding: 3px; background-color: #FFFFEE;margin-bottom: 12px; text-align:left;"><span style="color: #990000;font-weight:bold">----- 以下引用 <STRONG><EM>' + $("#comment_username_" + cid).text() + '</EM></STRONG> 于 ' + $("#comment_time_" + cid).text() + ' 的发言 -----</span><p style="margin: 9px 3px; line-height: 20px; text-align: left; color:#000000;">' + $("#comment_contents_" + cid).html() + '</p></div>');
}
function reply(cid){
	addHTML('<span style="padding-bottom:3px;color:#999999;">---<I>回复</I> ' + $("#lou_" + cid).text() + ' [' + $("#comment_username_" + cid).text() + '] 时间:[' + $("#comment_time_" + cid).text() + ']---</span><br />');
}
function addHTML(html){
	var oEditor = FCKeditorAPI.GetInstance('commentext');
	if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG ){
		oEditor.InsertHtml(html);
	}else{
		alert("评论框不支持此功能!");
	}
}
function textareasize(obj) {
	if(obj.scrollHeight > 70) {
		obj.style.height = obj.scrollHeight + 'px';
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -