Home > CMS Tutorial > Discuz > How to remove discuz copyright

How to remove discuz copyright

藏色散人
Release: 2023-02-24 09:22:03
Original
3076 people have browsed it

How to remove discuz copyright: 1. Find and open the "header_common.htm" file and delete the "Powered by Discuz!" content; 2. Find and open the "footer.htm" file and delete "Powered" by ME" content.

How to remove discuz copyright

The operating environment of this tutorial: Windows 7 system, Discuz X3.2 version, DELL G3 computer

How to remove discuz copyright?

【Discuz】Remove the copyright information, modify the title bar and bottom

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">&copy; 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里面的代码不一定要带版权信息的,你可以完全可以换成自己的里面,空空是也也可以但一定要保留
这三个标签,这与上面拼接的页面形成呼应关系的。
也就是说,如果想自己写footer.htm应该这样写:
</div>
<!--你要写的内容-->
</body>
</html>
Copy after login
才能与上面的页面形成呼应。
大家也留意到,用Dreamweaver修改的时候会不停地提示错误警告,这主要是footer.htm与header_common.htm两个页面根本就不是一个完整的html页面。

Discuz的代码其实写得并不怎么样的,如果没有网上的修改资料,根本就看不懂里面的代码。因为其很多页面,可能是怕程序猿能轻易修改的缘故,或者历次开发,经过多人修改的缘故,都一一割裂开来,但不可否认这是一个非常不错的php的工程。

相关推荐:《discuz教程

The above is the detailed content of How to remove discuz copyright. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template