![]() |
HTML codes in post when Merging PHPBB3 to MyBB - Printable Version +- MyBB Community Forums (https://community.mybb.com) +-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html) +--- Forum: Merge System Support (https://community.mybb.com/forum-180.html) +--- Thread: HTML codes in post when Merging PHPBB3 to MyBB (/thread-208481.html) |
HTML codes in post when Merging PHPBB3 to MyBB - Fede - 2017-02-21 Hello guys, im trying to switch to MyBB and im really impressed how simple up to now was. I just created a new forum, and merged with the merge-software from my previous phpbb3 3.2 forum. All was going good, a part of this error: basically i have all imported correctly, but the post are formatted with HTML codes (i.e. <br/> and so on). Only few of them are not. Here is a small pic of the problem, as you can easy understand what im talking about: http://imgur.com/0SKV7Wp Any ideas to solve it?? ![]() Thanks in advance! No one? ![]() RE: HTML codes in post when Merging PHPBB3 to MyBB - isoldehn - 2017-02-23 Is <br/> the only html showing in posts? RE: HTML codes in post when Merging PHPBB3 to MyBB - wodfer - 2018-12-31 I got the same issue. Moving a phpbb3 board over to myBB. Got more than 220.000 posts so editing them one at the time is not gonna do it. I need to automate it. I assume the merger will not be modified for this, but does anyone know some kind of an sql code I can execute on the specific table? thx Andy RE: HTML codes in post when Merging PHPBB3 to MyBB - .m. - 2018-12-31 first take backup of the existing database sql query for replacing post content can be like below
eg. to remove <p> and </p> from the messages
see also common sql queries guidance RE: HTML codes in post when Merging PHPBB3 to MyBB - theSaint - 2019-01-25 Hi! I actually came up with an idea ![]() Firstly, those are not HTML codes - they are XML. They changed the way of storing data in release from 3.1.x to 3.2.x >>>INFO<<< . I suppose u have newer one ![]() Soooo... what you need to do: 1. BACKUP YOUR DATABASE BEFORE ANY CHANGES! I WON'T TAKE RESPONSIBILITY IN CASE SOMETHING GOES WRONG! 2. Save script from bottom of this page as something.php and put it in your OLD PHPBB forum root directory as it's only can reach file 'includes/message_parser.php' from this location. 3. Edit this file to match data that you want to transform. You need to configure those 7 fields: /** * PASS INFORMATIONS HERE */ $mysql_db_hostname = "localhost"; $mysql_db_user = "user"; $mysql_db_password = "password"; $mysql_db_database = "database"; //Tables to parse //RUN 1 - POSTS $table = 'mybb_posts'; //insert table name in which column to parse exists $id = 'pid'; //insert primary key column name for this table here $text = 'message'; //insert column name to parse here database credentials are for already merged MyBB forum database. table,id,text is a choice of column that you want to transform, in your database. In above example we will be fixing posts ![]() 4. Ok, so basicly you are ready to run it. Go to www.oldforum.com/path_to_forum/something.php in your browser, and it's done. If you get printout from this site like this Quote: Please wait......... Everything wen't well Sometimes however u can get something like this: Quote:[ID 5154] ERROR WHILE EXECUTING QUERY!Which means that you failed to parse item with this id. Query in the end just didn't execute for that one - you will have to edit it yourself ![]() 5. Repeat steps 3 and 4 for every column that you want to transform 6. delete this script from server, so nobody can't spam your database If something is not clear, i will try to explain it better. I know it's not super user friendly solution, but i needed my forum to quickly get back on feet, and as i saw some ppl here having same problem, I decided to share this. Good news, are that parser used is literally perfect, as it's the same that phpbb3 use - it will parse your custom bbcodes, attachments, custom smiles etc. You just need to configure them again ![]()
RE: HTML codes in post when Merging PHPBB3 to MyBB - knobblywobbly - 2020-06-04 I wonder if someone can help me please? I recently migrated from PHPBB forum software to MyBB software, but when the conversion finished I was left with lots of weird characters in many posts, such as <P>, </e>, etc. I used the above query to remove things like this, and it has worked well and removed lots of these characters: UPDATE mybb_posts SET message = REPLACE (message , '<P>', '') WHERE message LIKE '%<P>%';My problem now is that the stuff I need to remove varies from post to post - here's a few examples: ">https://www.ebay.co.uk/itm/SUZUKI-DR-75 ... Sw7k9eIFHa</a><!-- m --> ">http://www.hagon-shocks.co.uk/catalog/c ... x?TypeID=F</a><!-- m --> ">https://www.moorespeedracing.co.uk/indi ... gKQjPD_BwE</a><!-- m --> As you can see, each line that I need to remove starts and ends with the same group of characters. Is there some way I can modify the original query so that I can remove anything that starts with ">htt and ends with m--> (a bit like having a wildcard in the middle)? TIA |