diff --git a/controllers/PageController.php b/controllers/PageController.php index e9e0ae6..5ee3c3c 100644 --- a/controllers/PageController.php +++ b/controllers/PageController.php @@ -156,7 +156,33 @@ class PageController extends Controller $point->description = Helper::replaceLinks($point->description); - self::renderPartial('vkPoint.php', array( + self::renderPartial('page/vkPoint.php', array( + 'point' => $point, + 'photos' => $point->photos, + )); + } else { + App::error404(); + } + } + + static function actionInstapoint() + { + $pointId = (int) App::getParam('id'); + if (App::$user && App::$user->isAdmin == 1 && $pointId) { + $point = Point::model()->getByPK($pointId); + + if ($point->id == NULL) { + App::error404(); + } + + $point->descriptionHtml = nl2br($point->description); + $point->name = htmlspecialchars($point->name); + + $categories = Category::model()->getAll(array('order' => 'ord ASC', 'asArray' => true)); + + $point->description = Helper::replaceLinks($point->description); + + self::renderPartial('page/instaPoint.php', array( 'point' => $point, 'photos' => $point->photos, )); diff --git a/views/page/instaPoint.php b/views/page/instaPoint.php new file mode 100644 index 0000000..b925550 --- /dev/null +++ b/views/page/instaPoint.php @@ -0,0 +1,15 @@ +name ?>
+
+Посмотреть на карте и прочитать описание: http://wikipoints.ru/point/id ?>?utm_source=igDaly
+
+#wikipoints # # # # # # # # # # # # # # # #sightseeing #выходные #путешествия #путешествие #туризм #weekend #travels #journey #tourism +
+
+
+
+
+name . '"/>
'; +} +?> diff --git a/views/vkPoint.php b/views/page/vkPoint.php similarity index 93% rename from views/vkPoint.php rename to views/page/vkPoint.php index fcfd703..2605647 100644 --- a/views/vkPoint.php +++ b/views/page/vkPoint.php @@ -7,6 +7,6 @@ foreach ($photos as $photo) {
description ?>

-Продолжить чтение и посмотреть на карте: http://wikipoints.ru/point/id ?>?utm_source=vk&utm_campaign=dalyPoint
+Продолжить чтение и посмотреть на карте: http://wikipoints.ru/point/id ?>?utm_source=vkDaly

#wikipoints # # # # # # # # # # # # # # # #sightseeing #выходные #путешествия #путешествие #туризм #weekend #travels #journey #tourism diff --git a/views/point.php b/views/point.php index 121224a..944067a 100644 --- a/views/point.php +++ b/views/point.php @@ -27,6 +27,8 @@ $index = 0; Редактировать   /   4VK +   /   + 4IG