Browse Source

Add custom links to dashboard

pull/40/head
Michael Foster 11 years ago
parent
commit
6ba8f3f7de
  1. 12
      inc/config.php
  2. 30
      templates/mod/dashboard.html

12
inc/config.php

@ -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(

30
templates/mod/dashboard.html

@ -102,17 +102,29 @@
</fieldset>
{% if mod|hasPermission(config.mod.search) %}
<fieldset>
<legend>{% trans 'Search' %}</legend>
<ul>
<li>
{% include 'mod/search_form.html' %}
</li>
</ul>
</fieldset>
<fieldset>
<legend>{% trans 'Search' %}</legend>
<ul>
<li>
{% include 'mod/search_form.html' %}
</li>
</ul>
</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>

Loading…
Cancel
Save