2013-08-03 12:26:17 +02:00
< p >
Any changes you make here will simply be appended to < code > {{ file }}< / code > . If you wish to make the most of Tinyboard's customizability, you can instead edit the file directly. This page is intended for making quick changes and for those who don't have a basic understanding of PHP code.
< / p >
2018-10-12 08:47:38 +02:00
{% if boards|length %}
2013-08-03 12:26:17 +02:00
< ul >
{% if board %}
< li > < a href = "?/config" > Edit site-wide config< / a > < / li >
{% endif %}
2023-03-29 23:59:28 +02:00
{% for _board in boards %}
{% if _board.uri != board %}
< li >
< a href = "?/config/{{ _board.uri }}" > Edit config for {{ config.board_abbreviation|sprintf(_board.uri) }}< / a >
< / li >
{% endif %}
2013-08-03 12:26:17 +02:00
{% endfor %}
< / ul >
{% endif %}
2012-05-20 12:20:50 +02:00
< form method = "post" action = "" >
2013-09-23 08:48:56 +02:00
< input type = "hidden" name = "token" value = "{{ token }}" >
2012-05-20 12:20:50 +02:00
< table class = "mod config-editor" >
< tr >
2013-08-03 12:26:17 +02:00
< th class = "minimal" > {% trans 'Name' %}< / th >
< th > {% trans 'Value' %}< / th >
< th class = "minimal" > {% trans 'Type' %}< / th >
< th > {% trans 'Description' %}< / th >
2012-05-20 12:20:50 +02:00
< / tr >
2023-03-29 23:59:28 +02:00
{% for var in conf %}
{% if var.type != 'array' %}
{% if var.name|length == 1 %}
{% set name = 'cf_' ~ var.name %}
{% else %}
{% set name = 'cf_' ~ var.name|join('/') %}
{% endif %}
2012-05-20 12:20:50 +02:00
2023-03-29 23:59:28 +02:00
< tr >
< th class = "minimal" >
{% if var.name|length == 1 %}
{{ var.name }}
{% else %}
{{ var.name|join(' → ') }}
{% endif %}
< / th >
2012-05-20 12:20:50 +02:00
2023-03-29 23:59:28 +02:00
< td >
{% if var.type == 'string' %}
< input name = "{{ name }}" type = "text" value = "{{ var.value|e }}" >
{% elseif var.permissions %}
< select name = "{{ name }}" >
{% for group_value, group_name in config.mod.groups %}
< option value = "{{ group_value }}" { % if var . value = = group_value % } selected { % endif % } >
{{ group_name }}
< / option >
{% endfor %}
< / select >
{% elseif var.type == 'integer' %}
< input name = "{{ name }}" type = "number" value = "{{ var.value|e }}" >
{% elseif var.type == 'boolean' %}
< input name = "{{ name }}" type = "checkbox" { % if var . value % } checked { % endif % } >
{% else %}
?
{% endif %}
{% if var.type == 'integer' or var.type == 'boolean' %}
< small > Default: < code > {{ var.default }}< / code > < / small >
{% endif %}
< / td >
< td class = "minimal" >
{{ var.type|e }}
< / td >
< td style = "word-wrap:break-word;width:50%" >
{{ var.comment|join(' ') }}
< / td >
< / tr >
{% endif %}
2012-05-20 12:20:50 +02:00
{% endfor %}
< / table >
< ul style = "padding:0;text-align:center;list-style:none" >
< li > < input name = "save" type = "submit" value = "{% trans 'Save changes' %}" > < / li >
< / ul >
< / form >