ADD линк для публикации точки в ВК
This commit is contained in:
parent
c43369dc12
commit
885673a6fd
|
|
@ -160,6 +160,35 @@ class PageController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static function actionVkpoint()
|
||||||
|
{
|
||||||
|
$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->descriptionHtml = Helper::replaceLinks($point->descriptionHtml);
|
||||||
|
|
||||||
|
self::renderPartial('vkPoint.php', array(
|
||||||
|
'point' => $point,
|
||||||
|
'photos' => $point->photos,
|
||||||
|
));
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
App::error404();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static function action404($message)
|
static function action404($message)
|
||||||
{
|
{
|
||||||
self::renderPartial('error404.php', array(
|
self::renderPartial('error404.php', array(
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
foreach ($photos as $photo) {
|
||||||
|
print 'http://wikipoints.ru/photos/big/'.$photo->name.'</br>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?= $point->name ?> (, )<br/>
|
||||||
|
<br>
|
||||||
|
<?= $point->description ?><br/>
|
||||||
|
<br/>
|
||||||
|
Продолжить чтение и посмотреть на карте: http://wikipoints.ru/page/point/id/<?= $point->id ?>
|
||||||
|
|
||||||
|
#wikipoints #выходные #путешествия #туризм # # # #
|
||||||
Loading…
Reference in New Issue