Simple Machines Community Forum

SMF Support => Converting to SMF => YaBB/YaBB SE => Topic started by: uberdude12 on June 20, 2009, 02:23:15 PM

Title: Size
Post by: uberdude12 on June 20, 2009, 02:23:15 PM
We converted from YaBB to SMF and we are in a testing mode. We have noticed that the mycode is different. For example, one problem is that some previous posts have messages where the size of words are 20pt In YaBB the code was size=20 In SMF, you would have to change it to size=20pt Is there a way to automatically change that setting? Or does every single member have to modify their posts to make the words the correct size. Thanks!
Title: Re: Size
Post by: ThorstenE on June 21, 2009, 10:19:11 AM
Should be easy fixable via phpMyAdmin (What is phpMyAdmin? (http://www.simplemachines.org/community/index.php?topic=21919.0)):

UPDATE `smf_messages`SET `body` = REPLACE(`body`, 'size=20', 'size=20pt');

The query will update ALL posts at a single blow ;)

Note: please make a backup from your database before!!
Title: Re: Size
Post by: uberdude12 on June 21, 2009, 08:37:53 PM
well, can you make a step by step guide on how to do this. I don't think this is enough info.
Title: Re: Size
Post by: shyguy on June 21, 2009, 11:37:37 PM
The above code did not work. I have converted Yabb to SMF. In Yabb, to format size, you use the code [size=12] or whatever. SMF uses size=12pt]. So just to be sure, the above code is supposed to change all instances of size formatting by adding the "pt" after the number? If so, this did not happen when added to the query box in phpMyAdmin.
Title: Re: Size
Post by: ThorstenE on June 22, 2009, 02:08:06 AM
Quote from: shyguy on June 21, 2009, 11:37:37 PM
So just to be sure, the above code is supposed to change all instances of size formatting by adding the "pt" after the number? If so, this did not happen when added to the query box in phpMyAdmin.
Exactly this should happen. Maybe you used a different table prefix? the default table prefix is smf_ (my example code above). When using a different prefix you have to replace smf_  with yourprefix_

You can also try it with this slightly modified version:
UPDATE smf_messages SET body = REPLACE(body, '[size=20]', '[size=20pt]');

Note: this should be repeated for every different size .. replace "20" with the numbers used in your board.
Title: Re: Size
Post by: shyguy on June 22, 2009, 08:55:57 PM
Thanks. The problem was the that code is case sensitive and the post I was checking used [SIZE=20] as apposed to [size=20]. 

Title: Re: Size
Post by: Hilary2009 on August 20, 2009, 11:22:18 PM
thanks for all comments