如果您目前使用的是2.2版本,希望升级到2.3版本,只需改动如下几个地方。
1、覆盖api/image.php、include/javascript/qcomic.js、admin/qcomic.inc.php
2、修改templates/default/viewthread.htm
把改为在后面,加上在- <!--{eval $phidtemp = $post[phid];}-->
复制代码 后面,加上- <!--{eval preg_match_all("'flashTagIns.qcomic_fkey = ".*?"'si", $post[message], $qcomic_fkeyloop);}-->
- <!--{eval $qcomic_fkeys = '';}-->
- <!--{loop $qcomic_fkeyloop[0] $qcomic_fkey}-->
- <!--{eval $qcomic_fkeys.= substr($qcomic_fkey, 27, strlen($qcomic_fkey)-28).',';}-->
- <!--{/loop}-->
复制代码 3、修改templates/default/post_editor.htm
把改为把- flashTagIns.wmode = "window";
复制代码 改为- flashTagIns.wmode = "transparent";
复制代码 在- function qcomic_postsubmit(phid) {
- setImageInfo(phid, 0);
- var retval = document.getElementById('postform').onsubmit();
- if (retval==true) document.getElementById('postform').submit();
- }
复制代码 后面,加上- function qcomic_addubb(fname, width, height, fkey, urladdr) {
- if(bbinsert && wysiwyg) {
- } else {
- AddText('[pp=' + fname + ',' + width + ',' + height + ',' + fkey + ']' + urladdr + '[/pp]');
- }
- }
复制代码 在- <div style="height:10px; clear:both;"><!-- --></div>
复制代码 之前,加上- <div id="qcomic_edit_container"></div>
复制代码 4、修改include/discuzcode.func.php
在之前,加上- $discuzcodes['searcharray']['bbcode_regexp'][] = "/\[pp=(\w{1,30}),(\d{1,4}),(\d{1,4}),(\w{1,30})\]\s*([^\[\<\r\n]+?)\s*\[\/pp\]/ies";
- if (!function_exists('qcomic_parsepp')) {
- function qcomic_parsepp($fname, $width, $height, $fkey, $uri) {
- $uri = str_replace('&', '&', str_replace(array('<', '>'), '', str_replace('\"', '"', $uri)));
- $s = '<script type="text/javascript" src="include/javascript/qcomic.js"></script>';
- $s.= '<script language="javascript" type="text/javascript">';
- $s.= 'flashTagIns.setNew("http://p.qihoo.com/flash/'.$fname.'.swf", '.$width.', '.$height.');';
- $s.= 'flashTagIns.setVersion("7,0,19,0");';
- $s.= 'flashTagIns.allowScriptAccess = "always";';
- $s.= 'flashTagIns.allowFullScreen = "true";';
- $s.= 'flashTagIns.swLiveConnect = "true";';
- $s.= 'flashTagIns.wmode = null;';
- $s.= 'flashTagIns.qcomic_fkey = "'.$fkey.'";';
- $s.= 'flashTagIns.flashVars = "'.$uri.'";';
- $s.= 'flashTagIns.write(document);';
- $s.= '</script>';
- return $s;break;
- }
- }
- $discuzcodes['replacearray']['bbcode_regexp'][] = "qcomic_parsepp('\\1', \\2, \\3, '\\4', '\\5')";
复制代码 5、进论坛管理后台的组图设置,把上传flash的宽度设为750,高度设为60
更新缓存后升级完成。预祝顺利!
[ 本帖最后由 todidot 于 2008-3-18 16:03 编辑 ] |