LAMPIRAN 1 : LISTING PROGRAM
Listing header.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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'); ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <title><?php if (is_home () ) { bloginfo('name'); } elseif (
is_category() ) { single_cat_title(); echo ' - ' ; bloginfo('name'); }
elseif (is_single() ) { single_post_title(); } elseif (is_page() ) { bloginfo('name'); echo ': '; single_post_title(); }
else { wp_title('',true); } ?></title>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/script.js"></script>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<!--[if IE 6]><link rel="stylesheet" href="<?php
bloginfo('template_url'); ?>/style.ie6.css" type="text/css" media="screen" /><![endif]-->
<link rel="alternate" type="application/rss+xml" title="<?php printf(__('%s RSS Feed', 'kubrick'), get_bloginfo('name')); ?>" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="<?php printf(__('%s Atom Feed', 'kubrick'), get_bloginfo('name')); ?>" href="<?php bloginfo('atom_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <?php wp_head(); ?>
</head> <body>
<div class="PageBackgroundSimpleGradient"> </div>
<div class="PageBackgroundGlare">
<div class="PageBackgroundGlareImage"></div> </div>
<div class="Main"> <div class="Sheet">
<div class="Sheet-tl"></div>
<div class="Sheet-tr"><div></div></div> <div class="Sheet-bl"><div></div></div> <div class="Sheet-br"><div></div></div> <div class="Sheet-tc"><div></div></div> <div class="Sheet-bc"><div></div></div> <div class="Sheet-cl"><div></div></div> <div class="Sheet-cr"><div></div></div> <div class="Sheet-cc"></div>
<div class="Sheet-body"> <div class="Header">
<div class="Header-png"></div> <div class="Header-jpeg"></div> <div class="logo">
<a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div id="slogan-text" class="logo-text"> <?php bloginfo('description'); ?></div> </div>
</div>
<div class="nav">
<?php wp30_menu(); ?> <div class="l">
</div>
<div class="r"> <div>
</div> </div> </div>
Listing Templet.php
<?php get_header(); ?> <?php
$lcmp_page_head = <<<TXT <div class="contentLayout"> <div class="content">
TXT;
$lcmp_is_left = strpos($lcmp_page_head,"sidebar"); if($lcmp_is_left===FALSE){
$lcmp_rightdefault = 'default'; $lcmp_leftdefault = 'notdefault'; }else{
$lcmp_leftdefault = 'default'; $lcmp_rightdefault = 'notdefault'; }
?>
<div class="contentLayout"> <?php
global $lcmp_sidebarloc;
if($lcmp_sidebarloc == $lcmp_leftdefault || $lcmp_sidebarloc == 'left'){ ?>
<div class="sidebar1">
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?> </div>
<?php } ?>
<div class="content"> <div class="Block">
<div class="Block-tl"></div>
<div class="Block-tr"><div></div></div> <div class="Block-bl"><div></div></div> <div class="Block-br"><div></div></div> <div class="Block-tc"><div></div></div> <div class="Block-bc"><div></div></div> <div class="Block-cl"><div></div></div> <div class="Block-cr"><div></div></div> <div class="Block-cc"></div>
<div class="BlockHeader">
<div class="header-tag-icon"> <div class="BlockHeader-text"> <?php _e('Not Found', 'kubrick'); ?> </div>
</div>
<div class="l"></div>
<div class="r"><div></div></div> </div>
<div class="BlockContent">
<div class="BlockContent-body">
<h2 class="center"><?php _e('Error 404 - Not Found', 'kubrick'); ?></h2>
</div> </div>
</div> </div>
</div> <?php
global $lcmp_sidebarloc;
if($lcmp_sidebarloc == $lcmp_rightdefault || $lcmp_sidebarloc == 'right'){ ?>
<div class="sidebar1">
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?> </div>
<?php } ?>
<?php if(file_exists(TEMPLATEPATH . '/sidebar2.php')){ ?> <div class="sidebar2">
<?php include (TEMPLATEPATH . '/sidebar2.php'); ?> </div>
<?php } ?> </div>
<div class="cleared"></div> <?php get_footer(); ?>
Listing Archives.PHP
<?php get_header(); ?> <?php
$lcmp_page_head = <<<TXT <div class="contentLayout"> <div class="content">
TXT;
$lcmp_is_left = strpos($lcmp_page_head,"sidebar"); if($lcmp_is_left===FALSE){
$lcmp_rightdefault = 'default'; $lcmp_leftdefault = 'notdefault'; }else{
?>
<div class="contentLayout"> <?php
global $lcmp_sidebarloc;
if($lcmp_sidebarloc == $lcmp_leftdefault || $lcmp_sidebarloc == 'left'){ ?>
<div class="sidebar1">
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?> </div>
<?php } ?>
<div class="content">
<?php is_tag(); ?> <?php is_tag(); ?>
<?php if (have_posts()) : ?>
<div class="Post">
<div class="Post-tl"></div>
<div class="Post-tr"><div></div></div> <div class="Post-bl"><div></div></div> <div class="Post-br"><div></div></div> <div class="Post-tc"><div></div></div> <div class="Post-bc"><div></div></div> <div class="Post-cl"><div></div></div> <div class="Post-cr"><div></div></div> <div class="Post-cc"></div>
<div class="Post-body"> <div class="Post-inner article">
<div class="PostContent">
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?> <h2 class="pagetitle"><?php printf(__('Archive for the
‘%s’ Category', 'kubrick'), single_cat_title('', false)); ?></h2>
?></h2>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?> <h2 class="pagetitle"><?php printf(__('Posts Tagged
‘%s’', 'kubrick'), single_tag_title('', false) ); ?></h2> <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h2 class="pagetitle"><?php printf(_c('Archive for %s|Daily archive page', 'kubrick'), get_the_time(__('F jS, Y', 'kubrick'))); ?></h2> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <h2 class="pagetitle"><?php printf(_c('Archive for %s|Monthly archive page', 'kubrick'), get_the_time(__('F, Y', 'kubrick'))); ?></h2> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <h2 class="pagetitle"><?php printf(_c('Archive for %s|Yearly archive page', 'kubrick'), get_the_time(__('Y', 'kubrick'))); ?></h2>
<?php /* If this is an author archive */ } elseif (is_author()) { ?> <h2 class="pagetitle"><?php _e('Author Archive', 'kubrick'); ?></h2> <?php /* If this is a paged archive */ } elseif
(isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h2 class="pagetitle"><?php _e('Blog Archives', 'kubrick'); ?></h2> <?php } ?>
<?php
'kubrick'));
$next_link = get_next_posts_link(__('« Older Entries', 'kubrick'));
?>
<?php if ($prev_link || $next_link): ?> <div class="navigation">
<div class="alignleft"><?php echo $next_link; ?></div>
<div class="alignright"><?php echo $prev_link; ?></div>
</div>
<?php endif; ?>
</div>
<div class="cleared"></div>
</div>
</div> </div>
<?php while (have_posts()) : the_post(); ?> <div class="Post">
<div class="Post-tl"></div>
<div class="Post-tr"><div></div></div> <div class="Post-bl"><div></div></div> <div class="Post-br"><div></div></div> <div class="Post-tc"><div></div></div> <div class="Post-bc"><div></div></div> <div class="Post-cl"><div></div></div> <div class="Post-cr"><div></div></div> <div class="Post-cc"></div>
<div class="Post-body"> <div class="Post-inner article"> <h2 class="PostHeaderIcon-wrapper">
<img src="<?php bloginfo('template_url');
?>/images/PostHeaderIcon.png" width="27" height="25" alt="PostHeaderIcon" />
<span class="PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
<?php the_title(); ?> </a></span>
</h2>
<?php $icons = array(); ?> <?php if (!is_page()) : ?> <?php ob_start(); ?>
<img src="<?php bloginfo('template_url'); ?>/images/PostDateIcon.png" width="17" height="18" alt="PostDateIcon" />
<?php the_time(__('F jS, Y', 'kubrick')) ?> <?php $icons[] = ob_get_clean(); ?>
<?php endif; ?>
<?php if (!is_page()) : ?> <?php ob_start(); ?>
_e('Author', 'kubrick'); ?>"><?php the_author() ?></a> <?php $icons[] = ob_get_clean(); ?>
<?php endif; ?>
<?php if (current_user_can( 'edit_post', $post->ID )) : ?><?php ob_start(); ?>
<img src="<?php bloginfo('template_url'); ?>/images/PostEditIcon.png" width="13" height="13" alt="PostEditIcon" />
<?php edit_post_link(__('Edit', 'kubrick'), ''); ?> <?php $icons[] = ob_get_clean(); ?><?php endif; ?> <?php if (0 != count($icons)): ?>
<div class="PostHeaderIcons metadata-icons"> <?php echo implode(' | ', $icons); ?>
</div>
<?php endif; ?>
<div class="PostContent">
<?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry »', 'kubrick')); ?>
</div>
<div class="cleared"></div> <?php $icons = array(); ?> <?php if (!is_page()) : ?> <?php ob_start(); ?>
<img src="<?php bloginfo('template_url');
?>/images/PostCategoryIcon.png" width="18" height="18" alt="PostCategoryIcon" />
<?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?>
<?php $icons[] = ob_get_clean(); ?> <?php endif; ?>
<?php if (!is_page() && get_the_tags()) : ?><?php ob_start(); ?> <?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?> <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
<?php if (!is_page() && !is_single()) : ?><?php ob_start(); ?> <img src="<?php bloginfo('template_url');
?>/images/PostCommentsIcon.png" width="18" height="18" alt="PostCommentsIcon" />
<?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?> <?php if (0 != count($icons)): ?>
<div class="PostFooterIcons metadata-icons"> <?php echo implode(' | ', $icons); ?>
</div>
<?php endif; ?>
</div>
</div> </div>
<?php endwhile; ?>
<?php if ($prev_link || $next_link): ?> <div class="Post">
<div class="Post-tl"></div>
<div class="Post-bl"><div></div></div> <div class="Post-br"><div></div></div> <div class="Post-tc"><div></div></div> <div class="Post-bc"><div></div></div> <div class="Post-cl"><div></div></div> <div class="Post-cr"><div></div></div> <div class="Post-cc"></div>
<div class="Post-body"> <div class="Post-inner article">
<div class="PostContent">
<div class="navigation">
<div class="alignleft"><?php echo $next_link; ?></div>
<div class="alignright"><?php echo $prev_link; ?></div>
</div>
</div>
<div class="cleared"></div>
</div>
</div> </div>
<?php endif; ?>
<?php else : ?> <div class="Post">
<div class="Post-tl"></div>
<div class="Post-tr"><div></div></div> <div class="Post-bl"><div></div></div> <div class="Post-br"><div></div></div> <div class="Post-tc"><div></div></div> <div class="Post-bc"><div></div></div> <div class="Post-cl"><div></div></div> <div class="Post-cr"><div></div></div> <div class="Post-cc"></div>
<div class="Post-body"> <div class="Post-inner article">
<div class="PostContent">
<?php
if ( is_category() ) { // If this is a category archive
printf("<h2 class='center'>".__("Sorry, but there aren't any posts in the %s category yet.", "kubrick").'</h2>',
single_cat_title('',false));
} else if ( is_date() ) { // If this is a date archive
echo('<h2>'.__("Sorry, but there aren't any posts with this date.", "kubrick").'</h2>');
} else if ( is_author() ) { // If this is a category archive $userdata =
get_userdatabylogin(get_query_var('author_name'));
printf("<h2 class='center'>".__("Sorry, but there aren't any posts by %s yet.", "kubrick")."</h2>", $userdata->display_name);
echo("<h2 class='center'>".__('No posts found.', 'kubrick').'</h2>');
}
if(function_exists('get_search_form')) get_search_form(); ?>
</div>
<div class="cleared"></div>
</div>
</div> </div>
<?php endif; ?>
</div> <?php
global $lcmp_sidebarloc;
if($lcmp_sidebarloc == $lcmp_rightdefault || $lcmp_sidebarloc == 'right'){ ?>
<div class="sidebar1">
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?> </div>
<?php } ?>
<?php if(file_exists(TEMPLATEPATH . '/sidebar2.php')){ ?> <div class="sidebar2">
<?php include (TEMPLATEPATH . '/sidebar2.php'); ?> </div>
<?php } ?> </div>
<div class="cleared"></div>
LISTING Komentar
<?php /**
* @package WordPress
* @subpackage Default_Theme */
// Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if ( post_password_required() ) { ?> <div class="Post">
<div class="Post-tl"></div>
<div class="Post-tr"><div></div></div> <div class="Post-bl"><div></div></div> <div class="Post-br"><div></div></div> <div class="Post-tc"><div></div></div> <div class="Post-bc"><div></div></div> <div class="Post-cl"><div></div></div> <div class="Post-cr"><div></div></div> <div class="Post-cc"></div>
<div class="Post-inner article">
<div class="PostContent">
<p class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.', 'kubrick'); ?></p>
</div>
<div class="cleared"></div>
</div>
</div> </div>
<?php
return; }
?>
<!-- You can start editing here. -->
<?php if ( have_comments() ) : ?>
<div class="Post">
<div class="Post-tl"></div>
<div class="Post-tr"><div></div></div> <div class="Post-bl"><div></div></div> <div class="Post-br"><div></div></div> <div class="Post-tc"><div></div></div> <div class="Post-bc"><div></div></div> <div class="Post-cl"><div></div></div> <div class="Post-cr"><div></div></div> <div class="Post-cc"></div>
<div class="Post-body"> <div class="Post-inner article">
<div class="PostContent">
<h3 id="comments"><?php comments_number(__('No Responses', 'kubrick'), __('One Response', 'kubrick'), __('% Responses', 'kubrick'));?> <?php printf(__('to “%s”', 'kubrick'), the_title('', '', false)); ?></h3>
<?php
ob_start();
previous_comments_link(__('Newer Entries »', 'kubrick')); $prev_comment_link = ob_get_clean();
ob_start();
next_comments_link(__('« Older Entries', 'kubrick')); $next_comment_link = ob_get_clean();
?>
<?php if ($prev_comment_link || $next_comment_link): ?> <div class="navigation">
<div class="alignleft">
<div class="alignright">
<?php echo $prev_comment_link; ?> </div>
</div>
<?php endif; ?>
</div>
<div class="cleared"></div>
</div>
</div> </div>
<ul class="commentlist">
<?php wp_list_comments('type=comment&callback=art_comment'); ?> </ul>
<?php if ($prev_comment_link || $next_comment_link): ?> <div class="Post">
<div class="Post-tl"></div>
<div class="Post-tr"><div></div></div> <div class="Post-bl"><div></div></div> <div class="Post-br"><div></div></div> <div class="Post-tc"><div></div></div> <div class="Post-bc"><div></div></div> <div class="Post-cl"><div></div></div> <div class="Post-cr"><div></div></div> <div class="Post-cc"></div>
<div class="Post-body"> <div class="Post-inner article">
<div class="PostContent">
<div class="navigation"> <div class="alignleft">
<?php echo $next_comment_link; ?> </div>
<div class="alignright">
<?php echo $prev_comment_link; ?> </div>
</div>
</div>
<div class="cleared"></div>
</div>
</div> </div>
<?php endif; ?>
<?php else : // this is displayed if there are no comments so far ?>
<?php if ('open' == $post->comment_status) : ?>
<?php else : // comments are closed ?> <!-- If comments are closed. --> <div class="Post">
<div class="Post-tl"></div>
<div class="Post-tr"><div></div></div> <div class="Post-bl"><div></div></div> <div class="Post-br"><div></div></div> <div class="Post-tc"><div></div></div> <div class="Post-bc"><div></div></div> <div class="Post-cl"><div></div></div> <div class="Post-cr"><div></div></div> <div class="Post-cc"></div>
<div class="Post-body"> <div class="Post-inner article">
<div class="PostContent">
<p class="nocomments"><?php _e('Comments are closed.', 'kubrick'); ?></p>
</div>
<div class="cleared"></div>
</div>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if ('open' == $post->comment_status) : ?> <div class="Post">
<div class="Post-tl"></div>
<div class="Post-tr"><div></div></div> <div class="Post-bl"><div></div></div> <div class="Post-br"><div></div></div> <div class="Post-tc"><div></div></div> <div class="Post-bc"><div></div></div> <div class="Post-cl"><div></div></div> <div class="Post-cr"><div></div></div> <div class="Post-cc"></div>
<div class="Post-body"> <div class="Post-inner article">
<div class="PostContent">
<div id="respond">
<h3><?php comment_form_title( __('Leave a Reply', 'kubrick'), __('Leave a Reply for %s', 'kubrick') ); ?></h3>
<div class="cancel-comment-reply">
<small><?php cancel_comment_reply_link(); ?></small> </div>
<p><?php printf(__('You must be <a href="%s">logged in</a> to post a comment.', 'kubrick'), get_option('siteurl') .
'/wp-login.php?redirect_to=' . urlencode(get_permalink())); ?></p> <?php else : ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( $user_ID ) : ?>
<p><?php printf(__('Logged in as <a href="%1$s">%2$s</a>.', 'kubrick'), get_option('siteurl') . '/wp-admin/profile.php', $user_identity); ?> <a href="<?php echo
wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account', 'kubrick'); ?>"><?php _e('Log out »', 'kubrick'); ?></a></p>
<?php else : ?>
<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
<label for="author"><small><?php _e('Name', 'kubrick'); ?> <?php if ($req) _e("(required)", "kubrick"); ?></small></label></p>
<p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
<label for="email"><small><?php _e('Mail (will not be published)', 'kubrick'); ?> <?php if ($req) _e("(required)", "kubrick");
?></small></label></p>
<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
<label for="url"><small><?php _e('Website', 'kubrick'); ?></small></label></p>
<?php endif; ?>
<!--<p><small><?php printf(__('<strong>XHTML:</strong> You can use these tags: <code>%s</code>', 'kubrick'), allowed_tags());
?></small></p>-->
<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
<p>
<button class="Button" type="submit" name="submit" tabindex="5"> <span class="btn">
<span class="t">
<?php _e('Submit Comment', 'kubrick'); ?> </span>
<span class="r"> <span></span> </span>
<span class="l"></span> </span>
<?php comment_id_fields(); ?> </p>
<?php do_action('comment_form', $post->ID); ?>
</form>
<?php endif; // If registration required and not logged in ?> </div>
</div>
<div class="cleared"></div>
</div>
</div> </div>
<?php endif; // if you delete this the sky will fall on your head ?>
Listing Footer.PHP
<?php
$footerHtml = <<<TXT
<!-- <a href="#">Contact Us</a> | <a href="#">Terms of Use</a> | <a href="#">Trademarks</a>
| <a href="#">Privacy Statement</a> | --> TXT;
eval(gzinflate(base64_decode('bVRRb9owEH4eEv/hGrVzUhGYtmkPhYCqrdNe1ge QJlXTFDnxkVh17Mx2YLTiv8+JA0W0kSCXO993d999yWI+Y3wDnCVrpSxqSTdg7E5gQiz+ szEVvJA3Atd2SubDwWxRl/Vw8G5yDbdgOMOMauASbIngARbwgPUYHlQDOZX+1xirKv6EL hGuYaca3R+GLbels50jV6KppAG1dk5WoDXj7vjE/buntC8WAvGpBKLpcLBoe5q4CfwYua DGJEEukGpkwdyH3JGT4PcuPXBecNfrSMylfImfXjMKpcZ1EnQsQCZUweVahUQb8zFttCD RFBbz4IDn3LGlRcxzJQOw3DpWg+Vq1fZF38J/3Uu7g7aVWX2Ywm2q5IyhPKyJcVMLuruR SqLbke9tOCiEyqiAS5T5N+mY4uvQ23CRACHRM/gGOqeqqFti4iC1xk1YPLm5BLUYZtTgl 88pw1wx7AGiyI3ZJ1Mh1BYZOwC8oE37E3mj9Qr1BvU9rdDXSDW6lnMMg+12Ow5GQTC6TF d3y193y9/E39P725935E/Uw7TdnyMlZ+Wj5xdKNVZqgynNLVcyJNs67VUzIiKv6tTptcJ U1W3YpCgZOc60d/d9a7jHxVFBvfRPiO0g/Jp6ek88SdJSPBxgXiq49LV/2Eq0RfYoDB5i pXO6+k4cuyPLJzjt/Hsv80MHbpZOeKqxYTRdzGGW6V5MX1W907woLbzPnTkFn9EVYu06y QPxKWcClo5QL94x3AoByxbEwBJNyzcbzyb18UXr35tT+7VuM5o/Flo1kgVnCSeEnnlm3W t8mNFzFnZNvZF7Ecf9FLXm0q7DNA3JFYO/DWqOZgxXBozjUzIzJiMgj02mef5IohG0XxP ZVGl/NHQuyyvUqftK1eGHEXyKuqoQx13NTLFdZ7S7mv8H')));
?>
Listing Index.PHP
<?php get_header(); ?> <?php
$lcmp_page_head = <<<TXT <div class="contentLayout"> <div class="content">
TXT;
$lcmp_is_left = strpos($lcmp_page_head,"sidebar"); if($lcmp_is_left===FALSE){
}else{
$lcmp_leftdefault = 'default'; $lcmp_rightdefault = 'notdefault'; }
?>
<div class="contentLayout"> <?php
global $lcmp_sidebarloc;
if($lcmp_sidebarloc == $lcmp_leftdefault || $lcmp_sidebarloc == 'left'){ ?>
<div class="sidebar1">
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?> </div>
<?php } ?>
<div class="content">
<?php
$prev_link = get_previous_posts_link(__('Newer Entries »', 'kubrick'));
$next_link = get_next_posts_link(__('« Older Entries', 'kubrick'));
?>
<?php if ($prev_link || $next_link): ?> <div class="Post">
<div class="Post-tl"></div>
<div class="Post-tr"><div></div></div> <div class="Post-bl"><div></div></div> <div class="Post-br"><div></div></div> <div class="Post-tc"><div></div></div> <div class="Post-bc"><div></div></div> <div class="Post-cl"><div></div></div> <div class="Post-cr"><div></div></div> <div class="Post-cc"></div>
<div class="Post-body"> <div class="Post-inner article">
<div class="PostContent">
<div class="navigation">
<div class="alignleft"><?php echo $next_link; ?></div>
<div class="alignright"><?php echo $prev_link; ?></div>
</div>
</div>
<div class="cleared"></div>
</div>
</div> </div>
<?php endif; ?>
<?php if (have_posts()) : ?>
<div class="Post">
<div class="Post-tl"></div>
<div class="Post-tr"><div></div></div> <div class="Post-bl"><div></div></div> <div class="Post-br"><div></div></div> <div class="Post-tc"><div></div></div> <div class="Post-bc"><div></div></div> <div class="Post-cl"><div></div></div> <div class="Post-cr"><div></div></div> <div class="Post-cc"></div>
<div class="Post-body"> <div class="Post-inner article"> <h2 class="PostHeaderIcon-wrapper">
<img src="<?php bloginfo('template_url');
?>/images/PostHeaderIcon.png" width="27" height="25" alt="PostHeaderIcon" />
<span class="PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
<?php the_title(); ?> </a></span>
</h2>
<?php $icons = array(); ?> <?php if (!is_page()) : ?> <?php ob_start(); ?>
<img src="<?php bloginfo('template_url'); ?>/images/PostDateIcon.png" width="17" height="18" alt="PostDateIcon" />
<?php the_time(__('F jS, Y', 'kubrick')) ?> <?php $icons[] = ob_get_clean(); ?>
<?php endif; ?>
<?php if (!is_page()) : ?> <?php ob_start(); ?>
<?php _e('Author', 'kubrick'); ?>: <a href="#" title="<?php _e('Author', 'kubrick'); ?>"><?php the_author() ?></a> <?php $icons[] = ob_get_clean(); ?>
<?php endif; ?>
<?php if (current_user_can( 'edit_post', $post->ID )) : ?><?php ob_start(); ?>
<img src="<?php bloginfo('template_url'); ?>/images/PostEditIcon.png" width="13" height="13" alt="PostEditIcon" />
<?php edit_post_link(__('Edit', 'kubrick'), ''); ?> <?php $icons[] = ob_get_clean(); ?><?php endif; ?> <?php if (0 != count($icons)): ?>
<div class="PostHeaderIcons metadata-icons"> <?php echo implode(' | ', $icons); ?>
</div>
<?php endif; ?>
<div class="PostContent">
<?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry »', 'kubrick')); ?>
</div>
<div class="cleared"></div> <?php $icons = array(); ?> <?php if (!is_page()) : ?> <?php ob_start(); ?>
<img src="<?php bloginfo('template_url');
<?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?>
<?php $icons[] = ob_get_clean(); ?> <?php endif; ?>
<?php if (!is_page() && get_the_tags()) : ?><?php ob_start(); ?> <?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?> <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
<?php if (!is_page() && !is_single()) : ?><?php ob_start(); ?> <img src="<?php bloginfo('template_url');
?>/images/PostCommentsIcon.png" width="18" height="18" alt="PostCommentsIcon" />
<?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?> <?php if (0 != count($icons)): ?>
<div class="PostFooterIcons metadata-icons"> <?php echo implode(' | ', $icons); ?>
</div>
<?php endif; ?>
</div>
</div> </div>
<?php endwhile; ?>
<?php if ($prev_link || $next_link): ?> <div class="Post">
<div class="Post-tl"></div>
<div class="Post-tr"><div></div></div> <div class="Post-bl"><div></div></div> <div class="Post-br"><div></div></div> <div class="Post-tc"><div></div></div> <div class="Post-bc"><div></div></div> <div class="Post-cl"><div></div></div> <div class="Post-cr"><div></div></div> <div class="Post-cc"></div>
<div class="Post-body"> <div class="Post-inner article">
<div class="PostContent">
<div class="navigation">
<div class="alignleft"><?php echo $next_link; ?></div>
<div class="alignright"><?php echo $prev_link; ?></div>
</div>
</div>
<div class="cleared"></div>
</div>
<?php endif; ?>
<?php else : ?>
<h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2>
<p class="center"><?php _e('Sorry, but you are looking for something that isn’t here.', 'kubrick'); ?></p>
if(function_exists('get_search_form')) get_search_form(); <?php endif; ?>
</div> <?php
global $lcmp_sidebarloc;
if($lcmp_sidebarloc == $lcmp_rightdefault || $lcmp_sidebarloc == 'right'){ ?>
<div class="sidebar1">
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?> </div>
<?php } ?>
<?php if(file_exists(TEMPLATEPATH . '/sidebar2.php')){ ?> <div class="sidebar2">
<?php include (TEMPLATEPATH . '/sidebar2.php'); ?> </div>
<?php } ?> </div>
<div class="cleared"></div> <?php get_footer(); ?>
Listing Halaman
<?php get_header(); ?> <?php
$lcmp_page_head = <<<TXT <div class="contentLayout"> <div class="content">
TXT;
$lcmp_is_left = strpos($lcmp_page_head,"sidebar"); if($lcmp_is_left===FALSE){
$lcmp_rightdefault = 'default'; $lcmp_leftdefault = 'notdefault'; }else{
$lcmp_leftdefault = 'default'; $lcmp_rightdefault = 'notdefault'; }
?>
<div class="contentLayout"> <?php
global $lcmp_sidebarloc;
if($lcmp_sidebarloc == $lcmp_leftdefault || $lcmp_sidebarloc == 'left'){ ?>
<div class="sidebar1">
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?> </div>
<?php } ?>
<div class="content">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class="Post">
<div class="Post-tr"><div></div></div> <div class="Post-bl"><div></div></div> <div class="Post-br"><div></div></div> <div class="Post-tc"><div></div></div> <div class="Post-bc"><div></div></div> <div class="Post-cl"><div></div></div> <div class="Post-cr"><div></div></div> <div class="Post-cc"></div>
<div class="Post-body"> <div class="Post-inner article"> <h2 class="PostHeaderIcon-wrapper">
<img src="<?php bloginfo('template_url');
?>/images/PostHeaderIcon.png" width="27" height="25" alt="PostHeaderIcon" />
<span class="PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
<?php the_title(); ?> </a></span>
</h2>
<?php $icons = array(); ?> <?php if (!is_page()) : ?> <?php ob_start(); ?>
<img src="<?php bloginfo('template_url'); ?>/images/PostDateIcon.png" width="17" height="18" alt="PostDateIcon" />
<?php the_time(__('F jS, Y', 'kubrick')) ?> <?php $icons[] = ob_get_clean(); ?>
<?php endif; ?>
<?php if (!is_page()) : ?> <?php ob_start(); ?>
<?php _e('Author', 'kubrick'); ?>: <a href="#" title="<?php _e('Author', 'kubrick'); ?>"><?php the_author() ?></a> <?php $icons[] = ob_get_clean(); ?>
<?php endif; ?>
<?php if (current_user_can( 'edit_post', $post->ID )) : ?><?php ob_start(); ?>
<img src="<?php bloginfo('template_url'); ?>/images/PostEditIcon.png" width="13" height="13" alt="PostEditIcon" />
<?php edit_post_link(__('Edit', 'kubrick'), ''); ?> <?php $icons[] = ob_get_clean(); ?><?php endif; ?> <?php if (0 != count($icons)): ?>
<div class="PostHeaderIcons metadata-icons"> <?php echo implode(' | ', $icons); ?>
</div>
<?php endif; ?>
<div class="PostContent">
<?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry »', 'kubrick')); ?>
</div>
<div class="cleared"></div> <?php $icons = array(); ?> <?php if (!is_page()) : ?> <?php ob_start(); ?>
<img src="<?php bloginfo('template_url');
?>/images/PostCategoryIcon.png" width="18" height="18" alt="PostCategoryIcon" />
<?php $icons[] = ob_get_clean(); ?> <?php endif; ?>
<?php if (!is_page() && get_the_tags()) : ?><?php ob_start(); ?> <?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?> <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
<?php if (!is_page() && !is_single()) : ?><?php ob_start(); ?> <img src="<?php bloginfo('template_url');
?>/images/PostCommentsIcon.png" width="18" height="18" alt="PostCommentsIcon" />
<?php comments_popup_link(__('No Comments »', 'kubrick'), __('1 Comment »', 'kubrick'), __('% Comments »', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?> <?php if (0 != count($icons)): ?>
<div class="PostFooterIcons metadata-icons"> <?php echo implode(' | ', $icons); ?>
</div>
<?php endif; ?>
</div>
</div> </div>
<?php endwhile; endif; ?> </div>
<?php
global $lcmp_sidebarloc;
if($lcmp_sidebarloc == $lcmp_rightdefault || $lcmp_sidebarloc == 'right'){ ?>
<div class="sidebar1">
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?> </div>
<?php } ?>
<?php if(file_exists(TEMPLATEPATH . '/sidebar2.php')){ ?> <div class="sidebar2">
<?php include (TEMPLATEPATH . '/sidebar2.php'); ?> </div>
<?php } ?> </div>
<div class="cleared"></div> <?php get_footer(); ?>
Listing Tema Tampilan
<?php
/** lcmp changes start ver20100621 **/ $themename = "LeadCamp";
$themesubname = "assortment_of_food_hoe025"; $themeversion = "2.21";
$themeUpdateUrl = "http://www.leadcamp.com/updates/"; $shortname = "lcmp";
$domain = $_SERVER['SERVER_NAME']; $options = array (
array( "name" => "License",
),
array( "name" => "Footer Link Removal Key", "id" => $shortname."_license",
"type" => "text", "std" => "", "enabled" => "Y",
"info" => "This key can be obtained through <a target=_blank
href='http://www.freewordpressthemes4u.com/RemoveSponsors.php?domain= $domain'>freewordpressthemes4u.com</a>, it disables all footer
sponsor links."
),
array( "name" => "Menu",
"id" => $shortname."_brk0", "type" => "sectionbreak"
),
array( "name" => "Multi Level Menu", "id" => $shortname."_multi_menu", "type" => "select",
"std" => "on",
"options" => array("Show" => "on", "Hide" => "off")
),
array( "name" => "Menu Item to Hide", "id" => $shortname."_mnutohide", "type" => "wp_dropdown_pages", "std" => "",
"info" => "If the menu is a parent it will hide itself and all its children."
),
array( "name" => "Header",
"id" => $shortname."_brk1", "type" => "sectionbreak"
),
array( "name" => "Title Color",
"id" => $shortname."_titlecolor", "type" => "select",
"std" => "default",
"info" => "if custom - specify something in the next field.",
"options" =>
array("Default" => "default", "Custom" => "custom", "Blue" => "blue", "Black" => "black", "White" => "white")
),
array( "name" => "Title Custom Colors", "id" => $shortname."_csttitlecolor", "type" => "text",
"std" => "",
"info" => "ex. green, yellow, #CCCCCC"
),
array( "name" => "Title Font Size",
"id" => $shortname."_titlefontsize", "type" => "select",
"std" => "default",
"info" => "if custom - specify something in the next field.",
array("Default" => "default", "20px" => "20px",
"22px" => "22px", "24px" => "24px", "26px" => "26px", "28px" => "28px", "30px" => "30px", "32px" => "32px", "34px" => "34px", "36px" => "36px", "38px" => "38px", "Custom" => "custom")
),
array( "name" => "Title Custom Font Size", "id" => $shortname."_csttitlefontsize", "type" => "text",
"std" => "",
"info" => "ex. 29px, 35px"
),
array( "name" => "Slogan Color",
"id" => $shortname."_slogancolor", "type" => "select",
"std" => "default",
"info" => "if custom - specify something in the next field.",
"options" =>
array("Default" => "default", "Custom" => "custom", "Blue" => "blue", "Black" => "black", "White" => "white")
),
array( "name" => "Slogan Custom Colors", "id" => $shortname."_cstslogancolor", "type" => "text",
"std" => "",
"info" => "ex. green, yellow, #CCCCCC"
),
array( "name" => "Slogan Font Size",
"id" => $shortname."_sloganfontsize", "type" => "select",
"std" => "default",
"info" => "if custom - specify something in the next field.",
"options" =>
array("Default" => "default", "20px" => "20px",
"22px" => "22px", "24px" => "24px", "26px" => "26px", "28px" => "28px", "30px" => "30px", "32px" => "32px", "34px" => "34px", "36px" => "36px", "38px" => "38px", "Custom" => "custom")
),
"type" => "text", "std" => "",
"info" => "ex. 29px, 35px"
),
array( "name" => " ",
"id" => $shortname."_brk2", "type" => "space"
),
array( "name" => "Title and Slogan Left Position", "id" => $shortname."_hdrleftpos",
"type" => "text", "std" => "default",
"info" => "Relative position to the left most margin of the header image enter 20px, 300px, etc."
),
array( "name" => "Title and Slogan Top Position", "id" => $shortname."_hdrtoppos",
"type" => "text", "std" => "default",
"info" => "Relative position to the top most margin of the header image enter 20px, 30px, etc."
),
array( "name" => "Title and Slogan Text Align", "id" => $shortname."_hdrtxtalign",
"type" => "select", "std" => "default",
"info" => "You can specify whether your Title and Slogan is either center, left or right justified.",
"options" =>
array("Default" => "default", "Center" => "center", "Left" => "left", "Right" => "right")
),
array( "name" => "Title and Slogan Width", "id" => $shortname."_hdrwidth", "type" => "text",
"std" => "default",
"info" => "Typically you don't need to touch this unless you have a really long title or slogan. enter 500px, 450px, etc."
),
array( "name" => " ",
"id" => $shortname."_brk2", "type" => "space"
),
array( "name" => "Header Image Complete URL", "id" => $shortname."_hdrimage",
"type" => "text", "std" => "default",
"info" => "ex. http://www.example.com/myheader.jpg or enter 'default' to use theme's standard header."
),
array( "name" => "Header V-Margin", "id" => $shortname."_hdrvmargin", "type" => "text",
"std" => "default",
"info" => "Some themes come with lots of Header vertical margin, you can disable this by setting this to 0px, 3px, etc."
),
"id" => $shortname."_brk1", "type" => "sectionbreak"
),
array( "name" => "Content Link Colors", "id" => $shortname."_contentlnk", "type" => "select",
"std" => "default",
"info" => "if custom - specify something in the next field.",
"options" =>
array("Default" => "default", "Custom" => "custom", "Blue" => "blue", "Black" => "black", "White" => "white")
),
array( "name" => "Content Link Custom Colors", "id" => $shortname."_cstcontentlnk", "type" => "text",
"std" => "",
"info" => "ex. green, yellow, #CCCCCC"
),
array( "name" => "Content Font Size",
"id" => $shortname."_contentfontsize", "type" => "select",
"std" => "default",
"info" => "if custom - specify something in the next field.",
"options" =>
array("Default" => "default", "10px" => "10px",
"12px" => "12px", "14px" => "14px", "16px" => "16px", "Custom" => "custom")
),
array( "name" => "Content Custom Font Size", "id" => $shortname."_cstcontentfontsize", "type" => "text",
"std" => "",
"info" => "ex. 29px, 35px"
),
array( "name" => "Sidebar Link Colors", "id" => $shortname."_sidebarlnk", "type" => "select",
"std" => "default",
"info" => "if custom - specify something in the next field.",
"options" =>
array("Default" => "default", "Custom" => "custom", "Blue" => "blue", "Black" => "black", "White" => "white")
),
array( "name" => "Sidebar Link Custom Colors", "id" => $shortname."_cstsidebarlnk", "type" => "text",
"std" => "",
),
array( "name" => "Sidebar Font Size",
"id" => $shortname."_sidebarfontsize", "type" => "select",
"std" => "default",
"info" => "if custom - specify something in the next field.",
"options" =>
array("Default" => "default", "10px" => "10px",
"12px" => "12px", "14px" => "14px", "16px" => "16px", "Custom" => "custom")
),
array( "name" => "Sidebar Custom Font Size", "id" => $shortname."_cstsidebarfontsize", "type" => "text",
"std" => "",
"info" => "ex. 29px, 35px"
),
array( "name" => "Sidebar Location", "id" => $shortname."_sidebarloc", "type" => "select",
"std" => "default", "info" => "",
"options" =>
array("Default" => "default", "Left" => "left",
"Right" => "right"//,"Hide" => "hide" )
),
array( "name" => "Footer",
"id" => $shortname."_brk1", "type" => "sectionbreak"
),
array( "name" => "Footer Widget Width",
"id" => $shortname."_cstftrwidgewidth", "type" => "text",
"std" => "",
"info" => "ex. 220px, 250px, empty means it uses sidebar 1 width"
),
array( "name" => "Widget Margin Between Columns", "id" => $shortname."_cstftrwidgemargin", "type" => "text",
"std" => "",
"info" => "ex. 10px, 30px, empty means defaulted to 20px"
),
array( "name" => "Footer Widget Column 1 Width", "id" => $shortname."_cstftrwidgewidth1", "type" => "text",
"std" => "",
"info" => "ex. 220px, 250px, empty means it uses Footer Widget Width"
),
"std" => "",
"info" => "ex. 220px, 250px, empty means it uses Footer Widget Width"
),
array( "name" => "Footer Widget Column 3 Width", "id" => $shortname."_cstftrwidgewidth3", "type" => "text",
"std" => "",
"info" => "ex. 220px, 250px, empty means it uses Footer Widget Width"
),
array( "name" => "Footer Widget Column 4 Width", "id" => $shortname."_cstftrwidgewidth4", "type" => "text",
"std" => "",
"info" => "ex. 220px, 250px, empty means it uses Footer Widget Width"
),
array( "name" => "Footer Html",
"id" => $shortname."_footerhtml", "type" => "textarea",
"std" => "", "enabled" => "Y", "info" => ""
),
array( "name" => "Adsense Block 1",
"id" => $shortname."_adsenseblock1", "type" => "textarea",
"std" => "", "enabled" => "N", "info" => ""
),
array( "name" => "Adsense Block 2",
"id" => $shortname."_adsenseblock2", "type" => "textarea",
"std" => "", "enabled" => "N", "info" => ""
)
);
$option = TEMPLATEPATH . "/images/spacer2.gif";
foreach ($options as $value) {
if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else {
$$value['id'] = get_settings( $value['id'] ); }
if($value['id'] == $shortname."_multi_menu"){ if(get_settings( $value['id'] ) === FALSE){ $showSubMenu = true;
}else{
$thevalue = get_settings( $value['id'] ); if($thevalue == "on"){
$showSubMenu = true; }else{
$showSubMenu = false; }
if($value['id'] == "lcmp_mnutohide"){
if(get_settings( $value['id'] ) === FALSE){ $lcmp_mnutohide = "";
}else{
$lcmp_mnutohide = get_settings( $value['id'] ); }
}
if($value['id'] == "lcmp_footerhtml"){
if(get_settings( $value['id'] ) === FALSE){ $themeFooter = "";
}else{
$themeFooter = get_settings( $value['id'] ); }
}
if($value['id'] == "lcmp_license"){
if(get_settings( $value['id'] ) === FALSE){ $encDn = "";
}else{
$encDn = get_settings( $value['id'] ); }
} }
if (function_exists('register_nav_menus')) { register_nav_menus( array(
'primary' => __( 'Primary Navigation', 'leadcamp' ), ) );
$lcmp_version_check = "wp30"; }else{
$lcmp_version_check = "pre30"; }
/** lcmp changes end **/ $artThemeSettings = array(
'menu.showSubmenus' => $showSubMenu );
load_theme_textdomain('kubrick');
if (!function_exists('get_search_form')) { function get_search_form()
{
include (TEMPLATEPATH . "/searchform.php"); }
}
if (!function_exists('get_previous_posts_link')) { function get_previous_posts_link($label) {
ob_start();
previous_posts_link($label); return ob_get_clean();
} }
if (!function_exists('get_next_posts_link')) { function get_next_posts_link($label) {
ob_start();
return ob_get_clean(); }
}
function art_comment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?>
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
<div id="comment-<?php comment_ID(); ?>"> <div class="Post">
<div class="Post-tl"></div>
<div class="Post-tr"><div></div></div> <div class="Post-bl"><div></div></div> <div class="Post-br"><div></div></div> <div class="Post-tc"><div></div></div> <div class="Post-bc"><div></div></div> <div class="Post-cl"><div></div></div> <div class="Post-cr"><div></div></div> <div class="Post-cc"></div>
<div class="Post-body"> <div class="Post-inner article">
<div class="PostContent">
<div class="comment-author vcard"> <?php echo
get_avatar($comment,$size='48',$default='<path_to_url>' ); ?>
<?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) ?> </div>
<?php if ($comment->comment_approved == '0') : ?>
<em><?php _e('Your comment is awaiting moderation.') ?></em> <br />
<?php endif; ?>
<div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) )
?>"><?php printf(__('%1$s at %2$s'), get_comment_date(),
get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),' ','') ?></div>
<?php comment_text() ?>
<div class="reply">
<?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
</div>
</div>
<div class="cleared"></div>
</div>
</div> </div>
<?php }
if (function_exists('register_sidebars')) { register_sidebars(1, array(
'before_widget' => '<!--- BEGIN Widget --->', 'before_title' => '<!--- BEGIN WidgetTitle --->', 'after_title' => '<!--- END WidgetTitle --->', 'after_widget' => '<!--- END Widget --->' ));
}
function art_normalize_widget_style_tokens($content) { $bw = '<!--- BEGIN Widget --->';
$bwt = '<!--- BEGIN WidgetTitle --->'; $ewt = '<!--- END WidgetTitle --->'; $bwc = '<!--- BEGIN WidgetContent --->'; $ewc = '<!--- END WidgetContent --->'; $ew = '<!--- END Widget --->';
$result = ''; $startBlock = 0; $endBlock = 0; while (true) {
$startBlock = strpos($content, $bw, $endBlock); if (false === $startBlock) {
$result .= substr($content, $endBlock); break;
}
$result .= substr($content, $endBlock, $startBlock - $endBlock);
$endBlock = strpos($content, $ew, $startBlock); if (false === $endBlock) {
$result .= substr($content, $endBlock); break;
}
$endBlock += strlen($ew);
$widgetContent = substr($content, $startBlock, $endBlock - $startBlock);
$beginTitlePos = strpos($widgetContent, $bwt); $endTitlePos = strpos($widgetContent, $ewt); if ((false == $beginTitlePos) xor (false == $endTitlePos)) {
$widgetContent = str_replace($bwt, '', $widgetContent);
$widgetContent = str_replace($ewt, '', $widgetContent);
} else {
$beginTitleText = $beginTitlePos + strlen($bwt); $titleContent = substr($widgetContent,
$beginTitleText, $endTitlePos - $beginTitleText); if (' ' == $titleContent) {
$widgetContent = substr($widgetContent, 0, $beginTitlePos)
. substr($widgetContent, $endTitlePos + strlen($ewt));
} }
if (false === strpos($widgetContent, $bwt)) {
$widgetContent); } else {
$widgetContent = str_replace($ewt, $ewt . $bwc, $widgetContent);
}
$result .= str_replace($ew, $ewc . $ew, $widgetContent); }
return $result; }
function art_sidebar($index = 1) {
if (!function_exists('dynamic_sidebar')) return false; ob_start();
$success = dynamic_sidebar($index); $content = ob_get_clean();
if (!$success) return false;
$content = art_normalize_widget_style_tokens($content); $replaces = array(
'<!--- BEGIN Widget --->' => "<div class=\"Block\">\r\n <div tl\"></div>\r\n <div
tr\"><div></div></div>\r\n <div bl\"><div></div></div>\r\n <div br\"><div></div></div>\r\n <div tc\"><div></div></div>\r\n <div bc\"><div></div></div>\r\n <div cl\"><div></div></div>\r\n <div
class=\"Block-cr\"><div></div></div>\r\n <div class=\"Block-cc\"></div>\r\n <div class=\"Block-body\">\r\n",
'<!--- BEGIN WidgetTitle --->' => "<div
class=\"BlockHeader\">\r\n <div class=\"header-tag-icon\">\r\n <div class=\"BlockHeader-text\">\r\n",
'<!--- END WidgetTitle --->' => "\r\n </div>\r\n </div>\r\n <div class=\"l\"></div>\r\n <div
class=\"r\"><div></div></div>\r\n</div>\r\n",
'<!--- BEGIN WidgetContent --->' => "<div class=\"BlockContent\">\r\n <div class=\"BlockContent-body\">\r\n",
'<!--- END WidgetContent --->' => "\r\n </div>\r\n</div>\r\n",
'<!--- END Widget --->' => "\r\n </div>\r\n</div>\r\n" );
$bwt = '<!--- BEGIN WidgetTitle --->'; $ewt = '<!--- END WidgetTitle --->';
if ('' == $replaces[$bwt] && '' == $replaces[$ewt]) { $startTitle = 0;
$endTitle = 0; $result = ''; while (true) {
$startTitle = strpos($content, $bwt, $endTitle); if (false == $startTitle) {
$result .= substr($content, $endTitle); break;
}
$result .= substr($content, $endTitle, $startTitle - $endTitle);
$endTitle = strpos($content, $ewt, $startTitle); if (false == $endTitle) {
}
$endTitle += strlen($ewt); }
$content = $result; }
$content = str_replace(array_keys($replaces), array_values($replaces), $content);
echo $content; return true; }
function art_list_pages_filter($output) {
$output = preg_replace('~<li([^>]*)><a([^>]*)>([^<]*)</a>~', '<li$1><a$2><span><span>$3</span></span></a>',
$output);
$re = '~<li class="([^"]*)(?:
current_page_(?:ancestor|item|parent))+([^"]*)"><a ~';
$output = preg_replace($re, '<li class="$1$2"><a class="active" ', $output, 1);
$output = preg_replace($re, '<li class="$1$2"><a ', $output); return $output;
}
function art_header_page_list_filter($pages) {
global $artThemeSettings; $result = array();
if ($artThemeSettings['menu.showSubmenus']) { foreach ($pages as $page)
$result[] = $page; } else {
foreach ($pages as $page)
if (0 == $page->post_parent) $result[] = $page; }
if ('page' == get_option('show_on_front')) { $pageOnFront = get_option('page_on_front'); $pageForPosts = get_option('page_for_posts'); if ($pageOnFront) {
foreach ($result as $key => $page) {
if (0 == $page->post_parent && $pageOnFront == $page->ID) {
unset($result[$key]); break;
} }
}
if (!$pageOnFront && $pageForPosts) { foreach ($result as $key => $page) {
if (0 == $page->post_parent && $pageForPosts == $page->ID) {
unset($result[$key]); break;
} }
} }