Compare commits

...

5 commits

7 changed files with 41 additions and 1101 deletions

View file

@ -323,6 +323,13 @@ function template_info_center()
if (empty($context['info_center'])) if (empty($context['info_center']))
return; return;
// Do not display the info center if the user is not a moderator or an admin.
if (
! $context['user']['is_admin'] &&
! $context['user']['is_mod']
)
return;
// Here's where the "Info Center" starts... // Here's where the "Info Center" starts...
echo ' echo '
<div class="roundframe" id="info_center"> <div class="roundframe" id="info_center">

View file

@ -43,6 +43,10 @@ function template_main()
// Display each of the column headers of the table. // Display each of the column headers of the table.
foreach ($context['columns'] as $key => $column) foreach ($context['columns'] as $key => $column)
{ {
// Do not display the messages count column
if ( $key == 'post_count' )
continue;
// @TODO maybe find something nicer? // @TODO maybe find something nicer?
if ($key == 'email_address' && !$context['can_send_email']) if ($key == 'email_address' && !$context['can_send_email'])
continue; continue;
@ -92,22 +96,6 @@ function template_main()
<td class="id_group centertext">', empty($member['group']) ? $member['post_group'] : $member['group'], '</td> <td class="id_group centertext">', empty($member['group']) ? $member['post_group'] : $member['group'], '</td>
<td class="registered centertext">', $member['registered_date'], '</td>'; <td class="registered centertext">', $member['registered_date'], '</td>';
if (!isset($context['disabled_fields']['posts']))
{
echo '
<td class="post_count centertext">';
if (!empty($member['posts']))
echo '
<div class="generic_bar">
<div class="bar" style="width: ', $member['post_percent'], '%;"></div>
<span>', $member['posts'], '</span>
</div>';
echo '
</td>';
}
// Show custom fields marked to be shown here // Show custom fields marked to be shown here
if (!empty($context['custom_profile_fields']['columns'])) if (!empty($context['custom_profile_fields']['columns']))
foreach ($context['custom_profile_fields']['columns'] as $key => $column) foreach ($context['custom_profile_fields']['columns'] as $key => $column)

View file

@ -17,6 +17,16 @@ function template_main()
{ {
global $context, $settings, $txt, $scripturl, $modSettings; global $context, $settings, $txt, $scripturl, $modSettings;
// Only admins and moderators are allowed to see the forum statistics.
if (
! $context['user']['is_admin'] &&
! $context['user']['is_mod']
) {
echo '
<p><strong>Vous nêtes pas autorisé à accéder aux statistiques du forum.</strong></p>';
return;
}
echo ' echo '
<div id="statistics" class="main_section"> <div id="statistics" class="main_section">
<div class="cat_bar"> <div class="cat_bar">

View file

@ -17,6 +17,16 @@ function template_main()
{ {
global $context, $settings, $scripturl, $txt; global $context, $settings, $scripturl, $txt;
// Only admins and moderators are allowed to see the list of online members.
if (
! $context['user']['is_admin'] &&
! $context['user']['is_mod']
) {
echo '
<p><strong>Vous nêtes pas autorisé à accéder à la liste des membres actuellement en ligne.</strong></p>';
return;
}
// Display the table header and linktree. // Display the table header and linktree.
echo ' echo '
<div class="main_section" id="whos_online"> <div class="main_section" id="whos_online">

View file

@ -47,6 +47,15 @@ h2 {
font-size: 1em; font-size: 1em;
font-weight: inherit; font-weight: inherit;
} }
/* "h2.catbg" = category title */
h2.catbg {
font-size: 1.3rem;
}
h2.catbg,
h2.catbg a,
h2.catbg a:hover {
color: var(--neutral-light-color);
}
h3 { h3 {
font-family: var(--font-emphasis); font-family: var(--font-emphasis);
font-size: 1em; font-size: 1em;
@ -1698,7 +1707,7 @@ font-size: large;
position: absolute; position: absolute;
top: 100%; top: 100%;
right: -1px; right: -1px;
z-index: 90; z-index: 110;
padding: 6px; padding: 6px;
background: var(--neutral-light-color); background: var(--neutral-light-color);
font-weight: normal; font-weight: normal;
@ -4129,19 +4138,7 @@ div.cat_bar {
color: var(--neutral-light-color); color: var(--neutral-light-color);
font-weight: 600; font-weight: 600;
} }
h2.catbg {
font-size: 1.1em;
}
h2.catbg, h2.catbg a, h2.catbg a:hover {
color: var(--neutral-light-color);
}
h2.catbg a:hover {
text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.4);
}
h2.catbg .main_icons::before, h2.catbg .icon {
margin: 0 5px 0 0;
}
.cat_bar + .windowbg, .cat_bar + .roundframe { .cat_bar + .windowbg, .cat_bar + .roundframe {
margin-top: -1px; margin-top: -1px;
border-top-left-radius: 0; border-top-left-radius: 0;

File diff suppressed because it is too large Load diff

View file

@ -1,60 +0,0 @@
$(function() {
$('ul.dropmenu, ul.quickbuttons').superfish({delay : 250, speed: 100, sensitivity : 8, interval : 50, timeout : 1});
// tooltips
$('.preview').SMFtooltip();
// find all nested linked images and turn off the border
$('a.bbc_link img.bbc_img').parent().css('border', '0');
});
// The purpose of this code is to fix the height of overflow: auto blocks, because some browsers can't figure it out for themselves.
function smf_codeBoxFix()
{
var codeFix = $('code');
$.each(codeFix, function(index, tag)
{
if (is_webkit && $(tag).height() < 20)
$(tag).css({height: ($(tag).height() + 20) + 'px'});
else if (is_ff && ($(tag)[0].scrollWidth > $(tag).innerWidth() || $(tag).innerWidth() == 0))
$(tag).css({overflow: 'scroll'});
// Holy conditional, Batman!
else if (
'currentStyle' in $(tag) && $(tag)[0].currentStyle.overflow == 'auto'
&& ($(tag).innerHeight() == '' || $(tag).innerHeight() == 'auto')
&& ($(tag)[0].scrollWidth > $(tag).innerWidth() || $(tag).innerWidth == 0)
&& ($(tag).outerHeight() != 0)
)
$(tag).css({height: ($(tag).height + 24) + 'px'});
});
}
// Add a fix for code stuff?
if (is_ie || is_webkit || is_ff)
addLoadEvent(smf_codeBoxFix);
// Toggles the element height and width styles of an image.
function smc_toggleImageDimensions()
{
$('.postarea .bbc_img.resized').each(function(index, item)
{
$(item).click(function(e)
{
$(item).toggleClass('original_size');
});
});
}
// Add a load event for the function above.
addLoadEvent(smc_toggleImageDimensions);
function smf_addButton(stripId, image, options)
{
$('#' + stripId).append(
'<a href="' + options.sUrl + '" class="button last" ' + ('sCustom' in options ? options.sCustom : '') + ' ' + ('sId' in options ? ' id="' + options.sId + '_text"' : '') + '>'
+ options.sText +
'</a>'
);
}