SMF Support > Converting to SMF

Quote tags not recognized

<< < (10/11) > >>

packman:
I've fixed the timeOffset now. It's timeOffset = phpBB_user_timezone - phpBB_board_timezone.

Whilst it's worth getting right, a lot of users seem to be confused about time zones. I've got users from New Zealand who say they're GMT-12 when they should be GMT+12. I've got a user in Belgium who is convinced he's in GMT+13. Interestingly phpBB doesn't seem to support users in the Kiribati Line Islands who apparently live in GMT+14.

[Unknown]:

--- Quote from: packman on August 30, 2004, 05:30:52 PM ---Whilst it's worth getting right, a lot of users seem to be confused about time zones. I've got users from New Zealand who say they're GMT-12 when they should be GMT+12. I've got a user in Belgium who is convinced he's in GMT+13. Interestingly phpBB doesn't seem to support users in the Kiribati Line Islands who apparently live in GMT+14.

--- End quote ---

That's specically why, at least as far as I am concerned, SMF uses the method it does - it's less confusing.  Most everyone can add... but even I sometimes forget which time zone I am in.

-[Unknown]

Burpee:

--- Quote from: [Unknown] on August 30, 2004, 04:34:29 PM ---
* [Unknown] loves regular expressions ;).
$body = preg_replace('~\[size=([789]|[012][1-9])\]~is', '[size=$1px]', $body);

The reason for this special matching is that we don't want to match, neccessarily, [ size=2 ], which might really be to have that "html font size".  But, most people wouldn't use font sizes lower than 7 anyway... anything higher (not too high!) should be px ;).

-[Unknown]

--- End quote ---

Another question :D
How do I perform this action on my own database?
My guess is to create a .php file, create a mysql query and then... insert this somewhere?

* Burpee feels noob  :-[

[Unknown]:

--- Code: ---<?php

include_once(&#39;/path/to/SSI.php&#39;);

$result = mysql_query("
   SELECT body, ID_MSG
   FROM {$db_prefix}messages}");
while ($row = mysql_fetch_assoc($result))
{
   $body = preg_replace(&#39;~\[size=([789]|[012][1-9])\]~is&#39;, &#39;[size=$1px]&#39;, $row[&#39;body&#39;]);

   mysql_query("
      UPDATE {$db_prefix}messages
      SET body = &#39;$body&#39;
      WHERE ID_MSG = $row[ID_MSG]
      LIMIT 1");
}
mysql_free_result($result);

?>
--- End code ---

You're lucky you only have 5000 posts.... this isn't the most efficient way, mind you.

-[Unknown]

Burpee:

--- Quote ---Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/vuurwerk/public_html/forum/sizefix.php on line 8

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/vuurwerk/public_html/forum/sizefix.php on line 18
--- End quote ---

Maybe there's something wrong with the query?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version