post.htm
来自「Discuz_7.0.0 是一款社区程序源码!! 国内80 的站长使用此程序」· HTM 代码 · 共 876 行 · 第 1/4 页
HTM
876 行
} else {
showMenu('insertimage_album', true, 0, 2, 250, 1);
}
}
</script>
<!--{/if}-->
</div>
<!--{/if}-->
<script type="text/javascript" reload="1">
var pagescroll = new pagescroll_class('floatlayout_$action', 600, 410);
{if empty($infloat)}
$('floatlayout_$action').scrollLeft = 600;
{/if}
{if $isfirstpost && $forum['threadtypes']['types']}
loadselect('typeid', 0, 'floatlayout_$action');
{/if}
{if !$isfirstpost && $thread['special'] == 5 && empty($firststand) && $action != 'edit'}
loadselect('stand', 0, 'floatlayout_$action');
{/if}
{if !$special && $forum[threadsorts] && ($action == 'newthread' || $action == 'edit' && $isfirstpost && !$thread[sortid])}
loadselect('sortid', 0, 'floatlayout_$action');
function switchsort() {
if($('sortid').value) {
data = wysiwyg ? editdoc.body.innerHTML : textobj.value;
saveData(wysiwyg ? editdoc.body.innerHTML : textobj.value);
{if $isfirstpost && $sortid}
ajaxget('post.php?action=threadsorts&sortid=' + $('sortid').value + '&fid=$fid{if !empty($modelid)}&modelid=$modelid{/if}', 'threadsorts', 'threadsortswait')
{elseif !empty($infloat)}
window.open('post.php?action=$action&fid=$fid{if !empty($tid)}&tid=$tid{/if}{if !empty($pid)}&pid=$pid{/if}{if !empty($modelid)}&modelid=$modelid{/if}&extra=$extra&sortid=' + $('sortid').value + (data != '' ? '&cedit=yes' : ''));
{else}
location.href = 'post.php?action=$action&fid=$fid{if !empty($tid)}&tid=$tid{/if}{if !empty($pid)}&pid=$pid{/if}{if !empty($modelid)}&modelid=$modelid{/if}&extra=$extra&sortid=' + $('sortid').value + (data != '' ? '&cedit=yes' : '');
{/if}
Editorwin = 0;
}
}
{/if}
{if $isfirstpost && $sortid}
ajaxget('post.php?action=threadsorts&sortid=$sortid&fid=$fid{if !empty($tid)}&tid=$tid{/if}&inajax=1', 'threadsorts', 'threadsortswait', 'threadsortswait');
{/if}
{if ($action == 'newthread' && $sitemessage[newthread] || $action == 'reply' && $sitemessage[reply]) && $sitemessage[time]}
setTimeout('display_opacity(\'custominfo_post\',100)', $sitemessage[time]);
{/if}
var postminchars = parseInt('$minpostsize');
var postmaxchars = parseInt('$maxpostsize');
var disablepostctrl = parseInt('$disablepostctrl');
var seccodecheck = parseInt('$seccodecheck');
var secqaacheck = parseInt('$secqaacheck');
var typerequired = parseInt('$forum[threadtypes][required]');
var special = parseInt('$special');
var isfirstpost = {if $isfirstpost}1{else}0{/if};
var allowposttrade = parseInt('$allowposttrade');
var allowpostreward = parseInt('$allowpostreward');
var allowpostactivity = parseInt('$allowpostactivity');
var sortid = '$sortid';
var special = parseInt('$special');
var editorid = '$editorid';
var textobj = $(editorid + '_textarea');
var wysiwyg = (is_ie || is_moz || (is_opera >= 9)) && parseInt('$editormode') == 1 ? 1 : 0;
var allowswitcheditor = parseInt('$allowswitcheditor');
var allowhtml = parseInt('$allowhtml');
var forumallowhtml = parseInt('$forum[allowhtml]');
var allowsmilies = parseInt('$forum[allowsmilies]');
var allowbbcode = parseInt('$forum[allowbbcode]');
var allowimgcode = parseInt('$forum[allowimgcode]');
var allowpostattach = parseInt('$allowpostattach');
var editorcss = 'forumdata/cache/style_{STYLEID}_common.css?{VERHASH}';
var TABLEBG = '{WRAPBG}';
var uid = parseInt('$discuz_uid');
var swfhash = '{echo md5($_DCACHE[settings][authkey].$discuz_uid);}';
{if $allowpostattach}
var thumbwidth = parseInt($thumbwidth);
var thumbheight = parseInt($thumbheight);
var extensions = '$attachextensions';
{/if}
var fontoptions = new Array({lang e_fontoptions});
var custombbcodes = new Array();
{if $forum['allowbbcode'] && $allowcusbbcode}
{loop $_DCACHE['bbcodes_display'] $tag $bbcode}
{if $bbcode[type] == '0'}custombbcodes["$tag"] = {'prompt' : '$bbcode[prompt]'};{/if}
{/loop}
{/if}
function messagehandle_$action(key) {
if(!Editorwin) {
$('floatlayout_$action').scrollTop = 0;
{if !$showthreadsorts && !($adveditor)}
$('more_1').style.display='none';pagescroll.up(1, '$(\'more_2\').style.display=\'\';$(\'custominfoarea\').style.display=\'\'');
{else}
$('custominfoarea').style.display=$('more_2').style.display='none';pagescroll.up(1, '$(\'more_1\').style.display=\'\'');
{/if}
}
}
function messagehandle() {
messagehandle_$action();
}
function submithandle_$action(locationhref, message) {
{if $action == 'edit' || $action == 'reply'}
try {
var pid = locationhref.lastIndexOf('#pid');
if(pid != -1) {
pid = locationhref.substr(pid + 4);
{if $action == 'edit'}
if(pid) {
ajaxget('viewthread.php?tid=$tid&viewpid=' + pid, 'post_' + pid, 'ajaxwaitid');
} else {
ajaxget('viewthread.php?tid=$tid&viewpid=$pid', 'post_$pid', 'ajaxwaitid');
}
$('postform').editsubmit.disabled = false;
{elseif $action == 'reply' && !empty($addtrade)}
location.href = locationhref;
{elseif $action == 'reply'}
ajaxget('viewthread.php?tid=$tid&viewpid=' + pid, 'post_new', 'ajaxwaitid', '', null, 'appendreply()');
if(replyreload) {
var reloadpids = replyreload.split(',');
for(i = 1;i < reloadpids.length;i++) {
ajaxget('viewthread.php?tid=$tid&viewpid=' + reloadpids[i], 'post_' + reloadpids[i]);
}
}
{/if}
} else {
location.href = locationhref;
}
} catch(e) {
location.href = locationhref;
}
{elseif $action == 'newthread'}
var hastid = locationhref.lastIndexOf('tid=');
if(hastid == -1) {
dnotice(message, "location.href='" + locationhref + "'", 390, 130);
} else {
location.href = locationhref;
}
{/if}
floatwinreset = 1;
closeEditorwin();
}
{if !empty($cedit) && $cedit == 'yes'}
function cedit() {
try {
loadData(1);
} catch(e) {
setTimeout('cedit()', 1000);
}
}
{/if}
function openEditor() {
try {
{if $action == 'reply' && !$message}
if($('fastpostmessage') && $('fastpostmessage').value) {
textobj.value = $('fastpostmessage').value;
$('fastpostmessage').value = '';
}
{/if}
{if $action == 'edit' || $action == 'reply' && $repquote}
if(wysiwyg) {
initialized = false;
newEditor(1, bbcode2html(textobj.value));
} else {
newEditor(0);
}
setCaretAtEnd();
{else}
newEditor(wysiwyg);
if(editbox) {
{if ($action != 'edit' || !$attachments) && (!$swfupload || !$swfattachs)}
editbox.className = 'autosave max';
{else}
editbox.className = 'autosave';
{/if}
}
{/if}
} catch(e) {
setTimeout('openEditor()', 100);
return;
}
if(!$('floatlayout_$action').scrollLeft) {
$('floatlayout_$action').scrollLeft = 600;
}
{if $_DCACHE['bbcodes_display']['tools']}
if(!getcookie('disableautosave')) {
clearInterval(autosaveDatai);
autosaveData(1);
}
if(is_ie >= 5 || is_moz >= 2) {
window.onbeforeunload = function () {
try {
saveData(wysiwyg ? editdoc.body.innerHTML : textobj.value);
} catch(e) {}
};
}
{/if}
{if !empty($cedit) && $cedit == 'yes'}
cedit();
{/if}
}
</script>
<script type="text/javascript" src="include/js/post.js?{VERHASH}" reload="1"></script>
<!--{if $special}-->
<script type="text/javascript" src="include/js/calendar.js?{VERHASH}" reload="1"></script>
<!--{/if}-->
<script type="text/javascript" src="include/js/bbcode.js?{VERHASH}" reload="1"></script>
<!--{if empty($infloat)}-->
{subtemplate footer_nofloat}
<!--{/if}-->
{template footer}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?