Advertisement
Guest User

Untitled

a guest
Apr 20th, 2012
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 34.07 KB | None | 0 0
  1. <?php  wp_enqueue_script('jquery');  $table_top10_name = $wpdb->prefix . "dailytop10";  $app_theme = "TechNoise";  $app_version = '1.0';      function blogname(){   $blog = get_bloginfo('name');   $e = explode(' ', $blog, 2);      $exp = " <span>" . $e[0] . "</span>";   if ($e[1]) $exp .= " " . $e[1];      return $exp;  }    function mod_install_top10 () {   global $wpdb;   global $table_top10_name;     if($wpdb->get_var("SHOW TABLES LIKE '$table_top10_name'") != $table_top10_name) {    $sql = "CREATE TABLE " . $table_top10_name . " (      id mediumint(9) NOT NULL AUTO_INCREMENT,      visittime date DEFAULT '0000-00-00' NOT NULL,      postnum int NOT NULL,      postcount int DEFAULT '0' NOT NULL,      UNIQUE KEY id (id)    );";       require_once(ABSPATH . 'wp-admin/upgrade-functions.php');    dbDelta($sql);   }  }    function get_wp_todays_date()  {      global $OFFSET;      $format = "Y-m-d";      if ($offset) {      $nowtime = gmdate($format, time() + 3600*$OFFSET);      } else {      $nowtime = date($format, time());      }      return $nowtime;  }      add_action( 'after_setup_theme', 'theme_setup' );  if ( ! function_exists( 'theme_setup' ) ):  function theme_setup() {      add_theme_support( 'post-thumbnails' );   add_theme_support( 'automatic-feed-links' );               load_theme_textdomain( 'technoise', TEMPLATEPATH . '/languages' );     $locale = get_locale();   $locale_file = TEMPLATEPATH . "/languages/$locale.php";   if ( is_readable( $locale_file ) )    require_once( $locale_file );            register_nav_menus( array(    'pages' => __( 'Pages Navigation', 'technoise' ),    'categories' => __( 'Categories Navigation', 'technoise' ),   ) );  }  endif;    function theme_widgets_init() {   register_sidebar( array(    'name' => __( 'Primary Widget', 'technoise' ),    'id' => 'primary-widgets',    'description' => __( 'Sidebar Middle Right Widget (East)', 'technoise' ),    'before_widget' => '<li id="%1$s" class="widget %2$s">',    'after_widget' => '</li>',    'before_title' => '<h3 class="widgetTitle">',    'after_title' => '</h3>',   ) );   register_sidebar( array(    'name' => __( 'Footer Widget', 'technoise' ),    'id' => 'footer-widgets',    'description' => __( 'Footer Widget', 'technoise' ),    'before_widget' => '<li id="%1$s" class="widget %2$s">',    'after_widget' => '</li>',    'before_title' => '<h4 class="widgetTitle">',    'after_title' => '</h4>',   ) );  }  add_action( 'widgets_init', 'theme_widgets_init' );      function the_short_title($limit=40,$echo=1,$title=''){   if (empty($title)){    $title = the_title('','',false);   }   if (strlen($title)<=$limit){   }else{    $title = substr_replace(the_title('','',false),'...',$limit);   }   if ($echo==1){    echo $title;   }else{    return $title;   }  }      add_action ('the_content', 'update_post_counter');  function update_post_counter($c){   global $post, $wpdb, $table_top10_name;   if (is_single()):    $counter = (int) get_post_meta($post->ID, 'post-counter', true);    $counter = $counter + 1;    update_post_meta($post->ID, 'post-counter', $counter);        $entry_exists = $wpdb->get_var("SELECT COUNT(*) as total from $table_top10_name where visittime='" . get_wp_todays_date() . "' and postnum='" . $post->ID . "'");    if($entry_exists>0){     $entry_data = $wpdb->get_var("SELECT id from $table_top10_name where visittime='" . get_wp_todays_date() . "' and postnum='" . $post->ID . "'");     $wpdb->query("UPDATE $table_top10_name SET postcount = postcount+1, visittime = '" . get_wp_todays_date() . "' WHERE id = '" . $entry_data . "'");    }else{     $wpdb->query("INSERT INTO $table_top10_name (visittime, postnum, postcount) VALUES ('" . get_wp_todays_date() . "', '" . $post->ID . "', 1)");    }   endif;   return $c;  }    function get_today_hotstories ($limit=10, $title = 0){   global $wpdb, $table_top10_name;   $todays_widget_temp = '';   $results = $wpdb->get_results("SELECT * from $table_top10_name inner join {$wpdb->posts} on {$wpdb->posts}.ID=$table_top10_name.postnum WHERE visittime = '" . get_wp_todays_date() . "' and postcount > 0 and post_status = 'publish' $and ORDER BY postcount DESC LIMIT $limit");   if ($results):   foreach ($results as $list) {    $postnum = $list->postnum;    $postcount = $list->postcount;    $id_post = $list->ID;      $title_post = $list->post_title;    $home_url_perma = get_permalink($id_post);    $todays_widget_temp .= "<li><a href=\"$home_url_perma\">$title_post</a> <small class='grey'>($postcount views)</small></li>\n";   }   else:    $todays_widget_temp .= "<li>No posts viewed yet. $and</li>";   endif;   echo $todays_widget_temp;  }      function the_description($args=''){      global $post;   $content = $post->post_content;      $defaults = array(    'more_link' => false, 'more_text' => 'Read More', 'limit' => 150, 'wrap_tag' => 'p'   );   $r = wp_parse_args( $args, $defaults );         $content = preg_replace("/\[caption.*\[\/caption\]/", '', $content);       $output = substr(strip_tags($content), 0, $r["limit"]-3) . "...";      $output = apply_filters('wptexturize', $output);      $output = apply_filters('convert_chars', $output);         if ($r['wrap_tag']) $output2 = '<' . $r['wrap_tag'] . '>';   $output2 .= $output;   if ($r['more_link']) $output2 .= '&nbsp;<a class="morelink" href="' . get_permalink($post->ID) . '#more' . $post->ID . '">' . $r['more_text'] . '</a>';   if ($r['wrap_tag']) $output2 .= '</' . $r['wrap_tag'] . '>';      echo $output2;  }      function theme_excerpt_length( $length ) { return 25; }  add_filter( 'excerpt_length', 'theme_excerpt_length' );      function theme_continue_reading_link() { return ' <a href="'. get_permalink() . '">' . __( 'Read Articles <span class="meta-nav">&rarr;</span>', 'technoise' ) . '</a>'; }  function theme_auto_excerpt_more( $more ) { return ' ...';  }  add_filter( 'excerpt_more', 'theme_auto_excerpt_more' );      function theme_post_image ($args=''){   global $post;   $THEME = get_bloginfo('template_directory') . '/';   $THEME_IMAGES = $THEME . 'images/';   $defaults = array(    'key' => 'featured_image', 'zoom_crop' => 0,    'width' => 150, 'height' => 150,    'no_image' => 'post',    'hide_empty' => 1   );   $no_image = array (    'slider' => $THEME_IMAGES . 'demo/demo-slider.gif',    'slider_small' => $THEME_IMAGES . 'demo/slider-small.gif',    'post' => $THEME_IMAGES . 'demo/post.gif',    'reviews' => $THEME_IMAGES . 'demo/reviews.gif',     );   $r = wp_parse_args( $args, $defaults );   $p = has_post_thumbnail($post->ID);      $image = '';   if ($p){    $attachment_id = get_post_thumbnail_id( $post->ID );    $post_src = wp_get_attachment_image_src( $attachment_id, 'full' );    $image = $post_src[0];   }else{    $image = get_post_meta($post->ID, $r['key'], true);    if (!strstr($image, 'http://') && $image) $image = home_url ('/') . $image;   }      if (!$image):    $image = $THEME_IMAGES . 'no-image.jpg';;   endif;      $g = $THEME . "thumb.php?src=" . urlencode( $image ) . "&amp;h=" . $r['height'] . "&amp;w=" . $r['width'] . "&amp;zc=" . $r['zoom_crop'] . "&amp;q=100&amp;a=t";   echo $g;  }    function the_post_single_category($class=""){   $category = get_the_category();   $category = $category[0];   $class = $class==""?"":' class="' . $class . '"';   echo '<a href="'. get_category_link($category->term_id) .'" ' . $class . '>' . $category->name . "</a>";  }    function single_cat_link(){   $category = get_the_category();   $category = $category[0];   echo get_category_link($category->term_id);  }      function theme_post_comment($comment, $args, $depth) {   $GLOBALS['comment'] = $comment; ?>
  2.  
  3.     <li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
  4.  
  5.         <a name="comment-<?php comment_ID() ?>"></a>
  6.  
  7.         <div id="div-comment-<?php comment_ID() ?>" class="comment-body">
  8.  
  9.             <div class="comment-author vcard">
  10.  
  11.                 <?php if(get_comment_type() == "comment"){ ?>
  12.  
  13.                 <?php the_commenter_avatar($args) ?>
  14.  
  15.                 <?php } ?>  
  16.  
  17.                 <cite class="fn"><?php the_commenter_link() ?></cite> <span class="says">says:</span>
  18.  
  19.             </div>
  20.  
  21.             <div class="comment-meta commentmetadata">
  22.  
  23.                 <a href="<?php echo get_comment_link(); ?>" title="<?php _e('Direct link to this comment', 'technoise'); ?>"><?php echo get_comment_date($GLOBALS['woodate']) ?> <?php _e('at', 'technoise'); ?> <?php echo get_comment_time(); ?></a><?php edit_comment_link('Edit', ' | ', ''); ?>
  24.  
  25.             </div>
  26.  
  27.  
  28.  
  29.             <?php comment_text() ?>
  30.  
  31.            
  32.  
  33.             <?php if ($comment->comment_approved == '0') { ?>
  34.  
  35.                 <p class='unapproved'><?php _e('Your comment is awaiting moderation.', 'technoise'); ?></p>
  36.  
  37.             <?php } ?>
  38.  
  39.            
  40.  
  41.             <div class="reply">
  42.  
  43.                 <?php comment_reply_link(array_merge( $args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
  44.  
  45.             </div><!-- /.reply -->
  46.  
  47. <?php   }      function theme_post_list_pings($comment, $args, $depth) {   $GLOBALS['comment'] = $comment; ?>
  48.  
  49.     <li id="comment-<?php comment_ID(); ?>">
  50.  
  51.         <span class="author"><?php comment_author_link(); ?></span> -
  52.  
  53.         <span class="date"><?php echo get_comment_date($GLOBALS['woodate']) ?></span>
  54.  
  55.         <span class="pingcontent"><?php comment_text() ?></span>
  56.  
  57.  
  58.  
  59. <?php   }       function the_commenter_link() {      $commenter = get_comment_author_link();      if ( ereg( ']* class=[^>]+>', $commenter ) ) {$commenter = ereg_replace( '(]* class=[\'"]?)', '\\1url ' , $commenter );      } else { $commenter = ereg_replace( '(<a )/', '\\1class="url "' , $commenter );}      echo $commenter ;  }    function the_commenter_avatar($args) {      $email = get_comment_author_email();      $avatar = str_replace( "class='avatar", "class='photo avatar", get_avatar( "$email",  $args['avatar_size']) );      echo $avatar;  }        if ( !function_exists('techvocal_theme_avatar') ) {   function techvocal_theme_avatar( $avatar_defaults ) {    $myavatar = get_bloginfo('template_directory') . '/images/no-user.png';    $avatar_defaults[$myavatar] = __('Tech Noise','technoise');    return $avatar_defaults;   }   add_filter( 'avatar_defaults', 'techvocal_theme_avatar' );  }    function theme_get_pictures(){   $i = 1;    while($i <= 200) :     if(theme_get_image($i)) :           echo '<li><a href="' . theme_get_image($i) . '" rel="lightbox[]" title="' . get_the_title(theme_get_image_id($i)) . '"><img class="thumb-archive" src="' . theme_get_image($i) . '" alt="' . get_the_title(theme_get_image_id($i)) . '" /></a></li>';    endif;    $i++;      endwhile;  }    function theme_get_image_id($num = 0, $postID='') {   global $post;   if (!$postID) $postID = $post->ID;   $children = get_children(array(    'post_parent' => $postID,    'post_type' => 'attachment',    'post_mime_type' => 'image',    'orderby' => 'menu_order',    'order' => 'ASC'   ));     $count = 0;      foreach ((array)$children as $key => $value) {          $images[$count] = $value;          $count++;      }   if(isset($images[$num]))    return $images[$num]->ID;   else    return false;  }      function theme_get_image($num = 0, $postID='') {   global $post;   if (!$postID) $postID = $post->ID;   $children = get_children(array(    'post_parent' => $postID,    'post_type' => 'attachment',    'post_mime_type' => 'image',    'orderby' => 'menu_order',    'order' => 'ASC'   ));     $count = 0;      foreach ((array)$children as $key => $value) {          $images[$count] = $value;          $count++;      }   if(isset($images[$num]))    return wp_get_attachment_url($images[$num]->ID);   else    return false;  }    function theme_posted_on() {      printf( __( 'Written by %1$s on <span class="entry-date">%2$s</span>', 'twentyten' ),    sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>',     get_author_posts_url( get_the_author_meta( 'ID' ) ),     sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),     get_the_author()    ),    get_the_date()   );  }    function wp_list_popular_author ($args=''){   global $wpdb;      $defaults = array('limit' => 9, 'order' => 'desc', 'echo' => true);   $r = wp_parse_args( $args, $defaults );   $authors = $wpdb->get_results ("SELECT DISTINCT post_author, COUNT(ID) AS total FROM wp_posts WHERE post_type = 'post' AND (post_status = 'publish') GROUP BY post_author order by total " . $r['order'] . " LIMIT " . $r['limit']);      foreach ($authors as $author){    $userinfo = get_userdata($author->post_author);    $output .= '     <li class="authoritem">      <div class="author_image"><a rel="bookmark" href="' .  get_author_posts_url($author->post_author) . '">' . userphoto__get_userphoto($author->post_author, 100, '', '', '', '') . '</a></div>      <a class="author_title" href="' .  get_author_posts_url($author->post_author) . '" title="' . $userinfo->display_name . '">' . $userinfo->display_name . '</a>     </li>    ';   }      if ($r['echo'])    echo $output;   else    return $output;     }      function technoise_post_type() {              register_post_type( 'gallery',    array('labels' => array(      'name' => __( 'Gallery', 'technoise' ),      'singular_name' => __( 'Gallery', 'technoise' ),      'add_new' => __( 'Add New', 'technoise' ),      'add_new_item' => __( 'Add New Gallery', 'technoise' ),      'edit' => __( 'Edit', 'technoise' ),      'edit_item' => __( 'Edit Gallery', 'technoise' ),      'new_item' => __( 'New Gallery', 'technoise' ),      'view' => __( 'View Gallery', 'technoise' ),      'view_item' => __( 'View Gallery', 'technoise' ),      'search_items' => __( 'Search Gallery', 'technoise' ),      'not_found' => __( 'No gallery found', 'technoise' ),      'not_found_in_trash' => __( 'No gallery found in trash', 'technoise' ),      'parent' => __( 'Parent Gallery', 'technoise' ),     ),     'description' => __( 'This is where you can create new gallery on your site.', 'technoise' ),     'public' => true,     'show_ui' => true,     'capability_type' => 'post',     'publicly_queryable' => true,     'exclude_from_search' => false,     'menu_position' => 5,     'menu_icon' => get_stylesheet_directory_uri() . '/images/theme-ico.gif',     'hierarchical' => false,     'rewrite' => array( 'slug' => 'pictures', 'with_front' => false ),      'query_var' => true,     'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'trackbacks', 'custom-fields', 'comments', 'revisions' ),    )      );       }  add_action( 'init', 'technoise_post_type', 0 );    class BlogOptions {   function init() {        if(isset($_POST['themeoptions'])) {     $optionsd = BlogOptions::getOptions();     $options = $_POST['themeoptions'];     $error_s = "updated=true";     update_option('Blog_Setting_Options', $options);     wp_redirect('admin.php?page=theme-config&' . $error_s);    } else {     $options = BlogOptions::getOptions();    }   }      function getOptions() {    $options = get_option('Blog_Setting_Options');    if (!is_array($options)) {     $options = array(      'google_analytics' => '<!-- Copy and Paster your Analytics Code -->',      'publisher_id' => '',       'layout' => array(       'hc1' => 3,       'hc2' => 7,       'hc3' => 49,       'hc_multi' => array(32,94,46,66,7,49),       ),      'publisher_id' => '',      'social' => array(       'twitter' => 'templatescraze',        'facebook' => 'http://www.facebook.com/pages/TemplatesCraze/108340095879312',       'feedburner' => 'templatescraze',       'linkedin' => 'templatescraze'      ),     );     update_option('Blog_Setting_Options', $options);    }    return $options;   }   function configration() {    $themeoption = BlogOptions::getOptions();        if ( $_GET['updated'] ) echo '<div id="message" class="updated fade"><p>Theme Options Saved.</p></div>';            echo '<link rel="stylesheet" href="'.get_bloginfo('template_url').'/functions.css" />';   ?>
  60.  
  61.     <div class="wrap">
  62.  
  63.        
  64.  
  65.         <h2>Theme Options</h2>
  66.  
  67.         <div id="message"></div>
  68.  
  69.         <div class="metabox-holder">
  70.  
  71.             <form method="post" action="themes.php?page=theme-config" enctype="multipart/form-data">
  72.  
  73.                 <?php wp_nonce_field('update-options'); ?>
  74.  
  75.                 <div id="theme-options">
  76.  
  77.                     <div id="left-column">
  78.  
  79.                        
  80.  
  81.                         <div class="postbox">
  82.  
  83.                             <h3><?php _e("Overview", 'technoise'); ?></h3>
  84.  
  85.                             <p><?php _e("<strong>Tech Noise</strong> is proudly designed by ", 'technoise'); ?><a rel="nofollow" target="_blank" href="http://www.templatescraze.com/" title="<?php _e("Templates Craze", 'technoise'); ?>"><?php _e("Templates Craze", 'technoise'); ?></a></p>
  86.  
  87.                             <p style="text-decoration: none;"><a href="http://www.templatescraze.com/contactus.html" target="_blank"><?php _e("Get Support", 'technoise'); ?></a> | <a href="http://www.templatescraze.com/free-wp-themes/" target="_blank" title="<?php _e("Our Themes", 'technoise'); ?>"><?php _e("Our Themes", 'technoise'); ?></a> | <a href="http://www.templatescraze.com/web-design-articles/" target="_blank" title="<?php _e("Web Design Articles", 'technoise'); ?>"><?php _e("Web Design Articles", 'technoise'); ?></a></p>
  88.  
  89.                         </div><!--end postbox-->
  90.  
  91.                        
  92.  
  93.                         <!--BEGIN OF HOMEPAGE & POSTBOXES-->
  94.  
  95.                         <div class="postbox">
  96.  
  97.                             <h3><?php _e("Layout", 'technoise'); ?></h3>
  98.  
  99.                             <div class="postbox-content">
  100.  
  101.                                
  102.  
  103.                                 <div class="option-row">       
  104.  
  105.                                     <div class="option-name"><label for="slider_enable"><?php _e("Category 1 <small>(Next Slider)</small>:", 'technoise'); ?></label></div><!--end option-name-->          
  106.  
  107.                                     <div class="option-value">
  108.  
  109.                                         <?php wp_dropdown_categories('name=themeoptions[layout][hc1]&class=background_pattern_select&hierarchical=1&selected=' . $themeoption['layout']['hc1'])?>
  110.  
  111.                                     </div><!--end option-value-->
  112.  
  113.                                 </div><!--end option-row-->
  114.  
  115.                                 <div class="option-row">       
  116.  
  117.                                     <div class="option-name"><label for="reviews_enable"><?php _e("Category 2 <small>(Next Slider)</small>:", 'technoise'); ?></label></div><!--end option-name-->         
  118.  
  119.                                     <div class="option-value">
  120.  
  121.                                         <?php wp_dropdown_categories('name=themeoptions[layout][hc2]&class=background_pattern_select&hierarchical=1&selected=' . $themeoption['layout']['hc2'])?>
  122.  
  123.                                     </div><!--end option-value-->
  124.  
  125.                                 </div><!--end option-row-->
  126.  
  127.                                 <div class="option-row">       
  128.  
  129.                                     <div class="option-name"><label for="reviews_enable2"><?php _e("Category <small>(Next Gallery)</small>:", 'technoise'); ?></label></div><!--end option-name-->         
  130.  
  131.                                     <div class="option-value">
  132.  
  133.                                         <?php wp_dropdown_categories('name=themeoptions[layout][hc3]&class=background_pattern_select&hierarchical=1&selected=' . $themeoption['layout']['hc3'])?>
  134.  
  135.                                     </div><!--end option-value-->
  136.  
  137.                                 </div><!--end option-row-->
  138.  
  139.                                
  140.  
  141.                                 <div class="option-row">       
  142.  
  143.                                     <div class="option-name"><label for="reviews_enable2"><?php _e("Categories <small>(Multiple Ajax)</small>:", 'technoise'); ?></label></div><!--end option-name-->          
  144.  
  145.                                     <div class="option-value">
  146.  
  147.                                         <?php              $cats = str_replace("<select ", '<select multiple="multiple"', wp_dropdown_categories('echo=0&name=themeoptions[layout][hc_multi][]&class=background_pattern_select_multi&hierarchical=1'));             $fcats = $themeoption['layout']['hc_multi'];             if (is_array ($fcats)):              foreach ($fcats as $cid):               $cats = str_replace('value="' . $cid . '"', 'value="' . $cid . '" selected="selected"', $cats);              endforeach;              echo $cats;             else:              echo $cats;             endif;                        ?>
  148.  
  149.                                     </div><!--end option-value-->
  150.  
  151.                                 </div><!--end option-row-->
  152.  
  153.                                
  154.  
  155.                                
  156.  
  157.                                 <input type="submit" class="button" value="Save Changes" />
  158.  
  159.                             </div>
  160.  
  161.                         </div>
  162.  
  163.                         <!--END OF HOMEPAGE & POSTBOXES-->  
  164.  
  165.                         <div class="postbox">
  166.  
  167.                             <h3>Advertisement Settings</h3>
  168.  
  169.                             <div class="postbox-content">
  170.  
  171.                                 <div class="option-row">       
  172.  
  173.                                     <div class="option-name">
  174.  
  175.                                         <label>Publisher ID</label>
  176.  
  177.                                     </div><!--end option-name-->       
  178.  
  179.                                     <div class="option-value">
  180.  
  181.                                         <input class="background_pattern_input" id="publisher_id" type="text" name="themeoptions[publisher_id]" value="<?php echo $themeoption['publisher_id'] ?>" />
  182.  
  183.                                     </div><!--end option-value-->
  184.  
  185.                                 </div>
  186.  
  187.                                 <input type="submit" class="button" value="Save Changes" />
  188.  
  189.                             </div><!--end postbox-content-->
  190.  
  191.                         </div>
  192.  
  193.                         <!--end postbox-->                      
  194.  
  195.                     </div><!--end left-column-->           
  196.  
  197.                     <div id="right-column">
  198.  
  199.                         <div class="postbox">
  200.  
  201.                             <h3>Social Media Settings</h3>
  202.  
  203.                             <p>Paste your SocialMedia information in the box below.</p>
  204.  
  205.                             <div class="postbox-content">
  206.  
  207.                                 <div class="option-row">       
  208.  
  209.                                     <div class="option-name">
  210.  
  211.                                         <label>Twitter ID</label>
  212.  
  213.                                     </div><!--end option-name-->       
  214.  
  215.                                     <div class="option-value">
  216.  
  217.                                         <input class="background_pattern_input" id="twitter" type="text" name="themeoptions[social][twitter]" value="<?php echo $themeoption['social']['twitter'] ?>" />
  218.  
  219.                                     </div><!--end option-value-->
  220.  
  221.                                 </div>
  222.  
  223.                                 <div class="option-row">       
  224.  
  225.                                     <div class="option-name">
  226.  
  227.                                         <label>Facebook URL</label>
  228.  
  229.                                     </div><!--end option-name-->       
  230.  
  231.                                     <div class="option-value">
  232.  
  233.                                         <input class="background_pattern_input" id="facebook" type="text" name="themeoptions[social][facebook]" value="<?php echo $themeoption['social']['facebook'] ?>" />
  234.  
  235.                                     </div><!--end option-value-->
  236.  
  237.                                 </div>
  238.  
  239.                                 <div class="option-row">       
  240.  
  241.                                     <div class="option-name">
  242.  
  243.                                         <label>Feedburner ID</label>
  244.  
  245.                                     </div><!--end option-name-->       
  246.  
  247.                                     <div class="option-value">
  248.  
  249.                                         <input class="background_pattern_input" id="feedburner" type="text" name="themeoptions[social][feedburner]" value="<?php echo $themeoption['social']['feedburner'] ?>" />
  250.  
  251.                                     </div><!--end option-value-->
  252.  
  253.                                 </div>
  254.  
  255.                                 <div class="option-row">       
  256.  
  257.                                     <div class="option-name">
  258.  
  259.                                         <label>Linked In</label>
  260.  
  261.                                     </div><!--end option-name-->       
  262.  
  263.                                     <div class="option-value">
  264.  
  265.                                         <input class="background_pattern_input" id="linkedin" type="text" name="themeoptions[social][linkedin]" value="<?php echo $themeoption['social']['linkedin'] ?>" />
  266.  
  267.                                     </div><!--end option-value-->
  268.  
  269.                                 </div>
  270.  
  271.                                 <input type="submit" class="button" value="Save Changes" />
  272.  
  273.                             </div><!--end postbox-content-->
  274.  
  275.                         </div><!--end postbox-->
  276.  
  277.                        
  278.  
  279.                         <div class="postbox">
  280.  
  281.                             <h3>Google Analytics</h3>
  282.  
  283.                             <p>Paste your Google Analytics code in the box below.</p>
  284.  
  285.                             <div class="postbox-content">
  286.  
  287.                                 <div class="option-row">       
  288.  
  289.                                     <textarea class="background_pattern_input" style="height:228px; width:99%" id="google_analytics" name="themeoptions[google_analytics]"><?php echo stripcslashes($themeoption['google_analytics']); ?></textarea>
  290.  
  291.                                 </div><!--end option-row-->
  292.  
  293.                                 <input type="submit" class="button" value="Save Changes" />
  294.  
  295.                             </div><!--end postbox-content-->
  296.  
  297.                         </div><!--end postbox-->
  298.  
  299.                        
  300.  
  301.                        
  302.  
  303.                     </div><!--end right-column-->
  304.  
  305.                 </div><!--theme-options-->
  306.  
  307.                
  308.  
  309.                 <input type="hidden" name="action" value="update" />
  310.  
  311.            
  312.  
  313.             </form>
  314.  
  315.         </div><!--end metabox-holder-->
  316.  
  317.     </div><!--end wrap-->
  318.  
  319.     <?php   }  }  add_action('init', array('BlogOptions', 'init'));         function technoise_admin_options() {   add_menu_page(__('TechNoise','technoise'), __('TechNoise','technoise'), 8, 'theme-config', array('BlogOptions', 'configration'), get_stylesheet_directory_uri() . '/images/theme-ico.gif', 3);   add_submenu_page('theme-config', __('General Settings','technoise'), __('Settings','technoise'), 8, 'theme-config', array('BlogOptions', 'configration'));  }  add_action('admin_menu', 'technoise_admin_options');      $themeoption = BlogOptions::getOptions();      $TECHVOCAL_CAT1NS ['showposts'] = 6;  $TECHVOCAL_CAT1NS ['cat'] = $themeoption['layout']['hc1'];     $TECHVOCAL_CAT2NS ['showposts'] = 6;  $TECHVOCAL_CAT2NS ['cat'] = $themeoption['layout']['hc2'];    $TECHVOCAL_CAT3NS ['showposts'] = 6;  $TECHVOCAL_CAT3NS ['cat'] = $themeoption['layout']['hc3'];    $TECH_VOCAL_MULTI_CAT = $themeoption['layout']['hc_multi'];    add_action ('wp_footer', 'add_footer_settings_ga');  function add_footer_settings_ga (){   global $themeoption;   if ($themeoption['google_analytics']) echo $themeoption['google_analytics'];  }        function technoise_update_checks() {   global $app_abbr, $app_version, $app_theme, $wp_version, $wpdb, $wp_local_package;      $theme_name = trim(strtolower($app_theme));      $current = get_site_transient( $theme_name.'_update_theme' );      if ( ! is_object($current) ) {    $current = new stdClass;    $current->updates = array();    $current->version_checked = $app_version;   }     $locale = apply_filters( 'core_version_check_locale', get_locale() );        $current->last_checked = time();   set_site_transient( $theme_name.'_update_theme', $current );     if ( method_exists( $wpdb, 'db_version' ) )    $mysql_version = preg_replace('/[^0-9.].*/', '', $wpdb->db_version());   else    $mysql_version = 'N/A';     if ( is_multisite( ) ) {    $user_count = get_user_count( );    $num_blogs = get_blog_count( );    $wp_install = network_site_url( );    $multisite_enabled = 1;   } else {    $user_count = count_users( );    $multisite_enabled = 0;    $num_blogs = 1;    $wp_install = home_url( '/' );   }     $local_package = isset( $wp_local_package )? $wp_local_package : '';   $url = "http://www.templatescraze.com/free-wp-themes/vcheck/?theme_name=$theme_name&theme_version=$app_version";      $options = array(    'timeout' => 30,    'user-agent' => $app_theme . '/' . $app_version . '; ' . home_url( '/' ),    'headers' => array(     'wp_install' => $wp_install,     'wp_blog' => home_url( '/' )    )   );     $response = wp_remote_get($url, $options);      if ( is_wp_error( $response ) )    return false;       if ( 200 != $response['response']['code'] )    return false;     $body = json_decode( $response['body'], true );   $updates = new stdClass();      $updates->last_checked = time();   $updates->version_checked = $app_version;   $updates->latest_version = $body["version"];   $updates->link_to_download = $body["downloadfrom"];   set_site_transient( $theme_name.'_update_theme',  $updates);  }    function technoise_update_nag() {   global $app_version, $app_theme;      if ( !current_user_can('update_core') )    return false;       $theme_name = trim(strtolower($app_theme));     $cur = get_site_transient( $theme_name.'_update_theme' );      if ( empty($cur) )    return false;              if ( version_compare($cur->version_checked, $cur->latest_version, '>=' ) )     return false;      if ( current_user_can('update_core') ) {    $msg = sprintf( __('%1$s version %2$s is now available! Customers can <a href="%3$s" target="_blank">download it now</a> or check <a class="thickbox thickbox-preview" href="%4$s" title="What\'s New in %1$s v%2$s" target="_blank">What\'s new!</a>.'), $app_theme, $cur->latest_version, $cur->link_to_download, "http://www.templatescraze.com/free-wp-themes/version_info/?theme_name=$theme_name&theme_version=" . $cur->latest_version . "&preview_iframe=1&TB_iframe=true" );   } else {    $msg = sprintf( __('%1$s version %2$s is now available! Please notify the site administrator.'), $app_theme, $cur->latest_version );   }   echo "<div class='update-nag'>$msg</div>";  }  add_action( 'admin_notices', 'technoise_update_nag', 4 );      if (is_admin()) add_action('init', 'technoise_update_checks');      function wp_footer_links_box (){   global $themeoption;  ?>
  320.  
  321.             <div class="clear"></div>
  322.  
  323.         </div>
  324.  
  325.     </div>
  326.  
  327. </div>
  328.  
  329. <div class="footerblock">
  330.  
  331.     <div class="wrapper">
  332.  
  333.         <div id="searchpanel">
  334.  
  335.             <form id="searchp" action="<?php echo home_url ('/')?>" method="get">
  336.  
  337.                 <input type="text" id="s" name="s" value="<?php _e('Search ...', 'technoise');?>" onclick="if (this.value=='<?php _e('Search ...', 'technoise');?>'){ this.value=''; }" onblur="if (this.value==''){ this.value='<?php _e('Search ...', 'technoise');?>'; }" class="input" /><input type="submit" value="Search" class="searchbtn" />
  338.  
  339.             </form>
  340.  
  341.         </div>
  342.  
  343.         <ul id="footerwidgets">
  344.  
  345.             <?php if ( ! dynamic_sidebar( 'footer-widgets' ) ) : ?>
  346.  
  347.            
  348.  
  349.             <li class="widget">
  350.  
  351.                 <h4 class="widgetTitle"><?php _e('Archive', 'technoise')?></h4>
  352.  
  353.                 <ul>
  354.  
  355.                     <?php wp_get_archives('number=12&title_li=')?>
  356.  
  357.                 </ul>
  358.  
  359.             </li>
  360.  
  361.             <li class="widget">
  362.  
  363.                 <h4 class="widgetTitle"><?php _e('Pages', 'technoise')?></h4>
  364.  
  365.                 <ul>
  366.  
  367.                     <?php wp_list_pages('depth=1&title_li=')?>
  368.  
  369.                 </ul>
  370.  
  371.             </li>
  372.  
  373.             <li class="widget">
  374.  
  375.                 <h4 class="widgetTitle"><?php _e('Bookmarks', 'technoise')?></h4>
  376.  
  377.                 <ul>
  378.  
  379.                     <?php wp_list_bookmarks ('categorize=0&title_li=')?>
  380.  
  381.                 </ul>
  382.  
  383.             </li>
  384.  
  385.             <?php endif;  ?>
  386.  
  387.         </ul>
  388.  
  389.         <div class="clear"></div>
  390.  
  391.     </div>
  392.  
  393.    
  394.  
  395.     <div class="copyright-notice">
  396.  
  397.         <div class="wrapper">
  398.  
  399.             <ul class="subscribebox">
  400.  
  401.                 <li class="rss"><a href="<?php bloginfo('rss2_url')?>"><?php _e( 'Subscribe', 'technoise' ); ?></a></li>
  402.  
  403.                 <li class="twitter"><a rel="nofollow" href="http://www.twitter.com/<?php echo $themeoption['social']['twitter']?>" title="<?php _e( 'Follow us on Twitter', 'technoise' ); ?>"><?php _e( 'Follow us on Twitter', 'technoise' ); ?></a></li>
  404.  
  405.                 <li class="facebook"><a rel="nofollow" href="<?php echo $themeoption['social']['facebook']?>" title="<?php _e( 'Follow us on Facebook', 'technoise' ); ?>"><?php _e( 'Follow us on Facebook', 'technoise' ); ?></a></li>
  406.  
  407.                 <li class="linkedin"><a rel="nofollow" href="<?php echo $themeoption['social']['linkedin']?>" title="<?php _e( 'Follow us on Likedin', 'technoise' ); ?>"><?php _e( 'Follow us on Likedin', 'technoise' ); ?></a></li>
  408.  
  409.             </ul>
  410.  
  411.             <div id="copymessage">
  412.  
  413.                 <p><?php                   echo sprintf( __( '&copy; Copyright %s <a href="%s" title="%s">%s</a>  &mdash; All rights reserved.', 'technoise' ),                      date( 'Y' ),                      home_url( '/' ),                      get_bloginfo('name'),                      get_bloginfo('name')                  )?>&nbsp;Designed by <a href="http://www.templatescraze.com/" title="Web Templates" target="_blank">Web Templates</a> and made free by <a href="http://www.techvocal.com/" title="Tech Blog" target="_blank">Tech Blog</a></p>
  414.  
  415.                 <ul>
  416.  
  417.                     <li class="first"><a href="<?php bloginfo('siteurl'); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"><?php _e('Home', 'technoise'); ?></a></li>
  418.  
  419.                     <?php wp_list_pages('title_li=&depth=1')?>
  420.  
  421.                 </ul>
  422.  
  423.             </div>
  424.  
  425.         </div>
  426.  
  427.     </div>
  428.  
  429. </div>
  430.  
  431. <script type="text/javascript" src="<?php bloginfo('template_directory')?>/js/jquery.st-min.js"></script>
  432.  
  433. <script type="text/javascript" src="<?php bloginfo('template_directory')?>/js/jquery.ss-min.js"></script>
  434.  
  435. <script type="text/javascript" src="<?php bloginfo('template_directory')?>/js/menu.js"></script>
  436.  
  437. <?php  }  add_action ('wp_footer', 'wp_footer_links_box');  ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement