Site icon 时鹏亮的Blog

Discuz!如何去掉插件以及升级更新提示?

请知悉:本文最近一次更新为 10年 前,文中内容可能已经过时。

没细看,思路就是把

source/module/misc/misc_patch.php

文件里的检测部分都注释掉就好,我的文件改为如下:

<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: misc_patch.php 33690 2013-08-02 09:07:22Z nemohou $
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
if($_GET['action'] == 'checkpatch') {
header('Content-Type: text/JavaScript');
/*if($_G['uid'] && $_G['member']['allowadmincp'] == 1) {
$Discuz!_patch = new Discuz!_patch();
$Discuz!_patch->check_patch();
}*/
exit;
} elseif($_GET['action'] == 'patchnotice') {
$patchlist = '';
/*if($_G['member']['allowadmincp'] == 1) {
$Discuz!_patch = new Discuz!_patch();
$patchnotice = $Discuz!_patch->fetch_patch_notice();
if(!empty($patchnotice['data'])) {
$lang = lang('forum/misc');
$patchlist .= '<div class="bm'.($patchnotice['fixed'] ' allfixed' : '').'"><div class="bm_h cl"><a href="JavaScript:;" onclick="$('patch_notice').style.display='none'" class="y" title="'.$lang['patch_close'].'">'.$lang['patch_close'].'</a><h2 class="i">';
if($patchnotice['fixed']) {
$patchlist .= $lang['patch_site_have'].' '.count($patchnotice['data']).' '.$lang['patch_is_fixed'];
} else {
$patchlist .= $lang['patch_site_have'].' '.count($patchnotice['data']).' '.$lang['patch_need_fix'];
}
$patchlist .= '</h2></div><div class="bm_c"><table width="100%" class="mbm"><tr><th>'.$lang['patch_name'].'</th><th class="patchdate">'.$lang['patch_dateline'].'</th><th class="patchstat">'.$lang['patch_status'].'</th><tr>';
foreach($patchnotice['data'] as $notice) {
$patchlist .= '<tr><td>'.$notice['serial'].'</td><td>'.dgmdate($notice['dateline'], 'Y-m-d').'</td><td>';
if($notice['status'] >= 1) {
$patchlist .= '<span class="fixed">'.$lang['patch_fixed_status'].'<span>';
} elseif($notice['status'] < 0) {
$patchlist .= '<span class="unfixed">'.$lang['patch_fix_failed_status'].'</span>';
} else {
$patchlist .= '<span class="unfixed">'.$lang['patch_unfix_status'].'</span>';
}
$patchlist .= '</td></tr>';
}
$patchlist .= '</table><p class="cl"><a href="admin.php action=patch" class="y pn"><strong>'.($patchnotice['fixed'] $lang['patch_view_fix_detail'] : $lang['patch_fix_right_now']).'</strong></a></p>';
$patchlist .= '</div></div>';
}
}*/
include template('common/header_ajax');
echo $patchlist;
include template('common/footer_ajax');
exit;
} elseif($_GET['action'] == 'pluginnotice') {
/*require_once libfile('function/admincp');
require_once libfile('function/plugin');
require_once libfile('function/cloudaddons');
$pluginarray = C::t('common_plugin')->fetch_all_data();
$addonids = $vers = array();
foreach($pluginarray as $row) {
if(ispluginkey($row['identifier'])) {
$addonids[] = $row['identifier'].'.plugin';
$vers[$row['identifier'].'.plugin'] = $row['version'];
}
}
$checkresult = dunserialize(cloudaddons_upgradecheck($addonids));
savecache('addoncheck_plugin', $checkresult);
$newversion = 0;
foreach($checkresult as $addonid => $value) {
list(, $newver, $sysver) = explode(':', $value);
if($sysver && $sysver > $vers[$addonid] || $newver) {
$newversion++;
}
}*/
include template('common/header_ajax');
/*if($newversion) {
$lang = lang('forum/misc');
echo '<div class="bm"><div class="bm_h cl"><a href="JavaScript:;" onclick="$('plugin_notice').style.display='none';setcookie('pluginnotice', 1, 86400)" class="y" title="'.$lang['patch_close'].'">'.$lang['patch_close'].'</a>';
echo '<h2 class="i">'.$lang['plugin_title'].'</h2></div><div class="bm_c">';
echo '<div class="cl bbda pbm">'.lang('forum/misc', 'plugin_memo', array('number' => $newversion)).'</div>';
echo '<div class="ptn cl"><a href="admin.php action=plugins" class="xi2 y">'.$lang['plugin_link'].' &raquo;</a></div>';
echo '</div></div>';
}*/
include template('common/footer_ajax');
exit;
} elseif($_GET['action'] == 'ipnotice') {
require_once libfile('function/misc');
include template('common/header_ajax');
/*if($_G['cookie']['lip'] && $_G['cookie']['lip'] != ',' && $_G['uid'] && $_G['setting']['disableipnotice'] != 1) {
$status = C::t('common_member_status')->fetch($_G['uid']);
$lip = explode(',', $_G['cookie']['lip']);
$lastipConvert = convertip($lip[0]);
$lastipDate = dgmdate($lip[1]);
$nowipConvert = convertip($status['lastip']);
$lastipConvert = process_ipnotice($lastipConvert);
$nowipConvert = process_ipnotice($nowipConvert);
if($lastipConvert != $nowipConvert && stripos($lastipConvert, $nowipConvert) == false && stripos($nowipConvert, $lastipConvert) == false) {
$lang = lang('forum/misc');
include template('common/ipnotice');
}
}*/
include template('common/footer_ajax');
exit;
}

如您从本文得到了有价值的信息或帮助,请考虑扫描文末二维码捐赠和鼓励。

尊重他人劳动成果。转载请务必附上原文链接,我将感激不尽。


与《Discuz!如何去掉插件以及升级更新提示?》相关的博文:

Exit mobile version