<div class="group">
{% block guestbook_comments_list %}
<div class="group" id="xt_blog_comments">
{% if data.in_comments_thread %}
<br /><div><a href="{{ data.comments_thread_all }}" class="xt_button xt_link">← {{ data.translations.t_show_all_comments }}</a></div><br />
{% endif %}
<span class="blog-header">
{% if data.comments %}
{{ data.translations.t_guestbook }}
{% else %}
{{ data.translations.t_guestbook_empty }}
{% endif %}
</span>
{% macro comments_list (comments, ctx) %}
{% for comment in comments %}
<div class="group"> <div class="xt_blog_comment{% if comment.owner_of_comment %} xt_blog_comment_author_admin{% endif %}">
<span class="xt_blog_comment_date">[{{ comment.date }}]</span>
<span class="xt_blog_comment_author">
{% if comment.author_profile %}
<a href="{{ comment.author_profile.link }}"><img src="{{ comment.author_profile.avatars[16] }}" style="display:inline">{{ comment.author_profile.name }}</a></div>
{% else %}
<div class="group"> {{ comment.nick|raw }}</div>
{% endif %}:
</span>
{% if not ( ctx.data.in_comments_thread and comment.childs and (comment.childs_count > 0) ) %}
{% if not comment.owner_of_comment %}
{% if ctx.data.visitor_is_admin and not comment.childs %}
<a href="{{ comment.reply_link }}" class="blog-header">{{ ctx.data.translations.t_reply }}</a>
{% endif %}
{% if ctx.data.reported_spam and ctx.data.reported_spam == comment.id %}
<span class="group">{{ctx.data.translations.t_reported}}</span>
{% else %}
{% if ctx.data.is_logged_in and not comment.is_hidden and not data.comments_form.is_maintenance %}
<a href="{{ comment.spam_link }}" class="group">{{ ctx.data.translations.t_report_spam }}</a>
{% elseif not ctx.data.is_logged_in and not comment.is_hidden and not data.comments_form.is_maintenance %}
<a href="{{ comment.login_link }}" class="group">{{ ctx.data.translations.t_report_spam }}</a>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% if comment.is_hidden %}
<div class="blog">{{ ctx.data.translations.t_hidden_comment }}</div>
{% else %}
<div class="blog"><font color="red"><b>{{ comment.message|raw }}</b></font></div>
{% endif %}
{% if comment.childs %}
<div class="blog-header" style="margin: 5px 6px;">
{{ _self.comments_list(comment.childs, ctx) }}
</div>
{% endif %}
</div>
{% endfor %}
{% endmacro %}
{{ _self.comments_list(data.comments, _context) }}
</div><br />
<div class="name"> {{ data.comments_pagination_html|raw }}</div>
{% endblock %}
{% block guestbook_comments_form %}
{% if data.comments_form.is_maintenance %}
{{ data.comments_form.maintenante_markup|raw }}
{% elseif data.is_logged_in and not data.community_name %}
<div class="group">
<span class="blog-header">{{ data.translations.t_provide_community_name }}</span>
<form action="{{ data.community_name_submit_url }}" method="post" id="xt_guestbook_comment_form">
{% if data.in_comments_thread %}
<input type="hidden" name="__xtcomments_thread_id" value="{{ data.in_comments_thread }}" /></div>
{% endif %}
<div class="xt_input">
<input type="text" name="community_name" value="{{data.community_name_tmp}}" /><br />
</div>
<div class="xt_submit">
<input class="xt_button" type="submit" value="{{ data.translations.t_submit }}" />
</div>
</form>
</div>
{% else %}
<div class="group">
<span class="blog-header">{{ data.translations.t_post_a_comment }}</span>
{% if data.comments_form.comments_restriction == "logged_in" and not data.is_logged_in %}
<div class="group">{{ data.translations.t_comments_login_required }}: <a href="{{ data.comments_form.login_link }}"> {{ data.translations.t_login }} </a> | <a href="{{ data.comments_form.signup_link }}"> {{ data.translations.t_signup }} </a></div>
{% elseif data.comments_form.comments_restriction == "logged_in" and data.is_logged_in and not data.is_confirmed_email %}
<div class="group">
<a href="{{ data.confirm_email_link }}?redir={{ data.comments_form.url_encoded }}" class="xt_blog_confirm_email">
{{ data.translations.t_confirm_email }}
</a>
</div>
{% else %}
<form action="{{ data.comments_form.url }}" method="post" id="xt_blog_comment_form">
{% if data.entry.in_comments_thread %}
<input type="hidden" name="__xtcomments_thread_id" value="{{ data.entry.in_comments_thread }}" />
{% endif %}
<input type="hidden" name="__xtx" value="{{ data.comments_form.fields.xtx }}" />
<input type="hidden" name="__xtxs" value="{{ data.comments_form.fields.xtxs }}" />
<input type="text" name="__xtcomments_comments" value="" style="display:none" />
{% if data.is_logged_in %}
<div class="blog-header">
<label>{{ data.translations.t_posting_as }}: <span class="xtblog_community_name">{{ data.community_name }}</span></label>
</div>
{% else %}
{% if data.comments_form.spam_comments_reserved_name %}
<div class="group">{{ data.translations.t_reserved_name }}</div>
{% endif %}
{% if data.comments_form.poster %}
<input type="hidden" name="__xtcomments_nick" value="{{ data.comments_form.poster }}" />
{% else %}
<div class="blog-header">
<label>{{ data.translations.t_name }} </label>
</div>
<div class="xt_input">
<input type="text" name="__xtcomments_nick" value="{{ data.comments_form.spam_comments_nick }}" /><br />
</div>
{% endif %}
{% endif %}
{% if data.comments_form.comments_restriction == "email_required" and not data.is_logged_in %}
<div class="blog-header">
<label>{{ data.translations.t_email }} </label>
</div>
<div class="blog-header">
<input type="text" name="__xtcomments_email" value="{{ data.comments_form.spam_comments_email }}" /><br />
</div>
{% endif %}
<div class="blog-header">
<label>{{ data.translations.t_comment }} </label>
</div>
<div class="xt_textarea">
<textarea id="xtblog_comment_msg" name="__xtcomments_msg">{{ data.comments_form.spam_comments_msg }}</textarea>
</div>
{% if data.comments_form.spam_comments %}
Please enter the text you can see on the image below: <br />
<input type="hidden" name="hash" value="{{ data.comments_form.spam_hash }}" />
<img src="{{ data.comments_form.spam_captcha_url }}" alt="" /><br />
<div class="blog-header">
<label>Code: </label>
</div>
<div class="xt_input">
<input type="text" name="code" />
</div><br />
{% endif %}
<div class="submit">
<input class="xt_button" name="submit" type="submit" value="{{ data.translations.t_post }}" />
</div>
</form>
{% endif %}
</div>
{% endif %}
{% endblock %}
</div>
Copy code
{% block guestbook_comments_list %}
<div class="group" id="xt_blog_comments">
{% if data.in_comments_thread %}
<br /><div><a href="{{ data.comments_thread_all }}" class="xt_button xt_link">← {{ data.translations.t_show_all_comments }}</a></div><br />
{% endif %}
<span class="blog-header">
{% if data.comments %}
{{ data.translations.t_guestbook }}
{% else %}
{{ data.translations.t_guestbook_empty }}
{% endif %}
</span>
{% macro comments_list (comments, ctx) %}
{% for comment in comments %}
<div class="group"> <div class="xt_blog_comment{% if comment.owner_of_comment %} xt_blog_comment_author_admin{% endif %}">
<span class="xt_blog_comment_date">[{{ comment.date }}]</span>
<span class="xt_blog_comment_author">
{% if comment.author_profile %}
<a href="{{ comment.author_profile.link }}"><img src="{{ comment.author_profile.avatars[16] }}" style="display:inline">{{ comment.author_profile.name }}</a></div>
{% else %}
<div class="group"> {{ comment.nick|raw }}</div>
{% endif %}:
</span>
{% if not ( ctx.data.in_comments_thread and comment.childs and (comment.childs_count > 0) ) %}
{% if not comment.owner_of_comment %}
{% if ctx.data.visitor_is_admin and not comment.childs %}
<a href="{{ comment.reply_link }}" class="blog-header">{{ ctx.data.translations.t_reply }}</a>
{% endif %}
{% if ctx.data.reported_spam and ctx.data.reported_spam == comment.id %}
<span class="group">{{ctx.data.translations.t_reported}}</span>
{% else %}
{% if ctx.data.is_logged_in and not comment.is_hidden and not data.comments_form.is_maintenance %}
<a href="{{ comment.spam_link }}" class="group">{{ ctx.data.translations.t_report_spam }}</a>
{% elseif not ctx.data.is_logged_in and not comment.is_hidden and not data.comments_form.is_maintenance %}
<a href="{{ comment.login_link }}" class="group">{{ ctx.data.translations.t_report_spam }}</a>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% if comment.is_hidden %}
<div class="blog">{{ ctx.data.translations.t_hidden_comment }}</div>
{% else %}
<div class="blog"><font color="red"><b>{{ comment.message|raw }}</b></font></div>
{% endif %}
{% if comment.childs %}
<div class="blog-header" style="margin: 5px 6px;">
{{ _self.comments_list(comment.childs, ctx) }}
</div>
{% endif %}
</div>
{% endfor %}
{% endmacro %}
{{ _self.comments_list(data.comments, _context) }}
</div><br />
<div class="name"> {{ data.comments_pagination_html|raw }}</div>
{% endblock %}
{% block guestbook_comments_form %}
{% if data.comments_form.is_maintenance %}
{{ data.comments_form.maintenante_markup|raw }}
{% elseif data.is_logged_in and not data.community_name %}
<div class="group">
<span class="blog-header">{{ data.translations.t_provide_community_name }}</span>
<form action="{{ data.community_name_submit_url }}" method="post" id="xt_guestbook_comment_form">
{% if data.in_comments_thread %}
<input type="hidden" name="__xtcomments_thread_id" value="{{ data.in_comments_thread }}" /></div>
{% endif %}
<div class="xt_input">
<input type="text" name="community_name" value="{{data.community_name_tmp}}" /><br />
</div>
<div class="xt_submit">
<input class="xt_button" type="submit" value="{{ data.translations.t_submit }}" />
</div>
</form>
</div>
{% else %}
<div class="group">
<span class="blog-header">{{ data.translations.t_post_a_comment }}</span>
{% if data.comments_form.comments_restriction == "logged_in" and not data.is_logged_in %}
<div class="group">{{ data.translations.t_comments_login_required }}: <a href="{{ data.comments_form.login_link }}"> {{ data.translations.t_login }} </a> | <a href="{{ data.comments_form.signup_link }}"> {{ data.translations.t_signup }} </a></div>
{% elseif data.comments_form.comments_restriction == "logged_in" and data.is_logged_in and not data.is_confirmed_email %}
<div class="group">
<a href="{{ data.confirm_email_link }}?redir={{ data.comments_form.url_encoded }}" class="xt_blog_confirm_email">
{{ data.translations.t_confirm_email }}
</a>
</div>
{% else %}
<form action="{{ data.comments_form.url }}" method="post" id="xt_blog_comment_form">
{% if data.entry.in_comments_thread %}
<input type="hidden" name="__xtcomments_thread_id" value="{{ data.entry.in_comments_thread }}" />
{% endif %}
<input type="hidden" name="__xtx" value="{{ data.comments_form.fields.xtx }}" />
<input type="hidden" name="__xtxs" value="{{ data.comments_form.fields.xtxs }}" />
<input type="text" name="__xtcomments_comments" value="" style="display:none" />
{% if data.is_logged_in %}
<div class="blog-header">
<label>{{ data.translations.t_posting_as }}: <span class="xtblog_community_name">{{ data.community_name }}</span></label>
</div>
{% else %}
{% if data.comments_form.spam_comments_reserved_name %}
<div class="group">{{ data.translations.t_reserved_name }}</div>
{% endif %}
{% if data.comments_form.poster %}
<input type="hidden" name="__xtcomments_nick" value="{{ data.comments_form.poster }}" />
{% else %}
<div class="blog-header">
<label>{{ data.translations.t_name }} </label>
</div>
<div class="xt_input">
<input type="text" name="__xtcomments_nick" value="{{ data.comments_form.spam_comments_nick }}" /><br />
</div>
{% endif %}
{% endif %}
{% if data.comments_form.comments_restriction == "email_required" and not data.is_logged_in %}
<div class="blog-header">
<label>{{ data.translations.t_email }} </label>
</div>
<div class="blog-header">
<input type="text" name="__xtcomments_email" value="{{ data.comments_form.spam_comments_email }}" /><br />
</div>
{% endif %}
<div class="blog-header">
<label>{{ data.translations.t_comment }} </label>
</div>
<div class="xt_textarea">
<textarea id="xtblog_comment_msg" name="__xtcomments_msg">{{ data.comments_form.spam_comments_msg }}</textarea>
</div>
{% if data.comments_form.spam_comments %}
Please enter the text you can see on the image below: <br />
<input type="hidden" name="hash" value="{{ data.comments_form.spam_hash }}" />
<img src="{{ data.comments_form.spam_captcha_url }}" alt="" /><br />
<div class="blog-header">
<label>Code: </label>
</div>
<div class="xt_input">
<input type="text" name="code" />
</div><br />
{% endif %}
<div class="submit">
<input class="xt_button" name="submit" type="submit" value="{{ data.translations.t_post }}" />
</div>
</form>
{% endif %}
</div>
{% endif %}
{% endblock %}
</div>
Copy code