Código PHP:
// BLOG ENTRY
$blog_content = $blog_content . $entry_array[ 'entry' ] . "\n";
// COMMENT ADD
if ( isset( $entry_array[ 'comment' ][ 'url' ] ) ) {
// Show 'add comment' button if set...
$blog_content = $blog_content . '<br /><a href="' . $entry_array[ 'comment' ][ 'url' ] . '">[ ' . $entry_array[ 'comment' ][ 'name' ] . ' ]</a>' . "\n";
}
// COMMENT COUNT
if ( isset( $entry_array[ 'comment' ][ 'count' ] ) ) {
// Show '( x views )' string...
$blog_content = $blog_content . ' ( ' . $entry_array[ 'comment' ][ 'count' ] . ' )' . "\n";
}
// TRACKBACK
if ( isset( $entry_array[ 'trackback' ][ 'url' ] ) ) {
// Show 'trackback' symbol
$blog_content = $blog_content . ' | <a href="' . $entry_array[ 'trackback' ][ 'url' ] . '">[ ' . $entry_array[ 'trackback' ][ 'name' ] . ' ]</a>' . "\n";;
}
// PERMALINK
if ( $blog_config['blog_enable_permalink']){// New for 0.4.6
if ( isset( $entry_array[ 'permalink' ][ 'url' ] ) ) {
// Show 'permalink' symbol
$blog_content = $blog_content . ' | <a href="' . $entry_array[ 'permalink' ][ 'url' ] . '">' . $entry_array[ 'permalink' ][ 'name' ] . '</a>';
}
}
// RELATED LINK
if ( isset( $entry_array['relatedlink']['url'] ) ) {
// Show 'relatedlink' symbol - New to 0.4.6
$blog_content = $blog_content . ' | <a href="' . $entry_array['relatedlink']['url'] . '">' . $entry_array['relatedlink']['name'] . '</a>';
}
// RATING
if ( isset( $entry_array[ 'stars' ] ) ) {
// Show 'permalink' symbol
$blog_content = $blog_content . ' | ' . $entry_array[ 'stars' ];
}
// END
$blog_content = $blog_content . '<hr />' . "\n";
return $blog_content;
}
function theme_staticentry ( $entry_array ) {
$blog_content = theme_blogentry( $entry_array, 'static' ); // New 0.4.8
return $blog_content;
}
function theme_commententry ( $entry_array ) {
$blog_content = theme_blogentry( $entry_array, 'comment' ); // New 0.4.8
return $blog_content;
}
function theme_trackbackentry ( $entry_array ) {
global $blog_config, $user_colors;
$blog_content = "\n";
$blog_content = $blog_content . '<div class="blog_subject">' . $entry_array[ 'title' ] . '</div>' . "\n";
$blog_content = $blog_content . '<div class="blog_date">' . $entry_array[ 'date' ] . '</div>' . "\n";
if ( isset( $entry_array[ 'logged_in' ] ) && $entry_array[ 'logged_in' ] == true ) {
// Show 'delete' button if the user is logged-in...
if ( isset( $entry_array[ 'delete' ][ 'url' ] ) ) {
$blog_content = $blog_content . '<a href="' . $entry_array[ 'delete' ][ 'url' ] . '">[ ' . $entry_array[ 'delete' ][ 'name' ] . ' ]</a><br /><br />' . "\n";
}
}
$blog_content = $blog_content . $entry_array[ 'excerpt' ] . "<p>\n";
if ( (isset( $entry_array[ 'blog_name' ] ) ) && ($entry_array[ 'blog_name' ] != "") ) {
$blog_content = $blog_content . '<a href="'.$entry_array[ 'url' ].'">[ ' . $entry_array[ 'blog_name' ] . " ]</a><p>\n";
} else {
$blog_content = $blog_content . '<a href="'.$entry_array[ 'url' ].'">[ ' . $entry_array[ 'url' ] . " ]</a><p>\n";
}
$blog_content = $blog_content . '<hr />' . "\n";
return $blog_content;
}
// 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" but they will not
// show up in the "colors.php" document yet...
//
// Also, only these default keys have translations for
// different languages. If something is missing, email
// me and I'll add it for future releases.
//
// Eventually you'll have the option of disabling keys
// and added keys will appear on the "color.php" page.
function theme_default_colors () {
global $lang_string;
$color_def = array();
array_push( $color_def, array( 'id' => 'bg_color',
'string' => $lang_string[ 'bg_color' ],
'default' => 'CCCC99' ) );
array_push( $color_def, array( 'id' => 'border_color',
'string' => $lang_string[ 'border_color' ],
'default' => '4D4D45' ) );
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' => 'F2F2F2' ) );
array_push( $color_def, array( 'id' => 'inner_border_color',
'string' => $lang_string[ 'inner_border_color' ],
'default' => 'D9D9D9' ) );
array_push( $color_def, array( 'id' => 'link_reg_color',
'string' => $lang_string[ 'link_reg_color' ],
'default' => '993333' ) );
array_push( $color_def, array( 'id' => 'link_hi_color',
'string' => $lang_string[ 'link_hi_color' ],
'default' => 'FF3333' ) );
array_push( $color_def, array( 'id' => 'link_down_color',
'string' => $lang_string[ 'link_down_color' ],
'default' => '3333FF' ) );
array_push( $color_def, array( 'id' => 'header_bg_color',
'string' => $lang_string[ 'header_bg_color' ],
'default' => '999966' ) );
array_push( $color_def, array( 'id' => 'header_txt_color',
'string' => $lang_string[ 'header_txt_color' ],
'default' => 'FFFFFF' ) );
array_push( $color_def, array( 'id' => 'footer_bg_color',
'string' => $lang_string[ 'footer_bg_color' ],
'default' => 'EEEEEE' ) );
array_push( $color_def, array( 'id' => 'footer_txt_color',
'string' => $lang_string[ 'footer_txt_color' ],
'default' => '666666' ) );
array_push( $color_def, array( 'id' => 'txt_color',
'string' => $lang_string[ 'txt_color' ],
'default' => '666633' ) );
array_push( $color_def, array( 'id' => 'headline_txt_color',
'string' => $lang_string[ 'headline_txt_color' ],
'default' => '666633' ) );
array_push( $color_def, array( 'id' => 'date_txt_color',
'string' => $lang_string[ 'date_txt_color' ],
'default' => '999999' ) );
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.
//
function theme_pagelayout () {
global $user_colors, $blog_config, $blog_theme, $theme_vars;
$content_width = $theme_vars[ 'content_width' ];
$menu_width = $theme_vars[ 'menu_width' ];
$page_width = $content_width + $menu_width;
// Default image path.
$img_path = "themes/" . $blog_theme . "/images/";
Sigue un poco mas :P |
\/