{foreach from=$objects item='article'}
<article class="contentItem">
<a href="{$article->getLink()}" class="contentItemLink">
- <div class="contentItemImage" style="background-image: url({if $article->getImage()}{$article->getImage()->getThumbnailLink('medium')}{else}https://thunderstrike/w/22/images/coverPhotos/default.jpg{/if})">
+ <div class="contentItemImage" style="background-image: url({if $article->getImage()}{$article->getImage()->getThumbnailLink('medium')}{else}{$__wcf->getStyleHandler()->getStyle()->getCoverPhotoURL()}{/if})">
{hascontent}
<div class="contentItemBadges">
{content}
* Returns the cover photo filename.
*
* @return string
+ * @since 3.1
*/
public function getCoverPhoto() {
if ($this->coverPhotoExtension) {
return 'default.jpg';
}
+ /**
+ * @return string
+ * @since 5.2
+ */
+ public function getCoverPhotoLocation() {
+ return WCF_DIR . 'images/coverPhotos/' . $this->getCoverPhoto();
+ }
+
+ /**
+ * @return string
+ * @since 5.2
+ */
+ public function getCoverPhotoUrl() {
+ return WCF::getPath() . 'images/coverPhotos/' . $this->getCoverPhoto();
+ }
+
/**
* Returns the path to a favicon-related file.
*
<?php
namespace wcf\data\user\cover\photo;
use wcf\system\style\StyleHandler;
-use wcf\system\WCF;
/**
* Represents a default cover photo.
* @inheritDoc
*/
public function getLocation() {
- return WCF_DIR . 'images/coverPhotos/' . $this->getFilename();
+ return StyleHandler::getInstance()->getStyle()->getCoverPhotoLocation();
}
/**
* @inheritDoc
*/
public function getURL() {
- return WCF::getPath() . 'images/coverPhotos/' . $this->getFilename();
+ return StyleHandler::getInstance()->getStyle()->getCoverPhotoUrl();
}
/**