Jump to main content Jump to doc navigation

Сниппет QuipLatestComments

QuipLatestComments это вспомогательный сниппет Quip. Он быстро показывает последние комментарии по ветке, пользователю или по всему сайту.

Использование

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

[[!QuipLatestComments]]

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

[[QuipLatestComments? &type=`thread` &thread=`mythread`]]

Последние комментарии пользователя с username jb2009:

[[QuipLatestComments? &type=`user` &user=`jb2009`]]

Доступные свойства

Name Description Default Value
type Режим QuipCount: "all", "thread", "family" или "user". all
thread В режиме thread: ветка для выборки комментариев.
user В режиме user: ID пользователя или username.
family В режиме family: подстрока в имени ветки.
tpl Чанк для каждого комментария. quipLatestComment
limit Сколько комментариев выбрать.
start Начальный индекс последних комментариев. 0
stripTags Удалять ли HTML-теги из текста комментария. true
bodyLimit Длина текста ссылки на комментарий до обрезки с многоточием. 30
rowCss CSS-класс каждой строки. quip-latest-comment
altRowCss CSS-класс чередующихся строк. quip-latest-comment-alt

Примеры

Последние комментарии в ветке "thread32", лимит текста 100 символов:

[[!QuipLatestComments? &type=`thread` &thread=`thread32` &bodyLimit=`100`]]

Последние 10 комментариев пользователя mikegeorge:

[[!QuipLatestComments? &type=`user` &user=`mikegeorge` &limit=`10`]]

Последние 20 комментариев во всех ветках, имя которых начинается с blog-post:

[[!QuipLatestComments? &type=`family` &family=`blog-post` &limit=`10`]]

См. также

  1. Quip.Quip
    1. Quip.Quip.tplComment
    2. Quip.Quip.tplCommentOptions
    3. Quip.Quip.tplComments
    4. Quip.Quip.tplReport
  2. Quip.QuipCount
  3. Quip.QuipLatestComments
  4. Quip.QuipReply
    1. Quip.QuipReply.tplAddComment
    2. Quip.QuipReply.tplLoginToComment
    3. Quip.QuipReply.tplPreview
  5. Quip.QuipRss
  6. Quip.Upgrading
    1. Quip.Upgrading to 1.0.1

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.

Backers

  • modmore
  • STERC
  • Digital Penguin
  • Jens Wittmann – Gestaltung & Entwicklung
  • CrewMark
  • Fabian Christen
  • Sepia River Studios
  • Dannevang Digital
  • Alex
  • A. Moreno
  • Chris Fickling
  • Stéphane Jäggi
  • Murray Wood
  • Anton Tarasov
  • deJaya
  • JT Skaggs
  • Lefthandmedia
  • eydolan
  • Following Sea
  • Guido Gallenkamp
  • YJ
  • Raffy
  • Snow Creative
  • Nick Clark
  • Guest
  • Helen
  • krisznet
  • Yanni
  • Richard

Budget

$204 per month—let's make that $500!

Learn more