MrDoc删除自带广告
MrDoc删除自带广告
- what: MrDoc删除自带广告
- where: centos7 x86
- when: 2022-2-12
- who: JRT
- why: 记录
- how:
首页
1.删除首页最下面广告
vi template/app_doc/foot_base.html 4
.. <a href="https://mrdoc.pro">MrDoc 2019-2021</a> |
<a href="https://zmister.com" target="_blank">............</a>...... |
<a href="{% url 'sitemap' %}" target="_blank">{% trans "............" %}</a>
2.删除首页随便进入文档,左侧显示本文档使用MrDoc发布
vi template/app_doc/docs_base.html 177
<div class="bq">
<a href="javascript:void(0);" class="mrdoc-link" id="dashang">{% trans "............... MrDoc ......" %}</a>
</div>
vi template/app_doc/tag_doc_base.html 91
<div class="bq">
<a href="javascript:void(0);" class="mrdoc-link" id="dashang">{% trans "............... MrDoc ......" %}</a>
</div>
个人中心
1.删除用户-个人中心-使用手册
在 app_doc/views_user.py约191行删除以下内容:
vi app_doc/views_user.py
{
"id": "user_manual",
"title": _("............"),
"icon": "layui-icon layui-icon-template-1",
"type": 1,
"openType": "_blank",
"href": "https://doc.mrdoc.pro/project-54/",
}
2.删除打赏
#<!-- 打赏选项卡模板 -->
vim template/app_doc/tag_doc_base.html 226
vim template/app_doc/docs_base.html:310
vim template/app_admin/admin_overview.html 199
191 <div class="layui-card">
192 <div class="layui-card-header">捐赠 - 请作者喝杯奶茶吧</div>
193 <div class="layui-card-body">
194 <p align="center">
195 <img src="{% static 'dashang/dashang_wx.webp' %}" height=200>
196 <img src="{% static 'dashang/dashang_alipay.webp' %}" height=200>
197 </p>
198 </div>
199 </div>
<div id="dashang_img" style="display: none;">
<div>
<div class="layui-tab-content" style="height: 100px;">
<div style="text-align: center;font-size: 16px;font-weight: 500;padding-top: 10px;">...... MrDoc</div><hr>
<div style="padding: 10px;"><a href="https://mrdoc.pro/" target="_blank">............MrDoc</a>...<a href="https://zmister.com/" target="_blank"><strong>...........
<div style="padding: 10px;">.......................................................................................................................................
<div class="" style="display:flex;justify-content:space-around;flex-wrap:wrap;">
<div class="" align='center' style="">
<p>......</p>
<img src="{% static 'dashang/dashang_wx.webp' %}" style="width: 180px;height: auto;" />
</div>
<div class="" align='center'>
<p>.........</p>
<img src="{% static 'dashang/dashang_alipay.webp' %}" style="width: 180px;height: auto;" />
</div>
<div class="" align='center'>
<p>QQ</p>
<img src="{% static 'dashang/dashang_qq.webp' %}" style="width: 180px;height: auto;" />
</div>
<div class="" align='center'>
<p>PayPal</p>
<a href="https://paypal.me/zmister" target="_blank">
<img src="{% static 'dashang/dashang_paypal.png' %}" style="width: 180px;height: auto;" />
</a>
</div>
</div>
</div>
</div>
2.删除用户-个人中心-右下角广告
#支持项目发展,米思官网等
在template/app_doc/manage/manage_overview.html约152行删除该div
vi template/app_doc/manage/manage_overview.html
<div class="layui-card-header">
{% trans "......" %}
<div class="layui-card-body">
<a target="_blank" href="http://mrdoc.zmister.com/project-7/doc-434/" class="pear-btn pear-btn-primary layui-btn-fluid" style="height: 50px;line-height
<i class="layui-icon layui-icon-praise"></i> {% trans ".................." %}
</a>
<br/>
<a target="_blank" href="https://mrdoc.pro" class="pear-btn pear-btn-success layui-btn-fluid" style="margin-top: 8px;height: 50px;line-height: 50px;">
<i class="layui-icon layui-icon-website"></i> {% trans "... ... ... ... ... ..." %}
</a>
<br/>
<a target="_blank" href="https://doc.mrdoc.pro/project-54/" class="pear-btn pear-btn-primary layui-btn-fluid" style="margin-top: 8px;height: 50px;line
<i class="layui-icon layui-icon-read"></i> {% trans "... ... ... ..." %}
</a>
<br/>
<a target="_blank" href="https://gitee.com/zmister/MrDoc" class="pear-btn pear-btn-warming layui-btn-fluid" style="margin-top: 8px;height: 50px;line-h
<i class="layui-icon layui-icon-download-circle"></i> {% trans "... ... ... ..." %}
</a>
</div>
后台
1.删除后台右下角
vi template/app_admin/admin_overview.html 192
#捐赠 - 请作者喝杯奶茶吧及支付宝二维码
<div class="layui-card-header">...... - ........................</div>
<div class="layui-card-body">
<p align="center">
<img src="{% static 'dashang/dashang_wx.webp' %}" height=200>
<img src="{% static 'dashang/dashang_alipay.webp' %}" height=200>
</p>
</div>
2.删除后台觅思文档访问gitee等
vi template/app_admin/admin_overview.html 111
<div class="layui-card-header">............ {{mrdoc_version}}</div>
<div class="layui-card-body">
<div style="margin-bottom: 5px;">
<a href="https://doc.mrdoc.pro/project-7/doc-3441/" class="pear-btn layui-btn-fluid" target="_blank">
<i class="layui-icon layui-icon-rate-solid" style="color:rgb(242, 203, 81);"></i>...........................
</a>
</div>
<div style="margin-bottom: 5px;">
<a href="https://gitee.com/zmister/MrDoc" class="pear-btn layui-btn-fluid" target="_blank">...... Gitee</a>
</div>
<div style="margin-bottom: 5px;">
<a href="https://github.com/zmister2016/MrDoc" class="pear-btn layui-btn-fluid" target="_blank">...... GitHub</a>
</div>
<div style="margin-bottom: 5px;">
<a href="http://shang.qq.com/wpa/qunwpa?idkey=143c23a4ffbd0ba9137d2bce3ee86c83532c05259a0542a69527e36615e64dba" class="pear-btn layui-btn-fluid" ta
</div>
<div style="margin-bottom: 5px;">
<button class="pear-btn layui-btn-fluid" onclick="checkUpdate()">..................</button>
</div>
</div>
<div style="margin-bottom: 5px;">
96 <a href="https://doc.mrdoc.pro/project-7/doc-3441/" class="pear-btn layui-btn-fluid" target="_blank">
97 <i class="layui-icon layui-icon-rate-solid" style="color:rgb(242, 203, 81);"></i>
98 <span style="font-weight:700;color:red;">升级专业版享折扣!</span>
99 </a>
100 </div>
101 <div style="margin-bottom: 5px;">
102 <a href="https://gitee.com/zmister/MrDoc" class="pear-btn layui-btn-fluid" target="_blank">访问 Gitee</a>
103 </div>
104 <div style="margin-bottom: 5px;">
105 <a href="https://github.com/zmister2016/MrDoc" class="pear-btn layui-btn-fluid" target="_blank">访问 GitHub</a>
106 </div>
107 <div style="margin-bottom: 5px;">
108 <a href="http://shang.qq.com/wpa/qunwpa?idkey=143c23a4ffbd0ba9137d2bce3ee86c83532c05259a0542a69527e36615e64dba" class="pear-btn layui-btn-fluid " target="_blank">加入 QQ群</a>
109 </div>
3.删除后台左侧使用帮助
vi app_admin/views.py 1467
{
"id": "common",
"title": _("............"),
"icon": "layui-icon layui-icon-template-1",
"type": 0,
"href": "",
"children": [{
"id": 701,
"title": _("............"),
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_blank",
"href": "https://doc.mrdoc.pro/project-7/"
}, {
"id": 702,
"title": _("............"),
"icon": "layui-icon layui-icon-face-smile",
"type": 1,
"openType": "_blank",
"href": "https://doc.mrdoc.pro/project-54/"
}]
}
4.删除版本更新后,后台弹窗
vi template/app_admin/admin_base.html 47
<script async>
layui.use(['jquery','layer'], function() {
let $ = layui.jquery;
let layer = layui.layer;
// ..................
checkUpdate = function(silence=false){
$.get("{% url 'check_update' %}",function(r){
// console.log(r)
if(r.status){
var new_version = r.data.name.slice(1,6)
var current_version = '{{mrdoc_version}}'
console.log(new_version,current_version)
if(new_version > current_version){
console.log("...............")
layer.open({
title:"{% trans '............' %}",
content:"{% trans '............................................
})
}else{
if(silence == false){
layer.msg("...........................")
}
}
}
})
}
checkUpdate(silence=true);
})
</script>
5.删除个人中心设置更改风格背景中qq打赏等
vim template/app_admin/admin_center.html 135 vim template/app_doc/user/user_center.html 151
"links": [{
135 "icon": "layui-icon layui-icon-website",
136 "title": "官方网站",
137 "href": "https://mrdoc.pro"
138 },
139 {
140 "icon": "layui-icon layui-icon-read",
141 "title": "说明文档",
142 "href": "https://doc.mrdoc.pro/project-7/"
143 },
144 {
145 "icon": "layui-icon layui-icon-fonts-code",
146 "title": "开源地址",
147 "href": "https://gitee.com/zmister/MrDoc"
148 },
149 {
150 "icon": "layui-icon layui-icon-survey",
151 "title": "QQ群",
152 "href": "http://shang.qq.com/wpa/qunwpa?idkey=143c23a4ffbd0ba9137d2bce3ee86c83532c05259a0542a69527e36615e64dba"
153 },
154 {
155 "icon": "layui-icon layui-icon-log",
156 "title": "当前版本:{{mrdoc_version}}",
157 "href": "https://gitee.com/zmister/MrDoc/tree/{{mrdoc_version}}/"
158 }
159 ],
6.删除注册页觅思文档 - 私有云知识库部署方案
vim template/register.html 105
<hr>
<span style="font-size: 12px;color: #666;">觅思文档 - 私有云知识库部署方案</span>
7.删除登录页觅思文档 - 私有云知识库部署方案
template/login.html 108
<hr>
<span style="font-size: 12px;color: #666;">觅思文档 - 私有云知识库部署方案</span>
8.替换首页及搜索页logo
/app/MrDoc/static/search/mrdoc_search_logo.svg
/app/MrDoc/static/search/mrdoc_search_logo_2.svg
/app/MrDoc/static/logo.svg
9.删除精准搜索页广告(© 2019-2021 by 州的先生 . All rights reserved.)
vim template/app_doc/search.html 47
<div class="foot">.. 2019-2021 by <a href="https://zmister.com/">............</a> . All rights reserved.</div>
10.解决搜索页图片logo溢出问题
vi static/mrdoc/mrdoc-search.css 70
.con .shlogo {
position: relative;
height:120px;
weight:480px;
margin: 20px auto;
background: url(/static/search/mrdoc_search_logo.svg) no-repeat center/cover;
background-size: 80% 80%;
11.网站首页底部加友链
/app/MrDoc # cat template/app_doc/foot_base.html
{% load i18n %}
<div class="layui-footer" style="border-top: 1px #e6e6e6 solid;text-align:center;margin-top:38px;width:100%;">
<div style="margin-top:10px;padding-bottom: 10px;">
{% if beian_code != None and beian_code != '' %}
<a href="http://beian.miit.gov.cn/" target="_blank">{{beian_code}}</a>
友情链接 : <a href="https://xueyafang.fun/" target="_blank" >学涯坊</a>
<a href="https://www.runoob.com/" target="_blank">菜鸟教程</a>
<a href="https://www.wuhen.online/" target="_blank">无痕网</a>
{% endif %}
</div>
</div>
删除编辑页面广告
# vim static/editor.md/plugins/help-dialog/help.md
##### MrDoc使用文档
- [http://mrdoc.zmister.com](http://mrdoc.zmister.com)
##### MrDoc项目地址
- [https://gitee.com/zmister/MrDoc](https://gitee.com/zmister/MrDoc)
- [https://github.com/zmister2016/MrDoc](https://github.com/zmister2016/MrDoc)
重置密码
[root@VM-4-9-centos MrDoc]# grep -nr "重置密码验证码"
Binary file locale/zh_Hant/LC_MESSAGES/django.mo matches
locale/zh_Hant/LC_MESSAGES/django.po:21:msgid "MrDoc - 重置密码验证码"
Binary file locale/en/LC_MESSAGES/django.mo matches
locale/en/LC_MESSAGES/django.po:22:msgid "MrDoc - 重置密码验证码"
app_admin/utils.py:37: subject = "MrDoc - 重置密码验证码"