Jump to main content Jump to doc navigation

Чанк tplAddComment QuipReply

Этот чанк выводится через свойство &tplAddComment сниппета Quip.QuipReply.

Значение по умолчанию

[[+preview]]
<span class="quip-success" id="quip-success-[[+idprefix]]"
    >[[+successMsg]]</span
>

<form
    id="quip-add-comment-[[+idprefix]]"
    action="[[+url]]#quip-comment-preview-box-[[+idprefix]]"
    method="post"
>
    <div class="quip-comment quip-add-comment">
        <input type="hidden" name="nospam" value="" />
        <input type="hidden" name="thread" value="[[+thread]]" />
        <input type="hidden" name="parent" value="[[+parent]]" />
        <input type="hidden" name="auth_nonce" value="[[+auth_nonce]]" />
        <input type="hidden" name="preview_mode" value="[[+preview_mode]]" />

        <div class="quip-fld">
            <label for="quip-comment-name-[[+idprefix]]"
                >[[%quip.name? &namespace=`quip` &topic=`default`]]:<span
                    class="quip-error"
                    >[[+error.name]]</span
                ></label
            >
            <input
                type="text"
                name="name"
                id="quip-comment-name-[[+idprefix]]"
                value="[[+name]]"
            />
            <br />
        </div>

        <div class="quip-fld">
            <label for="quip-comment-email-[[+idprefix]]"
                >[[%quip.email]]:<span class="quip-error"
                    >[[+error.email]]</span
                ></label
            >
            <input
                type="text"
                name="email"
                id="quip-comment-email-[[+idprefix]]"
                value="[[+email]]"
            />
            <br />
        </div>

        <div class="quip-fld">
            <label for="quip-comment-website-[[+idprefix]]"
                >[[%quip.website]]:<span class="quip-error"
                    >[[+error.website]]</span
                ></label
            >
            <input
                type="text"
                name="website"
                id="quip-comment-website-[[+idprefix]]"
                value="[[+website]]"
            />
            <br />
        </div>

        <div class="quip-fld">
            <label for="quip-comment-notify-[[+idprefix]]"
                >[[%quip.notify_me]]:<span class="quip-error"
                    >[[+error.notify]]</span
                ></label
            >
            <input type="checkbox" value="1" name="notify"
            id="quip-comment-notify-[[+idprefix]]"
            [[+notify:if=`[[+notify]]`:eq=`1`:then=`checked="checked"`]] />
            <br />
        </div>

        <div class="quip-fld recaptcha">
            [[+quip.recaptcha_html]]
            <span class="quip-error">[[+error.recaptcha]]</span>
        </div>

        <p>
            <span class="quip-allowed-tags"
                >[[%quip.allowed_tags?
                &tags=`[[++quip.allowed_tags:htmlent]]`]]</span
            >[[%quip.comment_add_new]]<span class="quip-error"
                >[[+error.comment]]</span
            >
        </p>
        <textarea name="comment" id="quip-comment-box-[[+idprefix]]" rows="5">
[[+comment]]</textarea
        >

        <button type="submit" name="[[+preview_action]]" value="1">
            [[%quip.preview]]
        </button>
        [[+can_post:is=`1`:then=`<button
            type="submit"
            name="[[+post_action]]"
            value="1"
        >
            [[%quip.post]]</button
        >`]]

        <br class="clear" />
    </div>
</form>

Доступные плейсхолдеры

Name Description
thread Ветка комментариев.
parent Родительский комментарий, на который отвечают. По умолчанию 0.
url URL для отправки формы.
preview Блок предпросмотра.
idprefix Префикс ID для этой ветки.
name Имя автора.
email Email автора.
website Сайт автора.
notify Отмечен ли чекбокс Notify.
comment Текст комментария.
error Общая ошибка, если есть.
quip.recaptcha_html При включённой recaptcha HTML формы reCaptcha.

См. также

  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