1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-25 07:50:23 +01:00

Add custom links to dashboard

This commit is contained in:
Michael Foster 2013-07-22 18:30:45 -04:00
parent aa598d28d1
commit 9a35acdd1e
2 changed files with 33 additions and 9 deletions

View File

@ -1089,6 +1089,18 @@
// Connection timeout, in seconds
$config['purge_timeout'] = 3;
// Additional mod.php?/ pages (for developers). Look in inc/mod/pages.php for help.
//$config['mod']['custom_pages']['/something/(\d+)'] = function($id) {
// global $config;
// if (!hasPermission($config['mod']['something']))
// error($config['error']['noaccess']);
// // ...
//};
// Add links to dashboard (will all be in "Other" category)
$config['mod']['dashboard_links'] = array();
// $config['mod']['dashboard_links']['Something'] = '?/something';
// Remote servers
// http://tinyboard.org/wiki/index.php?title=Multiple_Servers
//$config['remote']['static'] = array(

View File

@ -113,6 +113,18 @@
</fieldset>
{% endif %}
{% if config.mod.dashboard_links|count %}
<fieldset>
<legend>{% trans 'Other' %}</legend>
<ul>
{% for label,link in config.mod.dashboard_links %}
<li><a href="{{ link }}">{{ label }}</a></li>
{% endfor %}
</ul>
</fieldset>
{% endif %}
{% if config.debug %}
<fieldset>
<legend>{% trans 'Debug' %}</legend>