Changeset 195
- Timestamp:
- 01/26/09 14:38:52 (10 months ago)
- Files:
-
- elgg/trunk/mod/blog/lib/weblogs_all_users_view.php (modified) (1 diff)
- elgg/trunk/mod/blog/lib/weblogs_assign_field.php (modified) (1 diff)
- elgg/trunk/mod/blog/lib/weblogs_user_info_menu.php (modified) (1 diff)
- elgg/trunk/mod/forum/forum.php (modified) (2 diffs)
- elgg/trunk/mod/forum/forum_user_info_menu.php (modified) (2 diffs)
- elgg/trunk/mod/forum/trunk/lib.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
elgg/trunk/mod/blog/lib/weblogs_all_users_view.php
r33 r195 66 66 $where1 = '(' . $where1 . ') AND owner != weblog'; 67 67 $run_result .= '<p>' . __gettext("Filtered: Showing community blog posts") . $removefilter . '</p>'; 68 break; 69 case "projects": 70 $where1 = '(' . $where1 . ') AND owner != weblog'; 71 $run_result .= '<p>' . __gettext("Filtered: Showing projects blog posts") . $removefilter . '</p>'; 68 72 break; 69 73 case "commented": elgg/trunk/mod/blog/lib/weblogs_assign_field.php
r33 r195 28 28 } 29 29 } 30 31 if ($projects = get_records_select('users', 'owner = ? AND user_type = ?', array ($USER->ident,'project'))) { 32 foreach ($projects as $project) { 33 $options[$project->ident] = __gettext("Project") . ": " . $project->name; 34 } 35 } 36 37 if ($projects = get_records_sql("SELECT u.* FROM " . $CFG->prefix . "friends f 38 JOIN " . $CFG->prefix . 'users u ON u.ident = f.friend 39 WHERE u.user_type = ? AND u.owner <> ? AND f.owner = ?', array ('project',$USER->ident,$USER->ident))) { 40 foreach ($projects as $project) { 41 $options[$project->ident] = __gettext("Project") . ": " . $project->name; 42 } 43 } 30 44 31 45 if ($selected == $USER->ident && count($options)>1) { elgg/trunk/mod/blog/lib/weblogs_user_info_menu.php
r33 r195 43 43 <li><a href="{$CFG->wwwroot}{$weblog_username}/weblog/">$communityWeblog</a> <a href="{$CFG->wwwroot}{$weblog_username}/weblog/rss"><img src="{$CFG->wwwroot}mod/template/icons/rss.png" alt="RSS" border="0" /></a></li> 44 44 END; 45 } else if (user_type($page_owner) == "project") { 46 $projectWeblog = __gettext("Project blog"); 47 $body .= <<< END 48 <li><a href="{$CFG->wwwroot}{$weblog_username}/weblog/">$projectWeblog</a> <a href="{$CFG->wwwroot}{$weblog_username}/weblog/rss"><img src="{$CFG->wwwroot}mod/template/icons/rss.png" alt="RSS" border="0" /></a></li> 49 END; 45 50 } 46 51 $blogArchive = __gettext("Weblog Archive"); elgg/trunk/mod/forum/forum.php
r194 r195 23 23 $weblog = user_info('username', $profile_id); 24 24 } 25 25 26 26 $page_owner = $profile_id; 27 27 28 28 define("context", "forum"); 29 29 30 if ((context == "forum") && run("users:type:get", $page_owner) == "community")30 if ((context == "forum") && ((run("users:type:get", $page_owner) == "community") || (run("users:type:get", $page_owner) == "project"))) 31 31 { 32 32 // Add to the submenu … … 56 56 57 57 58 if (!empty($profile_id) && $profile_id > 0 && user_info('user_type', $profile_id) == 'community') {58 if (!empty($profile_id) && $profile_id > 0 && ((user_info('user_type', $profile_id) == 'community') || (user_info('user_type', $profile_id) == 'project'))) { 59 59 60 60 // If the weblog offset hasn't been set, it's 0 elgg/trunk/mod/forum/forum_user_info_menu.php
r176 r195 43 43 END; 44 44 } else if (user_type($page_owner) == "community") { 45 46 47 48 45 $forum_flag = user_flag_get('forum', $profile_id); 49 46 //echo $forum_flag; … … 94 91 END; 95 92 93 } 94 }else if (user_type($page_owner) == "project") { 95 $forum_flag = user_flag_get('forum', $profile_id); 96 //echo $forum_flag; 97 //echo $forum_default; 98 99 if ((!$forum_flag) && ($forum_default == 0)) 100 { 101 $use_forum= "yes"; 102 } 103 else if ((!$forum_flag) && ($forum_default == 1)) 104 { 105 $use_forum= "no"; 106 } 107 else 108 { 109 $use_forum= $forum_flag; 110 } 111 112 if ($use_forum=="yes"){ 113 114 $projectWeblog = __gettext("Project Forum"); 115 $body .= <<< END 116 <li> 117 <a href="{$CFG->wwwroot}mod/forum/forum.php?weblog=$weblog_username">$projectWeblog</a> 118 <a href="{$CFG->wwwroot}{$weblog_username}/weblog/rss"> <img src="{$CFG->wwwroot}mod/template/icons/rss.png" alt="RSS" border="0" /></a></li> 119 END; 120 121 $blogArchive = __gettext("Archive"); 122 $membersWeblog = __gettext("Members blog"); 123 $body .= <<< END 124 <li><a href="{$CFG->wwwroot}{$weblog_username}/weblog/archive/">$blogArchive</a></li> 125 <li><a href="{$CFG->wwwroot}{$weblog_username}/weblog/friends/">$membersWeblog</a></li> 126 END; 127 } else { 128 129 $projectWeblog = __gettext("Project Blog"); 130 $body .= <<< END 131 <li> 132 <a href="{$CFG->wwwroot}{$weblog_username}/weblog">$projectWeblog</a> 133 (<a href="{$CFG->wwwroot}{$weblog_username}/weblog/rss"><img src="{$CFG->wwwroot}mod/template/icons/rss.png" alt="RSS" border="0" /></a>)</li> 134 END; 135 136 $blogArchive = __gettext("Archive"); 137 $membersWeblog = __gettext("Friends blog"); 138 $body .= <<< END 139 <li><a href="{$CFG->wwwroot}{$weblog_username}/weblog/archive/">$blogArchive</a></li> 140 <li><a href="{$CFG->wwwroot}{$weblog_username}/weblog/friends/">$membersWeblog</a></li> 141 END; 142 96 143 } 144 } 97 145 98 146 99 100 } 147 101 148 $run_result .= "<li id=\"sidebar_weblog\">"; 102 149 $run_result .= templates_draw(array( elgg/trunk/mod/forum/trunk/lib.php
r176 r195 7 7 global $CFG, $PAGE, $page_owner; 8 8 9 if (defined("context") && (context == "weblog") && run("users:type:get", page_owner()) == "community")9 if (defined("context") && (context == "weblog") && ((run("users:type:get", page_owner()) == "community")|| (run("users:type:get", page_owner()) == 'project'))) 10 10 { 11 11 // Add to the submenu

