Changeset 193
- Timestamp:
- 01/23/09 21:56:15 (10 months ago)
- Files:
-
- elgg/trunk/lib/templates.php (modified) (3 diffs)
- elgg/trunk/mod/template/lib/default_template.php (modified) (2 diffs)
- elgg/trunk/mod/toolbar/css (modified) (1 diff)
- elgg/trunk/mod/toolbar/lib.php (modified) (1 diff)
- elgg/trunk/mod/toolbar/toolbar.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
elgg/trunk/lib/templates.php
r129 r193 80 80 global $PAGE; 81 81 global $CFG; 82 global $USER; 82 83 83 84 if (!empty($PAGE->setupdone)) { … … 103 104 'html' => "<li><a href=\"" . $CFG->wwwroot . "_userdetails/\">" . __gettext("Settings") . "</a></li>"); 104 105 105 $PAGE->menu_top[] = array(106 'name' => 'logoff',107 //'html' => a_href("{$CFG->wwwroot}login/logout.php",108 // "Log off"));109 'html' => "<li><a href=\"" . $CFG->wwwroot . "login/logout.php\">" . __gettext("Log off") . "</a></li>");110 111 106 $PAGE->login[] = array( 112 107 'name' => 'logoff', 113 108 'html' => "<li><a href=\"" . $CFG->wwwroot . "login/logout.php\">" . __gettext("Log off") . "</a></li>"); 109 110 $PAGE->myprofile[] = array( 111 'name' => 'myprofilelink', 112 'html' => "<a href=\"".$CFG->wwwroot . $USER->username . "/profile\">" . __gettext("My Profile") . "</a>"); 114 113 } else { 115 114 $PAGE->login[] = array( 116 115 'name' => 'login', 117 116 'html' => "<li><a href=\"" . $CFG->wwwroot . "login/index.php\">" . __gettext("Log in") . "</a></li>"); 117 118 $PAGE->myprofile[] = array( 119 'name' => 'myprofilelink', 120 'html' => ""); 118 121 } 119 122 … … 928 931 break; 929 932 933 case 'myprofile': 934 $result = templates_draw(array( 935 'myprofileitems' => menu_join('', $PAGE->myprofile), 936 'context' => 'myprofile' 937 )); 938 break; 939 930 940 case "url": 931 941 $result = url; elgg/trunk/mod/template/lib/default_template.php
r130 r193 26 26 '{{topmenu}}' => __gettext("Status menu"), 27 27 '{{login}}' => __gettext("Login/Logout links"), 28 '{{myprofile}}' => __gettext("My Profile links"), 28 29 '{{mainbody}}' => __gettext("Main body"), 29 30 '{{sidebar}}' => __gettext("Sidebar") … … 235 236 236 237 $template_definition[] = array( 238 'id' => 'myprofile', 239 'name' => __gettext("My Profile Link"), 240 'description' => __gettext("It displays a my profile link on the top black menu bar when the user is logged in."), 241 'glossary' => array( 242 '{{myprofileitems}}' => __gettext("The my profile link") 243 ) 244 ); 245 246 $template_definition[] = array( 237 247 'id' => 'login', 238 248 'name' => __gettext("Login/logout links shell"), 239 249 'description' => __gettext("It displays a login/logout link on the top black bar if the user is logged in."), 240 'glossary' => array( 241 '{{loginitems}}' => __gettext("The login/logout link items") 242 ) 243 ); 250 'glossary' => __gettext("The login/logout link items") 251 252 ); 253 254 $template['myprofile'] = <<< END 255 <li class="rb">{{myprofileitems}}</li> 256 END; 244 257 245 258 $template['login'] = <<< END elgg/trunk/mod/toolbar/css
r130 r193 2 2 #login_links { 3 3 float:right; 4 } 5 #login_links li { 6 border-right:0px; 4 7 } 5 8 #login_links a { elgg/trunk/mod/toolbar/lib.php
r130 r193 35 35 $toolbar = str_replace("{{topmenu}}", templates_variables_substitute(array(array(),"topmenu")), $toolbar); 36 36 $toolbar = str_replace("{{login}}", templates_variables_substitute(array(array(),"login")), $toolbar); 37 $toolbar = str_replace("{{myprofile}}", templates_variables_substitute(array(array(),"myprofile")), $toolbar); 37 38 if (isloggedin()) { 38 39 $toolbar = str_replace("{{usericon}}", "<a href=\"{$CFG->wwwroot}{$_SESSION['username']}\">" . user_icon_html($_SESSION['userid'], 50) . "</a>", $toolbar); elgg/trunk/mod/toolbar/toolbar.inc
r130 r193 5 5 <div id="topnav"> 6 6 <ul> 7 <li class="rb"><a href="/ projects">Projects</a></li>8 <li class="rb"><a href="/social">Social</a></li> 7 <li class="rb"><a href="/social">Home</a></li> 8 {{myprofile}} 9 9 <li class="rb"><a href="/social/mod/marketplace">Marketplace</a></li> 10 10 <li><a href="/request">Request a Project</a></li>

