forumdisplay_fastpost.htm 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <script type="text/javascript">
  2. var postminchars = parseInt('$_G['setting']['minpostsize']');
  3. var postmaxchars = parseInt('$_G['setting']['maxpostsize']');
  4. var disablepostctrl = parseInt('{$_G['group']['disablepostctrl']}');
  5. var fid = parseInt('$_G[fid]');
  6. </script>
  7. <div id="f_pst" class="bm">
  8. <div class="bm_h">
  9. <h2>{lang quick_post}</h2>
  10. </div>
  11. <div class="bm_c">
  12. <form method="post" autocomplete="off" id="fastpostform" action="forum.php?mod=post&action=newthread&fid=$_G[fid]&topicsubmit=yes&infloat=yes&handlekey=fastnewpost" onSubmit="return fastpostvalidate(this)">
  13. <!--{hook/forumdisplay_fastpost_content}-->
  14. <div id="fastpostreturn" style="margin:-5px 0 5px"></div>
  15. <div class="pbt cl">
  16. <!--{if $_G['forum'][threadtypes][types]}-->
  17. <div class="ftid">
  18. <select name="typeid" id="typeid_fast" width="80">
  19. <option value="0" selected="selected">{lang select_thread_catgory}</option>
  20. <!--{loop $_G['forum'][threadtypes][types] $typeid $name}-->
  21. <!--{if empty($_G['forum']['threadtypes']['moderators'][$typeid]) || $_G['forum']['ismoderator']}-->
  22. <option value="$typeid"><!--{echo strip_tags($name);}--></option>
  23. <!--{/if}-->
  24. <!--{/loop}-->
  25. </select>
  26. </div>
  27. <script type="text/javascript" reload="1">simulateSelect('typeid_fast');</script>
  28. <!--{/if}-->
  29. <input type="text" id="subject" name="subject" class="px" value="" onkeyup="strLenCalc(this, 'checklen', 80);" tabindex="11" style="width: 25em" />
  30. <span>{lang comment_message1} <strong id="checklen">80</strong> {lang comment_message2}</span>
  31. </div>
  32. <div class="cl">
  33. <!--{if $_G[setting][fastsmilies]}--><div id="fastsmiliesdiv" class="y"><div id="fastsmiliesdiv_data"><div id="fastsmilies"></div></div></div><!--{/if}-->
  34. <div{if $_G[setting][fastsmilies]} class="hasfsl"{/if} id="fastposteditor">
  35. <div class="tedt">
  36. <div class="bar">
  37. <span class="y">
  38. <!--{hook/forumdisplay_fastpost_func_extra}-->
  39. <a href="forum.php?mod=post&action=newthread&fid=$_G[fid]" onclick="switchAdvanceMode(this.href);doane(event);">{lang post_advancemode}</a>
  40. </span>
  41. <!--{eval $seditor = array('fastpost', array('at', 'bold', 'color', 'img', 'link', 'quote', 'code', 'smilies'), !$allowfastpost ? 1 : 0, $allowpostattach && $allowfastpost ? '<span class="pipe z">|</span><span id="spanButtonPlaceholder">'.lang('template', 'upload').'</span>' : '');}-->
  42. <!--{hook/forumdisplay_fastpost_ctrl_extra}-->
  43. <!--{subtemplate common/seditor}-->
  44. </div>
  45. <div class="area">
  46. <!--{if $allowfastpost}-->
  47. <textarea rows="6" cols="80" name="message" id="fastpostmessage" onKeyDown="seditor_ctlent(event, '$(\'fastpostsubmit\').click()');" tabindex="12" class="pt"{eval echo getreplybg($_G['forum']['replybg']);}></textarea>
  48. <!--{else}-->
  49. <div class="pt hm">
  50. <!--{if !$_G['uid']}-->
  51. <!--{if !$_G['connectguest']}-->
  52. {lang login_to_post} <a href="member.php?mod=logging&action=login" onclick="showWindow('login', this.href)" class="xi2">{lang login}</a> | <a href="member.php?mod={$_G[setting][regname]}" class="xi2">$_G['setting']['reglinkname']</a>
  53. <!--{else}-->
  54. {lang connect_fill_profile_to_post}
  55. <!--{/if}-->
  56. <!--{else}-->
  57. {lang no_permission_to_post}<a href="javascript:;" onclick="$('newspecial').onclick()" class="xi2">{lang click_to_show_reason}</a>
  58. <!--{/if}-->
  59. <!--{hook/global_login_text}-->
  60. </div>
  61. <!--{/if}-->
  62. </div>
  63. </div>
  64. </div>
  65. <div id="seccheck_fastpost">
  66. <!--{if $fastpost && ($secqaacheck || $seccodecheck)}-->
  67. <!--{subtemplate forum/seccheck_post}-->
  68. <!--{/if}-->
  69. </div>
  70. <input type="hidden" name="formhash" value="{FORMHASH}" />
  71. <input type="hidden" name="usesig" value="$usesigcheck" />
  72. </div>
  73. <!--{if $allowpostattach}-->
  74. <script type="text/javascript">
  75. var editorid = '';
  76. var ATTACHNUM = {'imageused':0,'imageunused':0,'attachused':0,'attachunused':0}, ATTACHUNUSEDAID = new Array(), IMGUNUSEDAID = new Array();
  77. </script>
  78. <input type="hidden" name="posttime" id="posttime" value="{TIMESTAMP}" />
  79. <div class="upfl{if empty($_GET[from]) && $_G[setting][fastsmilies]} hasfsl{/if}">
  80. <table cellpadding="0" cellspacing="0" border="0" width="100%" id="attach_tblheader" style="display: none">
  81. <tr>
  82. <td>{lang e_attach_insert}</td>
  83. <td class="atds">{lang description}</td>
  84. <!--{if $_G['group']['allowsetattachperm']}-->
  85. <td class="attv">
  86. {lang readperm}
  87. <img src="{IMGDIR}/faq.gif" alt="Tip" class="vm" onmouseover="showTip(this)" tip="{lang post_select_usergroup_readacces}" />
  88. </td>
  89. <!--{/if}-->
  90. <!--{if $_G['group']['maxprice']}--><td class="attpr">{$_G['setting']['extcredits'][$_G['setting']['creditstransextra'][1]][title]}</td><!--{/if}-->
  91. <td class="attc"></td>
  92. </tr>
  93. </table>
  94. <div class="fieldset flash" id="attachlist"></div>
  95. <!--{if empty($_G['setting']['pluginhooks']['forumdisplay_fastpost_upload_extend'])}-->
  96. <!--{subtemplate common/upload}-->
  97. <script type="text/javascript">
  98. var upload = new SWFUpload({
  99. upload_url: "{$_G[siteurl]}misc.php?mod=swfupload&action=swfupload&operation=upload&fid=$_G[fid]",
  100. post_params: {"uid" : "$_G[uid]", "hash":"$swfconfig[hash]"},
  101. file_size_limit : "$swfconfig[max]",
  102. file_types : "$swfconfig[attachexts][ext]",
  103. file_types_description : "$swfconfig[attachexts][depict]",
  104. file_upload_limit : $swfconfig['limit'],
  105. file_queue_limit : 0,
  106. swfupload_preload_handler : preLoad,
  107. swfupload_load_failed_handler : loadFailed,
  108. file_dialog_start_handler : fileDialogStart,
  109. file_queued_handler : fileQueued,
  110. file_queue_error_handler : fileQueueError,
  111. file_dialog_complete_handler : fileDialogComplete,
  112. upload_start_handler : uploadStart,
  113. upload_progress_handler : uploadProgress,
  114. upload_error_handler : uploadError,
  115. upload_success_handler : uploadSuccess,
  116. upload_complete_handler : uploadComplete,
  117. button_image_url : "{IMGDIR}/uploadbutton_small.png",
  118. button_placeholder_id : "spanButtonPlaceholder",
  119. button_width: 17,
  120. button_height: 25,
  121. button_cursor:SWFUpload.CURSOR.HAND,
  122. button_window_mode: "transparent",
  123. custom_settings : {
  124. progressTarget : "attachlist",
  125. uploadSource: 'forum',
  126. uploadType: 'attach',
  127. <!--{if $swfconfig['maxsizeperday']}-->
  128. maxSizePerDay: $swfconfig['maxsizeperday'],
  129. <!--{/if}-->
  130. <!--{if $swfconfig['maxattachnum']}-->
  131. maxAttachNum: $swfconfig['maxattachnum'],
  132. <!--{/if}-->
  133. uploadFrom: 'fastpost'
  134. },
  135. debug: false
  136. });
  137. </script>
  138. <!--{else}-->
  139. <!--{hook/forumdisplay_fastpost_upload_extend}-->
  140. <!--{/if}-->
  141. </div>
  142. <!--{/if}-->
  143. <p class="ptm pnpost">
  144. <a href="home.php?mod=spacecp&ac=credit&op=rule&fid=$_G[fid]" class="y" target="_blank">{lang post_credits_rule}</a>
  145. <button {if $fastpost}type="submit" {elseif !$_G['uid']}type="button" onclick="showWindow('login', 'member.php?mod=logging&action=login&guestmessage=yes')" {/if}{if !$seccodecheck && !$secqaacheck}onmouseover="checkpostrule('seccheck_fastpost', 'ac=newthread');this.onmouseover=null" {/if}name="topicsubmit" id="fastpostsubmit" value="topicsubmit" tabindex="13" class="pn pnc"><strong>{lang post_newthread}</strong></button>
  146. <!--{hook/forumdisplay_fastpost_btn_extra}-->
  147. <!--{if !empty($_G['setting']['pluginhooks']['forumdisplay_fastpost_sync_method'])}-->
  148. <span>
  149. {lang post_sync_method}:
  150. <!--{hook/forumdisplay_fastpost_sync_method}-->
  151. </span>
  152. <!--{/if}-->
  153. <!--{if helper_access::check_module('follow')}-->
  154. <label><input type="checkbox" name="adddynamic" class="pc" value="1" {if $_G['forum']['allowfeed'] && !$_G[tid] && empty($_G['forum']['viewperm'])}checked="checked"{/if} />{lang post_relay}</label>
  155. <!--{/if}-->
  156. </p>
  157. </form>
  158. </div>
  159. </div>