mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#2365 ad share not showing image and title
This commit is contained in:
parent
712f7636f4
commit
86261755ec
@ -506,7 +506,14 @@ class AdvsController extends PublicController
|
||||
$coverPhoto = \Illuminate\Support\Facades\Request::root() . '/' . $adv->cover_photo;
|
||||
}
|
||||
}
|
||||
$this->template->set('meta_image', $coverPhoto);
|
||||
$coverPhotoInfo = pathinfo($coverPhoto);
|
||||
if (substr($coverPhotoInfo['basename'], 0, 3) === "tn-") {
|
||||
$ogImage = substr(basename($coverPhotoInfo['basename']), 3);
|
||||
$ogImage = $coverPhotoInfo['dirname'] . "/$ogImage";
|
||||
} else {
|
||||
$ogImage = $coverPhoto;
|
||||
}
|
||||
$this->template->set('meta_image', $ogImage);
|
||||
|
||||
if ($adv->created_by_id == isset(auth()->user()->id) or $adv->status == "approved") {
|
||||
return $this->view->make('visiosoft.module.advs::ad-detail/detail', compact('adv', 'complaints',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user