diff --git a/ext/bbcode/main.php b/ext/bbcode/main.php index 8b613af7..cfa240b9 100644 --- a/ext/bbcode/main.php +++ b/ext/bbcode/main.php @@ -33,7 +33,7 @@ class BBCode extends FormatterExtension { ) as $el) { $text = preg_replace("!\[$el\](.*?)\[/$el\]!s", "<$el>$1$el>", $text); } - $text = preg_replace('!>>([^\d].+)!', '
$1', $text); + $text = preg_replace('!^>>([^\d].+)!', '
$1', $text); $text = preg_replace('!>>(\d+)(#c?\d+)?!s', '>>$1$2', $text); $text = preg_replace('!\[url=site://(.*?)(#c\d+)?\](.*?)\[/url\]!s', '$3', $text); $text = preg_replace('!\[url\]site://(.*?)(#c\d+)?\[/url\]!s', '$1$2', $text); diff --git a/ext/comment/style.css b/ext/comment/style.css index e9052376..555dfad9 100644 --- a/ext/comment/style.css +++ b/ext/comment/style.css @@ -4,6 +4,9 @@ position: relative; word-wrap: break-word; } +.comment IMG { + max-width: 100%; +} .comment .info { visibility: hidden; text-align: center; diff --git a/ext/pm/main.php b/ext/pm/main.php index 20935c90..b18e0121 100644 --- a/ext/pm/main.php +++ b/ext/pm/main.php @@ -112,8 +112,10 @@ class PrivMsg extends Extension { } else if(($pm["to_id"] == $user->id) || $user->can("view_other_pms")) { $from_user = User::by_id(int_escape($pm["from_id"])); - $database->execute("UPDATE private_message SET is_read='Y' WHERE id = :id", array("id" => $pm_id)); - $database->cache->delete("pm-count-{$user->id}"); + if($pm["to_id"] == $user->id) { + $database->execute("UPDATE private_message SET is_read='Y' WHERE id = :id", array("id" => $pm_id)); + $database->cache->delete("pm-count-{$user->id}"); + } $this->theme->display_message($page, $from_user, $user, new PM($pm)); } else { @@ -178,7 +180,8 @@ class PrivMsg extends Extension { SELECT private_message.*,user_from.name AS from_name FROM private_message JOIN users AS user_from ON user_from.id=from_id - WHERE to_id = :toid", + WHERE to_id = :toid + ORDER BY sent_date DESC", array("toid" => $user->id)); $pms = array(); foreach($arr as $pm) { diff --git a/ext/pm/theme.php b/ext/pm/theme.php index 14414b4e..a248be50 100644 --- a/ext/pm/theme.php +++ b/ext/pm/theme.php @@ -6,7 +6,7 @@ class PrivMsgTheme extends Themelet { $html = "
Subject | From | Date | Action | |
---|---|---|---|---|
R? | Subject | From | Date | Action |
$h_subject | + $readYN = "Y"; + if(!$pm->is_read) { + $h_subject = "$h_subject"; + $readYN = "N"; + } + $html .= "||||
$readYN | +$h_subject | $h_from | $h_date |