assign( 'home_tab', 'Blog' ); //Set to whatever you want your first tab text to be. if( ! $this->assigned( 'pages' ) ) { $this->assign( 'pages', Posts::get( array( 'content_type' => 'page', 'status' => Post::status('published'), 'nolimit' => 1 ) ) ); } if( ! $this->assigned( 'user' ) ) { $this->assign( 'user', User::identify() ); } if( ! $this->assigned( 'recent_comments' ) ) { $this->assign( 'recent_comments', Comments::get( array('limit'=>10, 'status'=>Comment::STATUS_APPROVED, 'type'=>Comment::COMMENT, 'orderby'=>'date DESC' ) ) ); } if( ! $this->assigned( 'recent_entries' ) ) { $this->assign( 'recent_entries', Posts::get( array('limit'=>10, 'content_type'=>1, 'status'=>2, 'orderby'=>'pubdate DESC' ) ) ); } parent::add_template_vars(); } public function filter_theme_call_header( $return, $theme ) { if ( $this->request->display_search ) { echo ''; } elseif ( $this->request->display_entries_by_date || $this->request->display_entries_by_tag ) { echo ''; } return $return; } /* public function filter_theme_call_footer( $return, $theme ) { var_dump( $this ); return $return; } */ public function filter_post_tags_class( $tags ) { if ( ! is_array( $tags ) ) $tags = array ( $tags ); return 'tag-' . implode( ' tag-', array_keys($tags) ); } public function theme_body_class( $theme ) { // Assigning
class(es) $body_class = array(); if ( $this->request->display_home ) { $body_class[]= 'home'; $body_class[]= 'multiple'; } if ( $this->request->display_entries ) { $body_class[]= 'multiple'; } if ( $this->request->display_entries_by_date ) { $body_class[]= 'date-archive'; $body_class[]= 'archive'; $body_class[]= 'multiple'; } if ( $this->request->display_entries_by_tag ) { $body_class[]= 'tag-archive'; $body_class[]= 'archive'; $body_class[]= 'multiple'; } if ( $this->request->display_entry || $this->request->display_page ) { $post_type_name= Post::type_name( $this->posts->content_type ); $body_class[]= $post_type_name . '-' . $this->posts->slug; $body_class[]= $post_type_name; $body_class[]= 'single'; } if ( $this->request->display_search ) { $body_class[]= 'search'; $body_class[]= 'multiple'; } if ( $this->request->display_404 ) { $body_class[]= 'four04'; } //Get unique items $body_class= array_flip(array_flip($body_class)); if ( count($body_class) > 0 ) { return ' class="' . implode(' ', $body_class) . '"'; } else { return ''; } } public function theme_title( $theme ) { $title= ''; if ( $this->request->display_entries_by_date && isset( $this->entire_match ) ) { $title.= str_replace( '/', '‒', $this->entire_match ); $title.= _t(' » Chronological Archives of '); } if ( $this->request->display_entries_by_tag && isset( $this->tag ) ) { $tag= ( count($this->posts) > 0 ) ? $this->posts[0]->tags[$this->tag] : $this->tag ; $title.= htmlspecialchars($tag) . _t(' » Taxonomic Archives of '); } if ( ( $this->request->display_entry || $this->request->display_page ) && isset( $this->posts ) ) { $title.= strip_tags($this->posts->title) . ' ¶ '; } if ( $this->request->display_search && isset( $this->criteria ) ) { $title.= htmlspecialchars($this->criteria) . _t(' » Search Results of '); } $title.= Options::get( 'title' ); if ( $this->page > 1 ) { $title.= _t(' › Page ') . $this->page; } return $title; } public function theme_mutiple_h1( $theme ) { $h1= ''; if ( $this->request->display_entries_by_date && isset( $this->entire_match ) ) { $h1.= '