b2evolution PHP Cross Reference Blogging Systems

Source: /skins/manual/_404_not_found.disp.php - 83 lines - 2695 bytes - Text - Print

Description: This is the template that displays the 404 disp content

   1  <?php
   2  /**

   3   * This is the template that displays the 404 disp content

   4   *

   5   * This file is not meant to be called directly.

   6   * It is meant to be called by an include in the main.page.php template.

   7   *

   8   * b2evolution - {@link http://b2evolution.net/}

   9   * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}

  10   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}

  11   *

  12   * @package evoskins

  13   */
  14  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  15  
  16  global $Blog, $last_part;
  17  
  18  echo '<div class="error_404">';
  19  
  20  echo '<h1>404 Not Found</h1>';
  21  
  22  echo '<p>'.T_('The manual page you are requesting doesn\'t seem to exist (yet).').'</p>';
  23  
  24  $post_title = '';
  25      $post_urltitle = '';
  26  if( !empty( $last_part ) )
  27  {    // Set title & urltitle for new post
  28      $post_title = str_replace( ' ', '%20', ucwords( str_replace( '-', ' ', $last_part ) ) );
  29      $post_urltitle = $last_part;
  30  }
  31  
  32  // Button to create a new page

  33  $write_new_post_url = $Blog->get_write_item_url( 0, $post_title, $post_urltitle );
  34  if( !empty( $write_new_post_url ) )
  35  {    // Display button to write a new post
  36      echo '<a href="'.$write_new_post_url.'" class="roundbutton roundbutton_text_noicon">'.T_('Create this page now').'</a>';
  37  }
  38  
  39  echo '<p>'.T_('You can search the manual below.').'</p>';
  40  
  41  echo '</div>';
  42  
  43  if( !empty( $last_part ) )
  44  {    // Initialize a prefilled search form
  45      set_param( 's', str_replace( '-', ' ', $last_part ) );
  46      set_param( 'sentence', 'OR' );
  47      set_param( 'title', '' ); // Empty this param to exclude a filter by post_urltitle

  48  
  49      // Init the MainList object:

  50      init_MainList( $Blog->get_setting('posts_per_page') );
  51  
  52      skin_include( '_search.disp.php' );
  53  }
  54  else
  55  {    // Display a search form with TOC
  56      echo '<div class="error_additional_content">';
  57      // --------------------------------- START OF SEARCH FORM --------------------------------

  58      // Call the coll_search_form widget:

  59      skin_widget( array(
  60              // CODE for the widget:

  61              'widget' => 'coll_search_form',
  62              // Optional display params:

  63              'block_start' => '',
  64              'block_end' => '',
  65              'title' => T_('Search this manual:'),
  66              'disp_search_options' => true,
  67              'block_title_start' => '<h3>',
  68              'block_title_end' => '</h3>',
  69          ) );
  70      // ---------------------------------- END OF SEARCH FORM ---------------------------------

  71  
  72      echo '<p>'.T_('or you can browse the table of contents below:').'</p>';
  73  
  74      echo '<h2 class="table_contents">'.T_('Table of contents').'</h2>';
  75      $Skin->display_chapters( array(
  76              'display_blog_title' => false,
  77              'display_children'   => true,
  78              'class_selected'     => ''
  79          ) );
  80  
  81      echo '</div>';
  82  }
  83  ?>

title

Description

title

Description

title

Description

title

title

Body