Front page
Split forum twig
GuestBook Twig
Youtube RSS Xtscript
Paged RSS Xtscript
This sites css
Guestbook twigged to forum classes/markup
BETA
Twig files for the blog and the guestbook can be used on any xtgem site php is not required
Css file http://forum-template.xtgem.com/xtgem_template.css
XTguestbook twig file
Copy to
/_xtgem_templates/xtguestbook.twig
<div class="xt_forum"> <div id="guestbook"> {% block guestbook_comments_list %} <div class="breadcrumbs compo"> <b>{% if data.comments %}{{ data.translations.t_guestbook }}{% else %}{{ data.translations.t_guestbook_empty }}{% endif %}</b> </div> {% if data.in_comments_thread %} <div class="breadcrumbs compo"> <a href="{{ data.comments_thread_all }}" class="">{{ data.translations.t_show_all_comments }}</a> </div> {% endif %} {% macro comments_list (comments, ctx) %} {% for comment in comments %} <div class="post{% if comment.owner_of_comment %} admin_post{% endif %}"> <span class="author {% if not comment.author_profile %}ano{% endif %}">{% 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>{% else %}{{ comment.nick }}{% endif %}</span> {% if comment.is_hidden %} {{ ctx.data.translations.t_hidden_comment }} {% else %} {{ comment.message|raw }} {% endif %} <div class="meta"> {{ comment.date }} {% if not ( ctx.data.entry.in_comments_thread and comment.childs and (comment.childs_count > 0) ) and not comment.owner_of_comment%} {% if ctx.data.visitor_is_admin and not comment.childs %} <a href="{{ comment.reply_link }}" class="xt_blog_comment_action_reply">{{ ctx.data.translations.t_reply }}</a> {% endif %} {% if ctx.data.is_logged_in and not comment.is_hidden and not data.comments_form.is_maintenance %} {% if ctx.data.reported_spam and ctx.data.reported_spam == comment.id %} {{ctx.data.translations.t_reported}} {% else %} <a href="{{ comment.spam_link }}">{{ ctx.data.translations.t_report_spam }}</a> {% endif %} {% elseif not ctx.data.is_logged_in and not comment.is_hidden and not data.comments_form.is_maintenance %} <a href="{{ comment.login_link }}">{{ ctx.data.translations.t_report_spam }}</a> {% endif %} {% endif %} </div> {% if comment.childs %} {{ _self.comments_list(comment.childs, ctx) }} {% endif %} </div> {% endfor %} {% endmacro %} <div class="thread"> {{ _self.comments_list(data.comments, _context) }} </div> {{ data.comments_pagination_html|raw }} {% 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="breadcrumbs compo"> <b>{{ data.translations.t_provide_community_name }}</b> </div> <form action="{{ data.community_name_submit_url }}" method="post" class="post new"> {% if data.in_comments_thread %} <input type="hidden" name="__xtcomments_thread_id" value="{{ data.in_comments_thread }}" /> {% endif %} <input class="input" type="text" name="community_name" value="{{data.community_name_tmp}}" /> <input class="submit" type="submit" value="{{ data.translations.t_submit }}" /> </form> {% else %} <div class="breadcrumbs compo"> <b>{{ data.translations.t_post_a_comment }}</b> </div> {% if data.comments_form.comments_restriction == "logged_in" and not data.is_logged_in %} <div class="breadcrumbs compo"> <b>{{ data.translations.t_comments_login_required }}:</b> <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="breadcrumbs compo"> <a href="{{ data.confirm_email_link }}?redir={{ data.comments_form.url_encoded }}"> {{ data.translations.t_confirm_email }}</a> </div> {% else %} <form action="{{ data.comments_form.url }}" method="post" class="post new"> {% 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 %} <label>{{ data.translations.t_posting_as }}: <span class="author">{{ data.community_name }}</span> </label> {% else %} {% if data.comments_form.spam_comments_reserved_name %} <div class="breadcrumbs compo">{{ data.translations.t_reserved_name }}</div> {% endif %} {% if data.comments_form.poster %} <input type="hidden" name="__xtcomments_nick" value="{{ data.comments_form.poster }}" /> {% else %} <label>{{ data.translations.t_name }} <input class="input" type="text" name="__xtcomments_nick" value="{{ data.comments_form.spam_comments_nick }}" /> </label> {% endif %} {% endif %} {% if data.comments_form.comments_restriction == "email_required" and not data.is_logged_in %} <label>{{ data.translations.t_email }} <input class="input" type="email" name="__xtcomments_email" value="{{ data.comments_form.spam_comments_email }}" /> </label> {% endif %} <label>{{ data.translations.t_comment }} <textarea name="__xtcomments_msg">{{ data.comments_form.spam_comments_msg }}</textarea> </label> {% if data.comments_form.spam_comments %} <div class="breadcrumbs compo"> <b>Please enter the text you can see on the image below:</b> </div> <input type="hidden" name="hash" value="{{ data.comments_form.spam_hash }}" /> <img src="{{ data.comments_form.spam_captcha_url }}" alt="" /><br /> <label>Code: <input class="input" type="text" name="code" /> </label> {% endif %} <input class="submit" name="submit" type="submit" value="{{ data.translations.t_post }}" /> </form> {% endif %} {% endif %} {% endblock %} </div> </div>
Log in