diff --git a/ground/controllers/PageController.php b/ground/controllers/PageController.php index 9bb0a62..5539d8f 100644 --- a/ground/controllers/PageController.php +++ b/ground/controllers/PageController.php @@ -120,6 +120,18 @@ class PageController extends Controller $point->inFavorites = Favorite::model()->checkIsMy($pointId); $point->iLike = Like::model()->checkIsMy($pointId); + + $photoLinks = PhotoLinks::model()->getAll(array('where'=>'`photo` LIKE "'.$pointId.'_%"')); + $photoLinksRes = array(); + if ($photoLinks) { + foreach ($photoLinks as $photoLink) { + if ($photoLink->host) { + $photoLinksRes[strtolower($photoLink->host)] = 1; + } + } + } + $photoLinksRes = implode('; ', array_keys($photoLinksRes)); + $similarPoints = Point::model()->getAll(array('where' => 'categoryId = '.$point->categoryId.' AND `id` <> '.$point->id.' ORDER BY RAND() LIMIT 6;')); $closestPoints = Point::model()->getClosestPoints($pointId); $randomPoint = Point::model()->getRandom(); @@ -138,6 +150,7 @@ class PageController extends Controller 'countLikes' => Like::model()->countLikes($pointId), 'og' => Helper::buildOG($point), 'user' => App::$user, + 'photoLinks' => $photoLinksRes, )); } else { diff --git a/ground/views/point.php b/ground/views/point.php index e7c61c1..469a238 100644 --- a/ground/views/point.php +++ b/ground/views/point.php @@ -45,7 +45,7 @@ - + @@ -63,6 +63,10 @@ } } ?> + + + Использованы фотоматериалы с сайтов: +

diff --git a/public/css/style.css b/public/css/style.css index f23b522..48c06a9 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -23,7 +23,6 @@ div.header img {height: 89px;} div.add {cursor: pointer;} .fotorama {display: inline-block;} -.fotorama .fotorama__caption{text-align: left; font-size: 9px; opacity: 0.7;} #addPointModal .extraImage .button {cursor: pointer; background-color: #eeeeee;} #addPointModal .extraImage .remove:hover {background-color: #f4bfbf;}