![]() |
|
Thread Tools |
#1
|
|||
|
|||
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. No members have liked this post.
Last edited by FrozenBlast13317; 10 Apr 2017 at 03:39. |
Comments |
#2
|
|||
|
|||
So in your example [center:jfheidne], jfheidne is the text that has to be centered?
No members have liked this post.
|
#3
|
|||
|
|||
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. No members have liked this post.
|
#4
|
||||
|
||||
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.
No members have liked this post.
Last edited by Dave; 08 Apr 2017 at 18:09. |
#5
|
|||
|
|||
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. No members have liked this post.
Last edited by FrozenBlast13317; 10 Apr 2017 at 03:39. |
#6
|
||||
|
||||
Originally Posted by FrozenBlast13317
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.
![]()
__________________
Former vBulletin.org Staff Member ![]() Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons No members have liked this post.
|
#7
|
|||
|
|||
Originally Posted by MarkFL
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 00: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 01:04 --------------- And here was the error code I received PHP Strict Standards: Only variables should be passed by reference --------------- Added 10 Apr 2017 at 03:35 --------------- And this has been solved. Thanks. No members have liked this post.
|
#8
|
|||
|
|||
Glad you got it working, what was the mistake?
No members have liked this post.
|
#9
|
|||
|
|||
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.
No members have liked this post.
|
![]() |
![]() |
||||
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 06:28 |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 19:46.