本帖最后由 垃圾猫 于 2012-7-4 21:56 编辑
关于2.5 编辑帖子标题出现#pid 或者出现#lastpostlastpost的修复,不完美!
鉴于官方一直说是浏览器特性,没有办法只好百度下解决方案。一共有两个,一个修改JS文件(经过验证无效)。
当在帖子页存在新提醒时,IE浏览器会显示代码而不显示帖子标题的临时解决方案
典型状况:
浏览器标题栏显示类似:【新提醒】#pid1974
解决方案:
文件:static/js/common.js
查找:- function noticeTitle() {
- NOTICETITLE = {'State':0, 'oldTitle':document.title, flashNumber:0, sleep:15};
- if(!getcookie('noticeTitle')) {
- window.setInterval('noticeTitleFlash();', 500);
- } else {
- window.setTimeout('noticeTitleFlash();', 500);
- }
- setcookie('noticeTitle', 1, 600);
- }
复制代码 替换为:- var dy9484Title = document.title;
- function noticeTitle() {
- NOTICETITLE = {'State':0, 'oldTitle':dy9484Title, flashNumber:0, sleep:15};
- if(!getcookie('noticeTitle')) {
- window.setInterval('noticeTitleFlash();', 500);
- } else {
- window.setTimeout('noticeTitleFlash();', 500);
- }
- setcookie('noticeTitle', 1, 600);
- }
复制代码 另一个修改模板文件。
discuz 标题显示pid 标题栏显示#lastpostlastpost的解决方案,不完美,新的问题是 快速回复无法上传附件了。上传附件的地方在修改后只有“上传”这个文字,没有连接了,期待更好的解决办法!
打开:template/default/forum/viewthread_fastpost.htm
查找:- <script type="text/javascript">
- var upload = new SWFUpload({
- upload_url: "{$_G[siteurl]}misc.php?mod=swfupload&action=swfupload&operation=upload&fid=$fid",
- post_params: {"uid" : "$_G[uid]", "hash":"$swfconfig[hash]"},
- file_size_limit : "$swfconfig[max]",
- file_types : "$swfconfig[attachexts][ext]",
- file_types_description : "$swfconfig[attachexts][depict]",
- file_upload_limit : $swfconfig['limit'],
- file_queue_limit : 0,
- swfupload_preload_handler : preLoad,
- swfupload_load_failed_handler : loadFailed,
- file_dialog_start_handler : fileDialogStart,
- file_queued_handler : fileQueued,
- file_queue_error_handler : fileQueueError,
- file_dialog_complete_handler : fileDialogComplete,
- upload_start_handler : uploadStart,
- upload_progress_handler : uploadProgress,
- upload_error_handler : uploadError,
- upload_success_handler : uploadSuccess,
- upload_complete_handler : uploadComplete,
- button_image_url : "{IMGDIR}/uploadbutton_small.png",
- button_placeholder_id : "spanButtonPlaceholder",
- button_width: 17,
- button_height: 25,
- button_cursor:SWFUpload.CURSOR.HAND,
- button_window_mode: "transparent",
- custom_settings : {
- progressTarget : "attachlist",
- uploadSource: 'forum',
- uploadType: 'attach',
- <!--{if $swfconfig['maxsizeperday']}-->
- maxSizePerDay: $swfconfig['maxsizeperday'],
- <!--{/if}-->
- <!--{if $swfconfig['maxattachnum']}-->
- maxAttachNum: $swfconfig['maxattachnum'],
- <!--{/if}-->
- uploadFrom: 'fastpost'
- },
- debug: false
- });
- </script>
复制代码 修改成以下代码:- <script type="text/javascript">
- var editorid = '';
- var ATTACHNUM = {'imageused':0,'imageunused':0,'attachused':0,'attachunused':0}, ATTACHUNUSEDAID = new Array(), IMGUNUSEDAID = new Array();
- </script>
复制代码 记得更新缓存。。。。然后再测试。。。。唯一缺陷,在快速回复的地方无法上传附件了!
https://discuz.dismall.com/thread-2968487-1-1.html
|