Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Feb 13, 2025
1 parent 79056bf commit 1a619b9
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 17 deletions.
5 changes: 3 additions & 2 deletions objects/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -2589,10 +2589,10 @@ public static function canNotUploadReason($doNotCheckPlugins = false)
return $reason;
}


public static function canUpload($doNotCheckPlugins = false)
{
global $global, $config, $advancedCustomUser;
global $global, $config, $advancedCustomUser, $canUploadMessage;
$canUploadMessage = '';
if (Permissions::canModerateVideos()) {
return true;
}
Expand All @@ -2604,6 +2604,7 @@ public static function canUpload($doNotCheckPlugins = false)
}

if ((isset($advancedCustomUser->onlyVerifiedEmailCanUpload) && $advancedCustomUser->onlyVerifiedEmailCanUpload && !User::isVerified())) {
$canUploadMessage = 'Only users with verified email addresses can upload videos';
return false;
}

Expand Down
18 changes: 9 additions & 9 deletions view/include/navbarRightProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
if (User::isLogged()) {
?>
<button type="button" class="btn btn-default dropdown-toggle navbar-btn pull-left btn-circle" id="rightProfileButton" style="padding:0;" onclick="toogleRightProfile();">
<img src="<?php echo User::getPhoto(); ?>"
style="width: 32px; height: 32px; max-width: 32px;"
<img src="<?php echo User::getPhoto(); ?>"
style="width: 32px; height: 32px; max-width: 32px;"
class="img img-responsive img-circle" alt="User Photo"
/>
</button>
Expand Down Expand Up @@ -62,16 +62,16 @@ function toogleRightProfile() {
$userCookie = User::getUserCookieCredentials();
if ((!empty($userCookie))) {
?>
<i class="fas fa-lock text-muted" style="opacity: 0.2;"></i>
<i class="fas fa-lock text-muted" style="opacity: 0.2;"></i>
<?php
} else {
?>
<i class="fas fa-lock-open text-muted" style="opacity: 0.2;"></i>
<i class="fas fa-lock-open text-muted" style="opacity: 0.2;"></i>
<?php }
?>
<i class="fas fa-sign-out-alt"></i> <?php echo __("Sign out"); ?>
</a>
</li>
</li>
<?php }
?>

Expand All @@ -88,7 +88,7 @@ function toogleRightProfile() {
<li>
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL + 'mvideos');
return false;">
<i class="fa-solid fa-film"></i>
<i class="fa-solid fa-film"></i>
<i class="fa-solid fa-headphones"></i>
<?php echo __("My videos"); ?>
</a>
Expand All @@ -101,7 +101,7 @@ function toogleRightProfile() {
<span class="fas fa-play-circle"></span>
<?php echo __($advancedCustomUser->MyChannelLabel); ?>
</a>
</li>
</li>
<?php
print AVideoPlugin::navBarProfileButtons();

Expand Down Expand Up @@ -152,7 +152,7 @@ function toogleRightProfile() {
<?php
} else if (empty($advancedCustomUser->signInOnRight)) {
?>
<a class="btn btn-default navbar-btn line_<?php echo __LINE__; ?>" href="<?php echo $global['webSiteRootURL']; ?>user"
<a class="btn btn-default navbar-btn line_<?php echo __LINE__; ?>" href="<?php echo $global['webSiteRootURL']; ?>user"
id="rightLoginButton" style="min-height:34px; padding: 6px 12px; border-width: 1px;"
data-html="true" title="<?php echo __("Login"); ?>" data-placement="left">
<i class="fas fa-sign-in-alt"></i>
Expand All @@ -165,4 +165,4 @@ function toogleRightProfile() {
</ul>
</div>
<?php }
?>
?>
27 changes: 21 additions & 6 deletions view/include/navbarSidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,22 @@
</a>
</div>
</li>
<?php }
<?php
}else{
global $canUploadMessage;
?>
<li>
<div>
<a href="#" class="btn btn-default btn-block disabled" style="border-radius: 0;">
<i class="fa-solid fa-cross"></i>
<span class="menuLabel">
<?php echo __($canUploadMessage); ?>
</span>
</a>
</div>
</li>
<?php
}
?>
<li>

Expand Down Expand Up @@ -416,7 +431,7 @@
$menus[] = '?>
<li>
<a href="#" class="clearCacheButton">
<i class="fa fa-trash"></i>
<i class="fa fa-trash"></i>
<span class="menuLabel">
<?php echo __("Clear Cache Directory"); ?>
</span>
Expand All @@ -429,7 +444,7 @@
$menus[] = ' ?>
<li>
<a href="#" onclick="avideoModalIframeFull(webSiteRootURL+\'i/log\');return false;" class="">
<i class="fas fa-clipboard-list"></i>
<i class="fas fa-clipboard-list"></i>
<span class="menuLabel">
<?php echo __("Log file"); ?>
</span>
Expand All @@ -442,7 +457,7 @@
$menus[] = '?>
<li>
<a href="#" class="generateSiteMapButton">
<i class="fa fa-sitemap"></i>
<i class="fa fa-sitemap"></i>
<span class="menuLabel">
<?php echo __("Generate Sitemap"); ?>
</span>
Expand Down Expand Up @@ -589,7 +604,7 @@
//$parsed_cats[] = $value['id'];
echo '<li class="navsub-toggle ' . ($value['clean_name'] == @$_REQUEST['catName'] ? "active" : "") . '">'
. '<a href="' . Category::getCategoryLinkFromName($value['clean_name']) . '" >';
echo '<span class="' . (empty($value['iconClass']) ? "fa fa-folder" : $value['iconClass']) . '"></span>
echo '<span class="' . (empty($value['iconClass']) ? "fa fa-folder" : $value['iconClass']) . '"></span>
<span class="menuLabel">' . __($value['name']) . '</span>';
if (empty($advancedCustom->hideCategoryVideosCount)) {
echo ' <span class="badge hideIfCompressed">' . $total . '</span>';
Expand Down Expand Up @@ -740,4 +755,4 @@
});
});
});
</script>
</script>

0 comments on commit 1a619b9

Please sign in to comment.