- Timestamp:
- 09/30/08 20:28:43 (2 months ago)
- Location:
- events/phpframework/codeigniter/trunk/system/application
- Files:
-
- 5 modified
-
controllers/home.php (modified) (2 diffs)
-
models/status_model.php (modified) (2 diffs)
-
views/home/main_archive.php (modified) (1 diff)
-
views/public_timeline/main.php (modified) (1 diff)
-
views/public_timeline/main_logged_in.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
events/phpframework/codeigniter/trunk/system/application/controllers/home.php
r20301 r20302 11 11 redirect('login'); 12 12 } 13 $this->output->enable_profiler(TRUE);13 //$this->output->enable_profiler(TRUE); 14 14 } 15 15 … … 45 45 $this->User_model->get_friends_list($id); 46 46 $data->followers_count = $this->User_model->get_followers_count($id); 47 47 48 48 $data->title = 'Phwittr'; 49 49 $data->header = $this->load->view('home/header', '', TRUE); -
events/phpframework/codeigniter/trunk/system/application/models/status_model.php
r20301 r20302 78 78 function get_public_timeline($limit = 20, $offset = 0) 79 79 { 80 $this->db->select(' statuses.id, username, comment, UNIX_TIMESTAMP(statuses.created_at) AS created_at,image');80 $this->db->select('SQL_CALC_FOUND_ROWS statuses.id, u1.username AS username, comment, u2.username AS reply_username, UNIX_TIMESTAMP(statuses.created_at) AS created_at, u1.image AS image'); 81 81 $this->db->from('statuses'); 82 $this->db->join('users', 'statuses.user_id = users.id', 'left'); 82 $this->db->join('users AS u1', 'statuses.user_id = u1.id', 'left'); 83 $this->db->join('users AS u2', 'statuses.reply_user_id = u2.id', 'left'); 83 84 $this->db->order_by('created_at', 'DESC'); 84 85 $this->db->limit($limit, $offset); … … 89 90 function get_archive_timeline($id, $limit = 20, $offset = 0) 90 91 { 91 $this->db->select('SQL_CALC_FOUND_ROWS statuses.id, u sername, comment, UNIX_TIMESTAMP(statuses.created_at) AS created_at,image');92 $this->db->select('SQL_CALC_FOUND_ROWS statuses.id, u1.username AS username, comment, u2.username AS reply_username, UNIX_TIMESTAMP(statuses.created_at) AS created_at, u1.image AS image'); 92 93 $this->db->from('statuses'); 93 $this->db->join('users', 'statuses.user_id = users.id', 'left'); 94 $this->db->where('users.id', $id); 94 $this->db->join('users AS u1', 'statuses.user_id = u1.id', 'left'); 95 $this->db->join('users AS u2', 'statuses.reply_user_id = u2.id', 'left'); 96 $this->db->where('u1.id', $id); 95 97 $this->db->order_by('created_at', 'DESC'); 96 98 $this->db->limit($limit, $offset); -
events/phpframework/codeigniter/trunk/system/application/views/home/main_archive.php
r20297 r20302 34 34 <td> 35 35 <p class="murmur"> 36 <?=h($row->comment)?> 36 <?php 37 $row->comment = h($row->comment); 38 if ($row->reply_username) { 39 $row->comment = preg_replace('/^@(\w+)\s/', '@' . anchor(site_url('user/index/' . $row->reply_username), $row->reply_username) . ' ', $row->comment); 40 } 41 ?> 42 <?=$row->comment?> 37 43 <?=anchor(site_url('user/statuses/' . $row->username . '/' . $row->id), posted_time($row->created_at))?> 38 44 </p> -
events/phpframework/codeigniter/trunk/system/application/views/public_timeline/main.php
r19981 r20302 11 11 <p class="murmur"> 12 12 <?=anchor(site_url('user/index/' . $row->username), $row->username)?> 13 <?=h($row->comment)?> 13 <?php 14 $row->comment = h($row->comment); 15 if ($row->reply_username) { 16 $row->comment = preg_replace('/^@(\w+)\s/', '@' . anchor(site_url('user/index/' . $row->reply_username), $row->reply_username) . ' ', $row->comment); 17 } 18 ?> 19 <?=$row->comment?> 14 20 <?=anchor(site_url('user/statuses/' . $row->username . '/' . $row->id), posted_time($row->created_at))?> 15 21 </p> -
events/phpframework/codeigniter/trunk/system/application/views/public_timeline/main_logged_in.php
r20297 r20302 34 34 <p class="murmur"> 35 35 <?=anchor(site_url('user/index/' . $row->username), $row->username)?> 36 <?=h($row->comment)?> 36 <?php 37 $row->comment = h($row->comment); 38 if ($row->reply_username) { 39 $row->comment = preg_replace('/^@(\w+)\s/', '@' . anchor(site_url('user/index/' . $row->reply_username), $row->reply_username) . ' ', $row->comment); 40 } 41 ?> 42 <?=$row->comment?> 37 43 <?=anchor(site_url('user/statuses/' . $row->username . '/' . $row->id), posted_time($row->created_at))?> 38 44 </p>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)