Only display PM/Search/Memberlist links if enabled

git-svn-id: file:///svn/phpbb/trunk@3847 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2003-04-15 23:41:43 +00:00
parent 1f80001ea8
commit d3b302841c
2 changed files with 6 additions and 3 deletions

View file

@ -285,6 +285,9 @@ $template->assign_vars(array(
'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'], 'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'],
'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], $user->lang[$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang[$tz], ''), 'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], $user->lang[$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang[$tz], ''),
'S_DISPLAY_ONLINE_LIST' => (!empty($config['load_online'])) ? 1 : 0, 'S_DISPLAY_ONLINE_LIST' => (!empty($config['load_online'])) ? 1 : 0,
'S_DISPLAY_SEARCH' => (!empty($config['load_search'])) ? 1 : 0,
'S_DISPLAY_PM' => (empty($config['privmsg_disable'])) ? 1 : 0,
'S_DISPLAY_MEMBERLIST' => (isset($auth)) ? $auth->acl_get('u_viewprofile') : 0,
'T_STYLESHEET_DATA' => $user->theme['css_data'], 'T_STYLESHEET_DATA' => $user->theme['css_data'],
'T_STYLESHEET_LINK' => 'templates/' . $user->theme['css_external'], 'T_STYLESHEET_LINK' => 'templates/' . $user->theme['css_external'],

View file

@ -17,7 +17,7 @@
<!-- IF S_USER_PM_POPUP --> <!-- IF S_USER_PM_POPUP -->
if ( {PRIVATE_MESSAGE_NEW_FLAG} ) if ( {PRIVATE_MESSAGE_NEW_FLAG} )
{ {
window.open('{U_PRIVATEMSGS}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');; window.open('{U_PRIVATEMSGS}', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');
} }
<!-- ENDIF --> <!-- ENDIF -->
function im_popup(url, width, height) function im_popup(url, width, height)
@ -47,9 +47,9 @@ function im_popup(url, width, height)
<td colspan="2"><img src="images/spacer.gif" height="5" alt="" /></td> <td colspan="2"><img src="images/spacer.gif" height="5" alt="" /></td>
</tr> </tr>
<tr> <tr>
<td height="25" valign="middle" nowrap="nowrap"><span class="mainmenu"><a href="{U_LOGIN_LOGOUT}"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a>&nbsp;<!-- IF S_USER_LOGGED_IN --> &nbsp;<a href="{U_PRIVATEMSGS}"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a><!-- ELSE --> &nbsp;<a href="{U_REGISTER}"><img src="templates/subSilver/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a><!-- ENDIF --></span></td> <td height="25" valign="middle" nowrap="nowrap"><span class="mainmenu"><a href="{U_LOGIN_LOGOUT}"><img src="templates/subSilver/images/icon_mini_login.gif" width="12" height="13" border="0" alt="{L_LOGIN_LOGOUT}" hspace="3" />{L_LOGIN_LOGOUT}</a>&nbsp;<!-- IF S_USER_LOGGED_IN --><!-- IF S_DISPLAY_PM --> &nbsp;<a href="{U_PRIVATEMSGS}"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{PRIVATE_MESSAGE_INFO}" hspace="3" />{PRIVATE_MESSAGE_INFO}</a><!-- ENDIF --><!-- ELSE --> &nbsp;<a href="{U_REGISTER}"><img src="templates/subSilver/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a><!-- ENDIF --></span></td>
<td height="25" align="right" valign="middle" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a>&nbsp; &nbsp;<a href="{U_SEARCH}"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a><!-- IF S_USER_LOGGED_IN -->&nbsp; &nbsp;<a href="{U_PROFILE}"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a><!-- ENDIF --></span></td> <td height="25" align="right" valign="middle" nowrap="nowrap"><span class="mainmenu">&nbsp;<a href="{U_FAQ}"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a><!-- IF S_DISPLAY_SEARCH -->&nbsp; &nbsp;<a href="{U_SEARCH}"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a><!-- ENDIF -->&nbsp; &nbsp;<!-- IF S_DISPLAY_MEMBERLIST --><a href="{U_MEMBERLIST}"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a><!-- ENDIF -->&nbsp; &nbsp;<a href="{U_GROUP_CP}"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a><!-- IF S_USER_LOGGED_IN -->&nbsp; &nbsp;<a href="{U_PROFILE}"><img src="templates/subSilver/images/icon_mini_profile.gif" width="12" height="13" border="0" alt="{L_PROFILE}" hspace="3" />{L_PROFILE}</a><!-- ENDIF --></span></td>
</tr> </tr>
<tr> <tr>
<td><img src="images/spacer.gif" height="8" alt="" /></td> <td><img src="images/spacer.gif" height="8" alt="" /></td>