Jump to content

Converters - migrating vBulletin thread prefixes?


djpretzel
 Share

Recommended Posts

  • I've got 4400+ threads in a vBulletin 3.8 forum that I'm converting to IPB 3.4.7.
  • IPB seems to have kinda half-assed support for prefixes compared to vBulletin; the first tag on a topic is (optionally) repurposed to serve double-duty as a prefix...
  • The converter package doesn't even seem to attempt to migrate these prefixed threads...
  • What can I do?

The number of threads is large enough that doing things manually isn't really an option. We can ask users to re-tag and then "prefix" everything by checking the box, but that too would be incomplete, slow, error-prone, etc.

Is there a solution for this problem?

 

Edited by djpretzel
Link to comment
Share on other sites

  • IPB seems to have kinda half-assed support for prefixes compared to vBulletin; the first tag on a topic is (optionally) repurposed to serve double-duty as a prefix...
  • The converter package doesn't even seem to attempt to migrate these prefixed threads...
  • What can I do?

​I have the same problem with my project. I´m in the process of converting my vb4 board to ips using the official ips 3.4.7 converter, too. 

To resolve the prefix issue I wrote a relatively simple php-script, that has to be used right before the ips converter. This script converts all prefixes to tags automatically.

Notice: vBulletin stores prefixes as ID´s and tags as clear text. 

 

I hope there will be a new version of the mentioned addon for ips4 in near future. 

Link to comment
Share on other sites

​I have the same problem with my project. I´m in the process of converting my vb4 board to ips using the official ips 3.4.7 converter, too. 

To resolve the prefix issue I wrote a relatively simple php-script, that has to be used right before the ips converter. This script converts all prefixes to tags automatically.

Notice: vBulletin stores prefixes as ID´s and tags as clear text. 

 

I hope there will be a new version of the mentioned addon for ips4 in near future. 

​Could you share the code for that script with me, by any chance? :)

Link to comment
Share on other sites

​Could you share the code for that script with me, by any chance? :)

​Yes, I do. 

But again. It is for vB4 and I´m not confident with vB3 anymore ;) So it´s possible that you have to change the script concerning the right tables of your database. 

<h1>Database Migration Script</h1>
<?php
$prefix = array(
	array('ID' => 1,		'TEXT' => 'Example Prefix'), // duplicate this line for each single prefix. You´ll find the ID and Prefix in your ACP 
	array('ID' => 0, 		'TEXT' => ''));


$mysqlhost = 'localhost'; // enter MySQL-Host 

$mysqluser = 'XXX'; // enter MySQL-User 

$mysqlpwd = 'YYY'; // enter MySQL-PW 

$connection = mysql_connect($mysqlhost, $mysqluser, $mysqlpwd);

$connection = mysql_connect($mysqlhost, $mysqluser, $mysqlpwd);

if (!$connection)
{
	$output .=  'Verbindungsversuch fehlgeschlagen: ' . mysql_error();
}

$mysqldb = 'ZZZ'; // your vB Database

mysql_select_db($mysqldb, $connection);

$table = 'thread'; 

$sql = 'SELECT * FROM `' . $table . '`';
$threads = mysql_query($sql);
$output .= '<p>Anzahl der selektierten Zeilen: ' . mysql_num_rows($threads) . '</p>';
$output .= '<p>Selektierte Tabelle: ' . $table;

while ($row = mysql_fetch_array($threads)){
	$sql = '';
	if ($row[2] == '') 
	{
		$output .= '<p>Row: ' . $row[0] . '=> EMPTY!!</p>';
		$sql .= 'UPDATE `' . $table . '` SET `taglist` = \'\' WHERE `threadid` = ' . $row[0];
	}
	else
	{
		for($x = 0; $x < count($prefix); $x++)
		{
			if ($prefix[$x]['ID'] == $row[2])
			{
				$output .= '<p>Row: ' . $row[0] . '=> ' . $prefix[$x]['TEXT'] . '</p>';
				$sql .= 'UPDATE `' . $table . '` SET `taglist` = \'' . $prefix[$x]['TEXT'] . '\' WHERE `threadid` = ' . $row[0];
			}
		}
	}
	mysql_query($sql);
}

echo '<body>'.$output.'</body>';
?>

Please notice the comments to use this script correctly.

And one more thing ... You will lose all of you´re current tags!

Edited by Angus90
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...