<?php
$themename = $dname.'主题';
$options = array(
"d_description", "d_keywords", "d_tui", "d_logo_w", "d_sticky_b", "d_sticky_count", "d_linkpage_cat", "d_tougao_b", "d_tougao_time", "d_tougao_mailto", "d_avatar_b", "d_avatarDate", "d_sideroll_b", "d_sideroll_1", "d_sideroll_2", "d_pingback_b", "d_autosave_b", "d_tqq_b", "d_tqq", "d_weibo_b", "d_weibo", "d_facebook_b", "d_facebook", "d_twitter_b", "d_twitter", "d_rss", "d_bdshare", "d_maillist_b", "d_maillist", "d_track_b", "d_track", "d_headcode_b", "d_headcode", "d_footcode_b", "d_footcode", "d_adsite_01_b", "d_adsite_01", "d_adindex_02_b", "d_adindex_02", "d_adindex_01_b", "d_adindex_01", "d_adindex_03_b", "d_adindex_03", "d_adpost_01_b", "d_adpost_01", "d_adpost_02_b", "d_adpost_02", "d_adpost_03_b", "d_adpost_03", "d_sign_b", "d_jquerybom_b", "d_ajaxpager_b", "d_thumbnail_b", "d_bdshare_b", "d_related_count", "d_post_views_b", "d_post_author_b", "d_post_comment_b", "d_post_time_b"
);
function mytheme_add_admin() {
global $themename, $options;
if ( $_GET['page'] == basename(__FILE__) ) {
if ( 'save' == $_REQUEST['action'] ) {
foreach ($options as $value) {
update_option( $value, $_REQUEST[ $value ] );
}
header("Location: admin.php?page=d8.php&saved=true");
die;
}
}
add_theme_page($themename." Options", $themename."设置", 'edit_themes', basename(__FILE__), 'mytheme_admin');
}
function mytheme_admin() {
global $themename, $options;
$i=0;
if ( $_REQUEST['saved'] ) echo '<div class="updated settings-error"><p>'.$themename.'修改已保存</p></div>';
?>
<div class="wrap d_wrap">
<link rel="stylesheet" href="<?php bloginfo('template_url') ?>/admin/admin.css"/>
<h2><?php echo $themename; ?>设置
<span class="d_themedesc">发布来源:<a href="http://www.thefox.cn/wordpress-d8.shtml" target="_blank">商业主题</a> <a href="http://www.thefox.cn/wordpress-d8.shtml" target="_blank">访问<?php echo $themename; ?>主页</a></span>
</h2>
<form method="post" class="d_formwrap">
<table>
<thead>
<tr>
<th width="200"></th>
<th></th>
</tr>
</thead>
<tr>
<td class="d_tit">网站描述</td>
<td>
<input class="ipt-b" type="text" id="d_description" name="d_description" value="<?php echo dopt('d_description'); ?>">
</td>
</tr>
<tr>
<td class="d_tit">网站关键字</td>
<td>
<input class="ipt-b" type="text" id="d_keywords" name="d_keywords" value="<?php echo dopt('d_keywords'); ?>">
</td>
</tr>
<tr>
<td class="d_tit">最新消息</td>
<td>
<textarea name="d_tui" id="d_tui" type="textarea" rows=""><?php echo dopt('d_tui'); ?></textarea>
<span class="d_tip">最新消息显示在全站导航条下方,非常给力的推广位置</span>
</td>
</tr>
<tr>
<td class="d_tit">Logo(标志)宽度</td>
<td>
<input class="d_num" name="d_logo_w" id="d_logo_w" type="number" value="<?php echo dopt('d_logo_w'); ?>"> px(像素)
<span class="d_tip">设置符合您站点Logo的宽度,Logo图片在主题igm文件夹下替换logo.png</span>
</td>
</tr>
<tr>
<td class="d_tit">首页置顶推荐</td>
<td>
<label class="checkbox inline">
<input type="checkbox" id="d_sticky_b" name="d_sticky_b" <?php if(dopt('d_sticky_b')) echo 'checked="checked"' ?>>开启
</label>
显示<input class="d_num" name="d_sticky_count" id="d_sticky_count" type="number" value="<?php echo dopt('d_sticky_count'); ?>">条 默认2条
<span class="d_tip">开启后请确保您的后台-文章中设置了3篇以上的置顶文章</span>
</td>
</tr>
<tr>
<td class="d_tit">友情链接页面</td>
<td>
<label class="checkbox inline">
只显示分类ID为 <input name="d_linkpage_cat" id="d_linkpage_cat" type="text" value="<?php echo dopt('d_linkpage_cat'); ?>"> 的链接(id之间用英文逗号隔开),默认显示全部
</label>
</td>
</tr>
<tr>
<td class="d_tit">文章无特色图时不显示默认缩略图</td>
<td>
<label class="checkbox inline">
<input type="checkbox" id="d_thumbnail_b" name="d_thumbnail_b" <?php if(dopt('d_thumbnail_b')) echo 'checked="checked"' ?>>开启
</label>
</td>
</tr>
<tr>
<td class="d_tit">列表Ajax加载分页内容</td>
<td>
<label class="checkbox inline">
<input type="checkbox" id="d_ajaxpager_b" name="d_ajaxpager_b" <?php if(dopt('d_ajaxpager_b')) echo 'checked="checked"' ?>>开启
</label>
</td>
</tr>
<tr>
<td class="d_tit">列表文章属性开关</td>
<td>
<label class="checkbox inline">
<input type="checkbox" id="d_post_views_b" name="d_post_views_b" <?php if(dopt('d_post_views_b')) echo 'checked="checked"' ?>>不显示访客数
</label>
<label class="checkbox inline">
<input type="checkbox" id="d_post_author_b" name="d_post_author_b" <?php if(dopt('d_post_author_b')) echo 'checked="checked"' ?>>不显示作者
</label>
<label class="checkbox inline">
<input type="checkbox" id="d_post_comment_b" name="d_post_comment_b" <?php if(dopt('d_post_comment_b')) echo 'checked="checked"' ?>>不显示评论数
</label>
<label class="checkbox inline">
<input type="checkbox" id="d_post_time_b" name="d_post_time_b" <?php if(dopt('d_post_time_b')) echo 'checked="checked"' ?>>不显示时间
</label>
</td>
</tr>
<tr>
<td class="d_tit">文章页 - 相关文章显示条数</td>
<td>
显示<input class="d_num" name="d_related_count" id="d_related_count" type="number" value="<?php echo dopt('d_related_count'); ?>">条 默认 12
</td>
</tr>
<tr>
<td class="d_tit">jQuery底部加载</td>
<td>
<label class="checkbox inline">
<input type="checkbox" id="d_jquerybom_b" name="d_jquerybom_b" <?php if(dopt('d_jquerybom_b')) echo 'checked="checked"' ?>>开启
</label>
<span class="d_tip">jQuery默认在head区域加载,如果需要页面载入加速,请开启,但是有可能影响部分依赖jQuery的插件失效。</span>
</td>
</tr>
<tr>
<td class="d_tit">用户登录信息</td>
<td>
<label class="checkbox inline">
<input type="checkbox" id="d_sign_b" name="d_sign_b" <?php if(dopt('d_sign_b')) echo 'checked="checked"' ?>>开启
</label>
</td>
</tr>
<tr>
<td class="d_tit">投稿</td>
<td>
<label class="checkbox inline">
<input type="checkbox" id="d_tougao_b" name="d_tougao_b" <?php if(dopt('d_tougao_b')) echo 'checked="checked"' ?>>开启
</label>
投稿时间间隔 <input class="d_num" name="d_tougao_time" id="d_tougao_time" type="number" value="<?php echo dopt('d_tougao_time'); ?>"> 秒,默认:240
投稿提醒邮箱 <input name="d_tougao_mailto" id="d_tougao_mailto" type="text" value="<?php echo dopt('d_tougao_mailto'); ?>">
</td>
</tr>
<tr>
<td class="d_tit">评论头像缓存</td>
<td>
<label class="checkbox inline">
黛云轩
- 粉丝: 18
- 资源: 21
最新资源
- 【图像隐写】DCT彩色数字水印嵌入提取【含Matlab仿真 1497期】.zip
- DTCWT、NSCT-SR+DWT-SR+拉普拉斯金字塔算法-SRMRT图像融合【含Matlab仿真 3926期】.zip
- 基于Python语言的Boson语法分析器生成器设计源码
- 【图像隐写】离散余弦变换DCT变换灰色图像信息隐藏(数字水印嵌入攻击提取)【含Matlab仿真 3879期】.zip
- 【图像增强】同态滤波+Retinex+模糊技术图像增强【含Matlab仿真 1013期】.zip
- 【图像增强】暗通道图像去雾【含GUI Matlab仿真 835期】.zip
- 【缺陷检测】形态学液晶显示器表面缺陷检测【含Matlab仿真 1304期】.zip
- 【疾病分类】SVM植物叶子疾病检测和分类【含GUI Matlab仿真 093期】.zip
- 【危险品识别】颜色直方图危险品识别【含Matlab仿真 470期】.zip
- 【人民币识别】机器视觉人民币识别系统【含GUI Matlab仿真 784期】.zip
- 【身份证识别】形态学二代身份证号码识别系统【含GUI Matlab仿真 948期】.zip
- 【手写数字识别】模板匹配手写数字识别【含GUI Matlab仿真 094期】.zip
- 【手写数字识别】欧拉数和二维矩阵相关系数手写数字识别【含GUI Matlab仿真 1896期】.zip
- 【图像处理】压缩系数的粒子群和重力搜索算法图像的多级阈值分割【含Matlab仿真 1888期】.zip
- 【图像分割】阙值+边缘检测+区域法图像分割【含GUI Matlab仿真 817期】.zip
- 【图像加密】Arnold置乱图像加密解密【含GUI Matlab仿真 1239期】.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
- 1
- 2
- 3
前往页