Хаки и Скрипты Next Generation CMS

Ставим рейтинг для комментов,новостей,юзеров

irbees2008 irbees2008 Опубликовано - 5 - апреля Варианты рейтинга
4468 - 16
  • Адаптировал: irbees2008
  • Источник:
  • Уровень сложности исполнения: это делается простым копированием и нажиманием кнопки

Здесь вчера задали вопрос "Есть ли рейтинг для комментариев",ну пока еще не было.Ну я начал гуглить и нашел парочку подходящих рейтингов.Ну один мы сейчас поставим на комментарии пользователей.
Итак приступим
1.Скачиваем архив Вы не можете скачивать файлы с нашего сайта ,рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем. ,распаковываем и заливаем в корневую папку папку сайта,и выставляем права на папки 777 и файлы внутри.
2.Подключаем стиль и скрипт голосования в main.tpl.

Код:
<link href="{{ home }}/votingfiles/voting.css" rel="stylesheet" type="text/css" />
<script src="{{ home }}/votingfiles/voting.js" type="text/javascript"></script>
С помощью твига можно сделать чтобы скрипт и стиль подключался только в новостях.
3.Идем ваш шаблон/plugins/comments и открываем файл comments.show.tpl и добавляем туда где хотим видеть рейтинг вот эту строчку
Вариант 1
Код:
<div class="vot_updown1" id="vt_comment_{id}"></div>
Вариант 2
Код:
<div class="vot_updown2" id="vt_comment_{id}"></div>
Вариант 3
Код:
<div class="vot_plus" id="vt_comment_{id}"></div>
4.Все сохраняем,редактируем под себя стили картинки.В скором времени ожидается интеграция в плагин коментариев.

Можешь почитать и вот эту статейку "FerroMenu JQuery плагин"

    {avatar}
    [profile][/profile]irbees2008[profile][/profile] 5 апреля 2015 [if-have-perm]| [edit-com][/edit-com] | [del-com][/del-com][/if-have-perm] {comment-short}[comment_full]

    читать полностью

    [/comment_full] [answer]
    --------------------
    Ответ от{name}
    {answer}[/answer] [quote]

    irbees2008');" style="cursor: pointer;">ответить[/quote]

    {avatar}
    [profile][/profile]irbees2008[profile][/profile] 5 апреля 2015 [if-have-perm]| [edit-com][/edit-com] | [del-com][/del-com][/if-have-perm] {comment-short}[comment_full]

    читать полностью

    [/comment_full] [answer]
    --------------------
    Ответ от{name}
    {answer}[/answer] [quote]

    irbees2008');" style="cursor: pointer;">ответить[/quote]

    {avatar}
    [profile][/profile]irbees2008[profile][/profile] 5 апреля 2015 [if-have-perm]| [edit-com][/edit-com] | [del-com][/del-com][/if-have-perm] {comment-short}[comment_full]

    читать полностью

    [/comment_full] [answer]
    --------------------
    Ответ от{name}
    {answer}[/answer] [quote]

    irbees2008');" style="cursor: pointer;">ответить[/quote]

    {avatar}
    [profile][/profile]irbees2008[profile][/profile] 5 апреля 2015 [if-have-perm]| [edit-com][/edit-com] | [del-com][/del-com][/if-have-perm] {comment-short}[comment_full]

    читать полностью

    [/comment_full] [answer]
    --------------------
    Ответ от{name}
    {answer}[/answer] [quote]

    irbees2008');" style="cursor: pointer;">ответить[/quote]

    {avatar}
    [profile][/profile]irbees2008[profile][/profile] 5 апреля 2015 [if-have-perm]| [edit-com][/edit-com] | [del-com][/del-com][/if-have-perm] {comment-short}[comment_full]

    читать полностью

    [/comment_full] [answer]
    --------------------
    Ответ от{name}
    {answer}[/answer] [quote]

    irbees2008');" style="cursor: pointer;">ответить[/quote]

    {avatar}
    [profile][/profile]irbees2008[profile][/profile] 5 апреля 2015 [if-have-perm]| [edit-com][/edit-com] | [del-com][/del-com][/if-have-perm] {comment-short}[comment_full]

    читать полностью

    [/comment_full] [answer]
    --------------------
    Ответ от{name}
    {answer}[/answer] [quote]

    irbees2008');" style="cursor: pointer;">ответить[/quote]

    {avatar}
    [profile][/profile]irbees2008[profile][/profile] 5 апреля 2015 [if-have-perm]| [edit-com][/edit-com] | [del-com][/del-com][/if-have-perm] {comment-short}[comment_full]

    читать полностью

    [/comment_full] [answer]
    --------------------
    Ответ от{name}
    {answer}[/answer] [quote]

    irbees2008');" style="cursor: pointer;">ответить[/quote]

    {avatar}
    [profile][/profile]irbees2008[profile][/profile] 5 апреля 2015 [if-have-perm]| [edit-com][/edit-com] | [del-com][/del-com][/if-have-perm] {comment-short}[comment_full]

    читать полностью

    [/comment_full] [answer]
    --------------------
    Ответ от{name}
    {answer}[/answer] [quote]

    irbees2008');" style="cursor: pointer;">ответить[/quote]

    {avatar}
    [profile][/profile]irbees2008[profile][/profile] 5 апреля 2015 [if-have-perm]| [edit-com][/edit-com] | [del-com][/del-com][/if-have-perm] {comment-short}[comment_full]

    читать полностью

    [/comment_full] [answer]
    --------------------
    Ответ от{name}
    {answer}[/answer] [quote]

    irbees2008');" style="cursor: pointer;">ответить[/quote]

    {avatar}
    [profile][/profile]irbees2008[profile][/profile] 5 апреля 2015 [if-have-perm]| [edit-com][/edit-com] | [del-com][/del-com][/if-have-perm] {comment-short}[comment_full]

    читать полностью

    [/comment_full] [answer]
    --------------------
    Ответ от{name}
    {answer}[/answer] [quote]

    irbees2008');" style="cursor: pointer;">ответить[/quote]

Опрос

Ваше мнение

На каком движке ваш сайт?
Результаты

Последние комментарии

Теги

Anything in here will be replaced on browsers that support the canvas element

Статистика

  • Caйт cущecтвуeт: 4627 дней
  • Статических страниц: 10
  • Категорий: 28
  • Новостей: 618
  • Неопубликованных новостей: 8
  • Комментариев: 257
  • Зарегестрированных пользователей: 779
  • Онлайн всего: [10]
  • Гости: [10]
  • Сегодня нас посетили: [7] Google, Larrytitly, Яндекс, Яндекс, irbees2008, Google, dankeanke
  • SQL запросов: 41
  • Генерация страницы: 0.248сек
  • Потребление памяти: 3.002 Mb 
  •   Яндекс.Метрика