diff --git a/.gitignore b/.gitignore index d5e8674..492fe9e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ public/photos/*.jpg public/photos/*.jpeg public/photos/*.png public/photos/*.gif +public/photos/*?* public/photos/small/*.jpg public/photos/small/*.jpeg diff --git a/ground/controllers/PageController.php b/ground/controllers/PageController.php index 5c314bd..cee25a1 100644 --- a/ground/controllers/PageController.php +++ b/ground/controllers/PageController.php @@ -68,6 +68,7 @@ class PageController extends Controller $point->categoryIcon = $categories[$point->categoryId]['icon']; $point->categoryName = $categories[$point->categoryId]['name']; + preg_match_all("/.*?[.?!](?:\s|$)/s", $point->descriptionHtml, $items); $randomPoint = Point::model()->getRandom(); $similarPoints = Point::model()->getAll(array('where' => 'categoryId = '.$point->categoryId.' AND `id` <> '.$point->id.' ORDER BY RAND() LIMIT 6;')); @@ -75,6 +76,7 @@ class PageController extends Controller self::render('point.php', array( 'point' => $point, + 'text' => $items[0], 'randomPoint' => $randomPoint, 'similarPoints' => $similarPoints, 'closestPoints' => $closestPoints, diff --git a/ground/views/layoutPage.php b/ground/views/layoutPage.php index 1f5bfb3..3c86959 100644 --- a/ground/views/layoutPage.php +++ b/ground/views/layoutPage.php @@ -25,6 +25,9 @@ +
+ +
diff --git a/ground/views/point.php b/ground/views/point.php index 9c81f75..8fea27b 100644 --- a/ground/views/point.php +++ b/ground/views/point.php @@ -1,114 +1,118 @@ -
-
- -
-

Автор точки

- -

authorUser->nick ?>

-

authorUser->getPointsCount() ?> - создано точек

- -
-

name ?>

-

-

- description, 0, 120, 'UTF-8') ?>... - далее » -

-
-
-

name ?>

+
+
+
+

name ?>

+
+ Координаты:  + + lat > 0 ? 'N' : 'S' ?>lat > 0 ? $point->lat : (-1 * $point->lat) ?>° + lng > 0 ? 'E' : 'W' ?>lng > 0 ? $point->lng : (-1 * $point->lng) ?>° + +   /   + + lat > 0 ? 'N' : 'S' ?>lat) ?> + lng > 0 ? 'E' : 'W' ?>lng) ?> + +   /   + На карте +
- Координаты:  - - lat > 0 ? 'N' : 'S' ?>lat > 0 ? $point->lat : (-1 * $point->lat) ?>° - lng > 0 ? 'E' : 'W' ?>lng > 0 ? $point->lng : (-1 * $point->lng) ?>° - -   /   - - lat > 0 ? 'N' : 'S' ?>lat) ?> - lng > 0 ? 'E' : 'W' ?>lng) ?> - -   /   - На карте - -

- descriptionHtml, $items); - $text = $items[0]; - if (count($text) > 4) - { - for ($index = 0; $index < 4; $index++) + 4) { - print $text[$index]; + for ($index = 0; $index < 4; $index++) + { + print $text[$index]; + } + } else + { + print $point->descriptionHtml; } - } else - { - print $point->descriptionHtml; - } - ?> + ?> - img): ?> -

- - - - + + +
- +
+

+ - 3) - { - for ($index = $index; $index < count($text); $index++) + 3) { - print $text[$index] . ' '; + for ($index = $index; $index < count($text); $index++) + { + print $text[$index] . ' '; + } } - } - ?> + ?> -
-

- [ - в закладках ] - [ - нравится ] +

+ [ - в закладках ] + [ - нравится ] + [ authorUser->nick ?> - authorUser->getPointsCount() ?> ] + [ источник ] -

+

+
-
-

Поблизости:

- - нет известных нам точек. - - - - - -
-

Похожие:

- - - +
+
+
+

Поблизости:

+ + нет известных нам точек. + + + + + +
+
+
+
+
+

Похожие:

+ + + +
+
+
+
+
+ +

Это интересно: name ?>

+

+ description, 0, 400, 'UTF-8') ?>... + читать далее » +

+
+


\ No newline at end of file diff --git a/public/css/style.css b/public/css/style.css index 7462717..bda043b 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -76,4 +76,7 @@ div#box {background-image: url('/img/back.png'); background-repeat: no-repeat; b #suggestContainer {position: absolute;top: 40px;background-color: #fff;padding-bottom: 8px; border-bottom: 1px solid #333; width: 100%; display: none;} #suggestContainer > div:hover {background-color: #eee;} -#suggestContainer > div.hover {background-color: #eee;} \ No newline at end of file +#suggestContainer > div.hover {background-color: #eee;} + +/* ------------- PAGE --------------------*/ +.coords-container {text-align: right; margin-bottom: 20px; color: #777;font-size: 0.9em;} \ No newline at end of file diff --git a/public/img/logo_page.png b/public/img/logo_page.png new file mode 100644 index 0000000..be4aee4 Binary files /dev/null and b/public/img/logo_page.png differ diff --git a/public/js/map.js b/public/js/map.js index baae659..37b23db 100644 --- a/public/js/map.js +++ b/public/js/map.js @@ -199,11 +199,11 @@ function showInfo(id) description += '
'; description += '
'; - if (data.source.length > 11) - { - description += ' Подробнее'; - } -// description += ' Подробнее'; +// if (data.source.length > 11) +// { +// description += ' Подробнее'; +// } + description += ' Подробнее'; description += ''; // description += ''; description += '';