Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 96 lines (88 sloc) 4.048 kB
da9748f Initial version.
Matthias Mees authored
1 <?php
2 if (IN_serendipity !== true) { die ("Don't hack!"); }
3
265d44b Simplified config.inc.php, thanks to Timbalu.
Matthias Mees authored
4 @serendipity_plugin_api::load_language(dirname(__FILE__));
da9748f Initial version.
Matthias Mees authored
5
265d44b Simplified config.inc.php, thanks to Timbalu.
Matthias Mees authored
6 $serendipity['smarty']->assign(array('currpage' => "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],
7 'currpage2' => $_SERVER['REQUEST_URI']));
da9748f Initial version.
Matthias Mees authored
8
732935e Removed legacy demo code.
Matthias Mees authored
9 function serendipity_smarty_html5time($timestamp) { return date("c", $timestamp); }
fe36523 @yellowled Finally figured out how to implement html5 time smarty patch by @ophi…
authored
10 if( defined('Smarty::SMARTY_VERSION') ) {
11 $serendipity['smarty']->registerPlugin('modifier', 'serendipity_html5time', 'serendipity_smarty_html5time');
12 } else {
13 // old Smarty 2 syntax
14 $serendipity['smarty']->register_modifier('serendipity_html5time', 'serendipity_smarty_html5time');
15 }
16
17 // function serendipity_smarty_html5time($timestamp) { return date("c", $timestamp); }
18 // $serendipity['smarty']->register_modifier('serendipity_smarty_html5time', 'serendipity_smarty_html5time');
13a4f30 @yellowled Added built-in support for required fields in comment and (standard) …
authored
19
8dc25de @yellowled Additional check if spamblock plugin is actually available.
authored
20 if (class_exists('serendipity_event_spamblock')) {
a17a399 @yellowled The Commentspice plugin now supports required fields as well.
authored
21 $required_fieldlist = serendipity_db_query("SELECT value FROM {$serendipity['dbPrefix']}config WHERE name LIKE '%spamblock%required_fields'", true, 'assoc');
22 } elseif (class_exists('serendipity_event_commentspice')) {
23 $required_fieldlist = serendipity_db_query("SELECT value FROM {$serendipity['dbPrefix']}config WHERE name LIKE '%commentspice%required_fields'", true, 'assoc');
24 }
25 if (is_array($required_fieldlist)) {
26 $required_fields = explode(',', $required_fieldlist['value']);
27 $smarty_required_fields = array();
28 foreach($required_fields AS $required_field) {
29 $required_field = trim($required_field);
30 if (empty($required_field)) continue;
31 $smarty_required_fields[$required_field] = $required_field;
32 }
33 $serendipity['smarty']->assign('required_fields', $smarty_required_fields);
13a4f30 @yellowled Added built-in support for required fields in comment and (standard) …
authored
34 }
a7e313e Added a smarty modifier to emit proper HTML5 timezone offset for time…
Matthias Mees authored
35
da9748f Initial version.
Matthias Mees authored
36 $template_config = array(
265d44b Simplified config.inc.php, thanks to Timbalu.
Matthias Mees authored
37 array(
38 'var' => 'date_format',
39 'name' => GENERAL_PLUGIN_DATEFORMAT . " (http://php.net/strftime)",
40 'type' => 'select',
41 'default' => DATE_FORMAT_ENTRY,
42 'select_values' => array(DATE_FORMAT_ENTRY => DATE_FORMAT_ENTRY,
106a4d9 @yellowled Added some more useful date formats.
authored
43 '%A, %e. %B %Y' => '%A, %e. %B %Y',
265d44b Simplified config.inc.php, thanks to Timbalu.
Matthias Mees authored
44 '%a, %e. %B %Y' => '%a, %e. %B %Y',
3152cae @yellowled An additional date format.
authored
45 '%e. %B %Y' => '%e. %B %Y',
2fd20a8 @yellowled Adjusted date formats.
authored
46 '%d.%m.%y' => '%d.%m.%y',
83d4500 @yellowled Added full year date formats.
authored
47 '%d.%m.%Y' => '%d.%m.%Y',
106a4d9 @yellowled Added some more useful date formats.
authored
48 '%A, %m/%d/%Y' => '%A, %m/%d/%Y',
49 '%a, %m/%d/%y' => '%a, %m/%d/%y',
2fd20a8 @yellowled Adjusted date formats.
authored
50 '%m/%d/%y' => '%m/%d/%y',
83d4500 @yellowled Added full year date formats.
authored
51 '%m/%d/%Y' => '%m/%d/%Y',
6de5281 @yellowled Removed more redundant date formats.
authored
52 '%Y-%m-%d' => '%Y-%m-%d')
265d44b Simplified config.inc.php, thanks to Timbalu.
Matthias Mees authored
53 ),
54 array(
55 'var' => 'header_img',
56 'name' => TWOK11_HEADER_IMG,
57 'type' => 'media',
58 'default' => serendipity_getTemplateFile('header.jpg')
59 ),
60 array(
61 'var' => 'webfonts',
62 'name' => TWOK11_WEBFONTS,
63 'type' => 'select',
64 'default' => 'none',
65 'select_values' => array('none' => TWOK11_NOWEBFONT,
66 'droid' => 'Droid Sans',
67 'ptsans' => 'PT Sans',
68 'osans' => 'Open Sans',
69 'cabin' => 'Cabin',
a35a127 @yellowled Added Droid Serif as additional Webfont choice.
authored
70 'ubuntu' => 'Ubuntu',
71 'dserif' => 'Droid Serif')
265d44b Simplified config.inc.php, thanks to Timbalu.
Matthias Mees authored
72 ),
73 array(
74 'var' => 'userstyles',
75 'name' => TWOK11_USERSTYLES,
76 'type' => 'boolean',
77 'default' => false
8c411f0 Added theme option to suppress global nav (manually) altogether.
Matthias Mees authored
78 ),
79 array(
bd89302 @yellowled New theme option: Add a link to related comment to comments which are…
authored
80 'var' => 'refcomments',
81 'name' => TWOK11_REFCOMMENTS,
82 'type' => 'boolean',
83 'default' => false
84 ),
85 array(
8c411f0 Added theme option to suppress global nav (manually) altogether.
Matthias Mees authored
86 'var' => 'use_corenav',
87 'name' => TWOK11_USE_CORENAV,
88 'type' => 'boolean',
89 'default' => true
265d44b Simplified config.inc.php, thanks to Timbalu.
Matthias Mees authored
90 )
da9748f Initial version.
Matthias Mees authored
91 );
92
93 $template_global_config = array('navigation' => true);
265d44b Simplified config.inc.php, thanks to Timbalu.
Matthias Mees authored
94 $template_loaded_config = serendipity_loadThemeOptions($template_config, $serendipity['smarty_vars']['template_option'], true);
3152cae @yellowled An additional date format.
authored
95 serendipity_loadGlobalThemeOptions($template_config, $template_loaded_config, $template_global_config);
Something went wrong with that request. Please try again.