<?php 

// --------------------------
// Simple PHP Blog Theme File
// --------------------------
//
// Name: dashed
// Author: Jörg Tiedemann
// Version: 0.1
//

sb_language( 'themes' ); // load language strings

block_admin();           // this is for block management in the side menus
theme_init();            // initialize theme parameters
	
// ---------------
// Theme Variables
// ---------------
function theme_init () {
    global $theme_vars;
    global $blog_config;
		
    $theme_vars = array();
		
    // New 0.3.8
    //
    // Optional:
    // "content_width" and "menu_width" area used internally
    // within the theme only. (optional but recommended.)
    if (isset($blog_config['blog_entry_width'])){
      $theme_vars["content_width"] = $blog_config['blog_entry_width'];
    }
    else{$theme_vars["content_width"] = 550;}
    if (isset($blog_config['blog_menu_width'])){
      $theme_vars["menu_width"] = $blog_config['blog_menu_width'];
    }
    else{$theme_vars["menu_width"] = 170;}
		
    // Required:
    // "popup_window" "width" and "height" are used to determine
    // the size of window to open for the comment view.
    $theme_vars["popup_window"]["width"] = $theme_vars["content_width"] + 50;
    $theme_vars["popup_window"]["height"] = 600;
		
    // Optional:
    // "popup_window" "content_width" is only used internally.
    $theme_vars["popup_window"]["content_width"] = $theme_vars['content_width'];		
    // Retained from 0.3.7c
    //
    // Required:
    // Determines the maximum with of images within a page.
    // Make sure this value is less then "content_width" or you
    // might have wrapping problems.
    $theme_vars["max_image_width"] = $theme_vars["content_width"] - 20;
}


// Function:
// theme_blogentry( $entry_array )
//
// Theme for Blog Entries
// ----------------------
// we simply use the default style defined in scripts/sb_theme.php

function theme_blogentry ( $entry_array ) {
  return default_blogentry($entry_array);
}

// Display STATIC entry page.
// again, we use the default style
	
function theme_staticentry ( $entry_array ) {
  return default_blogentry($entry_array);
}

// Display COMMENT entry page.
// ... and one again - the default style!
	
function theme_commententry ( $entry_array ) {
  return default_blogentry($entry_array);
}
	
// display trackback entries
// use default style defined in scripts/sb_theme.php
function theme_trackbackentry ( $entry_array ) {
  return default_trackbackentry($entry_array);
}



// functions for displaying side menus
// use functions defined in scripts/sb_menublocks.php

function theme_menu_left(){
  menu_blocks('left');
}

function theme_menu_right(){
  menu_blocks('right');
}


function theme_menu_top(){
  top_menu_blocks();
}



	
// Function:
// theme_default_colors( )
//
// Default Base Colors
// -------------------
// $user_colors is an associative array that stores
// all color information. These are the default colors
// for the theme. These values are read in, and then
// get overwritten when the user saved colors are
// read from file.
//
// Note
// ----
// You can create your own "keys"
// they will show up in "colors.php"

function theme_default_colors () {
    global $lang_string;
		
    $color_def = array();

    // Backgrounds
    array_push( $color_def, array( 'id' => 'bg_color',
				   'string' => $lang_string['bg_color'],
				   'default' => 'F7F7F7' ) );
    array_push( $color_def, array( 'id' => 'header_bg_color',
				   'string' => $lang_string['header_bg_color'],
				   'default' => 'F2F2F2' ) );
    array_push( $color_def, array( 'id' => 'footer_bg_color',
				   'string' => $lang_string['footer_bg_color'],
				   'default' => 'F2F2F2' ) );
    array_push( $color_def, array( 'id' => 'main_bg_color',
				   'string' => $lang_string['main_bg_color'],
				   'default' => 'FFFFFF' ) );
    array_push( $color_def, array( 'id' => 'menu_bg_color',
				   'string' => $lang_string['menu_bg_color'],
				   'default' => 'FFFFFF' ) );
		
    // Borders
    array_push( $color_def, array( 'id' => 'border_color',
				   'string' => $lang_string['border_color'],
				   'default' => 'CCCCCC' ) );
    array_push( $color_def, array( 'id' => 'inner_border_color',
				   'string' => $lang_string['inner_border_color'],
				   'default' => 'E6E6E6' ) );
    array_push( $color_def, array( 'id' => 'header_txt_color',
				   'string' => $lang_string['header_txt_color'],
				   'default' => '999999' ) );
    array_push( $color_def, array( 'id' => 'footer_txt_color',
				   'string' => $lang_string['footer_txt_color'],
				   'default' => '999999' ) );
    array_push( $color_def, array( 'id' => 'txt_color',
				   'string' => $lang_string['txt_color'],
				   'default' => '4D4D4D' ) );
    array_push( $color_def, array( 'id' => 'headline_txt_color',
				   'string' => $lang_string['headline_txt_color'],
				   'default' => '999999' ) );
    array_push( $color_def, array( 'id' => 'date_txt_color',
				   'string' => $lang_string['date_txt_color'],
				   'default' => '999999' ) );
		
		
    array_push( $color_def, array( 'id' => 'entry_bg',
				   'string' => $lang_string['entry_bg'],
				   'default' => 'FFFFFF' ) );
    array_push( $color_def, array( 'id' => 'entry_title_bg',
				   'string' => $lang_string['entry_title_bg'],
				   'default' => 'F2F2F2' ) );
    array_push( $color_def, array( 'id' => 'entry_border',
				   'string' => $lang_string['entry_border'],
				   'default' => 'CCCCCC' ) );
								
    array_push( $color_def, array( 'id' => 'entry_title_text',
				   'string' => $lang_string['entry_title_text'],
				   'default' => '999999' ) );
    array_push( $color_def, array( 'id' => 'entry_text',
				   'string' => $lang_string['entry_text'],
				   'default' => '4D4D4D' ) );
		
    array_push( $color_def, array( 'id' => 'menu_bg',
				   'string' => $lang_string['menu_bg'],
				   'default' => 'FFFFFF' ) );
    array_push( $color_def, array( 'id' => 'menu_title_bg',
				   'string' => $lang_string['menu_title_bg'],
				   'default' => 'F2F2F2' ) );
    array_push( $color_def, array( 'id' => 'menu_border',
				   'string' => $lang_string['menu_border'],
				   'default' => 'CCCCCC' ) );
								
    array_push( $color_def, array( 'id' => 'menu_title_text',
				   'string' => $lang_string['menu_title_text'],
				   'default' => '999999' ) );
    array_push( $color_def, array( 'id' => 'menu_text',
				   'string' => $lang_string['menu_text'],
				   'default' => '4D4D4D' ) );
		
    array_push( $color_def, array( 'id' => 'link_reg_color',
				   'string' => $lang_string['link_reg_color'],
				   'default' => '5977B3' ) );
    array_push( $color_def, array( 'id' => 'link_hi_color',
				   'string' => $lang_string['link_hi_color'],
				   'default' => '829FD9' ) );
    array_push( $color_def, array( 'id' => 'link_down_color',
				   'string' => $lang_string['link_down_color'],
				   'default' => '829FD9' ) );
								
    array_push( $color_def, array( 'id' => 'menu_link_reg_color',
				   'string' => $lang_string['menu_link_reg_color'],
				   'default' => '5977B3' ) );
    array_push( $color_def, array( 'id' => 'menu_link_hi_color',
				   'string' => $lang_string['menu_link_hi_color'],
				   'default' => '829FD9' ) );
    array_push( $color_def, array( 'id' => 'menu_link_down_color',
				   'string' => $lang_string['menu_link_down_color'],
				   'default' => '829FD9' ) );
		
    return ( $color_def );
}



	
// Function:
// theme_pagelayout( )
//
// Page Layout Container/Wrapper
// -----------------------------
// This function controls all HTML output to the browser.
//
// Invoking the page_content() fuction inserts the actual
// contents of the page.
//
// use default layout from scripts/sb_theme.php

function theme_pagelayout () {
  global $blog_config;
  $blog_config['show_links_in_header']=true;
  $blog_config['show_searchbox_in_header']=true;
  default_pagelayout();
}


// ... and this is for popup windows
// use default layout from scripts/sb_theme.php

function theme_popuplayout () {
  default_popuplayout();
}

	



	
?>
