本文共 126 个字数,平均阅读时长 ≈ 1分钟
usr/themes/Joe/public/header.php
options->JBarragerStatus === 'on') : ?>
widget('Widget_Comments_Recent@index', 'pageSize=15')->to($comments); ?>
have()) : ?>
next()) : ?>
content); ?>
options->JBarragerStatus === 'on') : ?>
options->JBarragerStatus === 'on') : ?>
usr/themes/Joe/public/include.php
options->JBarragerStatus === 'on') : ?>
usr/themes/Joe/functions.php
$JBarragerStatus = new Typecho_Widget_Helper_Form_Element_Select(
'JBarragerStatus',
array('off' => '关闭(默认)', 'on' => '开启'),
'off',
'是否开启弹幕功能(仅限PC)',
'介绍:开启后,网站将会显示评论弹幕功能,该功能采用CSS动画引擎,并非传统JS操作DOM,无任何性能消耗。'
);
$JBarragerStatus->setAttribute('class', 'joe_content joe_other');
$form->addInput($JBarragerStatus->multiMode());
usr/themes/Joe/public/config.php
/* 弹幕 */
DOCUMENT_BARRAGER: 'options->JBarragerStatus === 'on' ? 'on' : 'off' ?>'
usr/themes/Joe/library