Wonky HTML after coverting from IPB to XF

Yoruichi

Member
Here's the picture...

Is there anyway to fix the wonky HTML that IPB has?

Edit: XenForo 1.1.3 and IPB 3.4.x series
 

Attachments

  • wtf.png
    wtf.png
    264.6 KB · Views: 40

Jake Bunce

XenForo moderator
Staff member
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');
 

Yoruichi

Member
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
 

Yoruichi

Member
KK, it's back to normal kinda..

Still does some of this even after running the query. Do I need to recache?
 

Attachments

  • wut.png
    wut.png
    45.4 KB · Views: 33
  • wut2.png
    wut2.png
    100.3 KB · Views: 31

Jake Bunce

XenForo moderator
Staff member

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
 
Top