{% if S_AJAX_CHAT_VIEW %}
{% if SCRIPT_NAME == 'viewforum' %}
{% if S_AJAX_CHAT_VIEWFORUM_OVERRIDE or S_AJAX_CHAT_VIEWFORUM and loops.topicrow|length %}
{% if not S_AJAX_CHAT_POSITION and not S_AJAX_CHAT_POSITION_OVERRIDE %}
{% if not S_USER_LOGGED_IN %}
{% endif %}
{% INCLUDE 'chat_body.html' %}
{% elseif not S_AJAX_CHAT_ACP_POSITION and S_AJAX_CHAT_POSITION_OVERRIDE %}
{% if not S_USER_LOGGED_IN %}
{% endif %}
{% INCLUDE 'chat_body.html' %}
{% endif %}
{% endif %}
{% endif %}
{% if SCRIPT_NAME == 'viewtopic' %}
{% if S_AJAX_CHAT_VIEWTOPIC_OVERRIDE or S_AJAX_CHAT_VIEWTOPIC %}
{% if not S_AJAX_CHAT_POSITION and not S_AJAX_CHAT_POSITION_OVERRIDE %}
{% if not S_USER_LOGGED_IN %}
{% endif %}
{% INCLUDE 'chat_body.html' %}
{% elseif not S_AJAX_CHAT_ACP_POSITION and S_AJAX_CHAT_POSITION_OVERRIDE %}
{% if not S_USER_LOGGED_IN %}
{% endif %}
{% INCLUDE 'chat_body.html' %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}