Ver Mensaje Individual
  #4 (permalink)  
Antiguo 22/02/2010, 20:04
Solounaduda
 
Fecha de Ingreso: julio-2009
Mensajes: 15
Antigüedad: 14 años, 9 meses
Puntos: 0
Respuesta: Insertar un Simple PHP Blog dentro de una web

themes.php (parte 3)
Código PHP:
  // Function:
  // theme_popuplayout( )
  //
  // Popup Layout Container/Wrapper
  // -----------------------------
  // This function controls all HTML output to the browser.
  //
  // Same as above, but for the pop-up comment window and
  // the image list pop-up.
  //
  function theme_popuplayout () {
    global $user_colors, $blog_config, $theme_vars;

    $popup_width = $theme_vars[ 'popup_window' ][ 'content_width' ];

    // Begin Popup Layout HTML
    ?>
    <body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
      <br />
      <table border="0" width="<?php echo( $popup_width ); ?>" cellspacing="0" cellpadding="0" align="center" style="border: 1px solid #<?php echo(get_user_color('border_color')); ?>;">
        <tr align="left" valign="top">
          <td bgcolor="#<?php echo(get_user_color('header_bg_color')); ?>">
            <div id="header">
              <?php echo($blog_config'blog_title' ]); ?><br />
            </div>
          </td>
        </tr>
        <tr align="left" valign="top">
          <td bgcolor="#<?php echo(get_user_color('main_bg_color')); ?>">
            <div id="maincontent">
              <?php page_content(); ?>
            </div>
          </td>
        </tr>
        <tr align="left" valign="top">
          <td bgcolor="#<?php echo(get_user_color('footer_bg_color')); ?>">
            <div id="footer"><?php echo($blog_config'blog_footer' ]); ?> - <?php echo( page_generated_in() ); ?></div>
          </td>
        </tr>
      </table>
      <br />
    </body>
    <?php
    
// End Popup Layout HTML
  
}

  function 
theme_menu_block ($blockArray$comment='MENU BLOCK'$toggleDiv=null) {
    global 
$blog_theme;

    
// This function creates the menu "blocks" in the sidebar.
    //
    // If you don't want the block to have a "twisty" arrow, then don't pass in a value for $toggleDiv

    // With "twisty" arrow
    /*
      <!-- LINKS -->
      <a id="linkSidebarLinks" href="javascript:toggleBlock('SidebarLinks');"><img src="themes/default/images/minus.gif" name="twisty"> <span class="menu_title">Links</span></a><br />
      <div id="toggleSidebarLinks" class="menu_body">
      <a href="index.php">Home</a><br />
      </div><br />
    */

    // Without "twisty" arrow
    /*
      <!-- LINKS -->
      <span class="menu_title">Links</span><br />
      <div>
      <a href="index.php">Home</a><br />
      </div><br />
    */

    
if ( isset( $blockArray'content' ] ) && $blockArray'content' ] != '' ) {
      
// Default image path.
      
$img_path "themes/" $blog_theme "/images/";
      
$img_show $img_path 'plus.gif';
      
$img_hide $img_path 'minus.gif';

      echo( 
"\n<!-- " $comment " -->\n" );

      echo( 
'<div class="menu_title">' );
      if ( isset( 
$toggleDiv ) ) {
        echo( 
'<a id="link' $toggleDiv '" href="javascript:toggleBlock(\'' $toggleDiv '\');"><img src="' $img_hide '" name="twisty" alt="" /> ' );
      }
      echo( 
$blockArray'title' ] );
      if ( isset( 
$toggleDiv ) ) {
        echo( 
'</a>' );
      }
      echo( 
"</div>\n" );

      if ( isset( 
$toggleDiv ) ) {
        echo( 
'<div id="toggle' $toggleDiv '" class="menu_body">' "\n" );
      } else {
        echo( 
'<div class="menu_body">' "\n" );
      }
      echo( 
$blockArray'content' ] . "\n" );
      echo( 
"</div><br />\n" );

      return 
true;
    } else {
      return 
false;
    }
  }
  function 
theme_menu () {
    global 
$user_colors$lang_string$theme_vars$logged_in$sb_info$blog_config;

    
// This function creates the sidebar menu.
    //
    // Move blocks of code up/down to change the order.
    //
    // The "\n" that you see is a RETURN character.
    // This is just to make the HTML code look prettier.
    // It will not show up on the page.
    //
    //  Please note that \n must be used within " quotes...
    //    echo( "\n" ); // <-- This is a return character
    //    echo( '\n' ); // <-- This will print \n on your page...
    //
    // You can use either ' or " in your echo() statements.
    // But keep in mind that might need to use a backslash --> \
    // to print a double or single quote:
    //
    //  These are equivalent: (note the \" or \'  escape chracter...)
    //    echo( 'this "is" a test' ); // displays: this "is" a test
    //    echo( "this \"is\" a test" );  // displays: this "is" a test
    //    echo( "this 'is' a test" );  // displays: this 'is' a test
    //    echo( 'this \'is\' a test' );  // displays: this 'is' a test

    
echo( "\n<!-- SIDEBAR MENU BEGIN -->\n" );

    
// AVATAR
    
theme_menu_blockmenu_display_avatar(), 'AVATAR''SidebarAvatar' );

    
// LINKS
    
$result menu_display_links();
    
$loginString menu_display_login();
    if ( 
$loginString ) {
      
$result'content' ]  .= '<hr />' $loginString;
    }
    
theme_menu_block$result'LINKS' );
    
// theme_menu_block( $result, 'LINKS', 'SidebarLinks' ); <-- Use this if you want to be able to Expand/Collapse links.

    // MENU
    
theme_menu_blockmenu_display_user(), 'USER MENU''SidebarMenu' );

    
// SETUP
    
theme_menu_blockmenu_display_setup(), 'SETUP MENU''SidebarPreferences' );

    
// CUSTOM BLOCKS
    
$array read_blocks($logged_in);
    for (
$i=$i<count($array) ; $i+=2) {
      
$result = Array();
      
$result'title' ] = $array[$i];
      
$result'content' ] = $array[$i+1];
      
theme_menu_block$result'CUSTOM BLOCK' );
    }

    
// CALENDAR
    
theme_menu_blockmenu_display_blognav(), 'CALENDAR''SidebarCalendar' );

    
// RANDOM ENTRY
    
theme_menu_blockmenu_random_entry(), 'RANDOM ENTRY''SidebarRandomEntry' );

    
// ARCHIVE TREE
    
theme_menu_blockmenu_display_blognav_tree(), 'ARCHIVE TREE''SidebarArchives' );

    
// CATEGORIES
    
theme_menu_blockmenu_display_categories(), 'CATEGORIES''SidebarCategories' );

    
// SEARCH
    
theme_menu_blockmenu_search_field(), 'SEARCH''SidebarSearch' );

    
// Counter Totals
    
theme_menu_blockmenu_display_countertotals(), 'COUNTER''SidebarCounter');

    
// RECENT ENTRIES
    
theme_menu_blockmenu_most_recent_entries(), 'RECENT ENTRIES''SidebarRecentEntries' );

    
// RECENT COMMENTS
    
theme_menu_blockmenu_most_recent_comments(), 'RECENT COMMENTS''SidebarRecentComments' );

    
// RECENT TRACKBACKS
    
theme_menu_blockmenu_most_recent_trackbacks(), 'RECENT TRACKBACKS''SidebarRecentTrackbacks' );

    echo( 
'<p />' );

    
// WEB BADGES
    
echo( '<div align="center">' );
    echo( 
'<a href="http://sourceforge.net/projects/sphpblog/"><img style="margin-bottom: 5px;" src="interface/button_sphpblog.png" alt="Powered by Simple PHP Blog" title="Powered by Simple PHP Blog" border="0" /></a> ' );
    echo( 
'<a href="rss.php"><img style="margin-bottom: 5px;" src="interface/button_rss20.png" alt="Get RSS 2.0 Feed" title="Get RSS 2.0 Feed" border="0" /></a><br />' );
    echo( 
'<a href="http://php.net/"><img style="margin-bottom: 5px;" src="interface/button_php.png" alt="Powered by PHP ' phpversion() . '" title="Powered by PHP ' phpversion() . '" border="0" /></a> ' );
    echo( 
'<a href="atom.php"><img style="margin-bottom: 5px;" src="interface/button_atom03.png" alt="Get Atom 0.3 Feed" title="Get Atom 0.3 Feed" border="0" /></a><br />' );
    echo( 
'<img style="margin-bottom: 5px;" src="interface/button_txt.png" alt="Powered by Plain text files" title="Powered by Plain text files" border="0" /> ' );
    echo( 
'<a href="rdf.php"><img style="margin-bottom: 5px;" src="interface/button_rdf10.png" alt="Get RDF 1.0 Feed" title="Get RDF 1.0 Feed" border="0" /></a><br />' );
    echo( 
'</div>' );
  }

?>
Estoy completamente desorientado, cualquier ayuda se agradece!