can_see_ads(current_user())) { $ad = Advertisement::random($ad_type); if ($ad) { return $this->contentTag("div", $this->linkTo( $this->imageTag( $ad->image_url, ['alt' => "Advertisement", 'width' => $ad->width, 'height' => $ad->height] ), $this->redirectAdvertisementPath($ad), ['target' => '_blank'] ), ['style' => "margin-bottom: 1em;"] ); } } } }