b2evolution PHP Cross Reference Blogging Systems

Source: /inc/tools/views/_phpbb_groups.form.php - 104 lines - 3912 bytes - Text - Print

Description: This file display the 2nd step of phpBB importer

   1  <?php
   2  /**

   3   * This file display the 2nd step of phpBB importer

   4   *

   5   * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.

   6   * See also {@link http://sourceforge.net/projects/evocms/}.

   7   *

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

   9   * Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}.

  10   *

  11   * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)

  12   *

  13   * @package admin

  14   *

  15   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}

  16   * @author fplanque: Francois PLANQUE.

  17   *

  18   * @version $Id: _phpbb_users.form.php 505 2011-12-09 20:54:21Z fplanque $

  19   */
  20  
  21  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  22  
  23  global $phpbb_db_config, $dispatcher;
  24  
  25  $Form = new Form();
  26  
  27  $Form->begin_form( 'fform', T_('phpBB Importer').' - '.T_('Step 2: User group mapping') );
  28  evo_flush();
  29  
  30  $Form->add_crumb( 'phpbb' );
  31  $Form->hidden_ctrl();
  32  $Form->hidden( 'action', 'users' );
  33  
  34  $Form->begin_fieldset( T_('Access information for database of phpBB forum') );
  35  
  36      $Form->info( T_('Connection'), '<b class="green">OK</b>' );
  37  
  38      $Form->info( T_('Database host'), $phpbb_db_config['host'] );
  39  
  40      $Form->info( T_('Database name'), $phpbb_db_config['name'] );
  41  
  42      $Form->info( T_('Username'), $phpbb_db_config['user'] );
  43  
  44      $Form->info( T_('Password'), str_repeat( '*', strlen( $phpbb_db_config['password'] ) ) );
  45  
  46      $Form->info( T_('Table prefix'), $phpbb_db_config['prefix'] );
  47  
  48      $path_avatars = phpbb_get_var( 'path_avatars' );
  49      $path_avatars_note = '';
  50      if( !empty( $path_avatars ) && !file_exists( $path_avatars ) )
  51      {    // Path avatars is incorrect
  52          $path_avatars = '<b class="red">'.$path_avatars.'</b>';
  53          $path_avatars_note = T_('This folder does not exist');
  54      }
  55      $Form->info( T_('Source for avatars'), $path_avatars, $path_avatars_note );
  56  
  57      $BlogCache = & get_BlogCache();
  58      if( $phpbbBlog = & $BlogCache->get_by_ID( phpbb_get_var( 'blog_ID' ) ) )
  59      {
  60          $Form->info( T_('Blog for import'), $phpbbBlog->get( 'name' ) );
  61      }
  62  
  63  $Form->end_fieldset();
  64  
  65  
  66  $Form->begin_fieldset( T_('Users groups') );
  67  
  68      $b2evo_groups = b2evo_groups();
  69  
  70      $b2evo_groups_default = $b2evo_groups;
  71      $b2evo_groups_default['0'] = T_('Select');
  72      $Form->select_input_array( 'phpbb_group_default', phpbb_get_var( 'group_default' ), $b2evo_groups_default, T_('Default group'), T_( 'Use this group as default for users without defined rank' ), array( 'force_keys_as_values' => true ) );
  73  
  74      $Form->select_input_array( 'phpbb_group_invalid', phpbb_get_var( 'group_invalid' ), $b2evo_groups, '<span class="red">'.T_('Invalid users').'</span>', T_( 'Use this group as default for users which was deleted from DB' ), array( 'force_keys_as_values' => true ) );
  75  
  76      echo T_('Please select the ranks which should be imported:');
  77  
  78      $rank_values = phpbb_get_var( 'ranks' );
  79      $phpbb_ranks = phpbb_ranks();
  80      foreach( $phpbb_ranks as $rank_ID => $rank_name )
  81      {
  82          $rank_users_count = phpbb_rank_info( $rank_ID, true );
  83          if( $rank_users_count == 0 )
  84          {    // Don't display ranks without users
  85              continue;
  86          }
  87          $rank_value = isset( $rank_values[ $rank_ID ] ) ? $rank_values[ $rank_ID ] : phpbb_get_var( 'all_group_default' );
  88          $Form->select_input_array( 'phpbb_ranks['.$rank_ID.']', $rank_value, $b2evo_groups, $rank_name, phpbb_rank_info( $rank_ID ), array( 'force_keys_as_values' => true, ) );
  89      }
  90  
  91  $Form->end_fieldset();
  92  
  93  $Form->begin_fieldset( T_('Select the forums which will be imported') );
  94  
  95      phpbb_forums_list( $Form );
  96  
  97  $Form->end_fieldset();
  98  
  99  $Form->buttons( array( array( 'submit', 'submit', T_('Continue !'), 'SaveButton' ),
 100                                               array( 'button', 'button', T_('Back'), 'SaveButton', 'location.href=\''.$dispatcher.'?ctrl=phpbbimport\'' ) ) );
 101  
 102  $Form->end_form();
 103  
 104  ?>

title

Description

title

Description

title

Description

title

title

Body