Re: BBC tag with spaces
Reply #2 –
Hmm... yeah. That's an issue I guess but not one I'd want to fix. The fix would cause parsing to be slower. As for using two tags, at first I thought that might not work but thinking about it, it might. An easy test and it would be future proof.
Re: BBC tag with spaces
Reply #4 –
If it's not an enormous forum, what about a query scanning all posts, looking for [img ] and replace it with the regular tag? Wouldn't that be possible?
Re: BBC tag with spaces
Reply #7 –
I wasn't thinking that as a solution since that just fixes your tiny problem. I was thinking of allowing the space there for any tag.
Solution to your problem is a simple query
Re: BBC tag with spaces
Reply #9 –
What are you using for searching? Use that to find the rows to change. That should make your conversion script a lot faster since you won't have to search every row. Run it via command line php convert.php and do the query in batches of 1000 or so.
Since it's just a simple update query and it doesn't need to go back to PHP, you could look in to use Percona Tools.
Re: BBC tag with spaces
Reply #12 –
Sounds like a bunch of changes you could make with an update query. If you're having problems writing it out, post and someone will probably help.
Either way, maybe you can post your queries/solution so others can benefit.
Re: BBC tag with spaces
Reply #14 –
You can use a simple regular expression for the [/size][/font] issue