<optiontype>boolean</optiontype>
<defaultvalue>1</defaultvalue>
</option>
- <option name="module_user_cover_photo">
- <categoryname>module.user</categoryname>
- <optiontype>boolean</optiontype>
- <defaultvalue>1</defaultvalue>
- </option>
<option name="module_like">
<categoryname>module.community</categoryname>
<optiontype>boolean</optiontype>
<option name="session_validate_user_agent" />
<option name="session_enable_virtualization" />
<option name="blacklist_hostnames" />
+ <option name="module_user_cover_photo" />
</delete>
</data>
{/capture}
{capture assign='contentHeader'}
- <header class="contentHeader userProfileUser{if MODULE_USER_COVER_PHOTO} userProfileUserWithCoverPhoto{/if}" data-object-id="{@$user->userID}"{if $isAccessible}
+ <header class="contentHeader userProfileUser userProfileUserWithCoverPhoto" data-object-id="{@$user->userID}"{if $isAccessible}
{if $__wcf->session->getPermission('admin.user.canBanUser')}
data-banned="{@$user->banned}"
{/if}
{if $__wcf->session->getPermission('admin.user.canDisableSignature')}
data-disable-signature="{@$user->disableSignature}"
{/if}
- {if MODULE_USER_COVER_PHOTO && $__wcf->session->getPermission('admin.user.canDisableCoverPhoto')}
+ {if $__wcf->session->getPermission('admin.user.canDisableCoverPhoto')}
data-disable-cover-photo="{@$user->disableCoverPhoto}"
{/if}
{if $__wcf->session->getPermission('admin.user.canEnableUser')}
data-is-disabled="{if $user->activationCode}true{else}false{/if}"
{/if}
{/if}>
- {if MODULE_USER_COVER_PHOTO}
- <div class="userProfileCoverPhoto" style="background-image: url({$user->getCoverPhoto()->getURL()})">
- {if ($user->userID == $__wcf->user->userID || $user->canEdit()) && ($__wcf->getSession()->getPermission('user.profile.coverPhoto.canUploadCoverPhoto') || $user->coverPhotoHash)}
- <div class="userProfileManageCoverPhoto dropdown jsOnly">
- <a href="#" class="button small dropdownToggle"><span class="icon icon16 fa-pencil"></span> {lang}wcf.user.coverPhoto.edit{/lang}</a>
- <ul class="dropdownMenu">
- {if $__wcf->getSession()->getPermission('user.profile.coverPhoto.canUploadCoverPhoto')}
- <li><a href="#" class="jsButtonUploadCoverPhoto jsStaticDialog" data-dialog-id="userProfileCoverPhotoUpload">{lang}wcf.user.coverPhoto.upload{/lang}</a></li>
- {/if}
- <li{if !$user->coverPhotoHash} style="display:none;"{/if}><a href="#" class="jsButtonDeleteCoverPhoto">{lang}wcf.user.coverPhoto.delete{/lang}</a></li>
- </ul>
- </div>
- {/if}
- </div>
- {/if}
+ <div class="userProfileCoverPhoto" style="background-image: url({$user->getCoverPhoto()->getURL()})">
+ {if ($user->userID == $__wcf->user->userID || $user->canEdit()) && ($__wcf->getSession()->getPermission('user.profile.coverPhoto.canUploadCoverPhoto') || $user->coverPhotoHash)}
+ <div class="userProfileManageCoverPhoto dropdown jsOnly">
+ <a href="#" class="button small dropdownToggle"><span class="icon icon16 fa-pencil"></span> {lang}wcf.user.coverPhoto.edit{/lang}</a>
+ <ul class="dropdownMenu">
+ {if $__wcf->getSession()->getPermission('user.profile.coverPhoto.canUploadCoverPhoto')}
+ <li><a href="#" class="jsButtonUploadCoverPhoto jsStaticDialog" data-dialog-id="userProfileCoverPhotoUpload">{lang}wcf.user.coverPhoto.upload{/lang}</a></li>
+ {/if}
+ <li{if !$user->coverPhotoHash} style="display:none;"{/if}><a href="#" class="jsButtonDeleteCoverPhoto">{lang}wcf.user.coverPhoto.delete{/lang}</a></li>
+ </ul>
+ </div>
+ {/if}
+ </div>
<div class="contentHeaderIcon">
{if $user->userID == $__wcf->user->userID}
<a href="{link controller='AvatarEdit'}{/link}" class="jsTooltip" title="{lang}wcf.user.avatar.edit{/lang}">{@$user->getAvatar()->getImageTag(128)}</a>
{if $__wcf->session->getPermission('admin.user.canBanUser')}<li><a href="#" class="jsButtonUserBan">{lang}wcf.user.{if $user->banned}un{/if}ban{/lang}</a></li>{/if}
{if $__wcf->session->getPermission('admin.user.canDisableAvatar')}<li><a href="#" class="jsButtonUserDisableAvatar">{lang}wcf.user.{if $user->disableAvatar}enable{else}disable{/if}Avatar{/lang}</a></li>{/if}
{if $__wcf->session->getPermission('admin.user.canDisableSignature')}<li><a href="#" class="jsButtonUserDisableSignature">{lang}wcf.user.{if $user->disableSignature}enable{else}disable{/if}Signature{/lang}</a></li>{/if}
- {if MODULE_USER_COVER_PHOTO && $__wcf->session->getPermission('admin.user.canDisableCoverPhoto')}<li><a href="#" class="jsButtonUserDisableCoverPhoto">{lang}wcf.user.{if $user->disableCoverPhoto}enable{else}disable{/if}CoverPhoto{/lang}</a></li>{/if}
+ {if $__wcf->session->getPermission('admin.user.canDisableCoverPhoto')}<li><a href="#" class="jsButtonUserDisableCoverPhoto">{lang}wcf.user.{if $user->disableCoverPhoto}enable{else}disable{/if}CoverPhoto{/lang}</a></li>{/if}
{if $__wcf->session->getPermission('admin.user.canEnableUser')}<li><a href="#" class="jsButtonUserEnable">{lang}wcf.acp.user.{if $user->pendingActivation()}enable{else}disable{/if}{/lang}</a></li>{/if}
{if $__wcf->session->getPermission('admin.general.canUseAcp') && $__wcf->session->getPermission('admin.user.canEditUser')}<li><a href="{link controller='UserEdit' object=$user isACP=true}{/link}" class="jsUserInlineEditor">{lang}wcf.user.edit{/lang}</a></li>{/if}
<p class="info" role="status">{lang}wcf.user.profile.protected{/lang}</p>
{/if}
-{if MODULE_USER_COVER_PHOTO && ($user->userID == $__wcf->user->userID || $user->canEdit())}
+{if $user->userID == $__wcf->user->userID || $user->canEdit()}
{if $__wcf->getSession()->getPermission('user.profile.coverPhoto.canUploadCoverPhoto')}
<div id="userProfileCoverPhotoUpload" class="jsStaticDialogContent" data-title="{lang}wcf.user.coverPhoto.upload{/lang}">
{if $__wcf->user->disableCoverPhoto}
\define('FORCE_LOGIN', 0);
\define('DESKTOP_NOTIFICATION_PACKAGE_ID', 1);
\define('PAGE_LOGO_LINK_TO_APP_DEFAULT', 1);
-\define('MODULE_USER_COVER_PHOTO', 1);
\define('IMAGE_ALLOW_EXTERNAL_SOURCE', 0);
\define('MESSAGE_ENABLE_TOC', 1);
\define('MESSAGE_SIDEBAR_ENABLE_ARTICLES', 1);
*/
public function validateUploadCoverPhoto()
{
- if (!MODULE_USER_COVER_PHOTO) {
- throw new PermissionDeniedException();
- }
-
WCF::getSession()->checkPermissions(['user.profile.coverPhoto.canUploadCoverPhoto']);
$this->readInteger('userID', true);
*/
public function validateDeleteCoverPhoto()
{
- if (!MODULE_USER_COVER_PHOTO) {
- throw new PermissionDeniedException();
- }
-
$this->readInteger('userID', true);
// The `userID` parameter did not exist in 3.1, defaulting to the own user for backwards compatibility.
if (!$this->parameters['userID']) {
// https://github.com/WoltLab/WCF/issues/3909
\define('BLACKLIST_HOSTNAMES', '');
+ // Cover photos are always enabled since 5.4.
+ // https://github.com/WoltLab/WCF/issues/3902
+ \define('MODULE_USER_COVER_PHOTO', 1);
+
$filename = WCF_DIR . 'options.inc.php';
// create options file if doesn't exist
<item name="wcf.acp.option.desktop_notification_package_id.description"><![CDATA[Desktop-Benachrichtigungen werden nur für die ausgewählte App aktiviert, einschließlich aller anderen Apps die auf der identischen Domain laufen.]]></item>
<item name="wcf.acp.option.page_logo_link_to_app_default"><![CDATA[Seitenlogo verlinkt auf die Startseite der aktiven App]]></item>
<item name="wcf.acp.option.page_logo_link_to_app_default.description"><![CDATA[Deaktiviere{if !LANGUAGE_USE_INFORMAL_VARIANT}n Sie{/if} diese Option, damit das Logo stets auf die globale Startseite verlinkt. Die Deaktivierung entspricht dem Verhalten in früheren Versionen.]]></item>
- <item name="wcf.acp.option.module_user_cover_photo"><![CDATA[Titelbilder aktivieren]]></item>
- <item name="wcf.acp.option.module_user_cover_photo.description"><![CDATA[Aktiviert die Darstellung und die Verwaltung von Titelbildern.]]></item>
<item name="wcf.acp.option.image_allow_external_source"><![CDATA[Bilder von externen Seiten erlauben]]></item>
<item name="wcf.acp.option.image_external_source_whitelist"><![CDATA[Erlaubte Bilder von externen Seiten]]></item>
<item name="wcf.acp.option.image_external_source_whitelist.description"><![CDATA[Die aufgeführten Domains sind von der Blockade ausgenommen. Der Abgleich erfolgt auf Basis der strikten Übereinstimmung, optional können Subdomains mit einem Platzhalter berücksichtigt werden: <kbd>*.example.com</kbd> umfasst sowohl <kbd>example.com</kbd> als auch Subdomains wie <kbd>foo.example.com</kbd> oder <kbd>www.example.com</kbd>.<br>Bitte nur eine Domain pro Zeile eingeben.]]></item>
<item name="wcf.acp.option.desktop_notification_package_id.description"><![CDATA[Desktop Notifications will be enabled for the selected app only, including all other apps that use the exact same domain.]]></item>
<item name="wcf.acp.option.page_logo_link_to_app_default"><![CDATA[Page logo links to the start page of the active app]]></item>
<item name="wcf.acp.option.page_logo_link_to_app_default.description"><![CDATA[Disabling this option will cause the link to always point to the global landing page instead. This option enforces the behavior known from previous versions when disabled.]]></item>
- <item name="wcf.acp.option.module_user_cover_photo"><![CDATA[Enable user cover photos]]></item>
- <item name="wcf.acp.option.module_user_cover_photo.description"><![CDATA[Enables the display and upload of user profile cover photos.]]></item>
<item name="wcf.acp.option.image_allow_external_source"><![CDATA[Allow images from external sites]]></item>
<item name="wcf.acp.option.image_external_source_whitelist"><![CDATA[Allowed images from external sites]]></item>
<item name="wcf.acp.option.image_external_source_whitelist.description"><![CDATA[The listed domains will be exempt from blocking. Hostnames are exact matches only, a leading wildcard can be used to exclude an entire domain: <kbd>*.example.com</kbd> matches <kbd>example.com</kbd> and subdomains such as <kbd>foo.example.com</kbd> or <kbd>www.example.com</kbd>.<br>Enter one domain per line only.]]></item>