示例#1
2
"><?php 
bloginfo('name');
?>
</a>
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1000537096'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s4.cnzz.com/z_stat.php%3Fid%3D1000537096' type='text/javascript'%3E%3C/script%3E"));</script>
		<script type="text/javascript" src="http://tajs.qq.com/stats?sId=34262718" charset="UTF-8"></script>

        <?php 
if (dopt('Rcloud_beian')) {
    echo dopt('Rcloud_beianhao');
}
?>

		<?php 
if (dopt('Rcloud_track_b')) {
    echo dopt('Rcloud_track');
}
?>

		<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F09e5d137cb48c128491f1000bf62a401' type='text/javascript'%3E%3C/script%3E"));
</script>

		<a href="http://www.rccoder.net/sitemap">站点地图</a>
		
本站由<a href="http://my.33c.cc/aff.php?aff=023" rel="nofollow">极速动力主机</a>和<a href="http://www.qiniu.com" rel="nofollow">七牛云储存</a>赞助
本站永久链接<a href="http://www.rccoder.net" rel="nofollow">www.rccoder.net</a>
        All Rights Reserved.

        自豪地使用WordPress
示例#2
1
文件: key.php 项目: Nsking-xs/rccoder
function theme_description()
{
    global $s, $post;
    $description = '';
    $blog_name = get_bloginfo('name');
    if (is_singular()) {
        if (!empty($post->post_excerpt)) {
            $text = $post->post_excerpt;
        } else {
            $text = $post->post_content;
        }
        $description = trim(str_replace(array("\r\n", "\r", "\n", " ", " "), " ", str_replace("\"", "'", strip_tags($text))));
        if (!$description) {
            $description = $blog_name . "-" . trim(wp_title('', false));
        }
    } elseif (is_home()) {
        $description = $blog_name . "-" . get_bloginfo('description') . '|' . dopt('Rcloud_description');
        // 首頁要自己加
    } elseif (is_tag()) {
        $description = $blog_name . "有关 '" . single_tag_title('', false) . "' 的文章";
    } elseif (is_category()) {
        $description = $blog_name . "有关 '" . single_cat_title('', false) . "' 的文章";
    } elseif (is_archive()) {
        $description = $blog_name . "在: '" . trim(wp_title('', false)) . "' 的文章";
    } elseif (is_search()) {
        $description = $blog_name . ": '" . esc_html($s, 1) . "' 的搜索結果";
    } else {
        $description = $blog_name . "有关 '" . trim(wp_title('', false)) . "' 的文章";
    }
    $description = mb_substr($description, 0, 220, 'utf-8') . '..';
    echo "<meta name=\"description\" content=\"{$description}\" />\n";
}
示例#3
1
文件: header.php 项目: evershy/yunmo
        echo '<a class="google" href="' . dopt('d_rss_google') . '"><i class="fa fa-google-plus "></i></a>';
    }
    if (dopt('d_rss_facebook_b')) {
        echo '<a class="facebook" href="' . dopt('d_rss_facebook') . '"><i class="fa fa-facebook"></i></a>';
    }
    if (dopt('d_rss_github_b')) {
        echo '<a class="github" href="' . dopt('d_rss_github') . '"><i class="fa fa-github"></i></a>';
    }
    if (dopt('d_rss_tencent_b')) {
        echo '<a class="tweibo" href="' . dopt('d_rss_tencent') . '"><i class="fa fa-tencent-weibo"></i></a>';
    }
    if (dopt('d_rss_instagram_b')) {
        echo '<a class="instagram" href="' . dopt('d_rss_instagram') . '"><i class="fa fa-instagram"></i></a>';
    }
    if (dopt('d_rss_b')) {
        echo '<a class="rss" href="' . dopt('d_rss') . '"><i class="fa fa-rss"></i></a>';
    }
    //if( dopt('d_rss_b') ) echo '<a class="weixin" href="'.dopt('d_rss').'"><i class="fa fa-weixin"></i></a>';
    echo '</div>';
}
?>
		
	 </div>

  </div>
  
  <nav class="main-nav">
  
        <?php 
wp_nav_menu(array('theme_location' => 'header-menu', 'container' => 'ul', 'menu_class' => 'nav'));
?>
示例#4
1
?>
"/>
	<a id="qr" href="javascript:;"><i class="fa fa-qrcode"></i></a>
	<a id="gotop" href="javascript:;"><i class="fa fa-arrow-up"></i></a>
	
<?php 
if (dopt('d_track_b') != '') {
    '<div class="static-hide">' . dopt('d_track') . '</div>';
}
if (dopt('d_footcode_b') != '') {
    echo dopt('d_footcode');
}
if (is_single() && dopt('d_sideroll_single_b')) {
    $sr_1 = dopt('d_sideroll_single_1');
    $sr_2 = dopt('d_sideroll_single_2');
} elseif (is_home() && dopt('d_sideroll_index_b')) {
    $sr_1 = dopt('d_sideroll_index_1');
    $sr_2 = dopt('d_sideroll_index_2');
} elseif (is_page() && dopt('d_sideroll_page_b')) {
    $sr_1 = dopt('d_sideroll_page_1');
    $sr_2 = dopt('d_sideroll_page_2');
} else {
    $sr_1 = 2;
    $sr_2 = 4;
}
echo '<script>var asr_1 = ' . $sr_1 . ',asr_2 = ' . $sr_2 . ';</script>';
wp_footer();
?>
  
</body>
</html>
示例#5
0
文件: page-tags.php 项目: h2y/germ
        ?>
&title=<?php 
        the_title();
        ?>
" target="_blank"><i class="fa fa-renren"></i></a></li>
                <li><a href="http://twitter.com/share?url=<?php 
        the_permalink();
        ?>
&text=<?php 
        the_title();
        ?>
" target="_blank"><i class="fa fa-twitter"></i></a></li>
            </ul>
        </div>
    <?php 
        if (dopt('d_ding_b') != '') {
            ?>
        <div class="post-love">
            <a href="javascript:;" data-action="ding" data-id="<?php 
            the_ID();
            ?>
" class="favorite post-love-link <?php 
            if (isset($_COOKIE['mzw_ding_' . $post->ID])) {
                echo ' done';
            }
            ?>
" title="点个赞"><i class="fa fa-heart-o"></i>
            <span class="love-count">
                <?php 
            $ding_num = get_post_meta($post->ID, 'mzw_ding', true);
            echo $ding_num ? $ding_num : '0';
示例#6
0
<ul>
<?php 
$exclude_id = $post->ID;
$posttags = get_the_tags();
$i = 0;
$limit = !dopt('d_related_count') ? 12 : dopt('d_related_count');
if ($posttags) {
    $tags = '';
    foreach ($posttags as $tag) {
        $tags .= $tag->name . ',';
    }
    $args = array('post_status' => 'publish', 'tag_slug__in' => explode(',', $tags), 'post__not_in' => explode(',', $exclude_id), 'caller_get_posts' => 1, 'orderby' => 'comment_date', 'posts_per_page' => $limit);
    query_posts($args);
    while (have_posts()) {
        the_post();
        echo '<li><a href="' . get_permalink() . '">', get_the_title(), '</a></li>';
        $exclude_id .= ',' . $post->ID;
        $i++;
    }
    wp_reset_query();
}
if ($i < $limit) {
    $cats = '';
    foreach (get_the_category() as $cat) {
        $cats .= $cat->cat_ID . ',';
    }
    $args = array('category__in' => explode(',', $cats), 'post__not_in' => explode(',', $exclude_id), 'caller_get_posts' => 1, 'orderby' => 'comment_date', 'posts_per_page' => $limit - $i);
    query_posts($args);
    while (have_posts()) {
        the_post();
        echo '<li><a href="' . get_permalink() . '">', get_the_title(), '</a></li>';
示例#7
0
文件: widget.php 项目: h2y/germ
    function widget($args, $instance)
    {
        extract($args);
        echo $before_widget;
        ?>
        <img src="<?php 
        bloginfo('template_directory');
        ?>
/images/bg_small.jpg">
        <div class="author-body">
            <div class="author_img">
            <?php 
        if (dopt('d_defaultavatar_b')) {
            echo get_avatar(get_the_author_email(), $size = '80', '');
        } else {
            $head_src = dopt('d_myavatar') ? dopt('d_myavatar') : "http://q.qlogo.cn/qqapp/100229475/F1260A6CECA521F6BE517A08C4294D8A/100";
            echo '<img src="' . $head_src . '" class="avatar avatar-80 photo" height="80" width="80">';
        }
        ?>
            </div>
            <div class="author_bio">
                <h3><?php 
        the_author_meta('nickname');
        ?>
 </h3>
                <p class="muted"><?php 
        the_author_meta('user_description');
        ?>
 </p>
            </div>
        </div>
        <?php 
        if (dopt('d_sns_open')) {
            echo '<div class="social">';
            if (dopt('d_rss_b')) {
                echo '<a target="_blank" class="rss" href="' . dopt('d_rss') . '"><i class="fa fa-rss"></i></a>';
            }
            if (dopt('d_mail_b')) {
                echo '<a rel="nofollow" target="_blank" class="mail" href="' . dopt('d_mail') . '"><i class="fa fa-envelope"></i></a>';
            }
            if (dopt('d_rss_sina_b')) {
                echo '<a rel="nofollow" target="_blank" class="weibo" href="' . dopt('d_rss_sina') . '"><i class="fa fa-weibo"></i></a>';
            }
            if (dopt('d_rss_twitter_b')) {
                echo '<a rel="nofollow" target="_blank" class="twitter" href="' . dopt('d_rss_twitter') . '"><i class="fa fa-twitter"></i></a>';
            }
            if (dopt('d_rss_google_b')) {
                echo '<a rel="nofollow" target="_blank" class="google" href="' . dopt('d_rss_google') . '"><i class="fa fa-google-plus "></i></a>';
            }
            if (dopt('d_rss_facebook_b')) {
                echo '<a rel="nofollow" target="_blank" class="facebook" href="' . dopt('d_rss_facebook') . '"><i class="fa fa-facebook"></i></a>';
            }
            if (dopt('d_rss_github_b')) {
                echo '<a rel="nofollow" target="_blank" class="github" href="' . dopt('d_rss_github') . '"><i class="fa fa-github"></i></a>';
            }
            if (dopt('d_rss_tencent_b')) {
                echo '<a rel="nofollow" target="_blank" class="tweibo" href="' . dopt('d_rss_tencent') . '"><i class="fa fa-tencent-weibo"></i></a>';
            }
            if (dopt('d_rss_linkedin_b')) {
                echo '<a rel="nofollow" target="_blank" class="linkedin" href="' . dopt('d_rss_linkedin') . '"><i class="fa fa-linkedin"></i></a>';
            }
            //if( dopt('d_rss_b') ) echo '<a class="weixin" href="'.dopt('d_rss').'"><i class="fa fa-weixin"></i></a>';
            echo '</div>';
        }
        echo $after_widget;
    }
示例#8
0
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.yusi123.com/" target="_blank">欲思博客</a> &nbsp;&nbsp; <a href="http://yusi123.com/3233.html" 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">首页置顶推荐幻灯片</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');
    ?>
">条 默认4条
            &nbsp; &nbsp;
            <span class="d_tip">开启后请确保您的后台-文章中设置了4篇以上的置顶文章,并且文章第一张图片像素为716*297</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之间用英文逗号隔开),默认显示全部,如果要显示带头像的友情链接,请在notes中添加上链接邮箱
                &nbsp; &nbsp;
            </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>
      列表Ajax加载分页内容
            <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>
		文章页顶部面包屑导航  <label class="checkbox inline">
                <input type="checkbox" id="d_singleMenu_b" name="d_singleMenu_b" <?php 
    if (dopt('d_singleMenu_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
        </td>
    </tr>
 <tr>
      <td class="d_tit">热门排行</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="hot_list_check" name="hot_list_check" <?php 
    if (dopt('hot_list_check')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
        显示天数 <input class="hot_list_date" name="hot_list_date" id="hot_list_date" type="number" value="<?php 
    echo dopt('hot_list_date');
    ?>
"> 天(默认7)
	
	显示数量 <input class="hot_list_number" name="hot_list_number" id="hot_list_number" type="number" value="<?php 
    echo dopt('hot_list_number');
    ?>
">条(默认10)

	&nbsp;&nbsp; 名称 <input class="d_inp_short" name="hot_list_title" id="hot_list_title" type="text" value="<?php 
    echo dopt('hot_list_title');
    ?>
">
	</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> &nbsp; &nbsp; 
            <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> &nbsp; &nbsp; 
            <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> &nbsp; &nbsp; 
            <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> &nbsp; &nbsp; 
  	<label class="checkbox inline">
                <input type="checkbox" id="d_post_like_b" name="d_post_like_b" <?php 
    if (dopt('d_post_like_b')) {
        echo 'checked="checked"';
    }
    ?>
>不显示喜欢
            </label>
        </td>
    </tr>
        </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');
    ?>
">条 默认 8
        </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>
 	    <label class="checkbox inline">
                <input type="checkbox" id="d_bdshare_b" name="d_bdshare_b" <?php 
    if (dopt('d_bdshare_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
            &nbsp; &nbsp;
            投稿提醒邮箱 <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">
                <input type="checkbox" id="d_avatar_b" name="d_avatar_b" <?php 
    if (dopt('d_avatar_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            <label class="d_number">
                缓存
                <input class="d_num " name="d_avatarDate" id="d_avatarDate" type="number" value="<?php 
    if (dopt('d_avatarDate')) {
        echo dopt('d_avatarDate');
    } else {
        echo '15';
    }
    ?>
"> 天 
                &nbsp; &nbsp;
                开启后请确保网站根目录(与wp-content平级)有avatar文件夹,且权限设置成777
                <br>
                <span class="d_tip">缓存头像有利于头像加载和防备Gravatar头像站点被墙;如有报错等异常,请关闭,可能你的主机不支持</span>
            </label>
        </td>
    </tr>
 <tr>
        <td class="d_tit">评论内容过滤</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_spamComments_b" name="d_spamComments_b" <?php 
    if (dopt('d_spamComments_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
           <span class="d_tip">开启后,会禁止有日文字符和纯英文的评论,不对外的建议开启。</span>
        </td>
    </tr>
    <tr>
        <td class="d_tit">侧栏模块固定</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_sideroll_b" name="d_sideroll_b" <?php 
    if (dopt('d_sideroll_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            <label class="d_number">
                滚动时 固定侧栏的 第
                <input class="d_num " name="d_sideroll_1" id="d_sideroll_1" type="number" value="<?php 
    echo dopt('d_sideroll_1');
    ?>
"> 个模块
            </label>
            和
            <label class="d_number">
                第
                <input class="d_num " name="d_sideroll_2" id="d_sideroll_2" type="number" value="<?php 
    echo dopt('d_sideroll_2');
    ?>
"> 个模块
            </label>
        </td>
    </tr>
    <tr>
        <td class="d_tit">禁止站内文章Pingback</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_pingback_b" name="d_pingback_b" <?php 
    if (dopt('d_pingback_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
                &nbsp; &nbsp;
                <span class="d_tip">开启后,不会发送站内Pingback,建议开启</span>
            </label>
        </td>
    </tr>
    <tr>
        <td class="d_tit">禁止后台编辑时自动保存</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_autosave_b" name="d_autosave_b" <?php 
    if (dopt('d_autosave_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
                &nbsp; &nbsp;
                <span class="d_tip">开启后,后台编辑文章时候不会定时保存,有效缩减数据库存储量;但是,一般不建议开启,除非你的数据库容量很小</span>
            </label>
        </td>
    </tr>
    
    <tr>
        <td class="d_tit">腾讯微博</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_tqq_b" name="d_tqq_b" <?php 
    if (dopt('d_tqq_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            网址:<input class="d_inp_short" name="d_tqq" id="d_tqq" type="text" value="<?php 
    echo dopt('d_tqq');
    ?>
">
        </td>
    </tr>
    <tr>
        <td class="d_tit">新浪微博</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_weibo_b" name="d_weibo_b" <?php 
    if (dopt('d_weibo_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            网址:<input class="d_inp_short" name="d_weibo" id="d_weibo" type="text" value="<?php 
    echo dopt('d_weibo');
    ?>
">
        </td>
    </tr>
   <tr>
        <td class="d_tit">腾讯微信</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_weixin_b" name="d_weixin_b" <?php 
    if (dopt('d_weixin_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            订阅号:<input class="d_inp_short" name="d_weixin" id="d_weixin" type="text" value="<?php 
    echo dopt('d_weixin');
    ?>
"><span class="d_tip">微信图片直接替换主题同名weixin.gif图片即可。</span>
        </td>
    </tr>
   <tr>
        <td class="d_tit">QQ联系代码</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_qqContact_b" name="d_qqContact_b" <?php 
    if (dopt('d_qqContact_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            代码:<input class="d_inp_short" name="d_qqContact" id="d_qqContact" type="text" value="<?php 
    echo dopt('d_qqContact');
    ?>
">
        </td>
    </tr>
   <tr>
        <td class="d_tit">Email</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_emailContact_b" name="d_emailContact_b" <?php 
    if (dopt('d_emailContact_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            网址:<input class="d_inp_short" name="d_emailContact" id="d_emailContact" type="text" value="<?php 
    echo dopt('d_emailContact');
    ?>
">
        </td>
    </tr>
    <tr>
        <td class="d_tit">Facebook</td>
        <td>
            <label class="checkbox inline">
               <input type="checkbox" id="d_facebook_b" name="d_facebook_b" <?php 
    if (dopt('d_facebook_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            网址:<input class="d_inp_short" name="d_facebook" id="d_facebook" type="text" value="<?php 
    echo dopt('d_facebook');
    ?>
">
        </td>
    </tr>
    <tr>
        <td class="d_tit">Twitter</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_twitter_b" name="d_twitter_b" <?php 
    if (dopt('d_twitter_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            网址:<input class="d_inp_short" name="d_twitter" id="d_twitter" type="text" value="<?php 
    echo dopt('d_twitter');
    ?>
">
        </td>
    </tr>
    <tr>
        <td class="d_tit">RSS订阅地址</td>
        <td>
            <input class="d_inp_short" name="d_rss" id="d_rss" type="text" value="<?php 
    echo dopt('d_rss');
    ?>
">
            <span class="d_tip">可以是其他订阅托管站点的地址。边栏只能选择六个社交账户,否则会错位。</span>
        </td>
    </tr>
    <tr>
        <td class="d_tit">流量统计代码</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_track_b" name="d_track_b" <?php 
    if (dopt('d_track_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
  <span class="d_tip">统计网站流量,推荐使用百度统计,国内比较优秀且速度快;还可使用Google统计、CNZZ等</span>
            </label>
            <textarea name="d_track" id="d_track" type="textarea" rows="2"><?php 
    echo dopt('d_track');
    ?>
</textarea>
          
        </td>
    </tr>
    <tr>
        <td class="d_tit">页面头部公共代码</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_headcode_b" name="d_headcode_b" <?php 
    if (dopt('d_headcode_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
<span class="d_tip">会自动出现在页面头部(head区域),可放置广告代码等自定义(css或js)的全局代码块</span>
            </label>
            <textarea name="d_headcode" id="d_headcode" type="textarea" rows="2"><?php 
    echo dopt('d_headcode');
    ?>
</textarea>
            
        </td>
    </tr>
    <tr>
        <td class="d_tit">页面底部公共代码</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_footcode_b" name="d_footcode_b" <?php 
    if (dopt('d_footcode_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
 <span class="d_tip">同上,但是在全站页面底部出现</span>
            </label>
            <textarea name="d_footcode" id="d_footcode" type="textarea" rows="2"><?php 
    echo dopt('d_footcode');
    ?>
</textarea>
           
        </td>
    </tr>
    <tr>
        <td class="d_tit">广告:全站 - 导航下横幅</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_adsite_01_b" name="d_adsite_01_b" <?php 
    if (dopt('d_adsite_01_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
 <span class="d_tip">广告区域,任意联盟广告和自定义广告的代码均可,下同</span>
            </label>
            <textarea name="d_adsite_01" id="d_adsite_01" type="textarea" rows=""><?php 
    echo dopt('d_adsite_01');
    ?>
</textarea>
           
        </td>
    </tr>
    <tr>
        <td class="d_tit">广告:全站正文列表最前</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_adindex_02_b" name="d_adindex_02_b" <?php 
    if (dopt('d_adindex_02_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            <textarea name="d_adindex_02" id="d_adindex_02" type="textarea" rows=""><?php 
    echo dopt('d_adindex_02');
    ?>
</textarea>
        </td>
    </tr>
 
    <tr>
        <td class="d_tit">广告:首页 - 导航下横幅</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_adindex_01_b" name="d_adindex_01_b" <?php 
    if (dopt('d_adindex_01_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            <textarea name="d_adindex_01" id="d_adindex_01" type="textarea" rows=""><?php 
    echo dopt('d_adindex_01');
    ?>
</textarea>
        </td>
    </tr>
    <tr>
        <td class="d_tit">广告:首页 - 正文最前上</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_adindex_03_b" name="d_adindex_03_b" <?php 
    if (dopt('d_adindex_03_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            <textarea name="d_adindex_03" id="d_adindex_03" type="textarea" rows=""><?php 
    echo dopt('d_adindex_03');
    ?>
</textarea>
        </td>
    </tr>
    <tr>
        <td class="d_tit">广告:文章页 - 页面标题下</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_adpost_01_b" name="d_adpost_01_b" <?php 
    if (dopt('d_adpost_01_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            <textarea name="d_adpost_01" id="d_adpost_01" type="textarea" rows=""><?php 
    echo dopt('d_adpost_01');
    ?>
</textarea>
        </td>
    </tr>
    <tr>
        <td class="d_tit">广告:文章页 - 相关文章下</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_adpost_02_b" name="d_adpost_02_b" <?php 
    if (dopt('d_adpost_02_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            <textarea name="d_adpost_02" id="d_adpost_02" type="textarea" rows=""><?php 
    echo dopt('d_adpost_02');
    ?>
</textarea>
        </td>
    </tr>
    <tr>
        <td class="d_tit">广告:文章页 - 网友评论下</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="d_adpost_03_b" name="d_adpost_03_b" <?php 
    if (dopt('d_adpost_03_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            <textarea name="d_adpost_03" id="d_adpost_03" type="textarea" rows=""><?php 
    echo dopt('d_adpost_03');
    ?>
</textarea>
        </td>
    </tr>
     <tr>
        <td class="d_tit">手机广告:全站正文列表最前</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="Mobiled_adindex_02_b" name="Mobiled_adindex_02_b" <?php 
    if (dopt('Mobiled_adindex_02_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启 <span class="d_tip">手机广告只适合在手机中投放。例如百度联盟移动广告,PC端不会显示。下同。</span>
            </label>
            <textarea name="Mobiled_adindex_02" id="Mobiled_adindex_02" type="textarea" rows=""><?php 
    echo dopt('Mobiled_adindex_02');
    ?>
</textarea>
        </td>
    </tr>
 <tr>
        <td class="d_tit">手机广告:文章页 - 页面标题下</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="Mobiled_adpost_01_b" name="Mobiled_adpost_01_b" <?php 
    if (dopt('Mobiled_adpost_01_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            <textarea name="Mobiled_adpost_01" id="Mobiled_adpost_01" type="textarea" rows=""><?php 
    echo dopt('Mobiled_adpost_01');
    ?>
</textarea>
        </td>
    </tr>
 <tr>
        <td class="d_tit">手机广告:文章页 - 相关文章下</td>
        <td>
            <label class="checkbox inline">
                <input type="checkbox" id="Mobiled_adpost_02_b" name="Mobiled_adpost_02_b" <?php 
    if (dopt('Mobiled_adpost_02_b')) {
        echo 'checked="checked"';
    }
    ?>
>开启
            </label>
            <textarea name="Mobiled_adpost_02" id="Mobiled_adpost_02" type="textarea" rows=""><?php 
    echo dopt('Mobiled_adpost_02');
    ?>
</textarea>
        </td>
    </tr>
    <tr>
        <td class="d_tit"></td>
        <td>
            <div class="d_desc">
                <input class="button-primary" name="save" type="submit" value="保存设置">
            </div>
            <input type="hidden" name="action" value="save">
        </td>
    </tr>

    </table>
</form>
</div>
<script>
var aaa = []
jQuery('.d_wrap input, .d_wrap textarea').each(function(e){
    if( jQuery(this).attr('id') ) aaa.push( jQuery(this).attr('id') )
})
console.log( aaa )
</script>
<?php 
}
示例#9
0
    global $current_user;
    get_currentuserinfo();
    $uid = $current_user->ID;
    $u_name = get_user_meta($uid, 'nickname', true);
    ?>
			<div class="pull-right">
				<?php 
    if (is_user_logged_in()) {
        echo '<i class="icon-user icon12"></i> ' . $u_name . ' &nbsp; ';
        echo '<a href="' . site_url('/wp-admin') . '" target="_blank">后台管理</a>';
        echo ' &nbsp; &nbsp; <i class="icon-off icon12"></i> ';
    } else {
        echo '<i class="icon-user icon12"></i> ';
    }
    wp_loginout();
    ?>
			</div>
		<?php 
}
?>
		<div class="toptip"><strong class="text-success">最新消息:</strong><?php 
echo dopt('d_tui');
?>
</div>
	</div>
</header>
<section class="container">
	<?php 
if (dopt('d_adsite_01_b')) {
    echo '<div class="banner banner-site">' . dopt('d_adsite_01') . '</div>';
}
示例#10
0
/**
 * Course section select: shows general list of statuses and
 * if $status is not NULL, shows the current status
 * for a particular course section record.
 *
 * @since 1.0.0
 * @param string $status            
 * @return string Returns the record key if selected is true.
 */
function course_sec_status_select($status = NULL, $readonly = '')
{
    $app = \Liten\Liten::getInstance();
    $select = '<select name="currStatus" class="selectpicker form-control" data-style="btn-info" data-size="10" data-live-search="true" required' . $readonly . '>
    			<option value="">&nbsp;</option>
    	    	<option' . dopt('activate_course_sec') . ' value="A"' . selected($status, 'A', false) . '>A Active</option>
    	    	<option value="I"' . selected($status, 'I', false) . '>I Inactive</option>
    			<option value="P"' . selected($status, 'P', false) . '>P Pending</option>
    			<option' . dopt('cancel_course_sec') . ' value="C"' . selected($status, 'C', false) . '>C Cancel</option>
    			<option value="O"' . selected($status, 'O', false) . '>O Obsolete</option>
		        </select>';
    return $app->hook->apply_filter('course_sec_status', $select, $status);
}
示例#11
0
    function widget($args, $instance)
    {
        extract($args);
        ?>

<?php 
        echo $before_widget;
        ?>

<h3 class="widget-title"><?php 
        echo $instance['title'];
        ?>
</h3>
<div class="widget-line"></div>
<ul class="catPost">
<?php 
        $post_tags = wp_get_post_tags($post->ID);
        if ($post_tags) {
            foreach ($post_tags as $tag) {
                // 获取标签列表
                $tag_list[] .= $tag->term_id;
            }
        }
        $post_tag = $tag_list[rand(0, count($tag_list) - 1)];
        $query_posts = new WP_Query('orderby=rand&caller_get_posts=1&showposts=' . $instance['Num'] . '&tag_in=' . $post_tag);
        ?>

<?php 
        while ($query_posts->have_posts()) {
            $query_posts->the_post();
            ?>

<?php 
            if ($instance['style'] == "img") {
                ?>

<li class="imglist"><a href=" <?php 
                the_permalink();
                ?>
 " title=" <?php 
                the_title();
                ?>
 ">
    <?php 
                if (dopt('Rcloud_timthumb_b')) {
                    post_thumbnail(145, 90);
                } else {
                    the_img();
                }
                ?>

<?php 
                the_title();
                ?>
 </a></li>
<?php 
            } elseif ($instance['style'] == "text") {
                ?>

<li class="textlist"><a href="<?php 
                the_permalink();
                ?>
" title="<?php 
                the_title();
                ?>
"><?php 
                the_title();
                ?>
</a></li>
<?php 
            }
        }
        ?>

</ul>
              <?php 
        echo $after_widget;
        ?>

        <?php 
    }
示例#12
0
    </article>
    <?php 
}
?>

    <div class="article-footer">
    </div>
    <div class="relates">
      <?php 
include 'modules/related.php';
?>

    </div>
    <?php 
if (dopt('d_adpost_02_b')) {
    echo '<div class="banner_post_bottom">' . dopt('d_adpost_02') . '</div>';
}
?>

    <?php 
comments_template('', true);
?>

  </div>
  <?php 
get_sidebar();
?>

</div>
<?php 
get_footer();
示例#13
0
function mzw_description()
{
    global $s, $post;
    $description = '';
    $blog_name = get_bloginfo('name');
    if (is_singular()) {
        $ID = $post->ID;
        $title = $post->post_title;
        $author = $post->post_author;
        $user_info = get_userdata($author);
        $post_author = $user_info->display_name;
        if (!get_post_meta($ID, "meta-description", true)) {
            $description = $title . ' - 作者: ' . $post_author . ',首发于' . $blog_name;
        } else {
            $description = get_post_meta($ID, "meta-description", true);
        }
    } elseif (is_home()) {
        $description = dopt('d_description');
    } elseif (is_tag()) {
        $description = single_tag_title('', false) . " - " . trim(strip_tags(tag_description()));
    } elseif (is_category()) {
        $description = single_cat_title('', false) . " - " . trim(strip_tags(category_description()));
    } elseif (is_archive()) {
        $description = $blog_name . "'" . trim(wp_title('', false)) . "'";
    } elseif (is_search()) {
        $description = $blog_name . ": '" . esc_html($s, 1) . "' 的搜索結果";
    } else {
        $description = $blog_name . "'" . trim(wp_title('', false)) . "'";
    }
    $description = mb_substr($description, 0, 220, 'utf-8');
    echo "<meta name=\"description\" content=\"{$description}\">\n";
}
<?php

get_header();
if (dopt('d_adindex_01_b')) {
    printf('<div class="banner banner-navbar">' . dopt('d_adindex_01') . '</div>');
}
?>
<div class="content-wrap">
	<div class="content">
	<?php 
if (dopt('d_adindex_03_b')) {
    printf('<div class="banner banner-contenttop">' . dopt('d_adindex_03') . '</div>');
}
if ($paged && $paged > 1) {
    printf('<header class="archive-header"><h1>最新发布 第' . $paged . '页</h1><div class="archive-header-info"><p>' . get_option('blogname') . get_option('blogdescription') . '</p></div></header>');
} else {
    if (dopt('d_sticky_b')) {
        include 'modules/sticky.php';
    }
}
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array('caller_get_posts' => 1, 'paged' => $paged);
query_posts($args);
include 'modules/excerpt.php';
?>
	</div>
</div>
<?php 
get_sidebar();
get_footer();
 -- <?php 
echo bloginfo('name');
?>
</h1>
<div class="demo-header">
	<a class="demo-name" href="<?php 
echo get_permalink($pid);
?>
">&laquo; <?php 
echo $title;
?>
</a>
	<span style="display:none"><?php 
if (dopt('d_track_b') != '') {
    echo dopt('d_track');
}
?>
</span>
</div>
<div class="demo-container demo"><?php 
echo $theCode;
?>
</div>
<div style="display:none"><?php 
if (dopt('d_track_b')) {
    echo dopt('d_track');
}
?>
</div>
</body>
</html>
示例#16
0
		<a class="logolink" href="<?php 
bloginfo('url');
?>
" title="<?php 
bloginfo('name');
?>
"><img src="<?php 
bloginfo('template_url');
?>
/images/logo.png" alt="<?php 
bloginfo('name');
?>
" /></a>

		<span class="notice"><?php 
echo dopt('Rcloud_notice');
?>
</span>

	</div>

	<!-- 搜索 -->

	<div class="fr">

		<script type="text/javascript">document.write(unescape('%3Cdiv id="bdcs"%3E%3C/div%3E%3Cscript charset="utf-8" src="http://rp.baidu.com/rp3w/3w.js?sid=10629308063034411426') + '&t=' + (Math.ceil(new Date()/3600000)) + unescape('"%3E%3C/script%3E'));</script>

	</div>

	<div class="cc"></div>
示例#17
0
    echo '<li><a target="_blank" href="' . get_permalink() . '" title="' . get_the_title() . '">';
    echo '<img src="';
    echo post_thumbnail_src();
    echo '" title="' . get_the_title() . '" alt="' . get_the_title() . '" /></a></li>';
}
wp_reset_query();
?>
	</ul>
</div>

<div class="ws_thumbs">
<div>
<?php 
$sticky = get_option('sticky_posts');
rsort($sticky);
query_posts(array('post__in' => $sticky, 'caller_get_posts' => 1, 'showposts' => dopt('d_sticky_count') ? dopt('d_sticky_count') : 4));
while (have_posts()) {
    the_post();
    echo '<a target="_blank" href="#" title="' . get_the_title() . '">';
    echo '<img src="' . get_bloginfo("template_url") . '/timthumb.php?src=';
    echo post_thumbnail_src();
    echo '&h=62&w=120&q=90&zc=1&ct=1" /></a>';
}
wp_reset_query();
?>
</div></div><div class="ws_shadow"></div>
	</div><script type="text/javascript" src="<?php 
bloginfo('template_url');
?>
/js/slider.js"></script>
示例#18
0
    echo dopt('d_headcode');
}
?>
</head>
<body>
<header>
  <div id="nav_bar">
    <div class="nav_content"> <a class="logo" href="<?php 
bloginfo('url');
?>
" style="width:<?php 
echo dopt('d_logo_w');
?>
px" title="<?php 
bloginfo('description');
?>
"></a>
      <nav>
        <?php 
wp_nav_menu(array('theme_location' => 'header_menu', 'container' => false, 'items_wrap' => '<ul id="header_menu">%3$s</ul>'));
?>
      </nav>
    </div>
  </div>
</header>
<section id="container">
<!--全站顶部通栏广告-->
<?php 
if (dopt('d_adsite_01_b')) {
    echo '<div class="banner" id="banner_global_top" >' . dopt('d_adsite_01') . '</div>';
}
示例#19
0
    if (dopt('d_twitter_b')) {
        echo '<a href="' . dopt('d_twitter') . '" rel="external nofollow" title="Twitter" target="_blank"><i class="twitter fa fa-twitter"></i></a>';
    }
    if (dopt('d_facebook_b')) {
        echo '<a href="' . dopt('d_facebook') . '" rel="external nofollow" title="Facebook" target="_blank"><i class="facebook fa fa-facebook"></i></a>';
    }
    if (dopt('d_weixin_b')) {
        echo '<a class="weixin"><i class="weixins fa fa-weixin"></i><div class="weixin-popover"><div class="popover bottom in"><div class="arrow"></div><div class="popover-title">订阅号“' . dopt('d_weixin') . '”</div><div class="popover-content"><img src="http://yusi123.com/wp-content/themes/yusi/img/weixin.gif" ></div></div></div></a>';
    }
    if (dopt('d_emailContact_b')) {
        echo '<a href="' . dopt('d_emailContact') . '" rel="external nofollow" title="Email" target="_blank"><i class="email fa fa-envelope-o"></i></a>';
    }
    if (dopt('d_qqContact_b')) {
        echo '<a href="' . dopt('d_qqContact') . '" rel="external nofollow" title="联系QQ" target="_blank"><i class="qq fa fa-qq"></i></a>';
    }
    echo '<a href="' . dopt('d_rss') . '" rel="external nofollow" target="_blank"  title="订阅本站"><i class="rss fa fa-rss"></i></a>';
    ?>

<?php 
}
?>
</div></div></div>

<?php 
if (function_exists('dynamic_sidebar') && dynamic_sidebar('widget_sitesidebar')) {
}
if (is_single()) {
    if (function_exists('dynamic_sidebar') && dynamic_sidebar('widget_postsidebar')) {
    }
} else {
    if (is_page()) {
示例#20
0
<div id="content_wrap">

<!--首页顶部通栏广告-->

<?php 
if (dopt('d_adindex_01_b')) {
    printf('<div class="banner" id="banner_index_top">' . dopt('d_adindex_01') . '</div>');
}
?>

	<div class="content" id="content">

	<?php 
if (dopt('d_adindex_03_b')) {
    printf('<div class="banner" id="banner_content_top" >' . dopt('d_adindex_03') . '</div>');
}
if ($paged && $paged > 1) {
    printf('<div class="archive-header"><h1>第' . $paged . '页</h1></div>');
} else {
    include 'modules/sticky.php';
    printf('');
}
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array('caller_get_posts' => 1, 'paged' => $paged);
query_posts($args);
include 'modules/excerpt.php';
?>

	</div>
示例#21
0
文件: header.php 项目: pichina/54UX
?>
" type="text/css" media="screen" />
	<!--[if lt IE 9]>
	<script src="<?php 
bloginfo('template_url');
?>
/assets/js/html5.js"></script>
	<![endif]-->
	<?php 
if (is_singular()) {
    wp_enqueue_script('comment-reply');
}
?>
	<?php 
if (dopt('d_headcode_b') != '') {
    echo dopt('d_headcode');
}
?>
</head>
<body>
<div id="top">
	<div class="w970">
		<ul>
			<?php 
echo str_replace("</ul></div>", "", ereg_replace("<div[^>]*><ul[^>]*>", "", wp_nav_menu(array('theme_location' => 'menu', 'echo' => false))));
?>
		</ul>
		<?php 
bloginfo('description');
?>
	</div>
示例#22
0
<?php

if (dopt('d_adindex_02_b')) {
    printf('<div class="banner banner-sticky">' . dopt('d_adindex_02') . '</div>');
}
$_author = dopt('d_post_author_b');
$_time = dopt('d_post_time_b');
$_views = dopt('d_post_views_b');
$_comment = dopt('d_post_comment_b');
while (have_posts()) {
    the_post();
    $_thumbnail = false;
    if (has_post_thumbnail() || !dopt('d_thumbnail_b')) {
        $_thumbnail = true;
    }
    $s = trim(get_search_query()) ? trim(get_search_query()) : 0;
    $title = get_the_title();
    $content = mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 260, "......", 'utf-8');
    //300是摘要字符数,......是结束符号。
    if ($s) {
        $keys = explode(" ", $s);
        $title = preg_replace('/(' . implode('|', $keys) . ')/iu', '<span style="color:#b94a48;">\\0</span>', $title);
        $content = preg_replace('/(' . implode('|', $keys) . ')/iu', '<span style="color:#b94a48;">\\0</span>', $content);
    }
    ?>
<article class="excerpt<?php 
    echo !$_thumbnail ? ' excerpt-nothumbnail' : '';
    ?>
">
	<header>
		<?php 
示例#23
0
		<div class="related_top">
			<?php 
include 'modules/related.php';
?>
		</div>
		<?php 
if (wp_is_mobile()) {
    if (dopt('Mobiled_adpost_02_b')) {
        echo '<div id="comment-ad" class="banner-related">' . dopt('Mobiled_adpost_02') . '</div>';
    }
}
?>
		<?php 
if (dopt('d_adpost_02_b')) {
    echo '<div id="comment-ad" class="banner banner-related">' . dopt('d_adpost_02') . '</div>';
}
?>
		<?php 
comments_template('', true);
?>
		<?php 
if (dopt('d_adpost_03_b')) {
    echo '<div class="banner banner-comment">' . dopt('d_adpost_03') . '</div>';
}
?>
	</div>
</div>
<?php 
get_sidebar();
get_footer();
示例#24
0
<body class="nav-open">
<?php 
if (is_mobile()) {
    echo '<div id="mobile-nav" class="f12 yahei"><form class="mm-search" action="' . get_bloginfo('url') . '" method="get" role="search"><input type="text" autocomplete="off" placeholder="Search" name="s" value=""><input id="mobilesubmit" type="submit" value="Search"></form> ';
    if (function_exists('wp_nav_menu')) {
        wp_nav_menu(array('theme_location' => 'header-menu', 'container' => 'ul', 'menu_class' => 'nav'));
    }
    echo '</div>';
}
?>

	<div id="wrap">
		<div id="bg-over"></div>
        <div id="preheader"><?php 
echo dopt('d_notice');
?>
</div>
        <header id="header" class="clearfix">
			<div class="head">
				<h1><a href="<?php 
bloginfo('url');
?>
"><?php 
bloginfo('name');
?>
</a></h1>
				<p class="desc yahei"><span><?php 
bloginfo('description');
?>
</span></p>
示例#25
0
文件: functions.php 项目: h2y/germ
function ajax_comment()
{
    global $wpdb;
    //nocache_headers();
    $comment_post_ID = isset($_POST['comment_post_ID']) ? (int) $_POST['comment_post_ID'] : 0;
    $post = get_post($comment_post_ID);
    $post_author = $post->post_author;
    if (empty($post->comment_status)) {
        do_action('comment_id_not_found', $comment_post_ID);
        ajax_comment_err('评论的状态无效');
    }
    $status = get_post_status($post);
    $status_obj = get_post_status_object($status);
    if (!comments_open($comment_post_ID)) {
        do_action('comment_closed', $comment_post_ID);
        ajax_comment_err('抱歉, 此文章已不允许新增评论');
    } elseif ('trash' == $status) {
        do_action('comment_on_trash', $comment_post_ID);
        ajax_comment_err('评论的状态无效');
    } elseif (!$status_obj->public && !$status_obj->private) {
        do_action('comment_on_draft', $comment_post_ID);
        ajax_comment_err('评论的状态无效');
    } elseif (post_password_required($comment_post_ID)) {
        do_action('comment_on_password_protected', $comment_post_ID);
        ajax_comment_err('密码保护中');
    } else {
        do_action('pre_comment_on_post', $comment_post_ID);
    }
    $comment_author = isset($_POST['author']) ? trim(strip_tags($_POST['author'])) : null;
    $comment_author_email = isset($_POST['email']) ? trim($_POST['email']) : null;
    $comment_author_url = isset($_POST['url']) ? trim($_POST['url']) : null;
    $comment_content = isset($_POST['comment']) ? trim($_POST['comment']) : null;
    $edit_id = isset($_POST['edit_id']) ? $_POST['edit_id'] : null;
    // 提取 edit_id
    $user = wp_get_current_user();
    if ($user->exists()) {
        if (empty($user->display_name)) {
            $user->display_name = $user->user_login;
        }
        $comment_author = $wpdb->escape($user->display_name);
        $comment_author_email = $wpdb->escape($user->user_email);
        $comment_author_url = $wpdb->escape($user->user_url);
        $user_ID = $wpdb->escape($user->ID);
        if (current_user_can('unfiltered_html')) {
            if (wp_create_nonce('unfiltered-html-comment_' . $comment_post_ID) != $_POST['_wp_unfiltered_html_comment']) {
                kses_remove_filters();
                kses_init_filters();
            }
        }
    } else {
        if (get_option('comment_registration') || 'private' == $status) {
            ajax_comment_err('抱歉, 在评论前必须登录');
        }
    }
    $comment_type = '';
    if (get_option('require_name_email') && !$user->exists()) {
        if (6 > strlen($comment_author_email) || '' == $comment_author) {
            ajax_comment_err('失败, 发表留言不能没有署名~');
        } elseif (!is_email($comment_author_email)) {
            ajax_comment_err('错误: 请输入有效的电子邮箱地址~');
        }
    }
    if ('' == $comment_content) {
        ajax_comment_err('失败, 还没有开始写任何评论呢~');
    }
    $dupe = "SELECT comment_ID FROM {$wpdb->comments} WHERE comment_post_ID = '{$comment_post_ID}' AND ( comment_author = '{$comment_author}' ";
    if ($comment_author_email) {
        $dupe .= "OR comment_author_email = '{$comment_author_email}' ";
    }
    $dupe .= ") AND comment_content = '{$comment_content}' LIMIT 1";
    if ($wpdb->get_var($dupe)) {
        ajax_comment_err('检测到重复的评论, 似乎你已经这样评论过了');
    }
    if ($lasttime = $wpdb->get_var($wpdb->prepare("SELECT comment_date_gmt FROM {$wpdb->comments} WHERE comment_author = %s ORDER BY comment_date DESC LIMIT 1", $comment_author))) {
        $time_lastcomment = mysql2date('U', $lasttime, false);
        $time_newcomment = mysql2date('U', current_time('mysql', 1), false);
        $flood_die = apply_filters('comment_flood_filter', false, $time_lastcomment, $time_newcomment);
        if ($flood_die) {
            ajax_comment_err('你发表评论太快了, 慢点儿吧~');
        }
    }
    $comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0;
    $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID');
    if ($edit_id) {
        $comment_id = $commentdata['comment_ID'] = $edit_id;
        if (ihacklog_user_can_edit_comment($commentdata, $comment_id)) {
            wp_update_comment($commentdata);
        } else {
            ajax_comment_err('Cheatin&#8217; uh?');
        }
    } else {
        $comment_id = wp_new_comment($commentdata);
    }
    $comment = get_comment($comment_id);
    do_action('set_comment_cookies', $comment, $user);
    $comment_depth = 1;
    $tmp_c = $comment;
    while ($tmp_c->comment_parent != 0) {
        $comment_depth++;
        $tmp_c = get_comment($tmp_c->comment_parent);
    }
    $GLOBALS['comment'] = $comment;
    ?>
<li <?php 
    comment_class();
    ?>
 id="li-comment-<?php 
    comment_ID();
    ?>
">
    <article id="comment-<?php 
    comment_ID();
    ?>
" class="comment-body">
        <div class="comment-meta clearfix">
            <div class="comment-author vcard">
                <?php 
    if (dopt('d_defaultavatar_b')) {
        echo get_avatar($comment, '40');
    } else {
        echo get_random_avatar($comment, '40');
    }
    ?>
            </div>
            <div class="comment-metadata">
                <b class="fn"><?php 
    printf(__('%s'), get_comment_author_link());
    ?>
</b>
                <time datetime="<?php 
    echo time_ago();
    ?>
"><?php 
    echo time_ago();
    ?>
</time>
            </div>
        </div>
        <?php 
    if ('0' == $comment->comment_approved) {
        ?>
            <p class="comment-awaiting-moderation">您的评论已提交, 正在排队等待审核.</p>
        <?php 
    }
    ?>

        <div class="comment-content">
            <?php 
    comment_text();
    ?>
        </div>
    </article>

    <?php 
    die;
}
示例#26
0
<!--文章列表顶部广告-->
<?php 
if (dopt('d_adindex_02_b')) {
    printf('<div id="banner_postlist_top">' . dopt('d_adindex_02') . '</div>');
}
?>

<?php 
while (have_posts()) {
    the_post();
    ?>

<div class="post_list_divide"></div>
<article class="excerpt">
  <ul class="focus">
    <li class="metatime">
      <i class="fa fa-clock-o"></i><?php 
    if (is_home()) {
        the_time('Y.m.d');
    } else {
        the_time('Y-m-d');
    }
    ?>

    </li>
    <li class="metacomt">
    <i class="fa fa-comments"></i>
      <?php 
    if (comments_open()) {
        echo '<a href="' . get_comments_link() . '">' . get_comments_number('0', '1', '%') . '&nbsp;Comments</a>';
    }
示例#27
0
<div id="sidebar">
	<?php 
if (dopt('d_same_sidebar_b') != '') {
    if (is_dynamic_sidebar()) {
        dynamic_sidebar('index_sidebar');
    }
} else {
    if (is_dynamic_sidebar() && is_home()) {
        dynamic_sidebar('index_sidebar');
    } elseif (is_dynamic_sidebar() && is_single()) {
        dynamic_sidebar('single_sidebar');
    } else {
        dynamic_sidebar('page_sidebar');
    }
}
?>
</div>
示例#28
0
deel_share();
?>
			</div>
		</header>
		<?php 
while (have_posts()) {
    the_post();
    ?>
			<article class="article-content">
				<?php 
    the_content();
    ?>
			</article>

			<ul class="plinks">
				<?php 
    wp_list_bookmarks(array('category' => dopt('d_linkpage_cat') ? dopt('d_linkpage_cat') : ''));
    ?>
			</ul>

			<?php 
    comments_template('', true);
    ?>

		<?php 
}
?>
	</div>
</div>
<?php 
get_footer();
}
$title = check_chart($_POST['title']);
$url = check_chart($_POST['url']);
$content = check_chart($_POST['content']);
if (empty($title) || mb_strlen($title) > 100) {
    die('title');
}
if (empty($url) || mb_strlen($url) > 100) {
    die('url');
}
if (empty($content) || mb_strlen($content) > 5000 || mb_strlen($content) < 200) {
    die('content');
}
if ($url) {
    $url = '<p>来源:<a href="' . $url . '" target="_blank">' . $url . '</a></p>';
}
$post_content = $content . $url;
$submit = array('post_title' => $title, 'post_author' => 1, 'post_content' => $post_content);
$status = wp_insert_post($submit);
if ($status != 0) {
    if (dopt('d_tougao_mailto')) {
        wp_mail(dopt('d_tougao_mailto'), "站长,有新投稿! " . $title, $post_content);
    }
    die('success');
} else {
    die('fail');
}
function check_chart($t)
{
    return isset($t) ? trim(htmlspecialchars($t, ENT_QUOTES)) : '';
}
示例#30
-1
}
?>
<footer id="footer">
  <div class="footer_content"> &copy;<?php 
echo date('Y');
?>
&nbsp;<a href="<?php 
bloginfo('url');
?>
">
    <?php 
bloginfo('name');
?>
    </a>
    <?php 
if (dopt('d_track_b')) {
    echo "  |  " . dopt('d_track');
}
?>
  </div>
</footer>
<?php 
include 'share.php';
wp_footer();
?>
</body><?php 
if (dopt('d_footcode_b')) {
    echo dopt('d_footcode');
}
?>
</html>