Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 07 Apr 2017, 13:37
FrozenBlast13317 FrozenBlast13317 is offline
 
Join Date: Aug 2014
BBCode error after Impex transition

Hello I'm having issues with a migration. I recently moved from phpbb 3.0 to vBulletin 4.2.3.

The BBCodes from phpbb seem to be in the phpbb format. For example, I see [center:jfheidne] in many posts and such.

Would it be possible to prune these bbcodes or replace them with valid vBulletin bbcodes? Ideally I want to replace.

Last edited by FrozenBlast13317; 10 Apr 2017 at 04:39.
Reply With Quote
Comments
  #2  
Old 08 Apr 2017, 17:12
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
So in your example [center:jfheidne], jfheidne is the text that has to be centered?
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #3  
Old 08 Apr 2017, 18:41
FrozenBlast13317 FrozenBlast13317 is offline
 
Join Date: Aug 2014
For example,

Bbcodes would show with random letters after them. These letters vary each post even if its the same bbcode.

One code would show [s:kfbskdn]texthere[/s:kfbskdn] where is should be iust an S for strike. The issue here is that there are random letters after the bbcode value that were not here before.

I contacted vBulletin and they said I have to replace these values with vBulletin values.

Heres a post example (in phpbb 3.0 these were centered, but now the center bbcode in vBulletin shows as this:

[center:2lh05fwg]Hey everyone![/center:2lh05fwg][center:2lh05fwg]texthere[/center:2lh05fwg]

The only issue is the :randomcharacters. Anyway to mass remove these?

Looking for the right SQL query to execute, I think.
Reply With Quote
  #4  
Old 08 Apr 2017, 18:51
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
It's not going to be possible in a SQL query since MySQL doesn't have a regex replace function built-in but a PHP script is possible.

Create a PHP file in the root of your forum with the contents below and then visit it in the browser or execute it through the command line interface.

I recommend executing it against a test database first since I didn't test it.
Also if you have a very big database, it may timeout so you have to run it multiple times after the 360 seconds.
If there are more tags to fix that have the same formatting, change the $tagtofix variable in the script below.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.

Last edited by Dave; 08 Apr 2017 at 19:09.
Reply With Quote
  #5  
Old 09 Apr 2017, 16:40
FrozenBlast13317 FrozenBlast13317 is offline
 
Join Date: Aug 2014
Hey Dave thanks for your reply. I tried executing your php theough browser and through command line, and it didn't have any effect (it did nothing apparently?).

Any ideas? Thanks, it's really appreciated as this is the last issue we have after our impex transfer.

Last edited by FrozenBlast13317; 10 Apr 2017 at 04:39.
Reply With Quote
  #6  
Old 09 Apr 2017, 16:45
MarkFL's Avatar
MarkFL MarkFL is online now
 
Join Date: Feb 2014
Real name: Mark
Originally Posted by FrozenBlast13317 View Post
Hey Dave.

Thanks for your reply. I tried executing your php theough browser and through command line, and it didn't have any effect (it did nothing apparently?).

Any ideas? Thanks, it's really appreciated as this is the last issue we have after our impex transfer.
Try editing one of the posts that doesn't appear to have been fixed...does the post appear to be fixed in the editor? If so, then this is a post caching issue.
__________________


Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons
Reply With Quote
  #7  
Old 09 Apr 2017, 17:32
FrozenBlast13317 FrozenBlast13317 is offline
 
Join Date: Aug 2014
Originally Posted by MarkFL View Post
Try editing one of the posts that doesn't appear to have been fixed...does the post appear to be fixed in the editor? If so, then this is a post caching issue.
Hey!

I tried editing one of the posts and the tag looks broken as it was before. I tried clearing post cache but that didn't work unfortunately. Thank you for posting.

--------------- Added 10 Apr 2017 at 01:28 ---------------

Just wanted to update you Dave. It gives me a 500 server error when trying to run the code.

--------------- Added 10 Apr 2017 at 02:04 ---------------

And here was the error code I received

PHP Strict Standards: Only variables should be passed by reference

--------------- Added 10 Apr 2017 at 04:35 ---------------

And this has been solved. Thanks.
Reply With Quote
  #8  
Old 10 Apr 2017, 16:42
Dave Dave is offline
 
Join Date: Jun 2010
Real name: Dave
Glad you got it working, what was the mistake?
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #9  
Old 12 Apr 2017, 05:04
FrozenBlast13317 FrozenBlast13317 is offline
 
Join Date: Aug 2014
I fiddled with your code a bit but just couldn't seem to get it working. I'm not positive as to what the issue was - however, I managed to find the right replacement code to slap onto the cleaner tool in the impex system. Took a bit of digging. Thanks for all of your help guys.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Miscellaneous Hacks Automatic transition between Groups through Gender Almotmaiz.Net vBulletin 3.6 Add-ons 35 13 Feb 2011 07:28



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 05:44.

Layout Options | Width: Wide Color: