Changeset 1099
- Timestamp:
- 05/14/07 16:04:00 (2 years ago)
- Files:
-
- devel/mod/community/lib.php (modified) (4 diffs)
- devel/mod/widget/manage_widgets.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
devel/mod/community/lib.php
r1098 r1099 26 26 global $CFG; 27 27 global $USER; 28 global $metatags; 28 29 29 30 require_once (dirname(__FILE__)."/default_template.php"); 30 31 require_once (dirname(__FILE__)."/lib/communities_config.php"); 31 32 33 $metatags .= "<link rel=\"stylesheet\" href=\"" . $CFG->wwwroot . "mod/community/css.css\" type=\"text/css\" media=\"screen\" />"; 34 32 35 $page_owner = $profile_id; 33 36 … … 35 38 36 39 $username= user_info('username', $page_owner); 37 38 if (isloggedin()) {39 /*40 if (defined("context") && context == COMMUNITY_CONTEXT && context!="network" && $page_owner == $_SESSION['userid']) {41 $PAGE->menu[] = array( 'name' => 'community',42 'html' => "<li><a href=\"{$CFG->wwwroot}{$_SESSION['username']}/communities\" class=\"selected\" >" .__gettext("Your Communities").'</a></li>');43 } else {44 $PAGE->menu[] = array( 'name' => 'community',45 'html' => "<li><a href=\"{$CFG->wwwroot}{$_SESSION['username']}/communities\" >" .__gettext("Your Communities").'</a></li>');46 } */47 }48 40 49 41 if ($usertype == "community") { … … 84 76 'html' => a_href("{$CFG->wwwroot}{$username}/community/requests", 85 77 __gettext("View membership requests"))); 86 87 88 /*-----------------------------------* 89 * O2O BEGIN modified by mac 90 /*-----------------------------------*/ 91 /** 92 *it connects to invite to a person from a group by mac 93 */ 94 /* 95 $PAGE->menu_sub[] = array( 'name' => 'community:invite', 96 'html' => a_href( "{$CFG->wwwroot}_invite/", __gettext("Invite a friend"))); 97 */ 98 99 /**---- I hypertie to contact to add a group like member by mac --**/ 100 /* 101 $PAGE->menu_sub[] = array( 'name' => 'community:addgroup', 102 'html' => a_href("{$CFG->wwwroot}_communities/addgroup.php?profile_id=$page_owner", 103 __gettext("Invite a Community"))); 104 */ 105 /*-----------------------------------* 106 * O2O BEGIN modified by mac 107 /*-----------------------------------*/ 108 } 109 } 78 } 79 } 80 81 if (defined("context") && context == "profile") { 82 83 if (run("permissions:check", "profile")) { 84 85 if (!empty($CFG->uses_YUI)) { 86 $PAGE->menu_sub[] = array( 'name' => 'profile:widget:manage', 87 'html' => '<a href="'.$CFG->wwwroot.'mod/widget/manage_widgets.php?owner='.$page_owner.'">' 88 . __gettext("Manage widgets") . '</a>'); 89 } else { 90 $PAGE->menu_sub[] = array( 'name' => 'profile:widget:add', 91 'html' => '<a href="'.$CFG->wwwroot.'mod/profile/add.php?owner='.$page_owner.'">' 92 . __gettext("Add widget") . '</a>'); 93 94 } 95 96 } 97 } 98 110 99 } else if ($usertype == "person") { 111 100 … … 161 150 162 151 // 'Communities' aspect to the little menus beneath peoples' icons 163 $function['community:infobox:menu'][] = $CFG->dirroot . "mod/community/lib/communities_info_menu.php";164 152 $function['users:infobox:menu:text'][] = $CFG->dirroot . "mod/community/lib/user_info_menu_text.php"; 165 153 devel/mod/widget/manage_widgets.php
r1046 r1099 15 15 if (isloggedin()) { 16 16 17 global $profile_id, $page_owner; 18 17 19 // Define context 18 20 define("context","widget"); 21 $user_id = optional_param('owner',$page_owner,PARAM_INT); 22 $page_owner = $user_id; 23 19 24 $top_bit_template = <<<END 20 25 … … 29 34 30 35 <script type="text/javascript"> 31 var user_id = {$ _SESSION['userid']};36 var user_id = {$page_owner}; 32 37 var wwwroot = '$CFG->wwwroot'; 33 38 … … 259 264 $first_column_list = ''; 260 265 261 if ($widgets = widget_for_user($ _SESSION['userid'],'profile',0,0)) {266 if ($widgets = widget_for_user($page_owner,'profile',0,0)) { 262 267 foreach($widgets as $widget) { 263 268 $name = 'Unknown'; … … 279 284 $second_column_list = ''; 280 285 281 if ($widgets = widget_for_user($ _SESSION['userid'],'profile',0,1)) {286 if ($widgets = widget_for_user($page_owner,'profile',0,1)) { 282 287 foreach($widgets as $widget) { 283 288 $name = 'Unknown';
