效果截图

Test

教程开始

1.修改config.php,文件路径:/usr/themes/Joe-master/public,添加如下代码:

{tabs}
{tabs-pane label="代码"}

var copyRightText = '<?php $this->options->CopyRightText() ?>';

{/tabs-pane}
{tabs-pane label="代码安装位置"}
1.png

{/tabs-pane}
{/tabs}

2.修改custom.js,文件路径:usr/themes/Joe-master/assets/js,添加如下代码:

{tabs}
{tabs-pane label="代码"}

// 复制弹出提示

document.body.oncopy = function() {

if(copyRightText) {
    Qmsg.warning(copyRightText);
}

};

{/tabs-pane}
{tabs-pane label="代码安装位置"}
2.png
{/tabs-pane}
{/tabs}

3.修改include.php,文件路径:/usr/themes/Joe-master/public,添加如下代码:

{tabs}
{tabs-pane label="代码"}

<script src="<?php $this->options->themeUrl('assets/js/custom.js'); ?>"></script>

{/tabs-pane}
{tabs-pane label="代码安装位置"}
3.png
{/tabs-pane}
{/tabs}

4.修改custom.php文件,文件路径:usr/themes/Joe-master/public,添加如下代码:

{tabs}
{tabs-pane label="代码"}

// 复制内容弹窗提醒
$CopyRightText = new Typecho_Widget_Helper_Form_Element_Text(

'CopyRightText',
NULL,
NULL,
'网站复制时提醒内容',
'介绍:填写此处,有人复制网站内容则弹出该提示 &lt;br /&gt;'

);
$CopyRightText->setAttribute('class', 'joe_content joe_custom');
$form-&gt;addInput($CopyRightText->multiMode());

{/tabs-pane}
{tabs-pane label="代码安装位置"}
4.png
{/tabs-pane}
{/tabs}

分类: 经验教程 标签: TypechoJoe

评论

暂无评论数据

暂无评论数据

目录