使用替换功能
删除包含指定内容的整行
- 查找:^.*关键词.*$
- 替换为:空
删除包含指定内容的整行(不保留空行)
- 查找:^.*关键词.*r?n
- 替换为:空
删除指定内容开头的整行
- 查找:^关键词.*$
- 替换为:空
删除指定内容开头的整行(不保留空行)
- 查找:^关键词.*r?n
- 替换为:空
删除包含指定内容的整行
删除包含指定内容的整行(不保留空行)
删除指定内容开头的整行
删除指定内容开头的整行(不保留空行)
dokuwiki安装index menu plugin后提示禁用defer_js:
Indexmenu Plugin: If you use the 'js'-option of the indexmenu plugin, you have to disable the 'defer_js'-setting. This setting is temporary, in the future the indexmenu plugin will be improved.
解决方法:
修改conf目录下dokuwiki.php第167行为:
167: $conf['defer_js'] = 0;
typecho的bytecats3模板默认sidebar没有杂项,后台入口隐藏的比较深。如果需要显示杂项,需要修改以下两处:
1.在sidebar.php文件中“热门标签”对应代码后面增加:
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowOther', $this->options->sidebarBlock)): ?>
<section class="widget">
<h3 class="widget-title"><?php _e('其它'); ?></h3>
<ul class="widget-list">
<?php if($this->user->hasLogin()): ?>
<li class="last"><a href="<?php $this->options->adminUrl(); ?>"><?php _e('进入后台'); ?> (<?php $this->user->screenName(); ?>)</a></li>
<li><a href="<?php $this->options->logoutUrl(); ?>"><?php _e('退出'); ?></a></li>
<?php else: ?>
<li class="last"><a href="<?php $this->options->adminUrl('login.php'); ?>"><?php _e('登录'); ?></a></li>
<?php endif; ?>
<li><a href="<?php $this->options->feedUrl(); ?>"><?php _e('文章 RSS'); ?></a></li>
</ul>
</section>
<?php endif; ?>
2.在functions.php文件中修改后台控制代码:
将原代码:
'ShowTags' => _t('显示标签')),
array('ShowSearch', 'ShowCategory', 'ShowRecentPosts', 'ShowArchive', 'ShowTags'), _t('侧边栏显示'));
修改为:
'ShowTags' => _t('显示标签'),
'ShowOther' => _t('显示其它杂项')),
array('ShowSearch', 'ShowCategory', 'ShowRecentPosts', 'ShowArchive', 'ShowTags', 'ShowOther'), _t('侧边栏显示'));
typecho的bytecats3模板启用后前后台报错:
syntax error, unexpected end of file
解决方法:
模板文件functions.php第171行:
<? }
改为:
<?php }
此错误在部分未启用短标签 short tags的环境中出现。也可以直接启用短标签 short tags来解决。
错误提示:ModuleNotFoundError: No module named 'pytz'
root@VM-16-14-ubuntu:~# easy_install --upgrade pytz
easy_install: command not found
安装easy_install:
root@VM-16-14-ubuntu:~# wget https://bootstrap.pypa.io/ez_setup.py -O - | python
然后执行:
easy_install --upgrade pytz