4) { echo 'https://thirdqq.qlogo.cn/g?b=qq&nk=' . $qqMail . '&s=100'; } else { echo $gravatarsUrl . $md5MailLower . '?d=mm'; } }; function _getAsideAuthorMotto() { $JMottoRandom = explode("\r\n", Helper::options()->JAside_Author_Motto); echo $JMottoRandom[array_rand($JMottoRandom, 1)]; } function _getAsideAuthorNav() { if (Helper::options()->JAside_Author_Nav !== "off") { $db = Typecho_Db::get(); $adapterName = $db->getAdapterName(); if ($adapterName == 'pgsql' || $adapterName == 'Pdo_Pgsql' || $adapterName == 'Pdo_SQLite' || $adapterName == 'SQLite') { $order_by = 'RANDOM()'; } else { $order_by = 'RAND()'; } $result = $db->fetchAll( $db->select() ->from('table.contents') ->where('status = ?', 'publish') ->where('type = ?', 'post') ->where('password IS NULL') ->limit(Helper::options()->JAside_Author_Nav) ->order($order_by) ); foreach ($result as $item) { $obj = Typecho_Widget::widget('Widget_Abstract_Contents'); $item = $obj->push($item); $title = htmlspecialchars($item['title']); $permalink = $item['permalink']; echo "
  • {$title}
  • "; } } } function themeFields($layout) { $aside = new Typecho_Widget_Helper_Form_Element_Radio( 'aside', array( 'on' => '开启', 'off' => '关闭' ), 'on', '是否开启当前页面的侧边栏', '介绍:用于单独设置当前页侧边栏的开启状态
    注意:只有在外观设置侧边栏开启状态下生效' ); $layout->addItem($aside); }