Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /********************************************************************
- general function
- ********************************************************************/
- session_start();
- add_theme_support('post-thumbnails' );
- set_post_thumbnail_size( 50, 50 );
- if ($_GET['do'] == 'check_for_updates' && $_COOKIE['update_on'] == 0) :
- setcookie("update_on", 1, time()+86400);
- endif;
- require_once TEMPLATEPATH. '/cp/module.php';
- if (empty($comfy["style"]) || !isset($comfy["style"]) || $comfy["style"] == false) :
- $_SESSION['style'] = 'default';
- else :
- $_SESSION['style'] = $comfy["style"];
- endif;
- /********************************************************************
- register sidebar widgets
- ********************************************************************/
- if (function_exists('register_sidebar'))
- register_sidebar(array(
- 'name'=>'Main Sidebar',
- 'before_widget' => '<li id="%1$s" class="widget %2$s">',
- 'after_widget' => '<span class="foot"></span></li>',
- 'before_title' => '<h2>',
- 'after_title' => '<a href="#minimize" class="Wminimize"></a><a href="#close" class="Wclose"></a></h2>'
- ));
- register_sidebar(array(
- 'name'=>'Left Sidebar',
- 'before_widget' => '<li id="%1$s" class="widget %2$s">',
- 'after_widget' => '<span class="foot_s"></span></li>',
- 'before_title' => '<h2>',
- 'after_title' => '</h2>'
- ));
- register_sidebar(array(
- 'name'=>'Right Sidebar',
- 'before_widget' => '<li id="%1$s" class="widget %2$s">',
- 'after_widget' => '<span class="foot_s"></span></li>',
- 'before_title' => '<h2>',
- 'after_title' => '</h2>'
- ));
- register_sidebar(array(
- 'name'=>'Top Advertisement',
- 'id'=>'top',
- 'before_widget' => '<li id="%1$s" class="widget %2$s">',
- 'after_widget' => '<span class="foot_s"></span></li>',
- 'before_title' => '<h2>',
- 'after_title' => '</h2>'
- ));
- register_sidebar(array(
- 'name'=>'Bottom Advertisement',
- 'id'=>'bottom',
- 'before_widget' => '<li id="%1$s" class="widget %2$s">',
- 'after_widget' => '<span class="foot_s"></span></li>',
- 'before_title' => '<h2>',
- 'after_title' => '</h2>'
- ));
- /********************************************************************
- detecting videos archive
- ********************************************************************/
- function get_video_cat_tpl($cat) {
- // this theme
- global $comfy;
- $subject = get_category_parents($cat, FALSE, ' ', FALSE);
- $pattern = '/^'. get_cat_name($comfy['videos']) .'/';
- if (preg_match($pattern, $subject)) :
- include TEMPLATEPATH. '/category-videos.php';
- else :
- include TEMPLATEPATH. '/archive.php';
- endif;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement