content;
$content = _parseReply($content);
if (strpos($content, '{x}') !== false || strpos($content, '{ }') !== false) {
$content = strtr($content, array(
"{x}" => '',
"{ }" => ''
));
}
if (strpos($content, '{music') !== false) {
$content = preg_replace('/{music-list([^}]*)\/}/SU', '', $content);
$content = preg_replace('/{music([^}]*)\/}/SU', '', $content);
}
if (strpos($content, '{bilibili') !== false) {
$content = preg_replace('/{bilibili([^}]*)\/}/SU', '', $content);
}
if (strpos($content, '{dplayer') !== false) {
$player = Helper::options()->JCustomPlayer ? Helper::options()->JCustomPlayer : Helper::options()->themeUrl . '/library/player.php?url=';
$content = preg_replace('/{dplayer([^}]*)\/}/SU', '', $content);
}
if (strpos($content, '{mtitle') !== false) {
$content = preg_replace('/{mtitle([^}]*)\/}/SU', '', $content);
}
if (strpos($content, '{abtn') !== false) {
$content = preg_replace('/{abtn([^}]*)\/}/SU', '', $content);
}
if (strpos($content, '{anote') !== false) {
$content = preg_replace('/{anote([^}]*)\/}/SU', '', $content);
}
/* 过滤默认卡片 */
if (strpos($content, '{card-default') !== false) {
$content = preg_replace('/{card-default(.*)}/SU', '', $content);
$content = preg_replace('/{\/card-default}/SU', '', $content);
}
/* 过滤回复可见 */
if (strpos($content, '{hide') !== false) {
$db = Typecho_Db::get();
$hasComment = $db->fetchAll($db->select()->from('table.comments')->where('cid = ?', $post->cid)->where('mail = ?', $post->remember('mail', true))->limit(1));
if ($hasComment || $login) {
$content = strtr($content, array("{hide}" => "", "{/hide}" => ""));
} else {
$content = strtr($content, array("{hide}" => "", "{/hide}" => ""));
}
}
/* 过滤复制粘贴功能 */
if (strpos($content, '{copy') !== false) {
$content = preg_replace('/{copy(.*)}/SU', '', $content);
$content = preg_replace('/{\/copy}/SU', '', $content);
}
/* 过滤消息提示 */
if (strpos($content, '{message') !== false) {
$content = preg_replace('/{message(.*)}/SU', '', $content);
$content = preg_replace('/{\/message}/SU', '', $content);
}
/* 时间线 */
if (strpos($content, '{timeline') !== false) {
$content = strtr($content, array("{timeline}" => '', "{/timeline}" => ''));
$content = strtr($content, array("{timeline-item}" => '', "{/timeline-item}" => ''));
}
echo $content;
}