From ec8ffbd82a1548b50cf3150ce385124f0ef60790 Mon Sep 17 00:00:00 2001 From: Krivchikov Dmitry Date: Sun, 31 May 2015 15:55:06 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=20=D0=BE=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=81=D0=B0=D0=B9=D1=82=D0=BE=D0=B2?= =?UTF-8?q?-=D0=B8=D1=81=D1=82=D0=BE=D1=87=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2?= =?UTF-8?q?=20=D0=B8=D0=B7=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ground/controllers/PageController.php | 13 +++++++++++++ ground/views/point.php | 6 +++++- public/css/style.css | 1 - 3 files changed, 18 insertions(+), 2 deletions(-) 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;}