b2evolution PHP Cross Reference Blogging Systems

Source: /skins/_threads.disp.php - 81 lines - 1869 bytes - Text - Print

Description: This is the template that displays user threads and contacts

   1  <?php
   2  /**

   3   * This is the template that displays user threads and contacts

   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  // init variables

  17  global $inc_path;
  18  global $Messages;
  19  global $edited_Thread;
  20  global $edited_Message;
  21  
  22  global $Skin;
  23  if( !empty( $Skin ) ) {
  24      $display_params = array_merge( $Skin->get_template( 'Results' ), $Skin->get_template( 'messages' ) );
  25  } else {
  26      $display_params = NULL;
  27  }
  28  $thrdtype =  'individual';  // alternative: discussion

  29  
  30  if( !is_logged_in() )
  31  {
  32      debug_die( 'You are not logged in!' );
  33  }
  34  
  35  if( !isset( $disp ) )
  36  {
  37      $disp = 'threads';
  38  }
  39  
  40  // Get action parameter from request:

  41  $action = param_action( 'view' );
  42  
  43  // ----------------------- End Init variables --------------------------

  44  
  45  // set params

  46  if( !isset( $params ) )
  47  {
  48      $params = array();
  49  }
  50  $params = array_merge( array(
  51      'form_class' => 'bComment',
  52      'form_title' => '',
  53      'form_action' => $samedomain_htsrv_url.'action.php?mname=messaging',
  54      'form_name' => '',
  55      'form_layout' => NULL,
  56      'cols' => 40,
  57      'thrdtype' => $thrdtype,
  58      ), $params );
  59  
  60  switch( $disp )
  61  {
  62      case 'threads':
  63          if( $action == 'new' )
  64          {
  65              require $inc_path.'messaging/views/_thread.form.php';
  66          }
  67          else
  68          {
  69              require $inc_path.'messaging/views/_thread_list.view.php';
  70          }
  71          break;
  72  
  73      case 'contacts':
  74          require $inc_path.'messaging/views/_contact_list.view.php';
  75          break;
  76  
  77      default:
  78          debug_die( "Unknown user tab" );
  79  }
  80  
  81  ?>

title

Description

title

Description

title

Description

title

title

Body