MODx/Встроенные сниппеты/Jot: различия между версиями

Содержимое удалено Содержимое добавлено
Нет описания правки
Нет описания правки
Строка 515:
</p>
 
 
<h2>Примеры использования</h2>
<p>Feel free to add your own examples to the list.
 
</p>
<div class="editsection" style="float: right; margin-left: 5px;">[<a href="/index.php?title=Jot&amp;action=edit&amp;section=11" title="Edit section: simple">edit</a>]</div><a name="simple"></a>
 
<h3>Простой</h3>
<ul><li> allow subscriptions
</li><li> paginated: 10 comments per page
</li></ul>
<pre>[[Jot? &amp;subscribe=`1` &amp;pagination=`10`]]</pre>
 
 
<h3>Простой: альтернативная сортировка</h3>
 
<ul><li> с доступом оповещения на эл.почту.
</li><li> с постраничной навигацией: 10 комментариев на странице.
</li><li> comments are sorted starting with the oldest post first.
</li></ul>
<pre>[[Jot? &amp;subscribe=`1` &amp;pagination=`10` &amp;sortby=`createdon:a`]]</pre>
 
 
<h3>Модерация</h3>
 
<ul><li> с доступом оповещения на эл.почту.
</li><li> с постраничной навигацией: 10 комментариев на странице.
</li><li> new posts are unpublished and need to be published by a moderator (in this case a manager user)
</li><li> a manager account won't receive notifications. You have to create a webgroup with a webuser that acts as the moderator.
</li><li> but a manager will receive notifications if
<ul><li> you use Jot 1.1.3+
</li><li> the manager is the document's author and
</li><li> you provide &amp;notifyAuthor=`1`
 
</li></ul>
</li></ul>
<pre>[[Jot? &amp;subscribe=`1` &amp;pagination=`10` &amp;moderated=`1`]]</pre>
 
 
<h3> Модерация: надёжный </h3>
<ul><li> с доступом оповещения на эл.почту.
</li><li> с постраничной навигацией: 10 комментариев на странице.
 
</li><li> new posts are unpublished and need to be published by a moderator (in this case a manager user)
</li><li> new posts by users that are member of the "Trusted Users" webgroup will be published.
</li></ul>
<pre>[[Jot? &amp;subscribe=`1` &amp;pagination=`10` &amp;moderated=`1` &amp;trusted=`Trusted Users`]]</pre>
 
 
<h3> Анти-спам: автоматическая</h3>
 
</li><li> с постраничной навигацией: 10 комментариев на странице.
</li><li> captcha validation for everyone
</li><li> if a bad word is detected the post will be rejected
</li><li> the badwordlist is a chunk containing words separated by a comma
</li></ul>
<pre>[[Jot? &amp;pagination=`10` &amp;captcha=`1` &amp;badwords=`{{myBadwordList}}` &amp;bw=`2`]]</pre>
 
 
<h3> Анти-спам: модерация</h3>
 
</li><li> с постраничной навигацией: 10 комментариев на странице.
</li><li> captcha validation for everyone
</li><li> if a bad word is detected the post will be unpublished and a notify will be send out to the moderators.
</li><li> webusers in the "Jot Moderators" webgroup can moderate comments
</li><li> the badwordlist is a chunk containing words separated by a comma
</li></ul>
<pre>[[Jot? &amp;pagination=`10` &amp;captcha=`1` &amp;canmoderate=`Jot Moderators` &amp;badwords=`{{myBadwordList}}` &amp;bw=`1`]]</pre>
 
 
<h2>Некоторые уловки</h2>
 
 
<h3>Хорошая практика включения поддержки комментариев</h3>
<p>The best practice for comment-enabling your documents is to create a chunk for each type of Jot call you will use.
Include each chunk in a <b>template</b> and link it to your articles. Try to avoid direct jot calls in the content field of a document (even if it's a chunk).
</p>
 
 
<h3>Расширенная MODx шаблонизация</h3>
<p>Jot uses an internal template handler that includes the functionality of the <a href="/index.php/PHx" title="PHx">PHx</a> plugin available from the repository. For more details on the modifiers check its description here.
</p><p>Note: Jot does not require that the <a href="/index.php/PHx" title="PHx">PHx</a> plugin is installed. If not installed PHx functionality will still be available, but for the Jot templates only.
</p>
 
 
<h3>Активная идентификация</h3>
 
<p>When logged in as both web- and manager user your webuser identity will over-rule your manager identity but your permissions will be the same. When logged in as a manager user you will always have moderator options.
</p>
 
 
<h3>Обязательные поля для заполнения</h3>
<p>The custom fields you specify with &amp;customfields will have to be added to your form chunk manually. The default templates holds an example of how a guest form looks (added fields here are: name and email)
</p><p><b>NOTE:</b> Be sure to prefix <i>custom.</i> to custom field. ie. [+comment.<b>custom</b>.<i>customfieldname</i>.url+]
 
</p>
 
 
<h3>Цензура в комментариях</h3>
<p>Bad words are checked on all input, including custom fields.
</p>
 
 
<h3>Генерация URL/Узлов</h3>
<p>All generated links by Jot will preserve the current querystring and only the variables specific for the Jot instance are altered if necessary. This ensures that the current page state (that could be altered by other snippets on the same page) is preserved.
</p>
 
 
<h3>Реализованные идеи</h3>
 
<p>To change the way jot outputs your forms including where moderator comments and actual comments appear use your call as normal
</p>
<pre>[[Jot? &amp;placeholders=`1` &amp;output=`0` &amp;pagination=`10` &amp;captcha=`1` &amp;canmoderate=`Jot Moderators` &amp;badwords=`{{myBadwordList}}` &amp;bw=`1`]]</pre>
<b>Please note:</b> You need to set <pre>&amp;placeholders=`1` &amp;output=`0`</pre>
 
<p>Then, you can add these placeholders calls in your page where the Jot call is.
</p>
<pre>[+jot.html.navigation+] - First. places the navigation on the page
[+jot.html.comments+] - Second. places the comment of the page
[+jot.html.moderate+] - Third. places moderated info on the page
[+jot.html.form+] - Fourth. places the form on the page</pre>
<p>You can change the order as you see fit, the example has the comments first then the form is last but you could have.
</p>
<pre>[+jot.html.form+] - First. places the form on the page
[+jot.html.comments+] - Second. places the comment of the page
[+jot.html.moderate+] - Third. places moderated info on the page
[+jot.html.navigation+] - Fourth. places the navigation on the page</pre>
 
== Ссылки ==