Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

送我魔法表情---插件 FOR 5.5 程序发布(三种安装方式)

[复制链接]
 楼主| 逆雪寒 发表于 2007-4-4 16:06:05 | 显示全部楼层
原帖由 shuyufeng 于 2007-4-4 16:02 发表
global.inc.php和admincp.php得用文本文件改,不然会出错.



谢谢补充
回复

使用道具 举报

shuyufeng 发表于 2007-4-4 16:14:14 | 显示全部楼层

回复 #61 逆雪寒 的帖子

我之前用frontpage改了,就出错了....后来用ultraedit改就没事.

另外还想问一下,全部文件都改过了,也更新了缓存,但是后台smilies和主题图标之间的选项却不显示,不知道为什么...
回复

使用道具 举报

sachem 发表于 2007-4-4 16:26:01 | 显示全部楼层
出现:
  1. Fatal error: Call to undefined function: showswf() in F:\wwwroot\juyebbs\bbs\admin\dgismiles.inc.php on line 18
复制代码


我的global.func.php文件修改完以后是这样你看对不对

  1. <?php

  2. /*
  3.         [Discuz!] (C)2001-2007 Comsenz Inc.
  4.         This is NOT a freeware, use is subject to license terms

  5.         $RCSfile: global.func.php,v $
  6.         $Revision: 1.156.2.17 $
  7.         $Date: 2007/03/21 15:52:38 $
  8. */

  9. if(!defined('IN_DISCUZ')) {
  10.         exit('Access Denied');
  11. }

  12. function authcode($string, $operation, $key = '') {

  13.         $key = md5($key ? $key : $GLOBALS['discuz_auth_key']);
  14.         $key_length = strlen($key);

  15.         $string = $operation == 'DECODE' ? base64_decode($string) : substr(md5($string.$key), 0, 8).$string;
  16.         $string_length = strlen($string);

  17.         $rndkey = $box = array();
  18.         $result = '';

  19.         for($i = 0; $i <= 255; $i++) {
  20.                 $rndkey[$i] = ord($key[$i % $key_length]);
  21.                 $box[$i] = $i;
  22.         }

  23.         for($j = $i = 0; $i < 256; $i++) {
  24.                 $j = ($j + $box[$i] + $rndkey[$i]) % 256;
  25.                 $tmp = $box[$i];
  26.                 $box[$i] = $box[$j];
  27.                 $box[$j] = $tmp;
  28.         }

  29.         for($a = $j = $i = 0; $i < $string_length; $i++) {
  30.                 $a = ($a + 1) % 256;
  31.                 $j = ($j + $box[$a]) % 256;
  32.                 $tmp = $box[$a];
  33.                 $box[$a] = $box[$j];
  34.                 $box[$j] = $tmp;
  35.                 $result .= chr(ord($string[$i]) ^ ($box[($box[$a] + $box[$j]) % 256]));
  36.         }

  37.         if($operation == 'DECODE') {
  38.                 if(substr($result, 0, 8) == substr(md5(substr($result, 8).$key), 0, 8)) {
  39.                         return substr($result, 8);
  40.                 } else {
  41.                         return '';
  42.                 }
  43.         } else {
  44.                 return str_replace('=', '', base64_encode($result));
  45.         }

  46. }

  47. function clearcookies() {
  48.         global $discuz_uid, $discuz_user, $discuz_pw, $discuz_secques, $adminid, $credits;
  49.         dsetcookie('sid', '', -86400 * 365);
  50.         dsetcookie('auth', '', -86400 * 365);
  51.         dsetcookie('visitedfid', '', -86400 * 365);
  52.         dsetcookie('onlinedetail', '', -86400 * 365, 0);

  53.         $discuz_uid = $adminid = $credits = 0;
  54.         $discuz_user = $discuz_pw = $discuz_secques = '';
  55. }

  56. function checklowerlimit($creditsarray, $coef = 1) {
  57.         if(is_array($creditsarray)) {
  58.                 global $extcredits, $id;
  59.                 foreach($creditsarray as $id => $addcredits) {
  60.                         if($addcredits * $coef < 0 && $GLOBALS['extcredits'.$id] - $addcredits < $extcredits[$id]['lowerlimit']) {
  61.                                 showmessage('credits_policy_lowerlimit');
  62.                         }
  63.                 }
  64.         }
  65. }

  66. function cutstr($string, $length, $dot = ' ...') {
  67.         global $charset;

  68.         if(strlen($string) <= $length) {
  69.                 return $string;
  70.         }

  71.         $string = str_replace(array('&amp;', '&quot;', '&lt;', '&gt;'), array('&', '"', '<', '>'), $string);

  72.         $strcut = '';
  73.         if(strtolower($charset) == 'utf-8') {

  74.                 $n = $tn = $noc = 0;
  75.                 while($n < strlen($string)) {

  76.                         $t = ord($string[$n]);
  77.                         if($t == 9 || $t == 10 || (32 <= $t && $t <= 126)) {
  78.                                 $tn = 1; $n++; $noc++;
  79.                         } elseif(194 <= $t && $t <= 223) {
  80.                                 $tn = 2; $n += 2; $noc += 2;
  81.                         } elseif(224 <= $t && $t < 239) {
  82.                                 $tn = 3; $n += 3; $noc += 2;
  83.                         } elseif(240 <= $t && $t <= 247) {
  84.                                 $tn = 4; $n += 4; $noc += 2;
  85.                         } elseif(248 <= $t && $t <= 251) {
  86.                                 $tn = 5; $n += 5; $noc += 2;
  87.                         } elseif($t == 252 || $t == 253) {
  88.                                 $tn = 6; $n += 6; $noc += 2;
  89.                         } else {
  90.                                 $n++;
  91.                         }

  92.                         if($noc >= $length) {
  93.                                 break;
  94.                         }

  95.                 }
  96.                 if($noc > $length) {
  97.                         $n -= $tn;
  98.                 }

  99.                 $strcut = substr($string, 0, $n);

  100.         } else {
  101.                 for($i = 0; $i < $length - strlen($dot) - 1; $i++) {
  102.                         $strcut .= ord($string[$i]) > 127 ? $string[$i].$string[++$i] : $string[$i];
  103.                 }
  104.         }

  105.         $strcut = str_replace(array('&', '"', '<', '>'), array('&amp;', '&quot;', '&lt;', '&gt;'), $strcut);

  106.         return $strcut.$dot;
  107. }

  108. function daddslashes($string, $force = 0) {
  109.         !defined('MAGIC_QUOTES_GPC') && define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
  110.         if(!MAGIC_QUOTES_GPC || $force) {
  111.                 if(is_array($string)) {
  112.                         foreach($string as $key => $val) {
  113.                                 $string[$key] = daddslashes($val, $force);
  114.                         }
  115.                 } else {
  116.                         $string = addslashes($string);
  117.                 }
  118.         }
  119.         return $string;
  120. }

  121. function datecheck($ymd, $sep='-') {
  122.         if(!empty($ymd)) {
  123.                 list($year, $month, $day) = explode($sep, $ymd);
  124.                 return checkdate($month, $day, $year);
  125.         } else {
  126.                 return FALSE;
  127.         }
  128. }

  129. function debuginfo() {
  130.         if($GLOBALS['debug']) {
  131.                 global $db, $discuz_starttime, $debuginfo;
  132.                 $mtime = explode(' ', microtime());
  133.                 $debuginfo = array('time' => number_format(($mtime[1] + $mtime[0] - $discuz_starttime), 6), 'queries' => $db->querynum);
  134.                 return TRUE;
  135.         } else {
  136.                 return FALSE;
  137.         }
  138. }

  139. function dexit($message = '') {
  140.         echo $message;
  141.         output();
  142.         exit();
  143. }

  144. function dhtmlspecialchars($string) {
  145.         if(is_array($string)) {
  146.                 foreach($string as $key => $val) {
  147.                         $string[$key] = dhtmlspecialchars($val);
  148.                 }
  149.         } else {
  150.                 $string = preg_replace('/&amp;((#(\d{3,5}|x[a-fA-F0-9]{4})|[a-zA-Z][a-z0-9]{2,5});)/', '&\\1',
  151.                 str_replace(array('&', '"', '<', '>'), array('&amp;', '&quot;', '&lt;', '&gt;'), $string));
  152.         }
  153.         return $string;
  154. }

  155. function dheader($string, $replace = true, $http_response_code = 0) {
  156.         $string = str_replace(array("\r", "\n"), array('', ''), $string);
  157.         if(empty($http_response_code) || PHP_VERSION < '4.3' ) {
  158.                 @header($string, $replace);
  159.         } else {
  160.                 @header($string, $replace, $http_response_code);
  161.         }
  162.         if(preg_match('/^\s*location:/is', $string)) {
  163.                 exit();
  164.         }
  165. }

  166. function disuploadedfile($file) {
  167.         return function_exists('is_uploaded_file') && (is_uploaded_file($file) || is_uploaded_file(str_replace('\\\\', '\\', $file)));
  168. }

  169. function dreferer($default = '') {
  170.         global $referer, $indexname;

  171.         $default = empty($default) ? $indexname : '';
  172.         if(empty($referer) && isset($GLOBALS['_SERVER']['HTTP_REFERER'])) {
  173.                 $referer = preg_replace("/([\?&])((sid\=[a-z0-9]{6})(&|$))/i", '\\1', $GLOBALS['_SERVER']['HTTP_REFERER']);
  174.                 $referer = substr($referer, -1) == '?' ? substr($referer, 0, -1) : $referer;
  175.         } else {
  176.                 $referer = dhtmlspecialchars($referer);
  177.         }

  178.         if(!preg_match("/(\.php|[a-z]+(\-\d+)+\.html)/", $referer) || strpos($referer, 'logging.php')) {
  179.                 $referer = $default;
  180.         }
  181.         return $referer;
  182. }

  183. function dsetcookie($var, $value, $life = 0, $prefix = 1) {
  184.         global $cookiepre, $cookiedomain, $cookiepath, $timestamp, $_SERVER;
  185.         setcookie(($prefix ? $cookiepre : '').$var, $value,
  186.                 $life ? $timestamp + $life : 0, $cookiepath,
  187.                 $cookiedomain, $_SERVER['SERVER_PORT'] == 443 ? 1 : 0);
  188. }

  189. function dunlink($filename, $havethumb = 0, $remote = 0) {
  190.         global $authkey, $ftp, $attachdir;
  191.         if($remote) {
  192.                 require_once DISCUZ_ROOT.'./include/ftp.func.php';
  193.                 if(!$ftp['connid']) {
  194.                         if(!($ftp['connid'] = dftp_connect($ftp['host'], $ftp['username'], authcode($ftp['password'], 'DECODE', md5($authkey)), $ftp['attachdir'], $ftp['port'], $ftp['ssl']))) {
  195.                                 return;
  196.                         }
  197.                 }
  198.                 dftp_delete($ftp['connid'], $filename);
  199.                 $havethumb && dftp_delete($ftp['connid'], $filename.'.thumb.jpg');
  200.         } else {
  201.                 @unlink($attachdir.'/'.$filename);
  202.                 $havethumb && @unlink($attachdir.'/'.$filename.'.thumb.jpg');
  203.         }
  204. }

  205. function emailconv($email, $tolink = 1) {
  206.         $email = str_replace(array('@', '.'), array('&#64;', '&#46;'), $email);
  207.         return $tolink ? '<a href="mailto: '.$email.'">'.$email.'</a>': $email;
  208. }

  209. function errorlog($type, $message, $halt = 1) {
  210.         global $timestamp, $discuz_userss, $onlineip, $_SERVER;
  211.         $user = empty($discuz_userss) ? '' : $discuz_userss.'<br>';
  212.         $user .= $onlineip.'|'.$_SERVER['REMOTE_ADDR'];
  213.         writelog('errorlog', dhtmlspecialchars("$timestamp\t$type\t$user\t".str_replace(array("\r", "\n"), array(' ', ' '), trim($message))));
  214.         if($halt) {
  215.                 dexit();
  216.         }
  217. }

  218. function getrobot() {
  219.         if(!defined('IS_ROBOT')) {
  220.                 $kw_spiders = 'Bot|Crawl|Spider|slurp|sohu-search|lycos|robozilla';
  221.                 $kw_browsers = 'MSIE|Netscape|Opera|Konqueror|Mozilla';
  222.                 if(preg_match("/($kw_browsers)/", $_SERVER['HTTP_USER_AGENT'])) {
  223.                         define('IS_ROBOT', FALSE);
  224.                 } elseif(preg_match("/($kw_spiders)/", $_SERVER['HTTP_USER_AGENT'])) {
  225.                         define('IS_ROBOT', TRUE);
  226.                 } else {
  227.                         define('IS_ROBOT', FALSE);
  228.                 }
  229.         }
  230.         return IS_ROBOT;
  231. }

  232. function fileext($filename) {
  233. function fileexname($filename) {
  234.         return trim(substr($filename,0,strpos($filename,".")));
  235. }

  236. function showswf() {
  237.                 echo "<span id=swfshow style=position:absolute;></span>
  238.                  <script type=text/javascript>
  239.                  var v = document.getElementById('swfshow');
  240.                  function showswf(sswf) {
  241.                          v.innerHTML='<OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/DuDuwflash.cab#version=4,0,2,0 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=70% height=70%><PARAM NAME=movie VALUE=images/dgiflash/'+sswf+'.swf><param name=menu value=false><PARAM NAME=quality VALUE=high><PARAM NAME=play VALUE=false><param name=wmode value=transparent><embed src=images/dgiflash/'+sswf+'.swf quality=high wmode=transparent pluginspage=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash type=application/x-shockwave-flash width=70% height=70%></embed>';       
  242.                                v.style.width=500+'px';
  243.                                v.style.height=500+'px';
  244.                                v.style.left=(document.documentElement.scrollLeft+200)+'px';
  245.                                v.style.top=document.documentElement.scrollTop+'px';
  246.                          v.style.display='block';
  247.                          onxx=setTimeout('closeswf()',7000);
  248.                  }
  249.                  function closeswf() {
  250.                          v.style.display='none';
  251.                          clearTimeout(onxx);
  252.                  }
  253.                  </script>";
  254. }
  255.         return trim(substr(strrchr($filename, '.'), 1, 10));
  256. }

  257. function formhash() {
  258.         global $discuz_user, $discuz_uid, $discuz_pw, $timestamp, $discuz_auth_key;
  259.         return substr(md5(substr($timestamp, 0, -7).$discuz_user.$discuz_uid.$discuz_pw.$discuz_auth_key), 8, 8);
  260. }

  261. function forumperm($permstr) {
  262.         global $groupid, $extgroupids;

  263.         $groupidarray = array($groupid);
  264.         foreach(explode("\t", $extgroupids) as $extgroupid) {
  265.                 if($extgroupid = intval(trim($extgroupid))) {
  266.                         $groupidarray[] = $extgroupid;
  267.                 }
  268.         }
  269.         return preg_match("/(^|\t)(".implode('|', $groupidarray).")(\t|$)/", $permstr);
  270. }

  271. function getgroupid($uid, $group, &$member) {
  272.         global $creditsformula, $db, $tablepre;

  273.         if(!empty($creditsformula)) {
  274.                 $updatearray = array();
  275.                 eval("\$credits = round($creditsformula);");

  276.                 if($credits != $member['credits']) {
  277.                         $updatearray[] = "credits='$credits'";
  278.                 }
  279.                 if($group['type'] == 'member' && !($member['credits'] >= $group['creditshigher'] && $member['credits'] < $group['creditslower'])) {
  280.                         $query = $db->query("SELECT groupid FROM {$tablepre}usergroups WHERE type='member' AND $member[credits]>=creditshigher AND $member[credits]<creditslower LIMIT 1");
  281.                         if($db->num_rows($query)) {
  282.                                 $member['groupid'] = $db->result($query, 0);
  283.                                 $updatearray[] = "groupid='$member[groupid]'";
  284.                         }
  285.                 }

  286.                 if($updatearray) {
  287.                         $db->query("UPDATE {$tablepre}members SET ".implode(', ', $updatearray)." WHERE uid='$uid'");
  288.                 }
  289.         }

  290.         return $member['groupid'];
  291. }

  292. function groupexpiry($terms) {
  293.         $terms = is_array($terms) ? $terms : unserialize($terms);
  294.         $groupexpiry = isset($terms['main']['time']) ? intval($terms['main']['time']) : 0;
  295.         if(is_array($terms['ext'])) {
  296.                 foreach($terms['ext'] as $expiry) {
  297.                         if((!$groupexpiry && $expiry) || $expiry < $groupexpiry) {
  298.                                 $groupexpiry = $expiry;
  299.                         }
  300.                 }
  301.         }
  302.         return $groupexpiry;
  303. }

  304. function ipaccess($ip, $accesslist) {
  305.         return preg_match("/^(".str_replace(array("\r\n", ' '), array('|', ''), preg_quote($accesslist, '/')).")/", $ip);
  306. }

  307. function ipbanned($onlineip) {
  308.         global $ipaccess, $timestamp, $cachelost;

  309.         if($ipaccess && !ipaccess($onlineip, $ipaccess)) {
  310.                 return TRUE;
  311.         }

  312.         $cachelost .= (@include DISCUZ_ROOT.'./forumdata/cache/cache_ipbanned.php') ? '' : ' ipbanned';
  313.         if(empty($_DCACHE['ipbanned'])) {
  314.                 return FALSE;
  315.         } else {
  316.                 if($_DCACHE['ipbanned']['expiration'] < $timestamp) {
  317.                         @unlink(DISCUZ_ROOT.'./forumdata/cache/cache_ipbanned.php');
  318.                 }
  319.                 return preg_match("/^(".$_DCACHE['ipbanned']['regexp'].")$/", $onlineip);
  320.         }
  321. }

  322. function isemail($email) {
  323.         return strlen($email) > 6 && preg_match("/^[\w\-\.]+@[\w\-\.]+(\.\w+)+$/", $email);
  324. }

  325. function language($file, $templateid = 0, $tpldir = '') {
  326.         $tpldir = $tpldir ? $tpldir : TPLDIR;
  327.         $templateid = $templateid ? $templateid : TEMPLATEID;

  328.         $languagepack = DISCUZ_ROOT.'./'.$tpldir.'/'.$file.'.lang.php';
  329.         if(file_exists($languagepack)) {
  330.                 return $languagepack;
  331.         } elseif($templateid != 1 && $tpldir != './templates/default') {
  332.                 return language($file, 1, './templates/default');
  333.         } else {
  334.                 return FALSE;
  335.         }
  336. }

  337. function multi($num, $perpage, $curpage, $mpurl, $maxpages = 0, $page = 10, $simple = 0, $onclick = '') {
  338.         $multipage = '';
  339.         $mpurl .= strpos($mpurl, '?') ? '&amp;' : '?';
  340.         $onclick = $onclick ? ' onclick="'.$onclick.'(event)"' : '';
  341.         if($num > $perpage) {
  342.                 $offset = 2;

  343.                 $realpages = @ceil($num / $perpage);
  344.                 $pages = $maxpages && $maxpages < $realpages ? $maxpages : $realpages;

  345.                 if($page > $pages) {
  346.                         $from = 1;
  347.                         $to = $pages;
  348.                 } else {
  349.                         $from = $curpage - $offset;
  350.                         $to = $from + $page - 1;
  351.                         if($from < 1) {
  352.                                 $to = $curpage + 1 - $from;
  353.                                 $from = 1;
  354.                                 if($to - $from < $page) {
  355.                                         $to = $page;
  356.                                 }
  357.                         } elseif($to > $pages) {
  358.                                 $from = $pages - $page + 1;
  359.                                 $to = $pages;
  360.                         }
  361.                 }

  362.                 $multipage = ($curpage - $offset > 1 && $pages > $page ? '<a href="'.$mpurl.'page=1" class="p_redirect"'.$onclick.'>|&lsaquo;</a>' : '').
  363.                         ($curpage > 1 && !$simple ? '<a href="'.$mpurl.'page='.($curpage - 1).'" class="p_redirect">&lsaquo;&lsaquo;</a>' : '');
  364.                 for($i = $from; $i <= $to; $i++) {
  365.                         $multipage .= $i == $curpage ? '<a class="p_curpage">'.$i.'</a>' :
  366.                                 '<a href="'.$mpurl.'page='.$i.'" class="p_num"'.$onclick.'>'.$i.'</a>';
  367.                 }

  368.                 $multipage .= ($curpage < $pages && !$simple ? '<a href="'.$mpurl.'page='.($curpage + 1).'" class="p_redirect"'.$onclick.'>&rsaquo;&rsaquo;</a>' : '').
  369.                         ($to < $pages ? '<a href="'.$mpurl.'page='.$pages.'" class="p_redirect"'.$onclick.'>&rsaquo;|</a>' : '').
  370.                         ($curpage == $maxpages ? '<a class="p_redirect" href="misc.php?action=maxpages&amp;pages='.$maxpages.'">&rsaquo;?</a>' : '').
  371.                         (!$simple && $pages > $page ? '<a class="p_pages" style="padding: 0px"><input class="p_input" type="text" name="custompage" onKeyDown="if(event.keyCode==13) {window.location=\''.$mpurl.'page=\'+this.value; return false;}"></a>' : '');

  372.                 $multipage = $multipage ? '<div class="p_bar">'.(!$simple ? '<a class="p_total">&nbsp;'.$num.'&nbsp;</a><a class="p_pages">&nbsp;'.$curpage.'/'.$realpages.'&nbsp;</a>' : '').$multipage.'</div>' : '';
  373.         }
  374.         return $multipage;
  375. }

  376. function output() {
  377.         global $sid, $transsidstatus, $rewritestatus, $ftp;

  378.         if(($transsidstatus = empty($GLOBALS['_DCOOKIE']['sid']) && $transsidstatus) || in_array($rewritestatus, array(2, 3))) {
  379.                 if($transsidstatus) {
  380.                         $searcharray = array
  381.                                 (
  382.                                 "/\<a(\s*[^\>]+\s*)href\=(["|\']?)([^"\'\s]+)/ies",
  383.                                 "/(\<form.+?\>)/is"
  384.                                 );
  385.                         $replacearray = array
  386.                                 (
  387.                                 "transsid('\\3','<a\\1href=\\2')",
  388.                                 "\\1\n<input type="hidden" name="sid" value="$sid">"
  389.                                 );
  390.                 } else {
  391.                         $searcharray = array
  392.                                 (
  393.                                 //"/\<a href\="index\.php"\>/",
  394.                                 "/\<a href\="forumdisplay\.php\?fid\=(\d+)(&amp;page\=(\d+))?"([^\>]*)\>/e",
  395.                                 "/\<a href\="viewthread\.php\?tid\=(\d+)(&amp;extra\=page\%3D(\d+))?(&amp;page\=(\d+))?"([^\>]*)\>/e",
  396.                                 "/\<a href\="viewpro\.php\?(uid\=(\d+)|username\=([^&]+?))"([^\>]*)\>/e",
  397.                                 "/\<a href\="space\.php\?(uid\=(\d+)|username\=([^&]+?))"([^\>]*)\>/e"
  398.                                 );
  399.                         $replacearray = array
  400.                                 (
  401.                                 //"<a href="index.html">",
  402.                                 "rewrite_forum('\\1', '\\3', '\\4')",
  403.                                 "rewrite_thread('\\1', '\\5', '\\3', '\\6')",
  404.                                 "rewrite_profile('\\2', '\\3', '\\4')",
  405.                                 "rewrite_space('\\2', '\\3', '\\4')"
  406.                                 );
  407.                 }

  408.                 $content = preg_replace($searcharray, $replacearray, ob_get_contents());
  409.                 ob_end_clean();
  410.                 $GLOBALS['gzipcompress'] ? ob_start('ob_gzhandler') : ob_start();

  411.                 echo $content;
  412.         }
  413.         if($ftp['connid']) {
  414.                 @ftp_close($ftp['connid']);
  415.         }
  416.         $ftp = array();

  417.         if(defined('CACHE_FILE') && CACHE_FILE && !defined('CACHE_FORBIDDEN')) {
  418.                 global $cachethreaddir;
  419.                 if(diskfreespace(DISCUZ_ROOT.'./'.$cachethreaddir) > 1000000) {
  420.                         $fp = fopen(CACHE_FILE, 'w');
  421.                         if($fp) {
  422.                                 flock($fp, LOCK_EX);
  423.                                 fwrite($fp, empty($content) ? ob_get_contents() : $content);
  424.                         }
  425.                         @fclose($fp);
  426.                 }
  427.         }
  428. }

  429. function rewrite_thread($tid, $page = 0, $prevpage = 0, $extra = '') {
  430.         return '<a href="thread-'.$tid.'-'.($page ? $page : 1).'-'.($prevpage ? $prevpage : 1).'.html"'.stripslashes($extra).'>';
  431. }

  432. function rewrite_forum($fid, $page = 0, $extra = '') {
  433.         return '<a href="forum-'.$fid.'-'.($page ? $page : 1).'.html"'.stripslashes($extra).'>';
  434. }

  435. function rewrite_profile($uid, $username, $extra = '') {
  436.         return '<a href="profile-'.($uid ? 'uid-'.$uid : 'username-'.$username).'.html"'.stripslashes($extra).'>';
  437. }

  438. function rewrite_space($uid, $username, $extra = '') {
  439.         return '<a href="space-'.($uid ? 'uid-'.$uid : 'username-'.$username).'.html"'.stripslashes($extra).'>';
  440. }

  441. function periodscheck($periods, $showmessage = 1) {
  442.         global $timestamp, $disableperiodctrl, $_DCACHE, $banperiods;

  443.         if(!$disableperiodctrl && $_DCACHE['settings'][$periods]) {
  444.                 $now = gmdate('G.i', $timestamp + $_DCACHE['settings']['timeoffset'] * 3600);
  445.                 foreach(explode("\r\n", str_replace(':', '.', $_DCACHE['settings'][$periods])) as $period) {
  446.                         list($periodbegin, $periodend) = explode('-', $period);
  447.                         if(($periodbegin > $periodend && ($now >= $periodbegin || $now < $periodend)) || ($oeriodbegin < $periodend && $now >= $periodbegin && $now < $periodend)) {
  448.                                 $banperiods = str_replace("\r\n", ', ', $_DCACHE['settings'][$periods]);
  449.                                 if($showmessage) {
  450.                                         showmessage('period_nopermission', NULL, 'NOPERM');
  451.                                 } else {
  452.                                         return TRUE;
  453.                                 }
  454.                         }
  455.                 }
  456.         }
  457.         return FALSE;
  458. }

  459. function quescrypt($questionid, $answer) {
  460.         return $questionid > 0 && $answer != '' ? substr(md5($answer.md5($questionid)), 16, 8) : '';
  461. }

  462. function random($length, $numeric = 0) {
  463.         PHP_VERSION < '4.2.0' && mt_srand((double)microtime() * 1000000);
  464.         if($numeric) {
  465.                 $hash = sprintf('%0'.$length.'d', mt_rand(0, pow(10, $length) - 1));
  466.         } else {
  467.                 $hash = '';
  468.                 $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
  469.                 $max = strlen($chars) - 1;
  470.                 for($i = 0; $i < $length; $i++) {
  471.                         $hash .= $chars[mt_rand(0, $max)];
  472.                 }
  473.         }
  474.         return $hash;
  475. }

  476. function removedir($dirname, $keepdir = FALSE) {

  477.         $dirname = wipespecial($dirname);

  478.         if(!is_dir($dirname)) {
  479.                 return FALSE;
  480.         }
  481.         $handle = opendir($dirname);
  482.         while(($file = readdir($handle)) !== FALSE) {
  483.                 if($file != '.' && $file != '..') {
  484.                         $dir = $dirname . DIRECTORY_SEPARATOR . $file;
  485.                         is_dir($dir) ? removedir($dir) : unlink($dir);
  486.                 }
  487.         }
  488.         closedir($handle);
  489.         return !$keepdir ? (@rmdir($dirname) ? TRUE : FALSE) : TRUE;
  490. }

  491. function sendmail($email_to, $email_subject, $email_message, $email_from = '') {
  492.         extract($GLOBALS, EXTR_SKIP);
  493.         require DISCUZ_ROOT.'./include/sendmail.inc.php';
  494. }

  495. function sendpm($toid, $subject, $message, $fromid = '', $from = '') {
  496.         extract($GLOBALS, EXTR_SKIP);
  497.         include language('pms');

  498.         if(isset($language[$subject])) {
  499.                 eval("\$subject = addslashes("".$language[$subject]."");");
  500.         }
  501.         if(isset($language[$message])) {
  502.                 eval("\$message = addslashes("".$language[$message]."");");
  503.         }

  504.         if(!$fromid && !$from) {
  505.                 $fromid = $discuz_uid;
  506.                 $from = $discuz_user;
  507.         }

  508.         $pmids = array();
  509.         foreach(explode(',', $toid) as $uid) {
  510.                 if(is_numeric($uid)) {
  511.                         $query = $db->query("INSERT INTO {$tablepre}pms (msgfrom, msgfromid, msgtoid, folder, new, subject, dateline, message)
  512.                                 VALUES ('$from', '$fromid', '$uid', 'inbox', '1', '$subject', '$timestamp', '$message')");
  513.                         if($query) {
  514.                                 $pmids[] = $uid;
  515.                         }
  516.                 }
  517.         }

  518.         if($toid = implodeids($pmids)) {
  519.                 $db->query("UPDATE {$tablepre}members SET newpm='1' WHERE uid IN ($toid)");
  520.         }
  521. }

  522. function showmessage($message, $url_forward = '', $extra = '') {
  523.         extract($GLOBALS, EXTR_SKIP);
  524.         global $extrahead, $discuz_action, $debuginfo, $seccode, $fid, $tid, $supe_fromsupesite, $supe_jumpurl, $supe, $charset, $show_message, $_DCACHE;
  525.         define('CACHE_FORBIDDEN', TRUE);
  526.         $supe_messagetpl = $supe_error = '';
  527.         $show_message = $message;
  528.         $msgforward = unserialize($_DCACHE['settings']['msgforward']);
  529.         $msgforward['refreshtime'] = intval($msgforward['refreshtime']);
  530.         $url_forward = empty($url_forward) ? '' : (empty($_DCOOKIE['sid']) && $transsidstatus ? transsid($url_forward) : $url_forward);

  531.         if($supe_fromsupesite && $supe['status']) {
  532.                 $supe_messagetpl = 'supesite_';
  533.                 $extra = '';
  534.                 $supe_error = $url_forward ? false : true;
  535.                 $url_forward = !empty($supe_jumpurl) && !$supe_error ? urldecode($supe_jumpurl) :  $url_forward;
  536.         } elseif($url_forward && empty($_GET['inajax']) && $msgforward['quick'] && $msgforward['messages'] && @in_array($message, $msgforward['messages'])) {
  537.                 updatesession();
  538.                 dheader("location: ".str_replace('&amp;', '&', $url_forward));
  539.         }

  540.         if(in_array($extra, array('HALTED', 'NOPERM'))) {
  541.                 $fid = $tid = 0;
  542.                 $discuz_action = 254;
  543.         } else {
  544.                 $discuz_action = 255;
  545.         }

  546.         include language('messages');

  547.         if(isset($language[$message])) {
  548.                 $supe_pre = $supe_fromsupesite ? 'supe_' : '';
  549.                 eval("\$show_message = "".($language[$supe_pre.$message] ? $language[$supe_pre.$message] : $language[$message])."";");
  550.                 unset($supe_pre);
  551.         }

  552.         ajaxtemplate('showmessage_ajax');

  553.         $extrahead .= $url_forward ? '<meta http-equiv="refresh" content="'.$msgforward['refreshtime'].' url='.$url_forward.'">' : '';

  554.         if($advlist = $advlist['redirect']) {
  555.                 foreach($advlist AS $type => $redirectadvs) {
  556.                         $advlist[$type] = $redirectadvs[array_rand($redirectadvs)];
  557.                 }
  558.         }

  559.         if($extra == 'NOPERM' && !$passport_status) {
  560.                 //get secure code checking status (pos. -2)
  561.                 if($seccodecheck = substr(sprintf('%05b', $seccodestatus), -2, 1)) {
  562.                         $seccode = random(6, 1) + $seccode{0} * 1000000;
  563.                 }
  564.                 include template('nopermission');
  565.         } else {
  566.                 include template($supe_messagetpl.'showmessage');
  567.         }
  568.         dexit();
  569. }

  570. function showstars($num) {
  571.         global $starthreshold;

  572.         $alt = 'alt="Rank: '.$num.'"';
  573.         if(empty($starthreshold)) {
  574.                 for($i = 0; $i < $num; $i++) {
  575.                         echo '<img src="'.IMGDIR.'/star_level1.gif" '.$alt.' />';
  576.                 }
  577.         } else {
  578.                 for($i = 3; $i > 0; $i--) {
  579.                         $numlevel = intval($num / pow($starthreshold, ($i - 1)));
  580.                         $num = ($num % pow($starthreshold, ($i - 1)));
  581.                         for($j = 0; $j < $numlevel; $j++) {
  582.                                 echo '<img src="'.IMGDIR.'/star_level'.$i.'.gif" '.$alt.' />';
  583.                         }
  584.                 }
  585.         }
  586. }

  587. function site() {
  588.         return $_SERVER['HTTP_HOST'];
  589. }

  590. function strexists($haystack, $needle) {
  591.         return !(strpos($haystack, $needle) === FALSE);
  592. }

  593. function seccodeconvert(&$seccode) {
  594.         $seccode = substr($seccode, -6);
  595.         $s = sprintf('%04s', base_convert($seccode, 10, 24));
  596.         $seccode = '';
  597.         $seccodeunits = 'BCEFGHJKMPQRTVWXY2346789';
  598.         for($i = 0; $i < 4; $i++) {
  599.                 $unit = ord($s{$i});
  600.                 $seccode .= ($unit >= 0x30 && $unit <= 0x39) ? $seccodeunits[$unit - 0x30] : $seccodeunits[$unit - 0x57];
  601.         }
  602. }

  603. function submitcheck($var, $allowget = 0, $seccodecheck = 0, $secqaacheck = 0) {
  604.         if(empty($GLOBALS[$var])) {
  605.                 return FALSE;
  606.         } else {
  607.                 global $_SERVER, $seccode, $seccodeverify, $secanswer, $_DCACHE;
  608.                 if($allowget || ($_SERVER['REQUEST_METHOD'] == 'POST' && $GLOBALS['formhash'] == formhash() && (empty($_SERVER['HTTP_REFERER']) ||
  609.                         preg_replace("/https?:\/\/([^\:\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) == preg_replace("/([^\:]+).*/", "\\1", $_SERVER['HTTP_HOST'])))) {
  610.                         if($seccodecheck) {
  611.                                 $tmp = $seccode{0};
  612.                                 seccodeconvert($seccode);
  613.                                 if(strtoupper($seccodeverify) != $seccode) {
  614.                                         showmessage('submit_seccode_invalid');
  615.                                 }
  616.                                 $seccode = random(6, 1) + $tmp * 1000000;
  617.                         }
  618.                         if($secqaacheck) {
  619.                                 require_once DISCUZ_ROOT.'./forumdata/cache/cache_secqaa.php';
  620.                                 if(md5($secanswer) != $_DCACHE['secqaa'][substr($seccode, 0, 1)]['answer']) {
  621.                                         showmessage('submit_secqaa_invalid');
  622.                                 }
  623.                                 $seccode = random(1, 1) * 1000000 + substr($seccode, -6);
  624.                         }
  625.                         return TRUE;
  626.                 } else {
  627.                         showmessage('submit_invalid');
  628.                 }
  629.         }
  630. }

  631. function supe_submitcheck($allowget = 0, $timespan = 300) {
  632.         global $supe_seccode, $timestamp, $_DCOOKIE, $supe, $supe_fromsupesite;
  633.         $supe_hash = isset($_GET['supe_hash']) || isset($_POST['supe_hash']) ?
  634.                 (isset($_GET['supe_hash']) ? $_GET['supe_hash'] : $_POST['supe_hash']) :
  635.                 (isset($_DCOOKIE['supe_hash']) ? $_DCOOKIE['supe_hash'] : '');
  636.         if($supe_fromsupesite && $supe['status'] && ($allowget || $_SERVER['REQUEST_METHOD'] == 'POST') && $supe_hash && !empty($supe_seccode)) {
  637.                 list($check_timestamp, $check_seccode) = explode("\t", authcode($supe_hash, 'DECODE'));
  638.                 if($timestamp - $check_timestamp <= $timespan && $check_seccode == $supe_seccode) {
  639.                         return TRUE;
  640.                 }
  641.                 showmessage('submit_invalid');
  642.         }
  643.         return FALSE;
  644. }

  645. function template($file, $templateid = 0, $tpldir = '') {
  646.         global $tplrefresh;

  647.         $tpldir = $tpldir ? $tpldir : TPLDIR;
  648.         $templateid = $templateid ? $templateid : TEMPLATEID;

  649.         $tplfile = DISCUZ_ROOT.'./'.$tpldir.'/'.$file.'.htm';
  650.         $objfile = DISCUZ_ROOT.'./forumdata/templates/'.$templateid.'_'.$file.'.tpl.php';
  651.         if(TEMPLATEID != 1 && $templateid != 1 && !file_exists($tplfile)) {
  652.                 return template($file, 1, './templates/default/');
  653.         }
  654.         if($tplrefresh == 1 || ($tplrefresh > 1 && substr($GLOBALS['timestamp'], -1) > $tplrefresh)) {
  655.                 if(@filemtime($tplfile) > @filemtime($objfile)) {
  656.                         require_once DISCUZ_ROOT.'./include/template.func.php';
  657.                         parse_template($file, $templateid, $tpldir);
  658.                 }
  659.         }
  660.         return $objfile;
  661. }

  662. function transsid($url, $tag = '', $wml = 0) {
  663.         global $sid;
  664.         $tag = stripslashes($tag);
  665.         if(!$tag || (!preg_match("/^(http:\/\/|mailto:|#|javascript)/i", $url) && !strpos($url, 'sid='))) {
  666.                 if($pos = strpos($url, '#')) {
  667.                         $urlret = substr($url, $pos);
  668.                         $url = substr($url, 0, $pos);
  669.                 } else {
  670.                         $urlret = '';
  671.                 }
  672.                 $url .= (strpos($url, '?') ? ($wml ? '&amp;' : '&') : '?').'sid='.$sid.$urlret;
  673.         }
  674.         return $tag.$url;
  675. }

  676. function typeselect($curtypeid = 0) {
  677.         if($threadtypes = $GLOBALS['forum']['threadtypes']) {
  678.                 $html = '<select name="typeid"><option value="0">&nbsp;</option>';
  679.                 foreach($threadtypes['types'] as $typeid => $name) {
  680.                         $html .= '<option value="'.$typeid.'" '.($curtypeid == $typeid ? 'selected' : '').'>'.strip_tags($name).'</option>';
  681.                 }
  682.                 $html .= '</select>';
  683.                 return $html;
  684.         } else {
  685.                 return '';
  686.         }
  687. }

  688. function updatecredits($uids, $creditsarray, $coef = 1, $extrasql = '') {
  689.         if($uids && ((!empty($creditsarray) && is_array($creditsarray)) || $extrasql)) {
  690.                 global $db, $tablepre;
  691.                 $creditsadd = $comma = '';
  692.                 foreach($creditsarray as $id => $addcredits) {
  693.                         $creditsadd .= $comma.'extcredits'.$id.'=extcredits'.$id.'+('.intval($addcredits).')*('.$coef.')';
  694.                         $comma = ', ';
  695.                 }

  696.                 if($creditsadd || $extrasql) {
  697.                         $db->query("UPDATE {$tablepre}members SET $creditsadd ".($creditsadd && $extrasql ? ', ' : '')." $extrasql WHERE uid IN ('$uids')", 'UNBUFFERED');
  698.                 }
  699.         }
  700. }

  701. function updatesession() {
  702.         if(!empty($GLOBALS['sessionupdated'])) {
  703.                 return TRUE;
  704.         }

  705.         global $db, $tablepre, $sessionexists, $sessionupdated, $sid, $onlineip, $discuz_uid, $discuz_user, $timestamp, $lastactivity, $seccode,
  706.                 $pvfrequence, $spageviews, $lastolupdate, $oltimespan, $onlinehold, $groupid, $styleid, $invisible, $discuz_action, $fid, $tid, $bloguid;

  707.         $fid = intval($fid);
  708.         $tid = intval($tid);

  709.         if($oltimespan && $discuz_uid && $lastactivity && $timestamp - ($lastolupdate ? $lastolupdate : $lastactivity) > $oltimespan * 60) {
  710.                 $lastolupdate = $timestamp;
  711.                 $db->query("UPDATE {$tablepre}onlinetime SET total=total+'$oltimespan', thismonth=thismonth+'$oltimespan', lastupdate='$timestamp' WHERE uid='$discuz_uid' AND lastupdate<='".($timestamp - $oltimespan * 60)."'");
  712.                 if(!$db->affected_rows()) {
  713.                         $db->query("INSERT INTO {$tablepre}onlinetime (uid, thismonth, total, lastupdate)
  714.                                 VALUES ('$discuz_uid', '$oltimespan', '$oltimespan', '$timestamp')", 'SILENT');
  715.                 }
  716.         } else {
  717.                 $lastolupdate = intval($lastolupdate);
  718.         }

  719.         if($sessionexists == 1) {
  720.                 if($pvfrequence && $discuz_uid) {
  721.                         if($spageviews >= $pvfrequence) {
  722.                                 $pageviewsadd = ', pageviews=\'0\'';
  723.                                 $db->query("UPDATE {$tablepre}members SET pageviews=pageviews+'$spageviews' WHERE uid='$discuz_uid'", 'UNBUFFERED');
  724.                         } else {
  725.                                 $pageviewsadd = ', pageviews=pageviews+1';
  726.                         }
  727.                 } else {
  728.                         $pageviewsadd = '';
  729.                 }
  730.                 $db->query("UPDATE {$tablepre}sessions SET uid='$discuz_uid', username='$discuz_user', groupid='$groupid', styleid='$styleid', invisible='$invisible', action='$discuz_action', lastactivity='$timestamp', lastolupdate='$lastolupdate', seccode='$seccode', fid='$fid', tid='$tid', bloguid='$bloguid' $pageviewsadd WHERE sid='$sid'");
  731.         } else {
  732.                 $ips = explode('.', $onlineip);

  733.                 $db->query("DELETE FROM {$tablepre}sessions WHERE sid='$sid' OR lastactivity<($timestamp-$onlinehold) OR ('$discuz_uid'<>'0' AND uid='$discuz_uid') OR (uid='0' AND ip1='$ips[0]' AND ip2='$ips[1]' AND ip3='$ips[2]' AND ip4='$ips[3]' AND lastactivity>$timestamp-60)");
  734.                 $db->query("INSERT INTO {$tablepre}sessions (sid, ip1, ip2, ip3, ip4, uid, username, groupid, styleid, invisible, action, lastactivity, lastolupdate, seccode, fid, tid, bloguid)
  735.                         VALUES ('$sid', '$ips[0]', '$ips[1]', '$ips[2]', '$ips[3]', '$discuz_uid', '$discuz_user', '$groupid', '$styleid', '$invisible', '$discuz_action', '$timestamp', '$lastolupdate', '$seccode', '$fid', '$tid', '$bloguid')", 'SILENT');
  736.                 if($discuz_uid && $timestamp - $lastactivity > 21600) {
  737.                         if($oltimespan && $timestamp - $lastactivity > 86400) {
  738.                                 $query = $db->query("SELECT total FROM {$tablepre}onlinetime WHERE uid='$discuz_uid'");
  739.                                 $oltimeadd = ', oltime='.round(intval($db->result($query, 0)) / 60);
  740.                         } else {
  741.                                 $oltimeadd = '';
  742.                         }
  743.                         $db->query("UPDATE {$tablepre}members SET lastip='$onlineip', lastvisit=lastactivity, lastactivity='$timestamp' $oltimeadd WHERE uid='$discuz_uid'", 'UNBUFFERED');
  744.                 }
  745.         }

  746.         $sessionupdated = 1;
  747. }

  748. function updatemodworks($modaction, $posts = 1) {
  749.         global $modworkstatus, $db, $tablepre, $discuz_uid, $timestamp, $_DCACHE;
  750.         $today = gmdate('Y-m-d', $timestamp + $_DCACHE['settings']['timeoffset'] * 3600);
  751.         if($modworkstatus && $modaction && $posts) {
  752.                 $db->query("UPDATE {$tablepre}modworks SET count=count+1, posts=posts+'$posts' WHERE uid='$discuz_uid' AND modaction='$modaction' AND dateline='$today'");
  753.                 if(!$db->affected_rows()) {
  754.                         $db->query("INSERT INTO {$tablepre}modworks (uid, modaction, dateline, count, posts) VALUES ('$discuz_uid', '$modaction', '$today', 1, '$posts')");
  755.                 }
  756.         }
  757. }

  758. function writelog($file, $log) {
  759.         global $timestamp, $_DCACHE;
  760.         $yearmonth = gmdate('Ym', $timestamp + $_DCACHE['settings']['timeoffset'] * 3600);
  761.         $logdir = DISCUZ_ROOT.'./forumdata/logs/';
  762.         $logfile = $logdir.$yearmonth.'_'.$file.'.php';
  763.         if(@filesize($logfile) > 2048000) {
  764.                 $dir = opendir($logdir);
  765.                 $length = strlen($file);
  766.                 $maxid = $id = 0;
  767.                 while($entry = readdir($dir)) {
  768.                         if(strexists($entry, $yearmonth.'_'.$file)) {
  769.                                 $id = intval(substr($entry, $length + 8, -4));
  770.                                 $id > $maxid && $maxid = $id;
  771.                         }
  772.                 }
  773.                 closedir($dir);

  774.                 $logfilebak = $logdir.$yearmonth.'_'.$file.'_'.($maxid + 1).'.php';
  775.                 @rename($logfile, $logfilebak);
  776.         }
  777.         if($fp = @fopen($logfile, 'a')) {
  778.                 @flock($fp, 2);
  779.                 $log = is_array($log) ? $log : array($log);
  780.                 foreach($log as $tmp) {
  781.                         fwrite($fp, "<?PHP exit;?>\t".str_replace(array('<?', '?>'), '', $tmp)."\n");
  782.                 }
  783.                 fclose($fp);
  784.         }
  785. }

  786. function implodeids($array) {
  787.         if(!empty($array)) {
  788.                 return "'".implode("','", is_array($array) ? $array : array($array))."'";
  789.         } else {
  790.                 return '';
  791.         }
  792. }

  793. function ajaxshowheader() {
  794.         global $charset;
  795.         @header("Expires: -1");
  796.         @header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
  797.         @header("Pragma: no-cache");
  798.         header("Content-type: application/xml");
  799.         echo "<?xml version="1.0" encoding="$charset"?>\n<root><![CDATA[";
  800. }

  801. function ajaxshowfooter() {
  802.         echo ']]></root>';
  803. }

  804. function ajaxtemplate($tplname) {
  805.         if(!empty($_GET['inajax'])) {
  806.                 extract($GLOBALS, EXTR_SKIP);
  807.                 updatesession();
  808.                 ajaxshowheader();
  809.                 include template($tplname);
  810.                 ajaxshowfooter();
  811.                 die();
  812.         }
  813. }

  814. function wipespecial($str) {
  815.         return str_replace(array('..', "\n", "\r"), array('', '', ''), $str);
  816. }

  817. function supe_dbconnect() {
  818.         global $supe, $db;
  819.         if(empty($supe['dbmode'])) {
  820.                 $supe['db'] = $db;
  821.         } elseif(empty($supe['db'])) {
  822.                 $supe['db'] = new dbstuff;
  823.                 $supe['db']->connect($supe['dbhost'], $supe['dbuser'], $supe['dbpw'], $supe['dbname'], $supe['pconnect']);
  824.         }
  825. }

  826. ?>
复制代码
回复

使用道具 举报

 楼主| 逆雪寒 发表于 2007-4-4 16:32:45 | 显示全部楼层
后台smilies和主题图标之间的选项  ?? 那个什么??


楼上那个是对了 showswf()这个函数你也加了.
你更新下缓存
回复

使用道具 举报

shuyufeng 发表于 2007-4-4 16:37:09 | 显示全部楼层

回复 #64 逆雪寒 的帖子

就是后台"魔法表情设置"这个出不来,另外viewthread里的那个眼睛也出不来,我改的是手动修改.说明里的该改的都改了.
回复

使用道具 举报

卧轨 发表于 2007-4-4 16:38:22 | 显示全部楼层
原帖由 shuyufeng 于 2007-4-4 16:14 发表
我之前用frontpage改了,就出错了....后来用ultraedit改就没事.

另外还想问一下,全部文件都改过了,也更新了缓存,但是后台smilies和主题图标之间的选项却不显示,不知道为什么...



应该是frontpage的编码不同吧...
回复

使用道具 举报

卧轨 发表于 2007-4-4 16:39:15 | 显示全部楼层
....好想用啊...
   但是论坛数据库出错了,
现在还米恢复..
回复

使用道具 举报

sachem 发表于 2007-4-4 16:41:38 | 显示全部楼层
出现
Fatal error: Call to undefined function: showswf() in F:\wwwroot\juyebbs\bbs\admin\dgismiles.inc.php on line 18
是怎么回事啊
回复

使用道具 举报

 楼主| 逆雪寒 发表于 2007-4-4 16:44:07 | 显示全部楼层
原帖由 shuyufeng 于 2007-4-4 16:37 发表
就是后台"魔法表情设置"这个出不来,另外viewthread里的那个眼睛也出不来,我改的是手动修改.说明里的该改的都改了.



9 templates\default\模板下的 viewthread.htm  文件

先找到  <img src="http://wpa.qq.com/pa?p=1post[qq]:4"  border="0" alt="QQ" /></a><!--{/if}-->

在他下面加

<a href="dgi.php?action=send&uid=$post[uid]"><img src="images/common/gif055.gif" height="15" border="0" alt="{lang bgi}" /></a>

这个你加了吗???这个就是那个眼睛的代码
只要加了就肯定显示 ~  

怎么大家都不太会装呀.
如果大家不会装的话.覆盖安装吧
不过先把文件备份呀.

另外新人的话.想试效果的话.建议装我那个全新安装的那个吧.哪个什么都不用修改了.直接安装就行了
回复

使用道具 举报

bonusboy29 发表于 2007-4-4 16:55:11 | 显示全部楼层
建议可以 做成

1。 设置成要哪个组有权限可以发这个魔法表情
2。 可在以发帖时选择魔法表情,发帖者可以设置 其他会员看帖 要不要显示魔法表情 做为个性化
3。 高级会员可以选择要不要显示魔法表情
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-5-2 17:36 , Processed in 0.129384 second(s), 15 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表