1、打开根目录下的options.php文件,搜索“选择分类设置为网站公告”,在其下一行添加以下代码:
- $options[] = array("name" => __("首页公告", "haoui"), "type" => "heading");
- $options[] = array("id" => "site_notice_s", "std" => false, "desc" => __("显示公告模块", "haoui"), "type" => "checkbox");
- $options[] = array("name" => __("显示标题", "haoui"), "id" => "site_notice_title", "desc" => "建议4字内,默认:网站公告", "std" => "网站公告", "type" => "text");
- $options[] = array("name" => __("选择分类设置为网站公告", "haoui"), "id" => "site_notice_cat", "options" => $options_categories, "type" => "select");
- $options[] = array(‘name‘ => __(‘强烈推荐‘, ‘haoui‘), ‘type‘ => ‘heading‘);
- $options[] = array(‘id‘ => ‘site_tuijian_s‘, ‘std‘ => false, ‘desc‘ => __(‘显示推荐模块‘, ‘haoui‘), ‘type‘ => ‘checkbox‘);
- $options[] = array(‘name‘ => __(‘显示标题‘, ‘haoui‘), ‘id‘ => ‘site_tuijian_title‘, ‘desc‘ => ‘建议4字内,默认:强烈推荐‘, ‘std‘ => ‘强烈推荐‘, ‘type‘ => ‘text‘);
- $options[] = array(‘name‘ => __(‘显示文本‘, ‘haoui‘), ‘id‘ => ‘site_tuijian_text‘, ‘desc‘ => ‘可自定义,默认:andykwok.cc强烈推荐:<strong>AndyKwok.cc分享所分享的</strong>‘, ‘std‘ => ‘andykwok.cc强烈推荐:andykwok.cc<br><strong>AndyKwok.cc最好的Blog</strong>‘, ‘type‘ => ‘textarea‘);
- $options[] = array(‘name‘ => __(‘按钮 ‘, ‘haoui‘) , ‘id‘ => ‘site_tuijian_button‘ , ‘desc‘ => ‘按钮文字‘, ‘std‘ => ‘点击查看‘, ‘type‘ => ‘text‘);
- $options[] = array(‘id‘ => ‘site_tuijian_url‘ , ‘desc‘ => __(‘按钮链接‘, ‘haoui‘), ‘std‘ => ‘http://www.andykwok.cc/‘, ‘type‘ => ‘text‘);
- $options[] = array(‘id‘ => ‘site_tuijian_blank‘ , ‘std‘ => false, ‘desc‘ => __(‘新窗口打开‘, ‘haoui‘), ‘type‘ => ‘checkbox‘);
- $options[] = array(‘name‘ => __(‘联系我们‘, ‘haoui‘), ‘type‘ => ‘heading‘);
- $options[] = array(‘id‘ => ‘site_aboutus_s‘, ‘std‘ => false, ‘desc‘ => __(‘显示联系我们模块‘, ‘haoui‘), ‘type‘ => ‘checkbox‘);
- $options[] = array(‘name‘ => __(‘显示标题‘, ‘haoui‘), ‘id‘ => ‘site_aboutus_title‘, ‘desc‘ => ‘可自定义,默认:联系我们‘, ‘std‘ => ‘联系我们‘, ‘type‘ => ‘text‘);
- $options[] = array(‘name‘ => __(‘显示文本‘, ‘haoui‘), ‘id‘ => ‘site_aboutus_text‘, ‘desc‘ => ‘可自定义,默认:<h2>如有疑问,请留言或邮件咨询 <br>admin@andykwok.cc</h2>‘, ‘std‘ => ‘<h2>如有疑问,请留言或邮件咨询 <br>admin@andykwok.cc</h2>‘, ‘type‘ => ‘textarea‘);
2、打开modules文件目录,找到文件no_notice.php找开,搜索:
- echo "\t\t</ul>\r\n\t</div>\r\n";
在其实上面添加以下代码:
- if ($s_aboutus && _hui("site_aboutus_s")) {
- echo "\t\t\t\t<li class=\"item item-04";
- echo $s_aboutus && !$s_notice ? " active" : "";
- echo "\">\r\n\t\t\t\t\t<h2>\r\n\t\t\t\t\t\t";
- echo _hui("site_aboutus_text") ? _hui("site_aboutus_text") : "联系我们";
- echo "\t\t\t\t\t</h2>\r\n\t\t\t\t</li>\r\n\t\t\t";
搜索:
- echo "\t\t</ul>\r\n\t\t<ul class=\"widget-navcontent\">\r\n\t\t\t";
在其上面添加以下代码:
- if ($s_tuijian) {
- echo "<li";
- echo $s_tuijian && !$s_notice ? " class=\"active\"" : "";
- echo ">强烈推荐</li>";
- }
- if ($s_aboutus) {
- echo "<li";
- echo $s_aboutus && !$s_notice ? " class=\"active\"" : "";
- echo ">联系我们</li>";
搜索:
- _moloader("mo_get_user_page", false);
在其后添加以下代码:
- $s_tuijian = _hui("site_tuijian_s");
- $s_aboutus = _hui("site_aboutus_s");
PS:将更改过的options.php和mo_notice.php文件上传覆盖(注意备份),上传文件后登陆后台,然后在外观DUX主题设置中找到推荐和联系模板开启即可。