Posted in 作品案例, 网站程序

Cksky version 3.2

ken 2009-12-24 Hit: 2,502

V3.2
CKSKY V3.2修改内容如下:
1:重写了内容页的布局
2:部分修复了没有没有安装插件出现不能显示的问题
3:添加了2级下拉菜单(兼容IE6)
4:修复了IE6下的友情连接问题
5:增加了首页FLASH播放器

具体使用如下:
打开目录:cksky version3.2->gg->digg->images
找到文件:index.xml

代码如下:

<?xml version="1.0" encoding="utf-8"?>
<data speed="4" but="840,70" center="0"  rotundity="1,1,1,1" style="0" >
<video imgURL="gg/digg/images/qqvip.gif" url="http://www.cksky.cn"/>
<video imgURL="gg/digg/images/3.gif" url="http://www.cksky.cn/archives/category/develop/ecshop"/>
</data>

其中 imgURL 表示你的图片位置
URL代表连接内容

下载请点击下方:

由于3.2进行了首页图片调整如想全显图片的话把下面代码覆盖模板里的index.php
首页图片全显补丁

<?php get_header(); ?>
 
<object 
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" 
 width="900" height="96" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
  <param name="movie" value="/gg/digg/images/Currencyshow.swf?data=/gg/digg/images/index.xml" />
  <param name="quality" value="high" />
  <param name="wmode" value="transparent" />
  <embed src="/gg/digg/images/Currencyshow.swf?data=/gg/digg/images/index.xml" 
wmode="transparent" quality="high" 
pluginspage="http://www.macromedia.com/go/getflashplayer" 
type="application/x-shockwave-flash" width="900" height="96"></embed>
</object>
<div id="user_info">
        <span>
<?php if(!empty($_COOKIE['cksky_author'])){
echo "<strong>".$_COOKIE['cksky_author']."</strong>欢迎你再次光临CKSKY.CN,有你的参与是本站的荣幸";
}else{
echo "CKSKY.CN欢迎您的光临";
}
?></span>
 
   <div class="clear"></div>
   </div>
   <div id="index_box_head">
   <?php wp_pagenavi(); ?>
   </div>
     <div class="line"></div>
<div id="content">
<?php $check=0; ?>
  <?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
	<div class="post">
			<h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a><span class="date_time"> <?php the_time('Y.m.d') ?> </span></h1>
            <div class="title_info">
 
            <?php the_author_posts_link(); ?>
              <?php if(function_exists('the_views')) {the_views();} ?>
              <?php if ($options['author']) : ?><span class="author"><?php the_author_posts_link(); ?></span><?php endif; ?>
			<?php edit_post_link(__('编辑', 'cksky'), '<span class="editpost">', '</span>'); ?>
 
            </div>
 
 
            <?php 
 
              $szPostContent = $post->post_content; 
              $szSearchPattern = '~<img [^\>]*\ />~'; // 搜索所有符合的图片 
              preg_match_all( $szSearchPattern, $szPostContent, $aPics ); 
              $iNumberOfPics = count($aPics[0]); // 检查一下至少有一张图片 
              if ( $iNumberOfPics > 0 ) { 
 
              echo '<div class="archive_c">'.$aPics[0][0].'</div>'; 
       }
 
	  /*$cat_id= get_the_category( $post->id );
	  $cat=$cat_id[0]->term_id;
	 if($cat==25 || $cat==76 || $cat==9){
		 $img='<img src="/gg/cat/cat_'.$cat.'.gif" />';
		 }
	 else{
		 $img='';
	 }*/
	?>
         <!-- <span style="float:right"><?// echo $img; ?></span>-->
             <div class="i_content">
             <p>
			 <?php   echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 180,"..."); ?></p>
             <div class="clear"></div>
     <div class="content_comment"> <?php comments_popup_link(__('No Comments ', 'kubrick'), __('1 Comment ', 'kubrick'), __('% Comments ', 'kubrick'), '', __('Comments Closed ', 'kubrick') ); ?></div>
 
     </div>
     <div class="clear"></div>
        </div>
		<?php comments_template(); ?>
		<?php endwhile; ?>
<div class="list_page">
		<?php wp_pagenavi(); ?>   
		</div>
<?php else : ?>
<h2 class="center">Not Found</h2>
		<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

IE6导航走位问题
修改CKSKY文件里面的ie.css

#ckhead ul{ width:500px; text-align:right}

修改500为适合你导航宽度的长度

如果出现

Fatal error: Call to undefined function wp_related_posts() in /www/users/souxiqi.com/wp-content/themes/cksky/single.php on line 42

解决方法一 :在SINGLE.PHP删除下面代码

<?php wp_related_posts(); ?>

解决方法2 安装 wp_related_posts.php 插件(wp-contentplugins附件已经有)

3.2内容页精简了部分内容 如果需要修改回3.0的状况的话 可以直接用3.0的SINGLE.PHP覆盖现在3.2版本的SINGLE.PHP就可以了

友情链接:多出来的友情链接请在footer.php里修改

随机日志

欢迎订阅: Google Reader | 鲜果 | 抓虾 | 九点 | QQ邮箱 | 有道 | 更多

36 条评论

  • (Required)
  • (Required, will not be published)