public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { if ($errors = $this->validateConfiguration($config)) { return $controller->responseError($errors); } if (isset($config['attachmentPath'])) { return true; } $this->_bootstrap($config); $settings = $this->_sourceDb->fetchPairs(' SELECT varname, value FROM ' . $this->_prefix . 'setting WHERE varname=\'dbtech_gallery_filepath_text\' '); if (!isset($settings['dbtech_gallery_filepath_text'])) { return $controller->responseError('[DBTech] Gallery Pro was not found in selected database. Please try again.'); } if ($settings['dbtech_gallery_filepath_text']) { return $controller->responseView('XenForo_ViewAdmin_Import_vBulletin_Config', 'sonnb_xengallery_import_vbulletion_config', array('config' => $config, 'attachmentPath' => $settings['dbtech_gallery_filepath_text'] ? $settings['dbtech_gallery_filepath_text'] : '', 'retainKeys' => $config['retainKeys'])); } return true; } $configPath = getcwd() . '/includes/config.php'; if (file_exists($configPath) && is_readable($configPath)) { $config = array(); include $configPath; $viewParams = array('input' => $config); } else { $viewParams = array('input' => array('MasterServer' => array('servername' => 'localhost', 'port' => 3306, 'username' => '', 'password' => ''), 'Database' => array('dbname' => '', 'tableprefix' => ''), 'Mysqli' => array('charset' => ''))); } return $controller->responseView('XenForo_ViewAdmin_Import_vBulletin_Config', 'sonnb_xengallery_import_vbulletion_config', $viewParams); }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { if ($errors = $this->validateConfiguration($config)) { return $controller->responseError($errors); } $this->_bootstrap($config); if (empty($config['data_path'])) { $settings = $this->_sourceDb->fetchPairs(' SELECT varname, value FROM ' . $this->_prefix . 'ppgal_setting WHERE varname=\'gallery_filedirectory\' '); if (!isset($settings['gallery_filedirectory'])) { return $controller->responseError('PhotoPost vBGalery was not found in provided database.'); } $config['data_path'] = !empty($settings['gallery_filedirectory']) ? $settings['gallery_filedirectory'] : ''; return $controller->responseView('XenForo_ViewAdmin_Import_Ppvb_Config', 'sonnb_xengallery_import_ppvb_config', array('config' => $config, 'retainKeys' => $config['retainKeys'])); } return true; } else { $configPath = getcwd() . '/includes/config.php'; if (file_exists($configPath) && is_readable($configPath)) { $config = array(); include $configPath; $viewParams = array('input' => $config); } else { $viewParams = array('input' => array('MasterServer' => array('servername' => 'localhost', 'port' => 3306, 'username' => '', 'password' => ''), 'Database' => array('dbname' => '', 'tableprefix' => ''), 'Mysqli' => array('charset' => ''))); } return $controller->responseView('XenForo_ViewAdmin_Import_Ppvb_Config', 'sonnb_xengallery_import_ppvb_config', $viewParams); } }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { if ($errors = $this->validateConfiguration($config)) { return $controller->responseError($errors); } $this->_bootstrap($config); if (empty($config['data_path'])) { $settings = $this->_sourceDb->fetchPairs(' SELECT varname, setting FROM ' . $this->_prefix . 'settings WHERE varname=\'origfull\' '); if (!isset($settings['origfull'])) { return $controller->responseError('PhotoPost Pro was not found in provided database.'); } $config['data_path'] = !empty($settings['origfull']) ? $settings['origfull'] : ''; return $controller->responseView('XenForo_ViewAdmin_Import_Pppvb_Config', 'sonnb_xengallery_import_pppvb_config', array('config' => $config, 'retainKeys' => $config['retainKeys'])); } return true; } else { $viewParams = array('input' => array('sql_host' => 'localhost', 'sql_port' => 3306, 'sql_user' => '', 'sql_pass' => '', 'sql_database' => '', 'sql_tbl_prefix' => 'pp_', 'importlog' => '')); return $controller->responseView('XenForo_ViewAdmin_Import_Pppvb_Config', 'sonnb_xengallery_import_pppvb_config', $viewParams); } }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { $errors = $this->validateConfiguration($config); if ($errors) { return $controller->responseError($errors); } if (isset($config['albumPicPath'])) { return true; } $this->_bootstrap($config); $settings = $this->_sourceDb->fetchPairs(' SELECT varname, value FROM ' . $this->_prefix . 'setting WHERE varname IN (\'attachfile\', \'attachpath\') '); if (intval($settings['attachfile']) !== self::ATTACH_AS_DB) { return $controller->responseView('XenGallery_ViewAdmin_Import_Config', 'xengallery_import_config_vbulletin', array('config' => $config, 'productName' => str_replace('XFMG: Import From ', '', self::getName()), 'albumPicPath' => $settings['attachpath'], 'attachType' => $settings['attachfile'], 'retainKeys' => $config['retain_keys'])); } return true; } else { $configPath = getcwd() . '/includes/config.php'; if (file_exists($configPath) && is_readable($configPath)) { $config = array(); include $configPath; $viewParams = array('input' => $config); } else { $viewParams = array('input' => array('MasterServer' => array('servername' => 'localhost', 'port' => 3306, 'username' => '', 'password' => ''), 'Database' => array('dbname' => '', 'tableprefix' => ''), 'Mysqli' => array('charset' => '')), 'productName' => str_replace('XFMG: Import From ', '', self::getName())); } return $controller->responseView('XenForo_ViewAdmin_Import_vBulletin_Config', 'xengallery_import_config_vbulletin', $viewParams); } }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { $errors = $this->validateConfiguration($config, $validatedDirectories); if ($errors) { return $controller->responseError($errors); } else { if (!isset($config['attachmentPaths'])) { $attachPaths = $this->_sourceDb->fetchOne(' SELECT value FROM ' . $this->_prefix . 'settings WHERE variable = \'attachmentUploadDir\' '); $path = @unserialize($attachPaths); if (!$path) { if ($attachPaths) { $path = array($attachPaths); } else { $path = array(''); } } $viewParams = array('attachPaths' => $path ? $path : array(), 'config' => $config); return $controller->responseView('XenForo_ViewAdmin_Import_SMF_Config_Attachments', 'import_smf_config_attachments', $viewParams); } } if ($validatedDirectories) { return true; } } else { $viewParams = array(); } return $controller->responseView('XenForo_ViewAdmin_Import_SMF_Config', 'import_smf_config', $viewParams); }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { $errors = $this->validateConfiguration($config); if ($errors) { return $controller->responseError($errors); } if (isset($config['attachmentPath']) || isset($config['avatarPath'])) { // already configured return true; } $this->_bootstrap($config); $settings = $this->_sourceDb->fetchPairs(' SELECT varname, value FROM ' . $this->_prefix . 'setting WHERE varname IN (\'attachpath\', \'attachfile\', \'avatarpath\', \'usefileavatar\') '); if ($settings['attachfile'] && $settings['attachpath'] || $settings['usefileavatar'] && $settings['avatarpath']) { return $controller->responseView('XenForo_ViewAdmin_Import_vBulletin_Config', 'import_vbulletin_config', array('config' => $config, 'attachmentPath' => $settings['attachfile'] ? $settings['attachpath'] : '', 'avatarPath' => $settings['usefileavatar'] ? $settings['avatarpath'] : '', 'retainKeys' => $config['retain_keys'])); } return true; } else { $configPath = getcwd() . '/includes/config.php'; if (file_exists($configPath) && is_readable($configPath)) { $config = array(); include $configPath; $viewParams = array('input' => $config); } else { $viewParams = array('input' => array('MasterServer' => array('servername' => 'localhost', 'port' => 3306, 'username' => '', 'password' => ''), 'Database' => array('dbname' => '', 'tableprefix' => ''), 'Mysqli' => array('charset' => ''))); } return $controller->responseView('XenForo_ViewAdmin_Import_vBulletin_Config', 'import_vbulletin_config', $viewParams); } }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { if ($errors = $this->validateConfiguration($config)) { return $controller->responseError($errors); } if (isset($config['attachmentPath'])) { return true; } $this->_bootstrap($config); $settings = $this->_sourceDb->fetchPairs(' SELECT varname, value FROM ' . $this->_prefix . 'setting WHERE varname IN (\'videodirectory_thumbnaildir\') '); if ($settings['videodirectory_thumbnaildir']) { return $controller->responseView('XenForo_ViewAdmin_Import_VideoDirectory38_Config', 'sonnb_xengallery_import_videoDirectory38_config', array('config' => $config, 'attachmentPath' => $settings['videodirectory_thumbnaildir'], 'retainKeys' => $config['retainKeys'])); } return true; } $configPath = getcwd() . '/includes/config.php'; if (file_exists($configPath) && is_readable($configPath)) { $config = array(); include $configPath; $viewParams = array('input' => $config); } else { $viewParams = array('input' => array('MasterServer' => array('servername' => 'localhost', 'port' => 3306, 'username' => '', 'password' => ''), 'Database' => array('dbname' => '', 'tableprefix' => ''), 'Mysqli' => array('charset' => ''))); } return $controller->responseView('XenForo_ViewAdmin_Import_VideoDirectory38_Config', 'sonnb_xengallery_import_videoDirectory38_config', $viewParams); }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { if ($errors = $this->validateConfiguration($config)) { return $controller->responseError($errors); } $this->_bootstrap($config); return true; } else { $viewParams = array('input' => array('sql_host' => 'localhost', 'sql_port' => 3306, 'sql_user' => '', 'sql_pass' => '', 'sql_database' => '', 'data_path' => $_SERVER['DOCUMENT_ROOT'] . PATH_SEPARATOR . 'data')); return $controller->responseView('XenForo_ViewAdmin_Import_XenGallery_Config', 'sonnb_xengallery_import_xengallery_config', $viewParams); } }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { $errors = $this->validateConfiguration($config); if ($errors) { return $controller->responseError($errors); } return true; } else { $viewParams = array(); } return $controller->responseView('XenForo_ViewAdmin_Import_PhpBb3_Config', 'import_phpbb3_config', $viewParams); }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { if ($errors = $this->validateConfiguration($config)) { return $controller->responseError($errors); } $this->_bootstrap($config); return true; } else { $nodeOptions = XenForo_Option_NodeChooser::getNodeOptions(0, false, 'Forum'); $viewParams = array('nodeOptions' => $nodeOptions); return $controller->responseView('Nobita_Teams_ViewAdmin_Import_Config', 'Team_import_waindigo_config', $viewParams); } }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { $errors = $this->validateConfiguration($config); if ($errors) { return $controller->responseError($errors); } $this->_bootstrap($config); return true; } else { $viewParams = array('input' => array('port' => 3306, 'charset' => '', 'host' => 'localhost', 'dbname' => '', 'username' => '', 'password' => '', 'prefix' => ''), 'productName' => str_replace('XFMG: Import From ', '', self::getName())); return $controller->responseView('XenForo_ViewAdmin_Import_Photopost_Config', 'xengallery_import_config_photopost', $viewParams); } }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { $errors = $this->validateConfiguration($config); if ($errors) { return $controller->responseError($errors); } $this->_bootstrap($config); return true; } else { $viewParams = array('input' => array('db' => array('host' => 'localhost', 'port' => '3306'))); return $controller->responseView('XenForo_ViewAdmin_Import_XenForo_Config', 'import_xenforo_config', $viewParams); } }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { $errors = $this->validateConfiguration($config); if ($errors) { return $controller->responseError($errors); } return true; } else { $config = XenForo_Application::getConfig(); $dbConfig = $config->get('db'); $viewParams = array('config' => array('db' => array('host' => $dbConfig->host, 'port' => $dbConfig->port, 'username' => $dbConfig->username, 'password' => $dbConfig->password, 'dbname' => $dbConfig->dbname)), 'addOnName' => str_replace('XenTrader: Import From ', '', self::getName())); } return $controller->responseView('NixFifty_XenTrader_ViewAdmin_Import_Config', 'nixfifty_xentrader_import_config', $viewParams); }
/** * Checks for configuration varibles used when connecting to the DB * @param XenForo_ControllerAdmin_Abstract $controller * @param array $config Settings passed from import_wordpress_config form * * @return bool|XenForo_ControllerResponse_View */ public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { // If the configuraiton variables are set validate them. if ($config) { //Do not retain keys from Wordpress $config['retain_keys'] = false; $errors = $this->validateConfiguration($config); if ($errors) { return $controller->responseError($errors); } $this->_bootstrap($config); return true; } else { return $controller->responseView('XenForo_ViewAdmin_Import_WordPress_Config', 'import_wordpress_config'); } }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { if ($errors = $this->validateConfiguration($config)) { return $controller->responseError($errors); } $this->_bootstrap($config); return true; } else { $viewParams = array('input' => array('sql_host' => 'localhost', 'sql_port' => 3306, 'sql_user' => '', 'sql_pass' => '', 'sql_database' => '', 'sql_tbl_prefix' => '', 'ipboard_path' => $_SERVER['DOCUMENT_ROOT'])); $configPath = getcwd() . '/conf_global.php'; if (file_exists($configPath)) { include $configPath; $viewParams['input'] = array_merge($viewParams['input'], $INFO); } return $controller->responseView('XenForo_ViewAdmin_Import_IPBoard_Config', 'sonnb_xengallery_import_ipboard_config', $viewParams); } }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { $errors = $this->validateConfiguration($config); if ($errors) { return $controller->responseError($errors); } return true; } else { /* @var $nodeModel XenForo_Model_Node */ $nodeModel = XenForo_Model::create('XenForo_Model_Node'); $nodes = $nodeModel->getAllNodes(); $nodeOptions = array(); foreach ($nodes as $node) { if ($node['node_type_id'] == 'SocialCategory') { $nodeOptions[] = array('value' => $node['node_id'], 'label' => $node['title']); } } $viewParams = array('nodeOptions' => $nodeOptions); } return $controller->responseView('ThemeHouse_SocialGroups_ViewAdmin_Import_XfAddOns_Groups_Config', 'th_import_xfaddons_config_socialgroups', $viewParams); }
public function configure(XenForo_ControllerAdmin_Abstract $controller, array &$config) { if ($config) { $errors = $this->validateConfiguration($config); if ($errors) { return $controller->responseError($errors); } $this->_bootstrap($config); if (isset($config['validated'])) { return true; } return $controller->responseView('XenGallery_ViewAdmin_Import_Config', 'xengallery_import_config_vbulletin', array('config' => $config, 'productName' => str_replace('XFMG: Import From ', '', self::getName()), 'retainKeys' => $config['retain_keys'], 'fileLocation' => $config['fileLocation'])); } else { $configPath = getcwd() . '/includes/config.php'; if (file_exists($configPath) && is_readable($configPath)) { $config = array(); include $configPath; $viewParams = array('input' => $config); } else { $viewParams = array('input' => array('MasterServer' => array('servername' => 'localhost', 'port' => 3306, 'username' => '', 'password' => ''), 'Database' => array('dbname' => '', 'tableprefix' => ''), 'Mysqli' => array('charset' => '')), 'productName' => str_replace('XFMG: Import From ', '', self::getName())); } return $controller->responseView('XenForo_ViewAdmin_Import_vBulletin_Config', 'xengallery_import_config_vbulletin', $viewParams); } }