Estaba mirando esto pero la parte de cambiar las etiquetas no me funciona
[PHP]
<?php
if (function_exists('set_time_limit') AND get_cfg_var('safe_mode')==0)
{
@set_time_limit(0);
}
ignore_user_abort(true);
error_reporting(E_ALL & ~E_NOTICE);
/*
* @package ImpEx.tools
* @version $Revision: 1.20 $
* @author Jerry Hutchings <jerry.hutchings@vbulletin.com>
* @checkedout $Name: $
* @date $Date: 2006/05/28 22:45:50 $
* @copyright http://www.vbulletin.com/license.html
*
*/
// BACK UP YOUR DATABASE
// Cleaner
// Swaps X for Y in the database handy for smilies that have been wrongly parsed
// THIS IS A GARRUNTEED WAY TO TRASH YOU DB !!! .
// COMPLETLY INVALIDATES SUPPORT
// OK NOT REALLY, THOUGH ITS A BRUTAL SCRIPT BE VERY AWARE THAT YOU SHOULD BACK UP !!
// USE AT YOUR OWN RISK.
// BACK UP YOUR DATABASE
//
// I / we / the company takes no responsiability for you running this script
// Jerry - jerry.hutchings@vbulletin.com
########################################
#
# Set to true / false
# $do_posts = ALL POSTS
# $do_sigs = ALL SIGNATURES
# $do_thread_titles = ALL THREAD TITLES
# $do_pm_text = ALL PM TEXTS;
# $do_pm_text_title = ALL PM TITLES;
########################################
// BACK UP YOUR DATABASE
// Set to true to run, and false when done, or remove this script (and all of impex when finished).
$active = true;
// Set true or false as to the data you want to clean
$do_posts = true;
$do_sigs = true;
$do_thread_titles = false;
$do_pm_text = true;
$do_pm_text_title = false;
########################################
# Replace 'Find me' and "Replace with me" with the strings you want replaced i.e
# "<b>" => "[b]"
# "<blockquote>" => "[quote]"
# add as many elements to the array as needed
// BACK UP YOUR DATABASE
$replacer = array(
"[size=8pt]" => "[size=1]",
"[size=10pt]" => "[size=2]",
"[size=12pt]" => "[size=3]",
"[size=14pt]" => "[size=4]",
"[size=18pt]" => "[size=5]",
"[size=24pt]" => "[size=6]",
"[size=36pt]" => "[size=7]",
"[iurl]" => "",
"[/iurl]"=> ""
);
// BACK UP YOUR DATABASE
################################################################################
# CHANGE NOTHING BELOW THIS LINE # CHANGE NOTHING BELOW THIS LINE # CHANGE NOTHI
################################################################################
if (!$active)
{
exit('Not active');
}
define('IDIR', (($getcwd = getcwd()) ? $getcwd : '.'));
include_once('./../db_mysql.php');
// BACK UP YOUR DATABASE
require_once ('./../ImpExConfig.php');
$targetserver = $impexconfig['target']['server'];
$targetuser = $impexconfig['target']['user'];
$targetpassword = $impexconfig['target']['password'];
$targetdatabase = $impexconfig['target']['database'];
$targettableprefix = $impexconfig['target']['tableprefix'];
$Db_target = new DB_Sql_vb_impex();
$Db_target->appname = 'vBulletin:ImpEx Target';
$Db_target->appshortname = 'vBulletin:ImpEx Target';
$Db_target->type = 'mysql';
$Db_target->database = $targetdatabase;
$Db_target->connect($targetserver, $targetuser, $targetpassword, 0);
$Db_target->select_db($targetdatabase);
// BACK UP YOUR DATABASE
# Posts
if($do_posts)
{
$posts = $Db_target->query("SELECT postid, pagetext, title FROM " . $targettableprefix . "post");
while ($post = $Db_target->fetch_array($posts))
{
$text = str_replace(array_keys($replacer), $replacer, $post['pagetext']);
$title_text = str_replace(array_keys($replacer), $replacer, $post['title']);
$text = preg_replace('#\[quote author=(.*) (.*)\](.*)\[/quote\]#siU', '[quote=$1]$3[/quote]', $text);
$text = preg_replace('#\[img=(.*)\](.*)\#siU', '
', $text);
#$title_text = preg_replace('##siU', '', $text);
$Db_target->query("UPDATE " . $targettableprefix . "post SET pagetext='" . addslashes($text) . "', title='" . addslashes($title_text) . "' WHERE postid='" . $post['postid'] . "'");
echo "<br /><b>Post done -></b><i> " . $post['postid'] . "</i>";
}
}
# Signatures
if($do_sigs)
{
$users = $Db_target->query("SELECT userid, signature FROM " . $targettableprefix . "usertextfield");
while ($user = $Db_target->fetch_array($users))
{
$text = str_replace(array_keys($replacer), $replacer, $user['signature']);
#$text = preg_replace('##siU', '', $text);
$Db_target->query("UPDATE " . $targettableprefix . "usertextfield SET signature='" . addslashes($text) . "' WHERE userid='" . $user['userid'] . "'");
echo "<br /><b>Signature done -></b><i> " . $user['userid'] . "</i>";
}
}
# Thread titles
if($do_thread_titles)
{
$users = $Db_target->query("SELECT threadid, title FROM " . $targettableprefix . "thread");
while ($user = $Db_target->fetch_array($users))
{
$text = str_replace(array_keys($replacer), $replacer, $user['title']);
#$text = preg_replace('##siU', '', $text);
$Db_target->query("UPDATE " . $targettableprefix . "thread SET title='" . addslashes($text) . "' WHERE threadid='" . $user['threadid'] . "'");
echo "<br /><b>Thread done -></b><i> " . $user['threadid'] . "</i> :: <b>{$text}</b>";
}
}
# PM text
if($do_pm_text)
{
$pms = $Db_target->query("SELECT pmtextid, message, title FROM " . $targettableprefix . "pmtext");
while ($pm = $Db_target->fetch_array($pms))
{
$text = str_replace(array_keys($replacer), $replacer, $pm['message']);
$title = str_replace(array_keys($replacer), $replacer, $pm['title']);
#$text = preg_replace('##siU', '', $text);
$Db_target->query("UPDATE " . $targettableprefix . "pmtext SET message='" . addslashes($text) . "', title='" . addslashes($title) . "' WHERE pmtextid='" . $pm['pmtextid'] . "'");
echo "<br /><b>Pm done -></b><i> " . $pm['pmtextid'] . "</i> :: <b>{$text}</b>";
}
}
// BACK UP YOUR DATABASE
// You shouldn't be reading down here !!
?>[/PHP]
esto es lo que tengo, alguien me podria decir en que me equivoque?