Index: trunk/extensions/SocialProfile/UserStatus/userstatus.sql |
— | — | @@ -1,12 +1,10 @@ |
2 | 2 | CREATE TABLE /*_*/user_status ( |
3 | 3 | -- Unique status ID number |
4 | | - `us_id` int(11) NOT NULL DEFAULT 0 PRIMARY KEY, |
| 4 | + `us_id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, |
5 | 5 | -- ID number of the user who wrote this status update |
6 | 6 | `us_user_id` int(11) NOT NULL default '0', |
7 | 7 | -- Timestamp of the status update |
8 | 8 | `us_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
9 | | - -- Name of the person who wrote the status update |
10 | | - `us_user_text` varchar(255) NOT NULL default '', |
11 | 9 | -- The text of the status update |
12 | 10 | `us_status` varchar(140) NOT NULL default '' |
13 | 11 | )/*$wgDBTableOptions*/; |
Index: trunk/extensions/SocialProfile/UserStatus/UserStatus_AjaxFunctions.php |
— | — | @@ -21,7 +21,9 @@ |
22 | 22 | $historyArray = $us_class->useStatusHistory('select', $u_id); |
23 | 23 | $output='<table id="user-status-history">'; |
24 | 24 | foreach ($historyArray as $row ) { |
25 | | - $output .= '<tr><td id="status-history-time">'.$row['ush_timestamp'].' </td>'; |
| 25 | + $time = DateTime::createFromFormat('Y-m-d H:i:s',$row['ush_timestamp']); |
| 26 | + |
| 27 | + $output .= '<tr><td id="status-history-time">'.date_format($time, 'j M G:i').' </td>'; |
26 | 28 | $output .= '<td><a href="javascript:UserStatus.fromHistoryToStatus(\''.$row['ush_status'].'\');">' |
27 | 29 | .$row['ush_status'].'</a></td></tr>'; |
28 | 30 | } |
Index: trunk/extensions/SocialProfile/UserStatus/UserStatus.css |
— | — | @@ -1,9 +1,3 @@ |
2 | | -#status-history-time |
3 | | -{ |
4 | | - font-size: 9px; |
5 | | - color: #665; |
6 | | -} |
7 | | - |
8 | 2 | #status-box |
9 | 3 | { |
10 | 4 | width : 400px; |
— | — | @@ -39,14 +33,26 @@ |
40 | 34 | { |
41 | 35 | color: white; |
42 | 36 | font-size: 8pt; |
43 | | - text-decoration: underline |
| 37 | + text-decoration: underline; |
44 | 38 | } |
45 | 39 | |
46 | 40 | #user-status-history |
47 | 41 | { |
48 | 42 | background-color: orange; |
| 43 | + color: white; |
49 | 44 | } |
50 | 45 | |
| 46 | +#user-status-history a |
| 47 | +{ |
| 48 | + text-decoration: underline; |
| 49 | + color: white; |
| 50 | +} |
| 51 | + |
| 52 | +#status-history-time |
| 53 | +{ |
| 54 | + font-size: 9px; |
| 55 | +} |
| 56 | + |
51 | 57 | #status-letter-count |
52 | 58 | { |
53 | 59 | float:right; |
Index: trunk/extensions/SocialProfile/UserStatus/UserStatusClass.php |
— | — | @@ -45,6 +45,7 @@ |
46 | 46 | * @param $message String: user-supplied status message |
47 | 47 | */ |
48 | 48 | public function setStatus( $u_id, $message ) { |
| 49 | + $message = trim($message); |
49 | 50 | if (( mb_strlen( $message ) > 70 ) || ( mb_strlen( $message ) < 1 )) { |
50 | 51 | // ERROR. Message length is too long |
51 | 52 | // @todo Communicate failure to the end-user somehow... |