Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. <?php
  2.  
  3. /********************************************************************
  4. general function
  5. ********************************************************************/
  6. session_start();
  7.  
  8. add_theme_support('post-thumbnails' );
  9. set_post_thumbnail_size( 50, 50 );
  10.  
  11.  
  12. if ($_GET['do'] == 'check_for_updates' && $_COOKIE['update_on'] == 0) :
  13. setcookie("update_on", 1, time()+86400);
  14. endif;
  15.  
  16. require_once TEMPLATEPATH. '/cp/module.php';
  17.  
  18. if (empty($comfy["style"]) || !isset($comfy["style"]) || $comfy["style"] == false) :
  19. $_SESSION['style'] = 'default';
  20. else :
  21. $_SESSION['style'] = $comfy["style"];
  22. endif;
  23.  
  24. /********************************************************************
  25. register sidebar widgets
  26. ********************************************************************/
  27. if (function_exists('register_sidebar'))
  28. register_sidebar(array(
  29. 'name'=>'Main Sidebar',
  30. 'before_widget' => '<li id="%1$s" class="widget %2$s">',
  31. 'after_widget' => '<span class="foot"></span></li>',
  32. 'before_title' => '<h2>',
  33. 'after_title' => '<a href="#minimize" class="Wminimize"></a><a href="#close" class="Wclose"></a></h2>'
  34. ));
  35. register_sidebar(array(
  36. 'name'=>'Left Sidebar',
  37. 'before_widget' => '<li id="%1$s" class="widget %2$s">',
  38. 'after_widget' => '<span class="foot_s"></span></li>',
  39. 'before_title' => '<h2>',
  40. 'after_title' => '</h2>'
  41. ));
  42. register_sidebar(array(
  43. 'name'=>'Right Sidebar',
  44. 'before_widget' => '<li id="%1$s" class="widget %2$s">',
  45. 'after_widget' => '<span class="foot_s"></span></li>',
  46. 'before_title' => '<h2>',
  47. 'after_title' => '</h2>'
  48. ));
  49. register_sidebar(array(
  50. 'name'=>'Top Advertisement',
  51. 'id'=>'top',
  52. 'before_widget' => '<li id="%1$s" class="widget %2$s">',
  53. 'after_widget' => '<span class="foot_s"></span></li>',
  54. 'before_title' => '<h2>',
  55. 'after_title' => '</h2>'
  56. ));
  57. register_sidebar(array(
  58. 'name'=>'Bottom Advertisement',
  59. 'id'=>'bottom',
  60. 'before_widget' => '<li id="%1$s" class="widget %2$s">',
  61. 'after_widget' => '<span class="foot_s"></span></li>',
  62. 'before_title' => '<h2>',
  63. 'after_title' => '</h2>'
  64. ));
  65. /********************************************************************
  66. detecting videos archive
  67. ********************************************************************/
  68. function get_video_cat_tpl($cat) {
  69.  
  70. // this theme
  71. global $comfy;
  72. $subject = get_category_parents($cat, FALSE, ' ', FALSE);
  73. $pattern = '/^'. get_cat_name($comfy['videos']) .'/';
  74.  
  75. if (preg_match($pattern, $subject)) :
  76. include TEMPLATEPATH. '/category-videos.php';
  77. else :
  78. include TEMPLATEPATH. '/archive.php';
  79. endif;
  80.  
  81. }
  82.  
  83. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement