* Graham  
ADVANCED USERS ONLY
Xtgem uses twig templates to create the markup of forum blog and guestbook
Twig is a php template engine the documentation for the template development tools is available at
http://twig.sensiolabs.org/doc/templates.html
You do not need a php upgrade to use these twig files

First create a folder named _xtgem_templates in the main file browser (root)
this folder is where xtgem expects to find the main twig files
For the security of your twig files any folder starting with _xtgem is unavailable to other xtgem functions or links

Note: to allow the use of "upload by remote server" most of the files have a .js extension this should be removed after upload
Do not edit twig files with the building tool you must use the code editor

FORUM
There are two twig files for the forum the main file
http://syntax.xtgem.com/_templates/xtforum.twig.js
And the blocks file
http://syntax.xtgem.com/_templates/my_blocks.twig.js
both are required

BLOG
The blogs twig fie has a dropbox url
https://dl.dropboxusercontent.com/u/2162515/xtgem_blog.twig
upload this and rename it
xtblog.twig

GUESTBOOK
The guestbooks twig file
http://syntax.xtgem.com/_templates/xtguestbook.twig.js

CHATROOM
Chat function twig file
http://syntax.xtgem.com/_templates/xtchat.twig.js upload it by "remote server" to _xtgem_templates and then remove the .js extension
This is a rather complex script as it include javascript ajax and the css
2014-05-12 11:21 (edited 2014-08-20 04:14 by Graham ) · (0)
* Apkk admin nên cho thêm phần bài viết mới nhất ở index
2014-05-22 20:32 · (0)
* Wapper * Graham html error in this blog twig if I disable commenting (ending div missing in detailed post page)
2014-06-03 20:52 (edited 2014-06-13 02:50 by Graham ) · (0)
* Graham * Wapper I tested and I cannot find any unclosed divs
http://isitallowed.xtgem.com/blog/__xtblog_entry/10246639-test-post
This is a test post with comments disabled using the twig code you posted
2014-06-04 03:05 (edited 2014-06-04 03:16 by Graham ) · (0)
* Wapper check the source code of the page carefully. ending tag is missing for one div [total 14 divs, 13 closed divs]

its the html generated from blog
<div data-xtcontainer="container" class="xt_container">vx1<div class="xt_blog_parent" id="xt_blog">

<div class="xt_blog">


<h2 class="xt_blog_title">test post</h2>

<div class="xt_blog_content"><p class="xt_text normal"><p>test post</p></p></div>

<div class="xt_blog_entry_date xt_text small">Created at 2014-06-04</div>

<a class="xt_blog_back_to_posts xt_link xt_button" href="http://isitallowed.xtgem.com/blog?#xt_blog">Back to posts</a>



</div>

    </div>

Copy code
2014-06-04 03:21 (edited 2014-06-04 03:27 by Wapper ) · (0)
* Graham * Wapper ok I can see it now I will see if I can find it
was this one of my twig files or one that you edited as the standard blog does not have this error
2014-06-04 03:43 · (0)
* Wapper * Graham I did some editing. I removed star rating part. Maybe I messed up there. Your twig code is perfect.
2014-06-04 04:17 · (0)
* Graham * Wapper I found it and I think it was my error.
In the version you are using a </div> is in the wrong place so it is only being used when comments are on
Near the bottom of the script change
<div class="xt_submit">
<input class="xt_button" type="submit" value="{{ data.translations.t_post }}" />
</div>
</form>
</div>
</div>
{% endif %}
{% endblock %}

{% elseif view == 'no_contents' %}


To
<div class="xt_submit">
<input class="xt_button" type="submit" value="{{ data.translations.t_post }}" />
</div>
</form>
</div>
{% endif %}
{% endblock %}
</div>

{% elseif view == 'no_contents' %}


I have also made the change in the code you posted below
2014-06-04 09:49 (edited 2014-06-04 12:48 by Graham ) · (0)
* Wapper * Graham When we decide to show first image and truncated text, there isn't any line break between image and texts. It looks messy image and text in same line. Any way to add a <br/> there? or you can consider it officially. The image tag is not closed either, ending '/' missing.
2014-06-05 05:38 · (0)
* Graham * Wapper part 1 can be done with css
.xt_description .xt_image {display:block !important}
Copy code

the missing / in the image tag I will ask about
2014-06-05 08:49 · (0)

Online: Guests: 1