The operating environment of this tutorial: Windows 7 system, Discuz X3.2 version, DELL G3 computer
Although this article introduces how to remove the copyright information of Discuz! It disappeared without a trace, but it is still recommended to retain the copyright information of Discuz without affecting the visual effect of the forum. After all, it contributed to me such an excellent open source forum php project. The main purpose is to use the opportunity of thinking about removing copyright information to learn to modify the title bar and bottom of the Discuz! project.
Here we take the default template and the Discuz project without any modifications as an example.
Discuz!'s copyright information first exists in two places, one is the title bar and the other is the bottom.
First of all, the title bar file of Discuz is hidden in the file ..\template\default\common\header_common.htm. Be careful not to confuse it with the header.htm, it has nothing to do with it.
Find lines 6-16 inside as shown below:
In the title node, the $navtitle variable represents the title of the current page. $_G['setting']['bbname'] represents the noun of the current site. This can be changed in the admin background. Powered by Discuz! is the copyright information attached to Discuz. $_G['setting']['seohead'], this is the title you attach to the admin background.
As shown below, in Discuz's admin background->Global->SEO Settings->Others->Other header information, the information filled in is $_G['setting'][' seohead'] information.
After that, as shown below, in Global->Site Information, the site name you fill in will affect $_G['setting']['bbname '] value.
By the way, other settings of site information, website name, website URL, etc. will affect the information in the lower right corner.
In other words, if you want to take out the copyright information, the only modification you need is to change Powered by Discuz! to Powered by Me!, etc. Or delete it, and the result will be as shown below:
Of course, you can write some static text on the title node for convenience.
is followed by some meta tags on lines 9 to 16, which are used to describe the attributes of an HTML web page document, such as author, date and time, web page description, and keywords. They are only used to cooperate with some search engines. Find your forum better. Change it to whatever it is.
base href specifies the base URL for all relative URLs on the page, that is, all absolute paths../ will be replaced with the information here, and generally no modification is needed here.
is followed by Discuz’s footer modification, which also contains Discuz’s copyright information.
Discuz’s footer is hidden in ..\template\default\common\footer.htm
In lines 77-80, the div node with the id of frt, as shown in the following figure:
This is just a bunch of p, a, strong and other html tags. Please feel free to modify it in this tag with the id of frt, $_G['setting'] ['version'] This variable represents the current version number of Discuz.
For example, change to the following code:
<div id="frt">
<p>Powered by <strong>ME</strong>
<p class="xs0">© 1900-2100</p>
</div>
Copy after login
will get the following effect:
当然,还是那句话,不建议这么做。毕竟人家怎么无私奉献出一个开源的php论坛出来不容易。
至于有人上面的Discuz友情链接怎么去掉?这里不用改代码,直接在后台里面->运营->友情链接中,该怎么改就怎么改,可以直接关闭。
最后在右下角的信息修改,这里上面说过已经怎么在admin后台那修改。但你可以直接改代码。写出更多东西。
就紧贴上面的58-76行id为flk的div里面。如下图所示:
比如我不想显示当前站点的名称,可以直接将第63行有关$_G['setting']['sitename']这个变量的a标签直接弄走。修改之后如下图所示,加粗的站点名称不见了。
至此,整个Discuz的论坛的所有版权信息全部去掉。
因为整个Discuz论坛的所有页面都在引用header_common与footer两个页面,因此这样一修改,整个论坛都改好了。
同时说一句,整个footer.htm里面的代码不一定要带版权信息的,你可以完全可以换成自己的里面,空空是也也可以但一定要保留