• Discuz!NT 在线显示列表 游客 bug 修复


    引发bug的条件:当你修改了系统组里面的[游客]组 的名字后!!

    你会发现首页上底部的在线显示列表里始终都是显示"游客"字样而非你改过得字样!如图

    至此你需要运行一个t-sql脚本去修复这个bug!(但是本人不建议修改论坛源代码的方式去修复这个bug!)

    fix bug:

    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    
    ALTER PROCEDURE [dbo].[dnt_getonlineuserlist]
    AS
    SELECT [olid]
          ,[userid]
          ,[ip]
          ,REPLACE([username], N'游客', (select top 1 grouptitle from dbo.dnt_usergroups where groupid = 7)) as [username]--,[username]
          ,REPLACE([nickname], N'游客', (select top 1 grouptitle from dbo.dnt_usergroups where groupid = 7)) as [nickname]--,[nickname]
          ,[password]
          ,[groupid]
          ,[olimg]
          ,[adminid]
          ,[invisible]
          ,[action]
          ,[lastactivity]
          ,[lastposttime]
          ,[lastpostpmtime]
          ,[lastsearchtime]
          ,[lastupdatetime]
          ,[forumid]
          ,[forumname]
          ,[titleid]
          ,[title]
          ,[verifycode]
          ,[newpms]
          ,[newnotices] FROM [dnt_online]
    GO
    
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    

      这里的groupid = 7的数字7就是游客组的主键~~如果你那边不是的话请自行替换~~

    适用版本:Discuz!NT 3.6.711 (已测试通过)

    效果图:

    感言:我去TMD的开源论坛!

    本文到此结束!谢谢.

  • 相关阅读:
    2073: [POI2004]PRZ
    BZOJ 3669: [Noi2014]魔法森林
    Dominator Tree & Lengauer-Tarjan Algorithm
    BZOJ 3526: [Poi2014]Card
    BZOJ 2733: [HNOI2012]永无乡
    BZOJ 2929: [Poi1999]洞穴攀行
    BZOJ 3730: 震波
    BZOJ 1778: [Usaco2010 Hol]Dotp 驱逐猪猡
    BZOJ 1195: [HNOI2006]最短母串
    BZOJ 4030: [HEOI2015]小L的白日梦
  • 原文地址:https://www.cnblogs.com/highend/p/2606499.html
Copyright © 2020-2023  润新知