for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @name OpenImporter
* @copyright OpenImporter contributors
* @license BSD https://opensource.org/licenses/BSD-3-Clause
*
* @version 1.0
*/
* Class vBulletin_4
* vBulletin 4
class vBulletin_4 extends Importers\AbstractSourceImporter
{
protected $setting_file = '/includes/config.php';
public function getName()
return 'vBulletin 4';
}
public function getVersion()
return 'ElkArte 1.0';
public function getPrefix()
global $config;
return '`' . $this->getDbName() . '`.' . $config['Database']['tableprefix'];
public function getDbName()
return $config['Database']['dbname'];
public function getTableTest()
return 'user';
// Utility functions specific to vBulletin
* Normalize BBC
* @param string $content
* @return mixed|string
function vb4_replace_bbc($content)
$content = preg_replace(
array(
'~\[(quote)=([^\]]+)\]~i',
'~\[(.+?)="(.+?)"\]~is',
'~\[INDENT\]~is',
'~\[/INDENT\]~is',
'~\[LIST=1\]~is',
),
'[$1="$2"]',
'[$1=$2]',
' ',
'',
'[list type=decimal]',
), strtr($content, array('"' => '"')));
// Fixing Code tags
$replace = array();
preg_match('~\[code\](.+?)\[/code\]~is', $content, $matches);
foreach ($matches as $temp)
$replace[$temp] = htmlspecialchars($temp);
return substr(strtr($content, $replace), 0, 65534);