b2evolution PHP Cross Reference Blogging Systems

Source: /a_noskin.php - 508 lines - 18153 bytes - Text - Print

Description: This file will display a blog, WITHOUT using skins. This file will set some display parameters and then display the blog in a template.

   1  <?php
   2  /**
   3   * This file will display a blog, WITHOUT using skins.
   4   *
   5   * This file will set some display parameters and then display the blog in a template.
   6   *
   7   * Note: You only need to use this file for advanced use/customization of b2evolution.
   8   * Most of the time, calling your blog through index.php with a skin will be enough.
   9   * You should try to customize a skin before thrying to use this fle.
  10   *
  11   * Same display without using skins: a_stub.php
  12   *
  13   * b2evolution - {@link http://b2evolution.net/}
  14   * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  15   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}
  16   *
  17   * @package evoskins
  18   * @subpackage noskin
  19   */
  20  
  21  # First, select which blog you want to display here!
  22  # You can find these numbers in the back-office under the Blogs section.
  23  # You can also create new blogs over there. If you do, you may duplicate this file for the new blog.
  24  $blog = 1;
  25  
  26  # Tell b2evolution you don't want to use evoSkins for this template:
  27  $skin = '';
  28  
  29  # This setting retricts posts to those published, thus hiding drafts.
  30  # You should not have to change this.
  31  $show_statuses = array();
  32  
  33  # Additionnaly, you can set other values (see URL params in the manual)...
  34  # $order = 'ASC'; // This for example would display the blog in chronological order...
  35  
  36  # Tell b2evolution not to redirect. This is necessary only if "301" for homepage is checked and the blog URL is set
  37  # to something else than this page -- which is the case on demo installs.
  38  # For production systems, properly set the blog URL , then remove the line below:
  39  $redir = 'no';
  40  
  41  /**
  42   * Let b2evolution handle the query string and load the blog data:
  43   */
  44  require_once dirname(__FILE__).'/conf/_config.php';
  45  
  46  require $inc_path.'_blog_main.inc.php';
  47  
  48  // Make sure includes will check in the current folder!
  49  $ads_current_skin_path = dirname(__FILE__).'/';
  50  
  51  
  52  # Now, below you'll find the main template...
  53  
  54  // --------------------- PAGE LEVEL CACHING SUPPORT ---------------------
  55  // Note: This is totally optional. General caching must be enabled in Global settings, otherwise this will do nothing.
  56  // Delete this block if you don't care about page level caching. Don't forget to delete the matching section at the end of the page.
  57  load_class( '_core/model/_pagecache.class.php', 'PageCache' );
  58  $PageCache = new PageCache( NULL );
  59  // Check for cached content & Start caching if needed:
  60  if( ! $PageCache->check() )
  61  {    // Cache miss, we have to generate:
  62      // --------------------- PAGE LEVEL CACHING SUPPORT ---------------------
  63  
  64  
  65  // This is the main template; it may be used to display very different things.
  66  // Do inits depending on current $disp:
  67  skin_init( $disp );
  68  
  69  // Add CSS:
  70  require_css( 'basic_styles.css', 'rsc_url' ); // the REAL basic styles
  71  require_css( 'basic.css', 'rsc_url' ); // Basic styles
  72  require_css( 'blog_base.css', 'rsc_url' ); // Default styles for the blog navigation
  73  require_css( 'item_base.css', 'rsc_url' ); // Default styles for the post CONTENT
  74  require_css( 'fp02.css', 'rsc_url' );
  75  
  76  add_js_for_toolbar();        // Registers all the javascripts needed by the toolbar menu
  77  
  78  // Functions to work with AJAX response data
  79  require_js( '#jquery#', 'rsc_url' );
  80  require_js( '#jqueryUI#', 'rsc_url' );
  81  require_js( 'ajax.js', 'rsc_url' );
  82  ?>
  83  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  84  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php locale_lang() ?>" lang="<?php locale_lang() ?>"><!-- InstanceBegin template="/Templates/Standard.dwt" codeOutsideHTMLIsLocked="false" -->
  85  <head>
  86  <!-- InstanceBeginEditable name="doctitle" -->
  87      <title><?php
  88          // ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
  89          request_title( array(
  90              'auto_pilot'      => 'seo_title',
  91          ) );
  92          // ------------------------------ END OF REQUEST TITLE -----------------------------
  93      ?></title>
  94  <!-- InstanceEndEditable -->
  95  <!-- InstanceBeginEditable name="head" -->
  96      <?php skin_content_meta(); /* Charset for static pages */ ?>
  97      <?php $Plugins->trigger_event( 'SkinBeginHtmlHead' ); ?>
  98      <?php skin_base_tag(); /* You're not using any skin here but this won't hurt. However it will be very helpfull to have this here when you make the switch to a skin! */ ?>
  99      <?php skin_description_tag(); ?>
 100      <?php skin_keywords_tag(); ?>
 101      <meta name="generator" content="b2evolution <?php echo $app_version ?>" /> <!-- Please leave this for stats -->
 102      <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php $Blog->disp( 'rss2_url', 'raw' ) ?>" />
 103      <link rel="alternate" type="application/atom+xml" title="Atom" href="<?php $Blog->disp( 'atom_url', 'raw' ) ?>" />
 104      <?php include_headlines() /* Add javascript and css files included by plugins and skin */ ?>
 105      <!-- InstanceEndEditable -->
 106  </head>
 107  <body>
 108  <!-- InstanceBeginEditable name="ToolBar" -->
 109  <?php
 110      // ---------------------------- TOOLBAR INCLUDED HERE ----------------------------
 111      require $skins_path.'_toolbar.inc.php';
 112      // ------------------------------- END OF TOOLBAR --------------------------------
 113      echo "\n";
 114      if( show_toolbar() )
 115      {
 116          echo '<div id="skin_wrapper" class="skin_wrapper_loggedin">';
 117      }
 118      else
 119      {
 120          echo '<div id="skin_wrapper" class="skin_wrapper_anonymous">';
 121      }
 122      echo "\n";
 123  ?>
 124  <!-- InstanceEndEditable -->
 125  <div class="pageHeader">
 126  <!-- InstanceBeginEditable name="NavBar2" -->
 127  <?php
 128      // --------------------------------- START OF BLOG LIST --------------------------------
 129      skin_widget( array(
 130                          // CODE for the widget:
 131                          'widget' => 'colls_list_public',
 132                          // Optional display params
 133                          'block_start' => '<div class="NavBar">',
 134                          'block_end' => '</div>',
 135                          'block_display_title' => false,
 136                          'list_start' => '',
 137                          'list_end' => '',
 138                          'item_start' => '',
 139                          'item_end' => '',
 140                          'item_selected_start' => '',
 141                          'item_selected_end' => '',
 142                          'link_selected_class' => 'NavButton2',
 143                          'link_default_class' => 'NavButton2',
 144                  ) );
 145      // ---------------------------------- END OF BLOG LIST ---------------------------------
 146  ?>
 147  <!-- InstanceEndEditable -->
 148  <div class="pageTitle">
 149  <h1 id="pageTitle"><!-- InstanceBeginEditable name="PageTitle" --><?php $Blog->disp( 'name', 'htmlbody' ) ?><!-- InstanceEndEditable --></h1>
 150  </div>
 151  </div>
 152  
 153  
 154  <div class="pageSubTitle"><!-- InstanceBeginEditable name="SubTitle" --><?php $Blog->disp( 'tagline', 'htmlbody' ) ?><!-- InstanceEndEditable --></div>
 155  
 156  
 157  <div class="main"><!-- InstanceBeginEditable name="Main" -->
 158  
 159  <div class="bPosts">
 160  
 161      <?php
 162          // ------------------------- MESSAGES GENERATED FROM ACTIONS -------------------------
 163          messages( array(
 164              'block_start' => '<div class="action_messages">',
 165              'block_end'   => '</div>',
 166          ) );
 167          // --------------------------------- END OF MESSAGES ---------------------------------
 168      ?>
 169  
 170      <?php
 171          // ------------------- PREV/NEXT POST LINKS (SINGLE POST MODE) -------------------
 172          item_prevnext_links( array(
 173                  'block_start' => '<table class="prevnext_post"><tr>',
 174                  'prev_start'  => '<td>',
 175                  'prev_end'    => '</td>',
 176                  'next_start'  => '<td class="right">',
 177                  'next_end'    => '</td>',
 178                  'block_end'   => '</tr></table>',
 179              ) );
 180          // ------------------------- END OF PREV/NEXT POST LINKS -------------------------
 181      ?>
 182  
 183      <?php
 184          // ------------------------- TITLE FOR THE CURRENT REQUEST -------------------------
 185          request_title( array(
 186                  'title_before'=> '<h2>',
 187                  'title_after' => '</h2>',
 188                  'title_none'  => '',
 189                  'glue'        => ' - ',
 190                  'title_single_disp' => true,
 191                  'format'      => 'htmlbody',
 192              ) );
 193          // ------------------------------ END OF REQUEST TITLE -----------------------------
 194      ?>
 195  
 196      <?php
 197          // -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
 198          mainlist_page_links( array(
 199                  'block_start' => '<p class="center"><strong>',
 200                  'block_end' => '</strong></p>',
 201              ) );
 202          // ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
 203      ?>
 204  
 205  
 206      <!-- =================================== START OF MAIN AREA =================================== -->
 207  
 208      <?php // ------------------------------------ START OF POSTS ----------------------------------------
 209          // Display message if no post:
 210          display_if_empty();
 211  
 212          while( $Item = & mainlist_get_item() )
 213          {    // For each blog post, do everything below up to the closing curly brace "}"
 214          ?>
 215  
 216          <?php
 217              // ------------------------------ DATE SEPARATOR ------------------------------
 218              $MainList->date_if_changed( array(
 219                      'before'      => '<h2>',
 220                      'after'       => '</h2>',
 221                      'date_format' => '#',
 222                  ) );
 223          ?>
 224          <div id="<?php $Item->anchor_id() ?>" class="bPost bPost<?php $Item->status_raw() ?>" lang="<?php $Item->lang() ?>">
 225  
 226              <div class="bSmallHead">
 227              <?php
 228                  $Item->permanent_link( array(
 229                          'text' => '#icon#',
 230                      ) );
 231              ?>
 232              <?php
 233                  $Item->issue_time(); // Post issue time
 234              ?>
 235              <?php
 236                  $Item->categories( array(
 237                      'before'          => ', '.T_('Categories').': ',
 238                      'after'           => ' ',
 239                      'include_main'    => true,
 240                      'include_other'   => true,
 241                      'include_external'=> true,
 242                      'link_categories' => true,
 243                  ) );
 244              ?>
 245              </div>
 246              <h3 class="bTitle"><?php $Item->title(); ?></h3>
 247  
 248              <?php
 249                  // ---------------------- POST CONTENT INCLUDED HERE ----------------------
 250                  skin_include( '_item_content.inc.php', array(
 251                          'image_size'    =>    'fit-400x320',
 252                      ) );
 253                  // Note: You can customize the default item feedback by copying the generic
 254                  // /skins/_item_feedback.inc.php file into the current skin folder.
 255                  // -------------------------- END OF POST CONTENT -------------------------
 256              ?>
 257  
 258              <?php
 259                  // List all tags attached to this post:
 260                  $Item->tags( array(
 261                          'before' =>         '<div class="bSmallPrint">'.T_('Tags').': ',
 262                          'after' =>          '</div>',
 263                          'separator' =>      ', ',
 264                      ) );
 265              ?>
 266  
 267              <div class="bSmallPrint">
 268                  <?php
 269                      // Link to comments, trackbacks, etc.:
 270                      $Item->feedback_link( array(
 271                                      'type' => 'comments',
 272                                      'link_before' => '',
 273                                      'link_after' => ' &bull; ',
 274                                      'link_text_zero' => '#',
 275                                      'link_text_one' => '#',
 276                                      'link_text_more' => '#',
 277                                      'link_title' => '#',
 278                                      'use_popup' => false,
 279                                  ) );
 280                   ?>
 281                  <?php
 282                      // Link to comments, trackbacks, etc.:
 283                      $Item->feedback_link( array(
 284                                      'type' => 'trackbacks',
 285                                      'link_before' => '',
 286                                      'link_after' => ' &bull; ',
 287                                      'link_text_zero' => '#',
 288                                      'link_text_one' => '#',
 289                                      'link_text_more' => '#',
 290                                      'link_title' => '#',
 291                                      'use_popup' => false,
 292                                  ) );
 293                   ?>
 294  
 295                  <?php    $Item->permanent_link(); ?>
 296              </div>
 297              <?php
 298                  // ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
 299                  skin_include( '_item_feedback.inc.php', array(
 300                          'before_section_title' => '<h4>',
 301                          'after_section_title'  => '</h4>',
 302                      ) );
 303                  // Note: You can customize the default item feedback by copying the generic
 304                  // /skins/_item_feedback.inc.php file into the current skin folder.
 305                  // ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------
 306              ?>
 307          </div>
 308      <?php } // ---------------------------------- END OF POSTS ------------------------------------ ?>
 309  
 310      <?php
 311          // -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
 312          mainlist_page_links( array(
 313                  'block_start' => '<p class="center"><strong>',
 314                  'block_end' => '</strong></p>',
 315                 'prev_text' => '&lt;&lt;',
 316                 'next_text' => '&gt;&gt;',
 317              ) );
 318          // ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
 319      ?>
 320  
 321  
 322      <?php
 323          // -------------- MAIN CONTENT TEMPLATE INCLUDED HERE (Based on $disp) --------------
 324          skin_include( '$disp$', array(
 325                  'disp_posts'  => '',        // We already handled this case above
 326                  'disp_single' => '',        // We already handled this case above
 327                  'disp_page'   => '',        // We already handled this case above
 328              ) );
 329          // Note: you can customize any of the sub templates included here by
 330          // copying the matching php file into your skin directory.
 331          // ------------------------- END OF MAIN CONTENT TEMPLATE ---------------------------
 332      ?>
 333  
 334  </div>
 335  
 336  <!-- =================================== START OF SIDEBAR =================================== -->
 337  
 338  <div class="bSideBar">
 339  
 340      <div class="bSideItem">
 341  
 342          <h3><?php
 343              // BLOG TITLE:
 344              $Blog->disp( 'name', 'htmlbody' );
 345              // Note: we could have called the coll_title widget instead, but that would be overkill.
 346          ?></h3>
 347  
 348          <p><?php
 349              // BLOG LONG DESCRIPTION:
 350              $Blog->disp( 'longdesc', 'htmlbody' );
 351              // Note: we could have called the coll_longdesc widget instead, but that would be overkill.
 352          ?></p>
 353  
 354          <?php
 355              // -------------------- PREV/NEXT PAGE LINKS (POST LIST MODE) --------------------
 356              mainlist_page_links( array(
 357                      'block_start' => '<p class="center"><strong>',
 358                      'block_end' => '</strong></p>',
 359                      'links_format' => '$prev$ :: $next$',
 360                     'prev_text' => '&lt;&lt; '.T_('Previous'),
 361                     'next_text' => T_('Next').' &gt;&gt;',
 362                  ) );
 363              // ------------------------- END OF PREV/NEXT PAGE LINKS -------------------------
 364          ?>
 365  
 366          <?php
 367              // --------------------------------- START OF COMMON LINKS --------------------------------
 368              // Call the coll_common_links widget:
 369              skin_widget( array(
 370                                  // CODE for the widget:
 371                                  'widget' => 'coll_common_links',
 372                                  // Optional display params:
 373                                  'show_recently' => true,
 374                                  'show_archives' => true,
 375                                  'show_categories' => false,
 376                                  'show_latestcomments' => false,
 377                                  'list_start' => '<ul>',
 378                                  'list_end' => '</ul>',
 379                                  'item_start' => '<li>',
 380                                  'item_end' => '</li>',
 381                          ) );
 382              // ---------------------------------- END OF COMMON LINKS ---------------------------------
 383          ?>
 384  
 385          <?php
 386              // ------------------------------- START OF CALENDAR ---------------------------------
 387              // Call the Calendar plugin (if installed):
 388              $Plugins->call_by_code( 'evo_Calr', array(    // Params follow:
 389                      'block_start' => '',
 390                      'block_end' => '',
 391                      'displaycaption' => true,
 392                      'linktomontharchive' => false,
 393                  ) );
 394              // -------------------------------- END OF CALENDAR ----------------------------------
 395          ?>
 396      </div>
 397  
 398      <?php
 399          // --------------------------------- START OF SEARCH FORM --------------------------------
 400          // Call the coll_search_form widget:
 401          skin_widget( array(
 402                  // CODE for the widget:
 403                  'widget' => 'coll_search_form',
 404                  // Optional display params:
 405                  'block_start' => '<div class="bSideItem">',
 406                  'block_end' => '</div>',
 407                  'block_title_start' => '<h3 class="sideItemTitle">',
 408                  'block_title_end' => '</h3>',
 409              ) );
 410          // ---------------------------------- END OF SEARCH FORM ---------------------------------
 411      ?>
 412  
 413      <?php
 414          // --------------------------------- START OF CATEGORY LIST --------------------------------
 415          skin_widget( array(
 416                  // CODE for the widget:
 417                  'widget' => 'coll_category_list',
 418                  // Optional display params
 419                  'block_start' => '<div class="bSideItem">',
 420                  'block_end' => '</div>',
 421                  'block_title_start' => '<h3 class="sideItemTitle">',
 422                  'block_title_end' => '</h3>',
 423              ) );
 424          // ---------------------------------- END OF CATEGORY LIST ---------------------------------
 425      ?>
 426  
 427      <?php
 428          // -------------------------- ARCHIVES INSERTED HERE -----------------------------
 429          $Plugins->call_by_code( 'evo_Arch', array(
 430                  'block_start' => '<div class="bSideItem">',
 431                  'block_end' => '</div>',
 432                  'block_title_start' => '<h3>',
 433                  'block_title_end' => '</h3>',
 434              ) );
 435          // ------------------------------ END OF ARCHIVES --------------------------------
 436      ?>
 437  
 438      <?php
 439          // --------------------------------- START OF LINKBLOG --------------------------------
 440          // Call the coll_search_form widget:
 441          skin_widget( array(
 442                              // CODE for the widget:
 443                              'widget' => 'linkblog',
 444                              // Optional display params:
 445                              'block_start' => '<div class="bSideItem">',
 446                              'block_end' => '</div>',
 447                              'block_title_start' => '<h3 class="sideItemTitle">',
 448                              'block_title_end' => '</h3>',
 449                      ) );
 450          // ---------------------------------- END OF LINKBLOG ---------------------------------
 451      ?>
 452  
 453      <?php
 454          // --------------------------------- START OF USER TOOLS --------------------------------
 455          skin_widget( array(
 456                  // CODE for the widget:
 457                  'widget' => 'user_tools',
 458                  // Optional display params
 459                  'block_start' => '<div class="bSideItem">',
 460                  'block_end' => '</div>',
 461                  'block_title_start' => '<h3 class="sideItemTitle">',
 462                  'block_title_end' => '</h3>',
 463              ) );
 464          // ---------------------------------- END OF USER TOOLS ---------------------------------
 465      ?>
 466  
 467      <?php
 468          // --------------------------------- START OF XML FEEDS --------------------------------
 469          skin_widget( array(
 470                  // CODE for the widget:
 471                  'widget' => 'coll_xml_feeds',
 472                  // Optional display params
 473                  'block_start' => '<div class="bSideItem">',
 474                  'block_end' => '</div>',
 475                  'block_title_start' => '<h3 class="sideItemTitle">',
 476                  'block_title_end' => '</h3>',
 477              ) );
 478          // ---------------------------------- END OF XML FEEDS ---------------------------------
 479      ?>
 480  
 481      <?php
 482          // Please help us promote b2evolution and leave this logo on your blog:
 483          powered_by( array(
 484                  'block_start' => '<div class="powered_by">',
 485                  'block_end'   => '</div>',
 486                  // Check /rsc/img/ for other possible images -- Don't forget to change or remove width & height too
 487                  'img_url'     => '$rsc$img/powered-by-b2evolution-120t.gif',
 488                  'img_width'   => 120,
 489                  'img_height'  => 32,
 490              ) );
 491      ?>
 492  
 493  </div>
 494  <!-- InstanceEndEditable --></div>
 495  <div class="footer">
 496  This is a demo page for <a href="http://b2evolution.net/">b2evolution</a>.
 497  <!-- InstanceBeginEditable name="Baseline" -->
 498  <?php echo '</div>' ?>
 499  <!-- InstanceEndEditable --></div>
 500  </body>
 501  <!-- InstanceEnd --></html>
 502  <?php
 503      // --------------------- PAGE LEVEL CACHING SUPPORT ---------------------
 504      // Save collected cached data if needed:
 505      $PageCache->end_collect();
 506  }
 507  // --------------------- PAGE LEVEL CACHING SUPPORT ---------------------
 508  ?>

title

Description

title

Description

title

Description

title

title

Body