|
Revision 1, 2.0 KB
(checked in by anonymous, 7 years ago)
|
|
initial import
|
| Line | |
|---|
| 1 | <?php |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | $_SMARTY['rss'] = array( |
|---|
| 27 | 'title' => '.node | My communities', |
|---|
| 28 | 'description' => 'Last activities on your communities', |
|---|
| 29 | 'link' => 'http://'.$config['domain'].'/communities/mine' |
|---|
| 30 | ); |
|---|
| 31 | |
|---|
| 32 | $items = $db->getAssoc('SELECT c.id_comm AS id_comm, c.id AS id, c.name AS name, c.nb_members AS nb_members, c.moderated AS moderated, c.last_post_date AS last_post_date FROM community AS c LEFT JOIN user_comm AS u USING (id_comm) WHERE u.id=? ORDER BY c.last_post_date DESC LIMIT 0,20', true, array($url_id)); |
|---|
| 33 | |
|---|
| 34 | if(DB::isError($items)) |
|---|
| 35 | error_log($items->getUserInfo()); |
|---|
| 36 | else |
|---|
| 37 | foreach($items as $id_comm=>$item) |
|---|
| 38 | { |
|---|
| 39 | $_SMARTY['rss']['item']['http://'.$config['domain'].'/communities/forum/'.$id_comm.'/'.$item['last_post_date']] = array( |
|---|
| 40 | 'title' => $item['name'], |
|---|
| 41 | 'author' => '.node communities activity survey', |
|---|
| 42 | 'pubDate' => date('r', $item['last_post_date']), |
|---|
| 43 | 'link' => 'http://'.$config['domain'].'/communities/forum/'.$id_comm.'/'.$item['last_post_date'], |
|---|
| 44 | 'description' => 'Last change on '.date('r', $item['last_post_date']) |
|---|
| 45 | ); |
|---|
| 46 | } |
|---|
| 47 | |
|---|
| 48 | ?> |
|---|