wikitten部署在IIS环境子目录下
1.在所在子目录(如本例中的/wiki/目录)创建Web.config文件,内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="rule 1t" stopProcessing="true">
<match url="^/wiki/(?!static).*$" />
<action type="Rewrite" url="/wiki/library/{R:1}" appendQueryString="true" />
</rule>
<rule name="rule 2t" stopProcessing="true">
<match url="^(?!static).*$" />
<action type="Rewrite" url="/wiki/index.php" appendQueryString="true" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
2.修改views/render.php文件25行和35行进行文件名编码转换避免出现乱码:
$path[] = iconv("GBK", "UTF-8", $part);
echo iconv("GBK", "UTF-8", $part);
dokuwiki安装index menu plugin后提示禁用defer_js
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模板增加杂项
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模板报错解决
typecho的bytecats3模板启用后前后台报错:
syntax error, unexpected end of file
解决方法:
模板文件functions.php第171行:
<? }
改为:
<?php }
此错误在部分未启用短标签 short tags的环境中出现。也可以直接启用短标签 short tags来解决。