News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Size

Started by uberdude12, June 20, 2009, 02:23:15 PM

Previous topic - Next topic

uberdude12

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!

ThorstenE

Should be easy fixable via phpMyAdmin (What is phpMyAdmin?):

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!!

uberdude12

well, can you make a step by step guide on how to do this. I don't think this is enough info.

shyguy

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.

ThorstenE

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.

shyguy

Thanks. The problem was the that code is case sensitive and the post I was checking used [SIZE=20] as apposed to [size=20]. 


Hilary2009

thanks for all comments




Advertisement: