Changeset 15 for trunk/inc/communities
- Timestamp:
- 08/09/05 22:30:14 (7 years ago)
- Location:
- trunk/inc/communities
- Files:
-
- 17 modified
-
category.inc.php (modified) (4 diffs)
-
create.inc.php (modified) (2 diffs)
-
createEvent.inc.php (modified) (1 diff)
-
createTopic.inc.php (modified) (1 diff)
-
edit.inc.php (modified) (2 diffs)
-
editEvent.inc.php (modified) (1 diff)
-
editPost.inc.php (modified) (1 diff)
-
invite.inc.php (modified) (1 diff)
-
join.inc.php (modified) (2 diffs)
-
last.inc.php (modified) (2 diffs)
-
members.inc.php (modified) (2 diffs)
-
mine.inc.php (modified) (2 diffs)
-
replyTopic.inc.php (modified) (1 diff)
-
search.inc.php (modified) (2 diffs)
-
view.inc.php (modified) (4 diffs)
-
viewEvent.inc.php (modified) (1 diff)
-
viewTopic.inc.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/communities/category.inc.php
r1 r15 32 32 if(is_numeric($token[2])) 33 33 { 34 $ smarty->assign('Title', 'By category');34 $_SMARTY['Title'] = 'By category'; 35 35 36 36 if($token[3] == 'newer') … … 42 42 43 43 $nb_page = ceil($category['nb_communities']/20); 44 $pages = array_fill(1,$nb_page, NULL);44 $pages = @array_fill(1,$nb_page, NULL); 45 45 46 46 if($category['nb_communities']>20 && is_numeric($token[4]) && $token[4]<= $nb_page ) … … 56 56 } 57 57 58 $ smarty->assign('cat', $category);59 $ smarty->assign('pages', $pages);60 $ smarty->assign('communities', $communities);58 $_SMARTY['cat'] = $category; 59 $_SMARTY['pages'] = $pages; 60 $_SMARTY['communities'] = $communities; 61 61 } 62 62 else … … 77 77 } 78 78 79 $ smarty->assign('categories', $categories);79 $_SMARTY['categories'] = $categories; 80 80 81 81 array_unshift($categories_list, _('Everywhere')); 82 $ smarty->assign('categories_list', $categories_list);82 $_SMARTY['categories_list'] = $categories_list; 83 83 84 84 } -
trunk/inc/communities/create.inc.php
r1 r15 25 25 include(INCLUDESPATH.'/countries_list.inc.php'); 26 26 27 $ smarty->assign('Title', 'Communities');27 $_SMARTY['Title'] = 'Communities'; 28 28 29 29 $categories_r = $db->query('SELECT id_cat,name,nb_communities FROM community_cat'); … … 32 32 $categories[$categorie['id_cat']] = _($categorie['name']).' ('.$categorie['nb_communities'].')'; 33 33 34 $ smarty->assign('categories', $categories);34 $_SMARTY['categories'] = $categories; 35 35 ?> -
trunk/inc/communities/createEvent.inc.php
r14 r15 37 37 $leftmenu["/communities/events/".$community['info']['id_comm']] = 'View events'; 38 38 39 $ smarty->assign('leftmenu',$leftmenu);39 $_SMARTY['leftmenu'] = $leftmenu; 40 40 /************************************/ 41 41 42 $ smarty->assign('Title', 'Communities');43 $ smarty->assign('community', $community);42 $_SMARTY['Title'] = 'Communities'; 43 $_SMARTY['community'] = $community; 44 44 } 45 45 else -
trunk/inc/communities/createTopic.inc.php
r1 r15 35 35 $leftmenu["/communities/events/".$community['info']['id_comm']] = 'View events'; 36 36 37 $ smarty->assign('leftmenu',$leftmenu);37 $_SMARTY['leftmenu'] = $leftmenu; 38 38 /************************************/ 39 39 40 $ smarty->assign('Title', 'Communities');41 $ smarty->assign('community', $community);40 $_SMARTY['Title'] = 'Communities'; 41 $_SMARTY['community'] = $community; 42 42 } 43 43 else -
trunk/inc/communities/edit.inc.php
r1 r15 42 42 $leftmenu["/communities/events/".$community['info']['id_comm']] = 'View events'; 43 43 44 $ smarty->assign('leftmenu',$leftmenu);44 $_SMARTY['leftmenu'] = $leftmenu; 45 45 46 46 … … 48 48 49 49 50 $ smarty->assign('categories', $categories);50 $_SMARTY['categories'] = $categories; 51 51 52 52 53 $ smarty->assign('Title', 'Community');54 $ smarty->assign('community', $community);53 $_SMARTY['Title'] = 'Community'; 54 $_SMARTY['community'] = $community; 55 55 } 56 56 else -
trunk/inc/communities/editEvent.inc.php
r14 r15 43 43 $leftmenu["/communities/events/".$community['info']['id_comm']] = 'View events'; 44 44 45 $ smarty->assign('leftmenu',$leftmenu);45 $_SMARTY['leftmenu'] = $leftmenu; 46 46 /************************************/ 47 47 48 48 49 $ smarty->assign('community',$community);50 $ smarty->assign('event', $event);49 $_SMARTY['community'] = $community; 50 $_SMARTY['event'] = $event; 51 51 } 52 52 } -
trunk/inc/communities/editPost.inc.php
r1 r15 41 41 $leftmenu["/communities/events/".$community['info']['id_comm']] = 'View events'; 42 42 43 $ smarty->assign('leftmenu',$leftmenu);43 $_SMARTY['leftmenu'] = $leftmenu; 44 44 /************************************/ 45 45 46 46 47 $ smarty->assign('community',$community);48 $ smarty->assign('post', $post);47 $_SMARTY['community'] = $community; 48 $_SMARTY['post'] = $post; 49 49 } 50 50 } -
trunk/inc/communities/invite.inc.php
r1 r15 38 38 $leftmenu["/communities/events/".$token[2]] = 'View events'; 39 39 40 $ smarty->assign('leftmenu',$leftmenu);40 $_SMARTY['leftmenu'] = $leftmenu; 41 41 /************************************/ 42 42 43 $ smarty->assign('Title', $community['info']['name']);44 $ smarty->assign('friends', $friends);45 $ smarty->assign('community', $community);43 $_SMARTY['Title'] = $community['info']['name']; 44 $_SMARTY['friends'] = $friends; 45 $_SMARTY['community'] = $community; 46 46 } 47 47 else -
trunk/inc/communities/join.inc.php
r1 r15 34 34 $leftmenu["/communities/events/".$token[2]] = 'View events'; 35 35 36 $ smarty->assign('leftmenu',$leftmenu);36 $_SMARTY['leftmenu'] = $leftmenu; 37 37 38 38 … … 41 41 42 42 43 $ smarty->assign('Title', $community['info']['name']);44 $ smarty->assign('community', $community);43 $_SMARTY['Title'] = $community['info']['name']; 44 $_SMARTY['community'] = $community; 45 45 } 46 46 else -
trunk/inc/communities/last.inc.php
r1 r15 23 23 ******************** http://opensource.ikse.net/projects/dotnode ***/ 24 24 25 $ smarty->assign('Title', 'Communities');25 $_SMARTY['Title'] = 'Communities'; 26 26 27 27 $last_comm_r = $db->query('SELECT community.id as id, community.id_comm as id_comm, community.name as name, community.description as description, community.nb_members, community_cat.name as cat_name, community.date as date FROM community LEFT JOIN community_cat USING (id_cat) WHERE community.date > ? ORDER BY community.date DESC', array(time()-604800)); … … 44 44 45 45 46 $ smarty->assign('last_communities', $last_communities);46 $_SMARTY['last_communities'] = $last_communities; 47 47 ?> -
trunk/inc/communities/members.inc.php
r1 r15 25 25 if(is_numeric($token[2]) ) 26 26 { 27 $ smarty->assign('Title', 'Community members');27 $_SMARTY['Title'] = 'Community members'; 28 28 29 29 $community['info'] = $db->getRow('SELECT id_comm, id, community.name as name, community.description as description, moderated, country, date, nb_members, community_cat.name as category FROM community LEFT JOIN community_cat USING(id_cat) WHERE id_comm=?', array($token[2])); … … 53 53 $leftmenu["/communities/invite/".$token[2]] = 'Invite friends'; 54 54 55 $ smarty->assign('leftmenu',$leftmenu);55 $_SMARTY['leftmenu'] = $leftmenu; 56 56 57 57 58 58 /************************************/ 59 59 60 $ smarty->assign('community', $community);60 $_SMARTY['community'] = $community; 61 61 62 62 } -
trunk/inc/communities/mine.inc.php
r1 r15 23 23 ******************** http://opensource.ikse.net/projects/dotnode ***/ 24 24 25 $ smarty->assign('Title', 'My communities');25 $_SMARTY['Title'] = 'My communities'; 26 26 27 27 $my_communities_r = $db->query('SELECT name, community.id_comm as id_comm, description, nb_members, last_post_date, community.id as id FROM community LEFT JOIN user_comm USING (id_comm) WHERE user_comm.id=? AND user_comm.status=? ORDER BY last_post_date DESC', array($_SESSION['my_id'], 'ok') ); … … 45 45 } 46 46 47 $ smarty->assign('my_communities', $my_communities);47 $_SMARTY['my_communities'] = $my_communities; 48 48 49 49 ?> -
trunk/inc/communities/replyTopic.inc.php
r1 r15 38 38 } 39 39 40 $ smarty->assign('community',$community);41 $ smarty->assign('topic', $topic);40 $_SMARTY['community'] = $community; 41 $_SMARTY['topic'] = $topic; 42 42 } 43 43 ?> -
trunk/inc/communities/search.inc.php
r1 r15 23 23 ******************** http://opensource.ikse.net/projects/dotnode ***/ 24 24 25 $ smarty->assign('Title', 'Community');25 $_SMARTY['Title'] = 'Community'; 26 26 27 27 $array = explode(' ', $_GET['q']); … … 68 68 69 69 array_unshift($categories_list, _('Everywhere')); 70 $ smarty->assign('categories_list', $categories_list);71 $ smarty->assign('comm', $comm);70 $_SMARTY['categories_list'] = $categories_list; 71 $_SMARTY['comm'] = $comm; 72 72 73 73 -
trunk/inc/communities/view.inc.php
r14 r15 25 25 if(is_numeric($token[2]) ) 26 26 { 27 $ smarty->assign('Title', 'Community');27 $_SMARTY['Title'] = 'Community'; 28 28 29 29 $community['info'] = $db->getRow('SELECT id_comm, id, community_cat.id_cat as id_cat, community.name as name, community.description as description, moderated, country, date, nb_members, community_cat.name as category FROM community LEFT JOIN community_cat USING(id_cat) WHERE id_comm=?', array($token[2])); … … 109 109 if($_SESSION['my_communities_id'] && in_array($community['info']['id_comm'], $_SESSION['my_communities_id']) ) 110 110 { 111 $ smarty->assign('is_member', 1);111 $_SMARTY['is_member'] = 1; 112 112 $leftmenu['/communities/unjoin/'.$token[2]] = 'Unjoin'; 113 113 } 114 114 else 115 115 { 116 $ smarty->assign('is_member', 0);116 $_SMARTY['is_member'] = 0; 117 117 if($community['info']['moderated'] == 'yes') 118 118 $leftmenu['/communities/join/'.$token[2].'/moderated'] = 'Join'; … … 122 122 else 123 123 { 124 $ smarty->assign('is_member', 1);124 $_SMARTY['is_member'] = 1; 125 125 $leftmenu["/communities/edit/".$token[2]] = 'Edit'; 126 126 } … … 131 131 $leftmenu['/communities/invite/'.$token[2]] = 'Invite friends'; 132 132 133 $ smarty->assign('leftmenu',$leftmenu);133 $_SMARTY['leftmenu'] = $leftmenu; 134 134 135 135 136 136 /************************************/ 137 137 138 $ smarty->assign('related_communities', $related_comm);139 $ smarty->assign('community', $community);138 $_SMARTY['related_communities'] = $related_comm; 139 $_SMARTY['community'] = $community; 140 140 } 141 141 else -
trunk/inc/communities/viewEvent.inc.php
r1 r15 36 36 $leftmenu["/communities/events/".$community['info']['id_comm']] = 'View events'; 37 37 38 $ smarty->assign('leftmenu',$leftmenu);38 $_SMARTY['leftmenu'] = $leftmenu; 39 39 /************************************/ 40 40 41 if($_SESSION['my_communities_id']) $smarty->assign('member', in_array($community['info']['id_comm'], $_SESSION['my_communities_id'])); 42 43 $smarty->assign('community',$community); 44 $smarty->assign('event', $event); 41 $_SMARTY['community'] = $community; 42 $_SMARTY['event'] = $event; 45 43 } 46 44 ?> -
trunk/inc/communities/viewTopic.inc.php
r1 r15 43 43 $leftmenu["/communities/events/".$community['info']['id_comm']] = 'View events'; 44 44 45 $ smarty->assign('leftmenu',$leftmenu);45 $_SMARTY['leftmenu'] = $leftmenu; 46 46 /************************************/ 47 47 … … 51 51 { 52 52 $db->query('UPDATE user_comm SET last_visit=? WHERE id=? AND id_comm=?', array(time(), $_SESSION['my_id'], $community['info']['id_comm'])); 53 $ smarty->assign('member', true);53 $_SMARTY['is_member'] = true; 54 54 } 55 55 } 56 56 57 $ smarty->assign('community',$community);58 $ smarty->assign('topic', $topic);57 $_SMARTY['community'] = $community; 58 $_SMARTY['topic'] = $topic; 59 59 } 60 60 ?>
