Hello
I m trying to convert the old bbPress Quotes to the wpForo ones, by doing search replace in the database, this how it is bbPress code and wpForo one.
Check my attachment because it seems wpForo is damaging what I write with codes.
Hi @itesla,
What you are doing won't fix your problem. You need a PHP script to fix the issue with regular expressions, and this is not an easy work with which I could help you here, you will need a Developer for such a work.
And I want to let you know that we have Go2wpForo free tool, which can help to migrate from several forums to wpForo. I would recommend you to check the information about the tool: https://wpforo.com/docs/root/migrate-to-wpforo/
I have solved my issue thanks to my free developer buddy ChatGPT.
First I did this.
Searched in database
[quote quote=
and replaced with
<blockquote data-postid=
On the second run, searched for
and replaced with
</blockquote>
But then I run into another problem: if I search and replace ] with > it'll replace other things in post content as well.
I asked ChatGPT how to replace ] at the end of any =94857] with > so it does not touch other reply content with same ] ending, he reply as below. And I have resolved my issue, converted all old bbPress quotes to wpForo ones, he also provided codes for functions php but they were not showing when i was checking, this is possible because of Forum has cache, so I ended up with search/replace in the database. Of course there are other ways to do it but this is how i solved my old case.
P.s. not sure what is with writing in the forum that i had to edit many times this reply to make it display proper.
You can use the "Search and Replace" feature in phpMyAdmin to replace the "]" character with ">". Here are the steps:
Log in to phpMyAdmin and select the database containing the forum tables.
Click on the table you want to modify.
Click on the "Search" tab at the top of the page.
In the "Find" field, enter the following regular expression:
(postid=\d+)(])
This will match any string containing "postid=" followed by one or more digits, followed by a closing bracket "]" character.
In the "Replace with" field, enter the following string:
$1>
This will replace the closing bracket "]" character with the ">" character, while keeping the "postid=" and digit string intact.
Select the column(s) you want to modify. For example, if you want to modify the post content, select the "post_content" column.
Check the "Use regular expression" checkbox.
Click the "Go" button to perform the search and replace operation.
Note: Before making any changes to your database, it's always a good idea to create a backup.