All pastes #2046445 Raw Edit

Anonymous

public text v1 · immutable
#2046445 ·published 2011-04-14 16:07 UTC
rendered paste body
<?php
/**
 * The category archive template file
 *
 * @package WordPress
 * @subpackage Graphene
 * @since Graphene 1.1.5
 */
?>
<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div id="content-main">
 *
 * @package WordPress
 * @subpackage Graphene
 * @since graphene 1.0
 */
global $graphene_settings;
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <title><?php graphene_title(); ?></title>
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> 
    <!--[if lte IE 6]>
        <style>#container{background:none !important;}</style>
        <script>
        sfHover = function() {
            var sfEls = document.getElementById("menu").getElementsByTagName("LI");
            for (var i=0; i<sfEls.length; i++) {
                sfEls[i].onmouseover=function() {
                    this.className+=" sfhover";
                }
                sfEls[i].onmouseout=function() {
                    this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
                }
            }
        }
        if (window.attachEvent) window.attachEvent("onload", sfHover);
              </script>
    <![endif]-->
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <?php
    /* We add some JavaScript to pages with the comment form
     * to support sites with threaded comments (when in use).
     */
    if (is_singular() && get_option('thread_comments'))
        wp_enqueue_script('comment-reply');

    /* Always have wp_head() just before the closing </head>
     * tag of your theme, or you will break many plugins, which
     * generally use this hook to add elements to <head> such
     * as styles, scripts, and meta tags.
     */
    wp_head();
    ?>
</head><?php flush(); ?>
<body class="two-col-right two-columns">

<?php if (!get_theme_mod('background_image', false) && !get_theme_mod('background_color', false)) : ?>
<div class="bg-gradient">
<?php endif; ?>

<div id="container">
    
    <?php if ($graphene_settings['hide_top_bar'] != true) : ?>
        <div id="top-bar">

            <?php if ($graphene_settings['hide_feed_icon'] != true) : ?>
                <div id="rss">
                    <?php $custom_feed_url = ($graphene_settings['custom_feed_url']) ? $graphene_settings['custom_feed_url'] : get_bloginfo('rss2_url'); ?>
                    <a href="<?php echo $custom_feed_url; ?>" title="<?php esc_attr_e('Subscribe to RSS feed', 'graphene'); ?>" class="rss_link"><span><?php _e('Subscribe to RSS feed', 'graphene'); ?></span></a>
                    <?php do_action('graphene_feed_icon'); ?>
                </div>
            <?php endif; ?>

            <?php
            /**
             * Retrieves our custom search form.
             */
            ?>
            <?php if (($search_box_location = $graphene_settings['search_box_location']) && $search_box_location == 'top_bar' || $search_box_location == '') : ?>
                <div id="top_search">
                    <?php get_search_form(); ?>
                    <?php do_action('graphene_top_search'); ?>
                </div>
            <?php endif; ?>
        </div>
    <?php endif; ?>

    <?php
        if ($post)
            $post_id = $post->ID;
        else
            $post_id = false;
        $header_img = graphene_get_header_image($post_id);

        /*
         * Check if the page uses SSL and change HTTP to HTTPS if true 
         * 
         * Experimental. Let me know if there's any problem.
         */
        if (is_ssl() && stripos($header_img, 'https') === false) {
            $header_img = str_replace('http', 'https', $header_img);
        }

        // Gets the colour for header texts, or if we should display them at all
        if ('blank' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) || '' == get_theme_mod('header_textcolor', HEADER_TEXTCOLOR))
            $style = ' style="display:none;"';
        else
            $style = ' style="color:#' . get_theme_mod('header_textcolor', HEADER_TEXTCOLOR) . ';"';
    ?>
    <div id="header" style="background-image:url(<?php echo $header_img; ?>);">
        <?php if ($graphene_settings['link_header_img']) : ?>
        <a href="<?php echo home_url(); ?>" id="header_img_link" title="<?php esc_attr_e('Go back to the front page', 'graphene'); ?>">&nbsp;</a>
        <?php endif; ?>
        
        <?php /* Header widget area */
		if ($graphene_settings['enable_header_widget'] && is_active_sidebar('header-widget-area')) {
			dynamic_sidebar('header-widget-area');
		}
		?>

        <h1 <?php echo $style; ?> class="header_title"><a <?php echo $style; ?> href="<?php echo home_url(); ?>" title="<?php esc_attr_e('Go back to the front page', 'graphene'); ?>"><?php bloginfo('name'); ?></a></h1>
        <h2 <?php echo $style; ?> class="header_desc"><?php bloginfo('description'); ?></h2>
        <?php do_action('graphene_header'); ?>
    </div>
    <!-- mccio
	<div id="nav">
        <?php /* The navigation menu */ ?>
        <?php
        /* Header menu */
        $args = array(
            'container' => '',
            'menu_id' => 'header-menu',
            'menu_class' => 'menu clearfix',
            'fallback_cb' => 'graphene_default_menu',
            'depth' => 5,
            'theme_location' => 'Header Menu',
        );
        wp_nav_menu(apply_filters('graphene_header_menu_args', $args));

        /* Secondary menu */
        $args = array(
            'container' => '',
            'menu_id' => 'secondary-menu',
            'menu_class' => 'menu clearfix',
            'fallback_cb' => 'none',
            'depth' => 5,
            'theme_location' => 'secondary-menu',
        );
        wp_nav_menu(apply_filters('graphene_secondary_menu_args', $args));
        ?>


        <?php do_action('graphene_top_menu'); ?>

        <?php if (($search_box_location = $graphene_settings['search_box_location']) && $search_box_location == 'nav_bar') : ?>
            <div id="top_search">
                <?php get_search_form(); ?>
                <?php do_action('graphene_top_search'); ?>
            </div>
        <?php endif; ?>
    </div>
	-->

    <?php do_action('graphene_before_content'); ?>

    <div id="content" class="clearfix">
        <?php do_action('graphene_before_content-main'); ?>
        
        <?php
        
            /* Sidebar1 on the left side? */            
            if ( in_array(graphene_column_mode(), array('two-col-right', 'three-col-right', 'three-col-center')) ){
                get_sidebar();                
            }
            /* Sidebar2 on the left side? */
            if ( graphene_column_mode() == 'three-col-right' ){
                get_sidebar('two');
            }            
        
        ?>
        
        <div id="content-main" class="clearfix">
        <?php do_action('graphene_top_content'); ?>
<h1 class="page-title">
    <?php
        printf(__('Category Archive: <span>%s</span>', 'graphene'), single_cat_title('', false));
    ?>
</h1>

<?php if (have_posts()) : ?>
	<?php while (have_posts()) : the_post();?>
    
    	<?php /* Posts navigation for single post pages, but not for Page post */ ?>
		<?php if (is_single() && !is_page()) : ?>
        <div class="post-nav clearfix">
            <p id="previous"><?php previous_post_link(); ?></p>
            <p id="next-post"><?php next_post_link(); ?></p>
            <?php do_action('graphene_post_nav'); ?>
        </div>
        <?php endif; ?>
        
        
        <div id="post-<?php the_ID(); ?>" <?php post_class('clearfix post'); ?>>
            
           <!-- <?php /* Post date is not shown if this is a Page post */ ?>
            <?php if (!is_page() && ( strpos($graphene_settings['post_date_display'], 'icon_') === 0 ) && get_post_type($post) != 'page') : ?>
            <div class="date">
                <p class="default_date"><?php the_time('M'); ?><br /><span><?php the_time('d') ?></span>
                    <?php if ($graphene_settings['post_date_display'] == 'icon_plus_year') : ?>
                    <br /><span class="year"><?php the_time('Y'); ?></span>
                    <?php endif; ?>
                </p>
                
                <?php do_action('graphene_post_date'); ?>
            </div>
            <?php endif; ?>
            
            <?php	/* Show the post author's gravatar if enabled */
			if ($graphene_settings['show_post_avatar'] && !is_page() && get_post_type($post) != 'page') {
				echo get_avatar(get_the_author_meta('user_email'), 40);
			} ?>
            -->
            <?php do_action('graphene_before_post'); ?>
            
            <div class="entry clearfix">
            
                <?php /* Post title */ ?>
                <h2 class="post-title">
                    <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(esc_attr__('Permalink to %s', 'graphene'), the_title_attribute('echo=0')); ?>"><?php if (get_the_title() == '') {_e('(No title)','graphene');} else {the_title();} ?></a>
                <?php do_action('graphene_post_title'); ?>
                </h2>
                
                <?php /* Post meta */ ?>
                <?php if (get_post_type($post) != 'page' || is_user_logged_in()) : ?>
                <div class="post-meta clearfix">
                    
                    <?php /* Post category, not shown if this is a Page post or if admin decides to hide it */ ?>
                    <?php if (!is_page() && ($graphene_settings['hide_post_cat'] != true)) : ?>
                    <ul class="meta_categories">
                        <li><?php the_category(",</li>\n<li>") ?></li>
                    </ul>
                    <?php endif; ?>
                    
                    <?php /* Edit post link, if user is logged in */ ?>
                    <?php if (is_user_logged_in()) : ?>
                    <p class="edit-post">
                        <?php edit_post_link(__('Edit post','graphene'), ' (', ')'); ?>
                    </p>
                    <?php endif; ?>
                    
                    <?php /* Inline post date */
                    	if ($graphene_settings['post_date_display'] == 'text' && !is_page()){
							echo '<p class="post-date-inline">';
                        	the_time(get_option('date_format'));
							echo '</p>';
						}
					?>
                    
                    <?php /* Post author, not not shown if this is a Page post or if admin decides to hide it */ ?>
                    <?php if ($graphene_settings['hide_post_author'] != true) : ?>
                   <!-- <p class="post-author">
                        <?php
                            if (!is_page() && get_post_type($post) != 'page') {
                                /* translators: this is for the author byline, such as 'by John Doe' */
                                _e('by','graphene'); echo ' '; the_author_posts_link();                           
                            }
                        ?>
                    </p>
                    <?php endif; ?>
                    -->
                    <?php do_action('graphene_post_meta'); ?>
                </div>
                <?php endif; ?>
                
                <?php /* Post content */ ?>
                <div class="entry-content clearfix">
                    <?php do_action('graphene_before_post_content'); ?>
                    
                    <?php if ((is_home() && !$graphene_settings['posts_show_excerpt']) || is_singular()) : ?>
                        <?php the_content('<span class="block-button">'.__('Read the rest of this entry &raquo;','graphene').'</span>'); ?>
                    <?php else : ?>
                        <?php /* The post thumbnail */
                        if (has_post_thumbnail(get_the_ID())) {
                            echo '<div class="excerpt-thumb">';
                            the_post_thumbnail(apply_filters('graphene_excerpt_thumbnail_size', 'thumbnail'));
                            echo '</div>';
                        } else {
                            echo graphene_get_post_image(get_the_ID(), apply_filters('graphene_excerpt_thumbnail_size', 'thumbnail'), 'excerpt');	
                        }
                        ?>
                        <?php the_excerpt(); ?>
                    <?php endif; ?>
                    
					<?php echo substr(get_post_meta($post->ID, 'ccio_description', true),0,150).'' ; ?> <a href="<?php echo get_permalink($post->ID); ?>">... Voir la fiche </a>
                    <?php wp_link_pages(array('before' => __('<div class="link-pages"><p><strong>Pages:</strong> ','graphene'), 'after' => '</p></div>', 'next_or_number' => 'number')); ?>
                    
                    <?php do_action('graphene_after_post_content'); ?>
                    
                </div>
                
                <?php /* Post footer */ ?>
                <!--<div class="entry-footer clearfix">
                    <?php /* Display the post's tags, if there is any */ ?>
                    <?php if (!is_page() && get_post_type($post) != 'page' && ($graphene_settings['hide_post_tags'] != true)) : ?>
                    <p class="post-tags"><?php if (has_tag()) {_e('Tags:','graphene'); the_tags(' ', ', ', '');} else {_e('This post has no tag','graphene');} ?></p>
                    <?php endif; ?>
                    
                    <?php 
                        /**
                         * Display AddThis social sharing button if single post page, comments popup link otherwise.
                         * See the graphene_addthis() function in functions.php
                        */ 
                    ?>
                    <?php if (is_single() || is_page()) : ?>
                        <?php graphene_addthis(get_the_ID()); ?>
                    <?php elseif ($graphene_settings['hide_post_commentcount'] != true && comments_open()) : ?>
                        <p class="comment-link"><?php comments_popup_link(__('Leave comment','graphene'), __('1 comment','graphene'), __("% comments",'graphene')); ?></p>
                    <?php endif; ?>
                    
                    <?php do_action('graphene_post_footer'); ?>
                </div>
				-->
            </div>
        </div>
        <?php 
        /**
         * Display the post author's bio in single-post page if enabled
        */
        if (is_single() && $graphene_settings['show_post_author']) :
        ?>
        <h4 class="author_h4"><?php _e('About the author', 'graphene'); ?></h4>
        <div class="author author-info clearfix">
            <?php
            if (get_the_author_meta('graphene_author_imgurl')) {
                echo '<img class="avatar" src="'.get_the_author_meta('graphene_author_imgurl').'" alt="" />';
            } else {
                echo get_avatar(get_the_author_meta('user_email'), 100); 
            }
            ?>
            <p class="author_name"><strong><?php the_author_meta('display_name'); ?></strong></p>
            <p class="author_bio"><?php the_author_meta('description'); ?></p>
            
        </div>
        <?php endif; ?>
        
        <?php 
        /**
         * Display Adsense advertising for single post pages 
         * See graphene_adsense() function in functions.php
        */ 
        ?>
        <?php if (is_single() || is_page() || (is_front_page() && $graphene_settings['adsense_show_frontpage']) || is_archive() || is_search()) {graphene_adsense();} ?>
        
        <?php /* List the child pages if this is a page */ ?>
        <?php if (is_page()) {get_template_part('loop', 'children');} ?>
        
        <?php /* Get the comments template for single post pages */ ?>
        <?php if (is_single() || is_page()) {comments_template();} ?>
            
	<?php endwhile; ?>
    
    <?php /* Display posts navigation if this is not a single post page */ ?>
    <?php if (!is_single()) : ?>
        <?php /* Posts navigation. See functions.php for the function definition */ ?>
    	<?php graphene_posts_nav(); ?>
    <?php endif; ?>
    
<?php /* If there is no post, display message and search form */ ?>
<?php else : ?>
    <div class="post page">
        <h2><?php _e('Not found','graphene'); ?></h2>
        <div class="entry-content">
            <p>
			<?php 
				if (!is_search())
					_e("Sorry, but you are looking for something that isn't here. Wanna try a search?","graphene"); 
				else
					_e("Sorry, but no results were found for that keyword. Wanna try an alternative keyword search?","graphene"); 
			?>
                
            </p>
            <?php get_search_form(); ?>
        </div>
    </div>
    
    <?php do_action('graphene_not_found'); ?>
<?php endif; ?>

<?php do_action('graphene_bottom_content'); ?>
<?php
/**
 * The template for displaying the footer.
 *
 * Closes the <div> for #content, #content-main and #container, <body> and <html> tags.
 *
 * @package WordPress
 * @subpackage Graphene
 * @since Graphene 1.0
 */
global $graphene_settings;
?>
  
    </div><!-- #content-main -->
    
    <?php get_sidebar(); ?>
    

</div><!-- #content -->

<?php /* Get the footer widget area */ ?>
<?php get_template_part('sidebar', 'footer'); ?>

<?php do_action('graphene_before_footer'); ?>

<div id="footer">

    <?php if (!$graphene_settings['hide_copyright']) : ?>
        <div id="copyright" <?php if (!$graphene_settings['show_cc'] && !is_rtl()) {
        echo 'style="background:none;padding-left:20px;"';
    } elseif (!$graphene_settings['show_cc'] && is_rtl()) {
        echo 'style="background:none;padding-right:20px;"';
    } ?>>
            <?php if ($graphene_settings['copy_text'] == '') : ?>
                <p>
                <?php _e('Except where otherwise noted, content on this site is licensed under a <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative Commons Licence</a>.', 'graphene'); ?>
                </p>
            <?php else : ?>
            <?php echo stripslashes($graphene_settings['copy_text']); ?>
        <?php endif; ?>

    <?php do_action('graphene_copyright'); ?>
        </div>
<?php endif; ?>
<?php require_once('includes/ccio_footer.php'); ?>
<!-- mccio
    <div id="w3c">
        <p>
            <a title="<?php esc_attr_e('Valid XHTML 1.0 Strict', 'graphene'); ?>" href="http://validator.w3.org/check?uri=referer" id="w3c_xhtml"><span><?php _e('Valid XHTML 1.0 Strict', 'graphene'); ?></span></a> 
            <a title="<?php esc_attr_e('Valid CSS', 'graphene'); ?>" href="http://jigsaw.w3.org/css-validator/check/referer/" id="w3c_css"><span><?php _e('Valid CSS Level 2.1', 'graphene'); ?></span></a>
        </p>

    <?php do_action('graphene_w3c'); ?>
    </div>
	
	<div id="developer">
        <p>
        <?php /* translators: %1$s is the blog title, %2$s is the theme's name, %3$s is the theme's author */ ?>
<?php printf(__('%1$s uses %2$s theme by %3$s.', 'graphene'), '<a href="' . get_home_url() . '">' . get_bloginfo('name') . '</a>', '<a href="http://www.khairul-syahir.com/wordpress-dev/graphene-theme">' . ucfirst(get_template()) . '</a>', 'Syahir Hakim'); ?>
        </p>

<?php do_action('graphene_developer'); ?>
    </div>
 -->  
</div><!-- #footer 

<?php do_action('graphene_after_footer'); ?>

</div><!-- #container -->

<?php if (!get_theme_mod('background_image', false) && !get_theme_mod('background_color', false)) : ?>
    </div><!-- .bg-gradient -->
<?php endif; ?>

<?php wp_footer(); ?>
</body>
</html>