Notifications
Clear all

wpForo 1.x.x Convert bbPress Quotes to wpForo Quotes

17 Posts
3 Users
5 Likes
635 Views
OMTesla
Posts: 209
Topic starter
(@omtesla)
Active Member
Joined: 6 years ago

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.

wpForo Version
1.9.9.1
WordPress Version
5.9
7.3.32
8.0.23-0ubuntu0.20.04.1
16 Replies
Chris
Posts: 2342
Admin
(@chris)
Support Team
Joined: 1 year ago

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/

 

 

Reply
15 Replies
OMTesla
(@omtesla)
Joined: 6 years ago

Active Member
Posts: 209
Posted by: @chris

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/

 

 

Hello

My forum is already migrated to wpForo, the developers helped long time ago.

Not sure why Robert did not find a solution for this problem yet, because those quotes are displayed as ordinary text and it's confusing when reading the old replies. I want to keep my website as an archive for the future generations and everything must be proper.

Thank you.

Reply
Tutrix
(@tutrix)
Joined: 3 years ago

Noble Member
Posts: 823

@itesla 

ask for a code on > Stack Overflow
I think you need a code like this > BBCODE, preg_replace and double quotes

Reply
OMTesla
(@omtesla)
Joined: 6 years ago

Active Member
Posts: 209

@tutrix 

Where should I add this code?

<?php
$out = '[quote=user1;1] [quote=user0;0]some content herethis is my reply to user0 post';
$cnt = 1;
while($cnt != 0){
    $out = preg_replace('/\[quote\=(.*?);(.*?)\](.*?)\[\/quote\]/ms', '<blockquote>Posted by: \1 at \2.<br/>\3</blockquote>', $out, -1, $cnt);
}
echo $out;

I m sure it's not in functions php.

Thank you for good idea.

Reply
Tutrix
(@tutrix)
Joined: 3 years ago

Noble Member
Posts: 823

@itesla 

This is only an example, this code does not work for your problem.
You must ask there for the correct code.

Reply
OMTesla
(@omtesla)
Joined: 6 years ago

Active Member
Posts: 209

@tutrix 

I think it does the same thing I need, I have read that topic, please tell me where it must be added so I test, if it will not work then I will ask them on my problem, thank you.

Reply
Tutrix
(@tutrix)
Joined: 3 years ago

Noble Member
Posts: 823

@itesla 

again

the code above is not complete, and has nothing to do with wpForo, BBPress or Wordpress
if you apply in it will crash the forum

Reply
OMTesla
(@omtesla)
Joined: 6 years ago

Active Member
Posts: 209

@tutrix 

Ok I will ask them, but I doubt they will help, I try to solve other plugin problem and they deleted my topic, because that plugin was paid but it was no longer supported.

Thanks.

Reply
OMTesla
(@omtesla)
Joined: 6 years ago

Active Member
Posts: 209

@tutrix 

Hello
I asked for help but there is zero reply, it's like people just ignore me, same thing on wordpress,org.
Well i will show them soon who is the daddy.

Reply
Tutrix
(@tutrix)
Joined: 3 years ago

Noble Member
Posts: 823

@itesla 

try this simple code, is without the user ID

<?php
while(preg_match('#\[quote\](.*)\[\/quote\]#isU', $tmpText))
$tmpText = preg_replace('#\[quote\](.*)\[\/quote\]#isU', '<blockquote>$1</blockquote>', $tmpText);
?>
Reply
Tutrix
(@tutrix)
Joined: 3 years ago

Noble Member
Posts: 823

maybe Benjamin has the right code for you 😉 

https://regexland.com/bbcode/

Reply
OMTesla
(@omtesla)
Joined: 6 years ago

Active Member
Posts: 209

@tutrix 

Where it must be added?
Thank you.

Reply
Tutrix
(@tutrix)
Joined: 3 years ago

Noble Member
Posts: 823

@omtesla 

I use for code snippets the Code Snippets Plugin

but have you already tested WP BBCodes to HTML Parser

Reply
OMTesla
(@omtesla)
Joined: 6 years ago

Active Member
Posts: 209

@tutrix 
I have try your code, then I installed the plugin but does not work, i even edited the plugin file to include a specific number from a reply and it still did not convert it, might be because the plugin is very old and abandoned.
Anyway I will ask some coder for help.

Thanks for all your help, God bless you.

Reply
Tutrix
(@tutrix)
Joined: 3 years ago

Noble Member
Posts: 823

@omtesla 

I have tested this now with 2 quotes from this > topic

you can see it here and also edit >  https://regex101.com/r/sRSOfp/1

but unfortunately do not know how to apply this now via wordpress 😕 

Reply
OMTesla
(@omtesla)
Joined: 6 years ago

Active Member
Posts: 209

@tutrix 

I will have a look, maybe learn coding myself, thank you!

Reply