演示图:
{/gird-item}
{gird-item}
{/gird-item}
1.修改functions.php文件,新增如下代码;文件路径:usr/themes/Joe-master(如果是自定义的话 则修改 custom.php)
$JPrevent = new Typecho_Widget_Helper_Form_Element_Select(
'JPrevent',
array('off' => '关闭(默认)', 'on' => '开启'),
'off',
'请选择是否开启QQ防红拦截',
'介绍:开启后,如果在QQ里打开网站,则会提示跳转浏览器打开'
);
$JPrevent->setAttribute('class', 'joe_content joe_custom'); // 如果后台无法展示该设置,将joe_custom修改为joe_other
$form->addInput($JPrevent->multiMode());
2.新增prevent.php文件 文件路径:usr/themes/Joe-master/public
3.修改include.php文件,顶部新增,路径如下:usr/themes/Joe-master/public
<?php if ($this->options->JPrevent === 'on') : ?>
<?php $this->need('public/prevent.php'); ?>
<?php endif; ?>
{/tabs-pane}
{tabs-pane label="位置"}
{/tabs-pane}
我目前域名未被拦截,如果有被拦截的,就可以试试拦截的时候开启跳转提示,申诉通过后就关闭跳转提示!
评论 (0)