• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Wonky HTML after coverting from IPB to XF

Jake Bunce

XenForo moderator
Staff member
#2
Use Kier's addon:

http://xenforo.com/community/threads/post-content-find-replace.6548/

Quick Find: </p>

Regular Expression: #<p>(.*)</p>#siU

Replacement String: \1

You may wish to insert new lines after the paragraphs. I have had trouble using new lines in the actual replacement. I have had to use temporary values and then run a replacement query to insert new lines:

Quick Find: </p>

Regular Expression: #<p>(.*)</p>#siU

Replacement String: \1a.b.c.d.c.b.a

Then run this query on your database to replace the temporary string with a new line:

Code:
UPDATE xf_post
SET message = REPLACE(message, 'a.b.c.d.c.b.a', '\n');
 
#3
I did that and now it gives me this error. I am assuming that you were to replace all of the folders and such with the proper files.

it's here - http://otakuhub.org/index.php?posts/503/ (forum offline, obviously)

Also throws an error saying the page doesn't exist when trying to go to the page in tools.

Fatal error: Class 'XenForo_Model_Post' not found in /home/pwndgame/public_html/library/XenForo/Model/Post.php on line 4I
 
#7
That first wut.png file is showing the error in the users signature. Kier's add-on is only doing replacement of the text inside the actual posted message, not the signature.
Oh, okay that was why then. So, users are basically forced to redo their signature?
 
#11
Another question -- Is there anyway to replace the <div>, <strong>, and that list code? <li> or something it is.

  • a list
  • like
  • this
For an example
 

Jake Bunce

XenForo moderator
Staff member
#12
Quick Find: </div>

Regular Expression: #<div>(.*)</div>#siU

Replacement String: \1

Quick Find: </strong>

Regular Expression: #<strong>(.*)</strong>#siU

Replacement String: [b]\1[/b]

Two replacements (assuming ordered list, <ol>):

Quick Find: </ol>

Regular Expression: #<ol>(.*)</ol>#siU

Replacement String: [list]\1[/list]

...and:

Quick Find: </li>

Regular Expression: #<li>(.*)</li>#siU

Replacement String: [*]\1