(experimental) global theme options

This commit is contained in:
Garvin Hicking 2010-08-24 08:45:09 +00:00
parent a7b27ff06a
commit f9fa8503f0
68 changed files with 2264 additions and 2023 deletions
docs
include
lang
UTF-8
addlang.txtplugin_lang.phpserendipity_lang_bg.inc.phpserendipity_lang_cn.inc.phpserendipity_lang_cs.inc.phpserendipity_lang_cz.inc.phpserendipity_lang_da.inc.phpserendipity_lang_de.inc.phpserendipity_lang_en.inc.phpserendipity_lang_es.inc.phpserendipity_lang_fa.inc.phpserendipity_lang_fi.inc.phpserendipity_lang_fr.inc.phpserendipity_lang_hu.inc.phpserendipity_lang_is.inc.phpserendipity_lang_it.inc.phpserendipity_lang_ja.inc.phpserendipity_lang_ko.inc.phpserendipity_lang_nl.inc.phpserendipity_lang_no.inc.phpserendipity_lang_pl.inc.phpserendipity_lang_pt.inc.phpserendipity_lang_pt_PT.inc.phpserendipity_lang_ro.inc.phpserendipity_lang_ru.inc.phpserendipity_lang_sa.inc.phpserendipity_lang_se.inc.phpserendipity_lang_ta.inc.phpserendipity_lang_tn.inc.phpserendipity_lang_tr.inc.phpserendipity_lang_tw.inc.phpserendipity_lang_zh.inc.php
templates/bulletproof

@ -3,6 +3,16 @@
Version 1.6 ()
------------------------------------------------------------------------
* (experimental) global theme options (garvinhicking)
Inside template's config.inc.php you can enable a global
navigation configuration feature:
$template_global_config = array('navigation' => true);
serendipity_loadGlobalThemeOptions($template_config, $template_loaded_config, $template_global_config);
More keys apart from "navigation" might get supported in the future.
* Implemented suggestion of removing boilerplate code in plugin API:
Change hack protection, introduce unified language loading, see
http://board.s9y.org/viewtopic.php?f=11&t=16921

@ -27,11 +27,20 @@ class template_option {
function set_config($item, $value) {
global $serendipity;
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}options
WHERE okey = 't_" . serendipity_db_escape_string($serendipity['template']) . "'
AND name = '" . serendipity_db_escape_string($item) . "'");
serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}options (okey, name, value)
VALUES ('t_" . serendipity_db_escape_string($serendipity['template']) . "', '" . serendipity_db_escape_string($item) . "', '" . serendipity_db_escape_string($value) . "')");
if ($this->config[$item]['scope'] == 'global') {
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}options
WHERE okey = 't_global'
AND name = '" . serendipity_db_escape_string($item) . "'");
serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}options (okey, name, value)
VALUES ('t_global', '" . serendipity_db_escape_string($item) . "', '" . serendipity_db_escape_string($value) . "')");
} else {
serendipity_db_query("DELETE FROM {$serendipity['dbPrefix']}options
WHERE okey = 't_" . serendipity_db_escape_string($serendipity['template']) . "'
AND name = '" . serendipity_db_escape_string($item) . "'");
serendipity_db_query("INSERT INTO {$serendipity['dbPrefix']}options (okey, name, value)
VALUES ('t_" . serendipity_db_escape_string($serendipity['template']) . "', '" . serendipity_db_escape_string($item) . "', '" . serendipity_db_escape_string($value) . "')");
}
return true;
}
@ -70,8 +79,10 @@ if (is_array($template_config)) {
serendipity_plugin_api::hook_event('backend_templates_configuration_top', $template_config);
if ($serendipity['POST']['adminAction'] == 'configure' && serendipity_checkFormToken()) {
$storage = new template_option();
$storage->import($template_config);
foreach($serendipity['POST']['template'] AS $option => $value) {
template_option::set_config($option, $value);
$storage->set_config($option, $value);
}
echo '<div class="serendipityAdminMsgSuccess"><img style="height: 22px; width: 22px; border: 0px; padding-right: 4px; vertical-align: middle" src="' . serendipity_getTemplateFile('admin/img/admin_msg_success.png') . '" alt="" />' . DONE .': '. sprintf(SETTINGS_SAVED_AT, serendipity_strftime('%H:%M:%S')) . '</div>';
}
@ -82,8 +93,9 @@ if (is_array($template_config)) {
echo serendipity_setFormToken();
include S9Y_INCLUDE_PATH . 'include/functions_plugins_admin.inc.php';
$template_vars =& serendipity_loadThemeOptions($template_config);
$template_vars =& serendipity_loadThemeOptions($template_config);
$template_options = new template_option();
$template_options->import($template_config);
$template_options->values =& $template_vars;

@ -2070,7 +2070,8 @@ function &serendipity_loadThemeOptions(&$template_config, $okey = '') {
}
$_template_vars =& serendipity_db_query("SELECT name, value FROM {$serendipity['dbPrefix']}options
WHERE okey = 't_" . serendipity_db_escape_string($okey) . "'", false, 'assoc', false, 'name', 'value');
WHERE okey = 't_" . serendipity_db_escape_string($okey) . "'
OR okey = 't_global'", false, 'assoc', false, 'name', 'value');
if (!is_array($_template_vars)) {
$template_vars = array();
} else {
@ -2086,6 +2087,63 @@ function &serendipity_loadThemeOptions(&$template_config, $okey = '') {
return $template_vars;
}
/**
* Load global available/configured options for a specific theme
* into an array.
*
* @param array Referenced variable coming from the config.inc.php file, where the config values will be stored in
* @param array Current template configuration
* @return array Final return array with default values
*/
function serendipity_loadGlobalThemeOptions(&$template_config, &$template_loaded_config, $supported = array()) {
global $serendipity;
if ($supported['navigation']) {
$navlinks = array();
$conf_amount = array(
'var' => 'amount',
'name' => NAVLINK_AMOUNT,
'type' => 'string',
'default' => '5',
'scope' => 'global'
);
$template_config[] = $conf_amount;
if (empty($template_loaded_config['amount'])) {
$template_loaded_config['amount'] = $conf_amount['default'];
}
for ($i = 0; $i < $template_loaded_config['amount']; $i++) {
$navlinks[] = array(
'title' => $template_loaded_config['navlink' . $i . 'text'],
'href' => $template_loaded_config['navlink' . $i . 'url']
);
$template_config[] = array(
'var' => 'navlink' . $i . 'text',
'name' => NAV_LINK_TEXT . ' #' . ($i+1),
'type' => 'string',
'default' => 'Link #' . $i,
'scope' => 'global'
);
$template_config[] = array(
'var' => 'navlink' . $i . 'url',
'name' => NAV_LINK_URL . ' #' . ($i+1),
'type' => 'string',
'default' => '#',
'scope' => 'global'
);
}
$serendipity['smarty']->assign_by_ref('navlinks', $navlinks);
}
// Forward thinking. ;-)
serendipity_plugin_api::hook_event('backend_templates_globalthemeoptions', $template_config, $supported);
}
/**
* Check if a member of a group has permissions to execute a plugin

@ -851,7 +851,7 @@ function &serendipity_replaceSmartyVars($tpl_source, &$smarty) {
* @return null
*/
function serendipity_smarty_init($vars = array()) {
global $serendipity, $template_config;
global $serendipity, $template_config, $template_global_config;
if (!isset($serendipity['smarty'])) {
$template_dir = $serendipity['serendipityPath'] . $serendipity['templatePath'] . $serendipity['template'];

@ -146,3 +146,6 @@ foreach($const['missing'] AS $file => $constants) {
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -951,3 +951,6 @@ $i18n_filename_to = array('-', 'a', 'A', 'b', 'B', 'v', 'V', 'g', 'G', 'd', 'D
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_cn.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_cn.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translated by
@ -960,3 +960,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_da.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_da.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Tom Sommer, <ts@dreamcoder.dk>
@ -957,3 +957,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_de.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_de.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) Jannis Hermanns, Garvin Hicking and others
@ -960,3 +960,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_en.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_en.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
/* vim: set sts=4 ts=4 expandtab : */
@ -958,3 +958,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_es.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_es.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Luis Cervantes <LuisCervantes@ono.com>,
@ -976,3 +976,6 @@ Melvin TODO [20060128]: What spanish word do we use for "referrers" ??
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_fa.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_fa.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# this translation, translated by Omid Mottaghi <http://oxygenws.com>
@ -960,3 +960,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_fi.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_fi.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation by Mauri Sahlberg <mos@iki.fi>
@ -958,3 +958,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_fr.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_fr.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation by Sebastian Mordziol <argh@php-tools.net>
@ -965,3 +965,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -956,3 +956,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_is.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_is.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation by Örn Arnarson <orn@arnarson.net>
@ -959,3 +959,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -962,3 +962,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_ja.inc.php 2640 2010-02-28 19:27:58Z elf2000 $
<?php # $Id: serendipity_lang_ja.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) Tadashi Jokagi <elf2000@users.sourceforge.net>, 2004-2010.
@ -962,3 +962,6 @@
@define('PERMISSION_HIDDENGROUP', 'グループ/非著者を隠す');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_ko.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_ko.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translated by: Wesley Hwang-Chung <wesley96@gmail.com>
@ -961,3 +961,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_nl.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_nl.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Christiaan Heerze <webmaster@heimp.nl>
@ -960,3 +960,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_no.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_no.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Jo Christian Oterhals <oterhals@gmail.com>
@ -961,3 +961,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -957,3 +957,6 @@ $i18n_filename_to = array('_', 'a', 'A', 'a', 'A', 'b', 'B', 'c', 'C', 'c', 'C
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_pt.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_pt.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation (c) by Agner Olson <agner@agner.net>
@ -963,3 +963,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -970,3 +970,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -959,3 +959,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_ru.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_ru.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translation by Nightly <nightly@reys.net>
@ -962,3 +962,6 @@ $i18n_filename_to = array('_', 'a', 'A', 'b', 'B', 'v', 'V', 'g', 'G', 'd', 'D
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -877,3 +877,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -958,3 +958,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -958,3 +958,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_tn.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_tn.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translated by CapriSkye <admin@capriskye.com>
@ -962,3 +962,6 @@ $i18n_unknown = 'tw';
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -962,3 +962,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_tw.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_tw.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translated by CapriSkye <admin@capriskye.com>
@ -963,3 +963,6 @@ $i18n_unknown = 'tw';
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1,4 +1,4 @@
<?php # $Id: serendipity_lang_zh.inc.php 2627 2010-01-13 12:25:58Z garvinhicking $
<?php # $Id: serendipity_lang_zh.inc.php 2652 2010-04-30 11:03:36Z garvinhicking $
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
# Translated by
@ -959,3 +959,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -1 +1,3 @@
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -146,3 +146,6 @@ foreach($const['missing'] AS $file => $constants) {
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -951,3 +951,6 @@ $i18n_filename_to = array('-', 'a', 'A', 'b', 'B', 'v', 'V', 'g', 'G', 'd', 'D
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -960,3 +960,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -981,3 +981,6 @@ $i18n_filename_to = array (
@define('QUICKSEARCH_SORT_RELEVANCE', 'Relevance');
@define('PERMISSION_HIDDENGROUP', 'Skrytá skupina / Bez autora');
@define('SEARCH_FULLENTRY', 'Zobrazit celý pøíspìvek');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -981,3 +981,6 @@ $i18n_filename_to = array (
@define('QUICKSEARCH_SORT_RELEVANCE', 'Relevance');
@define('PERMISSION_HIDDENGROUP', 'Skrytá skupina / Bez autora');
@define('SEARCH_FULLENTRY', 'Zobrazit celý pøíspìvek');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -957,3 +957,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -960,3 +960,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -958,3 +958,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -976,3 +976,6 @@ Melvin TODO [20060128]: What spanish word do we use for "referrers" ??
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -960,3 +960,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -958,3 +958,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -965,3 +965,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -956,3 +956,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -959,3 +959,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -962,3 +962,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -962,3 +962,6 @@
@define('PERMISSION_HIDDENGROUP', 'グループ/非著者を隠す');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -961,3 +961,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -960,3 +960,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -961,3 +961,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -957,3 +957,6 @@ $i18n_filename_to = array('_', 'a', 'A', 'a', 'A', 'b', 'B', 'c', 'C', 'c', 'C
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -963,3 +963,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -970,3 +970,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -959,3 +959,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -962,3 +962,6 @@ $i18n_filename_to = array('_', 'a', 'A', 'b', 'B', 'v', 'V', 'g', 'G', 'd', 'D
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -877,3 +877,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -958,3 +958,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -958,3 +958,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -962,3 +962,6 @@ $i18n_unknown = 'tw';
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -962,3 +962,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -963,3 +963,6 @@ $i18n_unknown = 'tw';
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -959,3 +959,6 @@
@define('PERMISSION_HIDDENGROUP', 'Hidden group / Non-Author');
@define('SEARCH_FULLENTRY', 'Show full entry');
@define('NAVLINK_AMOUNT', 'Enter number of links in the navbar (needs reload of the Manage Styles page)');
@define('NAV_LINK_TEXT', 'Enter the navbar link text');
@define('NAV_LINK_URL', 'Enter the full URL of your link');

@ -280,36 +280,11 @@ $template_config = array(
'type' => 'string',
'default' => SITENAV_TITLE_TEXT,
),
array(
'var' => 'amount',
'name' => NAVLINK_AMOUNT,
'type' => 'string',
'default' => '5',
)
);
$template_global_config = array('navigation' => true);
$template_loaded_config = serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option']);
$navlinks = array();
for ($i = 0; $i < $template_loaded_config['amount']; $i++) {
$navlinks[] = array(
'title' => $template_loaded_config['navlink' . $i . 'text'],
'href' => $template_loaded_config['navlink' . $i . 'url']
);
$template_config[] = array(
'var' => 'navlink' . $i . 'text',
'name' => NAV_LINK_TEXT . ' #' . $i,
'type' => 'string',
'default' => 'Link #' . $i,
);
$template_config[] = array(
'var' => 'navlink' . $i . 'url',
'name' => NAV_LINK_URL . ' #' . $i,
'type' => 'string',
'default' => '#',
);
}
serendipity_loadGlobalThemeOptions($template_config, $template_loaded_config, $template_global_config);
if ($template_loaded_config['headerimage'] != '' && is_dir($_SERVER['DOCUMENT_ROOT'] . '/' . $template_loaded_config['headerimage'])) {
$files = array();
@ -327,8 +302,6 @@ if ($template_loaded_config['headerimage'] != '' && is_dir($_SERVER['DOCUMENT_RO
}
}
$serendipity['smarty']->assign_by_ref('navlinks', $navlinks);
// Allow colorset authors to include license and attribution data
$colorset_data = array(); // Maybe we'll want more data later...
$colorset_data['attribution'] = '';