{% use "my_blocks.twig" %} {% macro rate( rate_value, karma, post_id ) %}document.getElementById('ajax').src=this.href+'&__ajax=1';document.getElementById('r{{ post_id }}').innerHTML='({{ ( karma + rate_value ) }})';{{ ( karma - rate_value ) }} > 0 ? document.getElementById('r{{ post_id }}').style.color='#b20016' : {{ ( karma - rate_value ) }} < 0 ? document.getElementById('r{{ post_id }}').style.color='#86C219' : null;document.getElementById('rd{{ post_id }}').style.display='none';document.getElementById('ru{{ post_id }}').style.display='none';return false;{% endmacro %} {% if __view == '404' %} {{block('view_404')}} {% elseif __view == 'categories' %} {{block('view_categories')}} {% elseif __view == 'board' %} {{block('view_boards')}} {% elseif __view == 'thread' %} {{block('view_thread')}} {% elseif __view == 'confirm' %} {{block('view_confirm')}} {% elseif __view == 'edit_post' %} {{block('view_edit_post')}} {% elseif __view == 'edit_thread' %} {{block('view_edit_thread')}} {% elseif __view == 'message' %} {{block('view_message')}} {% elseif __view == 'modlog' %} {{block('view_modlog')}} {% elseif __view == 'post' %} {{block('view_post')}} {% elseif __view == 'preview' %} {{block('view_preview')}} {% elseif __view == 'options' %} {{block('view_options')}} {% elseif __view == 'redirect' %} {{block('view_redirect')}} {% elseif __view == 'new_thread' %} {{block('view_new_thread')}} {% elseif __view == 'search' %} {{block('view_search')}} {% elseif __view == 'invite' %} {{block('view_invite')}} {% elseif __view == 'join' %} {{block('view_join')}} {% endif %}