aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasudev Kamath <kamathvasudev@gmail.com>2012-07-06 22:47:27 +0530
committerVasudev Kamath <kamathvasudev@gmail.com>2012-07-06 22:47:27 +0530
commitba4db236ecff1ffdb56adc2715b3f53515f8cb34 (patch)
treef0b9928aade8aab95d1608890fde1918ce163754
parent6e4760dd9c512147309b5e4a98d25216610f81da (diff)
parenta122fecf50d06856a2ada8b564f711fb52c327f0 (diff)
downloadvolse-hubzilla-ba4db236ecff1ffdb56adc2715b3f53515f8cb34.tar.gz
volse-hubzilla-ba4db236ecff1ffdb56adc2715b3f53515f8cb34.tar.bz2
volse-hubzilla-ba4db236ecff1ffdb56adc2715b3f53515f8cb34.zip
Merge branch 'master' of git://github.com/friendica/friendica
-rw-r--r--boot.php59
-rw-r--r--database.sql45
-rw-r--r--include/Scrape.php2
-rw-r--r--include/api.php190
-rw-r--r--include/bb2diaspora.php228
-rw-r--r--include/bbcode.php75
-rw-r--r--include/conversation.php32
-rw-r--r--include/crypto.php33
-rw-r--r--include/datetime.php9
-rw-r--r--include/dba.php6
-rw-r--r--include/delivery.php6
-rwxr-xr-xinclude/diaspora.php145
-rw-r--r--include/enotify.php14
-rw-r--r--include/event.php16
-rw-r--r--include/follow.php36
-rw-r--r--include/html2bbcode.php2
-rwxr-xr-xinclude/items.php253
-rw-r--r--include/lock.php77
-rw-r--r--include/markdownify/LICENSE_LGPL.txt504
-rw-r--r--include/markdownify/TODO29
-rw-r--r--include/markdownify/example.php51
-rw-r--r--include/markdownify/markdownify.php1184
-rwxr-xr-xinclude/markdownify/markdownify_cli.php33
-rw-r--r--include/markdownify/markdownify_extra.php489
-rw-r--r--include/markdownify/parsehtml/parsehtml.php618
-rw-r--r--include/nav.php1
-rw-r--r--include/network.php21
-rw-r--r--include/notifier.php4
-rwxr-xr-xinclude/oembed.php3
-rw-r--r--include/onepoll.php2
-rw-r--r--include/plugin.php84
-rw-r--r--include/profile_advanced.php5
-rw-r--r--include/text.php80
-rw-r--r--include/user.php18
-rw-r--r--js/country.js2
-rw-r--r--js/jquery.js8
-rw-r--r--library/Smarty/COPYING.lib165
-rw-r--r--library/Smarty/README574
-rw-r--r--library/Smarty/SMARTY_2_BC_NOTES.txt109
-rw-r--r--library/Smarty/SMARTY_3.0_BC_NOTES.txt24
-rw-r--r--library/Smarty/SMARTY_3.1_NOTES.txt306
-rw-r--r--library/Smarty/change_log.txt2078
-rw-r--r--library/Smarty/demo/configs/test.conf5
-rw-r--r--library/Smarty/demo/index.php33
-rw-r--r--library/Smarty/demo/plugins/cacheresource.apc.php77
-rw-r--r--library/Smarty/demo/plugins/cacheresource.memcache.php91
-rw-r--r--library/Smarty/demo/plugins/cacheresource.mysql.php152
-rw-r--r--library/Smarty/demo/plugins/resource.extendsall.php60
-rw-r--r--library/Smarty/demo/plugins/resource.mysql.php76
-rw-r--r--library/Smarty/demo/plugins/resource.mysqls.php62
-rw-r--r--library/Smarty/demo/templates/footer.tpl2
-rw-r--r--library/Smarty/demo/templates/header.tpl5
-rw-r--r--library/Smarty/demo/templates/index.tpl82
-rw-r--r--library/Smarty/libs/Smarty.class.php1517
-rw-r--r--library/Smarty/libs/SmartyBC.class.php460
-rw-r--r--library/Smarty/libs/debug.tpl133
-rw-r--r--library/Smarty/libs/plugins/block.textformat.php113
-rw-r--r--library/Smarty/libs/plugins/function.counter.php78
-rw-r--r--library/Smarty/libs/plugins/function.cycle.php106
-rw-r--r--library/Smarty/libs/plugins/function.fetch.php214
-rw-r--r--library/Smarty/libs/plugins/function.html_checkboxes.php216
-rw-r--r--library/Smarty/libs/plugins/function.html_image.php159
-rw-r--r--library/Smarty/libs/plugins/function.html_options.php176
-rw-r--r--library/Smarty/libs/plugins/function.html_radios.php200
-rw-r--r--library/Smarty/libs/plugins/function.html_select_date.php394
-rw-r--r--library/Smarty/libs/plugins/function.html_select_time.php366
-rw-r--r--library/Smarty/libs/plugins/function.html_table.php177
-rw-r--r--library/Smarty/libs/plugins/function.mailto.php152
-rw-r--r--library/Smarty/libs/plugins/function.math.php87
-rw-r--r--library/Smarty/libs/plugins/modifier.capitalize.php65
-rw-r--r--library/Smarty/libs/plugins/modifier.date_format.php65
-rw-r--r--library/Smarty/libs/plugins/modifier.debug_print_var.php105
-rw-r--r--library/Smarty/libs/plugins/modifier.escape.php188
-rw-r--r--library/Smarty/libs/plugins/modifier.regex_replace.php55
-rw-r--r--library/Smarty/libs/plugins/modifier.replace.php33
-rw-r--r--library/Smarty/libs/plugins/modifier.spacify.php27
-rw-r--r--library/Smarty/libs/plugins/modifier.truncate.php59
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.cat.php30
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.count_characters.php33
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.count_paragraphs.php28
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.count_sentences.php28
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.count_words.php32
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.default.php35
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.escape.php125
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.from_charset.php34
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.indent.php32
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.lower.php31
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.noprint.php25
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.string_format.php26
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.strip.php33
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.strip_tags.php33
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.to_charset.php34
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.unescape.php51
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.upper.php30
-rw-r--r--library/Smarty/libs/plugins/modifiercompiler.wordwrap.php46
-rw-r--r--library/Smarty/libs/plugins/outputfilter.trimwhitespace.php94
-rw-r--r--library/Smarty/libs/plugins/shared.escape_special_chars.php51
-rw-r--r--library/Smarty/libs/plugins/shared.literal_compiler_param.php33
-rw-r--r--library/Smarty/libs/plugins/shared.make_timestamp.php42
-rw-r--r--library/Smarty/libs/plugins/shared.mb_str_replace.php55
-rw-r--r--library/Smarty/libs/plugins/shared.mb_unicode.php48
-rw-r--r--library/Smarty/libs/plugins/shared.mb_wordwrap.php83
-rw-r--r--library/Smarty/libs/plugins/variablefilter.htmlspecialchars.php21
-rw-r--r--library/Smarty/libs/sysplugins/smarty_cacheresource.php381
-rw-r--r--library/Smarty/libs/sysplugins/smarty_cacheresource_custom.php237
-rw-r--r--library/Smarty/libs/sysplugins/smarty_cacheresource_keyvaluestore.php463
-rw-r--r--library/Smarty/libs/sysplugins/smarty_config_source.php95
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_cacheresource_file.php266
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_append.php53
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_assign.php84
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_block.php277
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_break.php77
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_call.php130
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php98
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_config_load.php85
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_continue.php78
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_debug.php43
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_eval.php73
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_extends.php128
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_for.php151
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_foreach.php231
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_function.php165
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_if.php207
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_include.php215
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_include_php.php108
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_insert.php142
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_ldelim.php41
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_nocache.php73
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_private_block_plugin.php87
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_private_function_plugin.php73
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php140
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_private_object_block_function.php88
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_private_object_function.php79
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_private_print_expression.php156
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_private_registered_block.php113
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_private_registered_function.php81
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php107
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_rdelim.php41
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_section.php203
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_setfilter.php72
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compile_while.php94
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_compilebase.php176
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_config.php303
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_config_file_compiler.php144
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_configfilelexer.php622
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_configfileparser.php921
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_data.php551
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_debug.php206
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_filter_handler.php70
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_function_call_handler.php55
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_get_include_path.php48
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_nocache_insert.php53
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_parsetree.php395
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_resource_eval.php94
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_resource_extends.php157
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_resource_file.php90
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_resource_php.php114
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_resource_registered.php95
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_resource_stream.php76
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_resource_string.php96
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_smartytemplatecompiler.php127
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_template.php684
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_templatebase.php811
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php661
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_templatelexer.php1190
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_templateparser.php3250
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_utility.php830
-rw-r--r--library/Smarty/libs/sysplugins/smarty_internal_write_file.php88
-rw-r--r--library/Smarty/libs/sysplugins/smarty_resource.php860
-rw-r--r--library/Smarty/libs/sysplugins/smarty_resource_custom.php96
-rw-r--r--library/Smarty/libs/sysplugins/smarty_resource_recompiled.php36
-rw-r--r--library/Smarty/libs/sysplugins/smarty_resource_uncompiled.php44
-rw-r--r--library/Smarty/libs/sysplugins/smarty_security.php459
-rw-r--r--library/mcefixes/plugins.bbcode.editor_plugin_src.js16
-rw-r--r--library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js16
-rw-r--r--mod/admin.php6
-rw-r--r--mod/babel.php56
-rw-r--r--mod/content.php858
-rw-r--r--mod/dfrn_confirm.php2
-rw-r--r--mod/directory.php48
-rwxr-xr-xmod/events.php26
-rw-r--r--mod/item.php68
-rwxr-xr-xmod/like.php187
-rw-r--r--mod/lockview.php2
-rw-r--r--mod/message.php4
-rw-r--r--mod/parse_url.php4
-rw-r--r--mod/photos.php45
-rw-r--r--mod/profiles.php21
-rw-r--r--mod/settings.php27
-rw-r--r--mod/share.php29
-rw-r--r--mod/wall_attach.php13
-rw-r--r--mod/wall_upload.php13
-rw-r--r--update.php50
-rw-r--r--util/messages.po1546
-rw-r--r--view/content.tpl2
-rw-r--r--view/en/update_fail_eml.tpl2
-rw-r--r--view/eo/lostpass_eml.tpl2
-rw-r--r--view/eo/messages.po3392
-rw-r--r--view/eo/strings.php288
-rw-r--r--view/event_form.tpl4
-rw-r--r--view/photos_upload.tpl3
-rw-r--r--view/profile_advanced.tpl13
-rw-r--r--view/profile_edit.tpl24
-rw-r--r--view/theme/darkzero-NS/style.css27
-rw-r--r--view/theme/darkzero/style.css31
-rw-r--r--view/theme/diabook/diabook-aerith/style-wide.css38
-rw-r--r--view/theme/diabook/diabook-aerith/style.css57
-rw-r--r--view/theme/diabook/diabook-blue/style-wide.css66
-rw-r--r--view/theme/diabook/diabook-blue/style.css57
-rw-r--r--view/theme/diabook/diabook-dark/style.css57
-rw-r--r--view/theme/diabook/diabook-green/style-wide.css38
-rw-r--r--view/theme/diabook/diabook-green/style.css57
-rw-r--r--view/theme/diabook/diabook-pink/style-wide.css66
-rw-r--r--view/theme/diabook/diabook-pink/style.css57
-rw-r--r--view/theme/diabook/diabook-red/style-wide.css38
-rw-r--r--view/theme/diabook/diabook-red/style.css57
-rw-r--r--view/theme/diabook/directory_item.tpl35
-rw-r--r--view/theme/diabook/jot.tpl2
-rw-r--r--view/theme/diabook/style.css54
-rw-r--r--view/theme/diabook/theme.php2
-rw-r--r--view/theme/dispy/conversation.tpl5
-rw-r--r--view/theme/dispy/dark/style.css10
-rw-r--r--view/theme/dispy/dark/style.less22
-rw-r--r--view/theme/dispy/jot.tpl55
-rw-r--r--view/theme/dispy/light/style.css10
-rw-r--r--view/theme/dispy/light/style.less22
-rw-r--r--view/theme/dispy/wall_item.tpl6
-rw-r--r--view/theme/dispy/wallwall_item.tpl6
-rw-r--r--view/theme/duepuntozero/style.css45
-rw-r--r--view/theme/facepark/screenshot.jpgbin0 -> 76017 bytes
-rw-r--r--view/theme/quattro/Makefile5
-rw-r--r--view/theme/quattro/dark/style.css261
-rw-r--r--view/theme/quattro/green/style.css261
-rw-r--r--view/theme/quattro/icons.less7
-rw-r--r--view/theme/quattro/icons/addon_off.pngbin438 -> 834 bytes
-rw-r--r--view/theme/quattro/icons/addon_on.pngbin428 -> 715 bytes
-rw-r--r--view/theme/quattro/icons/dislike.pngbin0 -> 386 bytes
-rw-r--r--view/theme/quattro/icons/like.pngbin0 -> 388 bytes
-rw-r--r--view/theme/quattro/icons/next.pngbin0 -> 300 bytes
-rw-r--r--view/theme/quattro/icons/prev.pngbin0 -> 336 bytes
-rw-r--r--view/theme/quattro/photo_view.tpl37
-rw-r--r--view/theme/quattro/quattro.less111
-rw-r--r--view/theme/slackr/birthdays_reminder.tpl7
-rw-r--r--view/theme/slackr/style.css11
-rw-r--r--view/theme/testbubble/style.css6
-rw-r--r--view/wall_item.tpl4
-rw-r--r--view/wallwall_item.tpl4
-rw-r--r--view/xrd_host.tpl11
-rw-r--r--view/xrd_person.tpl11
249 files changed, 38603 insertions, 2980 deletions
diff --git a/boot.php b/boot.php
index be47184aa..effe23785 100644
--- a/boot.php
+++ b/boot.php
@@ -10,9 +10,9 @@ require_once('include/nav.php');
require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
-define ( 'FRIENDICA_VERSION', '3.0.1382' );
+define ( 'FRIENDICA_VERSION', '3.0.1395' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
-define ( 'DB_UPDATE_VERSION', 1149 );
+define ( 'DB_UPDATE_VERSION', 1153 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
@@ -34,6 +34,24 @@ define ( 'JPEG_QUALITY', 100 );
*/
define ( 'PNG_QUALITY', 8 );
+/**
+ *
+ * An alternate way of limiting picture upload sizes. Specify the maximum pixel
+ * length that pictures are allowed to be (for non-square pictures, it will apply
+ * to the longest side). Pictures longer than this length will be resized to be
+ * this length (on the longest side, the other side will be scaled appropriately).
+ * Modify this value using
+ *
+ * $a->config['system']['max_image_length'] = n;
+ *
+ * in .htconfig.php
+ *
+ * If you don't want to set a maximum length, set to -1. The default value is
+ * defined by 'MAX_IMAGE_LENGTH' below.
+ *
+ */
+define ( 'MAX_IMAGE_LENGTH', -1 );
+
/**
* Not yet used
@@ -178,6 +196,22 @@ define ( 'NOTIFY_SYSTEM', 0x8000 );
/**
+ * Tag/term types
+ */
+
+define ( 'TERM_UNKNOWN', 0 );
+define ( 'TERM_HASHTAG', 1 );
+define ( 'TERM_MENTION', 2 );
+define ( 'TERM_CATEGORY', 3 );
+define ( 'TERM_PCATEGORY', 4 );
+define ( 'TERM_FILE', 5 );
+
+define ( 'TERM_OBJ_POST', 1 );
+define ( 'TERM_OBJ_PHOTO', 2 );
+
+
+
+/**
* various namespaces we may need to parse
*/
@@ -352,6 +386,16 @@ if(! class_exists('App')) {
if(x($_SERVER,'SERVER_NAME')) {
$this->hostname = $_SERVER['SERVER_NAME'];
+
+ // See bug 437 - this didn't work so disabling it
+ //if(stristr($this->hostname,'xn--')) {
+ // PHP or webserver may have converted idn to punycode, so
+ // convert punycode back to utf-8
+ // require_once('library/simplepie/idn/idna_convert.class.php');
+ // $x = new idna_convert();
+ // $this->hostname = $x->decode($_SERVER['SERVER_NAME']);
+ //}
+
if(x($_SERVER,'SERVER_PORT') && $_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443)
$this->hostname .= ':' . $_SERVER['SERVER_PORT'];
/**
@@ -434,6 +478,8 @@ if(! class_exists('App')) {
$this->pager['page'] = ((x($_GET,'page') && intval($_GET['page']) > 0) ? intval($_GET['page']) : 1);
$this->pager['itemspage'] = 50;
$this->pager['start'] = ($this->pager['page'] * $this->pager['itemspage']) - $this->pager['itemspage'];
+ if($this->pager['start'] < 0)
+ $this->pager['start'] = 0;
$this->pager['total'] = 0;
}
@@ -1252,6 +1298,9 @@ if(! function_exists('get_birthdays')) {
'$event_reminders' => t('Birthday Reminders'),
'$event_title' => t('Birthdays this week:'),
'$events' => $r,
+ '$lbr' => '{', // raw brackets mess up if/endif macro processing
+ '$rbr' => '}'
+
));
}
}
@@ -1374,9 +1423,9 @@ if(! function_exists('proc_run')) {
if(count($args) && $args[0] === 'php')
$args[0] = ((x($a->config,'php_path')) && (strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php');
- foreach ($args as $arg){
- $arg = escapeshellarg($arg);
- }
+ for($x = 0; $x < count($args); $x ++)
+ $args[$x] = escapeshellarg($args[$x]);
+
$cmdline = implode($args," ");
proc_close(proc_open($cmdline." &",array(),$foo));
}
diff --git a/database.sql b/database.sql
index 53dc0c5b2..1d0a32176 100644
--- a/database.sql
+++ b/database.sql
@@ -254,6 +254,7 @@ CREATE TABLE IF NOT EXISTS `event` (
`edited` datetime NOT NULL,
`start` datetime NOT NULL,
`finish` datetime NOT NULL,
+ `summary` text NOT NULL,
`desc` text NOT NULL,
`location` text NOT NULL,
`type` char(255) NOT NULL,
@@ -263,7 +264,14 @@ CREATE TABLE IF NOT EXISTS `event` (
`allow_gid` mediumtext NOT NULL,
`deny_cid` mediumtext NOT NULL,
`deny_gid` mediumtext NOT NULL,
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `uid` ( `uid` ),
+ KEY `cid` ( `cid` ),
+ KEY `uri` ( `uri` ),
+ KEY `type` ( `type` ),
+ KEY `start` ( `start` ),
+ KEY `finish` ( `finish` ),
+ KEY `adjust` ( `adjust` )
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
@@ -591,6 +599,19 @@ CREATE TABLE IF NOT EXISTS `item_id` (
-- --------------------------------------------------------
--
+-- Table structure for table `locks`
+--
+
+CREATE TABLE `locks` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `name` char(128) NOT NULL,
+ `locked` tinyint(1) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
-- Table structure for table `mail`
--
@@ -831,6 +852,8 @@ CREATE TABLE IF NOT EXISTS `profile` (
`religion` char(255) NOT NULL,
`pub_keywords` text NOT NULL,
`prv_keywords` text NOT NULL,
+ `likes` text NOT NULL,
+ `dislikes` text NOT NULL,
`about` text NOT NULL,
`summary` char(255) NOT NULL,
`music` text NOT NULL,
@@ -978,6 +1001,26 @@ CREATE TABLE IF NOT EXISTS `spam` (
-- --------------------------------------------------------
--
+-- Table structure for table `term`
+--
+
+CREATE TABLE IF NOT EXISTS `term` (
+ `tid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
+ `oid` INT UNSIGNED NOT NULL ,
+ `otype` TINYINT( 3 ) UNSIGNED NOT NULL ,
+ `type` TINYINT( 3 ) UNSIGNED NOT NULL ,
+ `term` CHAR( 255 ) NOT NULL ,
+ `url` CHAR( 255 ) NOT NULL,
+ PRIMARY KEY (`tid`),
+ KEY `oid` ( `oid` ),
+ KEY `otype` ( `otype` ),
+ KEY `type` ( `type` ),
+ KEY `term` ( `term` )
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
+--
-- Table structure for table `tokens`
--
diff --git a/include/Scrape.php b/include/Scrape.php
index 4f53effe9..b784650cd 100644
--- a/include/Scrape.php
+++ b/include/Scrape.php
@@ -432,7 +432,7 @@ function probe_url($url, $mode = PROBE_NORMAL) {
intval(local_user())
);
if(count($x) && count($r)) {
- $mailbox = construct_mailbox_name($r[0]);
+ $mailbox = construct_mailbox_name($r[0]);
$password = '';
openssl_private_decrypt(hex2bin($r[0]['pass']),$password,$x[0]['prvkey']);
$mbox = email_connect($mailbox,$r[0]['user'],$password);
diff --git a/include/api.php b/include/api.php
index b77156dfa..d790b4b87 100644
--- a/include/api.php
+++ b/include/api.php
@@ -565,18 +565,19 @@
if(requestdata('lat') && requestdata('long'))
$_REQUEST['coord'] = sprintf("%s %s",requestdata('lat'),requestdata('long'));
$_REQUEST['profile_uid'] = local_user();
- if(requestdata('parent'))
+
+ if($parent)
$_REQUEST['type'] = 'net-comment';
else {
$_REQUEST['type'] = 'wall';
- if(x($_FILES,'media')) {
- // upload the image if we have one
- $_REQUEST['hush']='yeah'; //tell wall_upload function to return img info instead of echo
- require_once('mod/wall_upload.php');
- $media = wall_upload_post($a);
- if(strlen($media)>0)
- $_REQUEST['body'] .= "\n\n".$media;
- }
+ if(x($_FILES,'media')) {
+ // upload the image if we have one
+ $_REQUEST['hush']='yeah'; //tell wall_upload function to return img info instead of echo
+ require_once('mod/wall_upload.php');
+ $media = wall_upload_post($a);
+ if(strlen($media)>0)
+ $_REQUEST['body'] .= "\n\n".$media;
+ }
}
// set this so that the item_post() function is quiet and doesn't redirect or emit json
@@ -864,8 +865,13 @@
logger('API: api_statuses_show: '.$id);
//$include_entities = (x($_REQUEST,'include_entities')?$_REQUEST['include_entities']:false);
- //$sql_extra = "";
- if ($_GET["conversation"] == "true") $sql_extra .= " AND `item`.`parent` = %d ORDER BY `received` ASC "; else $sql_extra .= " AND `item`.`id` = %d";
+ $conversation = (x($_REQUEST,'conversation')?1:0);
+
+ $sql_extra = '';
+ if ($conversation)
+ $sql_extra .= " AND `item`.`parent` = %d ORDER BY `received` ASC ";
+ else
+ $sql_extra .= " AND `item`.`id` = %d";
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
@@ -875,16 +881,15 @@
WHERE `item`.`visible` = 1 and `item`.`moderated` = 0 AND `item`.`deleted` = 0
AND `contact`.`id` = `item`.`contact-id`
AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
- $sql_extra
- ",
+ $sql_extra",
intval($id)
);
-//var_dump($r);
+
$ret = api_format_items($r,$user_info);
-//var_dump($ret);
- if ($_GET["conversation"] == "true") {
+
+ if ($conversation) {
$data = array('$statuses' => $ret);
- return api_apply_template("timeline", $type, $data);
+ return api_apply_template("timeline", $type, $data);
} else {
$data = array('$status' => $ret[0]);
/*switch($type){
@@ -1233,6 +1238,40 @@
return($as);
}
+ function api_format_messages($item, $recipient, $sender) {
+ // standard meta information
+ $ret=Array(
+ 'id' => $item['id'],
+ 'created_at' => api_date($item['created']),
+ 'sender_id' => $sender['id'] ,
+ 'sender_screen_name' => $sender['screen_name'],
+ 'sender' => $sender,
+ 'recipient_id' => $recipient['id'],
+ 'recipient_screen_name' => $recipient['screen_name'],
+ 'recipient' => $recipient,
+ );
+
+ //don't send title to regular StatusNET requests to avoid confusing these apps
+ if (x($_GET, 'getText')) {
+ $ret['title'] = $item['title'] ;
+ if ($_GET["getText"] == "html") {
+ $ret['text'] = bbcode($item['body']);
+ }
+ elseif ($_GET["getText"] == "plain") {
+ $ret['text'] = html2plain(bbcode($item['body']), 0);
+ }
+ }
+ else {
+ $ret['text'] = $item['title']."\n".html2plain(bbcode($item['body']), 0);
+ }
+ if (isset($_GET["getUserObjects"]) && $_GET["getUserObjects"] == "false") {
+ unset($ret['sender']);
+ unset($ret['recipient']);
+ }
+
+ return $ret;
+ }
+
function api_format_items($r,$user_info) {
//logger('api_format_items: ' . print_r($r,true));
@@ -1429,7 +1468,13 @@
'logo' => $logo, 'fancy' => 'true', 'language' => 'en', 'email' => $email, 'broughtby' => '',
'broughtbyurl' => '', 'timezone' => 'UTC', 'closed' => $closed, 'inviteonly' => 'false',
'private' => $private, 'textlimit' => $textlimit, 'sslserver' => $sslserver, 'ssl' => $ssl,
- 'shorturllength' => '30'
+ 'shorturllength' => '30',
+ 'friendica' => array(
+ 'FRIENDICA_PLATFORM' => FRIENDICA_PLATFORM,
+ 'FRIENDICA_VERSION' => FRIENDICA_VERSION,
+ 'DFRN_PROTOCOL_VERSION' => DFRN_PROTOCOL_VERSION,
+ 'DB_UPDATE_VERSION' => DB_UPDATE_VERSION
+ )
),
);
@@ -1503,37 +1548,39 @@
if (local_user()===false) return false;
if (!x($_POST, "text") || !x($_POST,"screen_name")) return;
-
+
$sender = api_get_user($a);
+ require_once("include/message.php");
+
$r = q("SELECT `id` FROM `contact` WHERE `uid`=%d AND `nick`='%s'",
intval(local_user()),
dbesc($_POST['screen_name']));
-
+
$recipient = api_get_user($a, $r[0]['id']);
-
+ $replyto = '';
+ $sub = '';
+ if (x($_REQUEST,'replyto')) {
+ $r = q('SELECT `parent-uri`, `title` FROM `mail` WHERE `uid`=%d AND `id`=%d',
+ intval(local_user()),
+ intval($_REQUEST['replyto']));
+ $replyto = $r[0]['parent-uri'];
+ $sub = $r[0]['title'];
+ }
+ else {
+ if (x($_REQUEST,'title')) {
+ $sub = $_REQUEST['title'];
+ }
+ else {
+ $sub = ((strlen($_POST['text'])>10)?substr($_POST['text'],0,10)."...":$_POST['text']);
+ }
+ }
+
+ $id = send_message($recipient['id'], $_POST['text'], $sub, $replyto);
- require_once("include/message.php");
- $sub = ( (strlen($_POST['text'])>10)?substr($_POST['text'],0,10)."...":$_POST['text']);
- $id = send_message($recipient['id'], $_POST['text'], $sub);
-
-
if ($id>-1) {
$r = q("SELECT * FROM `mail` WHERE id=%d", intval($id));
- $item = $r[0];
- $ret=Array(
- 'id' => $item['id'],
- 'created_at'=> api_date($item['created']),
- 'sender_id'=> $sender['id'] ,
- 'sender_screen_name'=> $sender['screen_name'],
- 'sender'=> $sender,
- 'recipient_id'=> $recipient['id'],
- 'recipient_screen_name'=> $recipient['screen_name'],
- 'recipient'=> $recipient,
-
- 'text'=> $item['title']."\n".html2plain(bbcode($item['body']), 0) ,
-
- );
+ $ret = api_format_messages($r[0], $recipient, $sender);
} else {
$ret = array("error"=>$id);
@@ -1552,7 +1599,7 @@
}
api_register_func('api/direct_messages/new','api_direct_messages_new',true);
- function api_direct_messages_box(&$a, $type, $box) {
+ function api_direct_messages_box(&$a, $type, $box) {
if (local_user()===false) return false;
$user_info = api_get_user($a);
@@ -1564,46 +1611,37 @@
$start = $page*$count;
-
+ $profile_url = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
if ($box=="sentbox") {
- $sql_extra = "`from-url`='%s'";
- } else {
- $sql_extra = "`from-url`!='%s'";
+ $sql_extra = "`from-url`='".dbesc( $profile_url )."'";
+ }
+ elseif ($box=="conversation") {
+ $sql_extra = "`parent-uri`='".dbesc( $_GET["uri"] ) ."'";
+ }
+ elseif ($box=="all") {
+ $sql_extra = "true";
+ }
+ elseif ($box=="inbox") {
+ $sql_extra = "`from-url`!='".dbesc( $profile_url )."'";
}
$r = q("SELECT * FROM `mail` WHERE uid=%d AND $sql_extra ORDER BY created DESC LIMIT %d,%d",
intval(local_user()),
- dbesc( $a->get_baseurl() . '/profile/' . $a->user['nickname'] ),
intval($start), intval($count)
- );
+ );
$ret = Array();
- foreach($r as $item){
- switch ($box){
- case "inbox":
- $recipient = $user_info;
- $sender = api_get_user($a,$item['contact-id']);
- break;
- case "sentbox":
- $recipient = api_get_user($a,$item['contact-id']);
- $sender = $user_info;
- break;
+ foreach($r as $item) {
+ if ($box == "inbox" || $item['from-url'] != $profile_url){
+ $recipient = $user_info;
+ $sender = api_get_user($a,$item['contact-id']);
}
-
- $ret[]=Array(
- 'id' => $item['id'],
- 'created_at'=> api_date($item['created']),
- 'sender_id'=> $sender['id'] ,
- 'sender_screen_name'=> $sender['screen_name'],
- 'sender'=> $sender,
- 'recipient_id'=> $recipient['id'],
- 'recipient_screen_name'=> $recipient['screen_name'],
- 'recipient'=> $recipient,
-
- 'text'=> $item['title']."\n".html2plain(bbcode($item['body']), 0) ,
-
- );
-
+ elseif ($box == "sentbox" || $item['from-url'] != $profile_url){
+ $recipient = api_get_user($a,$item['contact-id']);
+ $sender = $user_info;
+ }
+
+ $ret[]=api_format_messages($item, $recipient, $sender);
}
@@ -1624,6 +1662,14 @@
function api_direct_messages_inbox(&$a, $type){
return api_direct_messages_box($a, $type, "inbox");
}
+ function api_direct_messages_all(&$a, $type){
+ return api_direct_messages_box($a, $type, "all");
+ }
+ function api_direct_messages_conversation(&$a, $type){
+ return api_direct_messages_box($a, $type, "conversation");
+ }
+ api_register_func('api/direct_messages/conversation','api_direct_messages_conversation',true);
+ api_register_func('api/direct_messages/all','api_direct_messages_all',true);
api_register_func('api/direct_messages/sent','api_direct_messages_sentbox',true);
api_register_func('api/direct_messages','api_direct_messages_inbox',true);
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index d86ba4543..042177fd9 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -1,10 +1,11 @@
<?php
require_once("include/oembed.php");
-require_once('include/event.php');
-
-require_once('library/markdown.php');
-require_once('include/html2bbcode.php');
+require_once("include/event.php");
+require_once("library/markdown.php");
+require_once("include/html2bbcode.php");
+require_once("include/bbcode.php");
+require_once("include/markdownify/markdownify.php");
// we don't want to support a bbcode specific markdown interpreter
// and the markdown library we have is pretty good, but provides HTML output.
@@ -37,12 +38,15 @@ function diaspora2bb($s) {
$s = Markdown($s);
$s = str_replace('&#35;','#',$s);
-
- $s = str_replace("\n",'<br />',$s);
+// we seem to have double linebreaks
+// $s = str_replace("\n",'<br />',$s);
$s = html2bbcode($s);
// $s = str_replace('&#42;','*',$s);
+ // protect the recycle symbol from turning into a tag, but without unescaping angles and naked ampersands
+ $s = str_replace('&#x2672;',html_entity_decode('&#x2672;',ENT_QUOTES,'UTF-8'),$s);
+
// Convert everything that looks like a link to a link
$s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1[url=$2$3]$2$3[/url]',$s);
@@ -66,9 +70,124 @@ function stripdcode_br_cb($s) {
}
+//////////////////////
+// The following "diaspora_ul" and "diaspora_ol" are only appropriate for the
+// pre-Markdownify conversion. If Markdownify isn't used, use the non-Markdownify
+// versions below
+//////////////////////
+/*
+function diaspora_ul($s) {
+ // Replace "[*]" followed by any number (including zero) of
+ // spaces by "* " to match Diaspora's list format
+ if( strpos($s[0], "[list]") === 0 )
+ return '<ul class="listbullet" style="list-style-type: circle;">' . preg_replace("/\[\*\]( *)/", "* ", $s[1]) . '</ul>';
+ elseif( strpos($s[0], "[ul]") === 0 )
+ return '<ul class="listbullet" style="list-style-type: circle;">' . preg_replace("/\[\*\]( *)/", "* ", $s[1]) . '</ul>';
+ else
+ return $s[0];
+}
+
+
+function diaspora_ol($s) {
+ // A hack: Diaspora will create a properly-numbered ordered list even
+ // if you use '1.' for each element of the list, like:
+ // 1. First element
+ // 1. Second element
+ // 1. Third element
+ if( strpos($s[0], "[list=1]") === 0 )
+ return '<ul class="listdecimal" style="list-style-type: decimal;">' . preg_replace("/\[\*\]( *)/", "1. ", $s[1]) . '</ul>';
+ elseif( strpos($s[0], "[list=i]") === 0 )
+ return '<ul class="listlowerroman" style="list-style-type: lower-roman;">' . preg_replace("/\[\*\]( *)/", "1. ", $s[1]) . '</ul>';
+ elseif( strpos($s[0], "[list=I]") === 0 )
+ return '<ul class="listupperroman" style="list-style-type: upper-roman;">' . preg_replace("/\[\*\]( *)/", "1. ", $s[1]) . '</ul>';
+ elseif( strpos($s[0], "[list=a]") === 0 )
+ return '<ul class="listloweralpha" style="list-style-type: lower-alpha;">' . preg_replace("/\[\*\]( *)/", "1. ", $s[1]) . '</ul>';
+ elseif( strpos($s[0], "[list=A]") === 0 )
+ return '<ul class="listupperalpha" style="list-style-type: upper-alpha;">' . preg_replace("/\[\*\]( *)/", "1. ", $s[1]) . '</ul>';
+ elseif( strpos($s[0], "[ol]") === 0 )
+ return '<ul class="listdecimal" style="list-style-type: decimal;">' . preg_replace("/\[\*\]( *)/", "1. ", $s[1]) . '</ul>';
+ else
+ return $s[0];
+}
+*/
+
+//////////////////////
+// Non-Markdownify versions of "diaspora_ol" and "diaspora_ul"
+//////////////////////
+function diaspora_ul($s) {
+ // Replace "[\\*]" followed by any number (including zero) of
+ // spaces by "* " to match Diaspora's list format
+ return preg_replace("/\[\\\\\*\]( *)/", "* ", $s[1]);
+}
+
+function diaspora_ol($s) {
+ // A hack: Diaspora will create a properly-numbered ordered list even
+ // if you use '1.' for each element of the list, like:
+ // 1. First element
+ // 1. Second element
+ // 1. Third element
+ return preg_replace("/\[\\\\\*\]( *)/", "1. ", $s[1]);
+}
+
function bb2diaspora($Text,$preserve_nl = false) {
+//////////////////////
+// An attempt was made to convert bbcode to html and then to markdown
+// consisting of the following lines.
+// I'm undoing this as we have a lot of bbcode constructs which
+// were simply getting lost, for instance bookmark, vimeo, video, youtube, events, etc.
+// We can try this again, but need a very good test sequence to verify
+// all the major bbcode constructs that we use are getting through.
+//////////////////////
+/*
+ // bbcode() will convert "[*]" into "<li>" with no closing "</li>"
+ // Markdownify() is unable to handle these, as it makes each new
+ // "<li>" into a deeper nested element until it crashes. So pre-format
+ // the lists as Diaspora lists before sending the $Text to bbcode()
+ //
+ // Note that to get nested lists to work for Diaspora, we would need
+ // to define the closing tag for the list elements. So nested lists
+ // are going to be flattened out in Diaspora for now
+
+ $endlessloop = 0;
+ while ((((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false)) ||
+ ((strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false)) ||
+ ((strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false))) && (++$endlessloop < 20)) {
+ $Text = preg_replace_callback("/\[list\](.*?)\[\/list\]/is", 'diaspora_ul', $Text);
+ $Text = preg_replace_callback("/\[list=1\](.*?)\[\/list\]/is", 'diaspora_ol', $Text);
+ $Text = preg_replace_callback("/\[list=i\](.*?)\[\/list\]/s",'diaspora_ol', $Text);
+ $Text = preg_replace_callback("/\[list=I\](.*?)\[\/list\]/s", 'diaspora_ol', $Text);
+ $Text = preg_replace_callback("/\[list=a\](.*?)\[\/list\]/s", 'diaspora_ol', $Text);
+ $Text = preg_replace_callback("/\[list=A\](.*?)\[\/list\]/s", 'diaspora_ol', $Text);
+ $Text = preg_replace_callback("/\[ul\](.*?)\[\/ul\]/is", 'diaspora_ul', $Text);
+ $Text = preg_replace_callback("/\[ol\](.*?)\[\/ol\]/is", 'diaspora_ol', $Text);
+ }
+
+*/
+
+ // Convert it to HTML - don't try oembed
+// $Text = bbcode($Text, $preserve_nl, false);
+
+ // Now convert HTML to Markdown
+// $md = new Markdownify(false, false, false);
+// $Text = $md->parseString($Text);
+
+ // If the text going into bbcode() has a plain URL in it, i.e.
+ // with no [url] tags around it, it will come out of parseString()
+ // looking like: <http://url.com>, which gets removed by strip_tags().
+ // So take off the angle brackets of any such URL
+// $Text = preg_replace("/<http(.*?)>/is", "http$1", $Text);
+
+ // Remove all unconverted tags
+// $Text = strip_tags($Text);
+
+//////
+// end of bb->html->md conversion attempt
+//////
+
+
+
$ev = bbtoevent($Text);
// Replace any html brackets with HTML Entities to prevent executing HTML or script
@@ -78,12 +197,17 @@ function bb2diaspora($Text,$preserve_nl = false) {
$Text = str_replace(">", "&gt;", $Text);
// If we find any event code, turn it into an event.
- // After we're finished processing the bbcode we'll
+ // After we're finished processing the bbcode we'll
// replace all of the event code with a reformatted version.
-
if($preserve_nl)
$Text = str_replace(array("\n","\r"), array('',''),$Text);
+ else
+ // Remove the "return" character, as Diaspora uses only the "newline"
+ // character, so having the "return" character can cause signature
+ // failures
+ $Text = str_replace("\r", "", $Text);
+
// Set up the parameters for a URL search string
$URLSearchString = "^\[\]";
@@ -98,7 +222,7 @@ function bb2diaspora($Text,$preserve_nl = false) {
// new javascript markdown processor to handle links with images as the link "text"
// It is not optimal and may be removed if this ability is restored in the future
- $Text = preg_replace("/\[url\=([$URLSearchString]*)\]\[img\](.*?)\[\/img\]\[\/url\]/ism",
+ $Text = preg_replace("/\[url\=([$URLSearchString]*)\]\[img\](.*?)\[\/img\]\[\/url\]/ism",
'![' . t('image/photo') . '](' . '$2' . ')' . "\n" . '[' . t('link') . '](' . '$1' . ')', $Text);
$Text = preg_replace("/\[bookmark\]([$URLSearchString]*)\[\/bookmark\]/ism", '[$1]($1)', $Text);
@@ -115,7 +239,7 @@ function bb2diaspora($Text,$preserve_nl = false) {
// Perform MAIL Search
$Text = preg_replace("(\[mail\]([$MAILSearchString]*)\[/mail\])", '[$1](mailto:$1)', $Text);
$Text = preg_replace("/\[mail\=([$MAILSearchString]*)\](.*?)\[\/mail\]/", '[$2](mailto:$1)', $Text);
-
+
$Text = str_replace('*', '\\*', $Text);
$Text = str_replace('_', '\\_', $Text);
@@ -124,48 +248,61 @@ function bb2diaspora($Text,$preserve_nl = false) {
// Check for bold text
$Text = preg_replace("(\[b\](.*?)\[\/b\])is",'**$1**',$Text);
- // Check for Italics text
+ // Check for italics text
$Text = preg_replace("(\[i\](.*?)\[\/i\])is",'_$1_',$Text);
- // Check for Underline text
-// $Text = preg_replace("(\[u\](.*?)\[\/u\])is",'<u>$1</u>',$Text);
+ // Check for underline text
+ // Replace with italics since Diaspora doesn't have underline
+ $Text = preg_replace("(\[u\](.*?)\[\/u\])is",'_$1_',$Text);
// Check for strike-through text
-// $Text = preg_replace("(\[s\](.*?)\[\/s\])is",'<strike>$1</strike>',$Text);
+ $Text = preg_replace("(\[s\](.*?)\[\/s\])is",'**[strike]**$1**[/strike]**',$Text);
// Check for over-line text
// $Text = preg_replace("(\[o\](.*?)\[\/o\])is",'<span class="overline">$1</span>',$Text);
// Check for colored text
-// $Text = preg_replace("(\[color=(.*?)\](.*?)\[\/color\])is","<span style=\"color: $1;\">$2</span>",$Text);
+ // Remove color since Diaspora doesn't support it
+ $Text = preg_replace("(\[color=(.*?)\](.*?)\[\/color\])is","$2",$Text);
// Check for sized text
-// $Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])is","<span style=\"font-size: $1;\">$2</span>",$Text);
+ // Remove it since Diaspora doesn't support sizes very well
+ $Text = preg_replace("(\[size=(.*?)\](.*?)\[\/size\])is","$2",$Text);
// Check for list text
-// $Text = preg_replace("/\[list\](.*?)\[\/list\]/is", '<ul class="listbullet">$1</ul>' ,$Text);
-// $Text = preg_replace("/\[list=1\](.*?)\[\/list\]/is", '<ul class="listdecimal">$1</ul>' ,$Text);
-// $Text = preg_replace("/\[list=i\](.*?)\[\/list\]/s",'<ul class="listlowerroman">$1</ul>' ,$Text);
-// $Text = preg_replace("/\[list=I\](.*?)\[\/list\]/s", '<ul class="listupperroman">$1</ul>' ,$Text);
-// $Text = preg_replace("/\[list=a\](.*?)\[\/list\]/s", '<ul class="listloweralpha">$1</ul>' ,$Text);
-// $Text = preg_replace("/\[list=A\](.*?)\[\/list\]/s", '<ul class="listupperalpha">$1</ul>' ,$Text);
-// $Text = preg_replace("/\[li\](.*?)\[\/li\]/s", '<li>$1</li>' ,$Text);
-
-// $Text = preg_replace("/\[td\](.*?)\[\/td\]/s", '<td>$1</td>' ,$Text);
-// $Text = preg_replace("/\[tr\](.*?)\[\/tr\]/s", '<tr>$1</tr>' ,$Text);
-// $Text = preg_replace("/\[table\](.*?)\[\/table\]/s", '<table>$1</table>' ,$Text);
-
-// $Text = preg_replace("/\[table border=1\](.*?)\[\/table\]/s", '<table border="1" >$1</table>' ,$Text);
+ $endlessloop = 0;
+ while ((((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false)) ||
+ ((strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false)) ||
+ ((strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false)) ||
+ ((strpos($Text, "[/li]") !== false) && (strpos($Text, "[li]") !== false))) && (++$endlessloop < 20)) {
+ $Text = preg_replace_callback("/\[list\](.*?)\[\/list\]/is", 'diaspora_ul', $Text);
+ $Text = preg_replace_callback("/\[list=1\](.*?)\[\/list\]/is", 'diaspora_ol', $Text);
+ $Text = preg_replace_callback("/\[list=i\](.*?)\[\/list\]/s",'diaspora_ol', $Text);
+ $Text = preg_replace_callback("/\[list=I\](.*?)\[\/list\]/s", 'diaspora_ol', $Text);
+ $Text = preg_replace_callback("/\[list=a\](.*?)\[\/list\]/s", 'diaspora_ol', $Text);
+ $Text = preg_replace_callback("/\[list=A\](.*?)\[\/list\]/s", 'diaspora_ol', $Text);
+ $Text = preg_replace_callback("/\[ul\](.*?)\[\/ul\]/is", 'diaspora_ul', $Text);
+ $Text = preg_replace_callback("/\[ol\](.*?)\[\/ol\]/is", 'diaspora_ol', $Text);
+ $Text = preg_replace("/\[li\]( *)(.*?)\[\/li\]/s", '* $2' ,$Text);
+ }
+
+ // Just get rid of table tags since Diaspora doesn't support tables
+ $Text = preg_replace("/\[th\](.*?)\[\/th\]/s", '$1' ,$Text);
+ $Text = preg_replace("/\[td\](.*?)\[\/td\]/s", '$1' ,$Text);
+ $Text = preg_replace("/\[tr\](.*?)\[\/tr\]/s", '$1' ,$Text);
+ $Text = preg_replace("/\[table\](.*?)\[\/table\]/s", '$1' ,$Text);
+
+ $Text = preg_replace("/\[table border=(.*?)\](.*?)\[\/table\]/s", '$2' ,$Text);
// $Text = preg_replace("/\[table border=0\](.*?)\[\/table\]/s", '<table border="0" >$1</table>' ,$Text);
-
+
// $Text = str_replace("[*]", "<li>", $Text);
// Check for font change text
// $Text = preg_replace("(\[font=(.*?)\](.*?)\[\/font\])","<span style=\"font-family: $1;\">$2</span>",$Text);
- $Text = preg_replace_callback("/\[code\](.*?)\[\/code\]/is",'stripdcode_br_cb',$Text);
+ $Text = preg_replace_callback("/\[code\](.*?)\[\/code\]/is",'stripdcode_br_cb',$Text);
// Check for [code] text
$Text = preg_replace("/(\[code\])+(.*?)(\[\/code\])+/is","\t$2\n", $Text);
@@ -174,10 +311,11 @@ function bb2diaspora($Text,$preserve_nl = false) {
// Declare the format for [quote] layout
- // $QuoteLayout = '<blockquote>$1</blockquote>';
+ // $QuoteLayout = '<blockquote>$1</blockquote>';
// Check for [quote] text
$Text = preg_replace("/\[quote\](.*?)\[\/quote\]/is",">$1\n\n", $Text);
-
+ $Text = preg_replace("/\[quote=(.*?)\](.*?)\[\/quote\]/is",">$2\n\n", $Text);
+
// Images
// html5 video and audio
@@ -187,13 +325,13 @@ function bb2diaspora($Text,$preserve_nl = false) {
$Text = preg_replace("/\[audio\](.*?)\[\/audio\]/", '$1', $Text);
// $Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/", '<iframe src="$1" width="425" height="350"><a href="$1">$1</a></iframe>', $Text);
-
+
// [img=widthxheight]image source[/img]
// $Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/", '<img src="$3" style="height:{$2}px; width:{$1}px;" >', $Text);
- $Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/youtube\]/ism",'http://www.youtube.com/watch?v=$1',$Text);
- $Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/embed\/(.*?)\[\/youtube\]/ism",'http://www.youtube.com/watch?v=$1',$Text);
- $Text = preg_replace("/\[youtube\]https?:\/\/youtu.be\/(.*?)\[\/youtube\]/ism",'http://www.youtube.com/watch?v=$1',$Text);
+ $Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/youtube\]/ism",'http://www.youtube.com/watch?v=$1',$Text);
+ $Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/embed\/(.*?)\[\/youtube\]/ism",'http://www.youtube.com/watch?v=$1',$Text);
+ $Text = preg_replace("/\[youtube\]https?:\/\/youtu.be\/(.*?)\[\/youtube\]/ism",'http://www.youtube.com/watch?v=$1',$Text);
$Text = preg_replace("/\[youtube\]([A-Za-z0-9\-_=]+)(.*?)\[\/youtube\]/ism", 'http://www.youtube.com/watch?v=$1', $Text);
$Text = preg_replace("/\[vimeo\]https?:\/\/player.vimeo.com\/video\/([0-9]+)(.*?)\[\/vimeo\]/ism",'http://vimeo.com/$1',$Text);
@@ -211,9 +349,10 @@ function bb2diaspora($Text,$preserve_nl = false) {
if(x($ev,'desc') && x($ev,'start')) {
$sub = format_event_diaspora($ev);
-
- $Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/is",$sub,$Text);
- $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/is",'',$Text);
+
+ $Text = preg_replace("/\[event\-summary\](.*?)\[\/event\-summary\]/is",'',$Text);
+ $Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/is",'',$Text);
+ $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/is",$sub,$Text);
$Text = preg_replace("/\[event\-finish\](.*?)\[\/event\-finish\]/is",'',$Text);
$Text = preg_replace("/\[event\-location\](.*?)\[\/event\-location\]/is",'',$Text);
$Text = preg_replace("/\[event\-adjust\](.*?)\[\/event\-adjust\]/is",'',$Text);
@@ -222,7 +361,12 @@ function bb2diaspora($Text,$preserve_nl = false) {
$Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&amp\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text);
$Text = preg_replace_callback('/\[(.*?)\]\((.*?)\)/ism','unescape_underscores_in_links',$Text);
-
+
+
+ // Remove any leading or trailing whitespace, as this will mess up
+ // the Diaspora signature verification and cause the item to disappear
+ $Text = trim($Text);
+
call_hooks('bb2diaspora',$Text);
return $Text;
@@ -244,7 +388,7 @@ function format_event_diaspora($ev) {
$o = 'Friendica event notification:' . "\n";
- $o .= '**' . bb2diaspora($ev['desc']) . '**' . "\n";
+ $o .= '**' . (($ev['summary']) ? bb2diaspora($ev['summary']) : bb2diaspora($ev['desc'])) . '**' . "\n";
$o .= t('Starts:') . ' ' . '['
. (($ev['adjust']) ? day_translate(datetime_convert('UTC', 'UTC',
diff --git a/include/bbcode.php b/include/bbcode.php
index efc362880..55a879497 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -50,7 +50,7 @@ function bb_unspacefy_and_trim($st) {
// BBcode 2 HTML was written by WAY2WEB.net
// extended to work with Mistpark/Friendica - Mike Macgirvin
-function bbcode($Text,$preserve_nl = false) {
+function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
$a = get_app();
@@ -93,11 +93,19 @@ function bbcode($Text,$preserve_nl = false) {
// Convert new line chars to html <br /> tags
- $Text = nl2br($Text);
+ // nlbr seems to be hopelessly messed up
+ // $Text = nl2br($Text);
+
+ // We'll emulate it.
+
+ $Text = str_replace("\r\n","\n", $Text);
+ $Text = str_replace(array("\r","\n"), array('<br />','<br />'), $Text);
+
if($preserve_nl)
$Text = str_replace(array("\n","\r"), array('',''),$Text);
+
// Set up the parameters for a URL search string
$URLSearchString = "^\[\]";
// Set up the parameters for a MAIL search string
@@ -108,10 +116,14 @@ function bbcode($Text,$preserve_nl = false) {
$Text = preg_replace("/([^\]\=]|^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,]+)/ism", '$1<a href="$2" target="external-link">$2</a>', $Text);
- $Text = preg_replace_callback("/\[bookmark\=([^\]]*)\].*?\[\/bookmark\]/ism",'tryoembed',$Text);
+ if ($tryoembed)
+ $Text = preg_replace_callback("/\[bookmark\=([^\]]*)\].*?\[\/bookmark\]/ism",'tryoembed',$Text);
+
$Text = preg_replace("/\[bookmark\=([^\]]*)\](.*?)\[\/bookmark\]/ism",'[url=$1]$2[/url]',$Text);
- $Text = preg_replace_callback("/\[url\]([$URLSearchString]*)\[\/url\]/ism",'tryoembed',$Text);
+ if ($tryoembed)
+ $Text = preg_replace_callback("/\[url\]([$URLSearchString]*)\[\/url\]/ism",'tryoembed',$Text);
+
$Text = preg_replace("/\[url\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="external-link">$1</a>', $Text);
$Text = preg_replace("/\[url\=([$URLSearchString]*)\](.*?)\[\/url\]/ism", '<a href="$1" target="external-link">$2</a>', $Text);
//$Text = preg_replace("/\[url\=([$URLSearchString]*)\]([$URLSearchString]*)\[\/url\]/ism", '<a href="$1" target="_blank">$2</a>', $Text);
@@ -154,11 +166,14 @@ function bbcode($Text,$preserve_nl = false) {
// Check for list text
$Text = str_replace("[*]", "<li>", $Text);
- $Text = preg_replace("/\[li\](.*?)\[\/li\]/ism", '<li>$1</li>' ,$Text);
// handle nested lists
$endlessloop = 0;
- while ((strpos($Text, "[/list]") !== false) and (strpos($Text, "[list") !== false) and (++$endlessloop < 20)) {
+
+ while ((((strpos($Text, "[/list]") !== false) && (strpos($Text, "[list") !== false)) ||
+ ((strpos($Text, "[/ol]") !== false) && (strpos($Text, "[ol]") !== false)) ||
+ ((strpos($Text, "[/ul]") !== false) && (strpos($Text, "[ul]") !== false)) ||
+ ((strpos($Text, "[/li]") !== false) && (strpos($Text, "[li]") !== false))) && (++$endlessloop < 20)) {
$Text = preg_replace("/\[list\](.*?)\[\/list\]/ism", '<ul class="listbullet" style="list-style-type: circle;">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=\](.*?)\[\/list\]/ism", '<ul class="listnone" style="list-style-type: none;">$1</ul>' ,$Text);
$Text = preg_replace("/\[list=1\](.*?)\[\/list\]/ism", '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>' ,$Text);
@@ -166,11 +181,11 @@ function bbcode($Text,$preserve_nl = false) {
$Text = preg_replace("/\[list=((?-i)I)\](.*?)\[\/list\]/ism", '<ul class="listupperroman" style="list-style-type: upper-roman;">$2</ul>' ,$Text);
$Text = preg_replace("/\[list=((?-i)a)\](.*?)\[\/list\]/ism", '<ul class="listloweralpha" style="list-style-type: lower-alpha;">$2</ul>' ,$Text);
$Text = preg_replace("/\[list=((?-i)A)\](.*?)\[\/list\]/ism", '<ul class="listupperalpha" style="list-style-type: upper-alpha;">$2</ul>' ,$Text);
+ $Text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '<ul class="listbullet" style="list-style-type: circle;">$1</ul>' ,$Text);
+ $Text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>' ,$Text);
+ $Text = preg_replace("/\[li\](.*?)\[\/li\]/ism", '<li>$1</li>' ,$Text);
}
- $Text = preg_replace("/\[ul\](.*?)\[\/ul\]/ism", '<ul class="listbullet" style="list-style-type: circle;">$1</ul>' ,$Text);
- $Text = preg_replace("/\[ol\](.*?)\[\/ol\]/ism", '<ul class="listdecimal" style="list-style-type: decimal;">$1</ul>' ,$Text);
-
$Text = preg_replace("/\[th\](.*?)\[\/th\]/sm", '<th>$1</th>' ,$Text);
$Text = preg_replace("/\[td\](.*?)\[\/td\]/sm", '<td>$1</td>' ,$Text);
$Text = preg_replace("/\[tr\](.*?)\[\/tr\]/sm", '<tr>$1</tr>' ,$Text);
@@ -190,7 +205,7 @@ function bbcode($Text,$preserve_nl = false) {
// Declare the format for [code] layout
- $Text = preg_replace_callback("/\[code\](.*?)\[\/code\]/ism",'stripcode_br_cb',$Text);
+// $Text = preg_replace_callback("/\[code\](.*?)\[\/code\]/ism",'stripcode_br_cb',$Text);
$CodeLayout = '<code>$1</code>';
// Check for [code] text
@@ -250,31 +265,35 @@ function bbcode($Text,$preserve_nl = false) {
$Text = preg_replace("/\[audio\](.*?\.(ogg|ogv|oga|ogm|webm|mp4|mp3))\[\/audio\]/ism", '<audio src="$1" controls="controls"><a href="$1">$1</a></audio>', $Text);
// Try to Oembed
- $Text = preg_replace_callback("/\[video\](.*?)\[\/video\]/ism", 'tryoembed', $Text);
- $Text = preg_replace_callback("/\[audio\](.*?)\[\/audio\]/ism", 'tryoembed', $Text);
-
+ if ($tryoembed) {
+ $Text = preg_replace_callback("/\[video\](.*?)\[\/video\]/ism", 'tryoembed', $Text);
+ $Text = preg_replace_callback("/\[audio\](.*?)\[\/audio\]/ism", 'tryoembed', $Text);
+ }
// html5 video and audio
$Text = preg_replace("/\[iframe\](.*?)\[\/iframe\]/ism", '<iframe src="$1" width="425" height="350"><a href="$1">$1</a></iframe>', $Text);
-
+
// Youtube extensions
- $Text = preg_replace_callback("/\[youtube\](https?:\/\/www.youtube.com\/watch\?v\=.*?)\[\/youtube\]/ism", 'tryoembed', $Text);
- $Text = preg_replace_callback("/\[youtube\](www.youtube.com\/watch\?v\=.*?)\[\/youtube\]/ism", 'tryoembed', $Text);
- $Text = preg_replace_callback("/\[youtube\](https?:\/\/youtu.be\/.*?)\[\/youtube\]/ism",'tryoembed',$Text);
-
+ if ($tryoembed) {
+ $Text = preg_replace_callback("/\[youtube\](https?:\/\/www.youtube.com\/watch\?v\=.*?)\[\/youtube\]/ism", 'tryoembed', $Text);
+ $Text = preg_replace_callback("/\[youtube\](www.youtube.com\/watch\?v\=.*?)\[\/youtube\]/ism", 'tryoembed', $Text);
+ $Text = preg_replace_callback("/\[youtube\](https?:\/\/youtu.be\/.*?)\[\/youtube\]/ism",'tryoembed',$Text);
+ }
+
$Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/watch\?v\=(.*?)\[\/youtube\]/ism",'[youtube]$1[/youtube]',$Text);
$Text = preg_replace("/\[youtube\]https?:\/\/www.youtube.com\/embed\/(.*?)\[\/youtube\]/ism",'[youtube]$1[/youtube]',$Text);
- $Text = preg_replace("/\[youtube\]https?:\/\/youtu.be\/(.*?)\[\/youtube\]/ism",'[youtube]$1[/youtube]',$Text);
-
-
+ $Text = preg_replace("/\[youtube\]https?:\/\/youtu.be\/(.*?)\[\/youtube\]/ism",'[youtube]$1[/youtube]',$Text);
+
$Text = preg_replace("/\[youtube\]([A-Za-z0-9\-_=]+)(.*?)\[\/youtube\]/ism", '<iframe width="425" height="350" src="http://www.youtube.com/embed/$1" frameborder="0" ></iframe>', $Text);
- $Text = preg_replace_callback("/\[vimeo\](https?:\/\/player.vimeo.com\/video\/[0-9]+).*?\[\/vimeo\]/ism",'tryoembed',$Text);
- $Text = preg_replace_callback("/\[vimeo\](https?:\/\/vimeo.com\/[0-9]+).*?\[\/vimeo\]/ism",'tryoembed',$Text);
+ if ($tryoembed) {
+ $Text = preg_replace_callback("/\[vimeo\](https?:\/\/player.vimeo.com\/video\/[0-9]+).*?\[\/vimeo\]/ism",'tryoembed',$Text);
+ $Text = preg_replace_callback("/\[vimeo\](https?:\/\/vimeo.com\/[0-9]+).*?\[\/vimeo\]/ism",'tryoembed',$Text);
+ }
$Text = preg_replace("/\[vimeo\]https?:\/\/player.vimeo.com\/video\/([0-9]+)(.*?)\[\/vimeo\]/ism",'[vimeo]$1[/vimeo]',$Text);
$Text = preg_replace("/\[vimeo\]https?:\/\/vimeo.com\/([0-9]+)(.*?)\[\/vimeo\]/ism",'[vimeo]$1[/vimeo]',$Text);
@@ -287,12 +306,16 @@ function bbcode($Text,$preserve_nl = false) {
$Text = oembed_bbcode2html($Text);
// If we found an event earlier, strip out all the event code and replace with a reformatted version.
+ // Replace the event-start section with the entire formatted event. The other bbcode is stripped.
+ // Summary (e.g. title) is required, earlier revisions only required description (in addition to
+ // start which is always required). Allow desc with a missing summary for compatibility.
- if(x($ev,'desc') && x($ev,'start')) {
+ if((x($ev,'desc') || x($ev,'summary')) && x($ev,'start')) {
$sub = format_event_html($ev);
- $Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/ism",$sub,$Text);
- $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/ism",'',$Text);
+ $Text = preg_replace("/\[event\-summary\](.*?)\[\/event\-summary\]/ism",'',$Text);
+ $Text = preg_replace("/\[event\-description\](.*?)\[\/event\-description\]/ism",'',$Text);
+ $Text = preg_replace("/\[event\-start\](.*?)\[\/event\-start\]/ism",$sub,$Text);
$Text = preg_replace("/\[event\-finish\](.*?)\[\/event\-finish\]/ism",'',$Text);
$Text = preg_replace("/\[event\-location\](.*?)\[\/event\-location\]/ism",'',$Text);
$Text = preg_replace("/\[event\-adjust\](.*?)\[\/event\-adjust\]/ism",'',$Text);
diff --git a/include/conversation.php b/include/conversation.php
index 2244e8df7..bbb6a1f85 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -432,7 +432,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
continue;
$toplevelpost = (($item['id'] == $item['parent']) ? true : false);
- $toplevelprivate = false;
+
// Take care of author collapsing and comment collapsing
// (author collapsing is currently disabled)
@@ -440,7 +440,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
// If there are more than two comments, squash all but the last 2.
if($toplevelpost) {
- $toplevelprivate = (($toplevelpost && $item['private']) ? true : false);
+
$item_writeable = (($item['writable'] || $item['self']) ? true : false);
$comments_seen = 0;
@@ -485,7 +485,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$redirect_url = $a->get_baseurl($ssl_state) . '/redir/' . $item['cid'] ;
- $lock = ((($item['private']) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
+ $lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
|| strlen($item['deny_cid']) || strlen($item['deny_gid']))))
? t('Private Message')
: false);
@@ -546,16 +546,16 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
}
$likebuttons = '';
- $shareable = ((($profile_owner == local_user()) && ((! $item['private']) || $item['network'] === NETWORK_FEED)) ? true : false);
+ $shareable = ((($profile_owner == local_user()) && ($item['private'] != 1)) ? true : false);
if($page_writeable) {
- if($toplevelpost) {
+/* if($toplevelpost) { */
$likebuttons = array(
'like' => array( t("I like this \x28toggle\x29"), t("like")),
'dislike' => array( t("I don't like this \x28toggle\x29"), t("dislike")),
);
if ($shareable) $likebuttons['share'] = array( t('Share this'), t('share'));
- }
+/* } */
$qc = $qcomment = null;
@@ -659,8 +659,8 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
else
$profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $a->get_cached_avatar_image($thumb));
- $like = ((x($alike,$item['id'])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');
- $dislike = ((x($dlike,$item['id'])) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : '');
+ $like = ((x($alike,$item['uri'])) ? format_like($alike[$item['uri']],$alike[$item['uri'] . '-l'],'like',$item['uri']) : '');
+ $dislike = ((x($dlike,$item['uri'])) ? format_like($dlike[$item['uri']],$dlike[$item['uri'] . '-l'],'dislike',$item['uri']) : '');
$locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
call_hooks('render_location',$locate);
@@ -876,13 +876,17 @@ function like_puller($a,$item,&$arr,$mode) {
}
else
$url = zrl($url);
- if(! ((isset($arr[$item['parent'] . '-l'])) && (is_array($arr[$item['parent'] . '-l']))))
- $arr[$item['parent'] . '-l'] = array();
- if(! isset($arr[$item['parent']]))
- $arr[$item['parent']] = 1;
+
+ if(! $item['thr-parent'])
+ $item['thr-parent'] = $item['parent-uri'];
+
+ if(! ((isset($arr[$item['thr-parent'] . '-l'])) && (is_array($arr[$item['thr-parent'] . '-l']))))
+ $arr[$item['thr-parent'] . '-l'] = array();
+ if(! isset($arr[$item['thr-parent']]))
+ $arr[$item['thr-parent']] = 1;
else
- $arr[$item['parent']] ++;
- $arr[$item['parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['author-name'] . '</a>';
+ $arr[$item['thr-parent']] ++;
+ $arr[$item['thr-parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['author-name'] . '</a>';
}
return;
}}
diff --git a/include/crypto.php b/include/crypto.php
index 6fc9a287e..ed0a35704 100644
--- a/include/crypto.php
+++ b/include/crypto.php
@@ -261,39 +261,6 @@ function aes_unencapsulate($data,$prvkey) {
return AES256CBC_decrypt(base64url_decode($data['data']),$k,$i);
}
-
-// This has been superceded.
-
-function zot_encapsulate($data,$envelope,$pubkey) {
-$res = aes_encapsulate($data,$pubkey);
-
-return <<< EOT
-<?xml version='1.0' encoding='UTF-8'?>
-<zot:msg xmlns:zot='http://purl.org/zot/1.0'>
- <zot:key>{$res['key']}</zot:key>
- <zot:iv>{$res['iv']}</zot:iv>
- <zot:env>$s1</zot:env>
- <zot:sig key_id="$keyid">$sig</zot:sig>
- <zot:alg>AES-256-CBC</zot:alg>
- <zot:data type='application/magic-envelope+xml'>{$res['data']}</zot:data>
-</zot:msg>
-EOT;
-
-}
-
-// so has this
-
-function zot_unencapsulate($data,$prvkey) {
- $ret = array();
- $c = array();
- $x = parse_xml_string($data);
- $c = array('key' => $x->key,'iv' => $x->iv,'data' => $x->data);
- openssl_private_decrypt(base64url_decode($x->sender),$s,$prvkey);
- $ret['sender'] = $s;
- $ret['data'] = aes_unencapsulate($x,$prvkey);
- return $ret;
-}
-
function new_keypair($bits) {
$openssl_options = array(
diff --git a/include/datetime.php b/include/datetime.php
index 58a618610..75ae685f3 100644
--- a/include/datetime.php
+++ b/include/datetime.php
@@ -447,11 +447,13 @@ function update_contact_birthdays() {
*
*/
- $bdtext = t('Birthday:') . ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]' ;
+ $bdtext = sprintf( t('%s\'s birthday'), $rr['name']);
+ $bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $rr['url'] . ']' . $rr['name'] . '[/url]') ;
- $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`desc`,`type`,`adjust`)
- VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%d' ) ",
+
+ $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`,`adjust`)
+ VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%d' ) ",
intval($rr['uid']),
intval($rr['id']),
dbesc(datetime_convert()),
@@ -459,6 +461,7 @@ function update_contact_birthdays() {
dbesc(datetime_convert('UTC','UTC', $nextbd)),
dbesc(datetime_convert('UTC','UTC', $nextbd . ' + 1 day ')),
dbesc($bdtext),
+ dbesc($bdtext2),
dbesc('birthday'),
intval(0)
);
diff --git a/include/dba.php b/include/dba.php
index 881097f30..71c1ba859 100644
--- a/include/dba.php
+++ b/include/dba.php
@@ -275,3 +275,9 @@ function dbesc_array(&$arr) {
array_walk($arr,'dbesc_array_cb');
}
}}
+
+
+function dba_timer() {
+ return microtime(true);
+}
+
diff --git a/include/delivery.php b/include/delivery.php
index e6cfc8155..1328771a6 100644
--- a/include/delivery.php
+++ b/include/delivery.php
@@ -113,7 +113,7 @@ function delivery_run($argv, $argc){
$uid = $r[0]['uid'];
$updated = $r[0]['edited'];
- // The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up
+ // POSSIBLE CLEANUP --> The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up
if(! $parent_id)
continue;
@@ -280,7 +280,7 @@ function delivery_run($argv, $argc){
continue;
// private emails may be in included in public conversations. Filter them.
- if(($public_message) && $item['private'])
+ if(($public_message) && $item['private'] == 1)
continue;
$item_contact = get_item_contact($item,$icontacts);
@@ -383,7 +383,7 @@ function delivery_run($argv, $argc){
continue;
// private emails may be in included in public conversations. Filter them.
- if(($public_message) && $item['private'])
+ if(($public_message) && $item['private'] == 1)
continue;
$item_contact = get_item_contact($item,$icontacts);
diff --git a/include/diaspora.php b/include/diaspora.php
index 0ca9163a8..7551ea9b3 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -5,6 +5,7 @@ require_once('include/items.php');
require_once('include/bb2diaspora.php');
require_once('include/contact_selectors.php');
require_once('include/queue_fn.php');
+require_once('include/lock.php');
function diaspora_dispatch_public($msg) {
@@ -113,27 +114,93 @@ function diaspora_get_contact_by_handle($uid,$handle) {
}
function find_diaspora_person_by_handle($handle) {
+
+ $person = false;
$update = false;
- $r = q("select * from fcontact where network = '%s' and addr = '%s' limit 1",
- dbesc(NETWORK_DIASPORA),
- dbesc($handle)
- );
- if(count($r)) {
- logger('find_diaspora_person_by handle: in cache ' . print_r($r,true), LOGGER_DEBUG);
- // update record occasionally so it doesn't get stale
- $d = strtotime($r[0]['updated'] . ' +00:00');
- if($d > strtotime('now - 14 days'))
- return $r[0];
- $update = true;
- }
- logger('find_diaspora_person_by_handle: refresh',LOGGER_DEBUG);
- require_once('include/Scrape.php');
- $r = probe_url($handle, PROBE_DIASPORA);
- if((count($r)) && ($r['network'] === NETWORK_DIASPORA)) {
- add_fcontact($r,$update);
- return ($r);
- }
- return false;
+ $got_lock = false;
+
+ $endlessloop = 0;
+ $maxloops = 10;
+
+ do {
+ $r = q("select * from fcontact where network = '%s' and addr = '%s' limit 1",
+ dbesc(NETWORK_DIASPORA),
+ dbesc($handle)
+ );
+ if(count($r)) {
+ $person = $r[0];
+ logger('find_diaspora_person_by handle: in cache ' . print_r($r,true), LOGGER_DEBUG);
+
+ // update record occasionally so it doesn't get stale
+ $d = strtotime($person['updated'] . ' +00:00');
+ if($d < strtotime('now - 14 days'))
+ $update = true;
+ }
+
+
+ // FETCHING PERSON INFORMATION FROM REMOTE SERVER
+ //
+ // If the person isn't in our 'fcontact' table, or if he/she is but
+ // his/her information hasn't been updated for more than 14 days, then
+ // we want to fetch the person's information from the remote server.
+ //
+ // Note that $person isn't changed by this block of code unless the
+ // person's information has been successfully fetched from the remote
+ // server. So if $person was 'false' to begin with (because he/she wasn't
+ // in the local cache), it'll stay false, and if $person held the local
+ // cache information to begin with, it'll keep that information. That way
+ // if there's a problem with the remote fetch, we can at least use our
+ // cached information--it's better than nothing.
+
+ if((! $person) || ($update)) {
+ // Lock the function to prevent race conditions if multiple items
+ // come in at the same time from a person who doesn't exist in
+ // fcontact
+ //
+ // Don't loop forever. On the last loop, try to create the contact
+ // whether the function is locked or not. Maybe the locking thread
+ // has died or something. At any rate, a duplicate in 'fcontact'
+ // is a much smaller problem than a deadlocked thread
+ $got_lock = lock_function('find_diaspora_person_by_handle', false);
+ if(($endlessloop + 1) >= $maxloops)
+ $got_lock = true;
+
+ if($got_lock) {
+ logger('find_diaspora_person_by_handle: create or refresh', LOGGER_DEBUG);
+ require_once('include/Scrape.php');
+ $r = probe_url($handle, PROBE_DIASPORA);
+
+ // Note that Friendica contacts can return a "Diaspora person"
+ // if Diaspora connectivity is enabled on their server
+ if((count($r)) && ($r['network'] === NETWORK_DIASPORA)) {
+ add_fcontact($r,$update);
+ $person = ($r);
+ }
+
+ unlock_function('find_diaspora_person_by_handle');
+ }
+ else {
+ logger('find_diaspora_person_by_handle: couldn\'t lock function', LOGGER_DEBUG);
+ if(! $person)
+ block_on_function_lock('find_diaspora_person_by_handle');
+ }
+ }
+ } while((! $person) && (! $got_lock) && (++$endlessloop < $maxloops));
+ // We need to try again if the person wasn't in 'fcontact' but the function was locked.
+ // The fact that the function was locked may mean that another process was creating the
+ // person's record. It could also mean another process was creating or updating an unrelated
+ // person.
+ //
+ // At any rate, we need to keep trying until we've either got the person or had a chance to
+ // try to fetch his/her remote information. But we don't want to block on locking the
+ // function, because if the other process is creating the record, then when we acquire the lock
+ // we'll dive right into creating another, duplicate record. We DO want to at least wait
+ // until the lock is released, so we don't flood the database with requests.
+ //
+ // If the person was in the 'fcontact' table, don't try again. It's not worth the time, since
+ // we do have some information for the person
+
+ return $person;
}
@@ -844,7 +911,7 @@ function diaspora_reshare($importer,$xml) {
else
$details = $orig_author;
- $prefix = '&#x2672; ' . $details . "\n";
+ $prefix = html_entity_decode("&#x2672; ", ENT_QUOTES, 'UTF-8') . $details . "\n";
// allocate a guid on our system - we aren't fixing any collisions.
@@ -1560,7 +1627,8 @@ function diaspora_photo($importer,$xml,$msg) {
$link_text = '[img]' . $remote_photo_path . $remote_photo_name . '[/img]' . "\n";
- $link_text = scale_external_images($link_text);
+ $link_text = scale_external_images($link_text, true,
+ array($remote_photo_name, 'scaled_full_' . $remote_photo_name));
if(strpos($parent_item['body'],$link_text) === false) {
$r = q("update item set `body` = '%s', `visible` = 1 where `id` = %d and `uid` = %d limit 1",
@@ -2005,6 +2073,7 @@ function diaspora_share($me,$contact) {
));
$slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$me,$contact,$me['prvkey'],$contact['pubkey'])));
+ //$slap = 'xml=' . urlencode(diaspora_msg_build($msg,$me,$contact,$me['prvkey'],$contact['pubkey']));
return(diaspora_transmit($owner,$contact,$slap, false));
}
@@ -2022,6 +2091,7 @@ function diaspora_unshare($me,$contact) {
));
$slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$me,$contact,$me['prvkey'],$contact['pubkey'])));
+ //$slap = 'xml=' . urlencode(diaspora_msg_build($msg,$me,$contact,$me['prvkey'],$contact['pubkey']));
return(diaspora_transmit($owner,$contact,$slap, false));
@@ -2060,13 +2130,21 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
$images[] = $detail;
$body = str_replace($detail['str'],$mtch[1],$body);
}
- }
+ }
*/
+ // Removal of tags
+ $body = preg_replace('/#\[url\=(\w+.*?)\](\w+.*?)\[\/url\]/i', '#$2', $body);
+
+ //if(strlen($title))
+ // $body = "[b]".html_entity_decode($title)."[/b]\n\n".$body;
+
+ // convert to markdown
$body = xmlify(html_entity_decode(bb2diaspora($body)));
+ //$body = bb2diaspora($body);
+ // Adding the title
if(strlen($title))
- $body = xmlify('**' . html_entity_decode($title) . '**' . "\n") . $body;
-
+ $body = "## ".html_entity_decode($title)."\n\n".$body;
if($item['attach']) {
$cnt = preg_match_all('/href=\"(.*?)\"(.*?)title=\"(.*?)\"/ism',$item['attach'],$matches,PREG_SET_ORDER);
@@ -2096,6 +2174,7 @@ function diaspora_send_status($item,$owner,$contact,$public_batch = false) {
logger('diaspora_send_status: ' . $owner['username'] . ' -> ' . $contact['name'] . ' base message: ' . $msg, LOGGER_DATA);
$slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch)));
+ //$slap = 'xml=' . urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch));
$return_code = diaspora_transmit($owner,$contact,$slap,$public_batch);
@@ -2140,6 +2219,7 @@ function diaspora_send_images($item,$owner,$contact,$images,$public_batch = fals
logger('diaspora_send_photo: base message: ' . $msg, LOGGER_DATA);
$slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch)));
+ //$slap = 'xml=' . urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch));
diaspora_transmit($owner,$contact,$slap,$public_batch);
}
@@ -2203,6 +2283,7 @@ function diaspora_send_followup($item,$owner,$contact,$public_batch = false) {
logger('diaspora_followup: base message: ' . $msg, LOGGER_DATA);
$slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch)));
+ //$slap = 'xml=' . urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch));
return(diaspora_transmit($owner,$contact,$slap,$public_batch));
}
@@ -2238,7 +2319,6 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
$relay_retract = true;
$target_type = ( ($item['verb'] === ACTIVITY_LIKE) ? 'Like' : 'Comment');
- $sender_signed_text = $item['guid'] . ';' . $target_type ;
$sql_sign_id = 'retract_iid';
$tpl = get_markup_template('diaspora_relayable_retraction.tpl');
@@ -2249,13 +2329,10 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
$target_type = 'Post';
// $positive = (($item['deleted']) ? 'false' : 'true');
$positive = 'true';
- $sender_signed_text = $item['guid'] . ';' . $target_type . ';' . $parent_guid . ';' . $positive . ';' . $myaddr;
$tpl = get_markup_template('diaspora_like_relay.tpl');
}
else { // item is a comment
- $sender_signed_text = $item['guid'] . ';' . $parent_guid . ';' . $text . ';' . $myaddr;
-
$tpl = get_markup_template('diaspora_comment_relay.tpl');
}
@@ -2281,6 +2358,13 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
return;
}
+ if($relay_retract)
+ $sender_signed_text = $item['guid'] . ';' . $target_type;
+ elseif($like)
+ $sender_signed_text = $item['guid'] . ';' . $target_type . ';' . $parent_guid . ';' . $positive . ';' . $handle;
+ else
+ $sender_signed_text = $item['guid'] . ';' . $parent_guid . ';' . $text . ';' . $handle;
+
// Sign the relayable with the top-level owner's signature
//
// We'll use the $sender_signed_text that we just created, instead of the $signed_text
@@ -2309,6 +2393,7 @@ function diaspora_send_relay($item,$owner,$contact,$public_batch = false) {
$slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch)));
+ //$slap = 'xml=' . urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch));
return(diaspora_transmit($owner,$contact,$slap,$public_batch));
@@ -2343,6 +2428,7 @@ function diaspora_send_retraction($item,$owner,$contact,$public_batch = false) {
));
$slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch)));
+ //$slap = 'xml=' . urlencode(diaspora_msg_build($msg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],$public_batch));
return(diaspora_transmit($owner,$contact,$slap,$public_batch));
}
@@ -2403,6 +2489,7 @@ function diaspora_send_mail($item,$owner,$contact) {
logger('diaspora_conversation: ' . print_r($xmsg,true), LOGGER_DATA);
$slap = 'xml=' . urlencode(urlencode(diaspora_msg_build($xmsg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],false)));
+ //$slap = 'xml=' . urlencode(diaspora_msg_build($xmsg,$owner,$contact,$owner['uprvkey'],$contact['pubkey'],false));
return(diaspora_transmit($owner,$contact,$slap,false));
diff --git a/include/enotify.php b/include/enotify.php
index 134e42f8e..5e073bf3c 100644
--- a/include/enotify.php
+++ b/include/enotify.php
@@ -54,6 +54,20 @@ function notification($params) {
$parent_id = $params['parent'];
+ // Check to see if there was already a tag notify for this post.
+ // If so don't create a second notification
+
+ $p = null;
+ $p = q("select id from notify where type = %d and link = '%s' and uid = %d limit 1",
+ intval(NOTIFY_TAGSELF),
+ dbesc($params['link']),
+ intval($params['uid'])
+ );
+ if($p and count($p)) {
+ pop_lang();
+ return;
+ }
+
// if it's a post figure out who's post it is.
diff --git a/include/event.php b/include/event.php
index 866ae8c3f..8aef0a263 100644
--- a/include/event.php
+++ b/include/event.php
@@ -12,6 +12,9 @@ function format_event_html($ev) {
$o = '<div class="vevent">' . "\r\n";
+
+ $o .= '<p class="summary event-summary">' . bbcode($ev['summary']) . '</p>' . "\r\n";
+
$o .= '<p class="description event-description">' . bbcode($ev['desc']) . '</p>' . "\r\n";
$o .= '<p class="event-start">' . t('Starts:') . ' <abbr class="dtstart" title="'
@@ -114,6 +117,9 @@ function format_event_bbcode($ev) {
$o = '';
+ if($ev['summary'])
+ $o .= '[event-summary]' . $ev['summary'] . '[/event-summary]';
+
if($ev['desc'])
$o .= '[event-description]' . $ev['desc'] . '[/event-description]';
@@ -148,6 +154,9 @@ function bbtoevent($s) {
$ev = array();
$match = '';
+ if(preg_match("/\[event\-summary\](.*?)\[\/event\-summary\]/is",$s,$match))
+ $ev['summary'] = $match[1];
+ $match = '';
if(preg_match("/\[event\-description\](.*?)\[\/event\-description\]/is",$s,$match))
$ev['desc'] = $match[1];
$match = '';
@@ -244,6 +253,7 @@ function event_store($arr) {
`edited` = '%s',
`start` = '%s',
`finish` = '%s',
+ `summary` = '%s',
`desc` = '%s',
`location` = '%s',
`type` = '%s',
@@ -258,6 +268,7 @@ function event_store($arr) {
dbesc($arr['edited']),
dbesc($arr['start']),
dbesc($arr['finish']),
+ dbesc($arr['summary']),
dbesc($arr['desc']),
dbesc($arr['location']),
dbesc($arr['type']),
@@ -306,9 +317,9 @@ function event_store($arr) {
// New event. Store it.
- $r = q("INSERT INTO `event` ( `uid`,`cid`,`uri`,`created`,`edited`,`start`,`finish`,`desc`,`location`,`type`,
+ $r = q("INSERT INTO `event` ( `uid`,`cid`,`uri`,`created`,`edited`,`start`,`finish`,`summary`, `desc`,`location`,`type`,
`adjust`,`nofinish`,`allow_cid`,`allow_gid`,`deny_cid`,`deny_gid`)
- VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s' ) ",
+ VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, '%s', '%s', '%s', '%s' ) ",
intval($arr['uid']),
intval($arr['cid']),
dbesc($arr['uri']),
@@ -316,6 +327,7 @@ function event_store($arr) {
dbesc($arr['edited']),
dbesc($arr['start']),
dbesc($arr['finish']),
+ dbesc($arr['summary']),
dbesc($arr['desc']),
dbesc($arr['location']),
dbesc($arr['type']),
diff --git a/include/follow.php b/include/follow.php
index 22288a0da..b4d1732b8 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -62,6 +62,11 @@ function new_contact($uid,$url,$interactive = false) {
}
}
+
+
+
+
+
// This extra param just confuses things, remove it
if($ret['network'] === NETWORK_DIASPORA)
$ret['url'] = str_replace('?absolute=true','',$ret['url']);
@@ -89,6 +94,11 @@ function new_contact($uid,$url,$interactive = false) {
$ret['notify'] = '';
}
+
+
+
+
+
if(! $ret['notify']) {
$result['message'] .= t('Limited profile. This person will be unable to receive direct/personal notifications from you.') . EOL;
}
@@ -129,6 +139,32 @@ function new_contact($uid,$url,$interactive = false) {
}
else {
+
+ // check service class limits
+
+ $r = q("select count(*) as total from contact where uid = %d and pending = 0 and self = 0",
+ intval($uid)
+ );
+ if(count($r))
+ $total_contacts = $r[0]['total'];
+
+ if(! service_class_allows($uid,'total_contacts',$total_contacts)) {
+ $result['message'] .= upgrade_message();
+ return $result;
+ }
+
+ $r = q("select count(network) as total from contact where uid = %d and network = '%s' and pending = 0 and self = 0",
+ intval($uid),
+ dbesc($network)
+ );
+ if(count($r))
+ $total_network = $r[0]['total'];
+
+ if(! service_class_allows($uid,'total_contacts_' . $network,$total_network)) {
+ $result['message'] .= upgrade_message();
+ return $result;
+ }
+
$new_relation = (($ret['network'] === NETWORK_MAIL) ? CONTACT_IS_FRIEND : CONTACT_IS_SHARING);
if($ret['network'] === NETWORK_DIASPORA)
$new_relation = CONTACT_IS_FOLLOWER;
diff --git a/include/html2bbcode.php b/include/html2bbcode.php
index 69ccf41b7..985c36eaa 100644
--- a/include/html2bbcode.php
+++ b/include/html2bbcode.php
@@ -124,7 +124,7 @@ function html2bbcode($message)
$node->nodeValue = str_replace("\n", "\r", $node->nodeValue);
$message = $doc->saveHTML();
- $message = str_replace(array("\n<", ">\n", "\r", "\n", "\xC3\x82\xC2\xA0"), array("<", ">", "<br>", " ", ""), $message);
+ $message = str_replace(array("\n<", ">\n", "\r", "\n", "\xC3\x82\xC2\xA0"), array("<", ">", "<br />", " ", ""), $message);
$message = preg_replace('= [\s]*=i', " ", $message);
@$doc->loadHTML($message);
diff --git a/include/items.php b/include/items.php
index a0dd1c815..cf903ac13 100755
--- a/include/items.php
+++ b/include/items.php
@@ -466,8 +466,8 @@ function get_atom_elements($feed,$item) {
$res['last-child'] = 0;
$private = $item->get_item_tags(NAMESPACE_DFRN,'private');
- if($private && $private[0]['data'] == 1)
- $res['private'] = 1;
+ if($private && intval($private[0]['data']) > 0)
+ $res['private'] = intval($private[0]['data']);
else
$res['private'] = 0;
@@ -814,7 +814,7 @@ function item_store($arr,$force_parent = false) {
// email correspondents to be private even if the overall thread is not.
if($r[0]['private'])
- $arr['private'] = 1;
+ $arr['private'] = $r[0]['private'];
// Edge case. We host a public forum that was originally posted to privately.
// The original author commented, but as this is a comment, the permissions
@@ -1457,11 +1457,12 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
*
*/
- $bdtext = t('Birthday:') . ' [url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' ;
+ $bdtext = sprintf( t('%s\'s birthday'), $contact['name']);
+ $bdtext2 = sprintf( t('Happy Birthday %s'), ' [url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' ) ;
- $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`desc`,`type`)
- VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s' ) ",
+ $r = q("INSERT INTO `event` (`uid`,`cid`,`created`,`edited`,`start`,`finish`,`summary`,`desc`,`type`)
+ VALUES ( %d, %d, '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) ",
intval($contact['uid']),
intval($contact['id']),
dbesc(datetime_convert()),
@@ -1469,6 +1470,7 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
dbesc(datetime_convert('UTC','UTC', $birthday)),
dbesc(datetime_convert('UTC','UTC', $birthday . ' + 1 day ')),
dbesc($bdtext),
+ dbesc($bdtext2),
dbesc('birthday')
);
@@ -1658,6 +1660,21 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
continue;
}
+ $force_parent = false;
+ if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) {
+ if($contact['network'] === NETWORK_OSTATUS)
+ $force_parent = true;
+ if(strlen($datarray['title']))
+ unset($datarray['title']);
+ $r = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d",
+ dbesc(datetime_convert()),
+ dbesc($parent_uri),
+ intval($importer['uid'])
+ );
+ $datarray['last-child'] = 1;
+ }
+
+
$r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
dbesc($item_id),
intval($importer['uid'])
@@ -1701,19 +1718,6 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
continue;
}
- $force_parent = false;
- if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) {
- if($contact['network'] === NETWORK_OSTATUS)
- $force_parent = true;
- if(strlen($datarray['title']))
- unset($datarray['title']);
- $r = q("UPDATE `item` SET `last-child` = 0, `changed` = '%s' WHERE `parent-uri` = '%s' AND `uid` = %d",
- dbesc(datetime_convert()),
- dbesc($parent_uri),
- intval($importer['uid'])
- );
- $datarray['last-child'] = 1;
- }
if(($contact['network'] === NETWORK_FEED) || (! strlen($contact['notify']))) {
// one way feed - no remote comment ability
@@ -1726,10 +1730,12 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
$datarray['type'] = 'activity';
$datarray['gravity'] = GRAVITY_LIKE;
// only one like or dislike per person
- $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 limit 1",
+ $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 and (`parent-uri` = '%s' OR `thr-parent` = '%s') limit 1",
intval($datarray['uid']),
intval($datarray['contact-id']),
- dbesc($datarray['verb'])
+ dbesc($datarray['verb']),
+ dbesc($parent_uri),
+ dbesc($parent_uri)
);
if($r && count($r))
continue;
@@ -1809,6 +1815,13 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
}
}
+ if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) {
+ if(strlen($datarray['title']))
+ unset($datarray['title']);
+ $datarray['last-child'] = 1;
+ }
+
+
$r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
dbesc($item_id),
intval($importer['uid'])
@@ -1871,24 +1884,23 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
if(! is_array($contact))
return;
- if($contact['network'] === NETWORK_OSTATUS || stristr($contact['url'],'twitter.com')) {
- if(strlen($datarray['title']))
- unset($datarray['title']);
- $datarray['last-child'] = 1;
- }
if(($contact['network'] === NETWORK_FEED) || (! strlen($contact['notify']))) {
// one way feed - no remote comment ability
$datarray['last-child'] = 0;
}
if($contact['network'] === NETWORK_FEED)
- $datarray['private'] = 1;
+ $datarray['private'] = 2;
// This is my contact on another system, but it's really me.
// Turn this into a wall post.
- if($contact['remote_self'])
+ if($contact['remote_self']) {
$datarray['wall'] = 1;
+ if($contact['network'] === NETWORK_FEED) {
+ $datarray['private'] = 0;
+ }
+ }
$datarray['parent-uri'] = $item_id;
$datarray['uid'] = $importer['uid'];
@@ -2146,6 +2158,67 @@ function local_delivery($importer,$data) {
}
if($deleted) {
+ // check for relayed deletes to our conversation
+
+ $is_reply = false;
+ $r = q("select * from item where uri = '%s' and uid = %d limit 1",
+ dbesc($uri),
+ intval($importer['importer_uid'])
+ );
+ if(count($r)) {
+ $parent_uri = $r[0]['parent-uri'];
+ if($r[0]['id'] != $r[0]['parent'])
+ $is_reply = true;
+ }
+
+ if($is_reply) {
+ $community = false;
+
+ if($importer['page-flags'] == PAGE_COMMUNITY || $importer['page-flags'] == PAGE_PRVGROUP ) {
+ $sql_extra = '';
+ $community = true;
+ logger('local_delivery: possible community delete');
+ }
+ else
+ $sql_extra = " and contact.self = 1 and item.wall = 1 ";
+
+ // was the top-level post for this reply written by somebody on this site?
+ // Specifically, the recipient?
+
+ $is_a_remote_delete = false;
+
+ $r = q("select `item`.`id`, `item`.`uri`, `item`.`tag`, `item`.`forum_mode`,`item`.`origin`,`item`.`wall`,
+ `contact`.`name`, `contact`.`url`, `contact`.`thumb` from `item`
+ LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
+ WHERE `item`.`uri` = '%s' AND (`item`.`parent-uri` = '%s' or `item`.`thr-parent` = '%s')
+ AND `item`.`uid` = %d
+ $sql_extra
+ LIMIT 1",
+ dbesc($parent_uri),
+ dbesc($parent_uri),
+ dbesc($parent_uri),
+ intval($importer['importer_uid'])
+ );
+ if($r && count($r))
+ $is_a_remote_delete = true;
+
+ // Does this have the characteristics of a community or private group comment?
+ // If it's a reply to a wall post on a community/prvgroup page it's a
+ // valid community comment. Also forum_mode makes it valid for sure.
+ // If neither, it's not.
+
+ if($is_a_remote_delete && $community) {
+ if((! $r[0]['forum_mode']) && (! $r[0]['wall'])) {
+ $is_a_remote_delete = false;
+ logger('local_delivery: not a community delete');
+ }
+ }
+
+ if($is_a_remote_delete) {
+ logger('local_delivery: received remote delete');
+ }
+ }
+
$r = q("SELECT `item`.*, `contact`.`self` FROM `item` left join contact on `item`.`contact-id` = `contact`.`id`
WHERE `uri` = '%s' AND `item`.`uid` = %d AND `contact-id` = %d AND NOT `item`.`file` LIKE '%%[%%' LIMIT 1",
dbesc($uri),
@@ -2198,7 +2271,8 @@ function local_delivery($importer,$data) {
}
if($item['uri'] == $item['parent-uri']) {
- $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s'
+ $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s',
+ `body` = '', `title` = ''
WHERE `parent-uri` = '%s' AND `uid` = %d",
dbesc($when),
dbesc(datetime_convert()),
@@ -2207,7 +2281,8 @@ function local_delivery($importer,$data) {
);
}
else {
- $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s'
+ $r = q("UPDATE `item` SET `deleted` = 1, `edited` = '%s', `changed` = '%s',
+ `body` = '', `title` = ''
WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
dbesc($when),
dbesc(datetime_convert()),
@@ -2233,7 +2308,11 @@ function local_delivery($importer,$data) {
);
}
}
- }
+ // if this is a relayed delete, propagate it to other recipients
+
+ if($is_a_remote_delete)
+ proc_run('php',"include/notifier.php","drop",$item['id']);
+ }
}
}
}
@@ -2266,15 +2345,17 @@ function local_delivery($importer,$data) {
$is_a_remote_comment = false;
+ // POSSIBLE CLEANUP --> Why select so many fields when only forum_mode and wall are used?
$r = q("select `item`.`id`, `item`.`uri`, `item`.`tag`, `item`.`forum_mode`,`item`.`origin`,`item`.`wall`,
`contact`.`name`, `contact`.`url`, `contact`.`thumb` from `item`
LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
- WHERE `item`.`uri` = '%s' AND `item`.`parent-uri` = '%s'
+ WHERE `item`.`uri` = '%s' AND (`item`.`parent-uri` = '%s' or `item`.`thr-parent` = '%s')
AND `item`.`uid` = %d
$sql_extra
LIMIT 1",
dbesc($parent_uri),
dbesc($parent_uri),
+ dbesc($parent_uri),
intval($importer['importer_uid'])
);
if($r && count($r))
@@ -2362,10 +2443,13 @@ function local_delivery($importer,$data) {
$datarray['gravity'] = GRAVITY_LIKE;
$datarray['last-child'] = 0;
// only one like or dislike per person
- $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 limit 1",
+ $r = q("select id from item where uid = %d and `contact-id` = %d and verb = '%s' and (`thr-parent` = '%s' or `parent-uri` = '%s') and deleted = 0 limit 1",
intval($datarray['uid']),
intval($datarray['contact-id']),
- dbesc($datarray['verb'])
+ dbesc($datarray['verb']),
+ dbesc($datarray['parent-uri']),
+ dbesc($datarray['parent-uri'])
+
);
if($r && count($r))
continue;
@@ -2533,10 +2617,12 @@ function local_delivery($importer,$data) {
$datarray['type'] = 'activity';
$datarray['gravity'] = GRAVITY_LIKE;
// only one like or dislike per person
- $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 limit 1",
+ $r = q("select id from item where uid = %d and `contact-id` = %d and verb ='%s' and deleted = 0 and (`parent-uri` = '%s' OR `thr-parent` = '%s') limit 1",
intval($datarray['uid']),
intval($datarray['contact-id']),
- dbesc($datarray['verb'])
+ dbesc($datarray['verb']),
+ dbesc($parent_uri),
+ dbesc($parent_uri)
);
if($r && count($r))
continue;
@@ -2931,8 +3017,10 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) {
if(strlen($item['owner-name']))
$o .= atom_author('dfrn:owner',$item['owner-name'],$item['owner-link'],80,80,$item['owner-avatar']);
- if(($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']))
- $o .= '<thr:in-reply-to ref="' . xmlify($item['parent-uri']) . '" type="text/html" href="' . xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['parent']) . '" />' . "\r\n";
+ if(($item['parent'] != $item['id']) || ($item['parent-uri'] !== $item['uri']) || ($item['thr-parent'])) {
+ $parent_item = (($item['thr-parent']) ? $item['thr-parent'] : $item['parent-uri']);
+ $o .= '<thr:in-reply-to ref="' . xmlify($parent_item) . '" type="text/html" href="' . xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['parent']) . '" />' . "\r\n";
+ }
$o .= '<id>' . xmlify($item['uri']) . '</id>' . "\r\n";
$o .= '<title>' . xmlify($item['title']) . '</title>' . "\r\n";
@@ -2953,7 +3041,7 @@ function atom_entry($item,$type,$author,$owner,$comment = false,$cid = 0) {
$o .= '<georss:point>' . xmlify($item['coord']) . '</georss:point>' . "\r\n";
if(($item['private']) || strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid']))
- $o .= '<dfrn:private>1</dfrn:private>' . "\r\n";
+ $o .= '<dfrn:private>' . (($item['private']) ? $item['private'] : 1) . '</dfrn:private>' . "\r\n";
if($item['extid'])
$o .= '<dfrn:extid>' . xmlify($item['extid']) . '</dfrn:extid>' . "\r\n";
@@ -3349,40 +3437,8 @@ function drop_item($id,$interactive = true) {
);
}
- // Add a relayable_retraction signature for Diaspora. Note that we can't add a target_author_signature
- // if the comment was deleted by a remote user. That should be ok, because if a remote user is deleting
- // the comment, that means we're the home of the post, and Diaspora will only
- // check the parent_author_signature of retractions that it doesn't have to relay further
- //
- // I don't think this function gets called for an "unlike," but I'll check anyway
- $signed_text = $item['guid'] . ';' . ( ($item['verb'] === ACTIVITY_LIKE) ? 'Like' : 'Comment');
-
- if(local_user() == $item['uid']) {
-
- $handle = $a->user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
- $authorsig = base64_encode(rsa_sign($signed_text,$a->user['prvkey'],'sha256'));
- }
- else {
- $r = q("SELECT `nick`, `url` FROM `contact` WHERE `id` = '%d' LIMIT 1",
- $item['contact-id']
- );
- if(count($r)) {
- // The below handle only works for NETWORK_DFRN. I think that's ok, because this function
- // only handles DFRN deletes
- $handle_baseurl_start = strpos($r['url'],'://') + 3;
- $handle_baseurl_length = strpos($r['url'],'/profile') - $handle_baseurl_start;
- $handle = $r['nick'] . '@' . substr($r['url'], $handle_baseurl_start, $handle_baseurl_length);
- $authorsig = '';
- }
- }
-
- if(isset($handle))
- q("insert into sign (`retract_iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
- intval($item['id']),
- dbesc($signed_text),
- dbesc($authorsig),
- dbesc($handle)
- );
+ // Add a relayable_retraction signature for Diaspora.
+ store_diaspora_retract_sig($item, $a->user, $a->get_baseurl());
}
$drop_id = intval($item['id']);
@@ -3469,4 +3525,53 @@ function posted_date_widget($url,$uid,$wall) {
'$dates' => $ret
));
return $o;
-} \ No newline at end of file
+}
+
+
+function store_diaspora_retract_sig($item, $user, $baseurl) {
+ // Note that we can't add a target_author_signature
+ // if the comment was deleted by a remote user. That should be ok, because if a remote user is deleting
+ // the comment, that means we're the home of the post, and Diaspora will only
+ // check the parent_author_signature of retractions that it doesn't have to relay further
+ //
+ // I don't think this function gets called for an "unlike," but I'll check anyway
+
+ $enabled = intval(get_config('system','diaspora_enabled'));
+ if(! $enabled) {
+ logger('drop_item: diaspora support disabled, not storing retraction signature', LOGGER_DEBUG);
+ return;
+ }
+
+ logger('drop_item: storing diaspora retraction signature');
+
+ $signed_text = $item['guid'] . ';' . ( ($item['verb'] === ACTIVITY_LIKE) ? 'Like' : 'Comment');
+
+ if(local_user() == $item['uid']) {
+
+ $handle = $user['nickname'] . '@' . substr($baseurl, strpos($baseurl,'://') + 3);
+ $authorsig = base64_encode(rsa_sign($signed_text,$user['prvkey'],'sha256'));
+ }
+ else {
+ $r = q("SELECT `nick`, `url` FROM `contact` WHERE `id` = '%d' LIMIT 1",
+ $item['contact-id']
+ );
+ if(count($r)) {
+ // The below handle only works for NETWORK_DFRN. I think that's ok, because this function
+ // only handles DFRN deletes
+ $handle_baseurl_start = strpos($r['url'],'://') + 3;
+ $handle_baseurl_length = strpos($r['url'],'/profile') - $handle_baseurl_start;
+ $handle = $r['nick'] . '@' . substr($r['url'], $handle_baseurl_start, $handle_baseurl_length);
+ $authorsig = '';
+ }
+ }
+
+ if(isset($handle))
+ q("insert into sign (`retract_iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
+ intval($item['id']),
+ dbesc($signed_text),
+ dbesc($authorsig),
+ dbesc($handle)
+ );
+
+ return;
+}
diff --git a/include/lock.php b/include/lock.php
new file mode 100644
index 000000000..5f1ca6323
--- /dev/null
+++ b/include/lock.php
@@ -0,0 +1,77 @@
+<?php
+
+// Provide some ability to lock a PHP function so that multiple processes
+// can't run the function concurrently
+if(! function_exists('lock_function')) {
+function lock_function($fn_name, $block = true, $wait_sec = 2, $timeout = 30) {
+ if( $wait_sec == 0 )
+ $wait_sec = 2; // don't let the user pick a value that's likely to crash the system
+
+ $got_lock = false;
+ $start = time();
+
+ do {
+ q("LOCK TABLE locks WRITE");
+ $r = q("SELECT locked FROM locks WHERE name = '%s' LIMIT 1",
+ dbesc($fn_name)
+ );
+
+ if((count($r)) && (! $r[0]['locked'])) {
+ q("UPDATE locks SET locked = 1 WHERE name = '%s' LIMIT 1",
+ dbesc($fn_name)
+ );
+ $got_lock = true;
+ }
+ elseif(! $r) { // the Boolean value for count($r) should be equivalent to the Boolean value of $r
+ q("INSERT INTO locks ( name, locked ) VALUES ( '%s', 1 )",
+ dbesc($fn_name)
+ );
+ $got_lock = true;
+ }
+
+ q("UNLOCK TABLES");
+
+ if(($block) && (! $got_lock))
+ sleep($wait_sec);
+
+ } while(($block) && (! $got_lock) && ((time() - $start) < $timeout));
+
+ logger('lock_function: function ' . $fn_name . ' with blocking = ' . $block . ' got_lock = ' . $got_lock . ' time = ' . (time() - $start), LOGGER_DEBUG);
+
+ return $got_lock;
+}}
+
+
+if(! function_exists('block_on_function_lock')) {
+function block_on_function_lock($fn_name, $wait_sec = 2, $timeout = 30) {
+ if( $wait_sec == 0 )
+ $wait_sec = 2; // don't let the user pick a value that's likely to crash the system
+
+ $start = time();
+
+ do {
+ $r = q("SELECT locked FROM locks WHERE name = '%s' LIMIT 1",
+ dbesc($fn_name)
+ );
+
+ if(count($r) && $r[0]['locked'])
+ sleep($wait_sec);
+
+ } while(count($r) && $r[0]['locked'] && ((time() - $start) < $timeout));
+
+ return;
+}}
+
+
+if(! function_exists('unlock_function')) {
+function unlock_function($fn_name) {
+ $r = q("UPDATE locks SET locked = 0 WHERE name = '%s' LIMIT 1",
+ dbesc($fn_name)
+ );
+
+ logger('unlock_function: released lock for function ' . $fn_name, LOGGER_DEBUG);
+
+ return;
+}}
+
+?>
diff --git a/include/markdownify/LICENSE_LGPL.txt b/include/markdownify/LICENSE_LGPL.txt
new file mode 100644
index 000000000..5ab7695ab
--- /dev/null
+++ b/include/markdownify/LICENSE_LGPL.txt
@@ -0,0 +1,504 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/include/markdownify/TODO b/include/markdownify/TODO
new file mode 100644
index 000000000..06ec8508b
--- /dev/null
+++ b/include/markdownify/TODO
@@ -0,0 +1,29 @@
+Markdownify
+===========
+* handle non-markdownifiable lists (i.e. `<ul><li id="foobar">asdf</li></ul>`)
+* organize methods better (i.e. flushlinebreaks & setlinebreaks close to each other)
+* take a look at function names etc.
+* is the new (in rev. 93) lastclosedtag property needed?
+* word wrapping (some work is done but it's still very buggy)
+
+
+Markdownify Extra
+=================
+
+* handle table alignment with KEEP_HTML=false
+* handle tables without headings when KEEP_HTML=false is set
+* handle Markdown inside non-markdownable tags
+
+
+Implementation Thoughts
+=======================
+* non-markdownifiable lists and markdown inside non-markdownable tags as well as the current
+ table implementation could be rewritten by using a rollback mechanism.
+
+ example:
+
+ <ul><li>asdf</li><li id="foobar">asdf</li></ul>
+
+ we come to `<ul>`, know that this might fail and create a snapshot of our current parser
+ we keep on parsing and when we reach `<li id="foobar">` we gotta rollback and keep this
+ list in HTML format.
diff --git a/include/markdownify/example.php b/include/markdownify/example.php
new file mode 100644
index 000000000..ef86dca83
--- /dev/null
+++ b/include/markdownify/example.php
@@ -0,0 +1,51 @@
+<?php
+ error_reporting(E_ALL);
+ if (!empty($_POST['input'])) {
+ include 'markdownify_extra.php';
+ if (!isset($_POST['leap'])) {
+ $leap = MDFY_LINKS_EACH_PARAGRAPH;
+ } else {
+ $leap = $_POST['leap'];
+ }
+
+ if (!isset($_POST['keepHTML'])) {
+ $keephtml = MDFY_KEEPHTML;
+ } else {
+ $keephtml = $_POST['keepHTML'];
+ }
+ if (!empty($_POST['extra'])) {
+ $md = new Markdownify_Extra($leap, MDFY_BODYWIDTH, $keephtml);
+ } else {
+ $md = new Markdownify($leap, MDFY_BODYWIDTH, $keephtml);
+ }
+ if (ini_get('magic_quotes_gpc')) {
+ $_POST['input'] = stripslashes($_POST['input']);
+ }
+ $output = $md->parseString($_POST['input']);
+ } else {
+ $_POST['input'] = '';
+ }
+?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+ <title>HTML to Markdown Converter</title>
+ </head>
+ <body>
+ <?php if (empty($_POST['input'])): ?>
+ <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
+ <fieldset>
+ <legend>HTML Input</legend>
+ <textarea style="width:100%;" cols="85" rows="40" name="input"><?php echo htmlspecialchars($_POST['input'], ENT_NOQUOTES, 'UTF-8'); ?></textarea>
+ </fieldset>
+ <label for="extra">Markdownify Extra: <input name="extra" checked="checked" id="extra" type="checkbox" value="1" /></label>
+ <label for="leap">Links after each block elem: <input name="leap" id="leap" type="checkbox" value="1" /></label>
+ <label for="keepHTML">keep HTML: <input name="keepHTML" id="keepHTML" type="checkbox" value="1" checked="checked" /></label>
+ <input type="submit" name="submit" value="submit" />
+ </form>
+ <?php else: ?>
+ <h1 style="text-align:right;"><a href="<?php echo $_SERVER['PHP_SELF']; ?>">BACK</a></h1>
+ <pre><?php echo htmlspecialchars($output, ENT_NOQUOTES, 'UTF-8'); ?></pre>
+ <?php endif; ?>
+ </body>
+</html> \ No newline at end of file
diff --git a/include/markdownify/markdownify.php b/include/markdownify/markdownify.php
new file mode 100644
index 000000000..43730cb77
--- /dev/null
+++ b/include/markdownify/markdownify.php
@@ -0,0 +1,1184 @@
+<?php
+/**
+ * Markdownify converts HTML Markup to [Markdown][1] (by [John Gruber][2]. It
+ * also supports [Markdown Extra][3] by [Michel Fortin][4] via Markdownify_Extra.
+ *
+ * It all started as `html2text.php` - a port of [Aaron Swartz'][5] [`html2text.py`][6] - but
+ * got a long way since. This is far more than a mere port now!
+ * Starting with version 2.0.0 this is a complete rewrite and cannot be
+ * compared to Aaron Swatz' `html2text.py` anylonger. I'm now using a HTML parser
+ * (see `parsehtml.php` which I also wrote) which makes most of the evil
+ * RegEx magic go away and additionally it gives a much cleaner class
+ * structure. Also notably is the fact that I now try to prevent regressions by
+ * utilizing testcases of Michel Fortin's [MDTest][7].
+ *
+ * [1]: http://daringfireball.com/projects/markdown
+ * [2]: http://daringfireball.com/
+ * [3]: http://www.michelf.com/projects/php-markdown/extra/
+ * [4]: http://www.michelf.com/
+ * [5]: http://www.aaronsw.com/
+ * [6]: http://www.aaronsw.com/2002/html2text/
+ * [7]: http://article.gmane.org/gmane.text.markdown.general/2540
+ *
+ * @version 2.0.0 alpha
+ * @author Milian Wolff (<mail@milianw.de>, <http://milianw.de>)
+ * @license LGPL, see LICENSE_LGPL.txt and the summary below
+ * @copyright (C) 2007 Milian Wolff
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * HTML Parser, see http://sf.net/projects/parseHTML
+ */
+require_once dirname(__FILE__).'/parsehtml/parsehtml.php';
+
+/**
+ * default configuration
+ */
+define('MDFY_LINKS_EACH_PARAGRAPH', false);
+define('MDFY_BODYWIDTH', false);
+define('MDFY_KEEPHTML', true);
+
+/**
+ * HTML to Markdown converter class
+ */
+class Markdownify {
+ /**
+ * html parser object
+ *
+ * @var parseHTML
+ */
+ var $parser;
+ /**
+ * markdown output
+ *
+ * @var string
+ */
+ var $output;
+ /**
+ * stack with tags which where not converted to html
+ *
+ * @var array<string>
+ */
+ var $notConverted = array();
+ /**
+ * skip conversion to markdown
+ *
+ * @var bool
+ */
+ var $skipConversion = false;
+ /* options */
+ /**
+ * keep html tags which cannot be converted to markdown
+ *
+ * @var bool
+ */
+ var $keepHTML = false;
+ /**
+ * wrap output, set to 0 to skip wrapping
+ *
+ * @var int
+ */
+ var $bodyWidth = 0;
+ /**
+ * minimum body width
+ *
+ * @var int
+ */
+ var $minBodyWidth = 25;
+ /**
+ * display links after each paragraph
+ *
+ * @var bool
+ */
+ var $linksAfterEachParagraph = false;
+ /**
+ * constructor, set options, setup parser
+ *
+ * @param bool $linksAfterEachParagraph wether or not to flush stacked links after each paragraph
+ * defaults to false
+ * @param int $bodyWidth wether or not to wrap the output to the given width
+ * defaults to false
+ * @param bool $keepHTML wether to keep non markdownable HTML or to discard it
+ * defaults to true (HTML will be kept)
+ * @return void
+ */
+ function Markdownify($linksAfterEachParagraph = MDFY_LINKS_EACH_PARAGRAPH, $bodyWidth = MDFY_BODYWIDTH, $keepHTML = MDFY_KEEPHTML) {
+ $this->linksAfterEachParagraph = $linksAfterEachParagraph;
+ $this->keepHTML = $keepHTML;
+
+ if ($bodyWidth > $this->minBodyWidth) {
+ $this->bodyWidth = intval($bodyWidth);
+ } else {
+ $this->bodyWidth = false;
+ }
+
+ $this->parser = new parseHTML;
+ $this->parser->noTagsInCode = true;
+
+ # we don't have to do this every time
+ $search = array();
+ $replace = array();
+ foreach ($this->escapeInText as $s => $r) {
+ array_push($search, '#(?<!\\\)'.$s.'#U');
+ array_push($replace, $r);
+ }
+ $this->escapeInText = array(
+ 'search' => $search,
+ 'replace' => $replace
+ );
+ }
+ /**
+ * parse a HTML string
+ *
+ * @param string $html
+ * @return string markdown formatted
+ */
+ function parseString($html) {
+ $this->parser->html = $html;
+ $this->parse();
+ return $this->output;
+ }
+ /**
+ * tags with elements which can be handled by markdown
+ *
+ * @var array<string>
+ */
+ var $isMarkdownable = array(
+ 'p' => array(),
+ 'ul' => array(),
+ 'ol' => array(),
+ 'li' => array(),
+ 'br' => array(),
+ 'blockquote' => array(),
+ 'code' => array(),
+ 'pre' => array(),
+ 'a' => array(
+ 'href' => 'required',
+ 'title' => 'optional',
+ ),
+ 'strong' => array(),
+ 'b' => array(),
+ 'em' => array(),
+ 'i' => array(),
+ 'img' => array(
+ 'src' => 'required',
+ 'alt' => 'optional',
+ 'title' => 'optional',
+ ),
+ 'h1' => array(),
+ 'h2' => array(),
+ 'h3' => array(),
+ 'h4' => array(),
+ 'h5' => array(),
+ 'h6' => array(),
+ 'hr' => array(),
+ );
+ /**
+ * html tags to be ignored (contents will be parsed)
+ *
+ * @var array<string>
+ */
+ var $ignore = array(
+ 'html',
+ 'body',
+ );
+ /**
+ * html tags to be dropped (contents will not be parsed!)
+ *
+ * @var array<string>
+ */
+ var $drop = array(
+ 'script',
+ 'head',
+ 'style',
+ 'form',
+ 'area',
+ 'object',
+ 'param',
+ 'iframe',
+ );
+ /**
+ * Markdown indents which could be wrapped
+ * @note: use strings in regex format
+ *
+ * @var array<string>
+ */
+ var $wrappableIndents = array(
+ '\* ', # ul
+ '\d. ', # ol
+ '\d\d. ', # ol
+ '> ', # blockquote
+ '', # p
+ );
+ /**
+ * list of chars which have to be escaped in normal text
+ * @note: use strings in regex format
+ *
+ * @var array
+ *
+ * TODO: what's with block chars / sequences at the beginning of a block?
+ */
+ var $escapeInText = array(
+ '([-*_])([ ]{0,2}\1){2,}' => '\\\\$0|', # hr
+ '\*\*([^*\s]+)\*\*' => '\*\*$1\*\*', # strong
+ '\*([^*\s]+)\*' => '\*$1\*', # em
+ '__(?! |_)(.+)(?!<_| )__' => '\_\_$1\_\_', # em
+ '_(?! |_)(.+)(?!<_| )_' => '\_$1\_', # em
+ '`(.+)`' => '\`$1\`', # code
+ '\[(.+)\](\s*\()' => '\[$1\]$2', # links: [text] (url) => [text\] (url)
+ '\[(.+)\](\s*)\[(.*)\]' => '\[$1\]$2\[$3\]', # links: [text][id] => [text\][id\]
+ );
+ /**
+ * wether last processed node was a block tag or not
+ *
+ * @var bool
+ */
+ var $lastWasBlockTag = false;
+ /**
+ * name of last closed tag
+ *
+ * @var string
+ */
+ var $lastClosedTag = '';
+ /**
+ * iterate through the nodes and decide what we
+ * shall do with the current node
+ *
+ * @param void
+ * @return void
+ */
+ function parse() {
+ $this->output = '';
+ # drop tags
+ $this->parser->html = preg_replace('#<('.implode('|', $this->drop).')[^>]*>.*</\\1>#sU', '', $this->parser->html);
+ while ($this->parser->nextNode()) {
+ switch ($this->parser->nodeType) {
+ case 'doctype':
+ break;
+ case 'pi':
+ case 'comment':
+ if ($this->keepHTML) {
+ $this->flushLinebreaks();
+ $this->out($this->parser->node);
+ $this->setLineBreaks(2);
+ }
+ # else drop
+ break;
+ case 'text':
+ $this->handleText();
+ break;
+ case 'tag':
+ if (in_array($this->parser->tagName, $this->ignore)) {
+ break;
+ }
+ if ($this->parser->isStartTag) {
+ $this->flushLinebreaks();
+ }
+ if ($this->skipConversion) {
+ $this->isMarkdownable(); # update notConverted
+ $this->handleTagToText();
+ continue;
+ }
+ if (!$this->parser->keepWhitespace && $this->parser->isBlockElement && $this->parser->isStartTag) {
+ $this->parser->html = ltrim($this->parser->html);
+ }
+ if ($this->isMarkdownable()) {
+ if ($this->parser->isBlockElement && $this->parser->isStartTag && !$this->lastWasBlockTag && !empty($this->output)) {
+ if (!empty($this->buffer)) {
+ $str =& $this->buffer[count($this->buffer) -1];
+ } else {
+ $str =& $this->output;
+ }
+ if (substr($str, -strlen($this->indent)-1) != "\n".$this->indent) {
+ $str .= "\n".$this->indent;
+ }
+ }
+ $func = 'handleTag_'.$this->parser->tagName;
+ $this->$func();
+ if ($this->linksAfterEachParagraph && $this->parser->isBlockElement && !$this->parser->isStartTag && empty($this->parser->openTags)) {
+ $this->flushStacked();
+ }
+ if (!$this->parser->isStartTag) {
+ $this->lastClosedTag = $this->parser->tagName;
+ }
+ } else {
+ $this->handleTagToText();
+ $this->lastClosedTag = '';
+ }
+ break;
+ default:
+ trigger_error('invalid node type', E_USER_ERROR);
+ break;
+ }
+ $this->lastWasBlockTag = $this->parser->nodeType == 'tag' && $this->parser->isStartTag && $this->parser->isBlockElement;
+ }
+ if (!empty($this->buffer)) {
+ trigger_error('buffer was not flushed, this is a bug. please report!', E_USER_WARNING);
+ while (!empty($this->buffer)) {
+ $this->out($this->unbuffer());
+ }
+ }
+ ### cleanup
+ $this->output = rtrim(str_replace('&amp;', '&', str_replace('&lt;', '<', str_replace('&gt;', '>', $this->output))));
+ # end parsing, flush stacked tags
+ $this->flushStacked();
+ $this->stack = array();
+ }
+ /**
+ * check if current tag can be converted to Markdown
+ *
+ * @param void
+ * @return bool
+ */
+ function isMarkdownable() {
+ if (!isset($this->isMarkdownable[$this->parser->tagName])) {
+ # simply not markdownable
+ return false;
+ }
+ if ($this->parser->isStartTag) {
+ $return = true;
+ if ($this->keepHTML) {
+ $diff = array_diff(array_keys($this->parser->tagAttributes), array_keys($this->isMarkdownable[$this->parser->tagName]));
+ if (!empty($diff)) {
+ # non markdownable attributes given
+ $return = false;
+ }
+ }
+ if ($return) {
+ foreach ($this->isMarkdownable[$this->parser->tagName] as $attr => $type) {
+ if ($type == 'required' && !isset($this->parser->tagAttributes[$attr])) {
+ # required markdown attribute not given
+ $return = false;
+ break;
+ }
+ }
+ }
+ if (!$return) {
+ array_push($this->notConverted, $this->parser->tagName.'::'.implode('/', $this->parser->openTags));
+ }
+ return $return;
+ } else {
+ if (!empty($this->notConverted) && end($this->notConverted) === $this->parser->tagName.'::'.implode('/', $this->parser->openTags)) {
+ array_pop($this->notConverted);
+ return false;
+ }
+ return true;
+ }
+ }
+ /**
+ * output all stacked tags
+ *
+ * @param void
+ * @return void
+ */
+ function flushStacked() {
+ # links
+ foreach ($this->stack as $tag => $a) {
+ if (!empty($a)) {
+ call_user_func(array(&$this, 'flushStacked_'.$tag));
+ }
+ }
+ }
+ /**
+ * output link references (e.g. [1]: http://example.com "title");
+ *
+ * @param void
+ * @return void
+ */
+ function flushStacked_a() {
+ $out = false;
+ foreach ($this->stack['a'] as $k => $tag) {
+ if (!isset($tag['unstacked'])) {
+ if (!$out) {
+ $out = true;
+ $this->out("\n\n", true);
+ } else {
+ $this->out("\n", true);
+ }
+ $this->out(' ['.$tag['linkID'].']: '.$tag['href'].(isset($tag['title']) ? ' "'.$tag['title'].'"' : ''), true);
+ $tag['unstacked'] = true;
+ $this->stack['a'][$k] = $tag;
+ }
+ }
+ }
+ /**
+ * flush enqued linebreaks
+ *
+ * @param void
+ * @return void
+ */
+ function flushLinebreaks() {
+ if ($this->lineBreaks && !empty($this->output)) {
+ $this->out(str_repeat("\n".$this->indent, $this->lineBreaks), true);
+ }
+ $this->lineBreaks = 0;
+ }
+ /**
+ * handle non Markdownable tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTagToText() {
+ if (!$this->keepHTML) {
+ if (!$this->parser->isStartTag && $this->parser->isBlockElement) {
+ $this->setLineBreaks(2);
+ }
+ } else {
+ # dont convert to markdown inside this tag
+ /** TODO: markdown extra **/
+ if (!$this->parser->isEmptyTag) {
+ if ($this->parser->isStartTag) {
+ if (!$this->skipConversion) {
+ $this->skipConversion = $this->parser->tagName.'::'.implode('/', $this->parser->openTags);
+ }
+ } else {
+ if ($this->skipConversion == $this->parser->tagName.'::'.implode('/', $this->parser->openTags)) {
+ $this->skipConversion = false;
+ }
+ }
+ }
+
+ if ($this->parser->isBlockElement) {
+ if ($this->parser->isStartTag) {
+ if (in_array($this->parent(), array('ins', 'del'))) {
+ # looks like ins or del are block elements now
+ $this->out("\n", true);
+ $this->indent(' ');
+ }
+ if ($this->parser->tagName != 'pre') {
+ $this->out($this->parser->node."\n".$this->indent);
+ if (!$this->parser->isEmptyTag) {
+ $this->indent(' ');
+ } else {
+ $this->setLineBreaks(1);
+ }
+ $this->parser->html = ltrim($this->parser->html);
+ } else {
+ # don't indent inside <pre> tags
+ $this->out($this->parser->node);
+ static $indent;
+ $indent = $this->indent;
+ $this->indent = '';
+ }
+ } else {
+ if (!$this->parser->keepWhitespace) {
+ $this->output = rtrim($this->output);
+ }
+ if ($this->parser->tagName != 'pre') {
+ $this->indent(' ');
+ $this->out("\n".$this->indent.$this->parser->node);
+ } else {
+ # reset indentation
+ $this->out($this->parser->node);
+ static $indent;
+ $this->indent = $indent;
+ }
+
+ if (in_array($this->parent(), array('ins', 'del'))) {
+ # ins or del was block element
+ $this->out("\n");
+ $this->indent(' ');
+ }
+ if ($this->parser->tagName == 'li') {
+ $this->setLineBreaks(1);
+ } else {
+ $this->setLineBreaks(2);
+ }
+ }
+ } else {
+ $this->out($this->parser->node);
+ }
+ if (in_array($this->parser->tagName, array('code', 'pre'))) {
+ if ($this->parser->isStartTag) {
+ $this->buffer();
+ } else {
+ # add stuff so cleanup just reverses this
+ $this->out(str_replace('&lt;', '&amp;lt;', str_replace('&gt;', '&amp;gt;', $this->unbuffer())));
+ }
+ }
+ }
+ }
+ /**
+ * handle plain text
+ *
+ * @param void
+ * @return void
+ */
+ function handleText() {
+ if ($this->hasParent('pre') && strpos($this->parser->node, "\n") !== false) {
+ $this->parser->node = str_replace("\n", "\n".$this->indent, $this->parser->node);
+ }
+ if (!$this->hasParent('code') && !$this->hasParent('pre')) {
+ # entity decode
+ $this->parser->node = $this->decode($this->parser->node);
+ if (!$this->skipConversion) {
+ # escape some chars in normal Text
+ $this->parser->node = preg_replace($this->escapeInText['search'], $this->escapeInText['replace'], $this->parser->node);
+ }
+ } else {
+ $this->parser->node = str_replace(array('&quot;', '&apos'), array('"', '\''), $this->parser->node);
+ }
+ $this->out($this->parser->node);
+ $this->lastClosedTag = '';
+ }
+ /**
+ * handle <em> and <i> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_em() {
+ $this->out('*', true);
+ }
+ function handleTag_i() {
+ $this->handleTag_em();
+ }
+ /**
+ * handle <strong> and <b> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_strong() {
+ $this->out('**', true);
+ }
+ function handleTag_b() {
+ $this->handleTag_strong();
+ }
+ /**
+ * handle <h1> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_h1() {
+ $this->handleHeader(1);
+ }
+ /**
+ * handle <h2> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_h2() {
+ $this->handleHeader(2);
+ }
+ /**
+ * handle <h3> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_h3() {
+ $this->handleHeader(3);
+ }
+ /**
+ * handle <h4> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_h4() {
+ $this->handleHeader(4);
+ }
+ /**
+ * handle <h5> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_h5() {
+ $this->handleHeader(5);
+ }
+ /**
+ * handle <h6> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_h6() {
+ $this->handleHeader(6);
+ }
+ /**
+ * number of line breaks before next inline output
+ */
+ var $lineBreaks = 0;
+ /**
+ * handle header tags (<h1> - <h6>)
+ *
+ * @param int $level 1-6
+ * @return void
+ */
+ function handleHeader($level) {
+ if ($this->parser->isStartTag) {
+ $this->out(str_repeat('#', $level).' ', true);
+ } else {
+ $this->setLineBreaks(2);
+ }
+ }
+ /**
+ * handle <p> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_p() {
+ if (!$this->parser->isStartTag) {
+ $this->setLineBreaks(2);
+ }
+ }
+ /**
+ * handle <a> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_a() {
+ if ($this->parser->isStartTag) {
+ $this->buffer();
+ if (isset($this->parser->tagAttributes['title'])) {
+ $this->parser->tagAttributes['title'] = $this->decode($this->parser->tagAttributes['title']);
+ } else {
+ $this->parser->tagAttributes['title'] = null;
+ }
+ $this->parser->tagAttributes['href'] = $this->decode(trim($this->parser->tagAttributes['href']));
+ $this->stack();
+ } else {
+ $tag = $this->unstack();
+ $buffer = $this->unbuffer();
+
+ if (empty($tag['href']) && empty($tag['title'])) {
+ # empty links... testcase mania, who would possibly do anything like that?!
+ $this->out('['.$buffer.']()', true);
+ return;
+ }
+
+ if ($buffer == $tag['href'] && empty($tag['title'])) {
+ # <http://example.com>
+ $this->out('<'.$buffer.'>', true);
+ return;
+ }
+
+ $bufferDecoded = $this->decode(trim($buffer));
+ if (substr($tag['href'], 0, 7) == 'mailto:' && 'mailto:'.$bufferDecoded == $tag['href']) {
+ if (is_null($tag['title'])) {
+ # <mail@example.com>
+ $this->out('<'.$bufferDecoded.'>', true);
+ return;
+ }
+ # [mail@example.com][1]
+ # ...
+ # [1]: mailto:mail@example.com Title
+ $tag['href'] = 'mailto:'.$bufferDecoded;
+ }
+ # [This link][id]
+ foreach ($this->stack['a'] as $tag2) {
+ if ($tag2['href'] == $tag['href'] && $tag2['title'] === $tag['title']) {
+ $tag['linkID'] = $tag2['linkID'];
+ break;
+ }
+ }
+ if (!isset($tag['linkID'])) {
+ $tag['linkID'] = count($this->stack['a']) + 1;
+ array_push($this->stack['a'], $tag);
+ }
+
+ $this->out('['.$buffer.']['.$tag['linkID'].']', true);
+ }
+ }
+ /**
+ * handle <img /> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_img() {
+ if (!$this->parser->isStartTag) {
+ return; # just to be sure this is really an empty tag...
+ }
+
+ if (isset($this->parser->tagAttributes['title'])) {
+ $this->parser->tagAttributes['title'] = $this->decode($this->parser->tagAttributes['title']);
+ } else {
+ $this->parser->tagAttributes['title'] = null;
+ }
+ if (isset($this->parser->tagAttributes['alt'])) {
+ $this->parser->tagAttributes['alt'] = $this->decode($this->parser->tagAttributes['alt']);
+ } else {
+ $this->parser->tagAttributes['alt'] = null;
+ }
+
+ if (empty($this->parser->tagAttributes['src'])) {
+ # support for "empty" images... dunno if this is really needed
+ # but there are some testcases which do that...
+ if (!empty($this->parser->tagAttributes['title'])) {
+ $this->parser->tagAttributes['title'] = ' '.$this->parser->tagAttributes['title'].' ';
+ }
+ $this->out('!['.$this->parser->tagAttributes['alt'].']('.$this->parser->tagAttributes['title'].')', true);
+ return;
+ } else {
+ $this->parser->tagAttributes['src'] = $this->decode($this->parser->tagAttributes['src']);
+ }
+
+ # [This link][id]
+ $link_id = false;
+ if (!empty($this->stack['a'])) {
+ foreach ($this->stack['a'] as $tag) {
+ if ($tag['href'] == $this->parser->tagAttributes['src']
+ && $tag['title'] === $this->parser->tagAttributes['title']) {
+ $link_id = $tag['linkID'];
+ break;
+ }
+ }
+ } else {
+ $this->stack['a'] = array();
+ }
+ if (!$link_id) {
+ $link_id = count($this->stack['a']) + 1;
+ $tag = array(
+ 'href' => $this->parser->tagAttributes['src'],
+ 'linkID' => $link_id,
+ 'title' => $this->parser->tagAttributes['title']
+ );
+ array_push($this->stack['a'], $tag);
+ }
+
+ $this->out('!['.$this->parser->tagAttributes['alt'].']['.$link_id.']', true);
+ }
+ /**
+ * handle <code> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_code() {
+ if ($this->hasParent('pre')) {
+ # ignore code blocks inside <pre>
+ return;
+ }
+ if ($this->parser->isStartTag) {
+ $this->buffer();
+ } else {
+ $buffer = $this->unbuffer();
+ # use as many backticks as needed
+ preg_match_all('#`+#', $buffer, $matches);
+ if (!empty($matches[0])) {
+ rsort($matches[0]);
+
+ $ticks = '`';
+ while (true) {
+ if (!in_array($ticks, $matches[0])) {
+ break;
+ }
+ $ticks .= '`';
+ }
+ } else {
+ $ticks = '`';
+ }
+ if ($buffer[0] == '`' || substr($buffer, -1) == '`') {
+ $buffer = ' '.$buffer.' ';
+ }
+ $this->out($ticks.$buffer.$ticks, true);
+ }
+ }
+ /**
+ * handle <pre> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_pre() {
+ if ($this->keepHTML && $this->parser->isStartTag) {
+ # check if a simple <code> follows
+ if (!preg_match('#^\s*<code\s*>#Us', $this->parser->html)) {
+ # this is no standard markdown code block
+ $this->handleTagToText();
+ return;
+ }
+ }
+ $this->indent(' ');
+ if (!$this->parser->isStartTag) {
+ $this->setLineBreaks(2);
+ } else {
+ $this->parser->html = ltrim($this->parser->html);
+ }
+ }
+ /**
+ * handle <blockquote> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_blockquote() {
+ $this->indent('> ');
+ }
+ /**
+ * handle <ul> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_ul() {
+ if ($this->parser->isStartTag) {
+ $this->stack();
+ if (!$this->keepHTML && $this->lastClosedTag == $this->parser->tagName) {
+ $this->out("\n".$this->indent.'<!-- -->'."\n".$this->indent."\n".$this->indent);
+ }
+ } else {
+ $this->unstack();
+ if ($this->parent() != 'li' || preg_match('#^\s*(</li\s*>\s*<li\s*>\s*)?<(p|blockquote)\s*>#sU', $this->parser->html)) {
+ # dont make Markdown add unneeded paragraphs
+ $this->setLineBreaks(2);
+ }
+ }
+ }
+ /**
+ * handle <ul> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_ol() {
+ # same as above
+ $this->parser->tagAttributes['num'] = 0;
+ $this->handleTag_ul();
+ }
+ /**
+ * handle <li> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_li() {
+ if ($this->parent() == 'ol') {
+ $parent =& $this->getStacked('ol');
+ if ($this->parser->isStartTag) {
+ $parent['num']++;
+ $this->out($parent['num'].'.'.str_repeat(' ', 3 - strlen($parent['num'])), true);
+ }
+ $this->indent(' ', false);
+ } else {
+ if ($this->parser->isStartTag) {
+ $this->out('* ', true);
+ }
+ $this->indent(' ', false);
+ }
+ if (!$this->parser->isStartTag) {
+ $this->setLineBreaks(1);
+ }
+ }
+ /**
+ * handle <hr /> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_hr() {
+ if (!$this->parser->isStartTag) {
+ return; # just to be sure this really is an empty tag
+ }
+ $this->out('* * *', true);
+ $this->setLineBreaks(2);
+ }
+ /**
+ * handle <br /> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_br() {
+ $this->out(" \n".$this->indent, true);
+ $this->parser->html = ltrim($this->parser->html);
+ }
+ /**
+ * node stack, e.g. for <a> and <abbr> tags
+ *
+ * @var array<array>
+ */
+ var $stack = array();
+ /**
+ * add current node to the stack
+ * this only stores the attributes
+ *
+ * @param void
+ * @return void
+ */
+ function stack() {
+ if (!isset($this->stack[$this->parser->tagName])) {
+ $this->stack[$this->parser->tagName] = array();
+ }
+ array_push($this->stack[$this->parser->tagName], $this->parser->tagAttributes);
+ }
+ /**
+ * remove current tag from stack
+ *
+ * @param void
+ * @return array
+ */
+ function unstack() {
+ if (!isset($this->stack[$this->parser->tagName]) || !is_array($this->stack[$this->parser->tagName])) {
+ trigger_error('Trying to unstack from empty stack. This must not happen.', E_USER_ERROR);
+ }
+ return array_pop($this->stack[$this->parser->tagName]);
+ }
+ /**
+ * get last stacked element of type $tagName
+ *
+ * @param string $tagName
+ * @return array
+ */
+ function & getStacked($tagName) {
+ // no end() so it can be referenced
+ return $this->stack[$tagName][count($this->stack[$tagName])-1];
+ }
+ /**
+ * set number of line breaks before next start tag
+ *
+ * @param int $number
+ * @return void
+ */
+ function setLineBreaks($number) {
+ if ($this->lineBreaks < $number) {
+ $this->lineBreaks = $number;
+ }
+ }
+ /**
+ * stores current buffers
+ *
+ * @var array<string>
+ */
+ var $buffer = array();
+ /**
+ * buffer next parser output until unbuffer() is called
+ *
+ * @param void
+ * @return void
+ */
+ function buffer() {
+ array_push($this->buffer, '');
+ }
+ /**
+ * end current buffer and return buffered output
+ *
+ * @param void
+ * @return string
+ */
+ function unbuffer() {
+ return array_pop($this->buffer);
+ }
+ /**
+ * append string to the correct var, either
+ * directly to $this->output or to the current
+ * buffers
+ *
+ * @param string $put
+ * @return void
+ */
+ function out($put, $nowrap = false) {
+ if (empty($put)) {
+ return;
+ }
+ if (!empty($this->buffer)) {
+ $this->buffer[count($this->buffer) - 1] .= $put;
+ } else {
+ if ($this->bodyWidth && !$this->parser->keepWhitespace) { # wrap lines
+ // get last line
+ $pos = strrpos($this->output, "\n");
+ if ($pos === false) {
+ $line = $this->output;
+ } else {
+ $line = substr($this->output, $pos);
+ }
+
+ if ($nowrap) {
+ if ($put[0] != "\n" && $this->strlen($line) + $this->strlen($put) > $this->bodyWidth) {
+ $this->output .= "\n".$this->indent.$put;
+ } else {
+ $this->output .= $put;
+ }
+ return;
+ } else {
+ $put .= "\n"; # make sure we get all lines in the while below
+ $lineLen = $this->strlen($line);
+ while ($pos = strpos($put, "\n")) {
+ $putLine = substr($put, 0, $pos+1);
+ $put = substr($put, $pos+1);
+ $putLen = $this->strlen($putLine);
+ if ($lineLen + $putLen < $this->bodyWidth) {
+ $this->output .= $putLine;
+ $lineLen = $putLen;
+ } else {
+ $split = preg_split('#^(.{0,'.($this->bodyWidth - $lineLen).'})\b#', $putLine, 2, PREG_SPLIT_OFFSET_CAPTURE | PREG_SPLIT_DELIM_CAPTURE);
+ $this->output .= rtrim($split[1][0])."\n".$this->indent.$this->wordwrap(ltrim($split[2][0]), $this->bodyWidth, "\n".$this->indent, false);
+ }
+ }
+ $this->output = substr($this->output, 0, -1);
+ return;
+ }
+ } else {
+ $this->output .= $put;
+ }
+ }
+ }
+ /**
+ * current indentation
+ *
+ * @var string
+ */
+ var $indent = '';
+ /**
+ * indent next output (start tag) or unindent (end tag)
+ *
+ * @param string $str indentation
+ * @param bool $output add indendation to output
+ * @return void
+ */
+ function indent($str, $output = true) {
+ if ($this->parser->isStartTag) {
+ $this->indent .= $str;
+ if ($output) {
+ $this->out($str, true);
+ }
+ } else {
+ $this->indent = substr($this->indent, 0, -strlen($str));
+ }
+ }
+ /**
+ * decode email addresses
+ *
+ * @author derernst@gmx.ch <http://www.php.net/manual/en/function.html-entity-decode.php#68536>
+ * @author Milian Wolff <http://milianw.de>
+ */
+ function decode($text, $quote_style = ENT_QUOTES) {
+ if (version_compare(PHP_VERSION, '5', '>=')) {
+ # UTF-8 is only supported in PHP 5.x.x and above
+ $text = html_entity_decode($text, $quote_style, 'UTF-8');
+ } else {
+ if (function_exists('html_entity_decode')) {
+ $text = html_entity_decode($text, $quote_style, 'ISO-8859-1');
+ } else {
+ static $trans_tbl;
+ if (!isset($trans_tbl)) {
+ $trans_tbl = array_flip(get_html_translation_table(HTML_ENTITIES, $quote_style));
+ }
+ $text = strtr($text, $trans_tbl);
+ }
+ $text = preg_replace_callback('~&#x([0-9a-f]+);~i', array(&$this, '_decode_hex'), $text);
+ $text = preg_replace_callback('~&#(\d{2,5});~', array(&$this, '_decode_numeric'), $text);
+ }
+ return $text;
+ }
+ /**
+ * callback for decode() which converts a hexadecimal entity to UTF-8
+ *
+ * @param array $matches
+ * @return string UTF-8 encoded
+ */
+ function _decode_hex($matches) {
+ return $this->unichr(hexdec($matches[1]));
+ }
+ /**
+ * callback for decode() which converts a numerical entity to UTF-8
+ *
+ * @param array $matches
+ * @return string UTF-8 encoded
+ */
+ function _decode_numeric($matches) {
+ return $this->unichr($matches[1]);
+ }
+ /**
+ * UTF-8 chr() which supports numeric entities
+ *
+ * @author grey - greywyvern - com <http://www.php.net/manual/en/function.chr.php#55978>
+ * @param array $matches
+ * @return string UTF-8 encoded
+ */
+ function unichr($dec) {
+ if ($dec < 128) {
+ $utf = chr($dec);
+ } else if ($dec < 2048) {
+ $utf = chr(192 + (($dec - ($dec % 64)) / 64));
+ $utf .= chr(128 + ($dec % 64));
+ } else {
+ $utf = chr(224 + (($dec - ($dec % 4096)) / 4096));
+ $utf .= chr(128 + ((($dec % 4096) - ($dec % 64)) / 64));
+ $utf .= chr(128 + ($dec % 64));
+ }
+ return $utf;
+ }
+ /**
+ * UTF-8 strlen()
+ *
+ * @param string $str
+ * @return int
+ *
+ * @author dtorop 932 at hotmail dot com <http://www.php.net/manual/en/function.strlen.php#37975>
+ * @author Milian Wolff <http://milianw.de>
+ */
+ function strlen($str) {
+ if (function_exists('mb_strlen')) {
+ return mb_strlen($str, 'UTF-8');
+ } else {
+ return preg_match_all('/[\x00-\x7F\xC0-\xFD]/', $str, $var_empty);
+ }
+ }
+ /**
+ * wordwrap for utf8 encoded strings
+ *
+ * @param string $str
+ * @param integer $len
+ * @param string $what
+ * @return string
+ */
+ function wordwrap($str, $width, $break, $cut = false){
+ if (!$cut) {
+ $regexp = '#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){1,'.$width.'}\b#';
+ } else {
+ $regexp = '#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){'.$width.'}#';
+ }
+ $return = '';
+ while (preg_match($regexp, $str, $matches)) {
+ $string = $matches[0];
+ $str = ltrim(substr($str, strlen($string)));
+ if (!$cut && isset($str[0]) && in_array($str[0], array('.', '!', ';', ':', '?', ','))) {
+ $string .= $str[0];
+ $str = ltrim(substr($str, 1));
+ }
+ $return .= $string.$break;
+ }
+ return $return.ltrim($str);
+ }
+ /**
+ * check if current node has a $tagName as parent (somewhere, not only the direct parent)
+ *
+ * @param string $tagName
+ * @return bool
+ */
+ function hasParent($tagName) {
+ return in_array($tagName, $this->parser->openTags);
+ }
+ /**
+ * get tagName of direct parent tag
+ *
+ * @param void
+ * @return string $tagName
+ */
+ function parent() {
+ return end($this->parser->openTags);
+ }
+} \ No newline at end of file
diff --git a/include/markdownify/markdownify_cli.php b/include/markdownify/markdownify_cli.php
new file mode 100755
index 000000000..b3fffbd5c
--- /dev/null
+++ b/include/markdownify/markdownify_cli.php
@@ -0,0 +1,33 @@
+#!/usr/bin/php
+<?php
+require dirname(__FILE__) .'/markdownify_extra.php';
+
+function param($name, $default = false) {
+ if (!in_array('--'.$name, $_SERVER['argv']))
+ return $default;
+ reset($_SERVER['argv']);
+ while (each($_SERVER['argv'])) {
+ if (current($_SERVER['argv']) == '--'.$name)
+ break;
+ }
+ $value = next($_SERVER['argv']);
+ if ($value === false || substr($value, 0, 2) == '--')
+ return true;
+ else
+ return $value;
+}
+
+
+$input = stream_get_contents(STDIN);
+
+$linksAfterEachParagraph = param('links');
+$bodyWidth = param('width');
+$keepHTML = param('html', true);
+
+if (param('no_extra')) {
+ $parser = new Markdownify($linksAfterEachParagraph, $bodyWidth, $keepHTML);
+} else {
+ $parser = new Markdownify_Extra($linksAfterEachParagraph, $bodyWidth, $keepHTML);
+}
+
+echo $parser->parseString($input) ."\n"; \ No newline at end of file
diff --git a/include/markdownify/markdownify_extra.php b/include/markdownify/markdownify_extra.php
new file mode 100644
index 000000000..e978a1c8a
--- /dev/null
+++ b/include/markdownify/markdownify_extra.php
@@ -0,0 +1,489 @@
+<?php
+/**
+ * Class to convert HTML to Markdown with PHP Markdown Extra syntax support.
+ *
+ * @version 1.0.0 alpha
+ * @author Milian Wolff (<mail@milianw.de>, <http://milianw.de>)
+ * @license LGPL, see LICENSE_LGPL.txt and the summary below
+ * @copyright (C) 2007 Milian Wolff
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/**
+ * standard Markdownify class
+ */
+require_once dirname(__FILE__).'/markdownify.php';
+
+class Markdownify_Extra extends Markdownify {
+ /**
+ * table data, including rows with content and the maximum width of each col
+ *
+ * @var array
+ */
+ var $table = array();
+ /**
+ * current col
+ *
+ * @var int
+ */
+ var $col = -1;
+ /**
+ * current row
+ *
+ * @var int
+ */
+ var $row = 0;
+ /**
+ * constructor, see Markdownify::Markdownify() for more information
+ */
+ function Markdownify_Extra($linksAfterEachParagraph = MDFY_LINKS_EACH_PARAGRAPH, $bodyWidth = MDFY_BODYWIDTH, $keepHTML = MDFY_KEEPHTML) {
+ parent::Markdownify($linksAfterEachParagraph, $bodyWidth, $keepHTML);
+
+ ### new markdownable tags & attributes
+ # header ids: # foo {bar}
+ $this->isMarkdownable['h1']['id'] = 'optional';
+ $this->isMarkdownable['h2']['id'] = 'optional';
+ $this->isMarkdownable['h3']['id'] = 'optional';
+ $this->isMarkdownable['h4']['id'] = 'optional';
+ $this->isMarkdownable['h5']['id'] = 'optional';
+ $this->isMarkdownable['h6']['id'] = 'optional';
+ # tables
+ $this->isMarkdownable['table'] = array();
+ $this->isMarkdownable['th'] = array(
+ 'align' => 'optional',
+ );
+ $this->isMarkdownable['td'] = array(
+ 'align' => 'optional',
+ );
+ $this->isMarkdownable['tr'] = array();
+ array_push($this->ignore, 'thead');
+ array_push($this->ignore, 'tbody');
+ array_push($this->ignore, 'tfoot');
+ # definition lists
+ $this->isMarkdownable['dl'] = array();
+ $this->isMarkdownable['dd'] = array();
+ $this->isMarkdownable['dt'] = array();
+ # footnotes
+ $this->isMarkdownable['fnref'] = array(
+ 'target' => 'required',
+ );
+ $this->isMarkdownable['footnotes'] = array();
+ $this->isMarkdownable['fn'] = array(
+ 'name' => 'required',
+ );
+ $this->parser->blockElements['fnref'] = false;
+ $this->parser->blockElements['fn'] = true;
+ $this->parser->blockElements['footnotes'] = true;
+ # abbr
+ $this->isMarkdownable['abbr'] = array(
+ 'title' => 'required',
+ );
+ # build RegEx lookahead to decide wether table can pe parsed or not
+ $inlineTags = array_keys($this->parser->blockElements, false);
+ $colContents = '(?:[^<]|<(?:'.implode('|', $inlineTags).'|[^a-z]))+';
+ $this->tableLookaheadHeader = '{
+ ^\s*(?:<thead\s*>)?\s* # open optional thead
+ <tr\s*>\s*(?: # start required row with headers
+ <th(?:\s+align=("|\')(?:left|center|right)\1)?\s*> # header with optional align
+ \s*'.$colContents.'\s* # contents
+ </th>\s* # close header
+ )+</tr> # close row with headers
+ \s*(?:</thead>)? # close optional thead
+ }sxi';
+ $this->tdSubstitute = '\s*'.$colContents.'\s* # contents
+ </td>\s*';
+ $this->tableLookaheadBody = '{
+ \s*(?:<tbody\s*>)?\s* # open optional tbody
+ (?:<tr\s*>\s* # start row
+ %s # cols to be substituted
+ </tr>)+ # close row
+ \s*(?:</tbody>)? # close optional tbody
+ \s*</table> # close table
+ }sxi';
+ }
+ /**
+ * handle header tags (<h1> - <h6>)
+ *
+ * @param int $level 1-6
+ * @return void
+ */
+ function handleHeader($level) {
+ static $id = null;
+ if ($this->parser->isStartTag) {
+ if (isset($this->parser->tagAttributes['id'])) {
+ $id = $this->parser->tagAttributes['id'];
+ }
+ } else {
+ if (!is_null($id)) {
+ $this->out(' {#'.$id.'}');
+ $id = null;
+ }
+ }
+ parent::handleHeader($level);
+ }
+ /**
+ * handle <abbr> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_abbr() {
+ if ($this->parser->isStartTag) {
+ $this->stack();
+ $this->buffer();
+ } else {
+ $tag = $this->unstack();
+ $tag['text'] = $this->unbuffer();
+ $add = true;
+ foreach ($this->stack['abbr'] as $stacked) {
+ if ($stacked['text'] == $tag['text']) {
+ /** TODO: differing abbr definitions, i.e. different titles for same text **/
+ $add = false;
+ break;
+ }
+ }
+ $this->out($tag['text']);
+ if ($add) {
+ array_push($this->stack['abbr'], $tag);
+ }
+ }
+ }
+ /**
+ * flush stacked abbr tags
+ *
+ * @param void
+ * @return void
+ */
+ function flushStacked_abbr() {
+ $out = array();
+ foreach ($this->stack['abbr'] as $k => $tag) {
+ if (!isset($tag['unstacked'])) {
+ array_push($out, ' *['.$tag['text'].']: '.$tag['title']);
+ $tag['unstacked'] = true;
+ $this->stack['abbr'][$k] = $tag;
+ }
+ }
+ if (!empty($out)) {
+ $this->out("\n\n".implode("\n", $out));
+ }
+ }
+ /**
+ * handle <table> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_table() {
+ if ($this->parser->isStartTag) {
+ # check if upcoming table can be converted
+ if ($this->keepHTML) {
+ if (preg_match($this->tableLookaheadHeader, $this->parser->html, $matches)) {
+ # header seems good, now check body
+ # get align & number of cols
+ preg_match_all('#<th(?:\s+align=("|\')(left|right|center)\1)?\s*>#si', $matches[0], $cols);
+ $regEx = '';
+ $i = 1;
+ $aligns = array();
+ foreach ($cols[2] as $align) {
+ $align = strtolower($align);
+ array_push($aligns, $align);
+ if (empty($align)) {
+ $align = 'left'; # default value
+ }
+ $td = '\s+align=("|\')'.$align.'\\'.$i;
+ $i++;
+ if ($align == 'left') {
+ # look for empty align or left
+ $td = '(?:'.$td.')?';
+ }
+ $td = '<td'.$td.'\s*>';
+ $regEx .= $td.$this->tdSubstitute;
+ }
+ $regEx = sprintf($this->tableLookaheadBody, $regEx);
+ if (preg_match($regEx, $this->parser->html, $matches, null, strlen($matches[0]))) {
+ # this is a markdownable table tag!
+ $this->table = array(
+ 'rows' => array(),
+ 'col_widths' => array(),
+ 'aligns' => $aligns,
+ );
+ $this->row = 0;
+ } else {
+ # non markdownable table
+ $this->handleTagToText();
+ }
+ } else {
+ # non markdownable table
+ $this->handleTagToText();
+ }
+ } else {
+ $this->table = array(
+ 'rows' => array(),
+ 'col_widths' => array(),
+ 'aligns' => array(),
+ );
+ $this->row = 0;
+ }
+ } else {
+ # finally build the table in Markdown Extra syntax
+ $separator = array();
+ # seperator with correct align identifikators
+ foreach($this->table['aligns'] as $col => $align) {
+ if (!$this->keepHTML && !isset($this->table['col_widths'][$col])) {
+ break;
+ }
+ $left = ' ';
+ $right = ' ';
+ switch ($align) {
+ case 'left':
+ $left = ':';
+ break;
+ case 'center':
+ $right = ':';
+ $left = ':';
+ case 'right':
+ $right = ':';
+ break;
+ }
+ array_push($separator, $left.str_repeat('-', $this->table['col_widths'][$col]).$right);
+ }
+ $separator = '|'.implode('|', $separator).'|';
+
+ $rows = array();
+ # add padding
+ array_walk_recursive($this->table['rows'], array(&$this, 'alignTdContent'));
+ $header = array_shift($this->table['rows']);
+ array_push($rows, '| '.implode(' | ', $header).' |');
+ array_push($rows, $separator);
+ foreach ($this->table['rows'] as $row) {
+ array_push($rows, '| '.implode(' | ', $row).' |');
+ }
+ $this->out(implode("\n".$this->indent, $rows));
+ $this->table = array();
+ $this->setLineBreaks(2);
+ }
+ }
+ /**
+ * properly pad content so it is aligned as whished
+ * should be used with array_walk_recursive on $this->table['rows']
+ *
+ * @param string &$content
+ * @param int $col
+ * @return void
+ */
+ function alignTdContent(&$content, $col) {
+ switch ($this->table['aligns'][$col]) {
+ default:
+ case 'left':
+ $content .= str_repeat(' ', $this->table['col_widths'][$col] - $this->strlen($content));
+ break;
+ case 'right':
+ $content = str_repeat(' ', $this->table['col_widths'][$col] - $this->strlen($content)).$content;
+ break;
+ case 'center':
+ $paddingNeeded = $this->table['col_widths'][$col] - $this->strlen($content);
+ $left = floor($paddingNeeded / 2);
+ $right = $paddingNeeded - $left;
+ $content = str_repeat(' ', $left).$content.str_repeat(' ', $right);
+ break;
+ }
+ }
+ /**
+ * handle <tr> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_tr() {
+ if ($this->parser->isStartTag) {
+ $this->col = -1;
+ } else {
+ $this->row++;
+ }
+ }
+ /**
+ * handle <td> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_td() {
+ if ($this->parser->isStartTag) {
+ $this->col++;
+ if (!isset($this->table['col_widths'][$this->col])) {
+ $this->table['col_widths'][$this->col] = 0;
+ }
+ $this->buffer();
+ } else {
+ $buffer = trim($this->unbuffer());
+ $this->table['col_widths'][$this->col] = max($this->table['col_widths'][$this->col], $this->strlen($buffer));
+ $this->table['rows'][$this->row][$this->col] = $buffer;
+ }
+ }
+ /**
+ * handle <th> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_th() {
+ if (!$this->keepHTML && !isset($this->table['rows'][1]) && !isset($this->table['aligns'][$this->col+1])) {
+ if (isset($this->parser->tagAttributes['align'])) {
+ $this->table['aligns'][$this->col+1] = $this->parser->tagAttributes['align'];
+ } else {
+ $this->table['aligns'][$this->col+1] = '';
+ }
+ }
+ $this->handleTag_td();
+ }
+ /**
+ * handle <dl> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_dl() {
+ if (!$this->parser->isStartTag) {
+ $this->setLineBreaks(2);
+ }
+ }
+ /**
+ * handle <dt> tags
+ *
+ * @param void
+ * @return void
+ **/
+ function handleTag_dt() {
+ if (!$this->parser->isStartTag) {
+ $this->setLineBreaks(1);
+ }
+ }
+ /**
+ * handle <dd> tags
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_dd() {
+ if ($this->parser->isStartTag) {
+ if (substr(ltrim($this->parser->html), 0, 3) == '<p>') {
+ # next comes a paragraph, so we'll need an extra line
+ $this->out("\n".$this->indent);
+ } elseif (substr($this->output, -2) == "\n\n") {
+ $this->output = substr($this->output, 0, -1);
+ }
+ $this->out(': ');
+ $this->indent(' ', false);
+ } else {
+ # lookahead for next dt
+ if (substr(ltrim($this->parser->html), 0, 4) == '<dt>') {
+ $this->setLineBreaks(2);
+ } else {
+ $this->setLineBreaks(1);
+ }
+ $this->indent(' ');
+ }
+ }
+ /**
+ * handle <fnref /> tags (custom footnote references, see markdownify_extra::parseString())
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_fnref() {
+ $this->out('[^'.$this->parser->tagAttributes['target'].']');
+ }
+ /**
+ * handle <fn> tags (custom footnotes, see markdownify_extra::parseString()
+ * and markdownify_extra::_makeFootnotes())
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_fn() {
+ if ($this->parser->isStartTag) {
+ $this->out('[^'.$this->parser->tagAttributes['name'].']:');
+ $this->setLineBreaks(1);
+ } else {
+ $this->setLineBreaks(2);
+ }
+ $this->indent(' ');
+ }
+ /**
+ * handle <footnotes> tag (custom footnotes, see markdownify_extra::parseString()
+ * and markdownify_extra::_makeFootnotes())
+ *
+ * @param void
+ * @return void
+ */
+ function handleTag_footnotes() {
+ if (!$this->parser->isStartTag) {
+ $this->setLineBreaks(2);
+ }
+ }
+ /**
+ * parse a HTML string, clean up footnotes prior
+ *
+ * @param string $HTML input
+ * @return string Markdown formatted output
+ */
+ function parseString($html) {
+ /** TODO: custom markdown-extra options, e.g. titles & classes **/
+ # <sup id="fnref:..."><a href"#fn..." rel="footnote">...</a></sup>
+ # => <fnref target="..." />
+ $html = preg_replace('@<sup id="fnref:([^"]+)">\s*<a href="#fn:\1" rel="footnote">\s*\d+\s*</a>\s*</sup>@Us', '<fnref target="$1" />', $html);
+ # <div class="footnotes">
+ # <hr />
+ # <ol>
+ #
+ # <li id="fn:...">...</li>
+ # ...
+ #
+ # </ol>
+ # </div>
+ # =>
+ # <footnotes>
+ # <fn name="...">...</fn>
+ # ...
+ # </footnotes>
+ $html = preg_replace_callback('#<div class="footnotes">\s*<hr />\s*<ol>\s*(.+)\s*</ol>\s*</div>#Us', array(&$this, '_makeFootnotes'), $html);
+ return parent::parseString($html);
+ }
+ /**
+ * replace HTML representation of footnotes with something more easily parsable
+ *
+ * @note this is a callback to be used in parseString()
+ *
+ * @param array $matches
+ * @return string
+ */
+ function _makeFootnotes($matches) {
+ # <li id="fn:1">
+ # ...
+ # <a href="#fnref:block" rev="footnote">&#8617;</a></p>
+ # </li>
+ # => <fn name="1">...</fn>
+ # remove footnote link
+ $fns = preg_replace('@\s*(&#160;\s*)?<a href="#fnref:[^"]+" rev="footnote"[^>]*>&#8617;</a>\s*@s', '', $matches[1]);
+ # remove empty paragraph
+ $fns = preg_replace('@<p>\s*</p>@s', '', $fns);
+ # <li id="fn:1">...</li> -> <footnote nr="1">...</footnote>
+ $fns = str_replace('<li id="fn:', '<fn name="', $fns);
+
+ $fns = '<footnotes>'.$fns.'</footnotes>';
+ return preg_replace('#</li>\s*(?=(?:<fn|</footnotes>))#s', '</fn>$1', $fns);
+ }
+} \ No newline at end of file
diff --git a/include/markdownify/parsehtml/parsehtml.php b/include/markdownify/parsehtml/parsehtml.php
new file mode 100644
index 000000000..1a8ecacda
--- /dev/null
+++ b/include/markdownify/parsehtml/parsehtml.php
@@ -0,0 +1,618 @@
+<?php
+/**
+ * parseHTML is a HTML parser which works with PHP 4 and above.
+ * It tries to handle invalid HTML to some degree.
+ *
+ * @version 1.0 beta
+ * @author Milian Wolff (mail@milianw.de, http://milianw.de)
+ * @license LGPL, see LICENSE_LGPL.txt and the summary below
+ * @copyright (C) 2007 Milian Wolff
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+class parseHTML {
+ /**
+ * tags which are always empty (<br /> etc.)
+ *
+ * @var array<string>
+ */
+ var $emptyTags = array(
+ 'br',
+ 'hr',
+ 'input',
+ 'img',
+ 'area',
+ 'link',
+ 'meta',
+ 'param',
+ );
+ /**
+ * tags with preformatted text
+ * whitespaces wont be touched in them
+ *
+ * @var array<string>
+ */
+ var $preformattedTags = array(
+ 'script',
+ 'style',
+ 'pre',
+ 'code',
+ );
+ /**
+ * supress HTML tags inside preformatted tags (see above)
+ *
+ * @var bool
+ */
+ var $noTagsInCode = false;
+ /**
+ * html to be parsed
+ *
+ * @var string
+ */
+ var $html = '';
+ /**
+ * node type:
+ *
+ * - tag (see isStartTag)
+ * - text (includes cdata)
+ * - comment
+ * - doctype
+ * - pi (processing instruction)
+ *
+ * @var string
+ */
+ var $nodeType = '';
+ /**
+ * current node content, i.e. either a
+ * simple string (text node), or something like
+ * <tag attrib="value"...>
+ *
+ * @var string
+ */
+ var $node = '';
+ /**
+ * wether current node is an opening tag (<a>) or not (</a>)
+ * set to NULL if current node is not a tag
+ * NOTE: empty tags (<br />) set this to true as well!
+ *
+ * @var bool | null
+ */
+ var $isStartTag = null;
+ /**
+ * wether current node is an empty tag (<br />) or not (<a></a>)
+ *
+ * @var bool | null
+ */
+ var $isEmptyTag = null;
+ /**
+ * tag name
+ *
+ * @var string | null
+ */
+ var $tagName = '';
+ /**
+ * attributes of current tag
+ *
+ * @var array (attribName=>value) | null
+ */
+ var $tagAttributes = null;
+ /**
+ * wether the current tag is a block element
+ *
+ * @var bool | null
+ */
+ var $isBlockElement = null;
+
+ /**
+ * keep whitespace
+ *
+ * @var int
+ */
+ var $keepWhitespace = 0;
+ /**
+ * list of open tags
+ * count this to get current depth
+ *
+ * @var array
+ */
+ var $openTags = array();
+ /**
+ * list of block elements
+ *
+ * @var array
+ * TODO: what shall we do with <del> and <ins> ?!
+ */
+ var $blockElements = array (
+ # tag name => <bool> is block
+ # block elements
+ 'address' => true,
+ 'blockquote' => true,
+ 'center' => true,
+ 'del' => true,
+ 'dir' => true,
+ 'div' => true,
+ 'dl' => true,
+ 'fieldset' => true,
+ 'form' => true,
+ 'h1' => true,
+ 'h2' => true,
+ 'h3' => true,
+ 'h4' => true,
+ 'h5' => true,
+ 'h6' => true,
+ 'hr' => true,
+ 'ins' => true,
+ 'isindex' => true,
+ 'menu' => true,
+ 'noframes' => true,
+ 'noscript' => true,
+ 'ol' => true,
+ 'p' => true,
+ 'pre' => true,
+ 'table' => true,
+ 'ul' => true,
+ # set table elements and list items to block as well
+ 'thead' => true,
+ 'tbody' => true,
+ 'tfoot' => true,
+ 'td' => true,
+ 'tr' => true,
+ 'th' => true,
+ 'li' => true,
+ 'dd' => true,
+ 'dt' => true,
+ # header items and html / body as well
+ 'html' => true,
+ 'body' => true,
+ 'head' => true,
+ 'meta' => true,
+ 'link' => true,
+ 'style' => true,
+ 'title' => true,
+ # unfancy media tags, when indented should be rendered as block
+ 'map' => true,
+ 'object' => true,
+ 'param' => true,
+ 'embed' => true,
+ 'area' => true,
+ # inline elements
+ 'a' => false,
+ 'abbr' => false,
+ 'acronym' => false,
+ 'applet' => false,
+ 'b' => false,
+ 'basefont' => false,
+ 'bdo' => false,
+ 'big' => false,
+ 'br' => false,
+ 'button' => false,
+ 'cite' => false,
+ 'code' => false,
+ 'del' => false,
+ 'dfn' => false,
+ 'em' => false,
+ 'font' => false,
+ 'i' => false,
+ 'img' => false,
+ 'ins' => false,
+ 'input' => false,
+ 'iframe' => false,
+ 'kbd' => false,
+ 'label' => false,
+ 'q' => false,
+ 'samp' => false,
+ 'script' => false,
+ 'select' => false,
+ 'small' => false,
+ 'span' => false,
+ 'strong' => false,
+ 'sub' => false,
+ 'sup' => false,
+ 'textarea' => false,
+ 'tt' => false,
+ 'var' => false,
+ );
+ /**
+ * get next node, set $this->html prior!
+ *
+ * @param void
+ * @return bool
+ */
+ function nextNode() {
+ if (empty($this->html)) {
+ # we are done with parsing the html string
+ return false;
+ }
+ static $skipWhitespace = true;
+ if ($this->isStartTag && !$this->isEmptyTag) {
+ array_push($this->openTags, $this->tagName);
+ if (in_array($this->tagName, $this->preformattedTags)) {
+ # dont truncate whitespaces for <code> or <pre> contents
+ $this->keepWhitespace++;
+ }
+ }
+
+ if ($this->html[0] == '<') {
+ $token = substr($this->html, 0, 9);
+ if (substr($token, 0, 2) == '<?') {
+ # xml prolog or other pi's
+ /** TODO **/
+ #trigger_error('this might need some work', E_USER_NOTICE);
+ $pos = strpos($this->html, '>');
+ $this->setNode('pi', $pos + 1);
+ return true;
+ }
+ if (substr($token, 0, 4) == '<!--') {
+ # comment
+ $pos = strpos($this->html, '-->');
+ if ($pos === false) {
+ # could not find a closing -->, use next gt instead
+ # this is firefox' behaviour
+ $pos = strpos($this->html, '>') + 1;
+ } else {
+ $pos += 3;
+ }
+ $this->setNode('comment', $pos);
+
+ $skipWhitespace = true;
+ return true;
+ }
+ if ($token == '<!DOCTYPE') {
+ # doctype
+ $this->setNode('doctype', strpos($this->html, '>')+1);
+
+ $skipWhitespace = true;
+ return true;
+ }
+ if ($token == '<![CDATA[') {
+ # cdata, use text node
+
+ # remove leading <![CDATA[
+ $this->html = substr($this->html, 9);
+
+ $this->setNode('text', strpos($this->html, ']]>')+3);
+
+ # remove trailing ]]> and trim
+ $this->node = substr($this->node, 0, -3);
+ $this->handleWhitespaces();
+
+ $skipWhitespace = true;
+ return true;
+ }
+ if ($this->parseTag()) {
+ # seems to be a tag
+ # handle whitespaces
+ if ($this->isBlockElement) {
+ $skipWhitespace = true;
+ } else {
+ $skipWhitespace = false;
+ }
+ return true;
+ }
+ }
+ if ($this->keepWhitespace) {
+ $skipWhitespace = false;
+ }
+ # when we get here it seems to be a text node
+ $pos = strpos($this->html, '<');
+ if ($pos === false) {
+ $pos = strlen($this->html);
+ }
+ $this->setNode('text', $pos);
+ $this->handleWhitespaces();
+ if ($skipWhitespace && $this->node == ' ') {
+ return $this->nextNode();
+ }
+ $skipWhitespace = false;
+ return true;
+ }
+ /**
+ * parse tag, set tag name and attributes, see if it's a closing tag and so forth...
+ *
+ * @param void
+ * @return bool
+ */
+ function parseTag() {
+ static $a_ord, $z_ord, $special_ords;
+ if (!isset($a_ord)) {
+ $a_ord = ord('a');
+ $z_ord = ord('z');
+ $special_ords = array(
+ ord(':'), // for xml:lang
+ ord('-'), // for http-equiv
+ );
+ }
+
+ $tagName = '';
+
+ $pos = 1;
+ $isStartTag = $this->html[$pos] != '/';
+ if (!$isStartTag) {
+ $pos++;
+ }
+ # get tagName
+ while (isset($this->html[$pos])) {
+ $pos_ord = ord(strtolower($this->html[$pos]));
+ if (($pos_ord >= $a_ord && $pos_ord <= $z_ord) || (!empty($tagName) && is_numeric($this->html[$pos]))) {
+ $tagName .= $this->html[$pos];
+ $pos++;
+ } else {
+ $pos--;
+ break;
+ }
+ }
+
+ $tagName = strtolower($tagName);
+ if (empty($tagName) || !isset($this->blockElements[$tagName])) {
+ # something went wrong => invalid tag
+ $this->invalidTag();
+ return false;
+ }
+ if ($this->noTagsInCode && end($this->openTags) == 'code' && !($tagName == 'code' && !$isStartTag)) {
+ # we supress all HTML tags inside code tags
+ $this->invalidTag();
+ return false;
+ }
+
+ # get tag attributes
+ /** TODO: in html 4 attributes do not need to be quoted **/
+ $isEmptyTag = false;
+ $attributes = array();
+ $currAttrib = '';
+ while (isset($this->html[$pos+1])) {
+ $pos++;
+ # close tag
+ if ($this->html[$pos] == '>' || $this->html[$pos].$this->html[$pos+1] == '/>') {
+ if ($this->html[$pos] == '/') {
+ $isEmptyTag = true;
+ $pos++;
+ }
+ break;
+ }
+
+ $pos_ord = ord(strtolower($this->html[$pos]));
+ if ( ($pos_ord >= $a_ord && $pos_ord <= $z_ord) || in_array($pos_ord, $special_ords)) {
+ # attribute name
+ $currAttrib .= $this->html[$pos];
+ } elseif (in_array($this->html[$pos], array(' ', "\t", "\n"))) {
+ # drop whitespace
+ } elseif (in_array($this->html[$pos].$this->html[$pos+1], array('="', "='"))) {
+ # get attribute value
+ $pos++;
+ $await = $this->html[$pos]; # single or double quote
+ $pos++;
+ $value = '';
+ while (isset($this->html[$pos]) && $this->html[$pos] != $await) {
+ $value .= $this->html[$pos];
+ $pos++;
+ }
+ $attributes[$currAttrib] = $value;
+ $currAttrib = '';
+ } else {
+ $this->invalidTag();
+ return false;
+ }
+ }
+ if ($this->html[$pos] != '>') {
+ $this->invalidTag();
+ return false;
+ }
+
+ if (!empty($currAttrib)) {
+ # html 4 allows something like <option selected> instead of <option selected="selected">
+ $attributes[$currAttrib] = $currAttrib;
+ }
+ if (!$isStartTag) {
+ if (!empty($attributes) || $tagName != end($this->openTags)) {
+ # end tags must not contain any attributes
+ # or maybe we did not expect a different tag to be closed
+ $this->invalidTag();
+ return false;
+ }
+ array_pop($this->openTags);
+ if (in_array($tagName, $this->preformattedTags)) {
+ $this->keepWhitespace--;
+ }
+ }
+ $pos++;
+ $this->node = substr($this->html, 0, $pos);
+ $this->html = substr($this->html, $pos);
+ $this->tagName = $tagName;
+ $this->tagAttributes = $attributes;
+ $this->isStartTag = $isStartTag;
+ $this->isEmptyTag = $isEmptyTag || in_array($tagName, $this->emptyTags);
+ if ($this->isEmptyTag) {
+ # might be not well formed
+ $this->node = preg_replace('# */? *>$#', ' />', $this->node);
+ }
+ $this->nodeType = 'tag';
+ $this->isBlockElement = $this->blockElements[$tagName];
+ return true;
+ }
+ /**
+ * handle invalid tags
+ *
+ * @param void
+ * @return void
+ */
+ function invalidTag() {
+ $this->html = substr_replace($this->html, '&lt;', 0, 1);
+ }
+ /**
+ * update all vars and make $this->html shorter
+ *
+ * @param string $type see description for $this->nodeType
+ * @param int $pos to which position shall we cut?
+ * @return void
+ */
+ function setNode($type, $pos) {
+ if ($this->nodeType == 'tag') {
+ # set tag specific vars to null
+ # $type == tag should not be called here
+ # see this::parseTag() for more
+ $this->tagName = null;
+ $this->tagAttributes = null;
+ $this->isStartTag = null;
+ $this->isEmptyTag = null;
+ $this->isBlockElement = null;
+
+ }
+ $this->nodeType = $type;
+ $this->node = substr($this->html, 0, $pos);
+ $this->html = substr($this->html, $pos);
+ }
+ /**
+ * check if $this->html begins with $str
+ *
+ * @param string $str
+ * @return bool
+ */
+ function match($str) {
+ return substr($this->html, 0, strlen($str)) == $str;
+ }
+ /**
+ * truncate whitespaces
+ *
+ * @param void
+ * @return void
+ */
+ function handleWhitespaces() {
+ if ($this->keepWhitespace) {
+ # <pre> or <code> before...
+ return;
+ }
+ # truncate multiple whitespaces to a single one
+ $this->node = preg_replace('#\s+#s', ' ', $this->node);
+ }
+ /**
+ * normalize self::node
+ *
+ * @param void
+ * @return void
+ */
+ function normalizeNode() {
+ $this->node = '<';
+ if (!$this->isStartTag) {
+ $this->node .= '/'.$this->tagName.'>';
+ return;
+ }
+ $this->node .= $this->tagName;
+ foreach ($this->tagAttributes as $name => $value) {
+ $this->node .= ' '.$name.'="'.str_replace('"', '&quot;', $value).'"';
+ }
+ if ($this->isEmptyTag) {
+ $this->node .= ' /';
+ }
+ $this->node .= '>';
+ }
+}
+
+/**
+ * indent a HTML string properly
+ *
+ * @param string $html
+ * @param string $indent optional
+ * @return string
+ */
+function indentHTML($html, $indent = " ", $noTagsInCode = false) {
+ $parser = new parseHTML;
+ $parser->noTagsInCode = $noTagsInCode;
+ $parser->html = $html;
+ $html = '';
+ $last = true; # last tag was block elem
+ $indent_a = array();
+ while($parser->nextNode()) {
+ if ($parser->nodeType == 'tag') {
+ $parser->normalizeNode();
+ }
+ if ($parser->nodeType == 'tag' && $parser->isBlockElement) {
+ $isPreOrCode = in_array($parser->tagName, array('code', 'pre'));
+ if (!$parser->keepWhitespace && !$last && !$isPreOrCode) {
+ $html = rtrim($html)."\n";
+ }
+ if ($parser->isStartTag) {
+ $html .= implode($indent_a);
+ if (!$parser->isEmptyTag) {
+ array_push($indent_a, $indent);
+ }
+ } else {
+ array_pop($indent_a);
+ if (!$isPreOrCode) {
+ $html .= implode($indent_a);
+ }
+ }
+ $html .= $parser->node;
+ if (!$parser->keepWhitespace && !($isPreOrCode && $parser->isStartTag)) {
+ $html .= "\n";
+ }
+ $last = true;
+ } else {
+ if ($parser->nodeType == 'tag' && $parser->tagName == 'br') {
+ $html .= $parser->node."\n";
+ $last = true;
+ continue;
+ } elseif ($last && !$parser->keepWhitespace) {
+ $html .= implode($indent_a);
+ $parser->node = ltrim($parser->node);
+ }
+ $html .= $parser->node;
+
+ if (in_array($parser->nodeType, array('comment', 'pi', 'doctype'))) {
+ $html .= "\n";
+ } else {
+ $last = false;
+ }
+ }
+ }
+ return $html;
+}
+/*
+# testcase / example
+error_reporting(E_ALL);
+
+$html = '<p>Simple block on one line:</p>
+
+<div>foo</div>
+
+<p>And nested without indentation:</p>
+
+<div>
+<div>
+<div>
+foo
+</div>
+<div style=">"/>
+</div>
+<div>bar</div>
+</div>
+
+<p>And with attributes:</p>
+
+<div>
+ <div id="foo">
+ </div>
+</div>
+
+<p>This was broken in 1.0.2b7:</p>
+
+<div class="inlinepage">
+<div class="toggleableend">
+foo
+</div>
+</div>';
+#$html = '<a href="asdfasdf" title=\'asdf\' foo="bar">asdf</a>';
+echo indentHTML($html);
+die();
+*/
diff --git a/include/nav.php b/include/nav.php
index a67a8b614..e26cc8889 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -162,6 +162,7 @@ function nav(&$a) {
$tpl = get_markup_template('nav.tpl');
$a->page['nav'] .= replace_macros($tpl, array(
+ '$baseurl' => $a->get_baseurl(),
'$langselector' => lang_selector(),
'$sitelocation' => $sitelocation,
'$nav' => $nav,
diff --git a/include/network.php b/include/network.php
index 446413cd8..9e6f8355b 100644
--- a/include/network.php
+++ b/include/network.php
@@ -607,6 +607,9 @@ function validate_url(&$url) {
if(! function_exists('validate_email')) {
function validate_email($addr) {
+ if(get_config('system','disable_email_validation'))
+ return true;
+
if(! strpos($addr,'@'))
return false;
$h = substr($addr,strpos($addr,'@') + 1);
@@ -793,7 +796,7 @@ function add_fcontact($arr,$update = false) {
}
-function scale_external_images($s,$include_link = true) {
+function scale_external_images($s, $include_link = true, $scale_replace = false) {
$a = get_app();
@@ -803,10 +806,22 @@ function scale_external_images($s,$include_link = true) {
require_once('include/Photo.php');
foreach($matches as $mtch) {
logger('scale_external_image: ' . $mtch[1]);
+
$hostname = str_replace('www.','',substr($a->get_baseurl(),strpos($a->get_baseurl(),'://')+3));
if(stristr($mtch[1],$hostname))
continue;
- $i = fetch_url($mtch[1]);
+
+ // $scale_replace, if passed, is an array of two elements. The
+ // first is the name of the full-size image. The second is the
+ // name of a remote, scaled-down version of the full size image.
+ // This allows Friendica to display the smaller remote image if
+ // one exists, while still linking to the full-size image
+ if($scale_replace)
+ $scaled = str_replace($scale_replace[0], $scale_replace[1], $mtch[1]);
+ else
+ $scaled = $mtch[1];
+ $i = fetch_url($scaled);
+
// guess mimetype from headers or filename
$type = guess_image_type($mtch[1],true);
@@ -822,7 +837,7 @@ function scale_external_images($s,$include_link = true) {
$new_width = $ph->getWidth();
$new_height = $ph->getHeight();
logger('scale_external_images: ' . $orig_width . '->' . $new_width . 'w ' . $orig_height . '->' . $new_height . 'h' . ' match: ' . $mtch[0], LOGGER_DEBUG);
- $s = str_replace($mtch[0],'[img=' . $new_width . 'x' . $new_height. ']' . $mtch[1] . '[/img]'
+ $s = str_replace($mtch[0],'[img=' . $new_width . 'x' . $new_height. ']' . $scaled . '[/img]'
. "\n" . (($include_link)
? '[url=' . $mtch[1] . ']' . t('view full size') . '[/url]' . "\n"
: ''),$s);
diff --git a/include/notifier.php b/include/notifier.php
index f0a1940d4..f54efba31 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -125,7 +125,7 @@ function notifier_run($argv, $argc){
$uid = $r[0]['uid'];
$updated = $r[0]['edited'];
- // The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up
+ // POSSIBLE CLEANUP --> The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up
if(! $parent_id)
return;
@@ -399,7 +399,7 @@ function notifier_run($argv, $argc){
// private emails may be in included in public conversations. Filter them.
- if(($public_message) && $item['private'])
+ if(($public_message) && $item['private'] == 1)
continue;
diff --git a/include/oembed.php b/include/oembed.php
index e2504b7eb..a4452586e 100755
--- a/include/oembed.php
+++ b/include/oembed.php
@@ -93,7 +93,8 @@ function oembed_format_object($j){
$ret.="<br>";
}; break;
case "photo": {
- $ret.= "<img width='".$j->width."' height='".$j->height."' src='".$j->url."'>";
+ $ret.= "<img width='".$j->width."' src='".$j->url."'>";
+ //$ret.= "<img width='".$j->width."' height='".$j->height."' src='".$j->url."'>";
$ret.="<br>";
}; break;
case "link": {
diff --git a/include/onepoll.php b/include/onepoll.php
index d68f26883..09e7bb763 100644
--- a/include/onepoll.php
+++ b/include/onepoll.php
@@ -449,7 +449,7 @@ function onepoll_run($argv, $argc){
if($xml) {
logger('poller: received xml : ' . $xml, LOGGER_DATA);
- if((! strstr($xml,'<?xml')) && (! strstr($xml,'<rss'))) {
+ if((! strstr($xml,'<?xml')) && (! strstr($xml,'<rss'))) {
logger('poller: post_handshake: response from ' . $url . ' did not contain XML.');
$r = q("UPDATE `contact` SET `last-update` = '%s' WHERE `id` = %d LIMIT 1",
dbesc(datetime_convert()),
diff --git a/include/plugin.php b/include/plugin.php
index c6b61ae6e..ffa562273 100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -316,3 +316,87 @@ function get_theme_screenshot($theme) {
}
return($a->get_baseurl() . '/images/blank.png');
}
+
+
+// check service_class restrictions. If there are no service_classes defined, everything is allowed.
+// if $usage is supplied, we check against a maximum count and return true if the current usage is
+// less than the subscriber plan allows. Otherwise we return boolean true or false if the property
+// is allowed (or not) in this subscriber plan. An unset property for this service plan means
+// the property is allowed, so it is only necessary to provide negative properties for each plan,
+// or what the subscriber is not allowed to do.
+
+
+function service_class_allows($uid,$property,$usage = false) {
+
+ if($uid == local_user()) {
+ $service_class = $a->user['service_class'];
+ }
+ else {
+ $r = q("select service_class from user where uid = %d limit 1",
+ intval($uid)
+ );
+ if($r !== false and count($r)) {
+ $service_class = $r[0]['service_class'];
+ }
+ }
+ if(! x($service_class))
+ return true; // everything is allowed
+
+ $arr = get_config('service_class',$service_class);
+ if(! is_array($arr) || (! count($arr)))
+ return true;
+
+ if($usage === false)
+ return ((x($arr[$property])) ? (bool) $arr['property'] : true);
+ else {
+ if(! array_key_exists($property,$arr))
+ return true;
+ return (((intval($usage)) < intval($arr[$property])) ? true : false);
+ }
+}
+
+
+function service_class_fetch($uid,$property) {
+
+ if($uid == local_user()) {
+ $service_class = $a->user['service_class'];
+ }
+ else {
+ $r = q("select service_class from user where uid = %d limit 1",
+ intval($uid)
+ );
+ if($r !== false and count($r)) {
+ $service_class = $r[0]['service_class'];
+ }
+ }
+ if(! x($service_class))
+ return false; // everything is allowed
+
+ $arr = get_config('service_class',$service_class);
+ if(! is_array($arr) || (! count($arr)))
+ return false;
+
+ return((array_key_exists($property,$arr)) ? $arr[$property] : false);
+
+}
+
+function upgrade_link($bbcode = false) {
+ $l = get_config('service_class','upgrade_link');
+ if(! $l)
+ return '';
+ if($bbcode)
+ $t = sprintf('[url=%s]' . t('Click here to upgrade.') . '[/url]', $l);
+ else
+ $t = sprintf('<a href="%s">' . t('Click here to upgrade.') . '</div>', $l);
+ return $t;
+}
+
+function upgrade_message($bbcode = false) {
+ $x = upgrade_link($bbcode);
+ return t('This action exceeds the limits set by your subscription plan.') . (($x) ? ' ' . $x : '') ;
+}
+
+function upgrade_bool_message($bbcode = false) {
+ $x = upgrade_link($bbcode);
+ return t('This action is not available under your subscription plan.') . (($x) ? ' ' . $x : '') ;
+}
diff --git a/include/profile_advanced.php b/include/profile_advanced.php
index ffb45090b..8dfb1beec 100644
--- a/include/profile_advanced.php
+++ b/include/profile_advanced.php
@@ -59,6 +59,11 @@ function advanced_profile(&$a) {
if($txt = prepare_text($a->profile['interest'])) $profile['interest'] = array( t('Hobbies/Interests:'), $txt);
+ if($txt = prepare_text($a->profile['likes'])) $profile['likes'] = array( t('Likes:'), $txt);
+
+ if($txt = prepare_text($a->profile['dislikes'])) $profile['dislikes'] = array( t('Dislikes:'), $txt);
+
+
if($txt = prepare_text($a->profile['contact'])) $profile['contact'] = array( t('Contact information and Social Networks:'), $txt);
if($txt = prepare_text($a->profile['music'])) $profile['music'] = array( t('Musical interests:'), $txt);
diff --git a/include/text.php b/include/text.php
index cc4bee268..409d40d59 100644
--- a/include/text.php
+++ b/include/text.php
@@ -656,6 +656,10 @@ function search($s,$id='search-box',$url='/search',$save = false) {
if(! function_exists('valid_email')) {
function valid_email($x){
+
+ if(get_config('system','disable_email_validation'))
+ return true;
+
if(preg_match('/^[_a-zA-Z0-9\-\+]+(\.[_a-zA-Z0-9\-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/',$x))
return true;
return false;
@@ -750,40 +754,40 @@ function smilies($s, $sample = false) {
);
$icons = array(
- '<img src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="<\\3" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-p" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-x" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-laughing.gif" alt=":-D" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-|" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-O" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt=":-O" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o.O" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O.o" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o_O" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O_o" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-cry.gif" alt=":\'(" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-foot-in-mouth.gif" alt=":-!" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-undecided.gif" alt=":-/" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-embarassed.gif" alt=":-[" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-cool.gif" alt="8-)" />',
- '<img src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":beer" />',
- '<img src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":homebrew" />',
- '<img src="' . $a->get_baseurl() . '/images/coffee.gif" alt=":coffee" />',
- '<img src="' . $a->get_baseurl() . '/images/smiley-facepalm.gif" alt=":facepalm" />',
- '<img src="' . $a->get_baseurl() . '/images/like.gif" alt=":like" />',
- '<img src="' . $a->get_baseurl() . '/images/dislike.gif" alt=":dislike" />',
- '<a href="http://project.friendika.com">~friendika <img src="' . $a->get_baseurl() . '/images/friendika-16.png" alt="~friendika" /></a>',
- '<a href="http://friendica.com">~friendica <img src="' . $a->get_baseurl() . '/images/friendica-16.png" alt="~friendica" /></a>'
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="</3" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-brokenheart.gif" alt="<\\3" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-smile.gif" alt=":-)" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-wink.gif" alt=";-)" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-frown.gif" alt=":-(" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-P" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-tongue-out.gif" alt=":-p" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-\"" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-x" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-kiss.gif" alt=":-X" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-laughing.gif" alt=":-D" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-|" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt="8-O" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-surprised.gif" alt=":-O" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-thumbsup.gif" alt="\\o/" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o.O" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O.o" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="o_O" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-Oo.gif" alt="O_o" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-cry.gif" alt=":\'(" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-foot-in-mouth.gif" alt=":-!" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-undecided.gif" alt=":-/" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-embarassed.gif" alt=":-[" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-cool.gif" alt="8-)" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":beer" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/beer_mug.gif" alt=":homebrew" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/coffee.gif" alt=":coffee" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-facepalm.gif" alt=":facepalm" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/like.gif" alt=":like" />',
+ '<img class="smiley" src="' . $a->get_baseurl() . '/images/dislike.gif" alt=":dislike" />',
+ '<a href="http://project.friendika.com">~friendika <img class="smiley" src="' . $a->get_baseurl() . '/images/friendika-16.png" alt="~friendika" /></a>',
+ '<a href="http://friendica.com">~friendica <img class="smiley" src="' . $a->get_baseurl() . '/images/friendica-16.png" alt="~friendica" /></a>'
);
$params = array('texts' => $texts, 'icons' => $icons, 'string' => $s);
@@ -823,7 +827,7 @@ function preg_heart($x) {
return $x[0];
$t = '';
for($cnt = 0; $cnt < strlen($x[1]); $cnt ++)
- $t .= '<img src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />';
+ $t .= '<img class="smiley" src="' . $a->get_baseurl() . '/images/smiley-heart.gif" alt="<3" />';
$r = str_replace($x[0],$t,$x[0]);
return $r;
}
@@ -1059,12 +1063,13 @@ function feed_salmonlinks($nick) {
if(! function_exists('get_plink')) {
function get_plink($item) {
$a = get_app();
- if (x($item,'plink') && ((! $item['private']) || ($item['network'] === NETWORK_FEED))){
+ if (x($item,'plink') && ($item['private'] != 1)) {
return array(
'href' => $item['plink'],
'title' => t('link to source'),
);
- } else {
+ }
+ else {
return false;
}
}}
@@ -1532,7 +1537,6 @@ function undo_post_tagging($s) {
function fix_mce_lf($s) {
$s = str_replace("\r\n","\n",$s);
- $s = str_replace("\n\n","\n",$s);
return $s;
}
diff --git a/include/user.php b/include/user.php
index 2477438bf..039b30bbd 100644
--- a/include/user.php
+++ b/include/user.php
@@ -99,11 +99,11 @@ function create_user($arr) {
if(! allowed_email($email))
- $result['message'] .= t('Your email domain is not among those allowed on this site.') . EOL;
+ $result['message'] .= t('Your email domain is not among those allowed on this site.') . EOL;
if((! valid_email($email)) || (! validate_email($email)))
$result['message'] .= t('Not a valid email address.') . EOL;
-
+
// Disallow somebody creating an account using openid that uses the admin email address,
// since openid bypasses email verification. We'll allow it if there is not yet an admin account.
@@ -147,13 +147,18 @@ function create_user($arr) {
require_once('include/crypto.php');
- $keys = new_keypair(1024);
+ $keys = new_keypair(4096);
if($keys === false) {
$result['message'] .= t('SERIOUS ERROR: Generation of security keys failed.') . EOL;
return $result;
}
+ $default_service_class = get_config('system','default_service_class');
+ if(! $default_service_class)
+ $default_service_class = '';
+
+
$prvkey = $keys['prvkey'];
$pubkey = $keys['pubkey'];
@@ -173,8 +178,8 @@ function create_user($arr) {
$spubkey = $sres['pubkey'];
$r = q("INSERT INTO `user` ( `guid`, `username`, `password`, `email`, `openid`, `nickname`,
- `pubkey`, `prvkey`, `spubkey`, `sprvkey`, `register_date`, `verified`, `blocked`, `timezone` )
- VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, 'UTC' )",
+ `pubkey`, `prvkey`, `spubkey`, `sprvkey`, `register_date`, `verified`, `blocked`, `timezone`, `service_class` )
+ VALUES ( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d, 'UTC', '%s' )",
dbesc(generate_user_guid()),
dbesc($username),
dbesc($new_password_encoded),
@@ -187,7 +192,8 @@ function create_user($arr) {
dbesc($sprvkey),
dbesc(datetime_convert()),
intval($verified),
- intval($blocked)
+ intval($blocked),
+ dbesc($default_service_class)
);
if($r) {
diff --git a/js/country.js b/js/country.js
index c3add477f..cc7697a1f 100644
--- a/js/country.js
+++ b/js/country.js
@@ -275,7 +275,7 @@ aStates[249]="|'Adan|'Ataq|Abyan|Al Bayda'|Al Hudaydah|Al Jawf|Al Mahrah|Al Mahw
aStates[250]="|Kosovo|Montenegro|Serbia|Vojvodina";
aStates[251]="|Central|Copperbelt|Eastern|Luapula|Lusaka|North-Western|Northern|Southern|Western";
aStates[252]="|Bulawayo|Harare|ManicalandMashonaland Central|Mashonaland East|Mashonaland West|Masvingo|Matabeleland North|Matabeleland South|Midlands";
-aStates[253]="|Self Hosted|Private Server|Architects Of Sleep|DFRN|Distributed Friend Network|Free-Beer.ch|Foojbook|Free-Haven|Friendica.eu|Friendika.me.4.it|Friendika - I Ask Questions|Frndc.com|Hipatia|Hungerfreunde|Kaluguran Community|Kak Ste?|Karl.Markx.pm|Loozah Social Club|MyFriendica.net|MyFriendNetwork|Oi!|OpenMindSpace|Recolutionari.es|Sysfu Social Club|theshi.re|Tumpambae|Uzmiac|Other";
+aStates[253]="|Self Hosted|Private Server|Architects Of Sleep|DFRN|Distributed Friend Network|Free-Beer.ch|Foojbook|Free-Haven|Friendica.eu|Friendika.me.4.it|Friendika - I Ask Questions|Frndc.com|Hikado|Hipatia|Hungerfreunde|Kaluguran Community|Kak Ste?|Karl.Markx.pm|Loozah Social Club|MyFriendica.net|MyFriendNetwork|Oi!|OpenMindSpace|Recolutionari.es|SPRACI|Sysfu Social Club|theshi.re|Tumpambae|Uzmiac|Other";
/*
* gArCountryInfo
* (0) Country name
diff --git a/js/jquery.js b/js/jquery.js
index 198b3ff07..16ad06c5a 100644
--- a/js/jquery.js
+++ b/js/jquery.js
@@ -1,4 +1,4 @@
-/*! jQuery v1.7.1 jquery.com | jquery.org/license */
-(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
-f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
-{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file
+/*! jQuery v1.7.2 jquery.com | jquery.org/license */
+(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
+a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
+.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cq||cr(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(cp.concat.apply([],cp),function(a,b){b.indexOf("margin")&&(f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)})}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cv,cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?cv=function(a,b,c,d){try{d=a.getBoundingClientRect()}catch(e){}if(!d||!f.contains(c,a))return d?{top:d.top,left:d.left}:{top:0,left:0};var g=b.body,h=cy(b),i=c.clientTop||g.clientTop||0,j=c.clientLeft||g.clientLeft||0,k=h.pageYOffset||f.support.boxModel&&c.scrollTop||g.scrollTop,l=h.pageXOffset||f.support.boxModel&&c.scrollLeft||g.scrollLeft,m=d.top+k-i,n=d.left+l-j;return{top:m,left:n}}:cv=function(a,b,c){var d,e=a.offsetParent,g=a,h=b.body,i=b.defaultView,j=i?i.getComputedStyle(a,null):a.currentStyle,k=a.offsetTop,l=a.offsetLeft;while((a=a.parentNode)&&a!==h&&a!==c){if(f.support.fixedPosition&&j.position==="fixed")break;d=i?i.getComputedStyle(a,null):a.currentStyle,k-=a.scrollTop,l-=a.scrollLeft,a===e&&(k+=a.offsetTop,l+=a.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(a.nodeName))&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),g=e,e=a.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"&&(k+=parseFloat(d.borderTopWidth)||0,l+=parseFloat(d.borderLeftWidth)||0),j=d}if(j.position==="relative"||j.position==="static")k+=h.offsetTop,l+=h.offsetLeft;f.support.fixedPosition&&j.position==="fixed"&&(k+=Math.max(c.scrollTop,h.scrollTop),l+=Math.max(c.scrollLeft,h.scrollLeft));return{top:k,left:l}},f.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){f.offset.setOffset(this,a,b)});var c=this[0],d=c&&c.ownerDocument;if(!d)return null;if(c===d.body)return f.offset.bodyOffset(c);return cv(c,d,d.documentElement)},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file
diff --git a/library/Smarty/COPYING.lib b/library/Smarty/COPYING.lib
new file mode 100644
index 000000000..02bbb60bc
--- /dev/null
+++ b/library/Smarty/COPYING.lib
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library. \ No newline at end of file
diff --git a/library/Smarty/README b/library/Smarty/README
new file mode 100644
index 000000000..167462823
--- /dev/null
+++ b/library/Smarty/README
@@ -0,0 +1,574 @@
+Smarty 3.1.11
+
+Author: Monte Ohrt <monte at ohrt dot com >
+Author: Uwe Tews
+
+AN INTRODUCTION TO SMARTY 3
+
+NOTICE FOR 3.1 release:
+
+Please see the SMARTY_3.1_NOTES.txt file that comes with the distribution.
+
+NOTICE for 3.0.5 release:
+
+Smarty now follows the PHP error_reporting level by default. If PHP does not mask E_NOTICE and you try to access an unset template variable, you will now get an E_NOTICE warning. To revert to the old behavior:
+
+$smarty->error_reporting = E_ALL & ~E_NOTICE;
+
+NOTICE for 3.0 release:
+
+IMPORTANT: Some API adjustments have been made between the RC4 and 3.0 release.
+We felt it is better to make these now instead of after a 3.0 release, then have to
+immediately deprecate APIs in 3.1. Online documentation has been updated
+to reflect these changes. Specifically:
+
+---- API CHANGES RC4 -> 3.0 ----
+
+$smarty->register->*
+$smarty->unregister->*
+$smarty->utility->*
+$samrty->cache->*
+
+Have all been changed to local method calls such as:
+
+$smarty->clearAllCache()
+$smarty->registerFoo()
+$smarty->unregisterFoo()
+$smarty->testInstall()
+etc.
+
+Registration of function, block, compiler, and modifier plugins have been
+consolidated under two API calls:
+
+$smarty->registerPlugin(...)
+$smarty->unregisterPlugin(...)
+
+Registration of pre, post, output and variable filters have been
+consolidated under two API calls:
+
+$smarty->registerFilter(...)
+$smarty->unregisterFilter(...)
+
+Please refer to the online documentation for all specific changes:
+
+http://www.smarty.net/documentation
+
+----
+
+The Smarty 3 API has been refactored to a syntax geared
+for consistency and modularity. The Smarty 2 API syntax is still supported, but
+will throw a deprecation notice. You can disable the notices, but it is highly
+recommended to adjust your syntax to Smarty 3, as the Smarty 2 syntax must run
+through an extra rerouting wrapper.
+
+Basically, all Smarty methods now follow the "fooBarBaz" camel case syntax. Also,
+all Smarty properties now have getters and setters. So for example, the property
+$smarty->cache_dir can be set with $smarty->setCacheDir('foo/') and can be
+retrieved with $smarty->getCacheDir().
+
+Some of the Smarty 3 APIs have been revoked such as the "is*" methods that were
+just duplicate functions of the now available "get*" methods.
+
+Here is a rundown of the Smarty 3 API:
+
+$smarty->fetch($template, $cache_id = null, $compile_id = null, $parent = null)
+$smarty->display($template, $cache_id = null, $compile_id = null, $parent = null)
+$smarty->isCached($template, $cache_id = null, $compile_id = null)
+$smarty->createData($parent = null)
+$smarty->createTemplate($template, $cache_id = null, $compile_id = null, $parent = null)
+$smarty->enableSecurity()
+$smarty->disableSecurity()
+$smarty->setTemplateDir($template_dir)
+$smarty->addTemplateDir($template_dir)
+$smarty->templateExists($resource_name)
+$smarty->loadPlugin($plugin_name, $check = true)
+$smarty->loadFilter($type, $name)
+$smarty->setExceptionHandler($handler)
+$smarty->addPluginsDir($plugins_dir)
+$smarty->getGlobal($varname = null)
+$smarty->getRegisteredObject($name)
+$smarty->getDebugTemplate()
+$smarty->setDebugTemplate($tpl_name)
+$smarty->assign($tpl_var, $value = null, $nocache = false)
+$smarty->assignGlobal($varname, $value = null, $nocache = false)
+$smarty->assignByRef($tpl_var, &$value, $nocache = false)
+$smarty->append($tpl_var, $value = null, $merge = false, $nocache = false)
+$smarty->appendByRef($tpl_var, &$value, $merge = false)
+$smarty->clearAssign($tpl_var)
+$smarty->clearAllAssign()
+$smarty->configLoad($config_file, $sections = null)
+$smarty->getVariable($variable, $_ptr = null, $search_parents = true, $error_enable = true)
+$smarty->getConfigVariable($variable)
+$smarty->getStreamVariable($variable)
+$smarty->getConfigVars($varname = null)
+$smarty->clearConfig($varname = null)
+$smarty->getTemplateVars($varname = null, $_ptr = null, $search_parents = true)
+$smarty->clearAllCache($exp_time = null, $type = null)
+$smarty->clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null)
+
+$smarty->registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = array())
+
+$smarty->registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())
+
+$smarty->registerFilter($type, $function_name)
+$smarty->registerResource($resource_type, $function_names)
+$smarty->registerDefaultPluginHandler($function_name)
+$smarty->registerDefaultTemplateHandler($function_name)
+
+$smarty->unregisterPlugin($type, $tag)
+$smarty->unregisterObject($object_name)
+$smarty->unregisterFilter($type, $function_name)
+$smarty->unregisterResource($resource_type)
+
+$smarty->compileAllTemplates($extention = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null)
+$smarty->clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null)
+$smarty->testInstall()
+
+// then all the getters/setters, available for all properties. Here are a few:
+
+$caching = $smarty->getCaching(); // get $smarty->caching
+$smarty->setCaching(true); // set $smarty->caching
+$smarty->setDeprecationNotices(false); // set $smarty->deprecation_notices
+$smarty->setCacheId($id); // set $smarty->cache_id
+$debugging = $smarty->getDebugging(); // get $smarty->debugging
+
+
+FILE STRUCTURE
+
+The Smarty 3 file structure is similar to Smarty 2:
+
+/libs/
+ Smarty.class.php
+/libs/sysplugins/
+ internal.*
+/libs/plugins/
+ function.mailto.php
+ modifier.escape.php
+ ...
+
+A lot of Smarty 3 core functionality lies in the sysplugins directory; you do
+not need to change any files here. The /libs/plugins/ folder is where Smarty
+plugins are located. You can add your own here, or create a separate plugin
+directory, just the same as Smarty 2. You will still need to create your own
+/cache/, /templates/, /templates_c/, /configs/ folders. Be sure /cache/ and
+/templates_c/ are writable.
+
+The typical way to use Smarty 3 should also look familiar:
+
+require('Smarty.class.php');
+$smarty = new Smarty;
+$smarty->assign('foo','bar');
+$smarty->display('index.tpl');
+
+
+However, Smarty 3 works completely different on the inside. Smarty 3 is mostly
+backward compatible with Smarty 2, except for the following items:
+
+*) Smarty 3 is PHP 5 only. It will not work with PHP 4.
+*) The {php} tag is disabled by default. Enable with $smarty->allow_php_tag=true.
+*) Delimiters surrounded by whitespace are no longer treated as Smarty tags.
+ Therefore, { foo } will not compile as a tag, you must use {foo}. This change
+ Makes Javascript/CSS easier to work with, eliminating the need for {literal}.
+ This can be disabled by setting $smarty->auto_literal = false;
+*) The Smarty 3 API is a bit different. Many Smarty 2 API calls are deprecated
+ but still work. You will want to update your calls to Smarty 3 for maximum
+ efficiency.
+
+
+There are many things that are new to Smarty 3. Here are the notable items:
+
+LEXER/PARSER
+============
+
+Smarty 3 now uses a lexing tokenizer for its parser/compiler. Basically, this
+means Smarty has some syntax additions that make life easier such as in-template
+math, shorter/intuitive function parameter options, infinite function recursion,
+more accurate error handling, etc.
+
+
+WHAT IS NEW IN SMARTY TEMPLATE SYNTAX
+=====================================
+
+Smarty 3 allows expressions almost anywhere. Expressions can include PHP
+functions as long as they are not disabled by the security policy, object
+methods and properties, etc. The {math} plugin is no longer necessary but
+is still supported for BC.
+
+Examples:
+{$x+$y} will output the sum of x and y.
+{$foo = strlen($bar)} function in assignment
+{assign var=foo value= $x+$y} in attributes
+{$foo = myfunct( ($x+$y)*3 )} as function parameter
+{$foo[$x+3]} as array index
+
+Smarty tags can be used as values within other tags.
+Example: {$foo={counter}+3}
+
+Smarty tags can also be used inside double quoted strings.
+Example: {$foo="this is message {counter}"}
+
+You can define arrays within templates.
+Examples:
+{assign var=foo value=[1,2,3]}
+{assign var=foo value=['y'=>'yellow','b'=>'blue']}
+Arrays can be nested.
+{assign var=foo value=[1,[9,8],3]}
+
+There is a new short syntax supported for assigning variables.
+Example: {$foo=$bar+2}
+
+You can assign a value to a specific array element. If the variable exists but
+is not an array, it is converted to an array before the new values are assigned.
+Examples:
+{$foo['bar']=1}
+{$foo['bar']['blar']=1}
+
+You can append values to an array. If the variable exists but is not an array,
+it is converted to an array before the new values are assigned.
+Example: {$foo[]=1}
+
+You can use a PHP-like syntax for accessing array elements, as well as the
+original "dot" notation.
+Examples:
+{$foo[1]} normal access
+{$foo['bar']}
+{$foo['bar'][1]}
+{$foo[$x+$x]} index may contain any expression
+{$foo[$bar[1]]} nested index
+{$foo[section_name]} smarty section access, not array access!
+
+The original "dot" notation stays, and with improvements.
+Examples:
+{$foo.a.b.c} => $foo['a']['b']['c']
+{$foo.a.$b.c} => $foo['a'][$b]['c'] with variable index
+{$foo.a.{$b+4}.c} => $foo['a'][$b+4]['c'] with expression as index
+{$foo.a.{$b.c}} => $foo['a'][$b['c']] with nested index
+
+note that { and } are used to address ambiguties when nesting the dot syntax.
+
+Variable names themselves can be variable and contain expressions.
+Examples:
+$foo normal variable
+$foo_{$bar} variable name containing other variable
+$foo_{$x+$y} variable name containing expressions
+$foo_{$bar}_buh_{$blar} variable name with multiple segments
+{$foo_{$x}} will output the variable $foo_1 if $x has a value of 1.
+
+Object method chaining is implemented.
+Example: {$object->method1($x)->method2($y)}
+
+{for} tag added for looping (replacement for {section} tag):
+{for $x=0, $y=count($foo); $x<$y; $x++} .... {/for}
+Any number of statements can be used separated by comma as the first
+inital expression at {for}.
+
+{for $x = $start to $end step $step} ... {/for}is in the SVN now .
+You can use also
+{for $x = $start to $end} ... {/for}
+In this case the step value will be automaticall 1 or -1 depending on the start and end values.
+Instead of $start and $end you can use any valid expression.
+Inside the loop the following special vars can be accessed:
+$x@iteration = number of iteration
+$x@total = total number of iterations
+$x@first = true on first iteration
+$x@last = true on last iteration
+
+
+The Smarty 2 {section} syntax is still supported.
+
+New shorter {foreach} syntax to loop over an array.
+Example: {foreach $myarray as $var}...{/foreach}
+
+Within the foreach loop, properties are access via:
+
+$var@key foreach $var array key
+$var@iteration foreach current iteration count (1,2,3...)
+$var@index foreach current index count (0,1,2...)
+$var@total foreach $var array total
+$var@first true on first iteration
+$var@last true on last iteration
+
+The Smarty 2 {foreach} tag syntax is still supported.
+
+NOTE: {$bar[foo]} still indicates a variable inside of a {section} named foo.
+If you want to access an array element with index foo, you must use quotes
+such as {$bar['foo']}, or use the dot syntax {$bar.foo}.
+
+while block tag is now implemented:
+{while $foo}...{/while}
+{while $x lt 10}...{/while}
+
+Direct access to PHP functions:
+Just as you can use PHP functions as modifiers directly, you can now access
+PHP functions directly, provided they are permitted by security settings:
+{time()}
+
+There is a new {function}...{/function} block tag to implement a template function.
+This enables reuse of code sequences like a plugin function. It can call itself recursively.
+Template function must be called with the new {call name=foo...} tag.
+
+Example:
+
+Template file:
+{function name=menu level=0}
+ <ul class="level{$level}">
+ {foreach $data as $entry}
+ {if is_array($entry)}
+ <li>{$entry@key}</li>
+ {call name=menu data=$entry level=$level+1}
+ {else}
+ <li>{$entry}</li>
+ {/if}
+ {/foreach}
+ </ul>
+{/function}
+
+{$menu = ['item1','item2','item3' => ['item3-1','item3-2','item3-3' =>
+ ['item3-3-1','item3-3-2']],'item4']}
+
+{call name=menu data=$menu}
+
+
+Generated output:
+ * item1
+ * item2
+ * item3
+ o item3-1
+ o item3-2
+ o item3-3
+ + item3-3-1
+ + item3-3-2
+ * item4
+
+The function tag itself must have the "name" attribute. This name is the tag
+name when calling the function. The function tag may have any number of
+additional attributes. These will be default settings for local variables.
+
+New {nocache} block function:
+{nocache}...{/nocache} will declare a section of the template to be non-cached
+when template caching is enabled.
+
+New nocache attribute:
+You can declare variable/function output as non-cached with the nocache attribute.
+Examples:
+
+{$foo nocache=true}
+{$foo nocache} /* same */
+
+{foo bar="baz" nocache=true}
+{foo bar="baz" nocache} /* same */
+
+{time() nocache=true}
+{time() nocache} /* same */
+
+Or you can also assign the variable in your script as nocache:
+$smarty->assign('foo',$something,true); // third param is nocache setting
+{$foo} /* non-cached */
+
+$smarty.current_dir returns the directory name of the current template.
+
+You can use strings directly as templates with the "string" resource type.
+Examples:
+$smarty->display('string:This is my template, {$foo}!'); // php
+{include file="string:This is my template, {$foo}!"} // template
+
+
+
+VARIABLE SCOPE / VARIABLE STORAGE
+=================================
+
+In Smarty 2, all assigned variables were stored within the Smarty object.
+Therefore, all variables assigned in PHP were accessible by all subsequent
+fetch and display template calls.
+
+In Smarty 3, we have the choice to assign variables to the main Smarty object,
+to user-created data objects, and to user-created template objects.
+These objects can be chained. The object at the end of a chain can access all
+variables belonging to that template and all variables within the parent objects.
+The Smarty object can only be the root of a chain, but a chain can be isolated
+from the Smarty object.
+
+All known Smarty assignment interfaces will work on the data and template objects.
+
+Besides the above mentioned objects, there is also a special storage area for
+global variables.
+
+A Smarty data object can be created as follows:
+$data = $smarty->createData(); // create root data object
+$data->assign('foo','bar'); // assign variables as usual
+$data->config_load('my.conf'); // load config file
+
+$data= $smarty->createData($smarty); // create data object having a parent link to
+the Smarty object
+
+$data2= $smarty->createData($data); // create data object having a parent link to
+the $data data object
+
+A template object can be created by using the createTemplate method. It has the
+same parameter assignments as the fetch() or display() method.
+Function definition:
+function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null)
+
+The first parameter can be a template name, a smarty object or a data object.
+
+Examples:
+$tpl = $smarty->createTemplate('mytpl.tpl'); // create template object not linked to any parent
+$tpl->assign('foo','bar'); // directly assign variables
+$tpl->config_load('my.conf'); // load config file
+
+$tpl = $smarty->createTemplate('mytpl.tpl',$smarty); // create template having a parent link to the Smarty object
+$tpl = $smarty->createTemplate('mytpl.tpl',$data); // create template having a parent link to the $data object
+
+The standard fetch() and display() methods will implicitly create a template object.
+If the $parent parameter is not specified in these method calls, the template object
+is will link back to the Smarty object as it's parent.
+
+If a template is called by an {include...} tag from another template, the
+subtemplate links back to the calling template as it's parent.
+
+All variables assigned locally or from a parent template are accessible. If the
+template creates or modifies a variable by using the {assign var=foo...} or
+{$foo=...} tags, these new values are only known locally (local scope). When the
+template exits, none of the new variables or modifications can be seen in the
+parent template(s). This is same behavior as in Smarty 2.
+
+With Smarty 3, we can assign variables with a scope attribute which allows the
+availablility of these new variables or modifications globally (ie in the parent
+templates.)
+
+Possible scopes are local, parent, root and global.
+Examples:
+{assign var=foo value='bar'} // no scope is specified, the default 'local'
+{$foo='bar'} // same, local scope
+{assign var=foo value='bar' scope='local'} // same, local scope
+
+{assign var=foo value='bar' scope='parent'} // Values will be available to the parent object
+{$foo='bar' scope='parent'} // (normally the calling template)
+
+{assign var=foo value='bar' scope='root'} // Values will be exported up to the root object, so they can
+{$foo='bar' scope='root'} // be seen from all templates using the same root.
+
+{assign var=foo value='bar' scope='global'} // Values will be exported to global variable storage,
+{$foo='bar' scope='global'} // they are available to any and all templates.
+
+
+The scope attribute can also be attached to the {include...} tag. In this case,
+the specified scope will be the default scope for all assignments within the
+included template.
+
+
+PLUGINS
+=======
+
+Smarty3 are following the same coding rules as in Smarty2.
+The only difference is that the template object is passed as additional third parameter.
+
+smarty_plugintype_name (array $params, object $smarty, object $template)
+
+The Smarty 2 plugins are still compatible as long as they do not make use of specific Smarty2 internals.
+
+
+TEMPLATE INHERITANCE:
+=====================
+
+With template inheritance you can define blocks, which are areas that can be
+overriden by child templates, so your templates could look like this:
+
+parent.tpl:
+<html>
+ <head>
+ <title>{block name='title'}My site name{/block}</title>
+ </head>
+ <body>
+ <h1>{block name='page-title'}Default page title{/block}</h1>
+ <div id="content">
+ {block name='content'}
+ Default content
+ {/block}
+ </div>
+ </body>
+</html>
+
+child.tpl:
+{extends file='parent.tpl'}
+{block name='title'}
+Child title
+{/block}
+
+grandchild.tpl:
+{extends file='child.tpl'}
+{block name='title'}Home - {$smarty.block.parent}{/block}
+{block name='page-title'}My home{/block}
+{block name='content'}
+ {foreach $images as $img}
+ <img src="{$img.url}" alt="{$img.description}" />
+ {/foreach}
+{/block}
+
+We redefined all the blocks here, however in the title block we used {$smarty.block.parent},
+which tells Smarty to insert the default content from the parent template in its place.
+The content block was overriden to display the image files, and page-title has also be
+overriden to display a completely different title.
+
+If we render grandchild.tpl we will get this:
+<html>
+ <head>
+ <title>Home - Child title</title>
+ </head>
+ <body>
+ <h1>My home</h1>
+ <div id="content">
+ <img src="/example.jpg" alt="image" />
+ <img src="/example2.jpg" alt="image" />
+ <img src="/example3.jpg" alt="image" />
+ </div>
+ </body>
+</html>
+
+NOTE: In the child templates everything outside the {extends} or {block} tag sections
+is ignored.
+
+The inheritance tree can be as big as you want (meaning you can extend a file that
+extends another one that extends another one and so on..), but be aware that all files
+have to be checked for modifications at runtime so the more inheritance the more overhead you add.
+
+Instead of defining the parent/child relationships with the {extends} tag in the child template you
+can use the resource as follow:
+
+$smarty->display('extends:parent.tpl|child.tpl|grandchild.tpl');
+
+Child {block} tags may optionally have a append or prepend attribute. In this case the parent block content
+is appended or prepended to the child block content.
+
+{block name='title' append} My title {/block}
+
+
+PHP STREAMS:
+============
+
+(see online documentation)
+
+VARIBLE FILTERS:
+================
+
+(see online documentation)
+
+
+STATIC CLASS ACCESS AND NAMESPACE SUPPORT
+=========================================
+
+You can register a class with optional namespace for the use in the template like:
+
+$smarty->register->templateClass('foo','name\name2\myclass');
+
+In the template you can use it like this:
+{foo::method()} etc.
+
+
+=======================
+
+Please look through it and send any questions/suggestions/etc to the forums.
+
+http://www.phpinsider.com/smarty-forum/viewtopic.php?t=14168
+
+Monte and Uwe
diff --git a/library/Smarty/SMARTY_2_BC_NOTES.txt b/library/Smarty/SMARTY_2_BC_NOTES.txt
new file mode 100644
index 000000000..79a2cb1b6
--- /dev/null
+++ b/library/Smarty/SMARTY_2_BC_NOTES.txt
@@ -0,0 +1,109 @@
+= Known incompatibilities with Smarty 2 =
+
+== Syntax ==
+
+Smarty 3 API has a new syntax. Much of the Smarty 2 syntax is supported
+by a wrapper but deprecated. See the README that comes with Smarty 3 for more
+information.
+
+The {$array|@mod} syntax has always been a bit confusing, where an "@" is required
+to apply a modifier to an array instead of the individual elements. Normally you
+always want the modifier to apply to the variable regardless of its type. In Smarty 3,
+{$array|mod} and {$array|@mod} behave identical. It is safe to drop the "@" and the
+modifier will still apply to the array. If you really want the modifier to apply to
+each array element, you must loop the array in-template, or use a custom modifier that
+supports array iteration. Most smarty functions already escape values where necessary
+such as {html_options}
+
+== PHP Version ==
+Smarty 3 is PHP 5 only. It will not work with PHP 4.
+
+== {php} Tag ==
+The {php} tag is disabled by default. The use of {php} tags is
+deprecated. It can be enabled with $smarty->allow_php_tag=true.
+
+But if you scatter PHP code which belongs together into several
+{php} tags it may not work any longer.
+
+== Delimiters and whitespace ==
+Delimiters surrounded by whitespace are no longer treated as Smarty tags.
+Therefore, { foo } will not compile as a tag, you must use {foo}. This change
+Makes Javascript/CSS easier to work with, eliminating the need for {literal}.
+This can be disabled by setting $smarty->auto_literal = false;
+
+== Unquoted Strings ==
+Smarty 2 was a bit more forgiving (and ambiguous) when it comes to unquoted strings
+in parameters. Smarty3 is more restrictive. You can still pass strings without quotes
+so long as they contain no special characters. (anything outside of A-Za-z0-9_)
+
+For example filename strings must be quoted
+<source lang="smarty">
+{include file='path/foo.tpl'}
+</source>
+
+== Extending the Smarty class ==
+Smarty 3 makes use of the __construct method for initialization. If you are extending
+the Smarty class, its constructor is not called implicitly if the your child class defines
+its own constructor. In order to run Smarty's constructor, a call to parent::__construct()
+within your child constructor is required.
+
+<source lang="php">
+class MySmarty extends Smarty {
+ function __construct() {
+ parent::__construct();
+
+ // your initialization code goes here
+
+ }
+}
+</source>
+
+== Autoloader ==
+Smarty 3 does register its own autoloader with spl_autoload_register. If your code has
+an existing __autoload function then this function must be explicitly registered on
+the __autoload stack. See http://us3.php.net/manual/en/function.spl-autoload-register.php
+for further details.
+
+== Plugin Filenames ==
+Smarty 3 optionally supports the PHP spl_autoloader. The autoloader requires filenames
+to be lower case. Because of this, Smarty plugin file names must also be lowercase.
+In Smarty 2, mixed case file names did work.
+
+== Scope of Special Smarty Variables ==
+In Smarty 2 the special Smarty variables $smarty.section... and $smarty.foreach...
+had global scope. If you had loops with the same name in subtemplates you could accidentally
+overwrite values of parent template.
+
+In Smarty 3 these special Smarty variable have only local scope in the template which
+is defining the loop. If you need their value in a subtemplate you have to pass them
+as parameter.
+<source lang="smarty">
+{include file='path/foo.tpl' index=$smarty.section.foo.index}
+</source>
+
+== SMARTY_RESOURCE_CHAR_SET ==
+Smarty 3 sets the constant SMARTY_RESOURCE_CHAR_SET to utf-8 as default template charset.
+This is now used also on modifiers like escape as default charset. If your templates use
+other charsets make sure that you define the constant accordingly. Otherwise you may not
+get any output.
+
+== newline at {if} tags ==
+A \n was added to the compiled code of the {if},{else},{elseif},{/if} tags to get output of newlines as expected by the template source.
+If one of the {if} tags is at the line end you will now get a newline in the HTML output.
+
+== trigger_error() ==
+The API function trigger_error() has been removed because it did just map to PHP trigger_error.
+However it's still included in the Smarty2 API wrapper.
+
+== Smarty constants ==
+The constants
+SMARTY_PHP_PASSTHRU
+SMARTY_PHP_QUOTE
+SMARTY_PHP_REMOVE
+SMARTY_PHP_ALLOW
+have been replaced with class constants
+Smarty::PHP_PASSTHRU
+Smarty::PHP_QUOTE
+Smarty::PHP_REMOVE
+Smarty::PHP_ALLOW
+
diff --git a/library/Smarty/SMARTY_3.0_BC_NOTES.txt b/library/Smarty/SMARTY_3.0_BC_NOTES.txt
new file mode 100644
index 000000000..fd8b540c2
--- /dev/null
+++ b/library/Smarty/SMARTY_3.0_BC_NOTES.txt
@@ -0,0 +1,24 @@
+== Smarty2 backward compatibility ==
+All Smarty2 specific API functions and deprecated functionallity has been moved
+to the SmartyBC class.
+
+== {php} Tag ==
+The {php} tag is no longer available in the standard Smarty calls.
+The use of {php} tags is deprecated and only available in the SmartyBC class.
+
+== {include_php} Tag ==
+The {include_php} tag is no longer available in the standard Smarty calls.
+The use of {include_php} tags is deprecated and only available in the SmartyBC class.
+
+== php template resource ==
+The support of the php template resource is removed.
+
+== $cache_dir, $compile_dir, $config_dir, $template_dir access ==
+The mentioned properties can't be accessed directly any longer. You must use
+corresponding getter/setters like addConfigDir(), setConfigDir(), getConfigDir()
+
+== obsolete Smarty class properties ==
+The following no longer used properties are removed:
+$allow_php_tag
+$allow_php_template
+$deprecation_notices \ No newline at end of file
diff --git a/library/Smarty/SMARTY_3.1_NOTES.txt b/library/Smarty/SMARTY_3.1_NOTES.txt
new file mode 100644
index 000000000..e56e56f67
--- /dev/null
+++ b/library/Smarty/SMARTY_3.1_NOTES.txt
@@ -0,0 +1,306 @@
+Smarty 3.1 Notes
+================
+
+Smarty 3.1 is a departure from 2.0 compatibility. Most notably, all
+backward compatibility has been moved to a separate class file named
+SmartyBC.class.php. If you require compatibility with 2.0, you will
+need to use this class.
+
+Some differences from 3.0 are also present. 3.1 begins the journey of
+requiring setters/getters for property access. So far this is only
+implemented on the five directory properties: template_dir,
+plugins_dir, configs_dir, compile_dir and cache_dir. These properties
+are now protected, it is required to use the setters/getters instead.
+That said, direct property access will still work, however slightly
+slower since they will now fall through __set() and __get() and in
+turn passed through the setter/getter methods. 3.2 will exhibit a full
+list of setter/getter methods for all (currently) public properties,
+so code-completion in your IDE will work as expected.
+
+There is absolutely no PHP allowed in templates any more. All
+deprecated features of Smarty 2.0 are gone. Again, use the SmartyBC
+class if you need any backward compatibility.
+
+Internal Changes
+
+ Full UTF-8 Compatibility
+
+The plugins shipped with Smarty 3.1 have been rewritten to fully
+support UTF-8 strings if Multibyte String is available. Without
+MBString UTF-8 cannot be handled properly. For those rare cases where
+templates themselves have to juggle encodings, the new modifiers
+to_charset and from_charset may come in handy.
+
+ Plugin API and Performance
+
+All Plugins (modifiers, functions, blocks, resources,
+default_template_handlers, etc) are now receiving the
+Smarty_Internal_Template instance, where they were supplied with the
+Smarty instance in Smarty 3.0. *. As The Smarty_Internal_Template
+mimics the behavior of Smarty, this API simplification should not
+require any changes to custom plugins.
+
+The plugins shipped with Smarty 3.1 have been rewritten for better
+performance. Most notably {html_select_date} and {html_select_time}
+have been improved vastly. Performance aside, plugins have also been
+reviewed and generalized in their API. {html_select_date} and
+{html_select_time} now share almost all available options.
+
+The escape modifier now knows the $double_encode option, which will
+prevent entities from being encoded again.
+
+The capitalize modifier now know the $lc_rest option, which makes sure
+all letters following a captial letter are lower-cased.
+
+The count_sentences modifier now accepts (.?!) as
+legitimate endings of a sentence - previously only (.) was
+accepted
+
+The new unescape modifier is there to reverse the effects of the
+escape modifier. This applies to the escape formats html, htmlall and
+entity.
+
+ default_template_handler_func
+
+The invocation of $smarty->$default_template_handler_func had to be
+altered. Instead of a Smarty_Internal_Template, the fifth argument is
+now provided with the Smarty instance. New footprint:
+
+
+/**
+ * Default Template Handler
+ *
+ * called when Smarty's file: resource is unable to load a requested file
+ *
+ * @param string $type resource type (e.g. "file", "string", "eval", "resource")
+ * @param string $name resource name (e.g. "foo/bar.tpl")
+ * @param string &$content template's content
+ * @param integer &$modified template's modification time
+ * @param Smarty $smarty Smarty instance
+ * @return string|boolean path to file or boolean true if $content and $modified
+ * have been filled, boolean false if no default template
+ * could be loaded
+ */
+function default_template_handler_func($type, $name, &$content, &$modified, Smarty $smarty) {
+ if (false) {
+ // return corrected filepath
+ return "/tmp/some/foobar.tpl";
+ } elseif (false) {
+ // return a template directly
+ $content = "the template source";
+ $modified = time();
+ return true;
+ } else {
+ // tell smarty that we failed
+ return false;
+ }
+}
+
+ Stuff done to the compiler
+
+Many performance improvements have happened internally. One notable
+improvement is that all compiled templates are now handled as PHP
+functions. This speeds up repeated templates tremendously, as each one
+calls an (in-memory) PHP function instead of performing another file
+include/scan.
+
+New Features
+
+ Template syntax
+
+ {block}..{/block}
+
+The {block} tag has a new hide option flag. It does suppress the block
+content if no corresponding child block exists.
+EXAMPLE:
+parent.tpl
+{block name=body hide} child content "{$smarty.block.child}" was
+inserted {block}
+In the above example the whole block will be suppressed if no child
+block "body" is existing.
+
+ {setfilter}..{/setfilter}
+
+The new {setfilter} block tag allows the definition of filters which
+run on variable output.
+SYNTAX:
+{setfilter filter1|filter2|filter3....}
+Smarty3 will lookup up matching filters in the following search order:
+1. varibale filter plugin in plugins_dir.
+2. a valid modifier. A modifier specification will also accept
+additional parameter like filter2:'foo'
+3. a PHP function
+{/setfilter} will turn previous filter setting off again.
+{setfilter} tags can be nested.
+EXAMPLE:
+{setfilter filter1}
+ {$foo}
+ {setfilter filter2}
+ {$bar}
+ {/setfilter}
+ {$buh}
+{/setfilter}
+{$blar}
+In the above example filter1 will run on the output of $foo, filter2
+on $bar, filter1 again on $buh and no filter on $blar.
+NOTES:
+- {$foo nofilter} will suppress the filters
+- These filters will run in addition to filters defined by
+registerFilter('variable',...), autoLoadFilter('variable',...) and
+defined default modifier.
+- {setfilter} will effect only the current template, not included
+subtemplates.
+
+ Resource API
+
+Smarty 3.1 features a new approach to resource management. The
+Smarty_Resource API allows simple, yet powerful integration of custom
+resources for templates and configuration files. It offers simple
+functions for loading data from a custom resource (e.g. database) as
+well as define new template types adhering to the special
+non-compiling (e,g, plain php) and non-compile-caching (e.g. eval:
+resource type) resources.
+
+See demo/plugins/resource.mysql.php for an example custom database
+resource.
+
+Note that old-fashioned registration of callbacks for resource
+management has been deprecated but is still possible with SmartyBC.
+
+ CacheResource API
+
+In line with the Resource API, the CacheResource API offers a more
+comfortable handling of output-cache data. With the
+Smarty_CacheResource_Custom accessing databases is made simple. With
+the introduction of Smarty_CacheResource_KeyValueStore the
+implementation of resources like memcache or APC became a no-brainer;
+simple hash-based storage systems are now supporting hierarchical
+output-caches.
+
+See demo/plugins/cacheresource.mysql.php for an example custom
+database CacheResource.
+See demo/plugins/cacheresource.memcache.php for an example custom
+memcache CacheResource using the KeyValueStore helper.
+
+Note that old-fashioned registration of $cache_handler is not possible
+anymore. As the functionality had not been ported to Smarty 3.0.x
+properly, it has been dropped from 3.1 completely.
+
+Locking facilities have been implemented to avoid concurrent cache
+generation. Enable cache locking by setting
+$smarty->cache_locking = true;
+
+ Relative Paths in Templates (File-Resource)
+
+As of Smarty 3.1 {include file="../foo.tpl"} and {include
+file="./foo.tpl"} will resolve relative to the template they're in.
+Relative paths are available with {include file="..."} and
+{extends file="..."}. As $smarty->fetch('../foo.tpl') and
+$smarty->fetch('./foo.tpl') cannot be relative to a template, an
+exception is thrown.
+
+ Adressing a specific $template_dir
+
+Smarty 3.1 introduces the $template_dir index notation.
+$smarty->fetch('[foo]bar.tpl') and {include file="[foo]bar.tpl"}
+require the template bar.tpl to be loaded from $template_dir['foo'];
+Smarty::setTemplateDir() and Smarty::addTemplateDir() offer ways to
+define indexes along with the actual directories.
+
+ Mixing Resources in extends-Resource
+
+Taking the php extends: template resource one step further, it is now
+possible to mix resources within an extends: call like
+$smarty->fetch("extends:file:foo.tpl|db:bar.tpl");
+
+To make eval: and string: resources available to the inheritance
+chain, eval:base64:TPL_STRING and eval:urlencode:TPL_STRING have been
+introduced. Supplying the base64 or urlencode flags will trigger
+decoding the TPL_STRING in with either base64_decode() or urldecode().
+
+ extends-Resource in template inheritance
+
+Template based inheritance may now inherit from php's extends:
+resource like {extends file="extends:foo.tpl|db:bar.tpl"}.
+
+ New Smarty property escape_html
+
+$smarty->escape_html = true will autoescape all template variable
+output by calling htmlspecialchars({$output}, ENT_QUOTES,
+SMARTY_RESOURCE_CHAR_SET).
+NOTE:
+This is a compile time option. If you change the setting you must make
+sure that the templates get recompiled.
+
+ New option at Smarty property compile_check
+
+The automatic recompilation of modified templates can now be
+controlled by the following settings:
+$smarty->compile_check = COMPILECHECK_OFF (false) - template files
+will not be checked
+$smarty->compile_check = COMPILECHECK_ON (true) - template files will
+always be checked
+$smarty->compile_check = COMPILECHECK_CACHEMISS - template files will
+be checked if caching is enabled and there is no existing cache file
+or it has expired
+
+ Automatic recompilation on Smarty version change
+
+Templates will now be automatically recompiled on Smarty version
+changes to avoide incompatibillities in the compiled code. Compiled
+template checked against the current setting of the SMARTY_VERSION
+constant.
+
+ default_config_handler_func()
+
+Analogous to the default_template_handler_func()
+default_config_handler_func() has been introduced.
+
+ default_plugin_handler_func()
+
+An optional default_plugin_handler_func() can be defined which gets called
+by the compiler on tags which can't be resolved internally or by plugins.
+The default_plugin_handler() can map tags to plugins on the fly.
+
+New getters/setters
+
+The following setters/getters will be part of the official
+documentation, and will be strongly recommended. Direct property
+access will still work for the foreseeable future... it will be
+transparently routed through the setters/getters, and consequently a
+bit slower.
+
+array|string getTemplateDir( [string $index] )
+replaces $smarty->template_dir; and $smarty->template_dir[$index];
+Smarty setTemplateDir( array|string $path )
+replaces $smarty->template_dir = "foo"; and $smarty->template_dir =
+array("foo", "bar");
+Smarty addTemplateDir( array|string $path, [string $index])
+replaces $smarty->template_dir[] = "bar"; and
+$smarty->template_dir[$index] = "bar";
+
+array|string getConfigDir( [string $index] )
+replaces $smarty->config_dir; and $smarty->config_dir[$index];
+Smarty setConfigDir( array|string $path )
+replaces $smarty->config_dir = "foo"; and $smarty->config_dir =
+array("foo", "bar");
+Smarty addConfigDir( array|string $path, [string $index])
+replaces $smarty->config_dir[] = "bar"; and
+$smarty->config_dir[$index] = "bar";
+
+array getPluginsDir()
+replaces $smarty->plugins_dir;
+Smarty setPluginsDir( array|string $path )
+replaces $smarty->plugins_dir = "foo";
+Smarty addPluginsDir( array|string $path )
+replaces $smarty->plugins_dir[] = "bar";
+
+string getCompileDir()
+replaces $smarty->compile_dir;
+Smarty setCompileDir( string $path )
+replaces $smarty->compile_dir = "foo";
+
+string getCacheDir()
+replaces $smarty->cache_dir;
+Smarty setCacheDir( string $path )
+replaces $smarty->cache_dir;
diff --git a/library/Smarty/change_log.txt b/library/Smarty/change_log.txt
new file mode 100644
index 000000000..27c506db6
--- /dev/null
+++ b/library/Smarty/change_log.txt
@@ -0,0 +1,2078 @@
+===== trunk =====
+===== Smarty-3.1.11 =====
+30.06.2012
+- bugfix {block.. hide} did not work as nested child (Forum Topic 22216)
+
+25.06.2012
+- bugfix the default plugin handler did not allow static class methods for modifier (issue 85)
+
+24.06.2012
+- bugfix escape modifier support for PHP < 5.2.3 (Forum Topic 21176)
+
+11.06.2012
+- bugfix the patch for Topic 21856 did break tabs between tag attributes (Forum Topic 22124)
+
+===== Smarty-3.1.10 =====
+09.06.2012
+- bugfix the compiler did ignore registered compiler plugins for closing tags (Forum Topic 22094)
+- bugfix the patch for Topic 21856 did break multiline tags (Forum Topic 22124)
+
+===== Smarty-3.1.9 =====
+07.06.2012
+- bugfix fetch() and display() with relative paths (Issue 104)
+- bugfix treat "0000-00-00" as 0 in modifier.date_format (Issue 103)
+
+24.05.2012
+- bugfix Smarty_Internal_Write_File::writeFile() could cause race-conditions on linux systems (Issue 101)
+- bugfix attribute parameter names of plugins may now contain also "-" and ":" (Forum Topic 21856)
+- bugfix add compile_id to cache key of of source (Issue 97)
+
+22.05.2012
+- bugfix recursive {include} within {section} did fail (Smarty developer group)
+
+12.05.2012
+- bugfix {html_options} did not properly escape values (Issue 98)
+
+03.05.2012
+- bugfix make HTTP protocall version variable (issue 96)
+
+02.05.2012
+- bugfix {nocache}{block}{plugin}... did produce wrong compiled code when caching is disabled (Forum Topic 21572, issue 95)
+
+12.04.2012
+- bugfix Smarty did eat the linebreak after the <?xml...?> closing tag (Issue 93)
+- bugfix concurrent cache updates could create a warning (Forum Topic 21403)
+
+08.04.2012
+- bugfix "\\" was not escaped correctly when generating nocache code (Forum Topic 21364)
+
+30.03.2012
+- bugfix template inheritance did not throw exception when a parent template was deleted (issue 90)
+
+27.03.2012
+- bugfix prefilter did run multiple times on inline subtemplates compiled into several main templates (Forum Topic 21325)
+- bugfix implement Smarty2's behaviour of variables assigned by reference in SmartyBC. {assign} will affect all references.
+ (issue 88)
+
+21.03.2012
+- bugfix compileAllTemplates() and compileAllConfig() did not return the number of compiled files (Forum Topic 21286)
+
+13.03.2012
+- correction of yesterdays bugfix (Forum Topic 21175 and 21182)
+
+12.03.2012
+- bugfix a double quoted string of "$foo" did not compile into PHP "$foo" (Forum Topic 21175)
+- bugfix template inheritance did set $merge_compiled_includes globally true
+
+03.03.2012
+- optimization of compiling speed when same modifier was used several times
+
+02.03.2012
+- enhancement the default plugin handler can now also resolve undefined modifier (Smarty::PLUGIN_MODIFIER)
+ (Issue 85)
+
+===== Smarty-3.1.8 =====
+19.02.2012
+- bugfix {include} could result in a fatal error if used in appended or prepended nested {block} tags
+ (reported by mh and Issue 83)
+- enhancement added Smarty special variable $smarty.template_object to return the current template object (Forum Topic 20289)
+
+
+07.02.2012
+- bugfix increase entropy of internal function names in compiled and cached template files (Forum Topic 20996)
+- enhancement cacheable parameter added to default plugin handler, same functionality as in registerPlugin (request by calguy1000)
+
+06.02.2012
+- improvement stream_resolve_include_path() added to Smarty_Internal_Get_Include_Path (Forum Topic 20980)
+- bugfix fetch('extends:foo.tpl') always yielded $source->exists == true (Forum Topic 20980)
+- added modifier unescape:"url", fix (Forum Topic 20980)
+- improvement replaced some calls of preg_replace with str_replace (Issue 73)
+
+30.01.2012
+- bugfix Smarty_Security internal $_resource_dir cache wasn't properly propagated
+
+27.01.2012
+- bugfix Smarty did not a template name of "0" (Forum Topic 20895)
+
+20.01.2012
+- bugfix typo in Smarty_Internal_Get_IncludePath did cause runtime overhead (Issue 74)
+- improvment remove unneeded assigments (Issue 75 and 76)
+- fixed typo in template parser
+- bugfix output filter must not run before writing cache when template does contain nocache code (Issue 71)
+
+02.01.2012
+- bugfix {block foo nocache} did not load plugins within child {block} in nocache mode (Forum Topic 20753)
+
+29.12.2011
+- bugfix enable more entropy in Smarty_Internal_Write_File for "more uniqueness" and Cygwin compatibility (Forum Topic 20724)
+- bugfix embedded quotes in single quoted strings did not compile correctly in {nocache} sections (Forum Topic 20730)
+
+28.12.2011
+- bugfix Smarty's internal header code must be excluded from postfilters (issue 71)
+
+22.12.2011
+- bugfix the new lexer of 17.12.2011 did fail if mbstring.func_overload != 0 (issue 70) (Forum Topic 20680)
+- bugfix template inheritace did fail if mbstring.func_overload != 0 (issue 70) (Forum Topic 20680)
+
+20.12.2011
+- bugfix template inheritance: {$smarty.block.child} in nested child {block} tags did not return
+ content after {$smarty.block.child} (Forum Topic 20564)
+
+===== Smarty-3.1.7 =====
+18.12.2011
+- bugfix strings ending with " in multiline strings of config files failed to compile (issue #67)
+- added chaining to Smarty_Internal_Templatebase
+- changed unloadFilter() to not return a boolean in favor of chaining and API conformity
+- bugfix unregisterObject() raised notice when object to unregister did not exist
+- changed internals to use Smarty::$_MBSTRING ($_CHARSET, $_DATE_FORMAT) for better unit testing
+- added Smarty::$_UTF8_MODIFIER for proper PCRE charset handling (Forum Topic 20452)
+- added Smarty_Security::isTrustedUri() and Smarty_Security::$trusted_uri to validate
+ remote resource calls through {fetch} and {html_image} (Forum Topic 20627)
+
+17.12.2011
+- improvement of compiling speed by new handling of plain text blocks in the lexer/parser (issue #68)
+
+16.12.2011
+- bugfix the source exits flag and timestamp was not setup when template was in php include path (issue #69)
+
+9.12.2011
+- bugfix {capture} tags around recursive {include} calls did throw exception (Forum Topic 20549)
+- bugfix $auto_literal = false did not work with { block} tags in child templates (Forum Topic 20581)
+- bugfix template inheritance: do not include code of {include} in overloaded {block} into compiled
+ parent template (Issue #66}
+- bugfix template inheritance: {$smarty.block.child} in nested child {block} tags did not return expected
+ result (Forum Topic 20564)
+
+===== Smarty-3.1.6 =====
+30.11.2011
+- bugfix is_cache() for individual cached subtemplates with $smarty->caching = CACHING_OFF did produce
+ an exception (Forum Topic 20531)
+
+29.11.2011
+- bugfix added exception if the default plugin handler did return a not static callback (Forum Topic 20512)
+
+25.11.2011
+- bugfix {html_select_date} and {html_slecet_time} did not default to current time if "time" was not specified
+ since r4432 (issue 60)
+
+24.11.2011
+- bugfix a subtemplate later used as main template did use old variable values
+
+21.11.2011
+- bugfix cache file could include unneeded modifier plugins under certain condition
+
+18.11.2011
+- bugfix declare all directory properties private to map direct access to getter/setter also on extended Smarty class
+
+16.11.2011
+- bugfix Smarty_Resource::load() did not always return a proper resource handler (Forum Topic 20414)
+- added escape argument to html_checkboxes and html_radios (Forum Topic 20425)
+
+===== Smarty-3.1.5 =====
+14.11.2011
+- bugfix allow space between function name and open bracket (forum topic 20375)
+
+09.11.2011
+- bugfix different behaviour of uniqid() on cygwin. See https://bugs.php.net/bug.php?id=34908
+ (forum topic 20343)
+
+01.11.2011
+- bugfix {if} and {while} tags without condition did not throw a SmartyCompilerException (Issue #57)
+- bugfix multiline strings in config files could fail on longer strings (reopened Issue #55)
+
+22.10.2011
+- bugfix smarty_mb_from_unicode() would not decode unicode-points properly
+- bugfix use catch Exception instead UnexpectedValueException in
+ clearCompiledTemplate to be PHP 5.2 compatible
+
+21.10.2011
+- bugfix apostrophe in plugins_dir path name failed (forum topic 20199)
+- improvement sha1() for array keys longer than 150 characters
+- add Smarty::$allow_ambiguous_resources to activate unique resource handling (Forum Topic 20128)
+
+20.10.2011
+- @silenced unlink() in Smarty_Internal_Write_File since debuggers go haywire without it.
+- bugfix Smarty::clearCompiledTemplate() threw an Exception if $cache_id was not present in $compile_dir when $use_sub_dirs = true.
+- bugfix {html_select_date} and {html_select_time} did not properly handle empty time arguments (Forum Topic 20190)
+- improvement removed unnecessary sha1()
+
+19.10.2011
+- revert PHP4 constructor message
+- fixed PHP4 constructor message
+
+===== Smarty-3.1.4 =====
+19.10.2011
+- added exception when using PHP4 style constructor
+
+16.10.2011
+- bugfix testInstall() did not propery check cache_dir and compile_dir
+
+15.10.2011
+- bugfix Smarty_Resource and Smarty_CacheResource runtime caching (Forum Post 75264)
+
+14.10.2011
+- bugfix unique_resource did not properly apply to compiled resources (Forum Topic 20128)
+- add locking to custom resources (Forum Post 75252)
+- add Smarty_Internal_Template::clearCache() to accompany isCached() fetch() etc.
+
+13.10.2011
+- add caching for config files in Smarty_Resource
+- bugfix disable of caching after isCached() call did not work (Forum Topic 20131)
+- add concept unique_resource to combat potentially ambiguous template_resource values when custom resource handlers are used (Forum Topic 20128)
+- bugfix multiline strings in config files could fail on longer strings (Issue #55)
+
+11.10.2011
+- add runtime checks for not matching {capture}/{/capture} calls (Forum Topic 20120)
+
+10.10.2011
+- bugfix variable name typo in {html_options} and {html_checkboxes} (Issue #54)
+- bugfix <?xml> tag did create wrong output when caching enabled and the tag was in included subtemplate
+- bugfix Smarty_CacheResource_mysql example was missing strtotime() calls
+
+===== Smarty-3.1.3 =====
+07.10.2011
+- improvement removed html comments from {mailto} (Forum Topic 20092)
+- bugfix testInstall() would not show path to internal plugins_dir (Forum Post 74627)
+- improvement testInstall() now showing resolved paths and checking the include_path if necessary
+- bugfix html_options plugin did not handle object values properly (Issue #49, Forum Topic 20049)
+- improvement html_checkboxes and html_radios to accept null- and object values, and label_ids attribute
+- improvement removed some unnecessary count()s
+- bugfix parent pointer was not set when fetch() for other template was called on template object
+
+06.10.2011
+- bugfix switch lexer internals depending on mbstring.func_overload
+- bugfix start_year and end_year of {html_select_date} did not use current year as offset base (Issue #53)
+
+05.10.2011
+- bugfix of problem introduced with r4342 by replacing strlen() with isset()
+- add environment configuration issue with mbstring.func_overload Smarty cannot compensate for (Issue #45)
+- bugfix nofilter tag option did not disable default modifier
+- bugfix html_options plugin did not handle null- and object values properly (Issue #49, Forum Topic 20049)
+
+04.10.2011
+- bugfix assign() in plugins called in subtemplates did change value also in parent template
+- bugfix of problem introduced with r4342 on math plugin
+- bugfix output filter should not run on individually cached subtemplates
+- add unloadFilter() method
+- bugfix has_nocache_code flag was not reset before compilation
+
+===== Smarty-3.1.2 =====
+03.10.2011
+- improvement add internal $joined_template_dir property instead computing it on the fly several times
+
+01.10.2011
+- improvement replaced most in_array() calls by more efficient isset() on array_flip()ed haystacks
+- improvement replaced some strlen($foo) > 3 calls by isset($foo[3])
+- improvement Smarty_Internal_Utility::clearCompiledTemplate() removed redundant strlen()s
+
+29.09.2011
+- improvement of Smarty_Internal_Config::loadConfigVars() dropped the in_array for index look up
+
+28.09.2011
+- bugfix on template functions called nocache calling other template functions
+
+27.09.2011
+- bugfix possible warning "attempt to modify property of non-object" in {section} (issue #34)
+- added chaining to Smarty_Internal_Data so $smarty->assign('a',1)->assign('b',2); is possible now
+- bugfix remove race condition when a custom resource did change timestamp during compilation
+- bugfix variable property did not work on objects variable in template
+- bugfix smarty_make_timestamp() failed to process DateTime objects properly
+- bugfix wrong resource could be used on compile check of custom resource
+
+26.09.2011
+- bugfix repeated calls to same subtemplate did not make use of cached template object
+
+24.09.2011
+- removed internal muteExpectedErrors() calls in favor of having the implementor call this once from his application
+- optimized muteExpectedErrors() to pass errors to the latest registered error handler, if appliccable
+- added compile_dir and cache_dir to list of muted directories
+- improvment better error message for undefined templates at {include}
+
+23.09.2011
+- remove unused properties
+- optimization use real function instead anonymous function for preg_replace_callback
+- bugfix a relative {include} in child template blocks failed
+- bugfix direct setting of $template_dir, $config_dir, $plugins_dir in __construct() of an
+ extended Smarty class created problems
+- bugfix error muting was not implemented for cache locking
+
+===== Smarty 3.1.1 =====
+22.09.2011
+- bugfix {foreachelse} does fail if {section} was nested inside {foreach}
+- bugfix debug.tpl did not display correctly when it was compiled with escape_html = true
+
+21.09.2011
+- bugfix look for mixed case plugin file names as in 3.0 if not found try all lowercase
+- added $error_muting to suppress error messages even for badly implemented error_handlers
+- optimized autoloader
+- reverted ./ and ../ handling in fetch() and display() - they're allowed again
+
+20.09.2011
+- bugfix removed debug echo output while compiling template inheritance
+- bugfix relative paths in $template_dir broke relative path resolving in {include "../foo.tpl"}
+- bugfix {include} did not work inside nested {block} tags
+- bugfix {assign} with scope root and global did not work in all cases
+
+19.09.2011
+- bugfix regression in Smarty_CacheReource_KeyValueStore introduced by r4261
+- bugfix output filter shall not run on included subtemplates
+
+18.09.2011
+- bugfix template caching did not care about file.tpl in different template_dir
+- bugfix {include $file} was broken when merge_compiled_incluges = true
+- bugfix {include} was broken when merge_compiled_incluges = true and same indluded template
+ was used in different main templates in one compilation run
+- bugfix for Smarty2 style compiler plugins on unnamed attribute passing like {tag $foo $bar}
+- bugfix debug.tpl did not display correctly when it was compiled with escape_html = true
+
+17.09.2011
+- bugfix lock_id for file resource would create invalid filepath
+- bugfix resource caching did not care about file.tpl in different template_dir
+
+===== Smarty 3.1.0 =====
+15/09/2011
+- optimization of {foreach}; call internal _count() method only when "total" or "last" {foreach} properties are used
+
+11/09/2011
+- added unregisterObject() method
+
+06/09/2011
+- bugfix isset() did not work in templates on config variables
+
+03/09/2011
+- bugfix createTemplate() must default to cache_id and compile_id of Smarty object
+- bugfix Smarty_CacheResource_KeyValueStore must include $source->uid in cache filepath to keep templates with same
+ name but different folders seperated
+- added cacheresource.apc.php example in demo folder
+
+02/09/2011
+- bugfix cache lock file must use absolute filepath
+
+01/09/2011
+- update of cache locking
+
+30/08/2011
+- added locking mechanism to CacheResource API (implemented with File and KeyValueStores)
+
+28/08/2011
+- bugfix clearCompileTemplate() did not work for specific template subfolder or resource
+
+27/08/2011
+- bugfix {$foo|bar+1} did create syntax error
+
+26/08/2011
+- bugfix when generating nocache code which contains double \
+- bugfix handle race condition if cache file was deleted between filemtime and include
+
+17/08/2011
+- bugfix CacheResource_Custom bad internal fetch() call
+
+15/08/2011
+- bugfix CacheResource would load content twice for KeyValueStore and Custom handlers
+
+06/08/2011
+- bugfix {include} with scope attribute could execute in wrong scope
+- optimization of compile_check processing
+
+03/08/2011
+- allow comment tags to comment {block} tags out in child templates
+
+26/07/2011
+- bugfix experimental getTags() method did not work
+
+24/07/2011
+- sure opened output buffers are closed on exception
+- bugfix {foreach} did not work on IteratorAggregate
+
+22/07/2011
+- clear internal caches on clearAllCache(), clearCache(), clearCompiledTemplate()
+
+21/07/2011
+- bugfix value changes of variable values assigned to Smarty object could not be seen on repeated $smarty->fetch() calls
+
+17/07/2011
+- bugfix {$smarty.block.child} did drop a notice at undefined child
+
+15/07/2011
+- bugfix individual cache_lifetime of {include} did not work correctly inside {block} tags
+- added caches for Smarty_Template_Source and Smarty_Template_Compiled to reduce I/O for multiple cache_id rendering
+
+14/07/2011
+- made Smarty::loadPlugin() respect the include_path if required
+
+13/07/2011
+- optimized internal file write functionality
+- bugfix PHP did eat line break on nocache sections
+- fixed typo of Smarty_Security properties $allowed_modifiers and $disabled_modifiers
+
+06/07/2011
+- bugfix variable modifier must run befor gereral filtering/escaping
+
+04/07/2011
+- bugfix use (?P<name>) syntax at preg_match as some pcre libraries failed on (?<name>)
+- some performance improvement when using generic getter/setter on template objects
+
+30/06/2011
+- bugfix generic getter/setter of Smarty properties used on template objects did throw exception
+- removed is_dir and is_readable checks from directory setters for better performance
+
+28/06/2011
+- added back support of php template resource as undocumented feature
+- bugfix automatic recompilation on version change could drop undefined index notice on old 3.0 cache and compiled files
+- update of README_3_1_DEV.txt and moved into the distribution folder
+- improvement show first characters of eval and string templates instead sha1 Uid in debug window
+
+===== Smarty 3.1-RC1 =====
+25/06/2011
+- revert change of 17/06/2011. $_smarty varibale removed. call loadPlugin() from inside plugin code if required
+- code cleanup, remove no longer used properties and methods
+- update of PHPdoc comments
+
+23/06/2011
+- bugfix {html_select_date} would not respect current time zone
+
+19/06/2011
+- added $errors argument to testInstall() functions to suppress output.
+- added plugin-file checks to testInstall()
+
+18/06/2011
+- bugfix mixed use of same subtemplate inline and not inline in same script could cause a warning during compilation
+
+17/06/2011
+- bugfix/change use $_smarty->loadPlugin() when loading nested depending plugins via loadPlugin
+- bugfix {include ... inline} within {block}...{/block} did fail
+
+16/06/2011
+- bugfix do not overwrite '$smarty' template variable when {include ... scope=parent} is called
+- bugfix complete empty inline subtemplates did fail
+
+15/06/2011
+- bugfix template variables where not accessable within inline subtemplates
+
+12/06/2011
+- bugfix removed unneeded merging of template variable when fetching includled subtemplates
+
+10/06/2011
+- made protected properties $template_dir, $plugins_dir, $cache_dir, $compile_dir, $config_dir accessible via magic methods
+
+09/06/2011
+- fix smarty security_policy issue in plugins {html_image} and {fetch}
+
+05/06/2011
+- update of SMARTY_VERSION
+- bugfix made getTags() working again
+
+04/06/2011
+- allow extends resource in file attribute of {extends} tag
+
+03/06/2011
+- added {setfilter} tag to set filters for variable output
+- added escape_html property to control autoescaping of variable output
+
+27/05/2011
+- added allowed/disabled tags and modifiers in security for sandboxing
+
+23/05/2011
+- added base64: and urlencode: arguments to eval and string resource types
+
+22/05/2011
+- made time-attribute of {html_select_date} and {html_select_time} accept arrays as defined by attributes prefix and field_array
+
+13/05/2011
+- remove setOption / getOption calls from SamrtyBC class
+
+02/05/2011
+- removed experimental setOption() getOption() methods
+- output returned content also on opening tag calls of block plugins
+- rewrite of default plugin handler
+- compile code of variable filters for better performance
+
+20/04/2011
+- allow {php} {include_php} tags and PHP_ALLOW handling only with the SmartyBC class
+- removed support of php template resource
+
+20/04/2011
+- added extendsall resource example
+- optimization of template variable access
+- optimization of subtemplate handling {include}
+- optimization of template class
+
+01/04/2011
+- bugfix quote handling in capitalize modifier
+
+28/03/2011
+- bugfix stripslashes() requried when using PCRE e-modifier
+
+04/03/2011
+- upgrade to new PHP_LexerGenerator version 0.4.0 for better performance
+
+27/02/2011
+- ignore .svn folders when clearing cache and compiled files
+- string resources do not need a modify check
+
+26/02/2011
+- replaced smarty_internal_wrapper by SmartyBC class
+- load utility functions as static methods instead through __call()
+- bugfix in extends resource when subresources are used
+- optimization of modify checks
+
+25/02/2011
+- use $smarty->error_unassigned to control NOTICE handling on unassigned variables
+
+21/02/2011
+- added new new compile_check mode COMPILECHECK_CACHEMISS
+- corrected new cloning behaviour of createTemplate()
+- do no longer store the compiler object as property in the compile_tag classes to avoid possible memory leaks
+ during compilation
+
+19/02/2011
+- optimizations on merge_compiled_includes handling
+- a couple of optimizations and bugfixes related to new resource structure
+
+17/02/2011
+- changed ./ and ../ behaviour
+
+14/02/2011
+- added {block ... hide} option to supress block if no child is defined
+
+13/02/2011
+- update handling of recursive subtemplate calls
+- bugfix replace $smarty->triggerError() by exception in smarty_internal_resource_extends.php
+
+12/02/2011
+- new class Smarty_Internal_TemplateBase with shared methods of Smarty and Template objects
+- optimizations of template processing
+- made register... methods permanet
+- code for default_plugin_handler
+- add automatic recompilation at version change
+
+04/02/2011
+- change in Smarty_CacheResource_Custom
+- bugfix cache_lifetime did not compile correctly at {include} after last update
+- moved isCached processing into CacheResource class
+- bugfix new CacheResource API did not work with disabled compile_check
+
+03/02/2011
+- handle template content as function to improve speed on multiple calls of same subtemplate and isCached()/display() calls
+- bugfixes and improvents in the new resource API
+- optimizations of template class code
+
+25/01/2011
+- optimized function html_select_time
+
+22/01/2011
+- added Smarty::$use_include_path configuration directive for Resource API
+
+21/01/2011
+- optimized function html_select_date
+
+19/01/2011
+- optimized outputfilter trimwhitespace
+
+18/01/2011
+- bugfix Config to use Smarty_Resource to fetch sources
+- optimized Smarty_Security's isTrustedDir() and isTrustedPHPDir()
+
+17/01/2011
+- bugfix HTTP headers for CGI SAPIs
+
+16/01/2011
+- optimized internals of Smarty_Resource and Smarty_CacheResource
+
+14/01/2011
+- added modifiercompiler escape to improve performance of escaping html, htmlall, url, urlpathinfo, quotes, javascript
+- added support to choose template_dir to load from: [index]filename.tpl
+
+12/01/2011
+- added unencode modifier to revert results of encode modifier
+- added to_charset and from_charset modifier for character encoding
+
+11/01/2011
+- added SMARTY_MBSTRING to generalize MBString detection
+- added argument $lc_rest to modifier.capitalize to lower-case anything but the first character of a word
+- changed strip modifier to consider unicode white-space, too
+- changed wordwrap modifier to accept UTF-8 strings
+- changed count_sentences modifier to consider unicode characters and treat sequences delimited by ? and ! as sentences, too
+- added argument $double_encode to modifier.escape (applies to html and htmlall only)
+- changed escape modifier to be UTF-8 compliant
+- changed textformat block to be UTF-8 compliant
+- optimized performance of mailto function
+- fixed spacify modifier so characters are not prepended and appended, made it unicode compatible
+- fixed truncate modifier to properly use mb_string if possible
+- removed UTF-8 frenzy from count_characters modifier
+- fixed count_words modifier to treat "hello-world" as a single word like str_count_words() does
+- removed UTF-8 frenzy from upper modifier
+- removed UTF-8 frenzy from lower modifier
+
+01/01/2011
+- optimize smarty_modified_escape for hex, hexentity, decentity.
+
+28/12/2010
+- changed $tpl_vars, $config_vars and $parent to belong to Smarty_Internal_Data
+- added Smarty::registerCacheResource() for dynamic cache resource object registration
+
+27/12/2010
+- added Smarty_CacheResource API and refactored existing cache resources accordingly
+- added Smarty_CacheResource_Custom and Smarty_CacheResource_Mysql
+
+26/12/2010
+- added Smarty_Resource API and refactored existing resources accordingly
+- added Smarty_Resource_Custom and Smarty_Resource_Mysql
+- bugfix Smarty::createTemplate() to return properly cloned template instances
+
+24/12/2010
+- optimize smarty_function_escape_special_chars() for PHP >= 5.2.3
+
+===== SVN 3.0 trunk =====
+14/05/2011
+- bugfix error handling at stream resources
+
+13/05/2011
+- bugfix condition starting with "-" did fail at {if} and {while} tags
+
+22/04/2011
+- bugfix allow only fixed string as file attribute at {extends} tag
+
+01/04/2011
+- bugfix do not run filters and default modifier when displaying the debug template
+- bugfix of embedded double quotes within multi line strings (""")
+
+29/03/2011
+- bugfix on error message in smarty_internal_compile_block.php
+- bugfix mb handling in strip modifier
+- bugfix for Smarty2 style registered compiler function on unnamed attribute passing like {tag $foo $bar}
+
+17/03/2011
+- bugfix on default {function} parameters when {function} was used in nocache sections
+- bugfix on compiler object destruction. compiler_object property was by mistake unset.
+
+09/03/2011
+-bugfix a variable filter should run before modifers on an output tag (see change of 23/07/2010)
+
+08/03/2011
+- bugfix loading config file without section should load only defaults
+
+03/03/2011
+- bugfix "smarty" template variable was not recreated when cached templated had expired
+- bugfix internal rendered_content must be cleared after subtemplate was included
+
+01/03/2011
+- bugfix replace modifier did not work in 3.0.7 on systems without multibyte support
+- bugfix {$smarty.template} could return in 3.0.7 parent template name instead of
+ child name when it needed to compile
+
+25/02/2011
+- bugfix for Smarty2 style compiler plugins on unnamed attribute passing like {tag $foo $bar}
+
+24/02/2011
+- bugfix $smarty->clearCache('some.tpl') did by mistake cache the template object
+
+18/02/2011
+- bugfix removed possible race condition when isCached() was called for an individually cached subtemplate
+- bugfix force default debug.tpl to be loaded by the file resource
+
+17/02/2011
+-improvement not to delete files starting with '.' from cache and template_c folders on clearCompiledTemplate() and clearCache()
+
+16/02/2011
+-fixed typo in exception message of Smarty_Internal_Template
+-improvement allow leading spaces on } tag closing if auto_literal is enabled
+
+13/02/2011
+- bufix replace $smarty->triggerError() by exception
+- removed obsolete {popup_init..} plugin from demo templates
+- bugfix replace $smarty->triggerError() by exception in smarty_internal_resource_extends.php
+
+===== Smarty 3.0.7 =====
+09/02/2011
+- patched vulnerability when using {$smarty.template}
+
+01/02/2011
+- removed assert() from config and template parser
+
+31/01/2011
+- bugfix the lexer/parser did fail on special characters like VT
+
+16/01/2011
+-bugfix of ArrayAccess object handling in internal _count() method
+-bugfix of Iterator object handling in internal _count() method
+
+14/01/2011
+-bugfix removed memory leak while processing compileAllTemplates
+
+12/01/2011
+- bugfix in {if} and {while} tag compiler when using assignments as condition and nocache mode
+
+10/01/2011
+- bugfix when using {$smarty.block.child} and name of {block} was in double quoted string
+- bugfix updateParentVariables() was called twice when leaving {include} processing
+
+- bugfix mb_str_replace in replace and escape modifiers work with utf8
+
+31/12/2010
+- bugfix dynamic configuration of $debugging_crtl did not work
+- bugfix default value of $config_read_hidden changed to false
+- bugfix format of attribute array on compiler plugins
+- bugfix getTemplateVars() could return value from wrong scope
+
+28/12/2010
+- bugfix multiple {append} tags failed to compile.
+
+22/12/2010
+- update do not clone the Smarty object an internal createTemplate() calls to increase performance
+
+21/12/2010
+- update html_options to support class and id attrs
+
+17/12/2010
+- bugfix added missing support of $cache_attrs for registered plugins
+
+15/12/2010
+- bugfix assignment as condition in {while} did drop an E_NOTICE
+
+14/12/2010
+- bugfix when passing an array as default parameter at {function} tag
+
+13/12/2010
+- bugfix {$smarty.template} in child template did not return right content
+- bugfix Smarty3 did not search the PHP include_path for template files
+
+===== Smarty 3.0.6 =====
+
+12/12/2010
+- bugfix fixed typo regarding yesterdays change to allow streamWrapper
+
+11/12/2010
+- bugfix nested block tags in template inheritance child templates did not work correctly
+- bugfix {$smarty.current_dir} in child template did not point to dir of child template
+- bugfix changed code when writing temporary compiled files to allow stream_wrapper
+
+06/12/2010
+- bugfix getTemplateVars() should return 'null' instead dropping E_NOTICE on an unassigned variable
+
+05/12/2010
+- bugfix missing declaration of $smarty in Smarty class
+- bugfix empty($foo) in {if} did drop a notice when $foo was not assigned
+
+01/12/2010
+- improvement of {debug} tag output
+
+27/11/2010
+-change run output filter before cache file is written. (same as in Smarty2)
+
+24/11/2011
+-bugfix on parser at !$foo|modifier
+-change parser logic when assignments used as condition in {if] and {while} to allow assign to array element
+
+23/11/2011
+-bugfix allow integer as attribute name in plugin calls
+-change trimm whitespace from error message, removed long list of expected tokens
+
+22/11/2010
+- bugfix on template inheritance when an {extends} tag was inserted by a prefilter
+- added error message for illegal variable file attributes at {extends...} tags
+
+===== Smarty 3.0.5 =====
+
+
+19/11/2010
+- bugfix on block plugins with modifiers
+
+18/11/2010
+- change on handling of unassigned template variable -- default will drop E_NOTICE
+- bugfix on Smarty2 wrapper load_filter() did not work
+
+17/11/2010
+- bugfix on {call} with variable function name
+- bugfix on {block} if name did contain '-'
+- bugfix in function.fetch.php , referece to undefined $smarty
+
+16/11/2010
+- bugfix whitespace in front of "<?php" in smarty_internal_compile_private_block_plugin.php
+- bugfix {$smarty.now} did compile incorrectly
+- bugfix on reset(),end(),next(),prev(),current() within templates
+- bugfix on default parameter for {function}
+
+15/11/2010
+- bugfix when using {$smarty.session} as object
+- bugfix scoping problem on $smarty object passed to filters
+- bugfix captured content could not be accessed globally
+- bugfix Smarty2 wrapper functions could not be call from within plugins
+
+===== Smarty 3.0.4 =====
+
+14/11/2010
+- bugfix isset() did not allow multiple parameter
+- improvment of some error messages
+- bugfix html_image did use removed property $request_use_auto_globals
+- small performace patch in Smarty class
+
+13/11/2010
+- bugfix overloading problem when $smarty->fetch()/display() have been used in plugins
+ (introduced with 3.0.2)
+- code cleanup
+
+===== Smarty 3.0.3 =====
+
+13/11/2010
+- bugfix on {debug}
+- reverted location of loadPlugin() to Smarty class
+- fixed comments in plugins
+- fixed internal_config (removed unwanted code line)
+- improvement remove last linebreak from {function} definition
+
+===== Smarty 3.0.2 =====
+
+12/11/2010
+- reactivated $error_reporting property handling
+- fixed typo in compile_continue
+- fixed security in {fetch} plugin
+- changed back plugin parameters to two. second is template object
+ with transparent access to Smarty object
+- fixed {config_load} scoping form compile time to run time
+
+===== Smarty 3.0.0 =====
+
+
+
+11/11/2010
+- major update including some API changes
+
+10/11/2010
+- observe compile_id also for config files
+
+09/11/2010
+-bugfix on complex expressions as start value for {for} tag
+request_use_auto_globals
+04/11/2010
+- bugfix do not allow access of dynamic and private object members of assigned objects when
+ security is enabled.
+
+01/11/2010
+- bugfix related to E_NOTICE change. {if empty($foo)} did fail when $foo contained a string
+
+28/10/2010
+- bugfix on compiling modifiers within $smarty special vars like {$smarty.post.{$foo|lower}}
+
+27/10/2010
+- bugfix default parameter values did not work for template functions included with {include}
+
+25/10/2010
+- bugfix for E_NOTICE change, array elements did not work as modifier parameter
+
+20/10/2010
+- bugfix for the E_NOTICE change
+
+19/10/2010
+- change Smarty does no longer mask out E_NOTICE by default during template processing
+
+13/10/2010
+- bugfix removed ambiguity between ternary and stream variable in template syntax
+- bugfix use caching properties of template instead of smarty object when compiling child {block}
+- bugfix {*block}...{/block*} did throw an exception in template inheritance
+- bugfix on template inheritance using nested eval or string resource in {extends} tags
+- bugfix on output buffer handling in isCached() method
+
+===== RC4 =====
+
+01/10/2010
+- added {break} and {continue} tags for flow control of {foreach},{section},{for} and {while} loops
+- change of 'string' resource. It's no longer evaluated and compiled files are now stored
+- new 'eval' resource which evaluates a template without saving the compiled file
+- change in isCached() method to allow multiple calls for the same template
+
+25/09/2010
+- bugfix on some compiling modifiers
+
+24/09/2010
+- bugfix merge_compiled_includes flag was not restored correctly in {block} tag
+
+22/09/2010
+- bugfix on default modifier
+
+18/09/2010
+- bugfix untility compileAllConfig() did not create sha1 code for compiled template file names if template_dir was defined with no trailing DS
+- bugfix on templateExists() for extends resource
+
+17/09/2010
+- bugfix {$smarty.template} and {$smarty.current_dir} did not compile correctly within {block} tags
+- bugfix corrected error message on missing template files in extends resource
+- bugfix untility compileAllTemplates() did not create sha1 code for compiled template file names if template_dir was defined with no trailing DS
+
+16/09/2010
+- bugfix when a doublequoted modifier parameter did contain Smarty tags and ':'
+
+15/09/2010
+- bugfix resolving conflict between '<%'/'%>' as custom Smarty delimiter and ASP tags
+- use ucfirst for resource name on internal resource class names
+
+12/09/2010
+- bugfix for change of 08/09/2010 (final {block} tags in subtemplates did not produce correct results)
+
+10/09/2010
+- bugfix for change of 08/09/2010 (final {block} tags in subtemplates did not produce correct results)
+
+08/09/2010
+- allow multiple template inheritance branches starting in subtemplates
+
+07/09/2010
+- bugfix {counter} and {cycle} plugin assigned result to smarty variable not in local(template) scope
+- bugfix templates containing just {strip} {/strip} tags did produce an error
+
+
+23/08/2010
+- fixed E_STRICT errors for uninitialized variables
+
+22/08/2010
+- added attribute cache_id to {include} tag
+
+13/08/2010
+- remove exception_handler property from Smarty class
+- added Smarty's own exceptions SmartyException and SmartyCompilerException
+
+09/08/2010
+- bugfix on modifier with doublequoted strings as parameter containing embedded tags
+
+06/08/2010
+- bugfix when cascading some modifier like |strip|strip_tags modifier
+
+05/08/2010
+- added plugin type modifiercompiler to produce compiled modifier code
+- changed standard modifier plugins to the compiling versions whenever possible
+- bugfix in nocache sections {include} must not cache the subtemplate
+
+02/08/2010
+- bugfix strip did not work correctly in conjunction with comment lines
+
+31/07/2010
+- bugfix on nocache attribute at {assign} and {append}
+
+30/07/2010
+- bugfix passing scope attributes in doublequoted strings did not work at {include} {assign} and {append}
+
+25/07/2010
+- another bugfix of change from 23/07/2010 when compiling modifer
+
+24/07/2010
+- bugfix of change from 23/07/2010 when compiling modifer
+
+23/07/2010
+- changed execution order. A variable filter does now run before modifiers on output of variables
+- bugfix use always { and } as delimiter for debug.tpl
+
+
+22/07/2010
+- bugfix in templateExists() method
+
+20/07/2010
+- fixed handling of { strip } tag with whitespaces
+
+15/07/2010
+- bufix {$smarty.template} does include now the relative path, not just filename
+
+===== RC3 =====
+
+
+
+
+15/07/2010
+- make the date_format modifier work also on objects of the DateTime class
+- implementation of parsetrees in the parser to close security holes and remove unwanted empty line in HTML output
+
+08/07/2010
+- bugfix on assigning multidimensional arrays within templates
+- corrected bugfix for truncate modifier
+
+07/07/2010
+- bugfix the truncate modifier needs to check if the string is utf-8 encoded or not
+- bugfix support of script files relative to trusted_dir
+
+06/07/2010
+- create exception on recursive {extends} calls
+- fixed reported line number at "unexpected closing tag " exception
+- bugfix on escape:'mail' modifier
+- drop exception if 'item' variable is equal 'from' variable in {foreach} tag
+
+01/07/2010
+- removed call_user_func_array calls for optimization of compiled code when using registered modifiers and plugins
+
+25/06/2010
+- bugfix escaping " when block tags are used within doublequoted strings
+
+24/06/2010
+- replace internal get_time() calls with standard PHP5 microtime(true) calls in Smarty_Internal_Utility
+- added $smarty->register->templateClass() and $smarty->unregister->templateClass() methods for supporting static classes with namespace
+
+
+22/06/2010
+- allow spaces between typecast and value in template syntax
+- bugfix get correct count of traversables in {foreach} tag
+
+21/06/2010
+- removed use of PHP shortags SMARTY_PHP_PASSTHRU mode
+- improved speed of cache->clear() when a compile_id was specified and use_sub_dirs is true
+
+20/06/2010
+- replace internal get_time() calls with standard PHP5 microtime(true) calls
+- closed security hole when php.ini asp_tags = on
+
+18/06/2010
+- added __toString method to the Smarty_Variable class
+
+
+14/06/2010
+- make handling of Smarty comments followed by newline BC to Smarty2
+
+
+===== RC2 =====
+
+
+
+13/06/2010
+- bugfix Smarty3 did not handle hexadecimals like 0x0F as numerical value
+- bugifx Smarty3 did not accept numerical constants like .1 or 2. (without a leading or trailing digit)
+
+11/06/2010
+- bugfix the lexer did fail on larger {literal} ... {/literal} sections
+
+03/06/2010
+- bugfix on calling template functions like Smarty tags
+
+01/06/2010
+- bugfix on template functions used with template inheritance
+- removed /* vim: set expandtab: */ comments
+- bugfix of auto literal problem introduce with fix of 31/05/2010
+
+31/05/2010
+- bugfix the parser did not allow some smarty variables with special name like $for, $if, $else and others.
+
+27/05/2010
+- bugfix on object chaining using variable properties
+- make scope of {counter} and {cycle} tags again global as in Smarty2
+
+26/05/2010
+- bugfix removed decrepated register_resource call in smarty_internal_template.php
+
+25/05/2010
+- rewrite of template function handling to improve speed
+- bugfix on file dependency when merge_compiled_includes = true
+
+
+16/05/2010
+- bugfix when passing parameter with numeric name like {foo 1='bar' 2='blar'}
+
+14/05/2010
+- bugfix compile new config files if compile_check and force_compile = false
+- added variable static classes names to template syntax
+
+11/05/2010
+- bugfix make sure that the cache resource is loaded in all conditions when template methods getCached... are called externally
+- reverted the change 0f 30/04/2010. With the exception of forward references template functions can be again called by a standard tag.
+
+10/05/2010
+- bugfix on {foreach} and {for} optimizations of 27/04/2010
+
+09/05/2010
+- update of template and config file parser because of minor parser generator bugs
+
+07/05/2010
+- bugfix on {insert}
+
+06/05/2010
+- bugfix when merging compiled templates and objects are passed as parameter of the {include} tag
+
+05/05/2010
+- bugfix on {insert} to cache parameter
+- implementation of $smarty->default_modifiers as in Smarty2
+- bugfix on getTemplateVars method
+
+01/05/2010
+- bugfix on handling of variable method names at object chaning
+
+30/04/2010
+- bugfix when comparing timestamps in sysplugins/smarty_internal_config.php
+- work around of a substr_compare bug in older PHP5 versions
+- bugfix on template inheritance for tag names starting with "block"
+- bugfix on {function} tag with name attribute in doublequoted strings
+- fix to make calling of template functions unambiguously by madatory usage of the {call} tag
+
+===== RC1 =====
+
+27/04/2010
+- change default of $debugging_ctrl to 'NONE'
+- optimization of compiled code of {foreach} and {for} loops
+- change of compiler for config variables
+
+27/04/2010
+- bugfix in $smarty->cache->clear() method. (do not cache template object)
+
+
+17/04/2010
+- security fix in {math} plugin
+
+
+12/04/2010
+- bugfix in smarty_internal_templatecompilerbase (overloaded property)
+- removed parser restrictions in using true,false and null as ID
+
+07/04/2010
+- bugfix typo in smarty_internal_templatecompilerbase
+
+31/03/2010
+- compile locking by touching old compiled files to avoid concurrent compilations
+
+29/03/2010
+- bugfix allow array definitions as modifier parameter
+- bugfix observe compile_check property when loading config files
+- added the template object as third filter parameter
+
+25/03/2010
+- change of utility->compileAllTemplates() log messages
+- bugfix on nocache code in {function} tags
+- new method utility->compileAllConfig() to compile all config files
+
+24/03/2010
+- bugfix on register->modifier() error messages
+
+23/03/2010
+- bugfix on template inheritance when calling multiple child/parent relations
+- bugfix on caching mode SMARTY_CACHING_LIFETIME_SAVED and cache_lifetime = 0
+
+22/03/2010
+- bugfix make directory separator operating system independend in compileAllTemplates()
+
+21/03/2010
+- removed unused code in compileAllTemplates()
+
+19/03/2010
+- bugfix for multiple {/block} tags on same line
+
+17/03/2010
+- bugfix make $smarty->cache->clear() function independent from caching status
+
+16/03/2010
+- bugfix on assign attribute at registered template objects
+- make handling of modifiers on expression BC to Smarty2
+
+15/03/2010
+- bugfix on block plugin calls
+
+11/03/2010
+- changed parsing of <?php and ?> back to Smarty2 behaviour
+
+08/03/2010
+- bugfix on uninitialized properties in smarty_internal_template
+- bugfix on $smarty->disableSecurity()
+
+04/03/2010
+- bugfix allow uppercase chars in registered resource names
+- bugfix on accessing chained objects of static classes
+
+01/03/2010
+- bugfix on nocache code in {block} tags if child template was included by {include}
+
+27/02/2010
+- allow block tags inside double quoted string
+
+26/02/2010
+- cache modified check implemented
+- support of access to a class constant from an object (since PHP 5.3)
+
+24/02/2010
+- bugfix on expressions in doublequoted string enclosed in backticks
+- added security property $static_classes for static class security
+
+18/02/2010
+- bugfix on parsing Smarty tags inside <?xml ... ?>
+- bugfix on truncate modifier
+
+17/02/2010
+- removed restriction that modifiers did require surrounding parenthesis in some cases
+- added {$smarty.block.child} special variable for template inheritance
+
+16/02/2010
+- bugfix on <?xml ... ?> tags for all php_handling modes
+- bugfix on parameter of variablefilter.htmlspecialchars.php plugin
+
+14/02/2010
+- added missing _plugins property in smarty.class.php
+- bugfix $smarty.const... inside doublequoted strings and backticks was compiled into wrong PHP code
+
+12/02/2010
+- bugfix on nested {block} tags
+- changed Smarty special variable $smarty.parent to $smarty.block.parent
+- added support of nested {bock} tags
+
+10/02/2010
+- avoid possible notice on $smarty->cache->clear(...), $smarty->clear_cache(....)
+- allow Smarty tags inside <? ... ?> tags in SMARTY_PHP_QUOTE and SMARTY_PHP_PASSTHRU mode
+- bugfix at new "for" syntax like {for $x=1 to 10 step 2}
+
+09/02/2010
+- added $smarty->_tag_stack for tracing block tag hierarchy
+
+08/02/2010
+- bugfix use template fullpath at §smarty->cache->clear(...), $smarty->clear_cache(....)
+- bugfix of cache filename on extended templates when force_compile=true
+
+07/02/2010
+- bugfix on changes of 05/02/2010
+- preserve line endings type form template source
+- API changes (see README file)
+
+05/02/2010
+- bugfix on modifier and block plugins with same name
+
+02/02/2010
+- retaining newlines at registered functions and function plugins
+
+01/25/2010
+- bugfix cache resource was not loaded when caching was globally off but enabled at a template object
+- added test that $_SERVER['SCRIPT_NAME'] does exist in Smarty.class.php
+
+01/22/2010
+- new method $smarty->createData([$parent]) for creating a data object (required for bugfixes below)
+- bugfix config_load() method now works also on a data object
+- bugfix get_config_vars() method now works also on a data and template objects
+- bugfix clear_config() method now works also on a data and template objects
+
+01/19/2010
+- bugfix on plugins if same plugin was called from a nocache section first and later from a cached section
+
+
+###beta 7###
+
+
+01/17/2010
+- bugfix on $smarty.const... in double quoted strings
+
+01/16/2010
+- internal change of config file lexer/parser on handling of section names
+- bugfix on registered objects (format parameter of register_object was not handled correctly)
+
+01/14/2010
+- bugfix on backslash within single quoted strings
+- bugfix allow absolute filepath for config files
+- bugfix on special Smarty variable $smarty.cookies
+- revert handling of newline on no output tags like {if...}
+- allow special characters in config file section names for Smarty2 BC
+
+01/13/2010
+- bugfix on {if} tags
+
+01/12/2010
+- changed back modifer handling in parser. Some restrictions still apply:
+ if modifiers are used in side {if...} expression or in mathematical expressions
+ parentheses must be used.
+- bugfix the {function..} tag did not accept the name attribute in double quotes
+- closed possible security hole at <?php ... ?> tags
+- bugfix of config file parser on large config files
+
+
+###beta 6####
+
+01/11/2010
+- added \n to the compiled code of the {if},{else},{elseif},{/if} tags to get output of newlines as expected by the template source
+- added missing support of insert plugins
+- added optional nocache attribute to {block} tags in parent template
+- updated <?php...?> handling supporting now heredocs and newdocs. (thanks to Thue Jnaus Kristensen)
+
+01/09/2010
+- bugfix on nocache {block} tags in parent templates
+
+01/08/2010
+- bugfix on variable filters. filter/nofilter attributes did not work on output statements
+
+01/07/2010
+- bugfix on file dependency at template inheritance
+- bugfix on nocache code at template inheritance
+
+01/06/2010
+- fixed typo in smarty_internal_resource_registered
+- bugfix for custom delimiter at extends resource and {extends} tag
+
+01/05/2010
+- bugfix sha1() calculations at extends resource and some general improvments on sha1() handling
+
+
+01/03/2010
+- internal change on building cache files
+
+01/02/2010
+- update cached_timestamp at the template object after cache file is written to avoid possible side effects
+- use internally always SMARTY_CACHING_LIFETIME_* constants
+
+01/01/2010
+- bugfix for obtaining plugins which must be included (related to change of 12/30/2009)
+- bugfix for {php} tag (trow an exception if allow_php_tag = false)
+
+12/31/2009
+- optimization of generated code for doublequoted strings containing variables
+- rewrite of {function} tag handling
+ - can now be declared in an external subtemplate
+ - can contain nocache sections (nocache_hash handling)
+ - can be called in noccache sections (nocache_hash handling)
+ - new {call..} tag to call template functions with a variable name {call name=$foo}
+- fixed nocache_hash handling in merged compiled templates
+
+12/30/2009
+- bugfix for plugins defined in the script as smarty_function_foo
+
+12/29/2009
+- use sha1() for filepath encoding
+- updates on nocache_hash handling
+- internal change on merging some data
+- fixed cache filename for custom resources
+
+12/28/2009
+- update for security fixes
+- make modifier plugins always trusted
+- fixed bug loading modifiers in child template at template inheritance
+
+12/27/2009
+--- this is a major update with a couple of internal changes ---
+- new config file lexer/parser (thanks to Thue Jnaus Kristensen)
+- template lexer/parser fixes for PHP and {literal} handing (thanks to Thue Jnaus Kristensen)
+- fix on registered plugins with different type but same name
+- rewrite of plugin handling (optimized execution speed)
+- closed a security hole regarding PHP code injection into cache files
+- fixed bug in clear cache handling
+- Renamed a couple of internal classes
+- code cleanup for merging compiled templates
+- couple of runtime optimizations (still not all done)
+- update of getCachedTimestamp()
+- fixed bug on modifier plugins at nocache output
+
+12/19/2009
+- bugfix on comment lines in config files
+
+12/17/2009
+- bugfix of parent/global variable update at included/merged subtemplates
+- encode final template filepath into filename of compiled and cached files
+- fixed {strip} handling in auto literals
+
+12/16/2009
+- update of changelog
+- added {include file='foo.tpl' inline} inline option to merge compiled code of subtemplate into the calling template
+
+12/14/2009
+- fixed sideefect of last modification (objects in array index did not work anymore)
+
+12/13/2009
+- allow boolean negation ("!") as operator on variables outside {if} tag
+
+12/12/2009
+- bugfix on single quotes inside {function} tag
+- fix short append/prepend attributes in {block} tags
+
+12/11/2009
+- bugfix on clear_compiled_tpl (avoid possible warning)
+
+12/10/2009
+- bugfix on {function} tags and template inheritance
+
+12/05/2009
+- fixed problem when a cached file was fetched several times
+- removed unneeded lexer code
+
+12/04/2009
+- added max attribute to for loop
+- added security mode allow_super_globals
+
+12/03/2009
+- template inheritance: child templates can now call functions defined by the {function} tag in the parent template
+- added {for $foo = 1 to 5 step 2} syntax
+- bugfix for {$foo.$x.$y.$z}
+
+12/01/2009
+- fixed parsing of names of special formated tags like if,elseif,while,for,foreach
+- removed direct access to constants in templates because of some syntax problems
+- removed cache resource plugin for mysql from the distribution
+- replaced most hard errors (exceptions) by softerrors(trigger_error) in plugins
+- use $template_class property for template class name when compiling {include},{eval} and {extends} tags
+
+11/30/2009
+- map 'true' to SMARTY_CACHING_LIFETIME_CURRENT for the $smarty->caching parameter
+- allow {function} tags within {block} tags
+
+11/28/2009
+- ignore compile_id at debug template
+- added direct access to constants in templates
+- some lexer/parser optimizations
+
+11/27/2009
+- added cache resource MYSQL plugin
+
+11/26/2009
+- bugfix on nested doublequoted strings
+- correct line number on unknown tag error message
+- changed {include} compiled code
+- fix on checking dynamic varibales with error_unassigned = true
+
+11/25/2009
+- allow the following writing for boolean: true, TRUE, True, false, FALSE, False
+- {strip} tag functionality rewritten
+
+11/24/2009
+- bugfix for $smarty->config_overwrite = false
+
+11/23/2009
+- suppress warnings on unlink caused by race conditions
+- correct line number on unknown tag error message
+
+------- beta 5
+11/23/2009
+- fixed configfile parser for text starting with a numeric char
+- the default_template_handler_func may now return a filepath to a template source
+
+11/20/2009
+- bugfix for empty config files
+- convert timestamps of registered resources to integer
+
+11/19/2009
+- compiled templates are no longer touched with the filemtime of template source
+
+11/18/2009
+- allow integer as attribute name in plugin calls
+
+------- beta 4
+11/18/2009
+- observe umask settings when setting file permissions
+- avoide unneeded cache file creation for subtemplates which did occur in some situations
+- make $smarty->_current_file available during compilation for Smarty2 BC
+
+11/17/2009
+- sanitize compile_id and cache_id (replace illegal chars with _)
+- use _dir_perms and _file_perms properties at file creation
+- new constant SMARTY_RESOURCE_DATE_FORMAT (default '%b %e, %Y') which is used as default format in modifier date_format
+- added {foreach $array as $key=>$value} syntax
+- renamed extend tag and resource to extends: {extends file='foo.tol'} , $smarty->display('extends:foo.tpl|bar.tpl);
+- bugfix cycle plugin
+
+11/15/2009
+- lexer/parser optimizations on quoted strings
+
+11/14/2009
+- bugfix on merging compiled templates when source files got removed or renamed.
+- bugfix modifiers on registered object tags
+- fixed locaion where outputfilters are running
+- fixed config file definitions at EOF
+- fix on merging compiled templates with nocache sections in nocache includes
+- parser could run into a PHP error on wrong file attribute
+
+11/12/2009
+- fixed variable filenames in {include_php} and {insert}
+- added scope to Smarty variables in the {block} tag compiler
+- fix on nocache code in child {block} tags
+
+11/11/2009
+- fixed {foreachelse}, {forelse}, {sectionelse} compiled code at nocache variables
+- removed checking for reserved variables
+- changed debugging handling
+
+11/10/2009
+- fixed preg_qoute on delimiters
+
+11/09/2009
+- lexer/parser bugfix
+- new SMARTY_SPL_AUTOLOAD constant to control the autoloader option
+- bugfix for {function} block tags in included templates
+
+11/08/2009
+- fixed alphanumeric array index
+- bugfix on complex double quoted strings
+
+11/05/2009
+- config_load method can now be called on data and template objects
+
+11/04/2009
+- added typecasting support for template variables
+- bugfix on complex indexed special Smarty variables
+
+11/03/2009
+- fixed parser error on objects with special smarty vars
+- fixed file dependency for {incude} inside {block} tag
+- fixed not compiling on non existing compiled templates when compile_check = false
+- renamed function names of autoloaded Smarty methods to Smarty_Method_....
+- new security_class property (default is Smarty_Security)
+
+11/02/2009
+- added neq,lte,gte,mod as aliases to if conditions
+- throw exception on illegal Smarty() constructor calls
+
+10/31/2009
+- change of filenames in sysplugins folder for internal spl_autoload function
+- lexer/parser changed for increased compilation speed
+
+10/27/2009
+- fixed missing quotes in include_php.php
+
+10/27/2009
+- fixed typo in method.register_resource
+- pass {} through as literal
+
+10/26/2009
+- merge only compiled subtemplates into the compiled code of the main template
+
+10/24/2009
+- fixed nocache vars at internal block tags
+- fixed merging of recursive includes
+
+10/23/2009
+- fixed nocache var problem
+
+10/22/2009
+- fix trimwhitespace outputfilter parameter
+
+10/21/2009
+- added {$foo++}{$foo--} syntax
+- buxfix changed PHP "if (..):" to "if (..){" because of possible bad code when concenating PHP tags
+- autoload Smarty internal classes
+- fixed file dependency for config files
+- some code optimizations
+- fixed function definitions on some autoloaded methods
+- fixed nocache variable inside if condition of {if} tag
+
+10/20/2009
+- check at compile time for variable filter to improve rendering speed if no filter is used
+- fixed bug at combination of {elseif} tag and {...} in double quoted strings of static class parameter
+
+10/19/2009
+- fixed compiled template merging on variable double quoted strings as name
+- fixed bug in caching mode 2 and cache_lifetime -1
+- fixed modifier support on block tags
+
+10/17/2009
+- remove ?>\n<?php and ?><?php sequences from compiled template
+
+10/15/2009
+- buxfix on assigning array elements inside templates
+- parser bugfix on array access
+
+10/15/2009
+- allow bit operator '&' inside {if} tag
+- implementation of ternary operator
+
+10/13/2009
+- do not recompile evaluated templates if reused just with other data
+- recompile config files when config properties did change
+- some lexer/parser otimizations
+
+10/11/2009
+- allow {block} tags inside included templates
+- bugfix for resource plugins in Smarty2 format
+- some optimizations of internal.template.php
+
+10/11/2009
+- fixed bug when template with same name is used with different data objects
+- fixed bug with double quoted name attribute at {insert} tag
+- reenabled assign_by_ref and append_by_ref methods
+
+10/07/2009
+- removed block nesting checks for {capture}
+
+10/05/2009
+- added support of "isinstance" to {if} tag
+
+10/03/2009
+- internal changes to improve performance
+- fix registering of filters for classes
+
+10/01/2009
+- removed default timezone setting
+- reactivated PHP resource for simple PHP templates. Must set allow_php_templates = true to enable
+- {PHP} tag can be enabled by allow_php_tag = true
+
+09/30/2009
+- fixed handling template_exits method for all resource types
+- bugfix for other cache resources than file
+- the methods assign_by_ref is now wrapped to assign, append_by_ref to append
+- allow arrays of variables pass in display, fetch and createTemplate calls
+ $data = array('foo'=>'bar','foo2'=>'blar');
+ $smarty->display('my.tpl',$data);
+
+09/29/2009
+- changed {php} tag handling
+- removed support of Smarty::instance()
+- removed support of PHP resource type
+- improved execution speed of {foreach} tags
+- fixed bug in {section} tag
+
+09/23/2009
+- improvements and bugfix on {include} tag handling
+NOTICE: existing compiled template and cache files must be deleted
+
+09/19/2009
+- replace internal "eval()" calls by "include" during rendering process
+- speed improvment for templates which have included subtemplates
+ the compiled code of included templates is merged into the compiled code of the parent template
+- added logical operator "xor" for {if} tag
+- changed parameter ordering for Smarty2 BC
+ fetch($template, $cache_id = null, $compile_id = null, $parent = null)
+ display($template, $cache_id = null, $compile_id = null, $parent = null)
+ createTemplate($template, $cache_id = null, $compile_id = null, $parent = null)
+- property resource_char_set is now replaced by constant SMARTY_RESOURCE_CHAR_SET
+- fixed handling of classes in registered blocks
+- speed improvement of lexer on text sections
+
+09/01/2009
+- dropped nl2br as plugin
+- added '<>' as comparission operator in {if} tags
+- cached caching_lifetime property to cache_liftime for backward compatibility with Smarty2.
+ {include} optional attribute is also now cache_lifetime
+- fixed trigger_error method (moved into Smarty class)
+- version is now Beta!!!
+
+
+08/30/2009
+- some speed optimizations on loading internal plugins
+
+
+08/29/2009
+- implemented caching of registered Resources
+- new property 'auto_literal'. if true(default) '{ ' and ' }' interpreted as literal, not as Smarty delimiter
+
+
+08/28/2009
+- Fix on line breaks inside {if} tags
+
+08/26/2009
+- implemented registered resources as in Smarty2. NOTE: caching does not work yet
+- new property 'force_cache'. if true it forces the creation of a new cache file
+- fixed modifiers on arrays
+- some speed optimization on loading internal classes
+
+
+08/24/2009
+- fixed typo in lexer definition for '!==' operator
+- bugfix - the ouput of plugins was not cached
+- added global variable SCRIPT_NAME
+
+08/21/2009
+- fixed problems whitespace in conjuction with custom delimiters
+- Smarty tags can now be used as value anywhere
+
+08/18/2009
+- definition of template class name moded in internal.templatebase.php
+- whitespace parser changes
+
+08/12/2009
+- fixed parser problems
+
+08/11/2009
+- fixed parser problems with custom delimiter
+
+08/10/2009
+- update of mb support in plugins
+
+
+08/09/2009
+- fixed problems with doublequoted strings at name attribute of {block} tag
+- bugfix at scope attribute of {append} tag
+
+08/08/2009
+- removed all internal calls of Smarty::instance()
+- fixed code in double quoted strings
+
+08/05/2009
+- bugfix mb_string support
+- bugfix of \n.\t etc in double quoted strings
+
+07/29/2009
+- added syntax for variable config vars like #$foo#
+
+07/28/2009
+- fixed parsing of $smarty.session vars containing objects
+
+07/22/2009
+- fix of "$" handling in double quoted strings
+
+07/21/2009
+- fix that {$smarty.current_dir} return correct value within {block} tags.
+
+07/20/2009
+- drop error message on unmatched {block} {/block} pairs
+
+07/01/2009
+- fixed smarty_function_html_options call in plugin function.html_select_date.php (missing ,)
+
+06/24/2009
+- fixed smarty_function_html_options call in plugin function.html_select_date.php
+
+06/22/2009
+- fix on \n and spaces inside smarty tags
+- removed request_use_auto_globals propert as it is no longer needed because Smarty 3 will always run under PHP 5
+
+
+06/18/2009
+- fixed compilation of block plugins when caching enabled
+- added $smarty.current_dir which returns the current working directory
+
+06/14/2009
+- fixed array access on super globals
+- allow smarty tags within xml tags
+
+06/13/2009
+- bugfix at extend resource: create unique files for compiled template and cache for each combination of template files
+- update extend resource to handle appen and prepend block attributes
+- instantiate classes of plugins instead of calling them static
+
+06/03/2009
+- fixed repeat at block plugins
+
+05/25/2009
+- fixed problem with caching of compiler plugins
+
+05/14/2009
+- fixed directory separator handling
+
+05/09/2009
+- syntax change for stream variables
+- fixed bug when using absolute template filepath and caching
+
+05/08/2009
+- fixed bug of {nocache} tag in included templates
+
+05/06/2009
+- allow that plugins_dir folder names can end without directory separator
+
+05/05/2009
+- fixed E_STRICT incompabilities
+- {function} tag bug fix
+- security policy definitions have been moved from plugins folder to file Security.class.php in libs folder
+- added allow_super_global configuration to security
+
+04/30/2009
+- functions defined with the {function} tag now always have global scope
+
+04/29/2009
+- fixed problem with directory setter methods
+- allow that cache_dir can end without directory separator
+
+04/28/2009
+- the {function} tag can no longer overwrite standard smarty tags
+- inherit functions defined by the {fuction} tag into subtemplates
+- added {while <statement>} sytax to while tag
+
+04/26/2009
+- added trusted stream checking to security
+- internal changes at file dependency check for caching
+
+04/24/2009
+- changed name of {template} tag to {function}
+- added new {template} tag
+
+04/23/2009
+- fixed access of special smarty variables from included template
+
+04/22/2009
+- unified template stream syntax with standard Smarty resource syntax $smarty->display('mystream:mytemplate')
+
+04/21/2009
+- change of new style syntax for forach. Now: {foreach $array as $var} like in PHP
+
+04/20/2009
+- fixed "$foo.bar ..." variable replacement in double quoted strings
+- fixed error in {include} tag with variable file attribute
+
+04/18/2009
+- added stream resources ($smarty->display('mystream://mytemplate'))
+- added stream variables {$mystream:myvar}
+
+04/14/2009
+- fixed compile_id handling on {include} tags
+- fixed append/prepend attributes in {block} tag
+- added {if 'expression' is in 'array'} syntax
+- use crc32 as hash for compiled config files.
+
+04/13/2009
+- fixed scope problem with parent variables when appending variables within templates.
+- fixed code for {block} without childs (possible sources for notice errors removed)
+
+04/12/2009
+- added append and prepend attribute to {block} tag
+
+04/11/2009
+- fixed variables in 'file' attribute of {extend} tag
+- fixed problems in modifiers (if mb string functions not present)
+
+04/10/2009
+- check if mb string functions available otherwise fallback to normal string functions
+- added global variable scope SMARTY_GLOBAL_SCOPE
+- enable 'variable' filter by default
+- fixed {$smarty.block.parent.foo}
+- implementation of a 'variable' filter as replacement for default modifier
+
+04/09/2009
+- fixed execution of filters defined by classes
+- compile the always the content of {block} tags to make shure that the filters are running over it
+- syntax corrections on variable object property
+- syntax corrections on array access in dot syntax
+
+04/08/2009
+- allow variable object property
+
+04/07/2009
+- changed variable scopes to SMARTY_LOCAL_SCOPE, SMARTY_PARENT_SCOPE, SMARTY_ROOT_SCOPE to avoid possible conflicts with user constants
+- Smarty variable global attribute replaced with scope attribute
+
+04/06/2009
+- variable scopes LOCAL_SCOPE, PARENT_SCOPE, ROOT_SCOPE
+- more getter/setter methods
+
+04/05/2009
+- replaced new array looping syntax {for $foo in $array} with {foreach $foo in $array} to avoid confusion
+- added append array for short form of assign {$foo[]='bar'} and allow assignments to nested arrays {$foo['bla']['blue']='bar'}
+
+04/04/2009
+- make output of template default handlers cachable and save compiled source
+- some fixes on yesterdays update
+
+04/03/2006
+- added registerDefaultTemplateHandler method and functionallity
+- added registerDefaultPluginHandler method and functionallity
+- added {append} tag to extend Smarty array variabled
+
+04/02/2009
+- added setter/getter methods
+- added $foo@first and $foo@last properties at {for} tag
+- added $set_timezone (true/false) property to setup optionally the default time zone
+
+03/31/2009
+- bugfix smarty.class and internal.security_handler
+- added compile_check configuration
+- added setter/getter methods
+
+03/30/2009
+- added all major setter/getter methods
+
+03/28/2009
+- {block} tags can be nested now
+- md5 hash function replace with crc32 for speed optimization
+- file order for exted resource inverted
+- clear_compiled_tpl and clear_cache_all will not touch .svn folder any longer
+
+03/27/2009
+- added extend resource
+
+03/26/2009
+- fixed parser not to create error on `word` in double quoted strings
+- allow PHP array(...)
+- implemented $smarty.block.name.parent to access parent block content
+- fixed smarty.class
+
+
+03/23/2009
+- fixed {foreachelse} and {forelse} tags
+
+03/22/2009
+- fixed possible sources for notice errors
+- rearrange SVN into distribution and development folders
+
+03/21/2009
+- fixed exceptions in function plugins
+- fixed notice error in Smarty.class.php
+- allow chained objects to span multiple lines
+- fixed error in modifers
+
+03/20/2009
+- moved /plugins folder into /libs folder
+- added noprint modifier
+- autoappend a directory separator if the xxxxx_dir definition have no trailing one
+
+03/19/2009
+- allow array definition as modifer parameter
+- changed modifier to use multi byte string funktions.
+
+03/17/2009
+- bugfix
+
+03/15/2009
+- added {include_php} tag for BC
+- removed @ error suppression
+- bugfix fetch did always repeat output of first call when calling same template several times
+- PHPunit tests extended
+
+03/13/2009
+- changed block syntax to be Smarty like {block:titel} -> {block name=titel}
+- compiling of {block} and {extend} tags rewriten for better performance
+- added special Smarty variable block ($smarty.block.foo} returns the parent definition of block foo
+- optimization of {block} tag compiled code.
+- fixed problem with escaped double quotes in double quoted strings
+
+03/12/2009
+- added support of template inheritance by {extend } and {block } tags.
+- bugfix comments within literals
+- added scope attribuie to {include} tag
+
+03/10/2009
+- couple of bugfixes and improvements
+- PHPunit tests extended
+
+03/09/2009
+- added support for global template vars. {assign_global...} $smarty->assign_global(...)
+- added direct_access_security
+- PHPunit tests extended
+- added missing {if} tag conditions like "is div by" etc.
+
+03/08/2009
+- splitted up the Compiler class to make it easier to use a coustom compiler
+- made default plugins_dir relative to Smarty root and not current working directory
+- some changes to make the lexer parser better configurable
+- implemented {section} tag for Smarty2 BC
+
+03/07/2009
+- fixed problem with comment tags
+- fixed problem with #xxxx in double quoted string
+- new {while} tag implemented
+- made lexer and paser class configurable as $smarty property
+- Smarty method get_template_vars implemented
+- Smarty method get_registered_object implemented
+- Smarty method trigger_error implemented
+- PHPunit tests extended
+
+03/06/2009
+- final changes on config variable handling
+- parser change - unquoted strings will by be converted into single quoted strings
+- PHPunit tests extended
+- some code cleanup
+- fixed problem on catenate strings with expression
+- update of count_words modifier
+- bugfix on comment tags
+
+
+03/05/2009
+- bugfix on <?xml...> tag with caching enabled
+- changes on exception handling (by Monte)
+
+03/04/2009
+- added support for config variables
+- bugfix on <?xml...> tag
+
+03/02/2009
+- fixed unqouted strings within modifier parameter
+- bugfix parsing of mofifier parameter
+
+03/01/2009
+- modifier chaining works now as in Smarty2
+
+02/28/2009
+- changed handling of unqouted strings
+
+02/26/2009
+- bugfix
+- changed $smarty.capture.foo to be global for Smarty2 BC.
+
+02/24/2009
+- bugfix {php} {/php} tags for backward compatibility
+- bugfix for expressions on arrays
+- fixed usage of "null" value
+- added $smarty.foreach.foo.first and $smarty.foreach.foo.last
+
+02/06/2009
+- bugfix for request variables without index for example $smarty.get
+- experimental solution for variable functions in static class
+
+02/05/2009
+- update of popup plugin
+- added config variables to template parser (load config functions still missing)
+- parser bugfix for empty quoted strings
+
+02/03/2009
+- allow array of objects as static class variabales.
+- use htmlentities at source output at template errors.
+
+02/02/2009
+- changed search order on modifiers to look at plugins folder first
+- parser bug fix for modifier on array elements $foo.bar|modifier
+- parser bug fix on single quoted srings
+- internal: splitted up compiler plugin files
+
+02/01/2009
+- allow method chaining on static classes
+- special Smarty variables $smarty.... implemented
+- added {PHP} {/PHP} tags for backward compatibility
+
+01/31/2009
+- added {math} plugin for Smarty2 BC
+- added template_exists method
+- changed Smarty3 method enable_security() to enableSecurity() to follow camelCase standards
+
+01/30/2009
+- bugfix in single quoted strings
+- changed syntax for variable property access from $foo:property to $foo@property because of ambiguous syntax at modifiers
+
+01/29/2009
+- syntax for array definition changed from (1,2,3) to [1,2,3] to remove ambiguous syntax
+- allow {for $foo in [1,2,3]} syntax
+- bugfix in double quoted strings
+- allow <?xml...?> tags in template even if short_tags are enabled
+
+01/28/2009
+- fixed '!==' if condition.
+
+01/28/2009
+- added support of {strip} {/strip} tag.
+
+01/27/2009
+- bug fix on backticks in double quoted strings at objects
+
+01/25/2009
+- Smarty2 modfiers added to SVN
+
+01/25/2009
+- bugfix allow arrays at object properties in Smarty syntax
+- the template object is now passed as additional parameter at plugin calls
+- clear_compiled_tpl method completed
+
+01/20/2009
+- access to class constants implemented ( class::CONSTANT )
+- access to static class variables implemented ( class::$variable )
+- call of static class methods implemented ( class::method() )
+
+01/16/2009
+- reallow leading _ in variable names {$_var}
+- allow array of objects {$array.index->method()} syntax
+- finished work on clear_cache and clear_cache_all methods
+
+01/11/2009
+- added support of {literal} tag
+- added support of {ldelim} and {rdelim} tags
+- make code compatible to run with E_STRICT error setting
+
+01/08/2009
+- moved clear_assign and clear_all_assign to internal.templatebase.php
+- added assign_by_ref, append and append_by_ref methods
+
+01/02/2009
+- added load_filter method
+- fished work on filter handling
+- optimization of plugin loading
+
+12/30/2008
+- added compiler support of registered object
+- added backtick support in doubled quoted strings for backward compatibility
+- some minor bug fixes and improvments
+
+12/23/2008
+- fixed problem of not working "not" operator in if-expressions
+- added handling of compiler function plugins
+- finished work on (un)register_compiler_function method
+- finished work on (un)register_modifier method
+- plugin handling from plugins folder changed for modifier plugins
+ deleted - internal.modifier.php
+- added modifier chaining to parser
+
+12/17/2008
+- finished (un)register_function method
+- finished (un)register_block method
+- added security checking for PHP functions in PHP templates
+- plugin handling from plugins folder rewritten
+ new - internal.plugin_handler.php
+ deleted - internal.block.php
+ deleted - internal.function.php
+- removed plugin checking from security handler
+
+12/16/2008
+
+- new start of this change_log file
diff --git a/library/Smarty/demo/configs/test.conf b/library/Smarty/demo/configs/test.conf
new file mode 100644
index 000000000..5eac748ec
--- /dev/null
+++ b/library/Smarty/demo/configs/test.conf
@@ -0,0 +1,5 @@
+title = Welcome to Smarty!
+cutoff_size = 40
+
+[setup]
+bold = true
diff --git a/library/Smarty/demo/index.php b/library/Smarty/demo/index.php
new file mode 100644
index 000000000..74c8e8971
--- /dev/null
+++ b/library/Smarty/demo/index.php
@@ -0,0 +1,33 @@
+<?php
+ /**
+ * Example Application
+
+ * @package Example-application
+ */
+
+require('../libs/Smarty.class.php');
+
+$smarty = new Smarty;
+
+
+
+//$smarty->force_compile = true;
+$smarty->debugging = true;
+$smarty->caching = true;
+$smarty->cache_lifetime = 120;
+
+$smarty->assign("Name","Fred Irving Johnathan Bradley Peppergill",true);
+$smarty->assign("FirstName",array("John","Mary","James","Henry"));
+$smarty->assign("LastName",array("Doe","Smith","Johnson","Case"));
+$smarty->assign("Class",array(array("A","B","C","D"), array("E", "F", "G", "H"),
+ array("I", "J", "K", "L"), array("M", "N", "O", "P")));
+
+$smarty->assign("contacts", array(array("phone" => "1", "fax" => "2", "cell" => "3"),
+ array("phone" => "555-4444", "fax" => "555-3333", "cell" => "760-1234")));
+
+$smarty->assign("option_values", array("NY","NE","KS","IA","OK","TX"));
+$smarty->assign("option_output", array("New York","Nebraska","Kansas","Iowa","Oklahoma","Texas"));
+$smarty->assign("option_selected", "NE");
+
+$smarty->display('index.tpl');
+?>
diff --git a/library/Smarty/demo/plugins/cacheresource.apc.php b/library/Smarty/demo/plugins/cacheresource.apc.php
new file mode 100644
index 000000000..00ba59817
--- /dev/null
+++ b/library/Smarty/demo/plugins/cacheresource.apc.php
@@ -0,0 +1,77 @@
+<?php
+
+/**
+ * APC CacheResource
+ *
+ * CacheResource Implementation based on the KeyValueStore API to use
+ * memcache as the storage resource for Smarty's output caching.
+ * *
+ * @package CacheResource-examples
+ * @author Uwe Tews
+ */
+class Smarty_CacheResource_Apc extends Smarty_CacheResource_KeyValueStore {
+
+ public function __construct()
+ {
+ // test if APC is present
+ if(!function_exists('apc_cache_info')) {
+ throw new Exception('APC Template Caching Error: APC is not installed');
+ }
+ }
+
+ /**
+ * Read values for a set of keys from cache
+ *
+ * @param array $keys list of keys to fetch
+ * @return array list of values with the given keys used as indexes
+ * @return boolean true on success, false on failure
+ */
+ protected function read(array $keys)
+ {
+ $_res = array();
+ $res = apc_fetch($keys);
+ foreach ($res as $k => $v) {
+ $_res[$k] = $v;
+ }
+ return $_res;
+ }
+
+ /**
+ * Save values for a set of keys to cache
+ *
+ * @param array $keys list of values to save
+ * @param int $expire expiration time
+ * @return boolean true on success, false on failure
+ */
+ protected function write(array $keys, $expire=null)
+ {
+ foreach ($keys as $k => $v) {
+ apc_store($k, $v, $expire);
+ }
+ return true;
+ }
+
+ /**
+ * Remove values from cache
+ *
+ * @param array $keys list of keys to delete
+ * @return boolean true on success, false on failure
+ */
+ protected function delete(array $keys)
+ {
+ foreach ($keys as $k) {
+ apc_delete($k);
+ }
+ return true;
+ }
+
+ /**
+ * Remove *all* values from cache
+ *
+ * @return boolean true on success, false on failure
+ */
+ protected function purge()
+ {
+ return apc_clear_cache('user');
+ }
+}
diff --git a/library/Smarty/demo/plugins/cacheresource.memcache.php b/library/Smarty/demo/plugins/cacheresource.memcache.php
new file mode 100644
index 000000000..230607d69
--- /dev/null
+++ b/library/Smarty/demo/plugins/cacheresource.memcache.php
@@ -0,0 +1,91 @@
+<?php
+
+/**
+ * Memcache CacheResource
+ *
+ * CacheResource Implementation based on the KeyValueStore API to use
+ * memcache as the storage resource for Smarty's output caching.
+ *
+ * Note that memcache has a limitation of 256 characters per cache-key.
+ * To avoid complications all cache-keys are translated to a sha1 hash.
+ *
+ * @package CacheResource-examples
+ * @author Rodney Rehm
+ */
+class Smarty_CacheResource_Memcache extends Smarty_CacheResource_KeyValueStore {
+ /**
+ * memcache instance
+ * @var Memcache
+ */
+ protected $memcache = null;
+
+ public function __construct()
+ {
+ $this->memcache = new Memcache();
+ $this->memcache->addServer( '127.0.0.1', 11211 );
+ }
+
+ /**
+ * Read values for a set of keys from cache
+ *
+ * @param array $keys list of keys to fetch
+ * @return array list of values with the given keys used as indexes
+ * @return boolean true on success, false on failure
+ */
+ protected function read(array $keys)
+ {
+ $_keys = $lookup = array();
+ foreach ($keys as $k) {
+ $_k = sha1($k);
+ $_keys[] = $_k;
+ $lookup[$_k] = $k;
+ }
+ $_res = array();
+ $res = $this->memcache->get($_keys);
+ foreach ($res as $k => $v) {
+ $_res[$lookup[$k]] = $v;
+ }
+ return $_res;
+ }
+
+ /**
+ * Save values for a set of keys to cache
+ *
+ * @param array $keys list of values to save
+ * @param int $expire expiration time
+ * @return boolean true on success, false on failure
+ */
+ protected function write(array $keys, $expire=null)
+ {
+ foreach ($keys as $k => $v) {
+ $k = sha1($k);
+ $this->memcache->set($k, $v, 0, $expire);
+ }
+ return true;
+ }
+
+ /**
+ * Remove values from cache
+ *
+ * @param array $keys list of keys to delete
+ * @return boolean true on success, false on failure
+ */
+ protected function delete(array $keys)
+ {
+ foreach ($keys as $k) {
+ $k = sha1($k);
+ $this->memcache->delete($k);
+ }
+ return true;
+ }
+
+ /**
+ * Remove *all* values from cache
+ *
+ * @return boolean true on success, false on failure
+ */
+ protected function purge()
+ {
+ return $this->memcache->flush();
+ }
+}
diff --git a/library/Smarty/demo/plugins/cacheresource.mysql.php b/library/Smarty/demo/plugins/cacheresource.mysql.php
new file mode 100644
index 000000000..ab8c47516
--- /dev/null
+++ b/library/Smarty/demo/plugins/cacheresource.mysql.php
@@ -0,0 +1,152 @@
+<?php
+
+/**
+ * MySQL CacheResource
+ *
+ * CacheResource Implementation based on the Custom API to use
+ * MySQL as the storage resource for Smarty's output caching.
+ *
+ * Table definition:
+ * <pre>CREATE TABLE IF NOT EXISTS `output_cache` (
+ * `id` CHAR(40) NOT NULL COMMENT 'sha1 hash',
+ * `name` VARCHAR(250) NOT NULL,
+ * `cache_id` VARCHAR(250) NULL DEFAULT NULL,
+ * `compile_id` VARCHAR(250) NULL DEFAULT NULL,
+ * `modified` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ * `content` LONGTEXT NOT NULL,
+ * PRIMARY KEY (`id`),
+ * INDEX(`name`),
+ * INDEX(`cache_id`),
+ * INDEX(`compile_id`),
+ * INDEX(`modified`)
+ * ) ENGINE = InnoDB;</pre>
+ *
+ * @package CacheResource-examples
+ * @author Rodney Rehm
+ */
+class Smarty_CacheResource_Mysql extends Smarty_CacheResource_Custom {
+ // PDO instance
+ protected $db;
+ protected $fetch;
+ protected $fetchTimestamp;
+ protected $save;
+
+ public function __construct() {
+ try {
+ $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty", "smarty");
+ } catch (PDOException $e) {
+ throw new SmartyException('Mysql Resource failed: ' . $e->getMessage());
+ }
+ $this->fetch = $this->db->prepare('SELECT modified, content FROM output_cache WHERE id = :id');
+ $this->fetchTimestamp = $this->db->prepare('SELECT modified FROM output_cache WHERE id = :id');
+ $this->save = $this->db->prepare('REPLACE INTO output_cache (id, name, cache_id, compile_id, content)
+ VALUES (:id, :name, :cache_id, :compile_id, :content)');
+ }
+
+ /**
+ * fetch cached content and its modification time from data source
+ *
+ * @param string $id unique cache content identifier
+ * @param string $name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param string $content cached content
+ * @param integer $mtime cache modification timestamp (epoch)
+ * @return void
+ */
+ protected function fetch($id, $name, $cache_id, $compile_id, &$content, &$mtime)
+ {
+ $this->fetch->execute(array('id' => $id));
+ $row = $this->fetch->fetch();
+ $this->fetch->closeCursor();
+ if ($row) {
+ $content = $row['content'];
+ $mtime = strtotime($row['modified']);
+ } else {
+ $content = null;
+ $mtime = null;
+ }
+ }
+
+ /**
+ * Fetch cached content's modification timestamp from data source
+ *
+ * @note implementing this method is optional. Only implement it if modification times can be accessed faster than loading the complete cached content.
+ * @param string $id unique cache content identifier
+ * @param string $name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @return integer|boolean timestamp (epoch) the template was modified, or false if not found
+ */
+ protected function fetchTimestamp($id, $name, $cache_id, $compile_id)
+ {
+ $this->fetchTimestamp->execute(array('id' => $id));
+ $mtime = strtotime($this->fetchTimestamp->fetchColumn());
+ $this->fetchTimestamp->closeCursor();
+ return $mtime;
+ }
+
+ /**
+ * Save content to cache
+ *
+ * @param string $id unique cache content identifier
+ * @param string $name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param integer|null $exp_time seconds till expiration time in seconds or null
+ * @param string $content content to cache
+ * @return boolean success
+ */
+ protected function save($id, $name, $cache_id, $compile_id, $exp_time, $content)
+ {
+ $this->save->execute(array(
+ 'id' => $id,
+ 'name' => $name,
+ 'cache_id' => $cache_id,
+ 'compile_id' => $compile_id,
+ 'content' => $content,
+ ));
+ return !!$this->save->rowCount();
+ }
+
+ /**
+ * Delete content from cache
+ *
+ * @param string $name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param integer|null $exp_time seconds till expiration or null
+ * @return integer number of deleted caches
+ */
+ protected function delete($name, $cache_id, $compile_id, $exp_time)
+ {
+ // delete the whole cache
+ if ($name === null && $cache_id === null && $compile_id === null && $exp_time === null) {
+ // returning the number of deleted caches would require a second query to count them
+ $query = $this->db->query('TRUNCATE TABLE output_cache');
+ return -1;
+ }
+ // build the filter
+ $where = array();
+ // equal test name
+ if ($name !== null) {
+ $where[] = 'name = ' . $this->db->quote($name);
+ }
+ // equal test compile_id
+ if ($compile_id !== null) {
+ $where[] = 'compile_id = ' . $this->db->quote($compile_id);
+ }
+ // range test expiration time
+ if ($exp_time !== null) {
+ $where[] = 'modified < DATE_SUB(NOW(), INTERVAL ' . intval($exp_time) . ' SECOND)';
+ }
+ // equal test cache_id and match sub-groups
+ if ($cache_id !== null) {
+ $where[] = '(cache_id = '. $this->db->quote($cache_id)
+ . ' OR cache_id LIKE '. $this->db->quote($cache_id .'|%') .')';
+ }
+ // run delete query
+ $query = $this->db->query('DELETE FROM output_cache WHERE ' . join(' AND ', $where));
+ return $query->rowCount();
+ }
+}
diff --git a/library/Smarty/demo/plugins/resource.extendsall.php b/library/Smarty/demo/plugins/resource.extendsall.php
new file mode 100644
index 000000000..d8c40b5ba
--- /dev/null
+++ b/library/Smarty/demo/plugins/resource.extendsall.php
@@ -0,0 +1,60 @@
+<?php
+
+/**
+ * Extends All Resource
+ *
+ * Resource Implementation modifying the extends-Resource to walk
+ * through the template_dirs and inherit all templates of the same name
+ *
+ * @package Resource-examples
+ * @author Rodney Rehm
+ */
+class Smarty_Resource_Extendsall extends Smarty_Internal_Resource_Extends {
+
+ /**
+ * populate Source Object with meta data from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ * @param Smarty_Internal_Template $_template template object
+ * @return void
+ */
+ public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
+ {
+ $uid = '';
+ $sources = array();
+ $exists = true;
+ foreach ($_template->smarty->getTemplateDir() as $key => $directory) {
+ try {
+ $s = Smarty_Resource::source(null, $source->smarty, '[' . $key . ']' . $source->name );
+ if (!$s->exists) {
+ continue;
+ }
+ $sources[$s->uid] = $s;
+ $uid .= $s->filepath;
+ }
+ catch (SmartyException $e) {}
+ }
+
+ if (!$sources) {
+ $source->exists = false;
+ $source->template = $_template;
+ return;
+ }
+
+ $sources = array_reverse($sources, true);
+ reset($sources);
+ $s = current($sources);
+
+ $source->components = $sources;
+ $source->filepath = $s->filepath;
+ $source->uid = sha1($uid);
+ $source->exists = $exists;
+ if ($_template && $_template->smarty->compile_check) {
+ $source->timestamp = $s->timestamp;
+ }
+ // need the template at getContent()
+ $source->template = $_template;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/demo/plugins/resource.mysql.php b/library/Smarty/demo/plugins/resource.mysql.php
new file mode 100644
index 000000000..312f3fc73
--- /dev/null
+++ b/library/Smarty/demo/plugins/resource.mysql.php
@@ -0,0 +1,76 @@
+<?php
+
+/**
+ * MySQL Resource
+ *
+ * Resource Implementation based on the Custom API to use
+ * MySQL as the storage resource for Smarty's templates and configs.
+ *
+ * Table definition:
+ * <pre>CREATE TABLE IF NOT EXISTS `templates` (
+ * `name` varchar(100) NOT NULL,
+ * `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ * `source` text,
+ * PRIMARY KEY (`name`)
+ * ) ENGINE=InnoDB DEFAULT CHARSET=utf8;</pre>
+ *
+ * Demo data:
+ * <pre>INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');</pre>
+ *
+ * @package Resource-examples
+ * @author Rodney Rehm
+ */
+class Smarty_Resource_Mysql extends Smarty_Resource_Custom {
+ // PDO instance
+ protected $db;
+ // prepared fetch() statement
+ protected $fetch;
+ // prepared fetchTimestamp() statement
+ protected $mtime;
+
+ public function __construct() {
+ try {
+ $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty", "smarty");
+ } catch (PDOException $e) {
+ throw new SmartyException('Mysql Resource failed: ' . $e->getMessage());
+ }
+ $this->fetch = $this->db->prepare('SELECT modified, source FROM templates WHERE name = :name');
+ $this->mtime = $this->db->prepare('SELECT modified FROM templates WHERE name = :name');
+ }
+
+ /**
+ * Fetch a template and its modification time from database
+ *
+ * @param string $name template name
+ * @param string $source template source
+ * @param integer $mtime template modification timestamp (epoch)
+ * @return void
+ */
+ protected function fetch($name, &$source, &$mtime)
+ {
+ $this->fetch->execute(array('name' => $name));
+ $row = $this->fetch->fetch();
+ $this->fetch->closeCursor();
+ if ($row) {
+ $source = $row['source'];
+ $mtime = strtotime($row['modified']);
+ } else {
+ $source = null;
+ $mtime = null;
+ }
+ }
+
+ /**
+ * Fetch a template's modification time from database
+ *
+ * @note implementing this method is optional. Only implement it if modification times can be accessed faster than loading the comple template source.
+ * @param string $name template name
+ * @return integer timestamp (epoch) the template was modified
+ */
+ protected function fetchTimestamp($name) {
+ $this->mtime->execute(array('name' => $name));
+ $mtime = $this->mtime->fetchColumn();
+ $this->mtime->closeCursor();
+ return strtotime($mtime);
+ }
+}
diff --git a/library/Smarty/demo/plugins/resource.mysqls.php b/library/Smarty/demo/plugins/resource.mysqls.php
new file mode 100644
index 000000000..f9fe1c2f2
--- /dev/null
+++ b/library/Smarty/demo/plugins/resource.mysqls.php
@@ -0,0 +1,62 @@
+<?php
+
+/**
+ * MySQL Resource
+ *
+ * Resource Implementation based on the Custom API to use
+ * MySQL as the storage resource for Smarty's templates and configs.
+ *
+ * Note that this MySQL implementation fetches the source and timestamps in
+ * a single database query, instead of two seperate like resource.mysql.php does.
+ *
+ * Table definition:
+ * <pre>CREATE TABLE IF NOT EXISTS `templates` (
+ * `name` varchar(100) NOT NULL,
+ * `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ * `source` text,
+ * PRIMARY KEY (`name`)
+ * ) ENGINE=InnoDB DEFAULT CHARSET=utf8;</pre>
+ *
+ * Demo data:
+ * <pre>INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');</pre>
+ *
+ * @package Resource-examples
+ * @author Rodney Rehm
+ */
+class Smarty_Resource_Mysqls extends Smarty_Resource_Custom {
+ // PDO instance
+ protected $db;
+ // prepared fetch() statement
+ protected $fetch;
+
+ public function __construct() {
+ try {
+ $this->db = new PDO("mysql:dbname=test;host=127.0.0.1", "smarty", "smarty");
+ } catch (PDOException $e) {
+ throw new SmartyException('Mysql Resource failed: ' . $e->getMessage());
+ }
+ $this->fetch = $this->db->prepare('SELECT modified, source FROM templates WHERE name = :name');
+ }
+
+ /**
+ * Fetch a template and its modification time from database
+ *
+ * @param string $name template name
+ * @param string $source template source
+ * @param integer $mtime template modification timestamp (epoch)
+ * @return void
+ */
+ protected function fetch($name, &$source, &$mtime)
+ {
+ $this->fetch->execute(array('name' => $name));
+ $row = $this->fetch->fetch();
+ $this->fetch->closeCursor();
+ if ($row) {
+ $source = $row['source'];
+ $mtime = strtotime($row['modified']);
+ } else {
+ $source = null;
+ $mtime = null;
+ }
+ }
+}
diff --git a/library/Smarty/demo/templates/footer.tpl b/library/Smarty/demo/templates/footer.tpl
new file mode 100644
index 000000000..e04310fdd
--- /dev/null
+++ b/library/Smarty/demo/templates/footer.tpl
@@ -0,0 +1,2 @@
+</BODY>
+</HTML>
diff --git a/library/Smarty/demo/templates/header.tpl b/library/Smarty/demo/templates/header.tpl
new file mode 100644
index 000000000..783210a18
--- /dev/null
+++ b/library/Smarty/demo/templates/header.tpl
@@ -0,0 +1,5 @@
+<HTML>
+<HEAD>
+<TITLE>{$title} - {$Name}</TITLE>
+</HEAD>
+<BODY bgcolor="#ffffff">
diff --git a/library/Smarty/demo/templates/index.tpl b/library/Smarty/demo/templates/index.tpl
new file mode 100644
index 000000000..38d233412
--- /dev/null
+++ b/library/Smarty/demo/templates/index.tpl
@@ -0,0 +1,82 @@
+{config_load file="test.conf" section="setup"}
+{include file="header.tpl" title=foo}
+
+<PRE>
+
+{* bold and title are read from the config file *}
+{if #bold#}<b>{/if}
+{* capitalize the first letters of each word of the title *}
+Title: {#title#|capitalize}
+{if #bold#}</b>{/if}
+
+The current date and time is {$smarty.now|date_format:"%Y-%m-%d %H:%M:%S"}
+
+The value of global assigned variable $SCRIPT_NAME is {$SCRIPT_NAME}
+
+Example of accessing server environment variable SERVER_NAME: {$smarty.server.SERVER_NAME}
+
+The value of {ldelim}$Name{rdelim} is <b>{$Name}</b>
+
+variable modifier example of {ldelim}$Name|upper{rdelim}
+
+<b>{$Name|upper}</b>
+
+
+An example of a section loop:
+
+{section name=outer
+loop=$FirstName}
+{if $smarty.section.outer.index is odd by 2}
+ {$smarty.section.outer.rownum} . {$FirstName[outer]} {$LastName[outer]}
+{else}
+ {$smarty.section.outer.rownum} * {$FirstName[outer]} {$LastName[outer]}
+{/if}
+{sectionelse}
+ none
+{/section}
+
+An example of section looped key values:
+
+{section name=sec1 loop=$contacts}
+ phone: {$contacts[sec1].phone}<br>
+ fax: {$contacts[sec1].fax}<br>
+ cell: {$contacts[sec1].cell}<br>
+{/section}
+<p>
+
+testing strip tags
+{strip}
+<table border=0>
+ <tr>
+ <td>
+ <A HREF="{$SCRIPT_NAME}">
+ <font color="red">This is a test </font>
+ </A>
+ </td>
+ </tr>
+</table>
+{/strip}
+
+</PRE>
+
+This is an example of the html_select_date function:
+
+<form>
+{html_select_date start_year=1998 end_year=2010}
+</form>
+
+This is an example of the html_select_time function:
+
+<form>
+{html_select_time use_24_hours=false}
+</form>
+
+This is an example of the html_options function:
+
+<form>
+<select name=states>
+{html_options values=$option_values selected=$option_selected output=$option_output}
+</select>
+</form>
+
+{include file="footer.tpl"}
diff --git a/library/Smarty/libs/Smarty.class.php b/library/Smarty/libs/Smarty.class.php
new file mode 100644
index 000000000..f776aaf7c
--- /dev/null
+++ b/library/Smarty/libs/Smarty.class.php
@@ -0,0 +1,1517 @@
+<?php
+/**
+ * Project: Smarty: the PHP compiling template engine
+ * File: Smarty.class.php
+ * SVN: $Id: Smarty.class.php 4614 2012-05-24 15:13:19Z rodneyrehm $
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Smarty mailing list. Send a blank e-mail to
+ * smarty-discussion-subscribe@googlegroups.com
+ *
+ * @link http://www.smarty.net/
+ * @copyright 2008 New Digital Group, Inc.
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author Uwe Tews
+ * @author Rodney Rehm
+ * @package Smarty
+ * @version 3.1-DEV
+ */
+
+/**
+ * define shorthand directory separator constant
+ */
+if (!defined('DS')) {
+ define('DS', DIRECTORY_SEPARATOR);
+}
+
+/**
+ * set SMARTY_DIR to absolute path to Smarty library files.
+ * Sets SMARTY_DIR only if user application has not already defined it.
+ */
+if (!defined('SMARTY_DIR')) {
+ define('SMARTY_DIR', dirname(__FILE__) . DS);
+}
+
+/**
+ * set SMARTY_SYSPLUGINS_DIR to absolute path to Smarty internal plugins.
+ * Sets SMARTY_SYSPLUGINS_DIR only if user application has not already defined it.
+ */
+if (!defined('SMARTY_SYSPLUGINS_DIR')) {
+ define('SMARTY_SYSPLUGINS_DIR', SMARTY_DIR . 'sysplugins' . DS);
+}
+if (!defined('SMARTY_PLUGINS_DIR')) {
+ define('SMARTY_PLUGINS_DIR', SMARTY_DIR . 'plugins' . DS);
+}
+if (!defined('SMARTY_MBSTRING')) {
+ define('SMARTY_MBSTRING', function_exists('mb_strlen'));
+}
+if (!defined('SMARTY_RESOURCE_CHAR_SET')) {
+ // UTF-8 can only be done properly when mbstring is available!
+ /**
+ * @deprecated in favor of Smarty::$_CHARSET
+ */
+ define('SMARTY_RESOURCE_CHAR_SET', SMARTY_MBSTRING ? 'UTF-8' : 'ISO-8859-1');
+}
+if (!defined('SMARTY_RESOURCE_DATE_FORMAT')) {
+ /**
+ * @deprecated in favor of Smarty::$_DATE_FORMAT
+ */
+ define('SMARTY_RESOURCE_DATE_FORMAT', '%b %e, %Y');
+}
+
+/**
+ * register the class autoloader
+ */
+if (!defined('SMARTY_SPL_AUTOLOAD')) {
+ define('SMARTY_SPL_AUTOLOAD', 0);
+}
+
+if (SMARTY_SPL_AUTOLOAD && set_include_path(get_include_path() . PATH_SEPARATOR . SMARTY_SYSPLUGINS_DIR) !== false) {
+ $registeredAutoLoadFunctions = spl_autoload_functions();
+ if (!isset($registeredAutoLoadFunctions['spl_autoload'])) {
+ spl_autoload_register();
+ }
+} else {
+ spl_autoload_register('smartyAutoload');
+}
+
+/**
+ * Load always needed external class files
+ */
+include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_data.php';
+include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_templatebase.php';
+include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_template.php';
+include_once SMARTY_SYSPLUGINS_DIR.'smarty_resource.php';
+include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_resource_file.php';
+include_once SMARTY_SYSPLUGINS_DIR.'smarty_cacheresource.php';
+include_once SMARTY_SYSPLUGINS_DIR.'smarty_internal_cacheresource_file.php';
+
+/**
+ * This is the main Smarty class
+ * @package Smarty
+ */
+class Smarty extends Smarty_Internal_TemplateBase {
+
+ /**#@+
+ * constant definitions
+ */
+
+ /**
+ * smarty version
+ */
+ const SMARTY_VERSION = 'Smarty-3.1.11';
+
+ /**
+ * define variable scopes
+ */
+ const SCOPE_LOCAL = 0;
+ const SCOPE_PARENT = 1;
+ const SCOPE_ROOT = 2;
+ const SCOPE_GLOBAL = 3;
+ /**
+ * define caching modes
+ */
+ const CACHING_OFF = 0;
+ const CACHING_LIFETIME_CURRENT = 1;
+ const CACHING_LIFETIME_SAVED = 2;
+ /**
+ * define compile check modes
+ */
+ const COMPILECHECK_OFF = 0;
+ const COMPILECHECK_ON = 1;
+ const COMPILECHECK_CACHEMISS = 2;
+ /**
+ * modes for handling of "<?php ... ?>" tags in templates.
+ */
+ const PHP_PASSTHRU = 0; //-> print tags as plain text
+ const PHP_QUOTE = 1; //-> escape tags as entities
+ const PHP_REMOVE = 2; //-> escape tags as entities
+ const PHP_ALLOW = 3; //-> escape tags as entities
+ /**
+ * filter types
+ */
+ const FILTER_POST = 'post';
+ const FILTER_PRE = 'pre';
+ const FILTER_OUTPUT = 'output';
+ const FILTER_VARIABLE = 'variable';
+ /**
+ * plugin types
+ */
+ const PLUGIN_FUNCTION = 'function';
+ const PLUGIN_BLOCK = 'block';
+ const PLUGIN_COMPILER = 'compiler';
+ const PLUGIN_MODIFIER = 'modifier';
+ const PLUGIN_MODIFIERCOMPILER = 'modifiercompiler';
+
+ /**#@-*/
+
+ /**
+ * assigned global tpl vars
+ */
+ public static $global_tpl_vars = array();
+
+ /**
+ * error handler returned by set_error_hanlder() in Smarty::muteExpectedErrors()
+ */
+ public static $_previous_error_handler = null;
+ /**
+ * contains directories outside of SMARTY_DIR that are to be muted by muteExpectedErrors()
+ */
+ public static $_muted_directories = array();
+ /**
+ * Flag denoting if Multibyte String functions are available
+ */
+ public static $_MBSTRING = SMARTY_MBSTRING;
+ /**
+ * The character set to adhere to (e.g. "UTF-8")
+ */
+ public static $_CHARSET = SMARTY_RESOURCE_CHAR_SET;
+ /**
+ * The date format to be used internally
+ * (accepts date() and strftime())
+ */
+ public static $_DATE_FORMAT = SMARTY_RESOURCE_DATE_FORMAT;
+ /**
+ * Flag denoting if PCRE should run in UTF-8 mode
+ */
+ public static $_UTF8_MODIFIER = 'u';
+
+ /**
+ * Flag denoting if operating system is windows
+ */
+ public static $_IS_WINDOWS = false;
+
+ /**#@+
+ * variables
+ */
+
+ /**
+ * auto literal on delimiters with whitspace
+ * @var boolean
+ */
+ public $auto_literal = true;
+ /**
+ * display error on not assigned variables
+ * @var boolean
+ */
+ public $error_unassigned = false;
+ /**
+ * look up relative filepaths in include_path
+ * @var boolean
+ */
+ public $use_include_path = false;
+ /**
+ * template directory
+ * @var array
+ */
+ private $template_dir = array();
+ /**
+ * joined template directory string used in cache keys
+ * @var string
+ */
+ public $joined_template_dir = null;
+ /**
+ * joined config directory string used in cache keys
+ * @var string
+ */
+ public $joined_config_dir = null;
+ /**
+ * default template handler
+ * @var callable
+ */
+ public $default_template_handler_func = null;
+ /**
+ * default config handler
+ * @var callable
+ */
+ public $default_config_handler_func = null;
+ /**
+ * default plugin handler
+ * @var callable
+ */
+ public $default_plugin_handler_func = null;
+ /**
+ * compile directory
+ * @var string
+ */
+ private $compile_dir = null;
+ /**
+ * plugins directory
+ * @var array
+ */
+ private $plugins_dir = array();
+ /**
+ * cache directory
+ * @var string
+ */
+ private $cache_dir = null;
+ /**
+ * config directory
+ * @var array
+ */
+ private $config_dir = array();
+ /**
+ * force template compiling?
+ * @var boolean
+ */
+ public $force_compile = false;
+ /**
+ * check template for modifications?
+ * @var boolean
+ */
+ public $compile_check = true;
+ /**
+ * use sub dirs for compiled/cached files?
+ * @var boolean
+ */
+ public $use_sub_dirs = false;
+ /**
+ * allow ambiguous resources (that are made unique by the resource handler)
+ * @var boolean
+ */
+ public $allow_ambiguous_resources = false;
+ /**
+ * caching enabled
+ * @var boolean
+ */
+ public $caching = false;
+ /**
+ * merge compiled includes
+ * @var boolean
+ */
+ public $merge_compiled_includes = false;
+ /**
+ * cache lifetime in seconds
+ * @var integer
+ */
+ public $cache_lifetime = 3600;
+ /**
+ * force cache file creation
+ * @var boolean
+ */
+ public $force_cache = false;
+ /**
+ * Set this if you want different sets of cache files for the same
+ * templates.
+ *
+ * @var string
+ */
+ public $cache_id = null;
+ /**
+ * Set this if you want different sets of compiled files for the same
+ * templates.
+ *
+ * @var string
+ */
+ public $compile_id = null;
+ /**
+ * template left-delimiter
+ * @var string
+ */
+ public $left_delimiter = "{";
+ /**
+ * template right-delimiter
+ * @var string
+ */
+ public $right_delimiter = "}";
+ /**#@+
+ * security
+ */
+ /**
+ * class name
+ *
+ * This should be instance of Smarty_Security.
+ *
+ * @var string
+ * @see Smarty_Security
+ */
+ public $security_class = 'Smarty_Security';
+ /**
+ * implementation of security class
+ *
+ * @var Smarty_Security
+ */
+ public $security_policy = null;
+ /**
+ * controls handling of PHP-blocks
+ *
+ * @var integer
+ */
+ public $php_handling = self::PHP_PASSTHRU;
+ /**
+ * controls if the php template file resource is allowed
+ *
+ * @var bool
+ */
+ public $allow_php_templates = false;
+ /**
+ * Should compiled-templates be prevented from being called directly?
+ *
+ * {@internal
+ * Currently used by Smarty_Internal_Template only.
+ * }}
+ *
+ * @var boolean
+ */
+ public $direct_access_security = true;
+ /**#@-*/
+ /**
+ * debug mode
+ *
+ * Setting this to true enables the debug-console.
+ *
+ * @var boolean
+ */
+ public $debugging = false;
+ /**
+ * This determines if debugging is enable-able from the browser.
+ * <ul>
+ * <li>NONE => no debugging control allowed</li>
+ * <li>URL => enable debugging when SMARTY_DEBUG is found in the URL.</li>
+ * </ul>
+ * @var string
+ */
+ public $debugging_ctrl = 'NONE';
+ /**
+ * Name of debugging URL-param.
+ *
+ * Only used when $debugging_ctrl is set to 'URL'.
+ * The name of the URL-parameter that activates debugging.
+ *
+ * @var type
+ */
+ public $smarty_debug_id = 'SMARTY_DEBUG';
+ /**
+ * Path of debug template.
+ * @var string
+ */
+ public $debug_tpl = null;
+ /**
+ * When set, smarty uses this value as error_reporting-level.
+ * @var int
+ */
+ public $error_reporting = null;
+ /**
+ * Internal flag for getTags()
+ * @var boolean
+ */
+ public $get_used_tags = false;
+
+ /**#@+
+ * config var settings
+ */
+
+ /**
+ * Controls whether variables with the same name overwrite each other.
+ * @var boolean
+ */
+ public $config_overwrite = true;
+ /**
+ * Controls whether config values of on/true/yes and off/false/no get converted to boolean.
+ * @var boolean
+ */
+ public $config_booleanize = true;
+ /**
+ * Controls whether hidden config sections/vars are read from the file.
+ * @var boolean
+ */
+ public $config_read_hidden = false;
+
+ /**#@-*/
+
+ /**#@+
+ * resource locking
+ */
+
+ /**
+ * locking concurrent compiles
+ * @var boolean
+ */
+ public $compile_locking = true;
+ /**
+ * Controls whether cache resources should emply locking mechanism
+ * @var boolean
+ */
+ public $cache_locking = false;
+ /**
+ * seconds to wait for acquiring a lock before ignoring the write lock
+ * @var float
+ */
+ public $locking_timeout = 10;
+
+ /**#@-*/
+
+ /**
+ * global template functions
+ * @var array
+ */
+ public $template_functions = array();
+ /**
+ * resource type used if none given
+ *
+ * Must be an valid key of $registered_resources.
+ * @var string
+ */
+ public $default_resource_type = 'file';
+ /**
+ * caching type
+ *
+ * Must be an element of $cache_resource_types.
+ *
+ * @var string
+ */
+ public $caching_type = 'file';
+ /**
+ * internal config properties
+ * @var array
+ */
+ public $properties = array();
+ /**
+ * config type
+ * @var string
+ */
+ public $default_config_type = 'file';
+ /**
+ * cached template objects
+ * @var array
+ */
+ public $template_objects = array();
+ /**
+ * check If-Modified-Since headers
+ * @var boolean
+ */
+ public $cache_modified_check = false;
+ /**
+ * registered plugins
+ * @var array
+ */
+ public $registered_plugins = array();
+ /**
+ * plugin search order
+ * @var array
+ */
+ public $plugin_search_order = array('function', 'block', 'compiler', 'class');
+ /**
+ * registered objects
+ * @var array
+ */
+ public $registered_objects = array();
+ /**
+ * registered classes
+ * @var array
+ */
+ public $registered_classes = array();
+ /**
+ * registered filters
+ * @var array
+ */
+ public $registered_filters = array();
+ /**
+ * registered resources
+ * @var array
+ */
+ public $registered_resources = array();
+ /**
+ * resource handler cache
+ * @var array
+ */
+ public $_resource_handlers = array();
+ /**
+ * registered cache resources
+ * @var array
+ */
+ public $registered_cache_resources = array();
+ /**
+ * cache resource handler cache
+ * @var array
+ */
+ public $_cacheresource_handlers = array();
+ /**
+ * autoload filter
+ * @var array
+ */
+ public $autoload_filters = array();
+ /**
+ * default modifier
+ * @var array
+ */
+ public $default_modifiers = array();
+ /**
+ * autoescape variable output
+ * @var boolean
+ */
+ public $escape_html = false;
+ /**
+ * global internal smarty vars
+ * @var array
+ */
+ public static $_smarty_vars = array();
+ /**
+ * start time for execution time calculation
+ * @var int
+ */
+ public $start_time = 0;
+ /**
+ * default file permissions
+ * @var int
+ */
+ public $_file_perms = 0644;
+ /**
+ * default dir permissions
+ * @var int
+ */
+ public $_dir_perms = 0771;
+ /**
+ * block tag hierarchy
+ * @var array
+ */
+ public $_tag_stack = array();
+ /**
+ * self pointer to Smarty object
+ * @var Smarty
+ */
+ public $smarty;
+ /**
+ * required by the compiler for BC
+ * @var string
+ */
+ public $_current_file = null;
+ /**
+ * internal flag to enable parser debugging
+ * @var bool
+ */
+ public $_parserdebug = false;
+ /**
+ * Saved parameter of merged templates during compilation
+ *
+ * @var array
+ */
+ public $merged_templates_func = array();
+ /**#@-*/
+
+ /**
+ * Initialize new Smarty object
+ *
+ */
+ public function __construct()
+ {
+ // selfpointer needed by some other class methods
+ $this->smarty = $this;
+ if (is_callable('mb_internal_encoding')) {
+ mb_internal_encoding(Smarty::$_CHARSET);
+ }
+ $this->start_time = microtime(true);
+ // set default dirs
+ $this->setTemplateDir('.' . DS . 'templates' . DS)
+ ->setCompileDir('.' . DS . 'templates_c' . DS)
+ ->setPluginsDir(SMARTY_PLUGINS_DIR)
+ ->setCacheDir('.' . DS . 'cache' . DS)
+ ->setConfigDir('.' . DS . 'configs' . DS);
+
+ $this->debug_tpl = 'file:' . dirname(__FILE__) . '/debug.tpl';
+ if (isset($_SERVER['SCRIPT_NAME'])) {
+ $this->assignGlobal('SCRIPT_NAME', $_SERVER['SCRIPT_NAME']);
+ }
+ }
+
+
+ /**
+ * Class destructor
+ */
+ public function __destruct()
+ {
+ // intentionally left blank
+ }
+
+ /**
+ * <<magic>> set selfpointer on cloned object
+ */
+ public function __clone()
+ {
+ $this->smarty = $this;
+ }
+
+
+ /**
+ * <<magic>> Generic getter.
+ *
+ * Calls the appropriate getter function.
+ * Issues an E_USER_NOTICE if no valid getter is found.
+ *
+ * @param string $name property name
+ * @return mixed
+ */
+ public function __get($name)
+ {
+ $allowed = array(
+ 'template_dir' => 'getTemplateDir',
+ 'config_dir' => 'getConfigDir',
+ 'plugins_dir' => 'getPluginsDir',
+ 'compile_dir' => 'getCompileDir',
+ 'cache_dir' => 'getCacheDir',
+ );
+
+ if (isset($allowed[$name])) {
+ return $this->{$allowed[$name]}();
+ } else {
+ trigger_error('Undefined property: '. get_class($this) .'::$'. $name, E_USER_NOTICE);
+ }
+ }
+
+ /**
+ * <<magic>> Generic setter.
+ *
+ * Calls the appropriate setter function.
+ * Issues an E_USER_NOTICE if no valid setter is found.
+ *
+ * @param string $name property name
+ * @param mixed $value parameter passed to setter
+ */
+ public function __set($name, $value)
+ {
+ $allowed = array(
+ 'template_dir' => 'setTemplateDir',
+ 'config_dir' => 'setConfigDir',
+ 'plugins_dir' => 'setPluginsDir',
+ 'compile_dir' => 'setCompileDir',
+ 'cache_dir' => 'setCacheDir',
+ );
+
+ if (isset($allowed[$name])) {
+ $this->{$allowed[$name]}($value);
+ } else {
+ trigger_error('Undefined property: ' . get_class($this) . '::$' . $name, E_USER_NOTICE);
+ }
+ }
+
+ /**
+ * Check if a template resource exists
+ *
+ * @param string $resource_name template name
+ * @return boolean status
+ */
+ public function templateExists($resource_name)
+ {
+ // create template object
+ $save = $this->template_objects;
+ $tpl = new $this->template_class($resource_name, $this);
+ // check if it does exists
+ $result = $tpl->source->exists;
+ $this->template_objects = $save;
+ return $result;
+ }
+
+ /**
+ * Returns a single or all global variables
+ *
+ * @param object $smarty
+ * @param string $varname variable name or null
+ * @return string variable value or or array of variables
+ */
+ public function getGlobal($varname = null)
+ {
+ if (isset($varname)) {
+ if (isset(self::$global_tpl_vars[$varname])) {
+ return self::$global_tpl_vars[$varname]->value;
+ } else {
+ return '';
+ }
+ } else {
+ $_result = array();
+ foreach (self::$global_tpl_vars AS $key => $var) {
+ $_result[$key] = $var->value;
+ }
+ return $_result;
+ }
+ }
+
+ /**
+ * Empty cache folder
+ *
+ * @param integer $exp_time expiration time
+ * @param string $type resource type
+ * @return integer number of cache files deleted
+ */
+ function clearAllCache($exp_time = null, $type = null)
+ {
+ // load cache resource and call clearAll
+ $_cache_resource = Smarty_CacheResource::load($this, $type);
+ Smarty_CacheResource::invalidLoadedCache($this);
+ return $_cache_resource->clearAll($this, $exp_time);
+ }
+
+ /**
+ * Empty cache for a specific template
+ *
+ * @param string $template_name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param integer $exp_time expiration time
+ * @param string $type resource type
+ * @return integer number of cache files deleted
+ */
+ public function clearCache($template_name, $cache_id = null, $compile_id = null, $exp_time = null, $type = null)
+ {
+ // load cache resource and call clear
+ $_cache_resource = Smarty_CacheResource::load($this, $type);
+ Smarty_CacheResource::invalidLoadedCache($this);
+ return $_cache_resource->clear($this, $template_name, $cache_id, $compile_id, $exp_time);
+ }
+
+ /**
+ * Loads security class and enables security
+ *
+ * @param string|Smarty_Security $security_class if a string is used, it must be class-name
+ * @return Smarty current Smarty instance for chaining
+ * @throws SmartyException when an invalid class name is provided
+ */
+ public function enableSecurity($security_class = null)
+ {
+ if ($security_class instanceof Smarty_Security) {
+ $this->security_policy = $security_class;
+ return $this;
+ } elseif (is_object($security_class)) {
+ throw new SmartyException("Class '" . get_class($security_class) . "' must extend Smarty_Security.");
+ }
+ if ($security_class == null) {
+ $security_class = $this->security_class;
+ }
+ if (!class_exists($security_class)) {
+ throw new SmartyException("Security class '$security_class' is not defined");
+ } elseif ($security_class !== 'Smarty_Security' && !is_subclass_of($security_class, 'Smarty_Security')) {
+ throw new SmartyException("Class '$security_class' must extend Smarty_Security.");
+ } else {
+ $this->security_policy = new $security_class($this);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Disable security
+ * @return Smarty current Smarty instance for chaining
+ */
+ public function disableSecurity()
+ {
+ $this->security_policy = null;
+
+ return $this;
+ }
+
+ /**
+ * Set template directory
+ *
+ * @param string|array $template_dir directory(s) of template sources
+ * @return Smarty current Smarty instance for chaining
+ */
+ public function setTemplateDir($template_dir)
+ {
+ $this->template_dir = array();
+ foreach ((array) $template_dir as $k => $v) {
+ $this->template_dir[$k] = rtrim($v, '/\\') . DS;
+ }
+
+ $this->joined_template_dir = join(DIRECTORY_SEPARATOR, $this->template_dir);
+ return $this;
+ }
+
+ /**
+ * Add template directory(s)
+ *
+ * @param string|array $template_dir directory(s) of template sources
+ * @param string $key of the array element to assign the template dir to
+ * @return Smarty current Smarty instance for chaining
+ * @throws SmartyException when the given template directory is not valid
+ */
+ public function addTemplateDir($template_dir, $key=null)
+ {
+ // make sure we're dealing with an array
+ $this->template_dir = (array) $this->template_dir;
+
+ if (is_array($template_dir)) {
+ foreach ($template_dir as $k => $v) {
+ if (is_int($k)) {
+ // indexes are not merged but appended
+ $this->template_dir[] = rtrim($v, '/\\') . DS;
+ } else {
+ // string indexes are overridden
+ $this->template_dir[$k] = rtrim($v, '/\\') . DS;
+ }
+ }
+ } elseif ($key !== null) {
+ // override directory at specified index
+ $this->template_dir[$key] = rtrim($template_dir, '/\\') . DS;
+ } else {
+ // append new directory
+ $this->template_dir[] = rtrim($template_dir, '/\\') . DS;
+ }
+ $this->joined_template_dir = join(DIRECTORY_SEPARATOR, $this->template_dir);
+ return $this;
+ }
+
+ /**
+ * Get template directories
+ *
+ * @param mixed index of directory to get, null to get all
+ * @return array|string list of template directories, or directory of $index
+ */
+ public function getTemplateDir($index=null)
+ {
+ if ($index !== null) {
+ return isset($this->template_dir[$index]) ? $this->template_dir[$index] : null;
+ }
+
+ return (array)$this->template_dir;
+ }
+
+ /**
+ * Set config directory
+ *
+ * @param string|array $template_dir directory(s) of configuration sources
+ * @return Smarty current Smarty instance for chaining
+ */
+ public function setConfigDir($config_dir)
+ {
+ $this->config_dir = array();
+ foreach ((array) $config_dir as $k => $v) {
+ $this->config_dir[$k] = rtrim($v, '/\\') . DS;
+ }
+
+ $this->joined_config_dir = join(DIRECTORY_SEPARATOR, $this->config_dir);
+ return $this;
+ }
+
+ /**
+ * Add config directory(s)
+ *
+ * @param string|array $config_dir directory(s) of config sources
+ * @param string key of the array element to assign the config dir to
+ * @return Smarty current Smarty instance for chaining
+ */
+ public function addConfigDir($config_dir, $key=null)
+ {
+ // make sure we're dealing with an array
+ $this->config_dir = (array) $this->config_dir;
+
+ if (is_array($config_dir)) {
+ foreach ($config_dir as $k => $v) {
+ if (is_int($k)) {
+ // indexes are not merged but appended
+ $this->config_dir[] = rtrim($v, '/\\') . DS;
+ } else {
+ // string indexes are overridden
+ $this->config_dir[$k] = rtrim($v, '/\\') . DS;
+ }
+ }
+ } elseif( $key !== null ) {
+ // override directory at specified index
+ $this->config_dir[$key] = rtrim($config_dir, '/\\') . DS;
+ } else {
+ // append new directory
+ $this->config_dir[] = rtrim($config_dir, '/\\') . DS;
+ }
+
+ $this->joined_config_dir = join(DIRECTORY_SEPARATOR, $this->config_dir);
+ return $this;
+ }
+
+ /**
+ * Get config directory
+ *
+ * @param mixed index of directory to get, null to get all
+ * @return array|string configuration directory
+ */
+ public function getConfigDir($index=null)
+ {
+ if ($index !== null) {
+ return isset($this->config_dir[$index]) ? $this->config_dir[$index] : null;
+ }
+
+ return (array)$this->config_dir;
+ }
+
+ /**
+ * Set plugins directory
+ *
+ * @param string|array $plugins_dir directory(s) of plugins
+ * @return Smarty current Smarty instance for chaining
+ */
+ public function setPluginsDir($plugins_dir)
+ {
+ $this->plugins_dir = array();
+ foreach ((array)$plugins_dir as $k => $v) {
+ $this->plugins_dir[$k] = rtrim($v, '/\\') . DS;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Adds directory of plugin files
+ *
+ * @param object $smarty
+ * @param string $ |array $ plugins folder
+ * @return Smarty current Smarty instance for chaining
+ */
+ public function addPluginsDir($plugins_dir)
+ {
+ // make sure we're dealing with an array
+ $this->plugins_dir = (array) $this->plugins_dir;
+
+ if (is_array($plugins_dir)) {
+ foreach ($plugins_dir as $k => $v) {
+ if (is_int($k)) {
+ // indexes are not merged but appended
+ $this->plugins_dir[] = rtrim($v, '/\\') . DS;
+ } else {
+ // string indexes are overridden
+ $this->plugins_dir[$k] = rtrim($v, '/\\') . DS;
+ }
+ }
+ } else {
+ // append new directory
+ $this->plugins_dir[] = rtrim($plugins_dir, '/\\') . DS;
+ }
+
+ $this->plugins_dir = array_unique($this->plugins_dir);
+ return $this;
+ }
+
+ /**
+ * Get plugin directories
+ *
+ * @return array list of plugin directories
+ */
+ public function getPluginsDir()
+ {
+ return (array)$this->plugins_dir;
+ }
+
+ /**
+ * Set compile directory
+ *
+ * @param string $compile_dir directory to store compiled templates in
+ * @return Smarty current Smarty instance for chaining
+ */
+ public function setCompileDir($compile_dir)
+ {
+ $this->compile_dir = rtrim($compile_dir, '/\\') . DS;
+ if (!isset(Smarty::$_muted_directories[$this->compile_dir])) {
+ Smarty::$_muted_directories[$this->compile_dir] = null;
+ }
+ return $this;
+ }
+
+ /**
+ * Get compiled directory
+ *
+ * @return string path to compiled templates
+ */
+ public function getCompileDir()
+ {
+ return $this->compile_dir;
+ }
+
+ /**
+ * Set cache directory
+ *
+ * @param string $cache_dir directory to store cached templates in
+ * @return Smarty current Smarty instance for chaining
+ */
+ public function setCacheDir($cache_dir)
+ {
+ $this->cache_dir = rtrim($cache_dir, '/\\') . DS;
+ if (!isset(Smarty::$_muted_directories[$this->cache_dir])) {
+ Smarty::$_muted_directories[$this->cache_dir] = null;
+ }
+ return $this;
+ }
+
+ /**
+ * Get cache directory
+ *
+ * @return string path of cache directory
+ */
+ public function getCacheDir()
+ {
+ return $this->cache_dir;
+ }
+
+ /**
+ * Set default modifiers
+ *
+ * @param array|string $modifiers modifier or list of modifiers to set
+ * @return Smarty current Smarty instance for chaining
+ */
+ public function setDefaultModifiers($modifiers)
+ {
+ $this->default_modifiers = (array) $modifiers;
+ return $this;
+ }
+
+ /**
+ * Add default modifiers
+ *
+ * @param array|string $modifiers modifier or list of modifiers to add
+ * @return Smarty current Smarty instance for chaining
+ */
+ public function addDefaultModifiers($modifiers)
+ {
+ if (is_array($modifiers)) {
+ $this->default_modifiers = array_merge($this->default_modifiers, $modifiers);
+ } else {
+ $this->default_modifiers[] = $modifiers;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Get default modifiers
+ *
+ * @return array list of default modifiers
+ */
+ public function getDefaultModifiers()
+ {
+ return $this->default_modifiers;
+ }
+
+
+ /**
+ * Set autoload filters
+ *
+ * @param array $filters filters to load automatically
+ * @param string $type "pre", "output", … specify the filter type to set. Defaults to none treating $filters' keys as the appropriate types
+ * @return Smarty current Smarty instance for chaining
+ */
+ public function setAutoloadFilters($filters, $type=null)
+ {
+ if ($type !== null) {
+ $this->autoload_filters[$type] = (array) $filters;
+ } else {
+ $this->autoload_filters = (array) $filters;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Add autoload filters
+ *
+ * @param array $filters filters to load automatically
+ * @param string $type "pre", "output", … specify the filter type to set. Defaults to none treating $filters' keys as the appropriate types
+ * @return Smarty current Smarty instance for chaining
+ */
+ public function addAutoloadFilters($filters, $type=null)
+ {
+ if ($type !== null) {
+ if (!empty($this->autoload_filters[$type])) {
+ $this->autoload_filters[$type] = array_merge($this->autoload_filters[$type], (array) $filters);
+ } else {
+ $this->autoload_filters[$type] = (array) $filters;
+ }
+ } else {
+ foreach ((array) $filters as $key => $value) {
+ if (!empty($this->autoload_filters[$key])) {
+ $this->autoload_filters[$key] = array_merge($this->autoload_filters[$key], (array) $value);
+ } else {
+ $this->autoload_filters[$key] = (array) $value;
+ }
+ }
+ }
+
+ return $this;
+ }
+
+ /**
+ * Get autoload filters
+ *
+ * @param string $type type of filter to get autoloads for. Defaults to all autoload filters
+ * @return array array( 'type1' => array( 'filter1', 'filter2', … ) ) or array( 'filter1', 'filter2', …) if $type was specified
+ */
+ public function getAutoloadFilters($type=null)
+ {
+ if ($type !== null) {
+ return isset($this->autoload_filters[$type]) ? $this->autoload_filters[$type] : array();
+ }
+
+ return $this->autoload_filters;
+ }
+
+ /**
+ * return name of debugging template
+ *
+ * @return string
+ */
+ public function getDebugTemplate()
+ {
+ return $this->debug_tpl;
+ }
+
+ /**
+ * set the debug template
+ *
+ * @param string $tpl_name
+ * @return Smarty current Smarty instance for chaining
+ * @throws SmartyException if file is not readable
+ */
+ public function setDebugTemplate($tpl_name)
+ {
+ if (!is_readable($tpl_name)) {
+ throw new SmartyException("Unknown file '{$tpl_name}'");
+ }
+ $this->debug_tpl = $tpl_name;
+
+ return $this;
+ }
+
+ /**
+ * creates a template object
+ *
+ * @param string $template the resource handle of the template file
+ * @param mixed $cache_id cache id to be used with this template
+ * @param mixed $compile_id compile id to be used with this template
+ * @param object $parent next higher level of Smarty variables
+ * @param boolean $do_clone flag is Smarty object shall be cloned
+ * @return object template object
+ */
+ public function createTemplate($template, $cache_id = null, $compile_id = null, $parent = null, $do_clone = true)
+ {
+ if (!empty($cache_id) && (is_object($cache_id) || is_array($cache_id))) {
+ $parent = $cache_id;
+ $cache_id = null;
+ }
+ if (!empty($parent) && is_array($parent)) {
+ $data = $parent;
+ $parent = null;
+ } else {
+ $data = null;
+ }
+ // default to cache_id and compile_id of Smarty object
+ $cache_id = $cache_id === null ? $this->cache_id : $cache_id;
+ $compile_id = $compile_id === null ? $this->compile_id : $compile_id;
+ // already in template cache?
+ if ($this->allow_ambiguous_resources) {
+ $_templateId = Smarty_Resource::getUniqueTemplateName($this, $template) . $cache_id . $compile_id;
+ } else {
+ $_templateId = $this->joined_template_dir . '#' . $template . $cache_id . $compile_id;
+ }
+ if (isset($_templateId[150])) {
+ $_templateId = sha1($_templateId);
+ }
+ if ($do_clone) {
+ if (isset($this->template_objects[$_templateId])) {
+ // return cached template object
+ $tpl = clone $this->template_objects[$_templateId];
+ $tpl->smarty = clone $tpl->smarty;
+ $tpl->parent = $parent;
+ $tpl->tpl_vars = array();
+ $tpl->config_vars = array();
+ } else {
+ $tpl = new $this->template_class($template, clone $this, $parent, $cache_id, $compile_id);
+ }
+ } else {
+ if (isset($this->template_objects[$_templateId])) {
+ // return cached template object
+ $tpl = $this->template_objects[$_templateId];
+ $tpl->parent = $parent;
+ $tpl->tpl_vars = array();
+ $tpl->config_vars = array();
+ } else {
+ $tpl = new $this->template_class($template, $this, $parent, $cache_id, $compile_id);
+ }
+ }
+ // fill data if present
+ if (!empty($data) && is_array($data)) {
+ // set up variable values
+ foreach ($data as $_key => $_val) {
+ $tpl->tpl_vars[$_key] = new Smarty_variable($_val);
+ }
+ }
+ return $tpl;
+ }
+
+
+ /**
+ * Takes unknown classes and loads plugin files for them
+ * class name format: Smarty_PluginType_PluginName
+ * plugin filename format: plugintype.pluginname.php
+ *
+ * @param string $plugin_name class plugin name to load
+ * @param bool $check check if already loaded
+ * @return string |boolean filepath of loaded file or false
+ */
+ public function loadPlugin($plugin_name, $check = true)
+ {
+ // if function or class exists, exit silently (already loaded)
+ if ($check && (is_callable($plugin_name) || class_exists($plugin_name, false))) {
+ return true;
+ }
+ // Plugin name is expected to be: Smarty_[Type]_[Name]
+ $_name_parts = explode('_', $plugin_name, 3);
+ // class name must have three parts to be valid plugin
+ // count($_name_parts) < 3 === !isset($_name_parts[2])
+ if (!isset($_name_parts[2]) || strtolower($_name_parts[0]) !== 'smarty') {
+ throw new SmartyException("plugin {$plugin_name} is not a valid name format");
+ return false;
+ }
+ // if type is "internal", get plugin from sysplugins
+ if (strtolower($_name_parts[1]) == 'internal') {
+ $file = SMARTY_SYSPLUGINS_DIR . strtolower($plugin_name) . '.php';
+ if (file_exists($file)) {
+ require_once($file);
+ return $file;
+ } else {
+ return false;
+ }
+ }
+ // plugin filename is expected to be: [type].[name].php
+ $_plugin_filename = "{$_name_parts[1]}.{$_name_parts[2]}.php";
+
+ $_stream_resolve_include_path = function_exists('stream_resolve_include_path');
+
+ // loop through plugin dirs and find the plugin
+ foreach($this->getPluginsDir() as $_plugin_dir) {
+ $names = array(
+ $_plugin_dir . $_plugin_filename,
+ $_plugin_dir . strtolower($_plugin_filename),
+ );
+ foreach ($names as $file) {
+ if (file_exists($file)) {
+ require_once($file);
+ return $file;
+ }
+ if ($this->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_plugin_dir)) {
+ // try PHP include_path
+ if ($_stream_resolve_include_path) {
+ $file = stream_resolve_include_path($file);
+ } else {
+ $file = Smarty_Internal_Get_Include_Path::getIncludePath($file);
+ }
+
+ if ($file !== false) {
+ require_once($file);
+ return $file;
+ }
+ }
+ }
+ }
+ // no plugin loaded
+ return false;
+ }
+
+ /**
+ * Compile all template files
+ *
+ * @param string $extension file extension
+ * @param bool $force_compile force all to recompile
+ * @param int $time_limit
+ * @param int $max_errors
+ * @return integer number of template files recompiled
+ */
+ public function compileAllTemplates($extention = '.tpl', $force_compile = false, $time_limit = 0, $max_errors = null)
+ {
+ return Smarty_Internal_Utility::compileAllTemplates($extention, $force_compile, $time_limit, $max_errors, $this);
+ }
+
+ /**
+ * Compile all config files
+ *
+ * @param string $extension file extension
+ * @param bool $force_compile force all to recompile
+ * @param int $time_limit
+ * @param int $max_errors
+ * @return integer number of template files recompiled
+ */
+ public function compileAllConfig($extention = '.conf', $force_compile = false, $time_limit = 0, $max_errors = null)
+ {
+ return Smarty_Internal_Utility::compileAllConfig($extention, $force_compile, $time_limit, $max_errors, $this);
+ }
+
+ /**
+ * Delete compiled template file
+ *
+ * @param string $resource_name template name
+ * @param string $compile_id compile id
+ * @param integer $exp_time expiration time
+ * @return integer number of template files deleted
+ */
+ public function clearCompiledTemplate($resource_name = null, $compile_id = null, $exp_time = null)
+ {
+ return Smarty_Internal_Utility::clearCompiledTemplate($resource_name, $compile_id, $exp_time, $this);
+ }
+
+
+ /**
+ * Return array of tag/attributes of all tags used by an template
+ *
+ * @param object $templae template object
+ * @return array of tag/attributes
+ */
+ public function getTags(Smarty_Internal_Template $template)
+ {
+ return Smarty_Internal_Utility::getTags($template);
+ }
+
+ /**
+ * Run installation test
+ *
+ * @param array $errors Array to write errors into, rather than outputting them
+ * @return boolean true if setup is fine, false if something is wrong
+ */
+ public function testInstall(&$errors=null)
+ {
+ return Smarty_Internal_Utility::testInstall($this, $errors);
+ }
+
+ /**
+ * Error Handler to mute expected messages
+ *
+ * @link http://php.net/set_error_handler
+ * @param integer $errno Error level
+ * @return boolean
+ */
+ public static function mutingErrorHandler($errno, $errstr, $errfile, $errline, $errcontext)
+ {
+ $_is_muted_directory = false;
+
+ // add the SMARTY_DIR to the list of muted directories
+ if (!isset(Smarty::$_muted_directories[SMARTY_DIR])) {
+ $smarty_dir = realpath(SMARTY_DIR);
+ Smarty::$_muted_directories[SMARTY_DIR] = array(
+ 'file' => $smarty_dir,
+ 'length' => strlen($smarty_dir),
+ );
+ }
+
+ // walk the muted directories and test against $errfile
+ foreach (Smarty::$_muted_directories as $key => &$dir) {
+ if (!$dir) {
+ // resolve directory and length for speedy comparisons
+ $file = realpath($key);
+ $dir = array(
+ 'file' => $file,
+ 'length' => strlen($file),
+ );
+ }
+ if (!strncmp($errfile, $dir['file'], $dir['length'])) {
+ $_is_muted_directory = true;
+ break;
+ }
+ }
+
+ // pass to next error handler if this error did not occur inside SMARTY_DIR
+ // or the error was within smarty but masked to be ignored
+ if (!$_is_muted_directory || ($errno && $errno & error_reporting())) {
+ if (Smarty::$_previous_error_handler) {
+ return call_user_func(Smarty::$_previous_error_handler, $errno, $errstr, $errfile, $errline, $errcontext);
+ } else {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Enable error handler to mute expected messages
+ *
+ * @return void
+ */
+ public static function muteExpectedErrors()
+ {
+ /*
+ error muting is done because some people implemented custom error_handlers using
+ http://php.net/set_error_handler and for some reason did not understand the following paragraph:
+
+ It is important to remember that the standard PHP error handler is completely bypassed for the
+ error types specified by error_types unless the callback function returns FALSE.
+ error_reporting() settings will have no effect and your error handler will be called regardless -
+ however you are still able to read the current value of error_reporting and act appropriately.
+ Of particular note is that this value will be 0 if the statement that caused the error was
+ prepended by the @ error-control operator.
+
+ Smarty deliberately uses @filemtime() over file_exists() and filemtime() in some places. Reasons include
+ - @filemtime() is almost twice as fast as using an additional file_exists()
+ - between file_exists() and filemtime() a possible race condition is opened,
+ which does not exist using the simple @filemtime() approach.
+ */
+ $error_handler = array('Smarty', 'mutingErrorHandler');
+ $previous = set_error_handler($error_handler);
+
+ // avoid dead loops
+ if ($previous !== $error_handler) {
+ Smarty::$_previous_error_handler = $previous;
+ }
+ }
+
+ /**
+ * Disable error handler muting expected messages
+ *
+ * @return void
+ */
+ public static function unmuteExpectedErrors()
+ {
+ restore_error_handler();
+ }
+}
+
+// Check if we're running on windows
+Smarty::$_IS_WINDOWS = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN';
+
+// let PCRE (preg_*) treat strings as ISO-8859-1 if we're not dealing with UTF-8
+if (Smarty::$_CHARSET !== 'UTF-8') {
+ Smarty::$_UTF8_MODIFIER = '';
+}
+
+/**
+ * Smarty exception class
+ * @package Smarty
+ */
+class SmartyException extends Exception {
+}
+
+/**
+ * Smarty compiler exception class
+ * @package Smarty
+ */
+class SmartyCompilerException extends SmartyException {
+}
+
+/**
+ * Autoloader
+ */
+function smartyAutoload($class)
+{
+ $_class = strtolower($class);
+ $_classes = array(
+ 'smarty_config_source' => true,
+ 'smarty_config_compiled' => true,
+ 'smarty_security' => true,
+ 'smarty_cacheresource' => true,
+ 'smarty_cacheresource_custom' => true,
+ 'smarty_cacheresource_keyvaluestore' => true,
+ 'smarty_resource' => true,
+ 'smarty_resource_custom' => true,
+ 'smarty_resource_uncompiled' => true,
+ 'smarty_resource_recompiled' => true,
+ );
+
+ if (!strncmp($_class, 'smarty_internal_', 16) || isset($_classes[$_class])) {
+ include SMARTY_SYSPLUGINS_DIR . $_class . '.php';
+ }
+}
+
+?>
diff --git a/library/Smarty/libs/SmartyBC.class.php b/library/Smarty/libs/SmartyBC.class.php
new file mode 100644
index 000000000..f8f0a138f
--- /dev/null
+++ b/library/Smarty/libs/SmartyBC.class.php
@@ -0,0 +1,460 @@
+<?php
+/**
+ * Project: Smarty: the PHP compiling template engine
+ * File: SmartyBC.class.php
+ * SVN: $Id: $
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Smarty mailing list. Send a blank e-mail to
+ * smarty-discussion-subscribe@googlegroups.com
+ *
+ * @link http://www.smarty.net/
+ * @copyright 2008 New Digital Group, Inc.
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author Uwe Tews
+ * @author Rodney Rehm
+ * @package Smarty
+ */
+/**
+ * @ignore
+ */
+require(dirname(__FILE__) . '/Smarty.class.php');
+
+/**
+ * Smarty Backward Compatability Wrapper Class
+ *
+ * @package Smarty
+ */
+class SmartyBC extends Smarty {
+
+ /**
+ * Smarty 2 BC
+ * @var string
+ */
+ public $_version = self::SMARTY_VERSION;
+
+ /**
+ * Initialize new SmartyBC object
+ *
+ * @param array $options options to set during initialization, e.g. array( 'forceCompile' => false )
+ */
+ public function __construct(array $options=array())
+ {
+ parent::__construct($options);
+ // register {php} tag
+ $this->registerPlugin('block', 'php', 'smarty_php_tag');
+ }
+
+ /**
+ * wrapper for assign_by_ref
+ *
+ * @param string $tpl_var the template variable name
+ * @param mixed &$value the referenced value to assign
+ */
+ public function assign_by_ref($tpl_var, &$value)
+ {
+ $this->assignByRef($tpl_var, $value);
+ }
+
+ /**
+ * wrapper for append_by_ref
+ *
+ * @param string $tpl_var the template variable name
+ * @param mixed &$value the referenced value to append
+ * @param boolean $merge flag if array elements shall be merged
+ */
+ public function append_by_ref($tpl_var, &$value, $merge = false)
+ {
+ $this->appendByRef($tpl_var, $value, $merge);
+ }
+
+ /**
+ * clear the given assigned template variable.
+ *
+ * @param string $tpl_var the template variable to clear
+ */
+ public function clear_assign($tpl_var)
+ {
+ $this->clearAssign($tpl_var);
+ }
+
+ /**
+ * Registers custom function to be used in templates
+ *
+ * @param string $function the name of the template function
+ * @param string $function_impl the name of the PHP function to register
+ * @param bool $cacheable
+ * @param mixed $cache_attrs
+ */
+ public function register_function($function, $function_impl, $cacheable=true, $cache_attrs=null)
+ {
+ $this->registerPlugin('function', $function, $function_impl, $cacheable, $cache_attrs);
+ }
+
+ /**
+ * Unregisters custom function
+ *
+ * @param string $function name of template function
+ */
+ public function unregister_function($function)
+ {
+ $this->unregisterPlugin('function', $function);
+ }
+
+ /**
+ * Registers object to be used in templates
+ *
+ * @param string $object name of template object
+ * @param object $object_impl the referenced PHP object to register
+ * @param array $allowed list of allowed methods (empty = all)
+ * @param boolean $smarty_args smarty argument format, else traditional
+ * @param array $block_functs list of methods that are block format
+ */
+ public function register_object($object, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())
+ {
+ settype($allowed, 'array');
+ settype($smarty_args, 'boolean');
+ $this->registerObject($object, $object_impl, $allowed, $smarty_args, $block_methods);
+ }
+
+ /**
+ * Unregisters object
+ *
+ * @param string $object name of template object
+ */
+ public function unregister_object($object)
+ {
+ $this->unregisterObject($object);
+ }
+
+ /**
+ * Registers block function to be used in templates
+ *
+ * @param string $block name of template block
+ * @param string $block_impl PHP function to register
+ * @param bool $cacheable
+ * @param mixed $cache_attrs
+ */
+ public function register_block($block, $block_impl, $cacheable=true, $cache_attrs=null)
+ {
+ $this->registerPlugin('block', $block, $block_impl, $cacheable, $cache_attrs);
+ }
+
+ /**
+ * Unregisters block function
+ *
+ * @param string $block name of template function
+ */
+ public function unregister_block($block)
+ {
+ $this->unregisterPlugin('block', $block);
+ }
+
+ /**
+ * Registers compiler function
+ *
+ * @param string $function name of template function
+ * @param string $function_impl name of PHP function to register
+ * @param bool $cacheable
+ */
+ public function register_compiler_function($function, $function_impl, $cacheable=true)
+ {
+ $this->registerPlugin('compiler', $function, $function_impl, $cacheable);
+ }
+
+ /**
+ * Unregisters compiler function
+ *
+ * @param string $function name of template function
+ */
+ public function unregister_compiler_function($function)
+ {
+ $this->unregisterPlugin('compiler', $function);
+ }
+
+ /**
+ * Registers modifier to be used in templates
+ *
+ * @param string $modifier name of template modifier
+ * @param string $modifier_impl name of PHP function to register
+ */
+ public function register_modifier($modifier, $modifier_impl)
+ {
+ $this->registerPlugin('modifier', $modifier, $modifier_impl);
+ }
+
+ /**
+ * Unregisters modifier
+ *
+ * @param string $modifier name of template modifier
+ */
+ public function unregister_modifier($modifier)
+ {
+ $this->unregisterPlugin('modifier', $modifier);
+ }
+
+ /**
+ * Registers a resource to fetch a template
+ *
+ * @param string $type name of resource
+ * @param array $functions array of functions to handle resource
+ */
+ public function register_resource($type, $functions)
+ {
+ $this->registerResource($type, $functions);
+ }
+
+ /**
+ * Unregisters a resource
+ *
+ * @param string $type name of resource
+ */
+ public function unregister_resource($type)
+ {
+ $this->unregisterResource($type);
+ }
+
+ /**
+ * Registers a prefilter function to apply
+ * to a template before compiling
+ *
+ * @param callable $function
+ */
+ public function register_prefilter($function)
+ {
+ $this->registerFilter('pre', $function);
+ }
+
+ /**
+ * Unregisters a prefilter function
+ *
+ * @param callable $function
+ */
+ public function unregister_prefilter($function)
+ {
+ $this->unregisterFilter('pre', $function);
+ }
+
+ /**
+ * Registers a postfilter function to apply
+ * to a compiled template after compilation
+ *
+ * @param callable $function
+ */
+ public function register_postfilter($function)
+ {
+ $this->registerFilter('post', $function);
+ }
+
+ /**
+ * Unregisters a postfilter function
+ *
+ * @param callable $function
+ */
+ public function unregister_postfilter($function)
+ {
+ $this->unregisterFilter('post', $function);
+ }
+
+ /**
+ * Registers an output filter function to apply
+ * to a template output
+ *
+ * @param callable $function
+ */
+ public function register_outputfilter($function)
+ {
+ $this->registerFilter('output', $function);
+ }
+
+ /**
+ * Unregisters an outputfilter function
+ *
+ * @param callable $function
+ */
+ public function unregister_outputfilter($function)
+ {
+ $this->unregisterFilter('output', $function);
+ }
+
+ /**
+ * load a filter of specified type and name
+ *
+ * @param string $type filter type
+ * @param string $name filter name
+ */
+ public function load_filter($type, $name)
+ {
+ $this->loadFilter($type, $name);
+ }
+
+ /**
+ * clear cached content for the given template and cache id
+ *
+ * @param string $tpl_file name of template file
+ * @param string $cache_id name of cache_id
+ * @param string $compile_id name of compile_id
+ * @param string $exp_time expiration time
+ * @return boolean
+ */
+ public function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null)
+ {
+ return $this->clearCache($tpl_file, $cache_id, $compile_id, $exp_time);
+ }
+
+ /**
+ * clear the entire contents of cache (all templates)
+ *
+ * @param string $exp_time expire time
+ * @return boolean
+ */
+ public function clear_all_cache($exp_time = null)
+ {
+ return $this->clearCache(null, null, null, $exp_time);
+ }
+
+ /**
+ * test to see if valid cache exists for this template
+ *
+ * @param string $tpl_file name of template file
+ * @param string $cache_id
+ * @param string $compile_id
+ * @return boolean
+ */
+ public function is_cached($tpl_file, $cache_id = null, $compile_id = null)
+ {
+ return $this->isCached($tpl_file, $cache_id, $compile_id);
+ }
+
+ /**
+ * clear all the assigned template variables.
+ */
+ public function clear_all_assign()
+ {
+ $this->clearAllAssign();
+ }
+
+ /**
+ * clears compiled version of specified template resource,
+ * or all compiled template files if one is not specified.
+ * This function is for advanced use only, not normally needed.
+ *
+ * @param string $tpl_file
+ * @param string $compile_id
+ * @param string $exp_time
+ * @return boolean results of {@link smarty_core_rm_auto()}
+ */
+ public function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null)
+ {
+ return $this->clearCompiledTemplate($tpl_file, $compile_id, $exp_time);
+ }
+
+ /**
+ * Checks whether requested template exists.
+ *
+ * @param string $tpl_file
+ * @return boolean
+ */
+ public function template_exists($tpl_file)
+ {
+ return $this->templateExists($tpl_file);
+ }
+
+ /**
+ * Returns an array containing template variables
+ *
+ * @param string $name
+ * @return array
+ */
+ public function get_template_vars($name=null)
+ {
+ return $this->getTemplateVars($name);
+ }
+
+ /**
+ * Returns an array containing config variables
+ *
+ * @param string $name
+ * @return array
+ */
+ public function get_config_vars($name=null)
+ {
+ return $this->getConfigVars($name);
+ }
+
+ /**
+ * load configuration values
+ *
+ * @param string $file
+ * @param string $section
+ * @param string $scope
+ */
+ public function config_load($file, $section = null, $scope = 'global')
+ {
+ $this->ConfigLoad($file, $section, $scope);
+ }
+
+ /**
+ * return a reference to a registered object
+ *
+ * @param string $name
+ * @return object
+ */
+ public function get_registered_object($name)
+ {
+ return $this->getRegisteredObject($name);
+ }
+
+ /**
+ * clear configuration values
+ *
+ * @param string $var
+ */
+ public function clear_config($var = null)
+ {
+ $this->clearConfig($var);
+ }
+
+ /**
+ * trigger Smarty error
+ *
+ * @param string $error_msg
+ * @param integer $error_type
+ */
+ public function trigger_error($error_msg, $error_type = E_USER_WARNING)
+ {
+ trigger_error("Smarty error: $error_msg", $error_type);
+ }
+
+}
+
+/**
+ * Smarty {php}{/php} block function
+ *
+ * @param array $params parameter list
+ * @param string $content contents of the block
+ * @param object $template template object
+ * @param boolean &$repeat repeat flag
+ * @return string content re-formatted
+ */
+function smarty_php_tag($params, $content, $template, &$repeat)
+{
+ eval($content);
+ return '';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/debug.tpl b/library/Smarty/libs/debug.tpl
new file mode 100644
index 000000000..12eef0ffd
--- /dev/null
+++ b/library/Smarty/libs/debug.tpl
@@ -0,0 +1,133 @@
+{capture name='_smarty_debug' assign=debug_output}
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+ <title>Smarty Debug Console</title>
+<style type="text/css">
+{literal}
+body, h1, h2, td, th, p {
+ font-family: sans-serif;
+ font-weight: normal;
+ font-size: 0.9em;
+ margin: 1px;
+ padding: 0;
+}
+
+h1 {
+ margin: 0;
+ text-align: left;
+ padding: 2px;
+ background-color: #f0c040;
+ color: black;
+ font-weight: bold;
+ font-size: 1.2em;
+ }
+
+h2 {
+ background-color: #9B410E;
+ color: white;
+ text-align: left;
+ font-weight: bold;
+ padding: 2px;
+ border-top: 1px solid black;
+}
+
+body {
+ background: black;
+}
+
+p, table, div {
+ background: #f0ead8;
+}
+
+p {
+ margin: 0;
+ font-style: italic;
+ text-align: center;
+}
+
+table {
+ width: 100%;
+}
+
+th, td {
+ font-family: monospace;
+ vertical-align: top;
+ text-align: left;
+ width: 50%;
+}
+
+td {
+ color: green;
+}
+
+.odd {
+ background-color: #eeeeee;
+}
+
+.even {
+ background-color: #fafafa;
+}
+
+.exectime {
+ font-size: 0.8em;
+ font-style: italic;
+}
+
+#table_assigned_vars th {
+ color: blue;
+}
+
+#table_config_vars th {
+ color: maroon;
+}
+{/literal}
+</style>
+</head>
+<body>
+
+<h1>Smarty Debug Console - {if isset($template_name)}{$template_name|debug_print_var nofilter}{else}Total Time {$execution_time|string_format:"%.5f"}{/if}</h1>
+
+{if !empty($template_data)}
+<h2>included templates &amp; config files (load time in seconds)</h2>
+
+<div>
+{foreach $template_data as $template}
+ <font color=brown>{$template.name}</font>
+ <span class="exectime">
+ (compile {$template['compile_time']|string_format:"%.5f"}) (render {$template['render_time']|string_format:"%.5f"}) (cache {$template['cache_time']|string_format:"%.5f"})
+ </span>
+ <br>
+{/foreach}
+</div>
+{/if}
+
+<h2>assigned template variables</h2>
+
+<table id="table_assigned_vars">
+ {foreach $assigned_vars as $vars}
+ <tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
+ <th>${$vars@key|escape:'html'}</th>
+ <td>{$vars|debug_print_var nofilter}</td></tr>
+ {/foreach}
+</table>
+
+<h2>assigned config file variables (outer template scope)</h2>
+
+<table id="table_config_vars">
+ {foreach $config_vars as $vars}
+ <tr class="{if $vars@iteration % 2 eq 0}odd{else}even{/if}">
+ <th>{$vars@key|escape:'html'}</th>
+ <td>{$vars|debug_print_var nofilter}</td></tr>
+ {/foreach}
+
+</table>
+</body>
+</html>
+{/capture}
+<script type="text/javascript">
+{$id = $template_name|default:''|md5}
+ _smarty_console = window.open("","console{$id}","width=680,height=600,resizable,scrollbars=yes");
+ _smarty_console.document.write("{$debug_output|escape:'javascript' nofilter}");
+ _smarty_console.document.close();
+</script>
diff --git a/library/Smarty/libs/plugins/block.textformat.php b/library/Smarty/libs/plugins/block.textformat.php
new file mode 100644
index 000000000..b22b104a5
--- /dev/null
+++ b/library/Smarty/libs/plugins/block.textformat.php
@@ -0,0 +1,113 @@
+<?php
+/**
+ * Smarty plugin to format text blocks
+ *
+ * @package Smarty
+ * @subpackage PluginsBlock
+ */
+
+/**
+ * Smarty {textformat}{/textformat} block plugin
+ *
+ * Type: block function<br>
+ * Name: textformat<br>
+ * Purpose: format text a certain way with preset styles
+ * or custom wrap/indent settings<br>
+ * Params:
+ * <pre>
+ * - style - string (email)
+ * - indent - integer (0)
+ * - wrap - integer (80)
+ * - wrap_char - string ("\n")
+ * - indent_char - string (" ")
+ * - wrap_boundary - boolean (true)
+ * </pre>
+ *
+ * @link http://www.smarty.net/manual/en/language.function.textformat.php {textformat}
+ * (Smarty online manual)
+ * @param array $params parameters
+ * @param string $content contents of the block
+ * @param Smarty_Internal_Template $template template object
+ * @param boolean &$repeat repeat flag
+ * @return string content re-formatted
+ * @author Monte Ohrt <monte at ohrt dot com>
+ */
+function smarty_block_textformat($params, $content, $template, &$repeat)
+{
+ if (is_null($content)) {
+ return;
+ }
+
+ $style = null;
+ $indent = 0;
+ $indent_first = 0;
+ $indent_char = ' ';
+ $wrap = 80;
+ $wrap_char = "\n";
+ $wrap_cut = false;
+ $assign = null;
+
+ foreach ($params as $_key => $_val) {
+ switch ($_key) {
+ case 'style':
+ case 'indent_char':
+ case 'wrap_char':
+ case 'assign':
+ $$_key = (string)$_val;
+ break;
+
+ case 'indent':
+ case 'indent_first':
+ case 'wrap':
+ $$_key = (int)$_val;
+ break;
+
+ case 'wrap_cut':
+ $$_key = (bool)$_val;
+ break;
+
+ default:
+ trigger_error("textformat: unknown attribute '$_key'");
+ }
+ }
+
+ if ($style == 'email') {
+ $wrap = 72;
+ }
+ // split into paragraphs
+ $_paragraphs = preg_split('![\r\n]{2}!', $content);
+ $_output = '';
+
+
+ foreach ($_paragraphs as &$_paragraph) {
+ if (!$_paragraph) {
+ continue;
+ }
+ // convert mult. spaces & special chars to single space
+ $_paragraph = preg_replace(array('!\s+!' . Smarty::$_UTF8_MODIFIER, '!(^\s+)|(\s+$)!' . Smarty::$_UTF8_MODIFIER), array(' ', ''), $_paragraph);
+ // indent first line
+ if ($indent_first > 0) {
+ $_paragraph = str_repeat($indent_char, $indent_first) . $_paragraph;
+ }
+ // wordwrap sentences
+ if (Smarty::$_MBSTRING) {
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_wordwrap.php');
+ $_paragraph = smarty_mb_wordwrap($_paragraph, $wrap - $indent, $wrap_char, $wrap_cut);
+ } else {
+ $_paragraph = wordwrap($_paragraph, $wrap - $indent, $wrap_char, $wrap_cut);
+ }
+ // indent lines
+ if ($indent > 0) {
+ $_paragraph = preg_replace('!^!m', str_repeat($indent_char, $indent), $_paragraph);
+ }
+ }
+ $_output = implode($wrap_char . $wrap_char, $_paragraphs);
+
+ if ($assign) {
+ $template->assign($assign, $_output);
+ } else {
+ return $_output;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/function.counter.php b/library/Smarty/libs/plugins/function.counter.php
new file mode 100644
index 000000000..3906badf0
--- /dev/null
+++ b/library/Smarty/libs/plugins/function.counter.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {counter} function plugin
+ *
+ * Type: function<br>
+ * Name: counter<br>
+ * Purpose: print out a counter value
+ *
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @link http://www.smarty.net/manual/en/language.function.counter.php {counter}
+ * (Smarty online manual)
+ * @param array $params parameters
+ * @param Smarty_Internal_Template $template template object
+ * @return string|null
+ */
+function smarty_function_counter($params, $template)
+{
+ static $counters = array();
+
+ $name = (isset($params['name'])) ? $params['name'] : 'default';
+ if (!isset($counters[$name])) {
+ $counters[$name] = array(
+ 'start'=>1,
+ 'skip'=>1,
+ 'direction'=>'up',
+ 'count'=>1
+ );
+ }
+ $counter =& $counters[$name];
+
+ if (isset($params['start'])) {
+ $counter['start'] = $counter['count'] = (int)$params['start'];
+ }
+
+ if (!empty($params['assign'])) {
+ $counter['assign'] = $params['assign'];
+ }
+
+ if (isset($counter['assign'])) {
+ $template->assign($counter['assign'], $counter['count']);
+ }
+
+ if (isset($params['print'])) {
+ $print = (bool)$params['print'];
+ } else {
+ $print = empty($counter['assign']);
+ }
+
+ if ($print) {
+ $retval = $counter['count'];
+ } else {
+ $retval = null;
+ }
+
+ if (isset($params['skip'])) {
+ $counter['skip'] = $params['skip'];
+ }
+
+ if (isset($params['direction'])) {
+ $counter['direction'] = $params['direction'];
+ }
+
+ if ($counter['direction'] == "down")
+ $counter['count'] -= $counter['skip'];
+ else
+ $counter['count'] += $counter['skip'];
+
+ return $retval;
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/function.cycle.php b/library/Smarty/libs/plugins/function.cycle.php
new file mode 100644
index 000000000..1778ffb53
--- /dev/null
+++ b/library/Smarty/libs/plugins/function.cycle.php
@@ -0,0 +1,106 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {cycle} function plugin
+ *
+ * Type: function<br>
+ * Name: cycle<br>
+ * Date: May 3, 2002<br>
+ * Purpose: cycle through given values<br>
+ * Params:
+ * <pre>
+ * - name - name of cycle (optional)
+ * - values - comma separated list of values to cycle, or an array of values to cycle
+ * (this can be left out for subsequent calls)
+ * - reset - boolean - resets given var to true
+ * - print - boolean - print var or not. default is true
+ * - advance - boolean - whether or not to advance the cycle
+ * - delimiter - the value delimiter, default is ","
+ * - assign - boolean, assigns to template var instead of printed.
+ * </pre>
+ * Examples:<br>
+ * <pre>
+ * {cycle values="#eeeeee,#d0d0d0d"}
+ * {cycle name=row values="one,two,three" reset=true}
+ * {cycle name=row}
+ * </pre>
+ *
+ * @link http://www.smarty.net/manual/en/language.function.cycle.php {cycle}
+ * (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author credit to Mark Priatel <mpriatel@rogers.com>
+ * @author credit to Gerard <gerard@interfold.com>
+ * @author credit to Jason Sweat <jsweat_php@yahoo.com>
+ * @version 1.3
+ * @param array $params parameters
+ * @param Smarty_Internal_Template $template template object
+ * @return string|null
+ */
+
+function smarty_function_cycle($params, $template)
+{
+ static $cycle_vars;
+
+ $name = (empty($params['name'])) ? 'default' : $params['name'];
+ $print = (isset($params['print'])) ? (bool)$params['print'] : true;
+ $advance = (isset($params['advance'])) ? (bool)$params['advance'] : true;
+ $reset = (isset($params['reset'])) ? (bool)$params['reset'] : false;
+
+ if (!isset($params['values'])) {
+ if(!isset($cycle_vars[$name]['values'])) {
+ trigger_error("cycle: missing 'values' parameter");
+ return;
+ }
+ } else {
+ if(isset($cycle_vars[$name]['values'])
+ && $cycle_vars[$name]['values'] != $params['values'] ) {
+ $cycle_vars[$name]['index'] = 0;
+ }
+ $cycle_vars[$name]['values'] = $params['values'];
+ }
+
+ if (isset($params['delimiter'])) {
+ $cycle_vars[$name]['delimiter'] = $params['delimiter'];
+ } elseif (!isset($cycle_vars[$name]['delimiter'])) {
+ $cycle_vars[$name]['delimiter'] = ',';
+ }
+
+ if(is_array($cycle_vars[$name]['values'])) {
+ $cycle_array = $cycle_vars[$name]['values'];
+ } else {
+ $cycle_array = explode($cycle_vars[$name]['delimiter'],$cycle_vars[$name]['values']);
+ }
+
+ if(!isset($cycle_vars[$name]['index']) || $reset ) {
+ $cycle_vars[$name]['index'] = 0;
+ }
+
+ if (isset($params['assign'])) {
+ $print = false;
+ $template->assign($params['assign'], $cycle_array[$cycle_vars[$name]['index']]);
+ }
+
+ if($print) {
+ $retval = $cycle_array[$cycle_vars[$name]['index']];
+ } else {
+ $retval = null;
+ }
+
+ if($advance) {
+ if ( $cycle_vars[$name]['index'] >= count($cycle_array) -1 ) {
+ $cycle_vars[$name]['index'] = 0;
+ } else {
+ $cycle_vars[$name]['index']++;
+ }
+ }
+
+ return $retval;
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/function.fetch.php b/library/Smarty/libs/plugins/function.fetch.php
new file mode 100644
index 000000000..eca1182d5
--- /dev/null
+++ b/library/Smarty/libs/plugins/function.fetch.php
@@ -0,0 +1,214 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {fetch} plugin
+ *
+ * Type: function<br>
+ * Name: fetch<br>
+ * Purpose: fetch file, web or ftp data and display results
+ *
+ * @link http://www.smarty.net/manual/en/language.function.fetch.php {fetch}
+ * (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param array $params parameters
+ * @param Smarty_Internal_Template $template template object
+ * @return string|null if the assign parameter is passed, Smarty assigns the result to a template variable
+ */
+function smarty_function_fetch($params, $template)
+{
+ if (empty($params['file'])) {
+ trigger_error("[plugin] fetch parameter 'file' cannot be empty",E_USER_NOTICE);
+ return;
+ }
+
+ // strip file protocol
+ if (stripos($params['file'], 'file://') === 0) {
+ $params['file'] = substr($params['file'], 7);
+ }
+
+ $protocol = strpos($params['file'], '://');
+ if ($protocol !== false) {
+ $protocol = strtolower(substr($params['file'], 0, $protocol));
+ }
+
+ if (isset($template->smarty->security_policy)) {
+ if ($protocol) {
+ // remote resource (or php stream, …)
+ if(!$template->smarty->security_policy->isTrustedUri($params['file'])) {
+ return;
+ }
+ } else {
+ // local file
+ if(!$template->smarty->security_policy->isTrustedResourceDir($params['file'])) {
+ return;
+ }
+ }
+ }
+
+ $content = '';
+ if ($protocol == 'http') {
+ // http fetch
+ if($uri_parts = parse_url($params['file'])) {
+ // set defaults
+ $host = $server_name = $uri_parts['host'];
+ $timeout = 30;
+ $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
+ $agent = "Smarty Template Engine ". Smarty::SMARTY_VERSION;
+ $referer = "";
+ $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/';
+ $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : '';
+ $_is_proxy = false;
+ if(empty($uri_parts['port'])) {
+ $port = 80;
+ } else {
+ $port = $uri_parts['port'];
+ }
+ if(!empty($uri_parts['user'])) {
+ $user = $uri_parts['user'];
+ }
+ if(!empty($uri_parts['pass'])) {
+ $pass = $uri_parts['pass'];
+ }
+ // loop through parameters, setup headers
+ foreach($params as $param_key => $param_value) {
+ switch($param_key) {
+ case "file":
+ case "assign":
+ case "assign_headers":
+ break;
+ case "user":
+ if(!empty($param_value)) {
+ $user = $param_value;
+ }
+ break;
+ case "pass":
+ if(!empty($param_value)) {
+ $pass = $param_value;
+ }
+ break;
+ case "accept":
+ if(!empty($param_value)) {
+ $accept = $param_value;
+ }
+ break;
+ case "header":
+ if(!empty($param_value)) {
+ if(!preg_match('![\w\d-]+: .+!',$param_value)) {
+ trigger_error("[plugin] invalid header format '".$param_value."'",E_USER_NOTICE);
+ return;
+ } else {
+ $extra_headers[] = $param_value;
+ }
+ }
+ break;
+ case "proxy_host":
+ if(!empty($param_value)) {
+ $proxy_host = $param_value;
+ }
+ break;
+ case "proxy_port":
+ if(!preg_match('!\D!', $param_value)) {
+ $proxy_port = (int) $param_value;
+ } else {
+ trigger_error("[plugin] invalid value for attribute '".$param_key."'",E_USER_NOTICE);
+ return;
+ }
+ break;
+ case "agent":
+ if(!empty($param_value)) {
+ $agent = $param_value;
+ }
+ break;
+ case "referer":
+ if(!empty($param_value)) {
+ $referer = $param_value;
+ }
+ break;
+ case "timeout":
+ if(!preg_match('!\D!', $param_value)) {
+ $timeout = (int) $param_value;
+ } else {
+ trigger_error("[plugin] invalid value for attribute '".$param_key."'",E_USER_NOTICE);
+ return;
+ }
+ break;
+ default:
+ trigger_error("[plugin] unrecognized attribute '".$param_key."'",E_USER_NOTICE);
+ return;
+ }
+ }
+ if(!empty($proxy_host) && !empty($proxy_port)) {
+ $_is_proxy = true;
+ $fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout);
+ } else {
+ $fp = fsockopen($server_name,$port,$errno,$errstr,$timeout);
+ }
+
+ if(!$fp) {
+ trigger_error("[plugin] unable to fetch: $errstr ($errno)",E_USER_NOTICE);
+ return;
+ } else {
+ if($_is_proxy) {
+ fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n");
+ } else {
+ fputs($fp, "GET $uri HTTP/1.0\r\n");
+ }
+ if(!empty($host)) {
+ fputs($fp, "Host: $host\r\n");
+ }
+ if(!empty($accept)) {
+ fputs($fp, "Accept: $accept\r\n");
+ }
+ if(!empty($agent)) {
+ fputs($fp, "User-Agent: $agent\r\n");
+ }
+ if(!empty($referer)) {
+ fputs($fp, "Referer: $referer\r\n");
+ }
+ if(isset($extra_headers) && is_array($extra_headers)) {
+ foreach($extra_headers as $curr_header) {
+ fputs($fp, $curr_header."\r\n");
+ }
+ }
+ if(!empty($user) && !empty($pass)) {
+ fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n");
+ }
+
+ fputs($fp, "\r\n");
+ while(!feof($fp)) {
+ $content .= fgets($fp,4096);
+ }
+ fclose($fp);
+ $csplit = preg_split("!\r\n\r\n!",$content,2);
+
+ $content = $csplit[1];
+
+ if(!empty($params['assign_headers'])) {
+ $template->assign($params['assign_headers'],preg_split("!\r\n!",$csplit[0]));
+ }
+ }
+ } else {
+ trigger_error("[plugin fetch] unable to parse URL, check syntax",E_USER_NOTICE);
+ return;
+ }
+ } else {
+ $content = @file_get_contents($params['file']);
+ if ($content === false) {
+ throw new SmartyException("{fetch} cannot read resource '" . $params['file'] ."'");
+ }
+ }
+
+ if (!empty($params['assign'])) {
+ $template->assign($params['assign'], $content);
+ } else {
+ return $content;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/function.html_checkboxes.php b/library/Smarty/libs/plugins/function.html_checkboxes.php
new file mode 100644
index 000000000..fb9584bbd
--- /dev/null
+++ b/library/Smarty/libs/plugins/function.html_checkboxes.php
@@ -0,0 +1,216 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {html_checkboxes} function plugin
+ *
+ * File: function.html_checkboxes.php<br>
+ * Type: function<br>
+ * Name: html_checkboxes<br>
+ * Date: 24.Feb.2003<br>
+ * Purpose: Prints out a list of checkbox input types<br>
+ * Examples:
+ * <pre>
+ * {html_checkboxes values=$ids output=$names}
+ * {html_checkboxes values=$ids name='box' separator='<br>' output=$names}
+ * {html_checkboxes values=$ids checked=$checked separator='<br>' output=$names}
+ * </pre>
+ * Params:
+ * <pre>
+ * - name (optional) - string default "checkbox"
+ * - values (required) - array
+ * - options (optional) - associative array
+ * - checked (optional) - array default not set
+ * - separator (optional) - ie <br> or &nbsp;
+ * - output (optional) - the output next to each checkbox
+ * - assign (optional) - assign the output as an array to this variable
+ * - escape (optional) - escape the content (not value), defaults to true
+ * </pre>
+ *
+ * @link http://www.smarty.net/manual/en/language.function.html.checkboxes.php {html_checkboxes}
+ * (Smarty online manual)
+ * @author Christopher Kvarme <christopher.kvarme@flashjab.com>
+ * @author credits to Monte Ohrt <monte at ohrt dot com>
+ * @version 1.0
+ * @param array $params parameters
+ * @param object $template template object
+ * @return string
+ * @uses smarty_function_escape_special_chars()
+ */
+function smarty_function_html_checkboxes($params, $template)
+{
+ require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
+
+ $name = 'checkbox';
+ $values = null;
+ $options = null;
+ $selected = array();
+ $separator = '';
+ $escape = true;
+ $labels = true;
+ $label_ids = false;
+ $output = null;
+
+ $extra = '';
+
+ foreach($params as $_key => $_val) {
+ switch($_key) {
+ case 'name':
+ case 'separator':
+ $$_key = (string) $_val;
+ break;
+
+ case 'escape':
+ case 'labels':
+ case 'label_ids':
+ $$_key = (bool) $_val;
+ break;
+
+ case 'options':
+ $$_key = (array) $_val;
+ break;
+
+ case 'values':
+ case 'output':
+ $$_key = array_values((array) $_val);
+ break;
+
+ case 'checked':
+ case 'selected':
+ if (is_array($_val)) {
+ $selected = array();
+ foreach ($_val as $_sel) {
+ if (is_object($_sel)) {
+ if (method_exists($_sel, "__toString")) {
+ $_sel = smarty_function_escape_special_chars((string) $_sel->__toString());
+ } else {
+ trigger_error("html_checkboxes: selected attribute contains an object of class '". get_class($_sel) ."' without __toString() method", E_USER_NOTICE);
+ continue;
+ }
+ } else {
+ $_sel = smarty_function_escape_special_chars((string) $_sel);
+ }
+ $selected[$_sel] = true;
+ }
+ } elseif (is_object($_val)) {
+ if (method_exists($_val, "__toString")) {
+ $selected = smarty_function_escape_special_chars((string) $_val->__toString());
+ } else {
+ trigger_error("html_checkboxes: selected attribute is an object of class '". get_class($_val) ."' without __toString() method", E_USER_NOTICE);
+ }
+ } else {
+ $selected = smarty_function_escape_special_chars((string) $_val);
+ }
+ break;
+
+ case 'checkboxes':
+ trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING);
+ $options = (array) $_val;
+ break;
+
+ case 'assign':
+ break;
+
+ default:
+ if(!is_array($_val)) {
+ $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
+ } else {
+ trigger_error("html_checkboxes: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ if (!isset($options) && !isset($values))
+ return ''; /* raise error here? */
+
+ $_html_result = array();
+
+ if (isset($options)) {
+ foreach ($options as $_key=>$_val) {
+ $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape);
+ }
+ } else {
+ foreach ($values as $_i=>$_key) {
+ $_val = isset($output[$_i]) ? $output[$_i] : '';
+ $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape);
+ }
+ }
+
+ if(!empty($params['assign'])) {
+ $template->assign($params['assign'], $_html_result);
+ } else {
+ return implode("\n", $_html_result);
+ }
+
+}
+
+function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $escape=true) {
+ $_output = '';
+
+ if (is_object($value)) {
+ if (method_exists($value, "__toString")) {
+ $value = (string) $value->__toString();
+ } else {
+ trigger_error("html_options: value is an object of class '". get_class($value) ."' without __toString() method", E_USER_NOTICE);
+ return '';
+ }
+ } else {
+ $value = (string) $value;
+ }
+
+ if (is_object($output)) {
+ if (method_exists($output, "__toString")) {
+ $output = (string) $output->__toString();
+ } else {
+ trigger_error("html_options: output is an object of class '". get_class($output) ."' without __toString() method", E_USER_NOTICE);
+ return '';
+ }
+ } else {
+ $output = (string) $output;
+ }
+
+ if ($labels) {
+ if ($label_ids) {
+ $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, '_', $name . '_' . $value));
+ $_output .= '<label for="' . $_id . '">';
+ } else {
+ $_output .= '<label>';
+ }
+ }
+
+ $name = smarty_function_escape_special_chars($name);
+ $value = smarty_function_escape_special_chars($value);
+ if ($escape) {
+ $output = smarty_function_escape_special_chars($output);
+ }
+
+ $_output .= '<input type="checkbox" name="' . $name . '[]" value="' . $value . '"';
+
+ if ($labels && $label_ids) {
+ $_output .= ' id="' . $_id . '"';
+ }
+
+ if (is_array($selected)) {
+ if (isset($selected[$value])) {
+ $_output .= ' checked="checked"';
+ }
+ } elseif ($value === $selected) {
+ $_output .= ' checked="checked"';
+ }
+
+ $_output .= $extra . ' />' . $output;
+ if ($labels) {
+ $_output .= '</label>';
+ }
+
+ $_output .= $separator;
+ return $_output;
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/function.html_image.php b/library/Smarty/libs/plugins/function.html_image.php
new file mode 100644
index 000000000..6521966bb
--- /dev/null
+++ b/library/Smarty/libs/plugins/function.html_image.php
@@ -0,0 +1,159 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {html_image} function plugin
+ *
+ * Type: function<br>
+ * Name: html_image<br>
+ * Date: Feb 24, 2003<br>
+ * Purpose: format HTML tags for the image<br>
+ * Examples: {html_image file="/images/masthead.gif"}<br>
+ * Output: <img src="/images/masthead.gif" width=400 height=23><br>
+ * Params:
+ * <pre>
+ * - file - (required) - file (and path) of image
+ * - height - (optional) - image height (default actual height)
+ * - width - (optional) - image width (default actual width)
+ * - basedir - (optional) - base directory for absolute paths, default is environment variable DOCUMENT_ROOT
+ * - path_prefix - prefix for path output (optional, default empty)
+ * </pre>
+ *
+ * @link http://www.smarty.net/manual/en/language.function.html.image.php {html_image}
+ * (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author credits to Duda <duda@big.hu>
+ * @version 1.0
+ * @param array $params parameters
+ * @param Smarty_Internal_Template $template template object
+ * @return string
+ * @uses smarty_function_escape_special_chars()
+ */
+function smarty_function_html_image($params, $template)
+{
+ require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
+
+ $alt = '';
+ $file = '';
+ $height = '';
+ $width = '';
+ $extra = '';
+ $prefix = '';
+ $suffix = '';
+ $path_prefix = '';
+ $basedir = isset($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : '';
+ foreach($params as $_key => $_val) {
+ switch ($_key) {
+ case 'file':
+ case 'height':
+ case 'width':
+ case 'dpi':
+ case 'path_prefix':
+ case 'basedir':
+ $$_key = $_val;
+ break;
+
+ case 'alt':
+ if (!is_array($_val)) {
+ $$_key = smarty_function_escape_special_chars($_val);
+ } else {
+ throw new SmartyException ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+
+ case 'link':
+ case 'href':
+ $prefix = '<a href="' . $_val . '">';
+ $suffix = '</a>';
+ break;
+
+ default:
+ if (!is_array($_val)) {
+ $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"';
+ } else {
+ throw new SmartyException ("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ if (empty($file)) {
+ trigger_error("html_image: missing 'file' parameter", E_USER_NOTICE);
+ return;
+ }
+
+ if ($file[0] == '/') {
+ $_image_path = $basedir . $file;
+ } else {
+ $_image_path = $file;
+ }
+
+ // strip file protocol
+ if (stripos($params['file'], 'file://') === 0) {
+ $params['file'] = substr($params['file'], 7);
+ }
+
+ $protocol = strpos($params['file'], '://');
+ if ($protocol !== false) {
+ $protocol = strtolower(substr($params['file'], 0, $protocol));
+ }
+
+ if (isset($template->smarty->security_policy)) {
+ if ($protocol) {
+ // remote resource (or php stream, …)
+ if(!$template->smarty->security_policy->isTrustedUri($params['file'])) {
+ return;
+ }
+ } else {
+ // local file
+ if(!$template->smarty->security_policy->isTrustedResourceDir($params['file'])) {
+ return;
+ }
+ }
+ }
+
+ if (!isset($params['width']) || !isset($params['height'])) {
+ // FIXME: (rodneyrehm) getimagesize() loads the complete file off a remote resource, use custom [jpg,png,gif]header reader!
+ if (!$_image_data = @getimagesize($_image_path)) {
+ if (!file_exists($_image_path)) {
+ trigger_error("html_image: unable to find '$_image_path'", E_USER_NOTICE);
+ return;
+ } else if (!is_readable($_image_path)) {
+ trigger_error("html_image: unable to read '$_image_path'", E_USER_NOTICE);
+ return;
+ } else {
+ trigger_error("html_image: '$_image_path' is not a valid image file", E_USER_NOTICE);
+ return;
+ }
+ }
+
+ if (!isset($params['width'])) {
+ $width = $_image_data[0];
+ }
+ if (!isset($params['height'])) {
+ $height = $_image_data[1];
+ }
+ }
+
+ if (isset($params['dpi'])) {
+ if (strstr($_SERVER['HTTP_USER_AGENT'], 'Mac')) {
+ // FIXME: (rodneyrehm) wrong dpi assumption
+ // don't know who thought this up… even if it was true in 1998, it's definitely wrong in 2011.
+ $dpi_default = 72;
+ } else {
+ $dpi_default = 96;
+ }
+ $_resize = $dpi_default / $params['dpi'];
+ $width = round($width * $_resize);
+ $height = round($height * $_resize);
+ }
+
+ return $prefix . '<img src="' . $path_prefix . $file . '" alt="' . $alt . '" width="' . $width . '" height="' . $height . '"' . $extra . ' />' . $suffix;
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/function.html_options.php b/library/Smarty/libs/plugins/function.html_options.php
new file mode 100644
index 000000000..46330e896
--- /dev/null
+++ b/library/Smarty/libs/plugins/function.html_options.php
@@ -0,0 +1,176 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {html_options} function plugin
+ *
+ * Type: function<br>
+ * Name: html_options<br>
+ * Purpose: Prints the list of <option> tags generated from
+ * the passed parameters<br>
+ * Params:
+ * <pre>
+ * - name (optional) - string default "select"
+ * - values (required) - if no options supplied) - array
+ * - options (required) - if no values supplied) - associative array
+ * - selected (optional) - string default not set
+ * - output (required) - if not options supplied) - array
+ * - id (optional) - string default not set
+ * - class (optional) - string default not set
+ * </pre>
+ *
+ * @link http://www.smarty.net/manual/en/language.function.html.options.php {html_image}
+ * (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author Ralf Strehle (minor optimization) <ralf dot strehle at yahoo dot de>
+ * @param array $params parameters
+ * @param Smarty_Internal_Template $template template object
+ * @return string
+ * @uses smarty_function_escape_special_chars()
+ */
+function smarty_function_html_options($params, $template)
+{
+ require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
+
+ $name = null;
+ $values = null;
+ $options = null;
+ $selected = null;
+ $output = null;
+ $id = null;
+ $class = null;
+
+ $extra = '';
+
+ foreach ($params as $_key => $_val) {
+ switch ($_key) {
+ case 'name':
+ case 'class':
+ case 'id':
+ $$_key = (string) $_val;
+ break;
+
+ case 'options':
+ $options = (array) $_val;
+ break;
+
+ case 'values':
+ case 'output':
+ $$_key = array_values((array) $_val);
+ break;
+
+ case 'selected':
+ if (is_array($_val)) {
+ $selected = array();
+ foreach ($_val as $_sel) {
+ if (is_object($_sel)) {
+ if (method_exists($_sel, "__toString")) {
+ $_sel = smarty_function_escape_special_chars((string) $_sel->__toString());
+ } else {
+ trigger_error("html_options: selected attribute contains an object of class '". get_class($_sel) ."' without __toString() method", E_USER_NOTICE);
+ continue;
+ }
+ } else {
+ $_sel = smarty_function_escape_special_chars((string) $_sel);
+ }
+ $selected[$_sel] = true;
+ }
+ } elseif (is_object($_val)) {
+ if (method_exists($_val, "__toString")) {
+ $selected = smarty_function_escape_special_chars((string) $_val->__toString());
+ } else {
+ trigger_error("html_options: selected attribute is an object of class '". get_class($_val) ."' without __toString() method", E_USER_NOTICE);
+ }
+ } else {
+ $selected = smarty_function_escape_special_chars((string) $_val);
+ }
+ break;
+
+ default:
+ if (!is_array($_val)) {
+ $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"';
+ } else {
+ trigger_error("html_options: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ if (!isset($options) && !isset($values)) {
+ /* raise error here? */
+ return '';
+ }
+
+ $_html_result = '';
+ $_idx = 0;
+
+ if (isset($options)) {
+ foreach ($options as $_key => $_val) {
+ $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected, $id, $class, $_idx);
+ }
+ } else {
+ foreach ($values as $_i => $_key) {
+ $_val = isset($output[$_i]) ? $output[$_i] : '';
+ $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected, $id, $class, $_idx);
+ }
+ }
+
+ if (!empty($name)) {
+ $_html_class = !empty($class) ? ' class="'.$class.'"' : '';
+ $_html_id = !empty($id) ? ' id="'.$id.'"' : '';
+ $_html_result = '<select name="' . $name . '"' . $_html_class . $_html_id . $extra . '>' . "\n" . $_html_result . '</select>' . "\n";
+ }
+
+ return $_html_result;
+}
+
+function smarty_function_html_options_optoutput($key, $value, $selected, $id, $class, &$idx)
+{
+ if (!is_array($value)) {
+ $_key = smarty_function_escape_special_chars($key);
+ $_html_result = '<option value="' . $_key . '"';
+ if (is_array($selected)) {
+ if (isset($selected[$_key])) {
+ $_html_result .= ' selected="selected"';
+ }
+ } elseif ($_key === $selected) {
+ $_html_result .= ' selected="selected"';
+ }
+ $_html_class = !empty($class) ? ' class="'.$class.' option"' : '';
+ $_html_id = !empty($id) ? ' id="'.$id.'-'.$idx.'"' : '';
+ if (is_object($value)) {
+ if (method_exists($value, "__toString")) {
+ $value = smarty_function_escape_special_chars((string) $value->__toString());
+ } else {
+ trigger_error("html_options: value is an object of class '". get_class($value) ."' without __toString() method", E_USER_NOTICE);
+ return '';
+ }
+ } else {
+ $value = smarty_function_escape_special_chars((string) $value);
+ }
+ $_html_result .= $_html_class . $_html_id . '>' . $value . '</option>' . "\n";
+ $idx++;
+ } else {
+ $_idx = 0;
+ $_html_result = smarty_function_html_options_optgroup($key, $value, $selected, !empty($id) ? ($id.'-'.$idx) : null, $class, $_idx);
+ $idx++;
+ }
+ return $_html_result;
+}
+
+function smarty_function_html_options_optgroup($key, $values, $selected, $id, $class, &$idx)
+{
+ $optgroup_html = '<optgroup label="' . smarty_function_escape_special_chars($key) . '">' . "\n";
+ foreach ($values as $key => $value) {
+ $optgroup_html .= smarty_function_html_options_optoutput($key, $value, $selected, $id, $class, $idx);
+ }
+ $optgroup_html .= "</optgroup>\n";
+ return $optgroup_html;
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/function.html_radios.php b/library/Smarty/libs/plugins/function.html_radios.php
new file mode 100644
index 000000000..7c830724a
--- /dev/null
+++ b/library/Smarty/libs/plugins/function.html_radios.php
@@ -0,0 +1,200 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {html_radios} function plugin
+ *
+ * File: function.html_radios.php<br>
+ * Type: function<br>
+ * Name: html_radios<br>
+ * Date: 24.Feb.2003<br>
+ * Purpose: Prints out a list of radio input types<br>
+ * Params:
+ * <pre>
+ * - name (optional) - string default "radio"
+ * - values (required) - array
+ * - options (required) - associative array
+ * - checked (optional) - array default not set
+ * - separator (optional) - ie <br> or &nbsp;
+ * - output (optional) - the output next to each radio button
+ * - assign (optional) - assign the output as an array to this variable
+ * - escape (optional) - escape the content (not value), defaults to true
+ * </pre>
+ * Examples:
+ * <pre>
+ * {html_radios values=$ids output=$names}
+ * {html_radios values=$ids name='box' separator='<br>' output=$names}
+ * {html_radios values=$ids checked=$checked separator='<br>' output=$names}
+ * </pre>
+ *
+ * @link http://smarty.php.net/manual/en/language.function.html.radios.php {html_radios}
+ * (Smarty online manual)
+ * @author Christopher Kvarme <christopher.kvarme@flashjab.com>
+ * @author credits to Monte Ohrt <monte at ohrt dot com>
+ * @version 1.0
+ * @param array $params parameters
+ * @param Smarty_Internal_Template $template template object
+ * @return string
+ * @uses smarty_function_escape_special_chars()
+ */
+function smarty_function_html_radios($params, $template)
+{
+ require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
+
+ $name = 'radio';
+ $values = null;
+ $options = null;
+ $selected = null;
+ $separator = '';
+ $escape = true;
+ $labels = true;
+ $label_ids = false;
+ $output = null;
+ $extra = '';
+
+ foreach($params as $_key => $_val) {
+ switch ($_key) {
+ case 'name':
+ case 'separator':
+ $$_key = (string) $_val;
+ break;
+
+ case 'checked':
+ case 'selected':
+ if (is_array($_val)) {
+ trigger_error('html_radios: the "' . $_key . '" attribute cannot be an array', E_USER_WARNING);
+ } elseif (is_object($_val)) {
+ if (method_exists($_val, "__toString")) {
+ $selected = smarty_function_escape_special_chars((string) $_val->__toString());
+ } else {
+ trigger_error("html_radios: selected attribute is an object of class '". get_class($_val) ."' without __toString() method", E_USER_NOTICE);
+ }
+ } else {
+ $selected = (string) $_val;
+ }
+ break;
+
+ case 'escape':
+ case 'labels':
+ case 'label_ids':
+ $$_key = (bool) $_val;
+ break;
+
+ case 'options':
+ $$_key = (array) $_val;
+ break;
+
+ case 'values':
+ case 'output':
+ $$_key = array_values((array) $_val);
+ break;
+
+ case 'radios':
+ trigger_error('html_radios: the use of the "radios" attribute is deprecated, use "options" instead', E_USER_WARNING);
+ $options = (array) $_val;
+ break;
+
+ case 'assign':
+ break;
+
+ default:
+ if (!is_array($_val)) {
+ $extra .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_val) . '"';
+ } else {
+ trigger_error("html_radios: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ if (!isset($options) && !isset($values)) {
+ /* raise error here? */
+ return '';
+ }
+
+ $_html_result = array();
+
+ if (isset($options)) {
+ foreach ($options as $_key => $_val) {
+ $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape);
+ }
+ } else {
+ foreach ($values as $_i => $_key) {
+ $_val = isset($output[$_i]) ? $output[$_i] : '';
+ $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids, $escape);
+ }
+ }
+
+ if (!empty($params['assign'])) {
+ $template->assign($params['assign'], $_html_result);
+ } else {
+ return implode("\n", $_html_result);
+ }
+}
+
+function smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids, $escape)
+{
+ $_output = '';
+
+ if (is_object($value)) {
+ if (method_exists($value, "__toString")) {
+ $value = (string) $value->__toString();
+ } else {
+ trigger_error("html_options: value is an object of class '". get_class($value) ."' without __toString() method", E_USER_NOTICE);
+ return '';
+ }
+ } else {
+ $value = (string) $value;
+ }
+
+ if (is_object($output)) {
+ if (method_exists($output, "__toString")) {
+ $output = (string) $output->__toString();
+ } else {
+ trigger_error("html_options: output is an object of class '". get_class($output) ."' without __toString() method", E_USER_NOTICE);
+ return '';
+ }
+ } else {
+ $output = (string) $output;
+ }
+
+ if ($labels) {
+ if ($label_ids) {
+ $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!' . Smarty::$_UTF8_MODIFIER, '_', $name . '_' . $value));
+ $_output .= '<label for="' . $_id . '">';
+ } else {
+ $_output .= '<label>';
+ }
+ }
+
+ $name = smarty_function_escape_special_chars($name);
+ $value = smarty_function_escape_special_chars($value);
+ if ($escape) {
+ $output = smarty_function_escape_special_chars($output);
+ }
+
+ $_output .= '<input type="radio" name="' . $name . '" value="' . $value . '"';
+
+ if ($labels && $label_ids) {
+ $_output .= ' id="' . $_id . '"';
+ }
+
+ if ($value === $selected) {
+ $_output .= ' checked="checked"';
+ }
+
+ $_output .= $extra . ' />' . $output;
+ if ($labels) {
+ $_output .= '</label>';
+ }
+
+ $_output .= $separator;
+ return $_output;
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/function.html_select_date.php b/library/Smarty/libs/plugins/function.html_select_date.php
new file mode 100644
index 000000000..13c500354
--- /dev/null
+++ b/library/Smarty/libs/plugins/function.html_select_date.php
@@ -0,0 +1,394 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * @ignore
+ */
+require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
+/**
+ * @ignore
+ */
+require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
+
+/**
+ * Smarty {html_select_date} plugin
+ *
+ * Type: function<br>
+ * Name: html_select_date<br>
+ * Purpose: Prints the dropdowns for date selection.
+ *
+ * ChangeLog:
+ * <pre>
+ * - 1.0 initial release
+ * - 1.1 added support for +/- N syntax for begin
+ * and end year values. (Monte)
+ * - 1.2 added support for yyyy-mm-dd syntax for
+ * time value. (Jan Rosier)
+ * - 1.3 added support for choosing format for
+ * month values (Gary Loescher)
+ * - 1.3.1 added support for choosing format for
+ * day values (Marcus Bointon)
+ * - 1.3.2 support negative timestamps, force year
+ * dropdown to include given date unless explicitly set (Monte)
+ * - 1.3.4 fix behaviour of 0000-00-00 00:00:00 dates to match that
+ * of 0000-00-00 dates (cybot, boots)
+ * - 2.0 complete rewrite for performance,
+ * added attributes month_names, *_id
+ * </pre>
+ *
+ * @link http://www.smarty.net/manual/en/language.function.html.select.date.php {html_select_date}
+ * (Smarty online manual)
+ * @version 2.0
+ * @author Andrei Zmievski
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author Rodney Rehm
+ * @param array $params parameters
+ * @param Smarty_Internal_Template $template template object
+ * @return string
+ */
+function smarty_function_html_select_date($params, $template)
+{
+ // generate timestamps used for month names only
+ static $_month_timestamps = null;
+ static $_current_year = null;
+ if ($_month_timestamps === null) {
+ $_current_year = date('Y');
+ $_month_timestamps = array();
+ for ($i = 1; $i <= 12; $i++) {
+ $_month_timestamps[$i] = mktime(0, 0, 0, $i, 1, 2000);
+ }
+ }
+
+ /* Default values. */
+ $prefix = "Date_";
+ $start_year = null;
+ $end_year = null;
+ $display_days = true;
+ $display_months = true;
+ $display_years = true;
+ $month_format = "%B";
+ /* Write months as numbers by default GL */
+ $month_value_format = "%m";
+ $day_format = "%02d";
+ /* Write day values using this format MB */
+ $day_value_format = "%d";
+ $year_as_text = false;
+ /* Display years in reverse order? Ie. 2000,1999,.... */
+ $reverse_years = false;
+ /* Should the select boxes be part of an array when returned from PHP?
+ e.g. setting it to "birthday", would create "birthday[Day]",
+ "birthday[Month]" & "birthday[Year]". Can be combined with prefix */
+ $field_array = null;
+ /* <select size>'s of the different <select> tags.
+ If not set, uses default dropdown. */
+ $day_size = null;
+ $month_size = null;
+ $year_size = null;
+ /* Unparsed attributes common to *ALL* the <select>/<input> tags.
+ An example might be in the template: all_extra ='class ="foo"'. */
+ $all_extra = null;
+ /* Separate attributes for the tags. */
+ $day_extra = null;
+ $month_extra = null;
+ $year_extra = null;
+ /* Order in which to display the fields.
+ "D" -> day, "M" -> month, "Y" -> year. */
+ $field_order = 'MDY';
+ /* String printed between the different fields. */
+ $field_separator = "\n";
+ $option_separator = "\n";
+ $time = null;
+ // $all_empty = null;
+ // $day_empty = null;
+ // $month_empty = null;
+ // $year_empty = null;
+ $extra_attrs = '';
+ $all_id = null;
+ $day_id = null;
+ $month_id = null;
+ $year_id = null;
+
+ foreach ($params as $_key => $_value) {
+ switch ($_key) {
+ case 'time':
+ if (!is_array($_value) && $_value !== null) {
+ $time = smarty_make_timestamp($_value);
+ }
+ break;
+
+ case 'month_names':
+ if (is_array($_value) && count($_value) == 12) {
+ $$_key = $_value;
+ } else {
+ trigger_error("html_select_date: month_names must be an array of 12 strings", E_USER_NOTICE);
+ }
+ break;
+
+ case 'prefix':
+ case 'field_array':
+ case 'start_year':
+ case 'end_year':
+ case 'day_format':
+ case 'day_value_format':
+ case 'month_format':
+ case 'month_value_format':
+ case 'day_size':
+ case 'month_size':
+ case 'year_size':
+ case 'all_extra':
+ case 'day_extra':
+ case 'month_extra':
+ case 'year_extra':
+ case 'field_order':
+ case 'field_separator':
+ case 'option_separator':
+ case 'all_empty':
+ case 'month_empty':
+ case 'day_empty':
+ case 'year_empty':
+ case 'all_id':
+ case 'month_id':
+ case 'day_id':
+ case 'year_id':
+ $$_key = (string)$_value;
+ break;
+
+ case 'display_days':
+ case 'display_months':
+ case 'display_years':
+ case 'year_as_text':
+ case 'reverse_years':
+ $$_key = (bool)$_value;
+ break;
+
+ default:
+ if (!is_array($_value)) {
+ $extra_attrs .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_value) . '"';
+ } else {
+ trigger_error("html_select_date: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ // Note: date() is faster than strftime()
+ // Note: explode(date()) is faster than date() date() date()
+ if (isset($params['time']) && is_array($params['time'])) {
+ if (isset($params['time'][$prefix . 'Year'])) {
+ // $_REQUEST[$field_array] given
+ foreach (array('Y' => 'Year', 'm' => 'Month', 'd' => 'Day') as $_elementKey => $_elementName) {
+ $_variableName = '_' . strtolower($_elementName);
+ $$_variableName = isset($params['time'][$prefix . $_elementName])
+ ? $params['time'][$prefix . $_elementName]
+ : date($_elementKey);
+ }
+ $time = mktime(0, 0, 0, $_month, $_day, $_year);
+ } elseif (isset($params['time'][$field_array][$prefix . 'Year'])) {
+ // $_REQUEST given
+ foreach (array('Y' => 'Year', 'm' => 'Month', 'd' => 'Day') as $_elementKey => $_elementName) {
+ $_variableName = '_' . strtolower($_elementName);
+ $$_variableName = isset($params['time'][$field_array][$prefix . $_elementName])
+ ? $params['time'][$field_array][$prefix . $_elementName]
+ : date($_elementKey);
+ }
+ $time = mktime(0, 0, 0, $_month, $_day, $_year);
+ } else {
+ // no date found, use NOW
+ list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d'));
+ }
+ } elseif ($time === null) {
+ if (array_key_exists('time', $params)) {
+ $_year = $_month = $_day = $time = null;
+ } else {
+ list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d'));
+ }
+ } else {
+ list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d', $time));
+ }
+
+ // make syntax "+N" or "-N" work with $start_year and $end_year
+ // Note preg_match('!^(\+|\-)\s*(\d+)$!', $end_year, $match) is slower than trim+substr
+ foreach (array('start', 'end') as $key) {
+ $key .= '_year';
+ $t = $$key;
+ if ($t === null) {
+ $$key = (int)$_current_year;
+ } else if ($t[0] == '+') {
+ $$key = (int)($_current_year + trim(substr($t, 1)));
+ } else if ($t[0] == '-') {
+ $$key = (int)($_current_year - trim(substr($t, 1)));
+ } else {
+ $$key = (int)$$key;
+ }
+ }
+
+ // flip for ascending or descending
+ if (($start_year > $end_year && !$reverse_years) || ($start_year < $end_year && $reverse_years)) {
+ $t = $end_year;
+ $end_year = $start_year;
+ $start_year = $t;
+ }
+
+ // generate year <select> or <input>
+ if ($display_years) {
+ $_html_years = '';
+ $_extra = '';
+ $_name = $field_array ? ($field_array . '[' . $prefix . 'Year]') : ($prefix . 'Year');
+ if ($all_extra) {
+ $_extra .= ' ' . $all_extra;
+ }
+ if ($year_extra) {
+ $_extra .= ' ' . $year_extra;
+ }
+
+ if ($year_as_text) {
+ $_html_years = '<input type="text" name="' . $_name . '" value="' . $_year . '" size="4" maxlength="4"' . $_extra . $extra_attrs . ' />';
+ } else {
+ $_html_years = '<select name="' . $_name . '"';
+ if ($year_id !== null || $all_id !== null) {
+ $_html_years .= ' id="' . smarty_function_escape_special_chars(
+ $year_id !== null ? ( $year_id ? $year_id : $_name ) : ( $all_id ? ($all_id . $_name) : $_name )
+ ) . '"';
+ }
+ if ($year_size) {
+ $_html_years .= ' size="' . $year_size . '"';
+ }
+ $_html_years .= $_extra . $extra_attrs . '>' . $option_separator;
+
+ if (isset($year_empty) || isset($all_empty)) {
+ $_html_years .= '<option value="">' . ( isset($year_empty) ? $year_empty : $all_empty ) . '</option>' . $option_separator;
+ }
+
+ $op = $start_year > $end_year ? -1 : 1;
+ for ($i=$start_year; $op > 0 ? $i <= $end_year : $i >= $end_year; $i += $op) {
+ $_html_years .= '<option value="' . $i . '"'
+ . ($_year == $i ? ' selected="selected"' : '')
+ . '>' . $i . '</option>' . $option_separator;
+ }
+
+ $_html_years .= '</select>';
+ }
+ }
+
+ // generate month <select> or <input>
+ if ($display_months) {
+ $_html_month = '';
+ $_extra = '';
+ $_name = $field_array ? ($field_array . '[' . $prefix . 'Month]') : ($prefix . 'Month');
+ if ($all_extra) {
+ $_extra .= ' ' . $all_extra;
+ }
+ if ($month_extra) {
+ $_extra .= ' ' . $month_extra;
+ }
+
+ $_html_months = '<select name="' . $_name . '"';
+ if ($month_id !== null || $all_id !== null) {
+ $_html_months .= ' id="' . smarty_function_escape_special_chars(
+ $month_id !== null ? ( $month_id ? $month_id : $_name ) : ( $all_id ? ($all_id . $_name) : $_name )
+ ) . '"';
+ }
+ if ($month_size) {
+ $_html_months .= ' size="' . $month_size . '"';
+ }
+ $_html_months .= $_extra . $extra_attrs . '>' . $option_separator;
+
+ if (isset($month_empty) || isset($all_empty)) {
+ $_html_months .= '<option value="">' . ( isset($month_empty) ? $month_empty : $all_empty ) . '</option>' . $option_separator;
+ }
+
+ for ($i = 1; $i <= 12; $i++) {
+ $_val = sprintf('%02d', $i);
+ $_text = isset($month_names) ? smarty_function_escape_special_chars($month_names[$i]) : ($month_format == "%m" ? $_val : strftime($month_format, $_month_timestamps[$i]));
+ $_value = $month_value_format == "%m" ? $_val : strftime($month_value_format, $_month_timestamps[$i]);
+ $_html_months .= '<option value="' . $_value . '"'
+ . ($_val == $_month ? ' selected="selected"' : '')
+ . '>' . $_text . '</option>' . $option_separator;
+ }
+
+ $_html_months .= '</select>';
+ }
+
+ // generate day <select> or <input>
+ if ($display_days) {
+ $_html_day = '';
+ $_extra = '';
+ $_name = $field_array ? ($field_array . '[' . $prefix . 'Day]') : ($prefix . 'Day');
+ if ($all_extra) {
+ $_extra .= ' ' . $all_extra;
+ }
+ if ($day_extra) {
+ $_extra .= ' ' . $day_extra;
+ }
+
+ $_html_days = '<select name="' . $_name . '"';
+ if ($day_id !== null || $all_id !== null) {
+ $_html_days .= ' id="' . smarty_function_escape_special_chars(
+ $day_id !== null ? ( $day_id ? $day_id : $_name ) : ( $all_id ? ($all_id . $_name) : $_name )
+ ) . '"';
+ }
+ if ($day_size) {
+ $_html_days .= ' size="' . $day_size . '"';
+ }
+ $_html_days .= $_extra . $extra_attrs . '>' . $option_separator;
+
+ if (isset($day_empty) || isset($all_empty)) {
+ $_html_days .= '<option value="">' . ( isset($day_empty) ? $day_empty : $all_empty ) . '</option>' . $option_separator;
+ }
+
+ for ($i = 1; $i <= 31; $i++) {
+ $_val = sprintf('%02d', $i);
+ $_text = $day_format == '%02d' ? $_val : sprintf($day_format, $i);
+ $_value = $day_value_format == '%02d' ? $_val : sprintf($day_value_format, $i);
+ $_html_days .= '<option value="' . $_value . '"'
+ . ($_val == $_day ? ' selected="selected"' : '')
+ . '>' . $_text . '</option>' . $option_separator;
+ }
+
+ $_html_days .= '</select>';
+ }
+
+ // order the fields for output
+ $_html = '';
+ for ($i=0; $i <= 2; $i++) {
+ switch ($field_order[$i]) {
+ case 'Y':
+ case 'y':
+ if (isset($_html_years)) {
+ if ($_html) {
+ $_html .= $field_separator;
+ }
+ $_html .= $_html_years;
+ }
+ break;
+
+ case 'm':
+ case 'M':
+ if (isset($_html_months)) {
+ if ($_html) {
+ $_html .= $field_separator;
+ }
+ $_html .= $_html_months;
+ }
+ break;
+
+ case 'd':
+ case 'D':
+ if (isset($_html_days)) {
+ if ($_html) {
+ $_html .= $field_separator;
+ }
+ $_html .= $_html_days;
+ }
+ break;
+ }
+ }
+ return $_html;
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/function.html_select_time.php b/library/Smarty/libs/plugins/function.html_select_time.php
new file mode 100644
index 000000000..9fb8038e4
--- /dev/null
+++ b/library/Smarty/libs/plugins/function.html_select_time.php
@@ -0,0 +1,366 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * @ignore
+ */
+require_once(SMARTY_PLUGINS_DIR . 'shared.escape_special_chars.php');
+/**
+ * @ignore
+ */
+require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
+
+/**
+ * Smarty {html_select_time} function plugin
+ *
+ * Type: function<br>
+ * Name: html_select_time<br>
+ * Purpose: Prints the dropdowns for time selection
+ *
+ * @link http://www.smarty.net/manual/en/language.function.html.select.time.php {html_select_time}
+ * (Smarty online manual)
+ * @author Roberto Berto <roberto@berto.net>
+ * @author Monte Ohrt <monte AT ohrt DOT com>
+ * @param array $params parameters
+ * @param Smarty_Internal_Template $template template object
+ * @return string
+ * @uses smarty_make_timestamp()
+ */
+function smarty_function_html_select_time($params, $template)
+{
+ $prefix = "Time_";
+ $field_array = null;
+ $field_separator = "\n";
+ $option_separator = "\n";
+ $time = null;
+
+ $display_hours = true;
+ $display_minutes = true;
+ $display_seconds = true;
+ $display_meridian = true;
+
+ $hour_format = '%02d';
+ $hour_value_format = '%02d';
+ $minute_format = '%02d';
+ $minute_value_format = '%02d';
+ $second_format = '%02d';
+ $second_value_format = '%02d';
+
+ $hour_size = null;
+ $minute_size = null;
+ $second_size = null;
+ $meridian_size = null;
+
+ $all_empty = null;
+ $hour_empty = null;
+ $minute_empty = null;
+ $second_empty = null;
+ $meridian_empty = null;
+
+ $all_id = null;
+ $hour_id = null;
+ $minute_id = null;
+ $second_id = null;
+ $meridian_id = null;
+
+ $use_24_hours = true;
+ $minute_interval = 1;
+ $second_interval = 1;
+
+ $extra_attrs = '';
+ $all_extra = null;
+ $hour_extra = null;
+ $minute_extra = null;
+ $second_extra = null;
+ $meridian_extra = null;
+
+ foreach ($params as $_key => $_value) {
+ switch ($_key) {
+ case 'time':
+ if (!is_array($_value) && $_value !== null) {
+ $time = smarty_make_timestamp($_value);
+ }
+ break;
+
+ case 'prefix':
+ case 'field_array':
+
+ case 'field_separator':
+ case 'option_separator':
+
+ case 'all_extra':
+ case 'hour_extra':
+ case 'minute_extra':
+ case 'second_extra':
+ case 'meridian_extra':
+
+ case 'all_empty':
+ case 'hour_empty':
+ case 'minute_empty':
+ case 'second_empty':
+ case 'meridian_empty':
+
+ case 'all_id':
+ case 'hour_id':
+ case 'minute_id':
+ case 'second_id':
+ case 'meridian_id':
+
+ case 'hour_format':
+ case 'hour_value_format':
+ case 'minute_format':
+ case 'minute_value_format':
+ case 'second_format':
+ case 'second_value_format':
+ $$_key = (string)$_value;
+ break;
+
+ case 'display_hours':
+ case 'display_minutes':
+ case 'display_seconds':
+ case 'display_meridian':
+ case 'use_24_hours':
+ $$_key = (bool)$_value;
+ break;
+
+ case 'minute_interval':
+ case 'second_interval':
+
+ case 'hour_size':
+ case 'minute_size':
+ case 'second_size':
+ case 'meridian_size':
+ $$_key = (int)$_value;
+ break;
+
+ default:
+ if (!is_array($_value)) {
+ $extra_attrs .= ' ' . $_key . '="' . smarty_function_escape_special_chars($_value) . '"';
+ } else {
+ trigger_error("html_select_date: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
+ }
+ break;
+ }
+ }
+
+ if (isset($params['time']) && is_array($params['time'])) {
+ if (isset($params['time'][$prefix . 'Hour'])) {
+ // $_REQUEST[$field_array] given
+ foreach (array('H' => 'Hour', 'i' => 'Minute', 's' => 'Second') as $_elementKey => $_elementName) {
+ $_variableName = '_' . strtolower($_elementName);
+ $$_variableName = isset($params['time'][$prefix . $_elementName])
+ ? $params['time'][$prefix . $_elementName]
+ : date($_elementKey);
+ }
+ $_meridian = isset($params['time'][$prefix . 'Meridian'])
+ ? (' ' . $params['time'][$prefix . 'Meridian'])
+ : '';
+ $time = strtotime( $_hour . ':' . $_minute . ':' . $_second . $_meridian );
+ list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s', $time));
+ } elseif (isset($params['time'][$field_array][$prefix . 'Hour'])) {
+ // $_REQUEST given
+ foreach (array('H' => 'Hour', 'i' => 'Minute', 's' => 'Second') as $_elementKey => $_elementName) {
+ $_variableName = '_' . strtolower($_elementName);
+ $$_variableName = isset($params['time'][$field_array][$prefix . $_elementName])
+ ? $params['time'][$field_array][$prefix . $_elementName]
+ : date($_elementKey);
+ }
+ $_meridian = isset($params['time'][$field_array][$prefix . 'Meridian'])
+ ? (' ' . $params['time'][$field_array][$prefix . 'Meridian'])
+ : '';
+ $time = strtotime( $_hour . ':' . $_minute . ':' . $_second . $_meridian );
+ list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s', $time));
+ } else {
+ // no date found, use NOW
+ list($_year, $_month, $_day) = $time = explode('-', date('Y-m-d'));
+ }
+ } elseif ($time === null) {
+ if (array_key_exists('time', $params)) {
+ $_hour = $_minute = $_second = $time = null;
+ } else {
+ list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s'));
+ }
+ } else {
+ list($_hour, $_minute, $_second) = $time = explode('-', date('H-i-s', $time));
+ }
+
+ // generate hour <select>
+ if ($display_hours) {
+ $_html_hours = '';
+ $_extra = '';
+ $_name = $field_array ? ($field_array . '[' . $prefix . 'Hour]') : ($prefix . 'Hour');
+ if ($all_extra) {
+ $_extra .= ' ' . $all_extra;
+ }
+ if ($hour_extra) {
+ $_extra .= ' ' . $hour_extra;
+ }
+
+ $_html_hours = '<select name="' . $_name . '"';
+ if ($hour_id !== null || $all_id !== null) {
+ $_html_hours .= ' id="' . smarty_function_escape_special_chars(
+ $hour_id !== null ? ( $hour_id ? $hour_id : $_name ) : ( $all_id ? ($all_id . $_name) : $_name )
+ ) . '"';
+ }
+ if ($hour_size) {
+ $_html_hours .= ' size="' . $hour_size . '"';
+ }
+ $_html_hours .= $_extra . $extra_attrs . '>' . $option_separator;
+
+ if (isset($hour_empty) || isset($all_empty)) {
+ $_html_hours .= '<option value="">' . ( isset($hour_empty) ? $hour_empty : $all_empty ) . '</option>' . $option_separator;
+ }
+
+ $start = $use_24_hours ? 0 : 1;
+ $end = $use_24_hours ? 23 : 12;
+ for ($i=$start; $i <= $end; $i++) {
+ $_val = sprintf('%02d', $i);
+ $_text = $hour_format == '%02d' ? $_val : sprintf($hour_format, $i);
+ $_value = $hour_value_format == '%02d' ? $_val : sprintf($hour_value_format, $i);
+
+ if (!$use_24_hours) {
+ $_hour12 = $_hour == 0
+ ? 12
+ : ($_hour <= 12 ? $_hour : $_hour -12);
+ }
+
+ $selected = $_hour !== null ? ($use_24_hours ? $_hour == $_val : $_hour12 == $_val) : null;
+ $_html_hours .= '<option value="' . $_value . '"'
+ . ($selected ? ' selected="selected"' : '')
+ . '>' . $_text . '</option>' . $option_separator;
+ }
+
+ $_html_hours .= '</select>';
+ }
+
+ // generate minute <select>
+ if ($display_minutes) {
+ $_html_minutes = '';
+ $_extra = '';
+ $_name = $field_array ? ($field_array . '[' . $prefix . 'Minute]') : ($prefix . 'Minute');
+ if ($all_extra) {
+ $_extra .= ' ' . $all_extra;
+ }
+ if ($minute_extra) {
+ $_extra .= ' ' . $minute_extra;
+ }
+
+ $_html_minutes = '<select name="' . $_name . '"';
+ if ($minute_id !== null || $all_id !== null) {
+ $_html_minutes .= ' id="' . smarty_function_escape_special_chars(
+ $minute_id !== null ? ( $minute_id ? $minute_id : $_name ) : ( $all_id ? ($all_id . $_name) : $_name )
+ ) . '"';
+ }
+ if ($minute_size) {
+ $_html_minutes .= ' size="' . $minute_size . '"';
+ }
+ $_html_minutes .= $_extra . $extra_attrs . '>' . $option_separator;
+
+ if (isset($minute_empty) || isset($all_empty)) {
+ $_html_minutes .= '<option value="">' . ( isset($minute_empty) ? $minute_empty : $all_empty ) . '</option>' . $option_separator;
+ }
+
+ $selected = $_minute !== null ? ($_minute - $_minute % $minute_interval) : null;
+ for ($i=0; $i <= 59; $i += $minute_interval) {
+ $_val = sprintf('%02d', $i);
+ $_text = $minute_format == '%02d' ? $_val : sprintf($minute_format, $i);
+ $_value = $minute_value_format == '%02d' ? $_val : sprintf($minute_value_format, $i);
+ $_html_minutes .= '<option value="' . $_value . '"'
+ . ($selected === $i ? ' selected="selected"' : '')
+ . '>' . $_text . '</option>' . $option_separator;
+ }
+
+ $_html_minutes .= '</select>';
+ }
+
+ // generate second <select>
+ if ($display_seconds) {
+ $_html_seconds = '';
+ $_extra = '';
+ $_name = $field_array ? ($field_array . '[' . $prefix . 'Second]') : ($prefix . 'Second');
+ if ($all_extra) {
+ $_extra .= ' ' . $all_extra;
+ }
+ if ($second_extra) {
+ $_extra .= ' ' . $second_extra;
+ }
+
+ $_html_seconds = '<select name="' . $_name . '"';
+ if ($second_id !== null || $all_id !== null) {
+ $_html_seconds .= ' id="' . smarty_function_escape_special_chars(
+ $second_id !== null ? ( $second_id ? $second_id : $_name ) : ( $all_id ? ($all_id . $_name) : $_name )
+ ) . '"';
+ }
+ if ($second_size) {
+ $_html_seconds .= ' size="' . $second_size . '"';
+ }
+ $_html_seconds .= $_extra . $extra_attrs . '>' . $option_separator;
+
+ if (isset($second_empty) || isset($all_empty)) {
+ $_html_seconds .= '<option value="">' . ( isset($second_empty) ? $second_empty : $all_empty ) . '</option>' . $option_separator;
+ }
+
+ $selected = $_second !== null ? ($_second - $_second % $second_interval) : null;
+ for ($i=0; $i <= 59; $i += $second_interval) {
+ $_val = sprintf('%02d', $i);
+ $_text = $second_format == '%02d' ? $_val : sprintf($second_format, $i);
+ $_value = $second_value_format == '%02d' ? $_val : sprintf($second_value_format, $i);
+ $_html_seconds .= '<option value="' . $_value . '"'
+ . ($selected === $i ? ' selected="selected"' : '')
+ . '>' . $_text . '</option>' . $option_separator;
+ }
+
+ $_html_seconds .= '</select>';
+ }
+
+ // generate meridian <select>
+ if ($display_meridian && !$use_24_hours) {
+ $_html_meridian = '';
+ $_extra = '';
+ $_name = $field_array ? ($field_array . '[' . $prefix . 'Meridian]') : ($prefix . 'Meridian');
+ if ($all_extra) {
+ $_extra .= ' ' . $all_extra;
+ }
+ if ($meridian_extra) {
+ $_extra .= ' ' . $meridian_extra;
+ }
+
+ $_html_meridian = '<select name="' . $_name . '"';
+ if ($meridian_id !== null || $all_id !== null) {
+ $_html_meridian .= ' id="' . smarty_function_escape_special_chars(
+ $meridian_id !== null ? ( $meridian_id ? $meridian_id : $_name ) : ( $all_id ? ($all_id . $_name) : $_name )
+ ) . '"';
+ }
+ if ($meridian_size) {
+ $_html_meridian .= ' size="' . $meridian_size . '"';
+ }
+ $_html_meridian .= $_extra . $extra_attrs . '>' . $option_separator;
+
+ if (isset($meridian_empty) || isset($all_empty)) {
+ $_html_meridian .= '<option value="">' . ( isset($meridian_empty) ? $meridian_empty : $all_empty ) . '</option>' . $option_separator;
+ }
+
+ $_html_meridian .= '<option value="am"'. ($_hour < 12 ? ' selected="selected"' : '') .'>AM</option>' . $option_separator
+ . '<option value="pm"'. ($_hour < 12 ? '' : ' selected="selected"') .'>PM</option>' . $option_separator
+ . '</select>';
+ }
+
+ $_html = '';
+ foreach (array('_html_hours', '_html_minutes', '_html_seconds', '_html_meridian') as $k) {
+ if (isset($$k)) {
+ if ($_html) {
+ $_html .= $field_separator;
+ }
+ $_html .= $$k;
+ }
+ }
+
+ return $_html;
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/function.html_table.php b/library/Smarty/libs/plugins/function.html_table.php
new file mode 100644
index 000000000..6b9cb9d12
--- /dev/null
+++ b/library/Smarty/libs/plugins/function.html_table.php
@@ -0,0 +1,177 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {html_table} function plugin
+ *
+ * Type: function<br>
+ * Name: html_table<br>
+ * Date: Feb 17, 2003<br>
+ * Purpose: make an html table from an array of data<br>
+ * Params:
+ * <pre>
+ * - loop - array to loop through
+ * - cols - number of columns, comma separated list of column names
+ * or array of column names
+ * - rows - number of rows
+ * - table_attr - table attributes
+ * - th_attr - table heading attributes (arrays are cycled)
+ * - tr_attr - table row attributes (arrays are cycled)
+ * - td_attr - table cell attributes (arrays are cycled)
+ * - trailpad - value to pad trailing cells with
+ * - caption - text for caption element
+ * - vdir - vertical direction (default: "down", means top-to-bottom)
+ * - hdir - horizontal direction (default: "right", means left-to-right)
+ * - inner - inner loop (default "cols": print $loop line by line,
+ * $loop will be printed column by column otherwise)
+ * </pre>
+ * Examples:
+ * <pre>
+ * {table loop=$data}
+ * {table loop=$data cols=4 tr_attr='"bgcolor=red"'}
+ * {table loop=$data cols="first,second,third" tr_attr=$colors}
+ * </pre>
+ *
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author credit to Messju Mohr <messju at lammfellpuschen dot de>
+ * @author credit to boots <boots dot smarty at yahoo dot com>
+ * @version 1.1
+ * @link http://www.smarty.net/manual/en/language.function.html.table.php {html_table}
+ * (Smarty online manual)
+ * @param array $params parameters
+ * @param Smarty_Internal_Template $template template object
+ * @return string
+ */
+function smarty_function_html_table($params, $template)
+{
+ $table_attr = 'border="1"';
+ $tr_attr = '';
+ $th_attr = '';
+ $td_attr = '';
+ $cols = $cols_count = 3;
+ $rows = 3;
+ $trailpad = '&nbsp;';
+ $vdir = 'down';
+ $hdir = 'right';
+ $inner = 'cols';
+ $caption = '';
+ $loop = null;
+
+ if (!isset($params['loop'])) {
+ trigger_error("html_table: missing 'loop' parameter",E_USER_WARNING);
+ return;
+ }
+
+ foreach ($params as $_key => $_value) {
+ switch ($_key) {
+ case 'loop':
+ $$_key = (array)$_value;
+ break;
+
+ case 'cols':
+ if (is_array($_value) && !empty($_value)) {
+ $cols = $_value;
+ $cols_count = count($_value);
+ } elseif (!is_numeric($_value) && is_string($_value) && !empty($_value)) {
+ $cols = explode(',', $_value);
+ $cols_count = count($cols);
+ } elseif (!empty($_value)) {
+ $cols_count = (int)$_value;
+ } else {
+ $cols_count = $cols;
+ }
+ break;
+
+ case 'rows':
+ $$_key = (int)$_value;
+ break;
+
+ case 'table_attr':
+ case 'trailpad':
+ case 'hdir':
+ case 'vdir':
+ case 'inner':
+ case 'caption':
+ $$_key = (string)$_value;
+ break;
+
+ case 'tr_attr':
+ case 'td_attr':
+ case 'th_attr':
+ $$_key = $_value;
+ break;
+ }
+ }
+
+ $loop_count = count($loop);
+ if (empty($params['rows'])) {
+ /* no rows specified */
+ $rows = ceil($loop_count / $cols_count);
+ } elseif (empty($params['cols'])) {
+ if (!empty($params['rows'])) {
+ /* no cols specified, but rows */
+ $cols_count = ceil($loop_count / $rows);
+ }
+ }
+
+ $output = "<table $table_attr>\n";
+
+ if (!empty($caption)) {
+ $output .= '<caption>' . $caption . "</caption>\n";
+ }
+
+ if (is_array($cols)) {
+ $cols = ($hdir == 'right') ? $cols : array_reverse($cols);
+ $output .= "<thead><tr>\n";
+
+ for ($r = 0; $r < $cols_count; $r++) {
+ $output .= '<th' . smarty_function_html_table_cycle('th', $th_attr, $r) . '>';
+ $output .= $cols[$r];
+ $output .= "</th>\n";
+ }
+ $output .= "</tr></thead>\n";
+ }
+
+ $output .= "<tbody>\n";
+ for ($r = 0; $r < $rows; $r++) {
+ $output .= "<tr" . smarty_function_html_table_cycle('tr', $tr_attr, $r) . ">\n";
+ $rx = ($vdir == 'down') ? $r * $cols_count : ($rows-1 - $r) * $cols_count;
+
+ for ($c = 0; $c < $cols_count; $c++) {
+ $x = ($hdir == 'right') ? $rx + $c : $rx + $cols_count-1 - $c;
+ if ($inner != 'cols') {
+ /* shuffle x to loop over rows*/
+ $x = floor($x / $cols_count) + ($x % $cols_count) * $rows;
+ }
+
+ if ($x < $loop_count) {
+ $output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">" . $loop[$x] . "</td>\n";
+ } else {
+ $output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">$trailpad</td>\n";
+ }
+ }
+ $output .= "</tr>\n";
+ }
+ $output .= "</tbody>\n";
+ $output .= "</table>\n";
+
+ return $output;
+}
+
+function smarty_function_html_table_cycle($name, $var, $no)
+{
+ if (!is_array($var)) {
+ $ret = $var;
+ } else {
+ $ret = $var[$no % count($var)];
+ }
+
+ return ($ret) ? ' ' . $ret : '';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/function.mailto.php b/library/Smarty/libs/plugins/function.mailto.php
new file mode 100644
index 000000000..55d5c0602
--- /dev/null
+++ b/library/Smarty/libs/plugins/function.mailto.php
@@ -0,0 +1,152 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {mailto} function plugin
+ *
+ * Type: function<br>
+ * Name: mailto<br>
+ * Date: May 21, 2002
+ * Purpose: automate mailto address link creation, and optionally encode them.<br>
+ * Params:
+ * <pre>
+ * - address - (required) - e-mail address
+ * - text - (optional) - text to display, default is address
+ * - encode - (optional) - can be one of:
+ * * none : no encoding (default)
+ * * javascript : encode with javascript
+ * * javascript_charcode : encode with javascript charcode
+ * * hex : encode with hexidecimal (no javascript)
+ * - cc - (optional) - address(es) to carbon copy
+ * - bcc - (optional) - address(es) to blind carbon copy
+ * - subject - (optional) - e-mail subject
+ * - newsgroups - (optional) - newsgroup(s) to post to
+ * - followupto - (optional) - address(es) to follow up to
+ * - extra - (optional) - extra tags for the href link
+ * </pre>
+ * Examples:
+ * <pre>
+ * {mailto address="me@domain.com"}
+ * {mailto address="me@domain.com" encode="javascript"}
+ * {mailto address="me@domain.com" encode="hex"}
+ * {mailto address="me@domain.com" subject="Hello to you!"}
+ * {mailto address="me@domain.com" cc="you@domain.com,they@domain.com"}
+ * {mailto address="me@domain.com" extra='class="mailto"'}
+ * </pre>
+ *
+ * @link http://www.smarty.net/manual/en/language.function.mailto.php {mailto}
+ * (Smarty online manual)
+ * @version 1.2
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author credits to Jason Sweat (added cc, bcc and subject functionality)
+ * @param array $params parameters
+ * @param Smarty_Internal_Template $template template object
+ * @return string
+ */
+function smarty_function_mailto($params, $template)
+{
+ static $_allowed_encoding = array('javascript' => true, 'javascript_charcode' => true, 'hex' => true, 'none' => true);
+ $extra = '';
+
+ if (empty($params['address'])) {
+ trigger_error("mailto: missing 'address' parameter",E_USER_WARNING);
+ return;
+ } else {
+ $address = $params['address'];
+ }
+
+ $text = $address;
+ // netscape and mozilla do not decode %40 (@) in BCC field (bug?)
+ // so, don't encode it.
+ $search = array('%40', '%2C');
+ $replace = array('@', ',');
+ $mail_parms = array();
+ foreach ($params as $var => $value) {
+ switch ($var) {
+ case 'cc':
+ case 'bcc':
+ case 'followupto':
+ if (!empty($value))
+ $mail_parms[] = $var . '=' . str_replace($search, $replace, rawurlencode($value));
+ break;
+
+ case 'subject':
+ case 'newsgroups':
+ $mail_parms[] = $var . '=' . rawurlencode($value);
+ break;
+
+ case 'extra':
+ case 'text':
+ $$var = $value;
+
+ default:
+ }
+ }
+
+ if ($mail_parms) {
+ $address .= '?' . join('&', $mail_parms);
+ }
+
+ $encode = (empty($params['encode'])) ? 'none' : $params['encode'];
+ if (!isset($_allowed_encoding[$encode])) {
+ trigger_error("mailto: 'encode' parameter must be none, javascript, javascript_charcode or hex", E_USER_WARNING);
+ return;
+ }
+ // FIXME: (rodneyrehm) document.write() excues me what? 1998 has passed!
+ if ($encode == 'javascript') {
+ $string = 'document.write(\'<a href="mailto:' . $address . '" ' . $extra . '>' . $text . '</a>\');';
+
+ $js_encode = '';
+ for ($x = 0, $_length = strlen($string); $x < $_length; $x++) {
+ $js_encode .= '%' . bin2hex($string[$x]);
+ }
+
+ return '<script type="text/javascript">eval(unescape(\'' . $js_encode . '\'))</script>';
+ } elseif ($encode == 'javascript_charcode') {
+ $string = '<a href="mailto:' . $address . '" ' . $extra . '>' . $text . '</a>';
+
+ for($x = 0, $y = strlen($string); $x < $y; $x++) {
+ $ord[] = ord($string[$x]);
+ }
+
+ $_ret = "<script type=\"text/javascript\" language=\"javascript\">\n"
+ . "{document.write(String.fromCharCode("
+ . implode(',', $ord)
+ . "))"
+ . "}\n"
+ . "</script>\n";
+
+ return $_ret;
+ } elseif ($encode == 'hex') {
+ preg_match('!^(.*)(\?.*)$!', $address, $match);
+ if (!empty($match[2])) {
+ trigger_error("mailto: hex encoding does not work with extra attributes. Try javascript.",E_USER_WARNING);
+ return;
+ }
+ $address_encode = '';
+ for ($x = 0, $_length = strlen($address); $x < $_length; $x++) {
+ if (preg_match('!\w!' . Smarty::$_UTF8_MODIFIER, $address[$x])) {
+ $address_encode .= '%' . bin2hex($address[$x]);
+ } else {
+ $address_encode .= $address[$x];
+ }
+ }
+ $text_encode = '';
+ for ($x = 0, $_length = strlen($text); $x < $_length; $x++) {
+ $text_encode .= '&#x' . bin2hex($text[$x]) . ';';
+ }
+
+ $mailto = "&#109;&#97;&#105;&#108;&#116;&#111;&#58;";
+ return '<a href="' . $mailto . $address_encode . '" ' . $extra . '>' . $text_encode . '</a>';
+ } else {
+ // no encoding
+ return '<a href="mailto:' . $address . '" ' . $extra . '>' . $text . '</a>';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/function.math.php b/library/Smarty/libs/plugins/function.math.php
new file mode 100644
index 000000000..f4d3f05ee
--- /dev/null
+++ b/library/Smarty/libs/plugins/function.math.php
@@ -0,0 +1,87 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * This plugin is only for Smarty2 BC
+ * @package Smarty
+ * @subpackage PluginsFunction
+ */
+
+/**
+ * Smarty {math} function plugin
+ *
+ * Type: function<br>
+ * Name: math<br>
+ * Purpose: handle math computations in template
+ *
+ * @link http://www.smarty.net/manual/en/language.function.math.php {math}
+ * (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param array $params parameters
+ * @param Smarty_Internal_Template $template template object
+ * @return string|null
+ */
+function smarty_function_math($params, $template)
+{
+ static $_allowed_funcs = array(
+ 'int' => true, 'abs' => true, 'ceil' => true, 'cos' => true, 'exp' => true, 'floor' => true,
+ 'log' => true, 'log10' => true, 'max' => true, 'min' => true, 'pi' => true, 'pow' => true,
+ 'rand' => true, 'round' => true, 'sin' => true, 'sqrt' => true, 'srand' => true ,'tan' => true
+ );
+ // be sure equation parameter is present
+ if (empty($params['equation'])) {
+ trigger_error("math: missing equation parameter",E_USER_WARNING);
+ return;
+ }
+
+ $equation = $params['equation'];
+
+ // make sure parenthesis are balanced
+ if (substr_count($equation,"(") != substr_count($equation,")")) {
+ trigger_error("math: unbalanced parenthesis",E_USER_WARNING);
+ return;
+ }
+
+ // match all vars in equation, make sure all are passed
+ preg_match_all("!(?:0x[a-fA-F0-9]+)|([a-zA-Z][a-zA-Z0-9_]*)!",$equation, $match);
+
+ foreach($match[1] as $curr_var) {
+ if ($curr_var && !isset($params[$curr_var]) && !isset($_allowed_funcs[$curr_var])) {
+ trigger_error("math: function call $curr_var not allowed",E_USER_WARNING);
+ return;
+ }
+ }
+
+ foreach($params as $key => $val) {
+ if ($key != "equation" && $key != "format" && $key != "assign") {
+ // make sure value is not empty
+ if (strlen($val)==0) {
+ trigger_error("math: parameter $key is empty",E_USER_WARNING);
+ return;
+ }
+ if (!is_numeric($val)) {
+ trigger_error("math: parameter $key: is not numeric",E_USER_WARNING);
+ return;
+ }
+ $equation = preg_replace("/\b$key\b/", " \$params['$key'] ", $equation);
+ }
+ }
+ $smarty_math_result = null;
+ eval("\$smarty_math_result = ".$equation.";");
+
+ if (empty($params['format'])) {
+ if (empty($params['assign'])) {
+ return $smarty_math_result;
+ } else {
+ $template->assign($params['assign'],$smarty_math_result);
+ }
+ } else {
+ if (empty($params['assign'])){
+ printf($params['format'],$smarty_math_result);
+ } else {
+ $template->assign($params['assign'],sprintf($params['format'],$smarty_math_result));
+ }
+ }
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifier.capitalize.php b/library/Smarty/libs/plugins/modifier.capitalize.php
new file mode 100644
index 000000000..a78e3632a
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifier.capitalize.php
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifier
+ */
+
+/**
+ * Smarty capitalize modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: capitalize<br>
+ * Purpose: capitalize words in the string
+ *
+ * {@internal {$string|capitalize:true:true} is the fastest option for MBString enabled systems }}
+ *
+ * @param string $string string to capitalize
+ * @param boolean $uc_digits also capitalize "x123" to "X123"
+ * @param boolean $lc_rest capitalize first letters, lowercase all following letters "aAa" to "Aaa"
+ * @return string capitalized string
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author Rodney Rehm
+ */
+function smarty_modifier_capitalize($string, $uc_digits = false, $lc_rest = false)
+{
+ if (Smarty::$_MBSTRING) {
+ if ($lc_rest) {
+ // uppercase (including hyphenated words)
+ $upper_string = mb_convert_case( $string, MB_CASE_TITLE, Smarty::$_CHARSET );
+ } else {
+ // uppercase word breaks
+ $upper_string = preg_replace("!(^|[^\p{L}'])([\p{Ll}])!eS" . Smarty::$_UTF8_MODIFIER, "stripslashes('\\1').mb_convert_case(stripslashes('\\2'),MB_CASE_UPPER, '" . addslashes(Smarty::$_CHARSET) . "')", $string);
+ }
+ // check uc_digits case
+ if (!$uc_digits) {
+ if (preg_match_all("!\b([\p{L}]*[\p{N}]+[\p{L}]*)\b!" . Smarty::$_UTF8_MODIFIER, $string, $matches, PREG_OFFSET_CAPTURE)) {
+ foreach($matches[1] as $match) {
+ $upper_string = substr_replace($upper_string, mb_strtolower($match[0], Smarty::$_CHARSET), $match[1], strlen($match[0]));
+ }
+ }
+ }
+ $upper_string = preg_replace("!((^|\s)['\"])(\w)!e" . Smarty::$_UTF8_MODIFIER, "stripslashes('\\1').mb_convert_case(stripslashes('\\3'),MB_CASE_UPPER, '" . addslashes(Smarty::$_CHARSET) . "')", $upper_string);
+ return $upper_string;
+ }
+
+ // lowercase first
+ if ($lc_rest) {
+ $string = strtolower($string);
+ }
+ // uppercase (including hyphenated words)
+ $upper_string = preg_replace("!(^|[^\p{L}'])([\p{Ll}])!eS" . Smarty::$_UTF8_MODIFIER, "stripslashes('\\1').ucfirst(stripslashes('\\2'))", $string);
+ // check uc_digits case
+ if (!$uc_digits) {
+ if (preg_match_all("!\b([\p{L}]*[\p{N}]+[\p{L}]*)\b!" . Smarty::$_UTF8_MODIFIER, $string, $matches, PREG_OFFSET_CAPTURE)) {
+ foreach($matches[1] as $match) {
+ $upper_string = substr_replace($upper_string, strtolower($match[0]), $match[1], strlen($match[0]));
+ }
+ }
+ }
+ $upper_string = preg_replace("!((^|\s)['\"])(\w)!e" . Smarty::$_UTF8_MODIFIER, "stripslashes('\\1').strtoupper(stripslashes('\\3'))", $upper_string);
+ return $upper_string;
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifier.date_format.php b/library/Smarty/libs/plugins/modifier.date_format.php
new file mode 100644
index 000000000..f3eaba057
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifier.date_format.php
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifier
+ */
+
+/**
+ * Smarty date_format modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: date_format<br>
+ * Purpose: format datestamps via strftime<br>
+ * Input:<br>
+ * - string: input date string
+ * - format: strftime format for output
+ * - default_date: default date if $string is empty
+ *
+ * @link http://www.smarty.net/manual/en/language.modifier.date.format.php date_format (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string $string input date string
+ * @param string $format strftime format for output
+ * @param string $default_date default date if $string is empty
+ * @param string $formatter either 'strftime' or 'auto'
+ * @return string |void
+ * @uses smarty_make_timestamp()
+ */
+function smarty_modifier_date_format($string, $format=null, $default_date='', $formatter='auto')
+{
+ if ($format === null) {
+ $format = Smarty::$_DATE_FORMAT;
+ }
+ /**
+ * Include the {@link shared.make_timestamp.php} plugin
+ */
+ require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
+ if ($string != '' && $string != '0000-00-00' && $string != '0000-00-00 00:00:00') {
+ $timestamp = smarty_make_timestamp($string);
+ } elseif ($default_date != '') {
+ $timestamp = smarty_make_timestamp($default_date);
+ } else {
+ return;
+ }
+ if($formatter=='strftime'||($formatter=='auto'&&strpos($format,'%')!==false)) {
+ if (DS == '\\') {
+ $_win_from = array('%D', '%h', '%n', '%r', '%R', '%t', '%T');
+ $_win_to = array('%m/%d/%y', '%b', "\n", '%I:%M:%S %p', '%H:%M', "\t", '%H:%M:%S');
+ if (strpos($format, '%e') !== false) {
+ $_win_from[] = '%e';
+ $_win_to[] = sprintf('%\' 2d', date('j', $timestamp));
+ }
+ if (strpos($format, '%l') !== false) {
+ $_win_from[] = '%l';
+ $_win_to[] = sprintf('%\' 2d', date('h', $timestamp));
+ }
+ $format = str_replace($_win_from, $_win_to, $format);
+ }
+ return strftime($format, $timestamp);
+ } else {
+ return date($format, $timestamp);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifier.debug_print_var.php b/library/Smarty/libs/plugins/modifier.debug_print_var.php
new file mode 100644
index 000000000..fa44100e8
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifier.debug_print_var.php
@@ -0,0 +1,105 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage Debug
+ */
+
+/**
+ * Smarty debug_print_var modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: debug_print_var<br>
+ * Purpose: formats variable contents for display in the console
+ *
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param array|object $var variable to be formatted
+ * @param integer $depth maximum recursion depth if $var is an array
+ * @param integer $length maximum string length if $var is a string
+ * @return string
+ */
+function smarty_modifier_debug_print_var ($var, $depth = 0, $length = 40)
+{
+ $_replace = array("\n" => '<i>\n</i>',
+ "\r" => '<i>\r</i>',
+ "\t" => '<i>\t</i>'
+ );
+
+ switch (gettype($var)) {
+ case 'array' :
+ $results = '<b>Array (' . count($var) . ')</b>';
+ foreach ($var as $curr_key => $curr_val) {
+ $results .= '<br>' . str_repeat('&nbsp;', $depth * 2)
+ . '<b>' . strtr($curr_key, $_replace) . '</b> =&gt; '
+ . smarty_modifier_debug_print_var($curr_val, ++$depth, $length);
+ $depth--;
+ }
+ break;
+
+ case 'object' :
+ $object_vars = get_object_vars($var);
+ $results = '<b>' . get_class($var) . ' Object (' . count($object_vars) . ')</b>';
+ foreach ($object_vars as $curr_key => $curr_val) {
+ $results .= '<br>' . str_repeat('&nbsp;', $depth * 2)
+ . '<b> -&gt;' . strtr($curr_key, $_replace) . '</b> = '
+ . smarty_modifier_debug_print_var($curr_val, ++$depth, $length);
+ $depth--;
+ }
+ break;
+
+ case 'boolean' :
+ case 'NULL' :
+ case 'resource' :
+ if (true === $var) {
+ $results = 'true';
+ } elseif (false === $var) {
+ $results = 'false';
+ } elseif (null === $var) {
+ $results = 'null';
+ } else {
+ $results = htmlspecialchars((string) $var);
+ }
+ $results = '<i>' . $results . '</i>';
+ break;
+
+ case 'integer' :
+ case 'float' :
+ $results = htmlspecialchars((string) $var);
+ break;
+
+ case 'string' :
+ $results = strtr($var, $_replace);
+ if (Smarty::$_MBSTRING) {
+ if (mb_strlen($var, Smarty::$_CHARSET) > $length) {
+ $results = mb_substr($var, 0, $length - 3, Smarty::$_CHARSET) . '...';
+ }
+ } else {
+ if (isset($var[$length])) {
+ $results = substr($var, 0, $length - 3) . '...';
+ }
+ }
+
+ $results = htmlspecialchars('"' . $results . '"');
+ break;
+
+ case 'unknown type' :
+ default :
+ $results = strtr((string) $var, $_replace);
+ if (Smarty::$_MBSTRING) {
+ if (mb_strlen($results, Smarty::$_CHARSET) > $length) {
+ $results = mb_substr($results, 0, $length - 3, Smarty::$_CHARSET) . '...';
+ }
+ } else {
+ if (strlen($results) > $length) {
+ $results = substr($results, 0, $length - 3) . '...';
+ }
+ }
+
+ $results = htmlspecialchars($results);
+ }
+
+ return $results;
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifier.escape.php b/library/Smarty/libs/plugins/modifier.escape.php
new file mode 100644
index 000000000..32d185fce
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifier.escape.php
@@ -0,0 +1,188 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifier
+ */
+
+/**
+ * Smarty escape modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: escape<br>
+ * Purpose: escape string for output
+ *
+ * @link http://www.smarty.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string $string input string
+ * @param string $esc_type escape type
+ * @param string $char_set character set, used for htmlspecialchars() or htmlentities()
+ * @param boolean $double_encode encode already encoded entitites again, used for htmlspecialchars() or htmlentities()
+ * @return string escaped input string
+ */
+function smarty_modifier_escape($string, $esc_type = 'html', $char_set = null, $double_encode = true)
+{
+ static $_double_encode = null;
+ if ($_double_encode === null) {
+ $_double_encode = version_compare(PHP_VERSION, '5.2.3', '>=');
+ }
+
+ if (!$char_set) {
+ $char_set = Smarty::$_CHARSET;
+ }
+
+ switch ($esc_type) {
+ case 'html':
+ if ($_double_encode) {
+ // php >=5.3.2 - go native
+ return htmlspecialchars($string, ENT_QUOTES, $char_set, $double_encode);
+ } else {
+ if ($double_encode) {
+ // php <5.3.2 - only handle double encoding
+ return htmlspecialchars($string, ENT_QUOTES, $char_set);
+ } else {
+ // php <5.3.2 - prevent double encoding
+ $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
+ $string = htmlspecialchars($string, ENT_QUOTES, $char_set);
+ $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
+ return $string;
+ }
+ }
+
+ case 'htmlall':
+ if (Smarty::$_MBSTRING) {
+ // mb_convert_encoding ignores htmlspecialchars()
+ if ($_double_encode) {
+ // php >=5.3.2 - go native
+ $string = htmlspecialchars($string, ENT_QUOTES, $char_set, $double_encode);
+ } else {
+ if ($double_encode) {
+ // php <5.3.2 - only handle double encoding
+ $string = htmlspecialchars($string, ENT_QUOTES, $char_set);
+ } else {
+ // php <5.3.2 - prevent double encoding
+ $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
+ $string = htmlspecialchars($string, ENT_QUOTES, $char_set);
+ $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
+ return $string;
+ }
+ }
+
+ // htmlentities() won't convert everything, so use mb_convert_encoding
+ return mb_convert_encoding($string, 'HTML-ENTITIES', $char_set);
+ }
+
+ // no MBString fallback
+ if ($_double_encode) {
+ return htmlentities($string, ENT_QUOTES, $char_set, $double_encode);
+ } else {
+ if ($double_encode) {
+ return htmlentities($string, ENT_QUOTES, $char_set);
+ } else {
+ $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
+ $string = htmlentities($string, ENT_QUOTES, $char_set);
+ $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
+ return $string;
+ }
+ }
+
+ case 'url':
+ return rawurlencode($string);
+
+ case 'urlpathinfo':
+ return str_replace('%2F', '/', rawurlencode($string));
+
+ case 'quotes':
+ // escape unescaped single quotes
+ return preg_replace("%(?<!\\\\)'%", "\\'", $string);
+
+ case 'hex':
+ // escape every byte into hex
+ // Note that the UTF-8 encoded character ä will be represented as %c3%a4
+ $return = '';
+ $_length = strlen($string);
+ for ($x = 0; $x < $_length; $x++) {
+ $return .= '%' . bin2hex($string[$x]);
+ }
+ return $return;
+
+ case 'hexentity':
+ $return = '';
+ if (Smarty::$_MBSTRING) {
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');
+ $return = '';
+ foreach (smarty_mb_to_unicode($string, Smarty::$_CHARSET) as $unicode) {
+ $return .= '&#x' . strtoupper(dechex($unicode)) . ';';
+ }
+ return $return;
+ }
+ // no MBString fallback
+ $_length = strlen($string);
+ for ($x = 0; $x < $_length; $x++) {
+ $return .= '&#x' . bin2hex($string[$x]) . ';';
+ }
+ return $return;
+
+ case 'decentity':
+ $return = '';
+ if (Smarty::$_MBSTRING) {
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');
+ $return = '';
+ foreach (smarty_mb_to_unicode($string, Smarty::$_CHARSET) as $unicode) {
+ $return .= '&#' . $unicode . ';';
+ }
+ return $return;
+ }
+ // no MBString fallback
+ $_length = strlen($string);
+ for ($x = 0; $x < $_length; $x++) {
+ $return .= '&#' . ord($string[$x]) . ';';
+ }
+ return $return;
+
+ case 'javascript':
+ // escape quotes and backslashes, newlines, etc.
+ return strtr($string, array('\\' => '\\\\', "'" => "\\'", '"' => '\\"', "\r" => '\\r', "\n" => '\\n', '</' => '<\/'));
+
+ case 'mail':
+ if (Smarty::$_MBSTRING) {
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
+ return smarty_mb_str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);
+ }
+ // no MBString fallback
+ return str_replace(array('@', '.'), array(' [AT] ', ' [DOT] '), $string);
+
+ case 'nonstd':
+ // escape non-standard chars, such as ms document quotes
+ $return = '';
+ if (Smarty::$_MBSTRING) {
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_unicode.php');
+ foreach (smarty_mb_to_unicode($string, Smarty::$_CHARSET) as $unicode) {
+ if ($unicode >= 126) {
+ $return .= '&#' . $unicode . ';';
+ } else {
+ $return .= chr($unicode);
+ }
+ }
+ return $return;
+ }
+
+ $_length = strlen($string);
+ for ($_i = 0; $_i < $_length; $_i++) {
+ $_ord = ord(substr($string, $_i, 1));
+ // non-standard char, escape it
+ if ($_ord >= 126) {
+ $return .= '&#' . $_ord . ';';
+ } else {
+ $return .= substr($string, $_i, 1);
+ }
+ }
+ return $return;
+
+ default:
+ return $string;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifier.regex_replace.php b/library/Smarty/libs/plugins/modifier.regex_replace.php
new file mode 100644
index 000000000..f9fd5fa53
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifier.regex_replace.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifier
+ */
+
+/**
+ * Smarty regex_replace modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: regex_replace<br>
+ * Purpose: regular expression search/replace
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php
+ * regex_replace (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string $string input string
+ * @param string|array $search regular expression(s) to search for
+ * @param string|array $replace string(s) that should be replaced
+ * @return string
+ */
+function smarty_modifier_regex_replace($string, $search, $replace)
+{
+ if(is_array($search)) {
+ foreach($search as $idx => $s) {
+ $search[$idx] = _smarty_regex_replace_check($s);
+ }
+ } else {
+ $search = _smarty_regex_replace_check($search);
+ }
+ return preg_replace($search, $replace, $string);
+}
+
+/**
+ * @param string $search string(s) that should be replaced
+ * @return string
+ * @ignore
+ */
+function _smarty_regex_replace_check($search)
+{
+ // null-byte injection detection
+ // anything behind the first null-byte is ignored
+ if (($pos = strpos($search,"\0")) !== false) {
+ $search = substr($search,0,$pos);
+ }
+ // remove eval-modifier from $search
+ if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
+ $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
+ }
+ return $search;
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifier.replace.php b/library/Smarty/libs/plugins/modifier.replace.php
new file mode 100644
index 000000000..4d71a6e9b
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifier.replace.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage PluginsModifier
+ */
+
+/**
+ * Smarty replace modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: replace<br>
+ * Purpose: simple search/replace
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.replace.php replace (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author Uwe Tews
+ * @param string $string input string
+ * @param string $search text to search for
+ * @param string $replace replacement text
+ * @return string
+ */
+function smarty_modifier_replace($string, $search, $replace)
+{
+ if (Smarty::$_MBSTRING) {
+ require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
+ return smarty_mb_str_replace($search, $replace, $string);
+ }
+
+ return str_replace($search, $replace, $string);
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifier.spacify.php b/library/Smarty/libs/plugins/modifier.spacify.php
new file mode 100644
index 000000000..a907232ff
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifier.spacify.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage PluginsModifier
+ */
+
+/**
+ * Smarty spacify modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: spacify<br>
+ * Purpose: add spaces between characters in a string
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.spacify.php spacify (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string $string input string
+ * @param string $spacify_char string to insert between characters.
+ * @return string
+ */
+function smarty_modifier_spacify($string, $spacify_char = ' ')
+{
+ // well… what about charsets besides latin and UTF-8?
+ return implode($spacify_char, preg_split('//' . Smarty::$_UTF8_MODIFIER, $string, -1, PREG_SPLIT_NO_EMPTY));
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifier.truncate.php b/library/Smarty/libs/plugins/modifier.truncate.php
new file mode 100644
index 000000000..9a803ec99
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifier.truncate.php
@@ -0,0 +1,59 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifier
+ */
+
+/**
+ * Smarty truncate modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: truncate<br>
+ * Purpose: Truncate a string to a certain length if necessary,
+ * optionally splitting in the middle of a word, and
+ * appending the $etc string or inserting $etc into the middle.
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.truncate.php truncate (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string $string input string
+ * @param integer $length length of truncated text
+ * @param string $etc end string
+ * @param boolean $break_words truncate at word boundary
+ * @param boolean $middle truncate in the middle of text
+ * @return string truncated string
+ */
+function smarty_modifier_truncate($string, $length = 80, $etc = '...', $break_words = false, $middle = false) {
+ if ($length == 0)
+ return '';
+
+ if (Smarty::$_MBSTRING) {
+ if (mb_strlen($string, Smarty::$_CHARSET) > $length) {
+ $length -= min($length, mb_strlen($etc, Smarty::$_CHARSET));
+ if (!$break_words && !$middle) {
+ $string = preg_replace('/\s+?(\S+)?$/' . Smarty::$_UTF8_MODIFIER, '', mb_substr($string, 0, $length + 1, Smarty::$_CHARSET));
+ }
+ if (!$middle) {
+ return mb_substr($string, 0, $length, Smarty::$_CHARSET) . $etc;
+ }
+ return mb_substr($string, 0, $length / 2, Smarty::$_CHARSET) . $etc . mb_substr($string, - $length / 2, $length, Smarty::$_CHARSET);
+ }
+ return $string;
+ }
+
+ // no MBString fallback
+ if (isset($string[$length])) {
+ $length -= min($length, strlen($etc));
+ if (!$break_words && !$middle) {
+ $string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length + 1));
+ }
+ if (!$middle) {
+ return substr($string, 0, $length) . $etc;
+ }
+ return substr($string, 0, $length / 2) . $etc . substr($string, - $length / 2);
+ }
+ return $string;
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.cat.php b/library/Smarty/libs/plugins/modifiercompiler.cat.php
new file mode 100644
index 000000000..1cfe6308a
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.cat.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty cat modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: cat<br>
+ * Date: Feb 24, 2003<br>
+ * Purpose: catenate a value to a variable<br>
+ * Input: string to catenate<br>
+ * Example: {$var|cat:"foo"}
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.cat.php cat
+ * (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_cat($params, $compiler)
+{
+ return '('.implode(').(', $params).')';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.count_characters.php b/library/Smarty/libs/plugins/modifiercompiler.count_characters.php
new file mode 100644
index 000000000..98e8efa0d
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.count_characters.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty count_characters modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: count_characteres<br>
+ * Purpose: count the number of characters in a text
+ *
+ * @link http://www.smarty.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_count_characters($params, $compiler)
+{
+ if (!isset($params[1]) || $params[1] != 'true') {
+ return 'preg_match_all(\'/[^\s]/' . Smarty::$_UTF8_MODIFIER . '\',' . $params[0] . ', $tmp)';
+ }
+ if (Smarty::$_MBSTRING) {
+ return 'mb_strlen(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')';
+ }
+ // no MBString fallback
+ return 'strlen(' . $params[0] . ')';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.count_paragraphs.php b/library/Smarty/libs/plugins/modifiercompiler.count_paragraphs.php
new file mode 100644
index 000000000..0e1b0af83
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.count_paragraphs.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty count_paragraphs modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: count_paragraphs<br>
+ * Purpose: count the number of paragraphs in a text
+ *
+ * @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php
+ * count_paragraphs (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_count_paragraphs($params, $compiler)
+{
+ // count \r or \n characters
+ return '(preg_match_all(\'#[\r\n]+#\', ' . $params[0] . ', $tmp)+1)';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.count_sentences.php b/library/Smarty/libs/plugins/modifiercompiler.count_sentences.php
new file mode 100644
index 000000000..2f517be96
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.count_sentences.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty count_sentences modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: count_sentences
+ * Purpose: count the number of sentences in a text
+ *
+ * @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php
+ * count_sentences (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_count_sentences($params, $compiler)
+{
+ // find periods, question marks, exclamation marks with a word before but not after.
+ return 'preg_match_all("#\w[\.\?\!](\W|$)#S' . Smarty::$_UTF8_MODIFIER . '", ' . $params[0] . ', $tmp)';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.count_words.php b/library/Smarty/libs/plugins/modifiercompiler.count_words.php
new file mode 100644
index 000000000..e05738c01
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.count_words.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty count_words modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: count_words<br>
+ * Purpose: count the number of words in a text
+ *
+ * @link http://www.smarty.net/manual/en/language.modifier.count.words.php count_words (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+*/
+function smarty_modifiercompiler_count_words($params, $compiler)
+{
+ if (Smarty::$_MBSTRING) {
+ // return 'preg_match_all(\'#[\w\pL]+#' . Smarty::$_UTF8_MODIFIER . '\', ' . $params[0] . ', $tmp)';
+ // expression taken from http://de.php.net/manual/en/function.str-word-count.php#85592
+ return 'preg_match_all(\'/\p{L}[\p{L}\p{Mn}\p{Pd}\\\'\x{2019}]*/' . Smarty::$_UTF8_MODIFIER . '\', ' . $params[0] . ', $tmp)';
+ }
+ // no MBString fallback
+ return 'str_word_count(' . $params[0] . ')';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.default.php b/library/Smarty/libs/plugins/modifiercompiler.default.php
new file mode 100644
index 000000000..4f831a589
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.default.php
@@ -0,0 +1,35 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty default modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: default<br>
+ * Purpose: designate default value for empty variables
+ *
+ * @link http://www.smarty.net/manual/en/language.modifier.default.php default (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_default ($params, $compiler)
+{
+ $output = $params[0];
+ if (!isset($params[1])) {
+ $params[1] = "''";
+ }
+
+ array_shift($params);
+ foreach ($params as $param) {
+ $output = '(($tmp = @' . $output . ')===null||$tmp===\'\' ? ' . $param . ' : $tmp)';
+ }
+ return $output;
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.escape.php b/library/Smarty/libs/plugins/modifiercompiler.escape.php
new file mode 100644
index 000000000..48b74d140
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.escape.php
@@ -0,0 +1,125 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * @ignore
+ */
+require_once( SMARTY_PLUGINS_DIR .'shared.literal_compiler_param.php' );
+
+/**
+ * Smarty escape modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: escape<br>
+ * Purpose: escape string for output
+ *
+ * @link http://www.smarty.net/docsv2/en/language.modifier.escape count_characters (Smarty online manual)
+ * @author Rodney Rehm
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_escape($params, $compiler)
+{
+ static $_double_encode = null;
+ if ($_double_encode === null) {
+ $_double_encode = version_compare(PHP_VERSION, '5.2.3', '>=');
+ }
+
+ try {
+ $esc_type = smarty_literal_compiler_param($params, 1, 'html');
+ $char_set = smarty_literal_compiler_param($params, 2, Smarty::$_CHARSET);
+ $double_encode = smarty_literal_compiler_param($params, 3, true);
+
+ if (!$char_set) {
+ $char_set = Smarty::$_CHARSET;
+ }
+
+ switch ($esc_type) {
+ case 'html':
+ if ($_double_encode) {
+ return 'htmlspecialchars('
+ . $params[0] .', ENT_QUOTES, '
+ . var_export($char_set, true) . ', '
+ . var_export($double_encode, true) . ')';
+ } else if ($double_encode) {
+ return 'htmlspecialchars('
+ . $params[0] .', ENT_QUOTES, '
+ . var_export($char_set, true) . ')';
+ } else {
+ // fall back to modifier.escape.php
+ }
+
+ case 'htmlall':
+ if (Smarty::$_MBSTRING) {
+ if ($_double_encode) {
+ // php >=5.3.2 - go native
+ return 'mb_convert_encoding(htmlspecialchars('
+ . $params[0] .', ENT_QUOTES, '
+ . var_export($char_set, true) . ', '
+ . var_export($double_encode, true)
+ . '), "HTML-ENTITIES", '
+ . var_export($char_set, true) . ')';
+ } else if ($double_encode) {
+ // php <5.3.2 - only handle double encoding
+ return 'mb_convert_encoding(htmlspecialchars('
+ . $params[0] .', ENT_QUOTES, '
+ . var_export($char_set, true)
+ . '), "HTML-ENTITIES", '
+ . var_export($char_set, true) . ')';
+ } else {
+ // fall back to modifier.escape.php
+ }
+ }
+
+ // no MBString fallback
+ if ($_double_encode) {
+ // php >=5.3.2 - go native
+ return 'htmlentities('
+ . $params[0] .', ENT_QUOTES, '
+ . var_export($char_set, true) . ', '
+ . var_export($double_encode, true) . ')';
+ } else if ($double_encode) {
+ // php <5.3.2 - only handle double encoding
+ return 'htmlentities('
+ . $params[0] .', ENT_QUOTES, '
+ . var_export($char_set, true) . ')';
+ } else {
+ // fall back to modifier.escape.php
+ }
+
+ case 'url':
+ return 'rawurlencode(' . $params[0] . ')';
+
+ case 'urlpathinfo':
+ return 'str_replace("%2F", "/", rawurlencode(' . $params[0] . '))';
+
+ case 'quotes':
+ // escape unescaped single quotes
+ return 'preg_replace("%(?<!\\\\\\\\)\'%", "\\\'",' . $params[0] . ')';
+
+ case 'javascript':
+ // escape quotes and backslashes, newlines, etc.
+ return 'strtr(' . $params[0] . ', array("\\\\" => "\\\\\\\\", "\'" => "\\\\\'", "\"" => "\\\\\"", "\\r" => "\\\\r", "\\n" => "\\\n", "</" => "<\/" ))';
+
+ }
+ } catch(SmartyException $e) {
+ // pass through to regular plugin fallback
+ }
+
+ // could not optimize |escape call, so fallback to regular plugin
+ if ($compiler->tag_nocache | $compiler->nocache) {
+ $compiler->template->required_plugins['nocache']['escape']['modifier']['file'] = SMARTY_PLUGINS_DIR .'modifier.escape.php';
+ $compiler->template->required_plugins['nocache']['escape']['modifier']['function'] = 'smarty_modifier_escape';
+ } else {
+ $compiler->template->required_plugins['compiled']['escape']['modifier']['file'] = SMARTY_PLUGINS_DIR .'modifier.escape.php';
+ $compiler->template->required_plugins['compiled']['escape']['modifier']['function'] = 'smarty_modifier_escape';
+ }
+ return 'smarty_modifier_escape(' . join( ', ', $params ) . ')';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.from_charset.php b/library/Smarty/libs/plugins/modifiercompiler.from_charset.php
new file mode 100644
index 000000000..93b568a5a
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.from_charset.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty from_charset modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: from_charset<br>
+ * Purpose: convert character encoding from $charset to internal encoding
+ *
+ * @author Rodney Rehm
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_from_charset($params, $compiler)
+{
+ if (!Smarty::$_MBSTRING) {
+ // FIXME: (rodneyrehm) shouldn't this throw an error?
+ return $params[0];
+ }
+
+ if (!isset($params[1])) {
+ $params[1] = '"ISO-8859-1"';
+ }
+
+ return 'mb_convert_encoding(' . $params[0] . ', "' . addslashes(Smarty::$_CHARSET) . '", ' . $params[1] . ')';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.indent.php b/library/Smarty/libs/plugins/modifiercompiler.indent.php
new file mode 100644
index 000000000..020c4fdb3
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.indent.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty indent modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: indent<br>
+ * Purpose: indent lines of text
+ *
+ * @link http://www.smarty.net/manual/en/language.modifier.indent.php indent (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+
+function smarty_modifiercompiler_indent($params, $compiler)
+{
+ if (!isset($params[1])) {
+ $params[1] = 4;
+ }
+ if (!isset($params[2])) {
+ $params[2] = "' '";
+ }
+ return 'preg_replace(\'!^!m\',str_repeat(' . $params[2] . ',' . $params[1] . '),' . $params[0] . ')';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.lower.php b/library/Smarty/libs/plugins/modifiercompiler.lower.php
new file mode 100644
index 000000000..1845cc1d2
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.lower.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * Smarty plugin
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty lower modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: lower<br>
+ * Purpose: convert string to lowercase
+ *
+ * @link http://www.smarty.net/manual/en/language.modifier.lower.php lower (Smarty online manual)
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+
+function smarty_modifiercompiler_lower($params, $compiler)
+{
+ if (Smarty::$_MBSTRING) {
+ return 'mb_strtolower(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')' ;
+ }
+ // no MBString fallback
+ return 'strtolower(' . $params[0] . ')';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.noprint.php b/library/Smarty/libs/plugins/modifiercompiler.noprint.php
new file mode 100644
index 000000000..3ca26571a
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.noprint.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty noprint modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: noprint<br>
+ * Purpose: return an empty string
+ *
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_noprint($params, $compiler)
+{
+ return "''";
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.string_format.php b/library/Smarty/libs/plugins/modifiercompiler.string_format.php
new file mode 100644
index 000000000..83345977b
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.string_format.php
@@ -0,0 +1,26 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty string_format modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: string_format<br>
+ * Purpose: format strings via sprintf
+ *
+ * @link http://www.smarty.net/manual/en/language.modifier.string.format.php string_format (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_string_format($params, $compiler)
+{
+ return 'sprintf(' . $params[1] . ',' . $params[0] . ')';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.strip.php b/library/Smarty/libs/plugins/modifiercompiler.strip.php
new file mode 100644
index 000000000..f1d5db045
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.strip.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty strip modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: strip<br>
+ * Purpose: Replace all repeated spaces, newlines, tabs
+ * with a single space or supplied replacement string.<br>
+ * Example: {$var|strip} {$var|strip:"&nbsp;"}<br>
+ * Date: September 25th, 2002
+ *
+ * @link http://www.smarty.net/manual/en/language.modifier.strip.php strip (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+
+function smarty_modifiercompiler_strip($params, $compiler)
+{
+ if (!isset($params[1])) {
+ $params[1] = "' '";
+ }
+ return "preg_replace('!\s+!" . Smarty::$_UTF8_MODIFIER . "', {$params[1]},{$params[0]})";
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.strip_tags.php b/library/Smarty/libs/plugins/modifiercompiler.strip_tags.php
new file mode 100644
index 000000000..296a3a2da
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.strip_tags.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty strip_tags modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: strip_tags<br>
+ * Purpose: strip html tags from text
+ *
+ * @link http://www.smarty.net/manual/en/language.modifier.strip.tags.php strip_tags (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_strip_tags($params, $compiler)
+{
+ if (!isset($params[1])) {
+ $params[1] = true;
+ }
+ if ($params[1] === true) {
+ return "preg_replace('!<[^>]*?>!', ' ', {$params[0]})";
+ } else {
+ return 'strip_tags(' . $params[0] . ')';
+ }
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.to_charset.php b/library/Smarty/libs/plugins/modifiercompiler.to_charset.php
new file mode 100644
index 000000000..f5cdf455f
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.to_charset.php
@@ -0,0 +1,34 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty to_charset modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: to_charset<br>
+ * Purpose: convert character encoding from internal encoding to $charset
+ *
+ * @author Rodney Rehm
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_to_charset($params, $compiler)
+{
+ if (!Smarty::$_MBSTRING) {
+ // FIXME: (rodneyrehm) shouldn't this throw an error?
+ return $params[0];
+ }
+
+ if (!isset($params[1])) {
+ $params[1] = '"ISO-8859-1"';
+ }
+
+ return 'mb_convert_encoding(' . $params[0] . ', ' . $params[1] . ', "' . addslashes(Smarty::$_CHARSET) . '")';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.unescape.php b/library/Smarty/libs/plugins/modifiercompiler.unescape.php
new file mode 100644
index 000000000..4321ff18d
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.unescape.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty unescape modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: unescape<br>
+ * Purpose: unescape html entities
+ *
+ * @author Rodney Rehm
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_unescape($params, $compiler)
+{
+ if (!isset($params[1])) {
+ $params[1] = 'html';
+ }
+ if (!isset($params[2])) {
+ $params[2] = '\'' . addslashes(Smarty::$_CHARSET) . '\'';
+ } else {
+ $params[2] = "'" . $params[2] . "'";
+ }
+
+ switch (trim($params[1], '"\'')) {
+ case 'entity':
+ case 'htmlall':
+ if (Smarty::$_MBSTRING) {
+ return 'mb_convert_encoding(' . $params[0] . ', ' . $params[2] . ', \'HTML-ENTITIES\')';
+ }
+
+ return 'html_entity_decode(' . $params[0] . ', ENT_NOQUOTES, ' . $params[2] . ')';
+
+ case 'html':
+ return 'htmlspecialchars_decode(' . $params[0] . ', ENT_QUOTES)';
+
+ case 'url':
+ return 'rawurldecode(' . $params[0] . ')';
+
+ default:
+ return $params[0];
+ }
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.upper.php b/library/Smarty/libs/plugins/modifiercompiler.upper.php
new file mode 100644
index 000000000..f368e37dc
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.upper.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty upper modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: lower<br>
+ * Purpose: convert string to uppercase
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_upper($params, $compiler)
+{
+ if (Smarty::$_MBSTRING) {
+ return 'mb_strtoupper(' . $params[0] . ', \'' . addslashes(Smarty::$_CHARSET) . '\')' ;
+ }
+ // no MBString fallback
+ return 'strtoupper(' . $params[0] . ')';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/modifiercompiler.wordwrap.php b/library/Smarty/libs/plugins/modifiercompiler.wordwrap.php
new file mode 100644
index 000000000..f6845ad37
--- /dev/null
+++ b/library/Smarty/libs/plugins/modifiercompiler.wordwrap.php
@@ -0,0 +1,46 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsModifierCompiler
+ */
+
+/**
+ * Smarty wordwrap modifier plugin
+ *
+ * Type: modifier<br>
+ * Name: wordwrap<br>
+ * Purpose: wrap a string of text at a given length
+ *
+ * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php wordwrap (Smarty online manual)
+ * @author Uwe Tews
+ * @param array $params parameters
+ * @return string with compiled code
+ */
+function smarty_modifiercompiler_wordwrap($params, $compiler)
+{
+ if (!isset($params[1])) {
+ $params[1] = 80;
+ }
+ if (!isset($params[2])) {
+ $params[2] = '"\n"';
+ }
+ if (!isset($params[3])) {
+ $params[3] = 'false';
+ }
+ $function = 'wordwrap';
+ if (Smarty::$_MBSTRING) {
+ if ($compiler->tag_nocache | $compiler->nocache) {
+ $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR .'shared.mb_wordwrap.php';
+ $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap';
+ } else {
+ $compiler->template->required_plugins['compiled']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR .'shared.mb_wordwrap.php';
+ $compiler->template->required_plugins['compiled']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap';
+ }
+ $function = 'smarty_mb_wordwrap';
+ }
+ return $function . '(' . $params[0] . ',' . $params[1] . ',' . $params[2] . ',' . $params[3] . ')';
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/outputfilter.trimwhitespace.php b/library/Smarty/libs/plugins/outputfilter.trimwhitespace.php
new file mode 100644
index 000000000..87cf8c781
--- /dev/null
+++ b/library/Smarty/libs/plugins/outputfilter.trimwhitespace.php
@@ -0,0 +1,94 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFilter
+ */
+
+/**
+ * Smarty trimwhitespace outputfilter plugin
+ *
+ * Trim unnecessary whitespace from HTML markup.
+ *
+ * @author Rodney Rehm
+ * @param string $source input string
+ * @param Smarty_Internal_Template $smarty Smarty object
+ * @return string filtered output
+ * @todo substr_replace() is not overloaded by mbstring.func_overload - so this function might fail!
+ */
+function smarty_outputfilter_trimwhitespace($source, Smarty_Internal_Template $smarty)
+{
+ $store = array();
+ $_store = 0;
+ $_offset = 0;
+
+ // Unify Line-Breaks to \n
+ $source = preg_replace("/\015\012|\015|\012/", "\n", $source);
+
+ // capture Internet Explorer Conditional Comments
+ if (preg_match_all('#<!--\[[^\]]+\]>.*?<!\[[^\]]+\]-->#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
+ foreach ($matches as $match) {
+ $store[] = $match[0][0];
+ $_length = strlen($match[0][0]);
+ $replace = '@!@SMARTY:' . $_store . ':SMARTY@!@';
+ $source = substr_replace($source, $replace, $match[0][1] - $_offset, $_length);
+
+ $_offset += $_length - strlen($replace);
+ $_store++;
+ }
+ }
+
+ // Strip all HTML-Comments
+ // yes, even the ones in <script> - see http://stackoverflow.com/a/808850/515124
+ $source = preg_replace( '#<!--.*?-->#ms', '', $source );
+
+ // capture html elements not to be messed with
+ $_offset = 0;
+ if (preg_match_all('#<(script|pre|textarea)[^>]*>.*?</\\1>#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
+ foreach ($matches as $match) {
+ $store[] = $match[0][0];
+ $_length = strlen($match[0][0]);
+ $replace = '@!@SMARTY:' . $_store . ':SMARTY@!@';
+ $source = substr_replace($source, $replace, $match[0][1] - $_offset, $_length);
+
+ $_offset += $_length - strlen($replace);
+ $_store++;
+ }
+ }
+
+ $expressions = array(
+ // replace multiple spaces between tags by a single space
+ // can't remove them entirely, becaue that might break poorly implemented CSS display:inline-block elements
+ '#(:SMARTY@!@|>)\s+(?=@!@SMARTY:|<)#s' => '\1 \2',
+ // remove spaces between attributes (but not in attribute values!)
+ '#(([a-z0-9]\s*=\s*(["\'])[^\3]*?\3)|<[a-z0-9_]+)\s+([a-z/>])#is' => '\1 \4',
+ // note: for some very weird reason trim() seems to remove spaces inside attributes.
+ // maybe a \0 byte or something is interfering?
+ '#^\s+<#Ss' => '<',
+ '#>\s+$#Ss' => '>',
+ );
+
+ $source = preg_replace( array_keys($expressions), array_values($expressions), $source );
+ // note: for some very weird reason trim() seems to remove spaces inside attributes.
+ // maybe a \0 byte or something is interfering?
+ // $source = trim( $source );
+
+ // capture html elements not to be messed with
+ $_offset = 0;
+ if (preg_match_all('#@!@SMARTY:([0-9]+):SMARTY@!@#is', $source, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
+ foreach ($matches as $match) {
+ $store[] = $match[0][0];
+ $_length = strlen($match[0][0]);
+ $replace = array_shift($store);
+ $source = substr_replace($source, $replace, $match[0][1] + $_offset, $_length);
+
+ $_offset += strlen($replace) - $_length;
+ $_store++;
+ }
+ }
+
+ return $source;
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/shared.escape_special_chars.php b/library/Smarty/libs/plugins/shared.escape_special_chars.php
new file mode 100644
index 000000000..d2609b674
--- /dev/null
+++ b/library/Smarty/libs/plugins/shared.escape_special_chars.php
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Smarty shared plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsShared
+ */
+
+if (version_compare(PHP_VERSION, '5.2.3', '>=')) {
+ /**
+ * escape_special_chars common function
+ *
+ * Function: smarty_function_escape_special_chars<br>
+ * Purpose: used by other smarty functions to escape
+ * special chars except for already escaped ones
+ *
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string $string text that should by escaped
+ * @return string
+ */
+ function smarty_function_escape_special_chars($string)
+ {
+ if (!is_array($string)) {
+ $string = htmlspecialchars($string, ENT_COMPAT, Smarty::$_CHARSET, false);
+ }
+ return $string;
+ }
+} else {
+ /**
+ * escape_special_chars common function
+ *
+ * Function: smarty_function_escape_special_chars<br>
+ * Purpose: used by other smarty functions to escape
+ * special chars except for already escaped ones
+ *
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param string $string text that should by escaped
+ * @return string
+ */
+ function smarty_function_escape_special_chars($string)
+ {
+ if (!is_array($string)) {
+ $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
+ $string = htmlspecialchars($string);
+ $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
+ }
+ return $string;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/shared.literal_compiler_param.php b/library/Smarty/libs/plugins/shared.literal_compiler_param.php
new file mode 100644
index 000000000..dbcd9374c
--- /dev/null
+++ b/library/Smarty/libs/plugins/shared.literal_compiler_param.php
@@ -0,0 +1,33 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsShared
+ */
+
+/**
+ * evaluate compiler parameter
+ *
+ * @param array $params parameter array as given to the compiler function
+ * @param integer $index array index of the parameter to convert
+ * @param mixed $default value to be returned if the parameter is not present
+ * @return mixed evaluated value of parameter or $default
+ * @throws SmartyException if parameter is not a literal (but an expression, variable, …)
+ * @author Rodney Rehm
+ */
+function smarty_literal_compiler_param($params, $index, $default=null)
+{
+ // not set, go default
+ if (!isset($params[$index])) {
+ return $default;
+ }
+ // test if param is a literal
+ if (!preg_match('/^([\'"]?)[a-zA-Z0-9]+(\\1)$/', $params[$index])) {
+ throw new SmartyException('$param[' . $index . '] is not a literal and is thus not evaluatable at compile time');
+ }
+
+ $t = null;
+ eval("\$t = " . $params[$index] . ";");
+ return $t;
+}
diff --git a/library/Smarty/libs/plugins/shared.make_timestamp.php b/library/Smarty/libs/plugins/shared.make_timestamp.php
new file mode 100644
index 000000000..5d7c97e91
--- /dev/null
+++ b/library/Smarty/libs/plugins/shared.make_timestamp.php
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Smarty shared plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsShared
+ */
+
+/**
+ * Function: smarty_make_timestamp<br>
+ * Purpose: used by other smarty functions to make a timestamp from a string.
+ *
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @param DateTime|int|string $string date object, timestamp or string that can be converted using strtotime()
+ * @return int
+ */
+function smarty_make_timestamp($string)
+{
+ if (empty($string)) {
+ // use "now":
+ return time();
+ } elseif ($string instanceof DateTime) {
+ return $string->getTimestamp();
+ } elseif (strlen($string) == 14 && ctype_digit($string)) {
+ // it is mysql timestamp format of YYYYMMDDHHMMSS?
+ return mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2),
+ substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4));
+ } elseif (is_numeric($string)) {
+ // it is a numeric string, we handle it as timestamp
+ return (int) $string;
+ } else {
+ // strtotime should handle it
+ $time = strtotime($string);
+ if ($time == -1 || $time === false) {
+ // strtotime() was not able to parse $string, use "now":
+ return time();
+ }
+ return $time;
+ }
+}
+
+?>
diff --git a/library/Smarty/libs/plugins/shared.mb_str_replace.php b/library/Smarty/libs/plugins/shared.mb_str_replace.php
new file mode 100644
index 000000000..ecafeb74a
--- /dev/null
+++ b/library/Smarty/libs/plugins/shared.mb_str_replace.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Smarty shared plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsShared
+ */
+if (!function_exists('smarty_mb_str_replace')) {
+
+ /**
+ * Multibyte string replace
+ *
+ * @param string $search the string to be searched
+ * @param string $replace the replacement string
+ * @param string $subject the source string
+ * @param int &$count number of matches found
+ * @return string replaced string
+ * @author Rodney Rehm
+ */
+ function smarty_mb_str_replace($search, $replace, $subject, &$count=0)
+ {
+ if (!is_array($search) && is_array($replace)) {
+ return false;
+ }
+ if (is_array($subject)) {
+ // call mb_replace for each single string in $subject
+ foreach ($subject as &$string) {
+ $string = &smarty_mb_str_replace($search, $replace, $string, $c);
+ $count += $c;
+ }
+ } elseif (is_array($search)) {
+ if (!is_array($replace)) {
+ foreach ($search as &$string) {
+ $subject = smarty_mb_str_replace($string, $replace, $subject, $c);
+ $count += $c;
+ }
+ } else {
+ $n = max(count($search), count($replace));
+ while ($n--) {
+ $subject = smarty_mb_str_replace(current($search), current($replace), $subject, $c);
+ $count += $c;
+ next($search);
+ next($replace);
+ }
+ }
+ } else {
+ $parts = mb_split(preg_quote($search), $subject);
+ $count = count($parts) - 1;
+ $subject = implode($replace, $parts);
+ }
+ return $subject;
+ }
+
+}
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/shared.mb_unicode.php b/library/Smarty/libs/plugins/shared.mb_unicode.php
new file mode 100644
index 000000000..e7f839ec8
--- /dev/null
+++ b/library/Smarty/libs/plugins/shared.mb_unicode.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Smarty shared plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsShared
+ */
+
+/**
+ * convert characters to their decimal unicode equivalents
+ *
+ * @link http://www.ibm.com/developerworks/library/os-php-unicode/index.html#listing3 for inspiration
+ * @param string $string characters to calculate unicode of
+ * @param string $encoding encoding of $string, if null mb_internal_encoding() is used
+ * @return array sequence of unicodes
+ * @author Rodney Rehm
+ */
+function smarty_mb_to_unicode($string, $encoding=null) {
+ if ($encoding) {
+ $expanded = mb_convert_encoding($string, "UTF-32BE", $encoding);
+ } else {
+ $expanded = mb_convert_encoding($string, "UTF-32BE");
+ }
+ return unpack("N*", $expanded);
+}
+
+/**
+ * convert unicodes to the character of given encoding
+ *
+ * @link http://www.ibm.com/developerworks/library/os-php-unicode/index.html#listing3 for inspiration
+ * @param integer|array $unicode single unicode or list of unicodes to convert
+ * @param string $encoding encoding of returned string, if null mb_internal_encoding() is used
+ * @return string unicode as character sequence in given $encoding
+ * @author Rodney Rehm
+ */
+function smarty_mb_from_unicode($unicode, $encoding=null) {
+ $t = '';
+ if (!$encoding) {
+ $encoding = mb_internal_encoding();
+ }
+ foreach((array) $unicode as $utf32be) {
+ $character = pack("N*", $utf32be);
+ $t .= mb_convert_encoding($character, $encoding, "UTF-32BE");
+ }
+ return $t;
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/shared.mb_wordwrap.php b/library/Smarty/libs/plugins/shared.mb_wordwrap.php
new file mode 100644
index 000000000..ba3498c70
--- /dev/null
+++ b/library/Smarty/libs/plugins/shared.mb_wordwrap.php
@@ -0,0 +1,83 @@
+<?php
+/**
+ * Smarty shared plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsShared
+ */
+
+if(!function_exists('smarty_mb_wordwrap')) {
+
+ /**
+ * Wrap a string to a given number of characters
+ *
+ * @link http://php.net/manual/en/function.wordwrap.php for similarity
+ * @param string $str the string to wrap
+ * @param int $width the width of the output
+ * @param string $break the character used to break the line
+ * @param boolean $cut ignored parameter, just for the sake of
+ * @return string wrapped string
+ * @author Rodney Rehm
+ */
+ function smarty_mb_wordwrap($str, $width=75, $break="\n", $cut=false)
+ {
+ // break words into tokens using white space as a delimiter
+ $tokens = preg_split('!(\s)!S' . Smarty::$_UTF8_MODIFIER, $str, -1, PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE);
+ $length = 0;
+ $t = '';
+ $_previous = false;
+
+ foreach ($tokens as $_token) {
+ $token_length = mb_strlen($_token, Smarty::$_CHARSET);
+ $_tokens = array($_token);
+ if ($token_length > $width) {
+ // remove last space
+ $t = mb_substr($t, 0, -1, Smarty::$_CHARSET);
+ $_previous = false;
+ $length = 0;
+
+ if ($cut) {
+ $_tokens = preg_split('!(.{' . $width . '})!S' . Smarty::$_UTF8_MODIFIER, $_token, -1, PREG_SPLIT_NO_EMPTY + PREG_SPLIT_DELIM_CAPTURE);
+ // broken words go on a new line
+ $t .= $break;
+ }
+ }
+
+ foreach ($_tokens as $token) {
+ $_space = !!preg_match('!^\s$!S' . Smarty::$_UTF8_MODIFIER, $token);
+ $token_length = mb_strlen($token, Smarty::$_CHARSET);
+ $length += $token_length;
+
+ if ($length > $width) {
+ // remove space before inserted break
+ if ($_previous && $token_length < $width) {
+ $t = mb_substr($t, 0, -1, Smarty::$_CHARSET);
+ }
+
+ // add the break before the token
+ $t .= $break;
+ $length = $token_length;
+
+ // skip space after inserting a break
+ if ($_space) {
+ $length = 0;
+ continue;
+ }
+ } else if ($token == "\n") {
+ // hard break must reset counters
+ $_previous = 0;
+ $length = 0;
+ } else {
+ // remember if we had a space or not
+ $_previous = $_space;
+ }
+ // add the token
+ $t .= $token;
+ }
+ }
+
+ return $t;
+ }
+
+}
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/plugins/variablefilter.htmlspecialchars.php b/library/Smarty/libs/plugins/variablefilter.htmlspecialchars.php
new file mode 100644
index 000000000..aff711e48
--- /dev/null
+++ b/library/Smarty/libs/plugins/variablefilter.htmlspecialchars.php
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsFilter
+ */
+
+/**
+ * Smarty htmlspecialchars variablefilter plugin
+ *
+ * @param string $source input string
+ * @param Smarty_Internal_Template $smarty Smarty object
+ * @return string filtered output
+ */
+function smarty_variablefilter_htmlspecialchars($source, $smarty)
+{
+ return htmlspecialchars($source, ENT_QUOTES, Smarty::$_CHARSET);
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_cacheresource.php b/library/Smarty/libs/sysplugins/smarty_cacheresource.php
new file mode 100644
index 000000000..ca18add5e
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_cacheresource.php
@@ -0,0 +1,381 @@
+<?php
+/**
+* Smarty Internal Plugin
+*
+* @package Smarty
+* @subpackage Cacher
+*/
+
+/**
+* Cache Handler API
+*
+* @package Smarty
+* @subpackage Cacher
+* @author Rodney Rehm
+*/
+abstract class Smarty_CacheResource {
+ /**
+ * cache for Smarty_CacheResource instances
+ * @var array
+ */
+ public static $resources = array();
+
+ /**
+ * resource types provided by the core
+ * @var array
+ */
+ protected static $sysplugins = array(
+ 'file' => true,
+ );
+
+ /**
+ * populate Cached Object with meta data from Resource
+ *
+ * @param Smarty_Template_Cached $cached cached object
+ * @param Smarty_Internal_Template $_template template object
+ * @return void
+ */
+ public abstract function populate(Smarty_Template_Cached $cached, Smarty_Internal_Template $_template);
+
+ /**
+ * populate Cached Object with timestamp and exists from Resource
+ *
+ * @param Smarty_Template_Cached $source cached object
+ * @return void
+ */
+ public abstract function populateTimestamp(Smarty_Template_Cached $cached);
+
+ /**
+ * Read the cached template and process header
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param Smarty_Template_Cached $cached cached object
+ * @return booelan true or false if the cached content does not exist
+ */
+ public abstract function process(Smarty_Internal_Template $_template, Smarty_Template_Cached $cached=null);
+
+ /**
+ * Write the rendered template output to cache
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param string $content content to cache
+ * @return boolean success
+ */
+ public abstract function writeCachedContent(Smarty_Internal_Template $_template, $content);
+
+ /**
+ * Return cached content
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param string $content content of cache
+ */
+ public function getCachedContent(Smarty_Internal_Template $_template)
+ {
+ if ($_template->cached->handler->process($_template)) {
+ ob_start();
+ $_template->properties['unifunc']($_template);
+ return ob_get_clean();
+ }
+ return null;
+ }
+
+ /**
+ * Empty cache
+ *
+ * @param Smarty $smarty Smarty object
+ * @param integer $exp_time expiration time (number of seconds, not timestamp)
+ * @return integer number of cache files deleted
+ */
+ public abstract function clearAll(Smarty $smarty, $exp_time=null);
+
+ /**
+ * Empty cache for a specific template
+ *
+ * @param Smarty $smarty Smarty object
+ * @param string $resource_name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param integer $exp_time expiration time (number of seconds, not timestamp)
+ * @return integer number of cache files deleted
+ */
+ public abstract function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $exp_time);
+
+
+ public function locked(Smarty $smarty, Smarty_Template_Cached $cached)
+ {
+ // theoretically locking_timeout should be checked against time_limit (max_execution_time)
+ $start = microtime(true);
+ $hadLock = null;
+ while ($this->hasLock($smarty, $cached)) {
+ $hadLock = true;
+ if (microtime(true) - $start > $smarty->locking_timeout) {
+ // abort waiting for lock release
+ return false;
+ }
+ sleep(1);
+ }
+ return $hadLock;
+ }
+
+ public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)
+ {
+ // check if lock exists
+ return false;
+ }
+
+ public function acquireLock(Smarty $smarty, Smarty_Template_Cached $cached)
+ {
+ // create lock
+ return true;
+ }
+
+ public function releaseLock(Smarty $smarty, Smarty_Template_Cached $cached)
+ {
+ // release lock
+ return true;
+ }
+
+
+ /**
+ * Load Cache Resource Handler
+ *
+ * @param Smarty $smarty Smarty object
+ * @param string $type name of the cache resource
+ * @return Smarty_CacheResource Cache Resource Handler
+ */
+ public static function load(Smarty $smarty, $type = null)
+ {
+ if (!isset($type)) {
+ $type = $smarty->caching_type;
+ }
+
+ // try smarty's cache
+ if (isset($smarty->_cacheresource_handlers[$type])) {
+ return $smarty->_cacheresource_handlers[$type];
+ }
+
+ // try registered resource
+ if (isset($smarty->registered_cache_resources[$type])) {
+ // do not cache these instances as they may vary from instance to instance
+ return $smarty->_cacheresource_handlers[$type] = $smarty->registered_cache_resources[$type];
+ }
+ // try sysplugins dir
+ if (isset(self::$sysplugins[$type])) {
+ if (!isset(self::$resources[$type])) {
+ $cache_resource_class = 'Smarty_Internal_CacheResource_' . ucfirst($type);
+ self::$resources[$type] = new $cache_resource_class();
+ }
+ return $smarty->_cacheresource_handlers[$type] = self::$resources[$type];
+ }
+ // try plugins dir
+ $cache_resource_class = 'Smarty_CacheResource_' . ucfirst($type);
+ if ($smarty->loadPlugin($cache_resource_class)) {
+ if (!isset(self::$resources[$type])) {
+ self::$resources[$type] = new $cache_resource_class();
+ }
+ return $smarty->_cacheresource_handlers[$type] = self::$resources[$type];
+ }
+ // give up
+ throw new SmartyException("Unable to load cache resource '{$type}'");
+ }
+
+ /**
+ * Invalid Loaded Cache Files
+ *
+ * @param Smarty $smarty Smarty object
+ */
+ public static function invalidLoadedCache(Smarty $smarty)
+ {
+ foreach ($smarty->template_objects as $tpl) {
+ if (isset($tpl->cached)) {
+ $tpl->cached->valid = false;
+ $tpl->cached->processed = false;
+ }
+ }
+ }
+}
+
+/**
+* Smarty Resource Data Object
+*
+* Cache Data Container for Template Files
+*
+* @package Smarty
+* @subpackage TemplateResources
+* @author Rodney Rehm
+*/
+class Smarty_Template_Cached {
+ /**
+ * Source Filepath
+ * @var string
+ */
+ public $filepath = false;
+
+ /**
+ * Source Content
+ * @var string
+ */
+ public $content = null;
+
+ /**
+ * Source Timestamp
+ * @var integer
+ */
+ public $timestamp = false;
+
+ /**
+ * Source Existance
+ * @var boolean
+ */
+ public $exists = false;
+
+ /**
+ * Cache Is Valid
+ * @var boolean
+ */
+ public $valid = false;
+
+ /**
+ * Cache was processed
+ * @var boolean
+ */
+ public $processed = false;
+
+ /**
+ * CacheResource Handler
+ * @var Smarty_CacheResource
+ */
+ public $handler = null;
+
+ /**
+ * Template Compile Id (Smarty_Internal_Template::$compile_id)
+ * @var string
+ */
+ public $compile_id = null;
+
+ /**
+ * Template Cache Id (Smarty_Internal_Template::$cache_id)
+ * @var string
+ */
+ public $cache_id = null;
+
+ /**
+ * Id for cache locking
+ * @var string
+ */
+ public $lock_id = null;
+
+ /**
+ * flag that cache is locked by this instance
+ * @var bool
+ */
+ public $is_locked = false;
+
+ /**
+ * Source Object
+ * @var Smarty_Template_Source
+ */
+ public $source = null;
+
+ /**
+ * create Cached Object container
+ *
+ * @param Smarty_Internal_Template $_template template object
+ */
+ public function __construct(Smarty_Internal_Template $_template)
+ {
+ $this->compile_id = $_template->compile_id;
+ $this->cache_id = $_template->cache_id;
+ $this->source = $_template->source;
+ $_template->cached = $this;
+ $smarty = $_template->smarty;
+
+ //
+ // load resource handler
+ //
+ $this->handler = $handler = Smarty_CacheResource::load($smarty); // Note: prone to circular references
+
+ //
+ // check if cache is valid
+ //
+ if (!($_template->caching == Smarty::CACHING_LIFETIME_CURRENT || $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || $_template->source->recompiled) {
+ $handler->populate($this, $_template);
+ return;
+ }
+ while (true) {
+ while (true) {
+ $handler->populate($this, $_template);
+ if ($this->timestamp === false || $smarty->force_compile || $smarty->force_cache) {
+ $this->valid = false;
+ } else {
+ $this->valid = true;
+ }
+ if ($this->valid && $_template->caching == Smarty::CACHING_LIFETIME_CURRENT && $_template->cache_lifetime >= 0 && time() > ($this->timestamp + $_template->cache_lifetime)) {
+ // lifetime expired
+ $this->valid = false;
+ }
+ if ($this->valid || !$_template->smarty->cache_locking) {
+ break;
+ }
+ if (!$this->handler->locked($_template->smarty, $this)) {
+ $this->handler->acquireLock($_template->smarty, $this);
+ break 2;
+ }
+ }
+ if ($this->valid) {
+ if (!$_template->smarty->cache_locking || $this->handler->locked($_template->smarty, $this) === null) {
+ // load cache file for the following checks
+ if ($smarty->debugging) {
+ Smarty_Internal_Debug::start_cache($_template);
+ }
+ if($handler->process($_template, $this) === false) {
+ $this->valid = false;
+ } else {
+ $this->processed = true;
+ }
+ if ($smarty->debugging) {
+ Smarty_Internal_Debug::end_cache($_template);
+ }
+ } else {
+ continue;
+ }
+ } else {
+ return;
+ }
+ if ($this->valid && $_template->caching === Smarty::CACHING_LIFETIME_SAVED && $_template->properties['cache_lifetime'] >= 0 && (time() > ($_template->cached->timestamp + $_template->properties['cache_lifetime']))) {
+ $this->valid = false;
+ }
+ if (!$this->valid && $_template->smarty->cache_locking) {
+ $this->handler->acquireLock($_template->smarty, $this);
+ return;
+ } else {
+ return;
+ }
+ }
+ }
+
+ /**
+ * Write this cache object to handler
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param string $content content to cache
+ * @return boolean success
+ */
+ public function write(Smarty_Internal_Template $_template, $content)
+ {
+ if (!$_template->source->recompiled) {
+ if ($this->handler->writeCachedContent($_template, $content)) {
+ $this->timestamp = time();
+ $this->exists = true;
+ $this->valid = true;
+ if ($_template->smarty->cache_locking) {
+ $this->handler->releaseLock($_template->smarty, $this);
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+}
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_cacheresource_custom.php b/library/Smarty/libs/sysplugins/smarty_cacheresource_custom.php
new file mode 100644
index 000000000..ee9de157b
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_cacheresource_custom.php
@@ -0,0 +1,237 @@
+<?php
+/**
+ * Smarty Internal Plugin
+ *
+ * @package Smarty
+ * @subpackage Cacher
+ */
+
+/**
+ * Cache Handler API
+ *
+ * @package Smarty
+ * @subpackage Cacher
+ * @author Rodney Rehm
+ */
+abstract class Smarty_CacheResource_Custom extends Smarty_CacheResource {
+
+ /**
+ * fetch cached content and its modification time from data source
+ *
+ * @param string $id unique cache content identifier
+ * @param string $name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param string $content cached content
+ * @param integer $mtime cache modification timestamp (epoch)
+ * @return void
+ */
+ protected abstract function fetch($id, $name, $cache_id, $compile_id, &$content, &$mtime);
+
+ /**
+ * Fetch cached content's modification timestamp from data source
+ *
+ * {@internal implementing this method is optional.
+ * Only implement it if modification times can be accessed faster than loading the complete cached content.}}
+ *
+ * @param string $id unique cache content identifier
+ * @param string $name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @return integer|boolean timestamp (epoch) the template was modified, or false if not found
+ */
+ protected function fetchTimestamp($id, $name, $cache_id, $compile_id)
+ {
+ return null;
+ }
+
+ /**
+ * Save content to cache
+ *
+ * @param string $id unique cache content identifier
+ * @param string $name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param integer|null $exp_time seconds till expiration or null
+ * @param string $content content to cache
+ * @return boolean success
+ */
+ protected abstract function save($id, $name, $cache_id, $compile_id, $exp_time, $content);
+
+ /**
+ * Delete content from cache
+ *
+ * @param string $name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param integer|null $exp_time seconds till expiration time in seconds or null
+ * @return integer number of deleted caches
+ */
+ protected abstract function delete($name, $cache_id, $compile_id, $exp_time);
+
+ /**
+ * populate Cached Object with meta data from Resource
+ *
+ * @param Smarty_Template_Cached $cached cached object
+ * @param Smarty_Internal_Template $_template template object
+ * @return void
+ */
+ public function populate(Smarty_Template_Cached $cached, Smarty_Internal_Template $_template)
+ {
+ $_cache_id = isset($cached->cache_id) ? preg_replace('![^\w\|]+!', '_', $cached->cache_id) : null;
+ $_compile_id = isset($cached->compile_id) ? preg_replace('![^\w\|]+!', '_', $cached->compile_id) : null;
+
+ $cached->filepath = sha1($cached->source->filepath . $_cache_id . $_compile_id);
+ $this->populateTimestamp($cached);
+ }
+
+ /**
+ * populate Cached Object with timestamp and exists from Resource
+ *
+ * @param Smarty_Template_Cached $source cached object
+ * @return void
+ */
+ public function populateTimestamp(Smarty_Template_Cached $cached)
+ {
+ $mtime = $this->fetchTimestamp($cached->filepath, $cached->source->name, $cached->cache_id, $cached->compile_id);
+ if ($mtime !== null) {
+ $cached->timestamp = $mtime;
+ $cached->exists = !!$cached->timestamp;
+ return;
+ }
+ $timestamp = null;
+ $this->fetch($cached->filepath, $cached->source->name, $cached->cache_id, $cached->compile_id, $cached->content, $timestamp);
+ $cached->timestamp = isset($timestamp) ? $timestamp : false;
+ $cached->exists = !!$cached->timestamp;
+ }
+
+ /**
+ * Read the cached template and process the header
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param Smarty_Template_Cached $cached cached object
+ * @return booelan true or false if the cached content does not exist
+ */
+ public function process(Smarty_Internal_Template $_template, Smarty_Template_Cached $cached=null)
+ {
+ if (!$cached) {
+ $cached = $_template->cached;
+ }
+ $content = $cached->content ? $cached->content : null;
+ $timestamp = $cached->timestamp ? $cached->timestamp : null;
+ if ($content === null || !$timestamp) {
+ $this->fetch(
+ $_template->cached->filepath,
+ $_template->source->name,
+ $_template->cache_id,
+ $_template->compile_id,
+ $content,
+ $timestamp
+ );
+ }
+ if (isset($content)) {
+ $_smarty_tpl = $_template;
+ eval("?>" . $content);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Write the rendered template output to cache
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param string $content content to cache
+ * @return boolean success
+ */
+ public function writeCachedContent(Smarty_Internal_Template $_template, $content)
+ {
+ return $this->save(
+ $_template->cached->filepath,
+ $_template->source->name,
+ $_template->cache_id,
+ $_template->compile_id,
+ $_template->properties['cache_lifetime'],
+ $content
+ );
+ }
+
+ /**
+ * Empty cache
+ *
+ * @param Smarty $smarty Smarty object
+ * @param integer $exp_time expiration time (number of seconds, not timestamp)
+ * @return integer number of cache files deleted
+ */
+ public function clearAll(Smarty $smarty, $exp_time=null)
+ {
+ $this->cache = array();
+ return $this->delete(null, null, null, $exp_time);
+ }
+
+ /**
+ * Empty cache for a specific template
+ *
+ * @param Smarty $smarty Smarty object
+ * @param string $resource_name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param integer $exp_time expiration time (number of seconds, not timestamp)
+ * @return integer number of cache files deleted
+ */
+ public function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $exp_time)
+ {
+ $this->cache = array();
+ return $this->delete($resource_name, $cache_id, $compile_id, $exp_time);
+ }
+
+ /**
+ * Check is cache is locked for this template
+ *
+ * @param Smarty $smarty Smarty object
+ * @param Smarty_Template_Cached $cached cached object
+ * @return booelan true or false if cache is locked
+ */
+ public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)
+ {
+ $id = $cached->filepath;
+ $name = $cached->source->name . '.lock';
+
+ $mtime = $this->fetchTimestamp($id, $name, null, null);
+ if ($mtime === null) {
+ $this->fetch($id, $name, null, null, $content, $mtime);
+ }
+
+ return $mtime && time() - $mtime < $smarty->locking_timeout;
+ }
+
+ /**
+ * Lock cache for this template
+ *
+ * @param Smarty $smarty Smarty object
+ * @param Smarty_Template_Cached $cached cached object
+ */
+ public function acquireLock(Smarty $smarty, Smarty_Template_Cached $cached)
+ {
+ $cached->is_locked = true;
+
+ $id = $cached->filepath;
+ $name = $cached->source->name . '.lock';
+ $this->save($id, $name, null, null, $smarty->locking_timeout, '');
+ }
+
+ /**
+ * Unlock cache for this template
+ *
+ * @param Smarty $smarty Smarty object
+ * @param Smarty_Template_Cached $cached cached object
+ */
+ public function releaseLock(Smarty $smarty, Smarty_Template_Cached $cached)
+ {
+ $cached->is_locked = false;
+
+ $name = $cached->source->name . '.lock';
+ $this->delete($name, null, null, null);
+ }
+}
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_cacheresource_keyvaluestore.php b/library/Smarty/libs/sysplugins/smarty_cacheresource_keyvaluestore.php
new file mode 100644
index 000000000..dff9b65aa
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_cacheresource_keyvaluestore.php
@@ -0,0 +1,463 @@
+<?php
+/**
+ * Smarty Internal Plugin
+ *
+ * @package Smarty
+ * @subpackage Cacher
+ */
+
+/**
+ * Smarty Cache Handler Base for Key/Value Storage Implementations
+ *
+ * This class implements the functionality required to use simple key/value stores
+ * for hierarchical cache groups. key/value stores like memcache or APC do not support
+ * wildcards in keys, therefore a cache group cannot be cleared like "a|*" - which
+ * is no problem to filesystem and RDBMS implementations.
+ *
+ * This implementation is based on the concept of invalidation. While one specific cache
+ * can be identified and cleared, any range of caches cannot be identified. For this reason
+ * each level of the cache group hierarchy can have its own value in the store. These values
+ * are nothing but microtimes, telling us when a particular cache group was cleared for the
+ * last time. These keys are evaluated for every cache read to determine if the cache has
+ * been invalidated since it was created and should hence be treated as inexistent.
+ *
+ * Although deep hierarchies are possible, they are not recommended. Try to keep your
+ * cache groups as shallow as possible. Anything up 3-5 parents should be ok. So
+ * »a|b|c« is a good depth where »a|b|c|d|e|f|g|h|i|j|k« isn't. Try to join correlating
+ * cache groups: if your cache groups look somewhat like »a|b|$page|$items|$whatever«
+ * consider using »a|b|c|$page-$items-$whatever« instead.
+ *
+ * @package Smarty
+ * @subpackage Cacher
+ * @author Rodney Rehm
+ */
+abstract class Smarty_CacheResource_KeyValueStore extends Smarty_CacheResource {
+
+ /**
+ * cache for contents
+ * @var array
+ */
+ protected $contents = array();
+ /**
+ * cache for timestamps
+ * @var array
+ */
+ protected $timestamps = array();
+
+ /**
+ * populate Cached Object with meta data from Resource
+ *
+ * @param Smarty_Template_Cached $cached cached object
+ * @param Smarty_Internal_Template $_template template object
+ * @return void
+ */
+ public function populate(Smarty_Template_Cached $cached, Smarty_Internal_Template $_template)
+ {
+ $cached->filepath = $_template->source->uid
+ . '#' . $this->sanitize($cached->source->name)
+ . '#' . $this->sanitize($cached->cache_id)
+ . '#' . $this->sanitize($cached->compile_id);
+
+ $this->populateTimestamp($cached);
+ }
+
+ /**
+ * populate Cached Object with timestamp and exists from Resource
+ *
+ * @param Smarty_Template_Cached $cached cached object
+ * @return void
+ */
+ public function populateTimestamp(Smarty_Template_Cached $cached)
+ {
+ if (!$this->fetch($cached->filepath, $cached->source->name, $cached->cache_id, $cached->compile_id, $content, $timestamp, $cached->source->uid)) {
+ return;
+ }
+ $cached->content = $content;
+ $cached->timestamp = (int) $timestamp;
+ $cached->exists = $cached->timestamp;
+ }
+
+ /**
+ * Read the cached template and process the header
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param Smarty_Template_Cached $cached cached object
+ * @return booelan true or false if the cached content does not exist
+ */
+ public function process(Smarty_Internal_Template $_template, Smarty_Template_Cached $cached=null)
+ {
+ if (!$cached) {
+ $cached = $_template->cached;
+ }
+ $content = $cached->content ? $cached->content : null;
+ $timestamp = $cached->timestamp ? $cached->timestamp : null;
+ if ($content === null || !$timestamp) {
+ if (!$this->fetch($_template->cached->filepath, $_template->source->name, $_template->cache_id, $_template->compile_id, $content, $timestamp, $_template->source->uid)) {
+ return false;
+ }
+ }
+ if (isset($content)) {
+ $_smarty_tpl = $_template;
+ eval("?>" . $content);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Write the rendered template output to cache
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param string $content content to cache
+ * @return boolean success
+ */
+ public function writeCachedContent(Smarty_Internal_Template $_template, $content)
+ {
+ $this->addMetaTimestamp($content);
+ return $this->write(array($_template->cached->filepath => $content), $_template->properties['cache_lifetime']);
+ }
+
+ /**
+ * Empty cache
+ *
+ * {@internal the $exp_time argument is ignored altogether }}
+ *
+ * @param Smarty $smarty Smarty object
+ * @param integer $exp_time expiration time [being ignored]
+ * @return integer number of cache files deleted [always -1]
+ * @uses purge() to clear the whole store
+ * @uses invalidate() to mark everything outdated if purge() is inapplicable
+ */
+ public function clearAll(Smarty $smarty, $exp_time=null)
+ {
+ if (!$this->purge()) {
+ $this->invalidate(null);
+ }
+ return -1;
+ }
+
+ /**
+ * Empty cache for a specific template
+ *
+ * {@internal the $exp_time argument is ignored altogether}}
+ *
+ * @param Smarty $smarty Smarty object
+ * @param string $resource_name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param integer $exp_time expiration time [being ignored]
+ * @return integer number of cache files deleted [always -1]
+ * @uses buildCachedFilepath() to generate the CacheID
+ * @uses invalidate() to mark CacheIDs parent chain as outdated
+ * @uses delete() to remove CacheID from cache
+ */
+ public function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $exp_time)
+ {
+ $uid = $this->getTemplateUid($smarty, $resource_name, $cache_id, $compile_id);
+ $cid = $uid . '#' . $this->sanitize($resource_name) . '#' . $this->sanitize($cache_id) . '#' . $this->sanitize($compile_id);
+ $this->delete(array($cid));
+ $this->invalidate($cid, $resource_name, $cache_id, $compile_id, $uid);
+ return -1;
+ }
+ /**
+ * Get template's unique ID
+ *
+ * @param Smarty $smarty Smarty object
+ * @param string $resource_name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @return string filepath of cache file
+ */
+ protected function getTemplateUid(Smarty $smarty, $resource_name, $cache_id, $compile_id)
+ {
+ $uid = '';
+ if (isset($resource_name)) {
+ $tpl = new $smarty->template_class($resource_name, $smarty);
+ if ($tpl->source->exists) {
+ $uid = $tpl->source->uid;
+ }
+
+ // remove from template cache
+ if ($smarty->allow_ambiguous_resources) {
+ $_templateId = $tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id;
+ } else {
+ $_templateId = $smarty->joined_template_dir . '#' . $resource_name . $tpl->cache_id . $tpl->compile_id;
+ }
+ if (isset($_templateId[150])) {
+ $_templateId = sha1($_templateId);
+ }
+ unset($smarty->template_objects[$_templateId]);
+ }
+ return $uid;
+ }
+
+ /**
+ * Sanitize CacheID components
+ *
+ * @param string $string CacheID component to sanitize
+ * @return string sanitized CacheID component
+ */
+ protected function sanitize($string)
+ {
+ // some poeple smoke bad weed
+ $string = trim($string, '|');
+ if (!$string) {
+ return null;
+ }
+ return preg_replace('#[^\w\|]+#S', '_', $string);
+ }
+
+ /**
+ * Fetch and prepare a cache object.
+ *
+ * @param string $cid CacheID to fetch
+ * @param string $resource_name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param string $content cached content
+ * @param integer &$timestamp cached timestamp (epoch)
+ * @param string $resource_uid resource's uid
+ * @return boolean success
+ */
+ protected function fetch($cid, $resource_name = null, $cache_id = null, $compile_id = null, &$content = null, &$timestamp = null, $resource_uid = null)
+ {
+ $t = $this->read(array($cid));
+ $content = !empty($t[$cid]) ? $t[$cid] : null;
+ $timestamp = null;
+
+ if ($content && ($timestamp = $this->getMetaTimestamp($content))) {
+ $invalidated = $this->getLatestInvalidationTimestamp($cid, $resource_name, $cache_id, $compile_id, $resource_uid);
+ if ($invalidated > $timestamp) {
+ $timestamp = null;
+ $content = null;
+ }
+ }
+
+ return !!$content;
+ }
+
+ /**
+ * Add current microtime to the beginning of $cache_content
+ *
+ * {@internal the header uses 8 Bytes, the first 4 Bytes are the seconds, the second 4 Bytes are the microseconds}}
+ *
+ * @param string &$content the content to be cached
+ */
+ protected function addMetaTimestamp(&$content)
+ {
+ $mt = explode(" ", microtime());
+ $ts = pack("NN", $mt[1], (int) ($mt[0] * 100000000));
+ $content = $ts . $content;
+ }
+
+ /**
+ * Extract the timestamp the $content was cached
+ *
+ * @param string &$content the cached content
+ * @return float the microtime the content was cached
+ */
+ protected function getMetaTimestamp(&$content)
+ {
+ $s = unpack("N", substr($content, 0, 4));
+ $m = unpack("N", substr($content, 4, 4));
+ $content = substr($content, 8);
+ return $s[1] + ($m[1] / 100000000);
+ }
+
+ /**
+ * Invalidate CacheID
+ *
+ * @param string $cid CacheID
+ * @param string $resource_name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param string $resource_uid source's uid
+ * @return void
+ */
+ protected function invalidate($cid = null, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)
+ {
+ $now = microtime(true);
+ $key = null;
+ // invalidate everything
+ if (!$resource_name && !$cache_id && !$compile_id) {
+ $key = 'IVK#ALL';
+ }
+ // invalidate all caches by template
+ else if ($resource_name && !$cache_id && !$compile_id) {
+ $key = 'IVK#TEMPLATE#' . $resource_uid . '#' . $this->sanitize($resource_name);
+ }
+ // invalidate all caches by cache group
+ else if (!$resource_name && $cache_id && !$compile_id) {
+ $key = 'IVK#CACHE#' . $this->sanitize($cache_id);
+ }
+ // invalidate all caches by compile id
+ else if (!$resource_name && !$cache_id && $compile_id) {
+ $key = 'IVK#COMPILE#' . $this->sanitize($compile_id);
+ }
+ // invalidate by combination
+ else {
+ $key = 'IVK#CID#' . $cid;
+ }
+ $this->write(array($key => $now));
+ }
+
+ /**
+ * Determine the latest timestamp known to the invalidation chain
+ *
+ * @param string $cid CacheID to determine latest invalidation timestamp of
+ * @param string $resource_name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param string $resource_uid source's filepath
+ * @return float the microtime the CacheID was invalidated
+ */
+ protected function getLatestInvalidationTimestamp($cid, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)
+ {
+ // abort if there is no CacheID
+ if (false && !$cid) {
+ return 0;
+ }
+ // abort if there are no InvalidationKeys to check
+ if (!($_cid = $this->listInvalidationKeys($cid, $resource_name, $cache_id, $compile_id, $resource_uid))) {
+ return 0;
+ }
+
+ // there are no InValidationKeys
+ if (!($values = $this->read($_cid))) {
+ return 0;
+ }
+ // make sure we're dealing with floats
+ $values = array_map('floatval', $values);
+ return max($values);
+ }
+
+ /**
+ * Translate a CacheID into the list of applicable InvalidationKeys.
+ *
+ * Splits "some|chain|into|an|array" into array( '#clearAll#', 'some', 'some|chain', 'some|chain|into', ... )
+ *
+ * @param string $cid CacheID to translate
+ * @param string $resource_name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param string $resource_uid source's filepath
+ * @return array list of InvalidationKeys
+ * @uses $invalidationKeyPrefix to prepend to each InvalidationKey
+ */
+ protected function listInvalidationKeys($cid, $resource_name = null, $cache_id = null, $compile_id = null, $resource_uid = null)
+ {
+ $t = array('IVK#ALL');
+ $_name = $_compile = '#';
+ if ($resource_name) {
+ $_name .= $resource_uid . '#' . $this->sanitize($resource_name);
+ $t[] = 'IVK#TEMPLATE' . $_name;
+ }
+ if ($compile_id) {
+ $_compile .= $this->sanitize($compile_id);
+ $t[] = 'IVK#COMPILE' . $_compile;
+ }
+ $_name .= '#';
+ // some poeple smoke bad weed
+ $cid = trim($cache_id, '|');
+ if (!$cid) {
+ return $t;
+ }
+ $i = 0;
+ while (true) {
+ // determine next delimiter position
+ $i = strpos($cid, '|', $i);
+ // add complete CacheID if there are no more delimiters
+ if ($i === false) {
+ $t[] = 'IVK#CACHE#' . $cid;
+ $t[] = 'IVK#CID' . $_name . $cid . $_compile;
+ $t[] = 'IVK#CID' . $_name . $_compile;
+ break;
+ }
+ $part = substr($cid, 0, $i);
+ // add slice to list
+ $t[] = 'IVK#CACHE#' . $part;
+ $t[] = 'IVK#CID' . $_name . $part . $_compile;
+ // skip past delimiter position
+ $i++;
+ }
+ return $t;
+ }
+
+ /**
+ * Check is cache is locked for this template
+ *
+ * @param Smarty $smarty Smarty object
+ * @param Smarty_Template_Cached $cached cached object
+ * @return booelan true or false if cache is locked
+ */
+ public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)
+ {
+ $key = 'LOCK#' . $cached->filepath;
+ $data = $this->read(array($key));
+ return $data && time() - $data[$key] < $smarty->locking_timeout;
+ }
+
+ /**
+ * Lock cache for this template
+ *
+ * @param Smarty $smarty Smarty object
+ * @param Smarty_Template_Cached $cached cached object
+ */
+ public function acquireLock(Smarty $smarty, Smarty_Template_Cached $cached)
+ {
+ $cached->is_locked = true;
+ $key = 'LOCK#' . $cached->filepath;
+ $this->write(array($key => time()), $smarty->locking_timeout);
+ }
+
+ /**
+ * Unlock cache for this template
+ *
+ * @param Smarty $smarty Smarty object
+ * @param Smarty_Template_Cached $cached cached object
+ */
+ public function releaseLock(Smarty $smarty, Smarty_Template_Cached $cached)
+ {
+ $cached->is_locked = false;
+ $key = 'LOCK#' . $cached->filepath;
+ $this->delete(array($key));
+ }
+
+ /**
+ * Read values for a set of keys from cache
+ *
+ * @param array $keys list of keys to fetch
+ * @return array list of values with the given keys used as indexes
+ */
+ protected abstract function read(array $keys);
+
+ /**
+ * Save values for a set of keys to cache
+ *
+ * @param array $keys list of values to save
+ * @param int $expire expiration time
+ * @return boolean true on success, false on failure
+ */
+ protected abstract function write(array $keys, $expire=null);
+
+ /**
+ * Remove values from cache
+ *
+ * @param array $keys list of keys to delete
+ * @return boolean true on success, false on failure
+ */
+ protected abstract function delete(array $keys);
+
+ /**
+ * Remove *all* values from cache
+ *
+ * @return boolean true on success, false on failure
+ */
+ protected function purge()
+ {
+ return false;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_config_source.php b/library/Smarty/libs/sysplugins/smarty_config_source.php
new file mode 100644
index 000000000..043ff13e9
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_config_source.php
@@ -0,0 +1,95 @@
+<?php
+/**
+ * Smarty Internal Plugin
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ */
+
+/**
+ * Smarty Resource Data Object
+ *
+ * Meta Data Container for Config Files
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Rodney Rehm
+ *
+ * @property string $content
+ * @property int $timestamp
+ * @property bool $exists
+ */
+class Smarty_Config_Source extends Smarty_Template_Source {
+
+ /**
+ * create Config Object container
+ *
+ * @param Smarty_Resource $handler Resource Handler this source object communicates with
+ * @param Smarty $smarty Smarty instance this source object belongs to
+ * @param string $resource full config_resource
+ * @param string $type type of resource
+ * @param string $name resource name
+ * @param string $unique_resource unqiue resource name
+ */
+ public function __construct(Smarty_Resource $handler, Smarty $smarty, $resource, $type, $name, $unique_resource)
+ {
+ $this->handler = $handler; // Note: prone to circular references
+
+ // Note: these may be ->config_compiler_class etc in the future
+ //$this->config_compiler_class = $handler->config_compiler_class;
+ //$this->config_lexer_class = $handler->config_lexer_class;
+ //$this->config_parser_class = $handler->config_parser_class;
+
+ $this->smarty = $smarty;
+ $this->resource = $resource;
+ $this->type = $type;
+ $this->name = $name;
+ $this->unique_resource = $unique_resource;
+ }
+
+ /**
+ * <<magic>> Generic setter.
+ *
+ * @param string $property_name valid: content, timestamp, exists
+ * @param mixed $value newly assigned value (not check for correct type)
+ * @throws SmartyException when the given property name is not valid
+ */
+ public function __set($property_name, $value)
+ {
+ switch ($property_name) {
+ case 'content':
+ case 'timestamp':
+ case 'exists':
+ $this->$property_name = $value;
+ break;
+
+ default:
+ throw new SmartyException("invalid config property '$property_name'.");
+ }
+ }
+
+ /**
+ * <<magic>> Generic getter.
+ *
+ * @param string $property_name valid: content, timestamp, exists
+ * @throws SmartyException when the given property name is not valid
+ */
+ public function __get($property_name)
+ {
+ switch ($property_name) {
+ case 'timestamp':
+ case 'exists':
+ $this->handler->populateTimestamp($this);
+ return $this->$property_name;
+
+ case 'content':
+ return $this->content = $this->handler->getContent($this);
+
+ default:
+ throw new SmartyException("config property '$property_name' does not exist.");
+ }
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_cacheresource_file.php b/library/Smarty/libs/sysplugins/smarty_internal_cacheresource_file.php
new file mode 100644
index 000000000..e5d20bd6e
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_cacheresource_file.php
@@ -0,0 +1,266 @@
+<?php
+/**
+ * Smarty Internal Plugin CacheResource File
+ *
+ * @package Smarty
+ * @subpackage Cacher
+ * @author Uwe Tews
+ * @author Rodney Rehm
+ */
+
+/**
+ * This class does contain all necessary methods for the HTML cache on file system
+ *
+ * Implements the file system as resource for the HTML cache Version ussing nocache inserts.
+ *
+ * @package Smarty
+ * @subpackage Cacher
+ */
+class Smarty_Internal_CacheResource_File extends Smarty_CacheResource {
+
+ /**
+ * populate Cached Object with meta data from Resource
+ *
+ * @param Smarty_Template_Cached $cached cached object
+ * @param Smarty_Internal_Template $_template template object
+ * @return void
+ */
+ public function populate(Smarty_Template_Cached $cached, Smarty_Internal_Template $_template)
+ {
+ $_source_file_path = str_replace(':', '.', $_template->source->filepath);
+ $_cache_id = isset($_template->cache_id) ? preg_replace('![^\w\|]+!', '_', $_template->cache_id) : null;
+ $_compile_id = isset($_template->compile_id) ? preg_replace('![^\w\|]+!', '_', $_template->compile_id) : null;
+ $_filepath = $_template->source->uid;
+ // if use_sub_dirs, break file into directories
+ if ($_template->smarty->use_sub_dirs) {
+ $_filepath = substr($_filepath, 0, 2) . DS
+ . substr($_filepath, 2, 2) . DS
+ . substr($_filepath, 4, 2) . DS
+ . $_filepath;
+ }
+ $_compile_dir_sep = $_template->smarty->use_sub_dirs ? DS : '^';
+ if (isset($_cache_id)) {
+ $_cache_id = str_replace('|', $_compile_dir_sep, $_cache_id) . $_compile_dir_sep;
+ } else {
+ $_cache_id = '';
+ }
+ if (isset($_compile_id)) {
+ $_compile_id = $_compile_id . $_compile_dir_sep;
+ } else {
+ $_compile_id = '';
+ }
+ $_cache_dir = $_template->smarty->getCacheDir();
+ if ($_template->smarty->cache_locking) {
+ // create locking file name
+ // relative file name?
+ if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_cache_dir)) {
+ $_lock_dir = rtrim(getcwd(), '/\\') . DS . $_cache_dir;
+ } else {
+ $_lock_dir = $_cache_dir;
+ }
+ $cached->lock_id = $_lock_dir.sha1($_cache_id.$_compile_id.$_template->source->uid).'.lock';
+ }
+ $cached->filepath = $_cache_dir . $_cache_id . $_compile_id . $_filepath . '.' . basename($_source_file_path) . '.php';
+ $cached->timestamp = @filemtime($cached->filepath);
+ $cached->exists = !!$cached->timestamp;
+ }
+
+ /**
+ * populate Cached Object with timestamp and exists from Resource
+ *
+ * @param Smarty_Template_Cached $cached cached object
+ * @return void
+ */
+ public function populateTimestamp(Smarty_Template_Cached $cached)
+ {
+ $cached->timestamp = @filemtime($cached->filepath);
+ $cached->exists = !!$cached->timestamp;
+ }
+
+ /**
+ * Read the cached template and process its header
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param Smarty_Template_Cached $cached cached object
+ * @return booelan true or false if the cached content does not exist
+ */
+ public function process(Smarty_Internal_Template $_template, Smarty_Template_Cached $cached=null)
+ {
+ $_smarty_tpl = $_template;
+ return @include $_template->cached->filepath;
+ }
+
+ /**
+ * Write the rendered template output to cache
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param string $content content to cache
+ * @return boolean success
+ */
+ public function writeCachedContent(Smarty_Internal_Template $_template, $content)
+ {
+ if (Smarty_Internal_Write_File::writeFile($_template->cached->filepath, $content, $_template->smarty) === true) {
+ $_template->cached->timestamp = @filemtime($_template->cached->filepath);
+ $_template->cached->exists = !!$_template->cached->timestamp;
+ if ($_template->cached->exists) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Empty cache
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param integer $exp_time expiration time (number of seconds, not timestamp)
+ * @return integer number of cache files deleted
+ */
+ public function clearAll(Smarty $smarty, $exp_time = null)
+ {
+ return $this->clear($smarty, null, null, null, $exp_time);
+ }
+
+ /**
+ * Empty cache for a specific template
+ *
+ * @param Smarty $_template template object
+ * @param string $resource_name template name
+ * @param string $cache_id cache id
+ * @param string $compile_id compile id
+ * @param integer $exp_time expiration time (number of seconds, not timestamp)
+ * @return integer number of cache files deleted
+ */
+ public function clear(Smarty $smarty, $resource_name, $cache_id, $compile_id, $exp_time)
+ {
+ $_cache_id = isset($cache_id) ? preg_replace('![^\w\|]+!', '_', $cache_id) : null;
+ $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null;
+ $_dir_sep = $smarty->use_sub_dirs ? '/' : '^';
+ $_compile_id_offset = $smarty->use_sub_dirs ? 3 : 0;
+ $_dir = $smarty->getCacheDir();
+ $_dir_length = strlen($_dir);
+ if (isset($_cache_id)) {
+ $_cache_id_parts = explode('|', $_cache_id);
+ $_cache_id_parts_count = count($_cache_id_parts);
+ if ($smarty->use_sub_dirs) {
+ foreach ($_cache_id_parts as $id_part) {
+ $_dir .= $id_part . DS;
+ }
+ }
+ }
+ if (isset($resource_name)) {
+ $_save_stat = $smarty->caching;
+ $smarty->caching = true;
+ $tpl = new $smarty->template_class($resource_name, $smarty);
+ $smarty->caching = $_save_stat;
+
+ // remove from template cache
+ $tpl->source; // have the template registered before unset()
+ if ($smarty->allow_ambiguous_resources) {
+ $_templateId = $tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id;
+ } else {
+ $_templateId = $smarty->joined_template_dir . '#' . $resource_name . $tpl->cache_id . $tpl->compile_id;
+ }
+ if (isset($_templateId[150])) {
+ $_templateId = sha1($_templateId);
+ }
+ unset($smarty->template_objects[$_templateId]);
+
+ if ($tpl->source->exists) {
+ $_resourcename_parts = basename(str_replace('^', '/', $tpl->cached->filepath));
+ } else {
+ return 0;
+ }
+ }
+ $_count = 0;
+ $_time = time();
+ if (file_exists($_dir)) {
+ $_cacheDirs = new RecursiveDirectoryIterator($_dir);
+ $_cache = new RecursiveIteratorIterator($_cacheDirs, RecursiveIteratorIterator::CHILD_FIRST);
+ foreach ($_cache as $_file) {
+ if (substr($_file->getBasename(),0,1) == '.' || strpos($_file, '.svn') !== false) continue;
+ // directory ?
+ if ($_file->isDir()) {
+ if (!$_cache->isDot()) {
+ // delete folder if empty
+ @rmdir($_file->getPathname());
+ }
+ } else {
+ $_parts = explode($_dir_sep, str_replace('\\', '/', substr((string)$_file, $_dir_length)));
+ $_parts_count = count($_parts);
+ // check name
+ if (isset($resource_name)) {
+ if ($_parts[$_parts_count-1] != $_resourcename_parts) {
+ continue;
+ }
+ }
+ // check compile id
+ if (isset($_compile_id) && (!isset($_parts[$_parts_count-2 - $_compile_id_offset]) || $_parts[$_parts_count-2 - $_compile_id_offset] != $_compile_id)) {
+ continue;
+ }
+ // check cache id
+ if (isset($_cache_id)) {
+ // count of cache id parts
+ $_parts_count = (isset($_compile_id)) ? $_parts_count - 2 - $_compile_id_offset : $_parts_count - 1 - $_compile_id_offset;
+ if ($_parts_count < $_cache_id_parts_count) {
+ continue;
+ }
+ for ($i = 0; $i < $_cache_id_parts_count; $i++) {
+ if ($_parts[$i] != $_cache_id_parts[$i]) continue 2;
+ }
+ }
+ // expired ?
+ if (isset($exp_time) && $_time - @filemtime($_file) < $exp_time) {
+ continue;
+ }
+ $_count += @unlink((string) $_file) ? 1 : 0;
+ }
+ }
+ }
+ return $_count;
+ }
+
+ /**
+ * Check is cache is locked for this template
+ *
+ * @param Smarty $smarty Smarty object
+ * @param Smarty_Template_Cached $cached cached object
+ * @return booelan true or false if cache is locked
+ */
+ public function hasLock(Smarty $smarty, Smarty_Template_Cached $cached)
+ {
+ if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
+ clearstatcache(true, $cached->lock_id);
+ } else {
+ clearstatcache();
+ }
+ $t = @filemtime($cached->lock_id);
+ return $t && (time() - $t < $smarty->locking_timeout);
+ }
+
+ /**
+ * Lock cache for this template
+ *
+ * @param Smarty $smarty Smarty object
+ * @param Smarty_Template_Cached $cached cached object
+ */
+ public function acquireLock(Smarty $smarty, Smarty_Template_Cached $cached)
+ {
+ $cached->is_locked = true;
+ touch($cached->lock_id);
+ }
+
+ /**
+ * Unlock cache for this template
+ *
+ * @param Smarty $smarty Smarty object
+ * @param Smarty_Template_Cached $cached cached object
+ */
+ public function releaseLock(Smarty $smarty, Smarty_Template_Cached $cached)
+ {
+ $cached->is_locked = false;
+ @unlink($cached->lock_id);
+ }
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_append.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_append.php
new file mode 100644
index 000000000..f6036e883
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_append.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Append
+ *
+ * Compiles the {append} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Append Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Append extends Smarty_Internal_Compile_Assign {
+
+ /**
+ * Compiles code for the {append} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ // the following must be assigned at runtime because it will be overwritten in parent class
+ $this->required_attributes = array('var', 'value');
+ $this->shorttag_order = array('var', 'value');
+ $this->optional_attributes = array('scope', 'index');
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ // map to compile assign attributes
+ if (isset($_attr['index'])) {
+ $_params['smarty_internal_index'] = '[' . $_attr['index'] . ']';
+ unset($_attr['index']);
+ } else {
+ $_params['smarty_internal_index'] = '[]';
+ }
+ $_new_attr = array();
+ foreach ($_attr as $key => $value) {
+ $_new_attr[] = array($key => $value);
+ }
+ // call compile assign
+ return parent::compile($_new_attr, $compiler, $_params);
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_assign.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_assign.php
new file mode 100644
index 000000000..0ac3f68ce
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_assign.php
@@ -0,0 +1,84 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Assign
+ *
+ * Compiles the {assign} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Assign Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Assign extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {assign} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ // the following must be assigned at runtime because it will be overwritten in Smarty_Internal_Compile_Append
+ $this->required_attributes = array('var', 'value');
+ $this->shorttag_order = array('var', 'value');
+ $this->optional_attributes = array('scope');
+ $_nocache = 'null';
+ $_scope = Smarty::SCOPE_LOCAL;
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ // nocache ?
+ if ($compiler->tag_nocache || $compiler->nocache) {
+ $_nocache = 'true';
+ // create nocache var to make it know for further compiling
+ $compiler->template->tpl_vars[trim($_attr['var'], "'")] = new Smarty_variable(null, true);
+ }
+ // scope setup
+ if (isset($_attr['scope'])) {
+ $_attr['scope'] = trim($_attr['scope'], "'\"");
+ if ($_attr['scope'] == 'parent') {
+ $_scope = Smarty::SCOPE_PARENT;
+ } elseif ($_attr['scope'] == 'root') {
+ $_scope = Smarty::SCOPE_ROOT;
+ } elseif ($_attr['scope'] == 'global') {
+ $_scope = Smarty::SCOPE_GLOBAL;
+ } else {
+ $compiler->trigger_template_error('illegal value for "scope" attribute', $compiler->lex->taglineno);
+ }
+ }
+ // compiled output
+ if (isset($parameter['smarty_internal_index'])) {
+ $output = "<?php \$_smarty_tpl->createLocalArrayVariable($_attr[var], $_nocache, $_scope);\n\$_smarty_tpl->tpl_vars[$_attr[var]]->value$parameter[smarty_internal_index] = $_attr[value];";
+ } else {
+ // implement Smarty2's behaviour of variables assigned by reference
+ if ($compiler->template->smarty instanceof SmartyBC) {
+ $output = "<?php if (isset(\$_smarty_tpl->tpl_vars[$_attr[var]])) {\$_smarty_tpl->tpl_vars[$_attr[var]] = clone \$_smarty_tpl->tpl_vars[$_attr[var]];";
+ $output .= "\n\$_smarty_tpl->tpl_vars[$_attr[var]]->value = $_attr[value]; \$_smarty_tpl->tpl_vars[$_attr[var]]->nocache = $_nocache; \$_smarty_tpl->tpl_vars[$_attr[var]]->scope = $_scope;";
+ $output .= "\n} else \$_smarty_tpl->tpl_vars[$_attr[var]] = new Smarty_variable($_attr[value], $_nocache, $_scope);";
+ } else {
+ $output = "<?php \$_smarty_tpl->tpl_vars[$_attr[var]] = new Smarty_variable($_attr[value], $_nocache, $_scope);";
+ }
+ }
+ if ($_scope == Smarty::SCOPE_PARENT) {
+ $output .= "\nif (\$_smarty_tpl->parent != null) \$_smarty_tpl->parent->tpl_vars[$_attr[var]] = clone \$_smarty_tpl->tpl_vars[$_attr[var]];";
+ } elseif ($_scope == Smarty::SCOPE_ROOT || $_scope == Smarty::SCOPE_GLOBAL) {
+ $output .= "\n\$_ptr = \$_smarty_tpl->parent; while (\$_ptr != null) {\$_ptr->tpl_vars[$_attr[var]] = clone \$_smarty_tpl->tpl_vars[$_attr[var]]; \$_ptr = \$_ptr->parent; }";
+ }
+ if ( $_scope == Smarty::SCOPE_GLOBAL) {
+ $output .= "\nSmarty::\$global_tpl_vars[$_attr[var]] = clone \$_smarty_tpl->tpl_vars[$_attr[var]];";
+ }
+ $output .= '?>';
+ return $output;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_block.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_block.php
new file mode 100644
index 000000000..03abf493e
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_block.php
@@ -0,0 +1,277 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Block
+ *
+ * Compiles the {block}{/block} tags
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Block Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Block extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $required_attributes = array('name');
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $shorttag_order = array('name', 'hide');
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('hide');
+
+ /**
+ * Compiles code for the {block} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return boolean true
+ */
+ public function compile($args, $compiler) {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ $save = array($_attr, $compiler->parser->current_buffer, $compiler->nocache, $compiler->smarty->merge_compiled_includes, $compiler->merged_templates, $compiler->smarty->merged_templates_func, $compiler->template->properties, $compiler->template->has_nocache_code);
+ $this->openTag($compiler, 'block', $save);
+ if ($_attr['nocache'] == true) {
+ $compiler->nocache = true;
+ }
+ // set flag for {block} tag
+ $compiler->inheritance = true;
+ // must merge includes
+ $compiler->smarty->merge_compiled_includes = true;
+
+ $compiler->parser->current_buffer = new _smarty_template_buffer($compiler->parser);
+ $compiler->has_code = false;
+ return true;
+ }
+
+ /**
+ * Save or replace child block source by block name during parsing
+ *
+ * @param string $block_content block source content
+ * @param string $block_tag opening block tag
+ * @param object $template template object
+ * @param string $filepath filepath of template source
+ */
+ public static function saveBlockData($block_content, $block_tag, $template, $filepath) {
+ $_rdl = preg_quote($template->smarty->right_delimiter);
+ $_ldl = preg_quote($template->smarty->left_delimiter);
+ if ($template->smarty->auto_literal) {
+ $al = '\s*';
+ } else {
+ $al = '';
+ }
+ if (0 == preg_match("!({$_ldl}{$al}block\s+)(name=)?(\w+|'.*'|\".*\")(\s*?)?((append|prepend|nocache)?(\s*)?(hide)?)?(\s*{$_rdl})!", $block_tag, $_match)) {
+ $error_text = 'Syntax Error in template "' . $template->source->filepath . '" "' . htmlspecialchars($block_tag) . '" illegal options';
+ throw new SmartyCompilerException($error_text);
+ } else {
+ $_name = trim($_match[3], '\'"');
+ if ($_match[8] != 'hide' || isset($template->block_data[$_name])) { // replace {$smarty.block.child}
+ // do we have {$smart.block.child} in nested {block} tags?
+ if (0 != preg_match_all("!({$_ldl}{$al}block\s+)(name=)?(\w+|'.*'|\".*\")([\s\S]*?)(hide)?(\s*{$_rdl})([\s\S]*?)({$_ldl}{$al}\\\$smarty\.block\.child{$_rdl})([\s\S]*?{$_ldl}{$al}/block{$_rdl})!", $block_content, $_match2)) {
+ foreach ($_match2[3] as $key => $name) {
+ // get it's replacement
+ $_name2 = trim($name, '\'"');
+ if ($_match2[5][$key] != 'hide' || isset($template->block_data[$_name2])) {
+ if (isset($template->block_data[$_name2])) {
+ $replacement = $template->block_data[$_name2]['source'];
+ } else {
+ $replacement = '';
+ }
+ // replace {$smarty.block.child} tag
+ $search = array("%({$_ldl}{$al}block[\s\S]*?{$name}[\s\S]*?{$_rdl})([\s\S]*?)({$_ldl}{$al}\\\$smarty\.block\.child{$_rdl})([\s\S]*?)({$_ldl}{$al}/block{$_rdl})%", "/§§§child§§§/");
+ $replace = array('\2§§§child§§§\4', $replacement);
+ $block_content = preg_replace($search, $replace, $block_content);
+ } else {
+ // remove hidden blocks
+ $block_content = preg_replace("%({$_ldl}{$al}block[\s\S]*?{$name}[\s\S]*?{$_rdl}[\s\S]*?{$_ldl}{$al}/block{$_rdl})%", '', $block_content);
+ }
+ }
+ }
+ // do we have not nested {$smart.block.child}
+ if (0 != preg_match("/({$_ldl}{$al}\\\$smarty\.block\.child{$_rdl})/", $block_content, $_match2)) {
+ // get child replacement for this block
+ if (isset($template->block_data[$_name])) {
+ $replacement = $template->block_data[$_name]['source'];
+ unset($template->block_data[$_name]);
+ } else {
+ $replacement = '';
+ }
+ $block_content = preg_replace("/({$_ldl}{$al}\\\$smarty\.block\.child{$_rdl})/", $replacement, $block_content);
+ }
+ if (isset($template->block_data[$_name])) {
+ if (strpos($template->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) {
+ $template->block_data[$_name]['source'] =
+ str_replace('%%%%SMARTY_PARENT%%%%', $block_content, $template->block_data[$_name]['source']);
+ } elseif ($template->block_data[$_name]['mode'] == 'prepend') {
+ $template->block_data[$_name]['source'] .= $block_content;
+ } elseif ($template->block_data[$_name]['mode'] == 'append') {
+ $template->block_data[$_name]['source'] = $block_content . $template->block_data[$_name]['source'];
+ }
+ } else {
+ $template->block_data[$_name]['source'] = $block_content;
+ $template->block_data[$_name]['file'] = $filepath;
+ }
+ if ($_match[6] == 'append') {
+ $template->block_data[$_name]['mode'] = 'append';
+ } elseif ($_match[6] == 'prepend') {
+ $template->block_data[$_name]['mode'] = 'prepend';
+ } else {
+ $template->block_data[$_name]['mode'] = 'replace';
+ }
+ }
+ }
+ }
+
+ /**
+ * Compile saved child block source
+ *
+ * @param object $compiler compiler object
+ * @param string $_name optional name of child block
+ * @return string compiled code of schild block
+ */
+ public static function compileChildBlock($compiler, $_name = null) {
+ $_output = '';
+ // if called by {$smarty.block.child} we must search the name of enclosing {block}
+ if ($_name == null) {
+ $stack_count = count($compiler->_tag_stack);
+ while (--$stack_count >= 0) {
+ if ($compiler->_tag_stack[$stack_count][0] == 'block') {
+ $_name = trim($compiler->_tag_stack[$stack_count][1][0]['name'], "'\"");
+ break;
+ }
+ }
+ // flag that child is already compile by {$smarty.block.child} inclusion
+ $compiler->template->block_data[$_name]['compiled'] = true;
+ }
+ if ($_name == null) {
+ $compiler->trigger_template_error('{$smarty.block.child} used out of context', $compiler->lex->taglineno);
+ }
+ // undefined child?
+ if (!isset($compiler->template->block_data[$_name]['source'])) {
+ return '';
+ }
+ $_tpl = new Smarty_Internal_template('string:' . $compiler->template->block_data[$_name]['source'], $compiler->smarty, $compiler->template, $compiler->template->cache_id,
+ $compiler->template->compile_id = null, $compiler->template->caching, $compiler->template->cache_lifetime);
+ $_tpl->variable_filters = $compiler->template->variable_filters;
+ $_tpl->properties['nocache_hash'] = $compiler->template->properties['nocache_hash'];
+ $_tpl->source->filepath = $compiler->template->block_data[$_name]['file'];
+ $_tpl->allow_relative_path = true;
+ if ($compiler->nocache) {
+ $_tpl->compiler->forceNocache = 2;
+ } else {
+ $_tpl->compiler->forceNocache = 1;
+ }
+ $_tpl->compiler->suppressHeader = true;
+ $_tpl->compiler->suppressTemplatePropertyHeader = true;
+ $_tpl->compiler->suppressMergedTemplates = true;
+ if (strpos($compiler->template->block_data[$_name]['source'], '%%%%SMARTY_PARENT%%%%') !== false) {
+ $_output = str_replace('%%%%SMARTY_PARENT%%%%', $compiler->parser->current_buffer->to_smarty_php(), $_tpl->compiler->compileTemplate($_tpl));
+ } elseif ($compiler->template->block_data[$_name]['mode'] == 'prepend') {
+ $_output = $_tpl->compiler->compileTemplate($_tpl) . $compiler->parser->current_buffer->to_smarty_php();
+ } elseif ($compiler->template->block_data[$_name]['mode'] == 'append') {
+ $_output = $compiler->parser->current_buffer->to_smarty_php() . $_tpl->compiler->compileTemplate($_tpl);
+ } elseif (!empty($compiler->template->block_data[$_name])) {
+ $_output = $_tpl->compiler->compileTemplate($_tpl);
+ }
+ $compiler->template->properties['file_dependency'] = array_merge($compiler->template->properties['file_dependency'], $_tpl->properties['file_dependency']);
+ $compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $_tpl->properties['function']);
+ $compiler->merged_templates = array_merge($compiler->merged_templates, $_tpl->compiler->merged_templates);
+ $compiler->template->variable_filters = $_tpl->variable_filters;
+ if ($_tpl->has_nocache_code) {
+ $compiler->template->has_nocache_code = true;
+ }
+ foreach ($_tpl->required_plugins as $key => $tmp1) {
+ if ($compiler->nocache && $compiler->template->caching) {
+ $code = 'nocache';
+ } else {
+ $code = $key;
+ }
+ foreach ($tmp1 as $name => $tmp) {
+ foreach ($tmp as $type => $data) {
+ $compiler->template->required_plugins[$code][$name][$type] = $data;
+ }
+ }
+ }
+ unset($_tpl);
+ return $_output;
+ }
+
+}
+
+/**
+ * Smarty Internal Plugin Compile BlockClose Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Blockclose extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {/block} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler) {
+ $compiler->has_code = true;
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ $saved_data = $this->closeTag($compiler, array('block'));
+ $_name = trim($saved_data[0]['name'], "\"'");
+ if (isset($compiler->template->block_data[$_name]) && !isset($compiler->template->block_data[$_name]['compiled'])) {
+ // restore to status before {block} tag as new subtemplate code of parent {block} is not needed
+ // TODO: Below code was disabled in 3.1.8 because of problems with {include} in nested {block} tags in child templates
+ // combined with append/prepend or $smarty.block.parent
+ // For later versions it should be checked under which conditions it could run for optimisation
+ //
+ //$compiler->merged_templates = $saved_data[4];
+ //$compiler->smarty->merged_templates_func = $saved_data[5];
+ //$compiler->template->properties = $saved_data[6];
+ //$compiler->template->has_nocache_code = $saved_data[7];
+ $_output = Smarty_Internal_Compile_Block::compileChildBlock($compiler, $_name);
+ } else {
+ if (isset($saved_data[0]['hide']) && !isset($compiler->template->block_data[$_name]['source'])) {
+ $_output = '';
+ } else {
+ $_output = $compiler->parser->current_buffer->to_smarty_php();
+ }
+ unset($compiler->template->block_data[$_name]['compiled']);
+ }
+ // reset flags
+ $compiler->parser->current_buffer = $saved_data[1];
+ $compiler->nocache = $saved_data[2];
+ $compiler->smarty->merge_compiled_includes = $saved_data[3];
+ // reset flag for {block} tag
+ $compiler->inheritance = false;
+ // $_output content has already nocache code processed
+ $compiler->suppressNocacheProcessing = true;
+ return $_output;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_break.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_break.php
new file mode 100644
index 000000000..259c66e2b
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_break.php
@@ -0,0 +1,77 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Break
+ *
+ * Compiles the {break} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+/**
+ * Smarty Internal Plugin Compile Break Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Break extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('levels');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $shorttag_order = array('levels');
+
+ /**
+ * Compiles code for the {break} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ static $_is_loopy = array('for' => true, 'foreach' => true, 'while' => true, 'section' => true);
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ if ($_attr['nocache'] === true) {
+ $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
+ }
+
+ if (isset($_attr['levels'])) {
+ if (!is_numeric($_attr['levels'])) {
+ $compiler->trigger_template_error('level attribute must be a numeric constant', $compiler->lex->taglineno);
+ }
+ $_levels = $_attr['levels'];
+ } else {
+ $_levels = 1;
+ }
+ $level_count = $_levels;
+ $stack_count = count($compiler->_tag_stack) - 1;
+ while ($level_count > 0 && $stack_count >= 0) {
+ if (isset($_is_loopy[$compiler->_tag_stack[$stack_count][0]])) {
+ $level_count--;
+ }
+ $stack_count--;
+ }
+ if ($level_count != 0) {
+ $compiler->trigger_template_error("cannot break {$_levels} level(s)", $compiler->lex->taglineno);
+ }
+ $compiler->has_code = true;
+ return "<?php break {$_levels}?>";
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_call.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_call.php
new file mode 100644
index 000000000..af12a048c
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_call.php
@@ -0,0 +1,130 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Function_Call
+ *
+ * Compiles the calls of user defined tags defined by {function}
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Function_Call Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Call extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $required_attributes = array('name');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $shorttag_order = array('name');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles the calls of user defined tags defined by {function}
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ // save possible attributes
+ if (isset($_attr['assign'])) {
+ // output will be stored in a smarty variable instead of beind displayed
+ $_assign = $_attr['assign'];
+ }
+ $_name = $_attr['name'];
+ if ($compiler->compiles_template_function) {
+ $compiler->called_functions[] = trim($_name, "'\"");
+ }
+ unset($_attr['name'], $_attr['assign'], $_attr['nocache']);
+ // set flag (compiled code of {function} must be included in cache file
+ if ($compiler->nocache || $compiler->tag_nocache) {
+ $_nocache = 'true';
+ } else {
+ $_nocache = 'false';
+ }
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ if (isset($compiler->template->properties['function'][$_name]['parameter'])) {
+ foreach ($compiler->template->properties['function'][$_name]['parameter'] as $_key => $_value) {
+ if (!isset($_attr[$_key])) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ }
+ } elseif (isset($compiler->smarty->template_functions[$_name]['parameter'])) {
+ foreach ($compiler->smarty->template_functions[$_name]['parameter'] as $_key => $_value) {
+ if (!isset($_attr[$_key])) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ }
+ }
+ //varibale name?
+ if (!(strpos($_name, '$') === false)) {
+ $call_cache = $_name;
+ $call_function = '$tmp = "smarty_template_function_".' . $_name . '; $tmp';
+ } else {
+ $_name = trim($_name, "'\"");
+ $call_cache = "'{$_name}'";
+ $call_function = 'smarty_template_function_' . $_name;
+ }
+
+ $_params = 'array(' . implode(",", $_paramsArray) . ')';
+ $_hash = str_replace('-', '_', $compiler->template->properties['nocache_hash']);
+ // was there an assign attribute
+ if (isset($_assign)) {
+ if ($compiler->template->caching) {
+ $_output = "<?php ob_start(); Smarty_Internal_Function_Call_Handler::call ({$call_cache},\$_smarty_tpl,{$_params},'{$_hash}',{$_nocache}); \$_smarty_tpl->assign({$_assign}, ob_get_clean());?>\n";
+ } else {
+ $_output = "<?php ob_start(); {$call_function}(\$_smarty_tpl,{$_params}); \$_smarty_tpl->assign({$_assign}, ob_get_clean());?>\n";
+ }
+ } else {
+ if ($compiler->template->caching) {
+ $_output = "<?php Smarty_Internal_Function_Call_Handler::call ({$call_cache},\$_smarty_tpl,{$_params},'{$_hash}',{$_nocache});?>\n";
+ } else {
+ $_output = "<?php {$call_function}(\$_smarty_tpl,{$_params});?>\n";
+ }
+ }
+ return $_output;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php
new file mode 100644
index 000000000..9a5071ebe
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_capture.php
@@ -0,0 +1,98 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Capture
+ *
+ * Compiles the {capture} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Capture Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Capture extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $shorttag_order = array('name');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('name', 'assign', 'append');
+
+ /**
+ * Compiles code for the {capture} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ $buffer = isset($_attr['name']) ? $_attr['name'] : "'default'";
+ $assign = isset($_attr['assign']) ? $_attr['assign'] : 'null';
+ $append = isset($_attr['append']) ? $_attr['append'] : 'null';
+
+ $compiler->_capture_stack[0][] = array($buffer, $assign, $append, $compiler->nocache);
+ // maybe nocache because of nocache variables
+ $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
+ $_output = "<?php \$_smarty_tpl->_capture_stack[0][] = array($buffer, $assign, $append); ob_start(); ?>";
+
+ return $_output;
+ }
+
+}
+
+/**
+ * Smarty Internal Plugin Compile Captureclose Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_CaptureClose extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {/capture} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ // must endblock be nocache?
+ if ($compiler->nocache) {
+ $compiler->tag_nocache = true;
+ }
+
+ list($buffer, $assign, $append, $compiler->nocache) = array_pop($compiler->_capture_stack[0]);
+
+ $_output = "<?php list(\$_capture_buffer, \$_capture_assign, \$_capture_append) = array_pop(\$_smarty_tpl->_capture_stack[0]);\n";
+ $_output .= "if (!empty(\$_capture_buffer)) {\n";
+ $_output .= " if (isset(\$_capture_assign)) \$_smarty_tpl->assign(\$_capture_assign, ob_get_contents());\n";
+ $_output .= " if (isset( \$_capture_append)) \$_smarty_tpl->append( \$_capture_append, ob_get_contents());\n";
+ $_output .= " Smarty::\$_smarty_vars['capture'][\$_capture_buffer]=ob_get_clean();\n";
+ $_output .= "} else \$_smarty_tpl->capture_error();?>";
+ return $_output;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_config_load.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_config_load.php
new file mode 100644
index 000000000..deaa052c5
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_config_load.php
@@ -0,0 +1,85 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Config Load
+ *
+ * Compiles the {config load} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Config Load Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Config_Load extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $required_attributes = array('file');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $shorttag_order = array('file','section');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('section', 'scope');
+
+ /**
+ * Compiles code for the {config_load} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ static $_is_legal_scope = array('local' => true,'parent' => true,'root' => true,'global' => true);
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ if ($_attr['nocache'] === true) {
+ $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
+ }
+
+
+ // save posible attributes
+ $conf_file = $_attr['file'];
+ if (isset($_attr['section'])) {
+ $section = $_attr['section'];
+ } else {
+ $section = 'null';
+ }
+ $scope = 'local';
+ // scope setup
+ if (isset($_attr['scope'])) {
+ $_attr['scope'] = trim($_attr['scope'], "'\"");
+ if (isset($_is_legal_scope[$_attr['scope']])) {
+ $scope = $_attr['scope'];
+ } else {
+ $compiler->trigger_template_error('illegal value for "scope" attribute', $compiler->lex->taglineno);
+ }
+ }
+ // create config object
+ $_output = "<?php \$_config = new Smarty_Internal_Config($conf_file, \$_smarty_tpl->smarty, \$_smarty_tpl);";
+ $_output .= "\$_config->loadConfigVars($section, '$scope'); ?>";
+ return $_output;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_continue.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_continue.php
new file mode 100644
index 000000000..4082a93b3
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_continue.php
@@ -0,0 +1,78 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Continue
+ *
+ * Compiles the {continue} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Continue Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Continue extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('levels');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $shorttag_order = array('levels');
+
+ /**
+ * Compiles code for the {continue} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ static $_is_loopy = array('for' => true, 'foreach' => true, 'while' => true, 'section' => true);
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ if ($_attr['nocache'] === true) {
+ $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
+ }
+
+ if (isset($_attr['levels'])) {
+ if (!is_numeric($_attr['levels'])) {
+ $compiler->trigger_template_error('level attribute must be a numeric constant', $compiler->lex->taglineno);
+ }
+ $_levels = $_attr['levels'];
+ } else {
+ $_levels = 1;
+ }
+ $level_count = $_levels;
+ $stack_count = count($compiler->_tag_stack) - 1;
+ while ($level_count > 0 && $stack_count >= 0) {
+ if (isset($_is_loopy[$compiler->_tag_stack[$stack_count][0]])) {
+ $level_count--;
+ }
+ $stack_count--;
+ }
+ if ($level_count != 0) {
+ $compiler->trigger_template_error("cannot continue {$_levels} level(s)", $compiler->lex->taglineno);
+ }
+ $compiler->has_code = true;
+ return "<?php continue {$_levels}?>";
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_debug.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_debug.php
new file mode 100644
index 000000000..f50c7aee2
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_debug.php
@@ -0,0 +1,43 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Debug
+ *
+ * Compiles the {debug} tag.
+ * It opens a window the the Smarty Debugging Console.
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Debug Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Debug extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {debug} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ // compile always as nocache
+ $compiler->tag_nocache = true;
+
+ // display debug template
+ $_output = "<?php \$_smarty_tpl->smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\$_smarty_tpl); ?>";
+ return $_output;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_eval.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_eval.php
new file mode 100644
index 000000000..6cf481b50
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_eval.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Eval
+ *
+ * Compiles the {eval} tag.
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Eval Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Eval extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $required_attributes = array('var');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('assign');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $shorttag_order = array('var','assign');
+
+ /**
+ * Compiles code for the {eval} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $this->required_attributes = array('var');
+ $this->optional_attributes = array('assign');
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ if (isset($_attr['assign'])) {
+ // output will be stored in a smarty variable instead of beind displayed
+ $_assign = $_attr['assign'];
+ }
+
+ // create template object
+ $_output = "\$_template = new {$compiler->smarty->template_class}('eval:'.".$_attr['var'].", \$_smarty_tpl->smarty, \$_smarty_tpl);";
+ //was there an assign attribute?
+ if (isset($_assign)) {
+ $_output .= "\$_smarty_tpl->assign($_assign,\$_template->fetch());";
+ } else {
+ $_output .= "echo \$_template->fetch();";
+ }
+ return "<?php $_output ?>";
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_extends.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_extends.php
new file mode 100644
index 000000000..9042aa233
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_extends.php
@@ -0,0 +1,128 @@
+<?php
+
+/**
+* Smarty Internal Plugin Compile extend
+*
+* Compiles the {extends} tag
+*
+* @package Smarty
+* @subpackage Compiler
+* @author Uwe Tews
+*/
+
+/**
+* Smarty Internal Plugin Compile extend Class
+*
+* @package Smarty
+* @subpackage Compiler
+*/
+class Smarty_Internal_Compile_Extends extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $required_attributes = array('file');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $shorttag_order = array('file');
+ /**
+ * mbstring.overload flag
+ *
+ * @var int
+ */
+ public $mbstring_overload = 0;
+
+ /**
+ * Compiles code for the {extends} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ static $_is_stringy = array('string' => true, 'eval' => true);
+ $this->_rdl = preg_quote($compiler->smarty->right_delimiter);
+ $this->_ldl = preg_quote($compiler->smarty->left_delimiter);
+ $filepath = $compiler->template->source->filepath;
+ $this->mbstring_overload = ini_get('mbstring.func_overload') & 2;
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ if ($_attr['nocache'] === true) {
+ $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
+ }
+
+ $_smarty_tpl = $compiler->template;
+ $include_file = null;
+ if (strpos($_attr['file'], '$_tmp') !== false) {
+ $compiler->trigger_template_error('illegal value for file attribute', $compiler->lex->taglineno);
+ }
+ eval('$include_file = ' . $_attr['file'] . ';');
+ // create template object
+ $_template = new $compiler->smarty->template_class($include_file, $compiler->smarty, $compiler->template);
+ // save file dependency
+ if (isset($_is_stringy[$_template->source->type])) {
+ $template_sha1 = sha1($include_file);
+ } else {
+ $template_sha1 = sha1($_template->source->filepath);
+ }
+ if (isset($compiler->template->properties['file_dependency'][$template_sha1])) {
+ $compiler->trigger_template_error("illegal recursive call of \"{$include_file}\"", $compiler->lex->line - 1);
+ }
+ $compiler->template->properties['file_dependency'][$template_sha1] = array($_template->source->filepath, $_template->source->timestamp, $_template->source->type);
+ $_content = ($this->mbstring_overload ? mb_substr($compiler->template->source->content, $compiler->lex->counter - 1, 20000000, 'latin1') : substr($compiler->template->source->content, $compiler->lex->counter - 1));
+ if (preg_match_all("!({$this->_ldl}block\s(.+?){$this->_rdl})!", $_content, $s) !=
+ preg_match_all("!({$this->_ldl}/block{$this->_rdl})!", $_content, $c)) {
+ $compiler->trigger_template_error('unmatched {block} {/block} pairs');
+ }
+ preg_match_all("!{$this->_ldl}block\s(.+?){$this->_rdl}|{$this->_ldl}/block{$this->_rdl}|{$this->_ldl}\*([\S\s]*?)\*{$this->_rdl}!", $_content, $_result, PREG_OFFSET_CAPTURE);
+ $_result_count = count($_result[0]);
+ $_start = 0;
+ while ($_start+1 < $_result_count) {
+ $_end = 0;
+ $_level = 1;
+ if (($this->mbstring_overload ? mb_substr($_result[0][$_start][0],0,mb_strlen($compiler->smarty->left_delimiter,'latin1')+1, 'latin1') : substr($_result[0][$_start][0],0,strlen($compiler->smarty->left_delimiter)+1)) == $compiler->smarty->left_delimiter.'*') {
+ $_start++;
+ continue;
+ }
+ while ($_level != 0) {
+ $_end++;
+ if (($this->mbstring_overload ? mb_substr($_result[0][$_start + $_end][0],0,mb_strlen($compiler->smarty->left_delimiter,'latin1')+1, 'latin1') : substr($_result[0][$_start + $_end][0],0,strlen($compiler->smarty->left_delimiter)+1)) == $compiler->smarty->left_delimiter.'*') {
+ continue;
+ }
+ if (!strpos($_result[0][$_start + $_end][0], '/')) {
+ $_level++;
+ } else {
+ $_level--;
+ }
+ }
+ $_block_content = str_replace($compiler->smarty->left_delimiter . '$smarty.block.parent' . $compiler->smarty->right_delimiter, '%%%%SMARTY_PARENT%%%%',
+ ($this->mbstring_overload ? mb_substr($_content, $_result[0][$_start][1] + mb_strlen($_result[0][$_start][0], 'latin1'), $_result[0][$_start + $_end][1] - $_result[0][$_start][1] - + mb_strlen($_result[0][$_start][0], 'latin1'), 'latin1') : substr($_content, $_result[0][$_start][1] + strlen($_result[0][$_start][0]), $_result[0][$_start + $_end][1] - $_result[0][$_start][1] - + strlen($_result[0][$_start][0]))));
+ Smarty_Internal_Compile_Block::saveBlockData($_block_content, $_result[0][$_start][0], $compiler->template, $filepath);
+ $_start = $_start + $_end + 1;
+ }
+ if ($_template->source->type == 'extends') {
+ $_template->block_data = $compiler->template->block_data;
+ }
+ $compiler->template->source->content = $_template->source->content;
+ if ($_template->source->type == 'extends') {
+ $compiler->template->block_data = $_template->block_data;
+ foreach ($_template->source->components as $key => $component) {
+ $compiler->template->properties['file_dependency'][$key] = array($component->filepath, $component->timestamp, $component->type);
+ }
+ }
+ $compiler->template->source->filepath = $_template->source->filepath;
+ $compiler->abort_and_recompile = true;
+ return '';
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_for.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_for.php
new file mode 100644
index 000000000..057f4fb79
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_for.php
@@ -0,0 +1,151 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile For
+ *
+ * Compiles the {for} {forelse} {/for} tags
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile For Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_For extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {for} tag
+ *
+ * Smarty 3 does implement two different sytaxes:
+ *
+ * - {for $var in $array}
+ * For looping over arrays or iterators
+ *
+ * - {for $x=0; $x<$y; $x++}
+ * For general loops
+ *
+ * The parser is gereration different sets of attribute by which this compiler can
+ * determin which syntax is used.
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ if ($parameter == 0) {
+ $this->required_attributes = array('start', 'to');
+ $this->optional_attributes = array('max', 'step');
+ } else {
+ $this->required_attributes = array('start', 'ifexp', 'var', 'step');
+ $this->optional_attributes = array();
+ }
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ $output = "<?php ";
+ if ($parameter == 1) {
+ foreach ($_attr['start'] as $_statement) {
+ $output .= " \$_smarty_tpl->tpl_vars[$_statement[var]] = new Smarty_Variable;";
+ $output .= " \$_smarty_tpl->tpl_vars[$_statement[var]]->value = $_statement[value];\n";
+ }
+ $output .= " if ($_attr[ifexp]){ for (\$_foo=true;$_attr[ifexp]; \$_smarty_tpl->tpl_vars[$_attr[var]]->value$_attr[step]){\n";
+ } else {
+ $_statement = $_attr['start'];
+ $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]] = new Smarty_Variable;";
+ if (isset($_attr['step'])) {
+ $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->step = $_attr[step];";
+ } else {
+ $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->step = 1;";
+ }
+ if (isset($_attr['max'])) {
+ $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->total = (int)min(ceil((\$_smarty_tpl->tpl_vars[$_statement[var]]->step > 0 ? $_attr[to]+1 - ($_statement[value]) : $_statement[value]-($_attr[to])+1)/abs(\$_smarty_tpl->tpl_vars[$_statement[var]]->step)),$_attr[max]);\n";
+ } else {
+ $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->total = (int)ceil((\$_smarty_tpl->tpl_vars[$_statement[var]]->step > 0 ? $_attr[to]+1 - ($_statement[value]) : $_statement[value]-($_attr[to])+1)/abs(\$_smarty_tpl->tpl_vars[$_statement[var]]->step));\n";
+ }
+ $output .= "if (\$_smarty_tpl->tpl_vars[$_statement[var]]->total > 0){\n";
+ $output .= "for (\$_smarty_tpl->tpl_vars[$_statement[var]]->value = $_statement[value], \$_smarty_tpl->tpl_vars[$_statement[var]]->iteration = 1;\$_smarty_tpl->tpl_vars[$_statement[var]]->iteration <= \$_smarty_tpl->tpl_vars[$_statement[var]]->total;\$_smarty_tpl->tpl_vars[$_statement[var]]->value += \$_smarty_tpl->tpl_vars[$_statement[var]]->step, \$_smarty_tpl->tpl_vars[$_statement[var]]->iteration++){\n";
+ $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->first = \$_smarty_tpl->tpl_vars[$_statement[var]]->iteration == 1;";
+ $output .= "\$_smarty_tpl->tpl_vars[$_statement[var]]->last = \$_smarty_tpl->tpl_vars[$_statement[var]]->iteration == \$_smarty_tpl->tpl_vars[$_statement[var]]->total;";
+ }
+ $output .= "?>";
+
+ $this->openTag($compiler, 'for', array('for', $compiler->nocache));
+ // maybe nocache because of nocache variables
+ $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
+ // return compiled code
+ return $output;
+ }
+
+}
+
+/**
+ * Smarty Internal Plugin Compile Forelse Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Forelse extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {forelse} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ list($openTag, $nocache) = $this->closeTag($compiler, array('for'));
+ $this->openTag($compiler, 'forelse', array('forelse', $nocache));
+ return "<?php }} else { ?>";
+ }
+
+}
+
+/**
+ * Smarty Internal Plugin Compile Forclose Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Forclose extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {/for} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ // must endblock be nocache?
+ if ($compiler->nocache) {
+ $compiler->tag_nocache = true;
+ }
+
+ list($openTag, $compiler->nocache) = $this->closeTag($compiler, array('for', 'forelse'));
+
+ if ($openTag == 'forelse') {
+ return "<?php } ?>";
+ } else {
+ return "<?php }} ?>";
+ }
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_foreach.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_foreach.php
new file mode 100644
index 000000000..1354c89d5
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_foreach.php
@@ -0,0 +1,231 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Foreach
+ *
+ * Compiles the {foreach} {foreachelse} {/foreach} tags
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Foreach Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Foreach extends Smarty_Internal_CompileBase {
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $required_attributes = array('from', 'item');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('name', 'key');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $shorttag_order = array('from','item','key','name');
+
+ /**
+ * Compiles code for the {foreach} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $tpl = $compiler->template;
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ $from = $_attr['from'];
+ $item = $_attr['item'];
+ if (!strncmp("\$_smarty_tpl->tpl_vars[$item]", $from, strlen($item) + 24)) {
+ $compiler->trigger_template_error("item variable {$item} may not be the same variable as at 'from'", $compiler->lex->taglineno);
+ }
+
+ if (isset($_attr['key'])) {
+ $key = $_attr['key'];
+ } else {
+ $key = null;
+ }
+
+ $this->openTag($compiler, 'foreach', array('foreach', $compiler->nocache, $item, $key));
+ // maybe nocache because of nocache variables
+ $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
+
+ if (isset($_attr['name'])) {
+ $name = $_attr['name'];
+ $has_name = true;
+ $SmartyVarName = '$smarty.foreach.' . trim($name, '\'"') . '.';
+ } else {
+ $name = null;
+ $has_name = false;
+ }
+ $ItemVarName = '$' . trim($item, '\'"') . '@';
+ // evaluates which Smarty variables and properties have to be computed
+ if ($has_name) {
+ $usesSmartyFirst = strpos($tpl->source->content, $SmartyVarName . 'first') !== false;
+ $usesSmartyLast = strpos($tpl->source->content, $SmartyVarName . 'last') !== false;
+ $usesSmartyIndex = strpos($tpl->source->content, $SmartyVarName . 'index') !== false;
+ $usesSmartyIteration = strpos($tpl->source->content, $SmartyVarName . 'iteration') !== false;
+ $usesSmartyShow = strpos($tpl->source->content, $SmartyVarName . 'show') !== false;
+ $usesSmartyTotal = strpos($tpl->source->content, $SmartyVarName . 'total') !== false;
+ } else {
+ $usesSmartyFirst = false;
+ $usesSmartyLast = false;
+ $usesSmartyTotal = false;
+ $usesSmartyShow = false;
+ }
+
+ $usesPropFirst = $usesSmartyFirst || strpos($tpl->source->content, $ItemVarName . 'first') !== false;
+ $usesPropLast = $usesSmartyLast || strpos($tpl->source->content, $ItemVarName . 'last') !== false;
+ $usesPropIndex = $usesPropFirst || strpos($tpl->source->content, $ItemVarName . 'index') !== false;
+ $usesPropIteration = $usesPropLast || strpos($tpl->source->content, $ItemVarName . 'iteration') !== false;
+ $usesPropShow = strpos($tpl->source->content, $ItemVarName . 'show') !== false;
+ $usesPropTotal = $usesSmartyTotal || $usesSmartyShow || $usesPropShow || $usesPropLast || strpos($tpl->source->content, $ItemVarName . 'total') !== false;
+ // generate output code
+ $output = "<?php ";
+ $output .= " \$_smarty_tpl->tpl_vars[$item] = new Smarty_Variable; \$_smarty_tpl->tpl_vars[$item]->_loop = false;\n";
+ if ($key != null) {
+ $output .= " \$_smarty_tpl->tpl_vars[$key] = new Smarty_Variable;\n";
+ }
+ $output .= " \$_from = $from; if (!is_array(\$_from) && !is_object(\$_from)) { settype(\$_from, 'array');}\n";
+ if ($usesPropTotal) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->total= \$_smarty_tpl->_count(\$_from);\n";
+ }
+ if ($usesPropIteration) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->iteration=0;\n";
+ }
+ if ($usesPropIndex) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->index=-1;\n";
+ }
+ if ($usesPropShow) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->show = (\$_smarty_tpl->tpl_vars[$item]->total > 0);\n";
+ }
+ if ($has_name) {
+ if ($usesSmartyTotal) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['total'] = \$_smarty_tpl->tpl_vars[$item]->total;\n";
+ }
+ if ($usesSmartyIteration) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['iteration']=0;\n";
+ }
+ if ($usesSmartyIndex) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['index']=-1;\n";
+ }
+ if ($usesSmartyShow) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['show']=(\$_smarty_tpl->tpl_vars[$item]->total > 0);\n";
+ }
+ }
+ $output .= "foreach (\$_from as \$_smarty_tpl->tpl_vars[$item]->key => \$_smarty_tpl->tpl_vars[$item]->value){\n\$_smarty_tpl->tpl_vars[$item]->_loop = true;\n";
+ if ($key != null) {
+ $output .= " \$_smarty_tpl->tpl_vars[$key]->value = \$_smarty_tpl->tpl_vars[$item]->key;\n";
+ }
+ if ($usesPropIteration) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->iteration++;\n";
+ }
+ if ($usesPropIndex) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->index++;\n";
+ }
+ if ($usesPropFirst) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->first = \$_smarty_tpl->tpl_vars[$item]->index === 0;\n";
+ }
+ if ($usesPropLast) {
+ $output .= " \$_smarty_tpl->tpl_vars[$item]->last = \$_smarty_tpl->tpl_vars[$item]->iteration === \$_smarty_tpl->tpl_vars[$item]->total;\n";
+ }
+ if ($has_name) {
+ if ($usesSmartyFirst) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['first'] = \$_smarty_tpl->tpl_vars[$item]->first;\n";
+ }
+ if ($usesSmartyIteration) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['iteration']++;\n";
+ }
+ if ($usesSmartyIndex) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['index']++;\n";
+ }
+ if ($usesSmartyLast) {
+ $output .= " \$_smarty_tpl->tpl_vars['smarty']->value['foreach'][$name]['last'] = \$_smarty_tpl->tpl_vars[$item]->last;\n";
+ }
+ }
+ $output .= "?>";
+
+ return $output;
+ }
+}
+
+/**
+ * Smarty Internal Plugin Compile Foreachelse Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Foreachelse extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {foreachelse} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ list($openTag, $nocache, $item, $key) = $this->closeTag($compiler, array('foreach'));
+ $this->openTag($compiler, 'foreachelse', array('foreachelse', $nocache, $item, $key));
+
+ return "<?php }\nif (!\$_smarty_tpl->tpl_vars[$item]->_loop) {\n?>";
+ }
+
+}
+
+/**
+ * Smarty Internal Plugin Compile Foreachclose Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Foreachclose extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {/foreach} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ // must endblock be nocache?
+ if ($compiler->nocache) {
+ $compiler->tag_nocache = true;
+ }
+
+ list($openTag, $compiler->nocache, $item, $key) = $this->closeTag($compiler, array('foreach', 'foreachelse'));
+
+ return "<?php } ?>";
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_function.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_function.php
new file mode 100644
index 000000000..876b13dee
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_function.php
@@ -0,0 +1,165 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Function
+ *
+ * Compiles the {function} {/function} tags
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Function Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Function extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $required_attributes = array('name');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $shorttag_order = array('name');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the {function} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return boolean true
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ if ($_attr['nocache'] === true) {
+ $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
+ }
+ unset($_attr['nocache']);
+ $save = array($_attr, $compiler->parser->current_buffer,
+ $compiler->template->has_nocache_code, $compiler->template->required_plugins);
+ $this->openTag($compiler, 'function', $save);
+ $_name = trim($_attr['name'], "'\"");
+ unset($_attr['name']);
+ // set flag that we are compiling a template function
+ $compiler->compiles_template_function = true;
+ $compiler->template->properties['function'][$_name]['parameter'] = array();
+ $_smarty_tpl = $compiler->template;
+ foreach ($_attr as $_key => $_data) {
+ eval ('$tmp='.$_data.';');
+ $compiler->template->properties['function'][$_name]['parameter'][$_key] = $tmp;
+ }
+ $compiler->smarty->template_functions[$_name]['parameter'] = $compiler->template->properties['function'][$_name]['parameter'];
+ if ($compiler->template->caching) {
+ $output = '';
+ } else {
+ $output = "<?php if (!function_exists('smarty_template_function_{$_name}')) {
+ function smarty_template_function_{$_name}(\$_smarty_tpl,\$params) {
+ \$saved_tpl_vars = \$_smarty_tpl->tpl_vars;
+ foreach (\$_smarty_tpl->smarty->template_functions['{$_name}']['parameter'] as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);};
+ foreach (\$params as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);}?>";
+ }
+ // Init temporay context
+ $compiler->template->required_plugins = array('compiled' => array(), 'nocache' => array());
+ $compiler->parser->current_buffer = new _smarty_template_buffer($compiler->parser);
+ $compiler->parser->current_buffer->append_subtree(new _smarty_tag($compiler->parser, $output));
+ $compiler->template->has_nocache_code = false;
+ $compiler->has_code = false;
+ $compiler->template->properties['function'][$_name]['compiled'] = '';
+ return true;
+ }
+
+}
+
+/**
+ * Smarty Internal Plugin Compile Functionclose Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Functionclose extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {/function} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return boolean true
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $_attr = $this->getAttributes($compiler, $args);
+ $saved_data = $this->closeTag($compiler, array('function'));
+ $_name = trim($saved_data[0]['name'], "'\"");
+ // build plugin include code
+ $plugins_string = '';
+ if (!empty($compiler->template->required_plugins['compiled'])) {
+ $plugins_string = '<?php ';
+ foreach($compiler->template->required_plugins['compiled'] as $tmp) {
+ foreach($tmp as $data) {
+ $plugins_string .= "if (!is_callable('{$data['function']}')) include '{$data['file']}';\n";
+ }
+ }
+ $plugins_string .= '?>';
+ }
+ if (!empty($compiler->template->required_plugins['nocache'])) {
+ $plugins_string .= "<?php echo '/*%%SmartyNocache:{$compiler->template->properties['nocache_hash']}%%*/<?php ";
+ foreach($compiler->template->required_plugins['nocache'] as $tmp) {
+ foreach($tmp as $data) {
+ $plugins_string .= "if (!is_callable(\'{$data['function']}\')) include \'{$data['file']}\';\n";
+ }
+ }
+ $plugins_string .= "?>/*/%%SmartyNocache:{$compiler->template->properties['nocache_hash']}%%*/';?>\n";
+ }
+ // remove last line break from function definition
+ $last = count($compiler->parser->current_buffer->subtrees) - 1;
+ if ($compiler->parser->current_buffer->subtrees[$last] instanceof _smarty_linebreak) {
+ unset($compiler->parser->current_buffer->subtrees[$last]);
+ }
+ // if caching save template function for possible nocache call
+ if ($compiler->template->caching) {
+ $compiler->template->properties['function'][$_name]['compiled'] .= $plugins_string
+ . $compiler->parser->current_buffer->to_smarty_php();
+ $compiler->template->properties['function'][$_name]['nocache_hash'] = $compiler->template->properties['nocache_hash'];
+ $compiler->template->properties['function'][$_name]['has_nocache_code'] = $compiler->template->has_nocache_code;
+ $compiler->template->properties['function'][$_name]['called_functions'] = $compiler->called_functions;
+ $compiler->called_functions = array();
+ $compiler->smarty->template_functions[$_name] = $compiler->template->properties['function'][$_name];
+ $compiler->has_code = false;
+ $output = true;
+ } else {
+ $output = $plugins_string . $compiler->parser->current_buffer->to_smarty_php() . "<?php \$_smarty_tpl->tpl_vars = \$saved_tpl_vars;}}?>\n";
+ }
+ // reset flag that we are compiling a template function
+ $compiler->compiles_template_function = false;
+ // restore old compiler status
+ $compiler->parser->current_buffer = $saved_data[1];
+ $compiler->template->has_nocache_code = $compiler->template->has_nocache_code | $saved_data[2];
+ $compiler->template->required_plugins = $saved_data[3];
+ return $output;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_if.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_if.php
new file mode 100644
index 000000000..8794b014b
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_if.php
@@ -0,0 +1,207 @@
+<?php
+/**
+* Smarty Internal Plugin Compile If
+*
+* Compiles the {if} {else} {elseif} {/if} tags
+*
+* @package Smarty
+* @subpackage Compiler
+* @author Uwe Tews
+*/
+
+/**
+* Smarty Internal Plugin Compile If Class
+*
+* @package Smarty
+* @subpackage Compiler
+*/
+class Smarty_Internal_Compile_If extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {if} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ $this->openTag($compiler, 'if', array(1, $compiler->nocache));
+ // must whole block be nocache ?
+ $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
+
+ if (!array_key_exists("if condition",$parameter)) {
+ $compiler->trigger_template_error("missing if condition", $compiler->lex->taglineno);
+ }
+
+ if (is_array($parameter['if condition'])) {
+ if ($compiler->nocache) {
+ $_nocache = ',true';
+ // create nocache var to make it know for further compiling
+ if (is_array($parameter['if condition']['var'])) {
+ $compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], "'")] = new Smarty_variable(null, true);
+ } else {
+ $compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_variable(null, true);
+ }
+ } else {
+ $_nocache = '';
+ }
+ if (is_array($parameter['if condition']['var'])) {
+ $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]) || !is_array(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value)) \$_smarty_tpl->createLocalArrayVariable(".$parameter['if condition']['var']['var']."$_nocache);\n";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']['var']."]->value".$parameter['if condition']['var']['smarty_internal_index']." = ".$parameter['if condition']['value']."){?>";
+ } else {
+ $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."])) \$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."] = new Smarty_Variable(null{$_nocache});";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[".$parameter['if condition']['var']."]->value = ".$parameter['if condition']['value']."){?>";
+ }
+ return $_output;
+ } else {
+ return "<?php if ({$parameter['if condition']}){?>";
+ }
+ }
+
+}
+
+/**
+* Smarty Internal Plugin Compile Else Class
+*
+* @package Smarty
+* @subpackage Compiler
+*/
+class Smarty_Internal_Compile_Else extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {else} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ list($nesting, $compiler->tag_nocache) = $this->closeTag($compiler, array('if', 'elseif'));
+ $this->openTag($compiler, 'else', array($nesting, $compiler->tag_nocache));
+
+ return "<?php }else{ ?>";
+ }
+
+}
+
+/**
+* Smarty Internal Plugin Compile ElseIf Class
+*
+* @package Smarty
+* @subpackage Compiler
+*/
+class Smarty_Internal_Compile_Elseif extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {elseif} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ list($nesting, $compiler->tag_nocache) = $this->closeTag($compiler, array('if', 'elseif'));
+
+ if (!array_key_exists("if condition",$parameter)) {
+ $compiler->trigger_template_error("missing elseif condition", $compiler->lex->taglineno);
+ }
+
+ if (is_array($parameter['if condition'])) {
+ $condition_by_assign = true;
+ if ($compiler->nocache) {
+ $_nocache = ',true';
+ // create nocache var to make it know for further compiling
+ if (is_array($parameter['if condition']['var'])) {
+ $compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], "'")] = new Smarty_variable(null, true);
+ } else {
+ $compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_variable(null, true);
+ }
+ } else {
+ $_nocache = '';
+ }
+ } else {
+ $condition_by_assign = false;
+ }
+
+ if (empty($compiler->prefix_code)) {
+ if ($condition_by_assign) {
+ $this->openTag($compiler, 'elseif', array($nesting + 1, $compiler->tag_nocache));
+ if (is_array($parameter['if condition']['var'])) {
+ $_output = "<?php }else{ if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]) || !is_array(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]->value)) \$_smarty_tpl->createLocalArrayVariable(" . $parameter['if condition']['var']['var'] . "$_nocache);\n";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]->value" . $parameter['if condition']['var']['smarty_internal_index'] . " = " . $parameter['if condition']['value'] . "){?>";
+ } else {
+ $_output = "<?php }else{ if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "])) \$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "] = new Smarty_Variable(null{$_nocache});";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "]->value = " . $parameter['if condition']['value'] . "){?>";
+ }
+ return $_output;
+ } else {
+ $this->openTag($compiler, 'elseif', array($nesting, $compiler->tag_nocache));
+ return "<?php }elseif({$parameter['if condition']}){?>";
+ }
+ } else {
+ $tmp = '';
+ foreach ($compiler->prefix_code as $code)
+ $tmp .= $code;
+ $compiler->prefix_code = array();
+ $this->openTag($compiler, 'elseif', array($nesting + 1, $compiler->tag_nocache));
+ if ($condition_by_assign) {
+ if (is_array($parameter['if condition']['var'])) {
+ $_output = "<?php }else{?>{$tmp}<?php if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]) || !is_array(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]->value)) \$_smarty_tpl->createLocalArrayVariable(" . $parameter['if condition']['var']['var'] . "$_nocache);\n";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]->value" . $parameter['if condition']['var']['smarty_internal_index'] . " = " . $parameter['if condition']['value'] . "){?>";
+ } else {
+ $_output = "<?php }else{?>{$tmp}<?php if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "])) \$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "] = new Smarty_Variable(null{$_nocache});";
+ $_output .= "if (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "]->value = " . $parameter['if condition']['value'] . "){?>";
+ }
+ return $_output;
+ } else {
+ return "<?php }else{?>{$tmp}<?php if ({$parameter['if condition']}){?>";
+ }
+ }
+ }
+
+}
+
+/**
+* Smarty Internal Plugin Compile Ifclose Class
+*
+* @package Smarty
+* @subpackage Compiler
+*/
+class Smarty_Internal_Compile_Ifclose extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {/if} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ // must endblock be nocache?
+ if ($compiler->nocache) {
+ $compiler->tag_nocache = true;
+ }
+ list($nesting, $compiler->nocache) = $this->closeTag($compiler, array('if', 'else', 'elseif'));
+ $tmp = '';
+ for ($i = 0; $i < $nesting; $i++) {
+ $tmp .= '}';
+ }
+ return "<?php {$tmp}?>";
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_include.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_include.php
new file mode 100644
index 000000000..43a144f94
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_include.php
@@ -0,0 +1,215 @@
+<?php
+/**
+* Smarty Internal Plugin Compile Include
+*
+* Compiles the {include} tag
+*
+* @package Smarty
+* @subpackage Compiler
+* @author Uwe Tews
+*/
+
+/**
+* Smarty Internal Plugin Compile Include Class
+*
+* @package Smarty
+* @subpackage Compiler
+*/
+class Smarty_Internal_Compile_Include extends Smarty_Internal_CompileBase {
+
+ /**
+ * caching mode to create nocache code but no cache file
+ */
+ const CACHING_NOCACHE_CODE = 9999;
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $required_attributes = array('file');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $shorttag_order = array('file');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $option_flags = array('nocache', 'inline', 'caching');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the {include} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ // save posible attributes
+ $include_file = $_attr['file'];
+
+ if (isset($_attr['assign'])) {
+ // output will be stored in a smarty variable instead of beind displayed
+ $_assign = $_attr['assign'];
+ }
+
+ $_parent_scope = Smarty::SCOPE_LOCAL;
+ if (isset($_attr['scope'])) {
+ $_attr['scope'] = trim($_attr['scope'], "'\"");
+ if ($_attr['scope'] == 'parent') {
+ $_parent_scope = Smarty::SCOPE_PARENT;
+ } elseif ($_attr['scope'] == 'root') {
+ $_parent_scope = Smarty::SCOPE_ROOT;
+ } elseif ($_attr['scope'] == 'global') {
+ $_parent_scope = Smarty::SCOPE_GLOBAL;
+ }
+ }
+ $_caching = 'null';
+ if ($compiler->nocache || $compiler->tag_nocache) {
+ $_caching = Smarty::CACHING_OFF;
+ }
+ // default for included templates
+ if ($compiler->template->caching && !$compiler->nocache && !$compiler->tag_nocache) {
+ $_caching = self::CACHING_NOCACHE_CODE;
+ }
+ /*
+ * if the {include} tag provides individual parameter for caching
+ * it will not be included into the common cache file and treated like
+ * a nocache section
+ */
+ if (isset($_attr['cache_lifetime'])) {
+ $_cache_lifetime = $_attr['cache_lifetime'];
+ $compiler->tag_nocache = true;
+ $_caching = Smarty::CACHING_LIFETIME_CURRENT;
+ } else {
+ $_cache_lifetime = 'null';
+ }
+ if (isset($_attr['cache_id'])) {
+ $_cache_id = $_attr['cache_id'];
+ $compiler->tag_nocache = true;
+ $_caching = Smarty::CACHING_LIFETIME_CURRENT;
+ } else {
+ $_cache_id = '$_smarty_tpl->cache_id';
+ }
+ if (isset($_attr['compile_id'])) {
+ $_compile_id = $_attr['compile_id'];
+ } else {
+ $_compile_id = '$_smarty_tpl->compile_id';
+ }
+ if ($_attr['caching'] === true) {
+ $_caching = Smarty::CACHING_LIFETIME_CURRENT;
+ }
+ if ($_attr['nocache'] === true) {
+ $compiler->tag_nocache = true;
+ $_caching = Smarty::CACHING_OFF;
+ }
+
+ $has_compiled_template = false;
+ if (($compiler->smarty->merge_compiled_includes || $_attr['inline'] === true) && !$compiler->template->source->recompiled
+ && !($compiler->template->caching && ($compiler->tag_nocache || $compiler->nocache)) && $_caching != Smarty::CACHING_LIFETIME_CURRENT) {
+ // check if compiled code can be merged (contains no variable part)
+ if (!$compiler->has_variable_string && (substr_count($include_file, '"') == 2 or substr_count($include_file, "'") == 2)
+ and substr_count($include_file, '(') == 0 and substr_count($include_file, '$_smarty_tpl->') == 0) {
+ $tpl_name = null;
+ eval("\$tpl_name = $include_file;");
+ if (!isset($compiler->smarty->merged_templates_func[$tpl_name]) || $compiler->inheritance) {
+ $tpl = new $compiler->smarty->template_class ($tpl_name, $compiler->smarty, $compiler->template, $compiler->template->cache_id, $compiler->template->compile_id);
+ // save unique function name
+ $compiler->smarty->merged_templates_func[$tpl_name]['func'] = $tpl->properties['unifunc'] = 'content_'. str_replace('.', '_', uniqid('', true));
+ // use current nocache hash for inlined code
+ $compiler->smarty->merged_templates_func[$tpl_name]['nocache_hash'] = $tpl->properties['nocache_hash'] = $compiler->template->properties['nocache_hash'];
+ if ($compiler->template->caching) {
+ // needs code for cached page but no cache file
+ $tpl->caching = self::CACHING_NOCACHE_CODE;
+ }
+ // make sure whole chain gest compiled
+ $tpl->mustCompile = true;
+ if (!($tpl->source->uncompiled) && $tpl->source->exists) {
+ // get compiled code
+ $compiled_code = $tpl->compiler->compileTemplate($tpl);
+ // release compiler object to free memory
+ unset($tpl->compiler);
+ // merge compiled code for {function} tags
+ $compiler->template->properties['function'] = array_merge($compiler->template->properties['function'], $tpl->properties['function']);
+ // merge filedependency
+ $tpl->properties['file_dependency'][$tpl->source->uid] = array($tpl->source->filepath, $tpl->source->timestamp,$tpl->source->type);
+ $compiler->template->properties['file_dependency'] = array_merge($compiler->template->properties['file_dependency'], $tpl->properties['file_dependency']);
+ // remove header code
+ $compiled_code = preg_replace("/(<\?php \/\*%%SmartyHeaderCode:{$tpl->properties['nocache_hash']}%%\*\/(.+?)\/\*\/%%SmartyHeaderCode%%\*\/\?>\n)/s", '', $compiled_code);
+ if ($tpl->has_nocache_code) {
+ // replace nocache_hash
+ $compiled_code = str_replace("{$tpl->properties['nocache_hash']}", $compiler->template->properties['nocache_hash'], $compiled_code);
+ $compiler->template->has_nocache_code = true;
+ }
+ $compiler->merged_templates[$tpl->properties['unifunc']] = $compiled_code;
+ $has_compiled_template = true;
+ }
+ } else {
+ $has_compiled_template = true;
+ }
+ }
+ }
+ // delete {include} standard attributes
+ unset($_attr['file'], $_attr['assign'], $_attr['cache_id'], $_attr['compile_id'], $_attr['cache_lifetime'], $_attr['nocache'], $_attr['caching'], $_attr['scope'], $_attr['inline']);
+ // remaining attributes must be assigned as smarty variable
+ if (!empty($_attr)) {
+ if ($_parent_scope == Smarty::SCOPE_LOCAL) {
+ // create variables
+ foreach ($_attr as $key => $value) {
+ $_pairs[] = "'$key'=>$value";
+ }
+ $_vars = 'array('.join(',',$_pairs).')';
+ $_has_vars = true;
+ } else {
+ $compiler->trigger_template_error('variable passing not allowed in parent/global scope', $compiler->lex->taglineno);
+ }
+ } else {
+ $_vars = 'array()';
+ $_has_vars = false;
+ }
+ if ($has_compiled_template) {
+ $_hash = $compiler->smarty->merged_templates_func[$tpl_name]['nocache_hash'];
+ $_output = "<?php /* Call merged included template \"" . $tpl_name . "\" */\n";
+ $_output .= "\$_tpl_stack[] = \$_smarty_tpl;\n";
+ $_output .= " \$_smarty_tpl = \$_smarty_tpl->setupInlineSubTemplate($include_file, $_cache_id, $_compile_id, $_caching, $_cache_lifetime, $_vars, $_parent_scope, '$_hash');\n";
+ if (isset($_assign)) {
+ $_output .= 'ob_start(); ';
+ }
+ $_output .= $compiler->smarty->merged_templates_func[$tpl_name]['func']. "(\$_smarty_tpl);\n";
+ $_output .= "\$_smarty_tpl = array_pop(\$_tpl_stack); ";
+ if (isset($_assign)) {
+ $_output .= " \$_smarty_tpl->tpl_vars[$_assign] = new Smarty_variable(ob_get_clean());";
+ }
+ $_output .= "/* End of included template \"" . $tpl_name . "\" */?>";
+ return $_output;
+ }
+
+ // was there an assign attribute
+ if (isset($_assign)) {
+ $_output = "<?php \$_smarty_tpl->tpl_vars[$_assign] = new Smarty_variable(\$_smarty_tpl->getSubTemplate ($include_file, $_cache_id, $_compile_id, $_caching, $_cache_lifetime, $_vars, $_parent_scope));?>\n";;
+ } else {
+ $_output = "<?php echo \$_smarty_tpl->getSubTemplate ($include_file, $_cache_id, $_compile_id, $_caching, $_cache_lifetime, $_vars, $_parent_scope);?>\n";
+ }
+ return $_output;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_include_php.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_include_php.php
new file mode 100644
index 000000000..d52712368
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_include_php.php
@@ -0,0 +1,108 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Include PHP
+ *
+ * Compiles the {include_php} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Insert Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Include_Php extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $required_attributes = array('file');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $shorttag_order = array('file');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('once', 'assign');
+
+ /**
+ * Compiles code for the {include_php} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ if (!($compiler->smarty instanceof SmartyBC)) {
+ throw new SmartyException("{include_php} is deprecated, use SmartyBC class to enable");
+ }
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ $_output = '<?php ';
+
+ $_smarty_tpl = $compiler->template;
+ $_filepath = false;
+ eval('$_file = ' . $_attr['file'] . ';');
+ if (!isset($compiler->smarty->security_policy) && file_exists($_file)) {
+ $_filepath = $_file;
+ } else {
+ if (isset($compiler->smarty->security_policy)) {
+ $_dir = $compiler->smarty->security_policy->trusted_dir;
+ } else {
+ $_dir = $compiler->smarty->trusted_dir;
+ }
+ if (!empty($_dir)) {
+ foreach((array)$_dir as $_script_dir) {
+ $_script_dir = rtrim($_script_dir, '/\\') . DS;
+ if (file_exists($_script_dir . $_file)) {
+ $_filepath = $_script_dir . $_file;
+ break;
+ }
+ }
+ }
+ }
+ if ($_filepath == false) {
+ $compiler->trigger_template_error("{include_php} file '{$_file}' is not readable", $compiler->lex->taglineno);
+ }
+
+ if (isset($compiler->smarty->security_policy)) {
+ $compiler->smarty->security_policy->isTrustedPHPDir($_filepath);
+ }
+
+ if (isset($_attr['assign'])) {
+ // output will be stored in a smarty variable instead of being displayed
+ $_assign = $_attr['assign'];
+ }
+ $_once = '_once';
+ if (isset($_attr['once'])) {
+ if ($_attr['once'] == 'false') {
+ $_once = '';
+ }
+ }
+
+ if (isset($_assign)) {
+ return "<?php ob_start(); include{$_once} ('{$_filepath}'); \$_smarty_tpl->assign({$_assign},ob_get_contents()); ob_end_clean();?>";
+ } else {
+ return "<?php include{$_once} ('{$_filepath}');?>\n";
+ }
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_insert.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_insert.php
new file mode 100644
index 000000000..e4d3f9355
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_insert.php
@@ -0,0 +1,142 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Insert
+ *
+ * Compiles the {insert} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Insert Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Insert extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $required_attributes = array('name');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $shorttag_order = array('name');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the {insert} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ // never compile as nocache code
+ $compiler->suppressNocacheProcessing = true;
+ $compiler->tag_nocache = true;
+ $_smarty_tpl = $compiler->template;
+ $_name = null;
+ $_script = null;
+
+ $_output = '<?php ';
+ // save posible attributes
+ eval('$_name = ' . $_attr['name'] . ';');
+ if (isset($_attr['assign'])) {
+ // output will be stored in a smarty variable instead of being displayed
+ $_assign = $_attr['assign'];
+ // create variable to make shure that the compiler knows about its nocache status
+ $compiler->template->tpl_vars[trim($_attr['assign'], "'")] = new Smarty_Variable(null, true);
+ }
+ if (isset($_attr['script'])) {
+ // script which must be included
+ $_function = "smarty_insert_{$_name}";
+ $_smarty_tpl = $compiler->template;
+ $_filepath = false;
+ eval('$_script = ' . $_attr['script'] . ';');
+ if (!isset($compiler->smarty->security_policy) && file_exists($_script)) {
+ $_filepath = $_script;
+ } else {
+ if (isset($compiler->smarty->security_policy)) {
+ $_dir = $compiler->smarty->security_policy->trusted_dir;
+ } else {
+ $_dir = $compiler->smarty->trusted_dir;
+ }
+ if (!empty($_dir)) {
+ foreach((array)$_dir as $_script_dir) {
+ $_script_dir = rtrim($_script_dir, '/\\') . DS;
+ if (file_exists($_script_dir . $_script)) {
+ $_filepath = $_script_dir . $_script;
+ break;
+ }
+ }
+ }
+ }
+ if ($_filepath == false) {
+ $compiler->trigger_template_error("{insert} missing script file '{$_script}'", $compiler->lex->taglineno);
+ }
+ // code for script file loading
+ $_output .= "require_once '{$_filepath}' ;";
+ require_once $_filepath;
+ if (!is_callable($_function)) {
+ $compiler->trigger_template_error(" {insert} function '{$_function}' is not callable in script file '{$_script}'", $compiler->lex->taglineno);
+ }
+ } else {
+ $_filepath = 'null';
+ $_function = "insert_{$_name}";
+ // function in PHP script ?
+ if (!is_callable($_function)) {
+ // try plugin
+ if (!$_function = $compiler->getPlugin($_name, 'insert')) {
+ $compiler->trigger_template_error("{insert} no function or plugin found for '{$_name}'", $compiler->lex->taglineno);
+ }
+ }
+ }
+ // delete {insert} standard attributes
+ unset($_attr['name'], $_attr['assign'], $_attr['script'], $_attr['nocache']);
+ // convert attributes into parameter array string
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ $_paramsArray[] = "'$_key' => $_value";
+ }
+ $_params = 'array(' . implode(", ", $_paramsArray) . ')';
+ // call insert
+ if (isset($_assign)) {
+ if ($_smarty_tpl->caching) {
+ $_output .= "echo Smarty_Internal_Nocache_Insert::compile ('{$_function}',{$_params}, \$_smarty_tpl, '{$_filepath}',{$_assign});?>";
+ } else {
+ $_output .= "\$_smarty_tpl->assign({$_assign} , {$_function} ({$_params},\$_smarty_tpl), true);?>";
+ }
+ } else {
+ $compiler->has_output = true;
+ if ($_smarty_tpl->caching) {
+ $_output .= "echo Smarty_Internal_Nocache_Insert::compile ('{$_function}',{$_params}, \$_smarty_tpl, '{$_filepath}');?>";
+ } else {
+ $_output .= "echo {$_function}({$_params},\$_smarty_tpl);?>";
+ }
+ }
+ return $_output;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_ldelim.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_ldelim.php
new file mode 100644
index 000000000..990632590
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_ldelim.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Ldelim
+ *
+ * Compiles the {ldelim} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Ldelim Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Ldelim extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {ldelim} tag
+ *
+ * This tag does output the left delimiter
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $_attr = $this->getAttributes($compiler, $args);
+ if ($_attr['nocache'] === true) {
+ $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
+ }
+ // this tag does not return compiled code
+ $compiler->has_code = true;
+ return $compiler->smarty->left_delimiter;
+ }
+
+}
+
+?>
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_nocache.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_nocache.php
new file mode 100644
index 000000000..5fb71b71d
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_nocache.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Nocache
+ *
+ * Compiles the {nocache} {/nocache} tags.
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Nocache Classv
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Nocache extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {nocache} tag
+ *
+ * This tag does not generate compiled output. It only sets a compiler flag.
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return bool
+ */
+ public function compile($args, $compiler)
+ {
+ $_attr = $this->getAttributes($compiler, $args);
+ if ($_attr['nocache'] === true) {
+ $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
+ }
+ // enter nocache mode
+ $compiler->nocache = true;
+ // this tag does not return compiled code
+ $compiler->has_code = false;
+ return true;
+ }
+
+}
+
+/**
+ * Smarty Internal Plugin Compile Nocacheclose Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Nocacheclose extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {/nocache} tag
+ *
+ * This tag does not generate compiled output. It only sets a compiler flag.
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return bool
+ */
+ public function compile($args, $compiler)
+ {
+ $_attr = $this->getAttributes($compiler, $args);
+ // leave nocache mode
+ $compiler->nocache = false;
+ // this tag does not return compiled code
+ $compiler->has_code = false;
+ return true;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_block_plugin.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_block_plugin.php
new file mode 100644
index 000000000..5288f4560
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_block_plugin.php
@@ -0,0 +1,87 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Block Plugin
+ *
+ * Compiles code for the execution of block plugin
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Block Plugin Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Private_Block_Plugin extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the execution of block plugin
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of block plugin
+ * @param string $function PHP function name
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter, $tag, $function)
+ {
+ if (!isset($tag[5]) || substr($tag, -5) != 'close') {
+ // opening tag of block plugin
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ if ($_attr['nocache'] === true) {
+ $compiler->tag_nocache = true;
+ }
+ unset($_attr['nocache']);
+ // convert attributes into parameter array string
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ $_params = 'array(' . implode(",", $_paramsArray) . ')';
+
+ $this->openTag($compiler, $tag, array($_params, $compiler->nocache));
+ // maybe nocache because of nocache variables or nocache plugin
+ $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
+ // compile code
+ $output = "<?php \$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \$_block_repeat=true; echo {$function}({$_params}, null, \$_smarty_tpl, \$_block_repeat);while (\$_block_repeat) { ob_start();?>";
+ } else {
+ // must endblock be nocache?
+ if ($compiler->nocache) {
+ $compiler->tag_nocache = true;
+ }
+ // closing tag of block plugin, restore nocache
+ list($_params, $compiler->nocache) = $this->closeTag($compiler, substr($tag, 0, -5));
+ // This tag does create output
+ $compiler->has_output = true;
+ // compile code
+ if (!isset($parameter['modifier_list'])) {
+ $mod_pre = $mod_post ='';
+ } else {
+ $mod_pre = ' ob_start(); ';
+ $mod_post = 'echo '.$compiler->compileTag('private_modifier',array(),array('modifierlist'=>$parameter['modifier_list'],'value'=>'ob_get_clean()')).';';
+ }
+ $output = "<?php \$_block_content = ob_get_clean(); \$_block_repeat=false;".$mod_pre." echo {$function}({$_params}, \$_block_content, \$_smarty_tpl, \$_block_repeat); ".$mod_post." } array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
+ }
+ return $output . "\n";
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_function_plugin.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
new file mode 100644
index 000000000..70e764318
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_function_plugin.php
@@ -0,0 +1,73 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Function Plugin
+ *
+ * Compiles code for the execution of function plugin
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Function Plugin Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Private_Function_Plugin extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $required_attributes = array();
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the execution of function plugin
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of function plugin
+ * @param string $function PHP function name
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter, $tag, $function)
+ {
+ // This tag does create output
+ $compiler->has_output = true;
+
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ if ($_attr['nocache'] === true) {
+ $compiler->tag_nocache = true;
+ }
+ unset($_attr['nocache']);
+ // convert attributes into parameter array string
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ $_params = 'array(' . implode(",", $_paramsArray) . ')';
+ // compile code
+ $output = "<?php echo {$function}({$_params},\$_smarty_tpl);?>\n";
+ return $output;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php
new file mode 100644
index 000000000..120f3ff10
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_modifier.php
@@ -0,0 +1,140 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Compile Modifier
+ *
+ * Compiles code for modifier execution
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Modifier Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Private_Modifier extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for modifier execution
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter) {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ $output = $parameter['value'];
+ // loop over list of modifiers
+ foreach ($parameter['modifierlist'] as $single_modifier) {
+ $modifier = $single_modifier[0];
+ $single_modifier[0] = $output;
+ $params = implode(',', $single_modifier);
+ // check if we know already the type of modifier
+ if (isset($compiler->known_modifier_type[$modifier])) {
+ $modifier_types = array($compiler->known_modifier_type[$modifier]);
+ } else {
+ $modifier_types = array(1, 2, 3, 4, 5, 6);
+ }
+ foreach ($modifier_types as $type) {
+ switch ($type) {
+ case 1:
+ // registered modifier
+ if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$modifier])) {
+ $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][$modifier][0];
+ if (!is_array($function)) {
+ $output = "{$function}({$params})";
+ } else {
+ if (is_object($function[0])) {
+ $output = '$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][\'' . $modifier . '\'][0][0]->' . $function[1] . '(' . $params . ')';
+ } else {
+ $output = $function[0] . '::' . $function[1] . '(' . $params . ')';
+ }
+ }
+ $compiler->known_modifier_type[$modifier] = $type;
+ break 2;
+ }
+ break;
+ case 2:
+ // registered modifier compiler
+ if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIERCOMPILER][$modifier][0])) {
+ $output = call_user_func($compiler->smarty->registered_plugins[Smarty::PLUGIN_MODIFIERCOMPILER][$modifier][0], $single_modifier, $compiler->smarty);
+ $compiler->known_modifier_type[$modifier] = $type;
+ break 2;
+ }
+ break;
+ case 3:
+ // modifiercompiler plugin
+ if ($compiler->smarty->loadPlugin('smarty_modifiercompiler_' . $modifier)) {
+ // check if modifier allowed
+ if (!is_object($compiler->smarty->security_policy) || $compiler->smarty->security_policy->isTrustedModifier($modifier, $compiler)) {
+ $plugin = 'smarty_modifiercompiler_' . $modifier;
+ $output = $plugin($single_modifier, $compiler);
+ }
+ $compiler->known_modifier_type[$modifier] = $type;
+ break 2;
+ }
+ break;
+ case 4:
+ // modifier plugin
+ if ($function = $compiler->getPlugin($modifier, Smarty::PLUGIN_MODIFIER)) {
+ // check if modifier allowed
+ if (!is_object($compiler->smarty->security_policy) || $compiler->smarty->security_policy->isTrustedModifier($modifier, $compiler)) {
+ $output = "{$function}({$params})";
+ }
+ $compiler->known_modifier_type[$modifier] = $type;
+ break 2;
+ }
+ break;
+ case 5:
+ // PHP function
+ if (is_callable($modifier)) {
+ // check if modifier allowed
+ if (!is_object($compiler->smarty->security_policy) || $compiler->smarty->security_policy->isTrustedPhpModifier($modifier, $compiler)) {
+ $output = "{$modifier}({$params})";
+ }
+ $compiler->known_modifier_type[$modifier] = $type;
+ break 2;
+ }
+ break;
+ case 6:
+ // default plugin handler
+ if (isset($compiler->default_handler_plugins[Smarty::PLUGIN_MODIFIER][$modifier]) || (is_callable($compiler->smarty->default_plugin_handler_func) && $compiler->getPluginFromDefaultHandler($modifier, Smarty::PLUGIN_MODIFIER))) {
+ $function = $compiler->default_handler_plugins[Smarty::PLUGIN_MODIFIER][$modifier][0];
+ // check if modifier allowed
+ if (!is_object($compiler->smarty->security_policy) || $compiler->smarty->security_policy->isTrustedModifier($modifier, $compiler)) {
+ if (!is_array($function)) {
+ $output = "{$function}({$params})";
+ } else {
+ if (is_object($function[0])) {
+ $output = '$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_MODIFIER][\'' . $modifier . '\'][0][0]->' . $function[1] . '(' . $params . ')';
+ } else {
+ $output = $function[0] . '::' . $function[1] . '(' . $params . ')';
+ }
+ }
+ }
+ if (isset($compiler->template->required_plugins['nocache'][$modifier][Smarty::PLUGIN_MODIFIER]['file']) || isset($compiler->template->required_plugins['compiled'][$modifier][Smarty::PLUGIN_MODIFIER]['file'])) {
+ // was a plugin
+ $compiler->known_modifier_type[$modifier] = 4;
+ } else {
+ $compiler->known_modifier_type[$modifier] = $type;
+ }
+ break 2;
+ }
+ }
+ }
+ if (!isset($compiler->known_modifier_type[$modifier])) {
+ $compiler->trigger_template_error("unknown modifier \"" . $modifier . "\"", $compiler->lex->taglineno);
+ }
+ }
+ return $output;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_object_block_function.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_object_block_function.php
new file mode 100644
index 000000000..cca924d10
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_object_block_function.php
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Object Block Function
+ *
+ * Compiles code for registered objects as block function
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Object Block Function Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Private_Object_Block_Function extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the execution of block plugin
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of block object
+ * @param string $method name of method to call
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter, $tag, $method)
+ {
+ if (!isset($tag[5]) || substr($tag, -5) != 'close') {
+ // opening tag of block plugin
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ if ($_attr['nocache'] === true) {
+ $compiler->tag_nocache = true;
+ }
+ unset($_attr['nocache']);
+ // convert attributes into parameter array string
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ $_params = 'array(' . implode(",", $_paramsArray) . ')';
+
+ $this->openTag($compiler, $tag . '->' . $method, array($_params, $compiler->nocache));
+ // maybe nocache because of nocache variables or nocache plugin
+ $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
+ // compile code
+ $output = "<?php \$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}->{$method}', {$_params}); \$_block_repeat=true; echo \$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$method}({$_params}, null, \$_smarty_tpl, \$_block_repeat);while (\$_block_repeat) { ob_start();?>";
+ } else {
+ $base_tag = substr($tag, 0, -5);
+ // must endblock be nocache?
+ if ($compiler->nocache) {
+ $compiler->tag_nocache = true;
+ }
+ // closing tag of block plugin, restore nocache
+ list($_params, $compiler->nocache) = $this->closeTag($compiler, $base_tag . '->' . $method);
+ // This tag does create output
+ $compiler->has_output = true;
+ // compile code
+ if (!isset($parameter['modifier_list'])) {
+ $mod_pre = $mod_post = '';
+ } else {
+ $mod_pre = ' ob_start(); ';
+ $mod_post = 'echo ' . $compiler->compileTag('private_modifier', array(), array('modifierlist' => $parameter['modifier_list'], 'value' => 'ob_get_clean()')) . ';';
+ }
+ $output = "<?php \$_block_content = ob_get_contents(); ob_end_clean(); \$_block_repeat=false;" . $mod_pre . " echo \$_smarty_tpl->smarty->registered_objects['{$base_tag}'][0]->{$method}({$_params}, \$_block_content, \$_smarty_tpl, \$_block_repeat); " . $mod_post . " } array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
+ }
+ return $output . "\n";
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_object_function.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_object_function.php
new file mode 100644
index 000000000..f649084c3
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_object_function.php
@@ -0,0 +1,79 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Object Funtion
+ *
+ * Compiles code for registered objects as function
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Object Function Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Private_Object_Function extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the execution of function plugin
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of function
+ * @param string $method name of method to call
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter, $tag, $method)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ if ($_attr['nocache'] === true) {
+ $compiler->tag_nocache = true;
+ }
+ unset($_attr['nocache']);
+ $_assign = null;
+ if (isset($_attr['assign'])) {
+ $_assign = $_attr['assign'];
+ unset($_attr['assign']);
+ }
+ // convert attributes into parameter array string
+ if ($compiler->smarty->registered_objects[$tag][2]) {
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ $_params = 'array(' . implode(",", $_paramsArray) . ')';
+ $return = "\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$method}({$_params},\$_smarty_tpl)";
+ } else {
+ $_params = implode(",", $_attr);
+ $return = "\$_smarty_tpl->smarty->registered_objects['{$tag}'][0]->{$method}({$_params})";
+ }
+ if (empty($_assign)) {
+ // This tag does create output
+ $compiler->has_output = true;
+ $output = "<?php echo {$return};?>\n";
+ } else {
+ $output = "<?php \$_smarty_tpl->assign({$_assign},{$return});?>\n";
+ }
+ return $output;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_print_expression.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_print_expression.php
new file mode 100644
index 000000000..a37119547
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_print_expression.php
@@ -0,0 +1,156 @@
+<?php
+/**
+* Smarty Internal Plugin Compile Print Expression
+*
+* Compiles any tag which will output an expression or variable
+*
+* @package Smarty
+* @subpackage Compiler
+* @author Uwe Tews
+*/
+
+/**
+* Smarty Internal Plugin Compile Print Expression Class
+*
+* @package Smarty
+* @subpackage Compiler
+*/
+class Smarty_Internal_Compile_Private_Print_Expression extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('assign');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $option_flags = array('nocache', 'nofilter');
+
+ /**
+ * Compiles code for gererting output from any expression
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ // nocache option
+ if ($_attr['nocache'] === true) {
+ $compiler->tag_nocache = true;
+ }
+ // filter handling
+ if ($_attr['nofilter'] === true) {
+ $_filter = 'false';
+ } else {
+ $_filter = 'true';
+ }
+ if (isset($_attr['assign'])) {
+ // assign output to variable
+ $output = "<?php \$_smarty_tpl->assign({$_attr['assign']},{$parameter['value']});?>";
+ } else {
+ // display value
+ $output = $parameter['value'];
+ // tag modifier
+ if (!empty($parameter['modifierlist'])) {
+ $output = $compiler->compileTag('private_modifier', array(), array('modifierlist' => $parameter['modifierlist'], 'value' => $output));
+ }
+ if (!$_attr['nofilter']) {
+ // default modifier
+ if (!empty($compiler->smarty->default_modifiers)) {
+ if (empty($compiler->default_modifier_list)) {
+ $modifierlist = array();
+ foreach ($compiler->smarty->default_modifiers as $key => $single_default_modifier) {
+ preg_match_all('/(\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'|"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|:|[^:]+)/', $single_default_modifier, $mod_array);
+ for ($i = 0, $count = count($mod_array[0]);$i < $count;$i++) {
+ if ($mod_array[0][$i] != ':') {
+ $modifierlist[$key][] = $mod_array[0][$i];
+ }
+ }
+ }
+ $compiler->default_modifier_list = $modifierlist;
+ }
+ $output = $compiler->compileTag('private_modifier', array(), array('modifierlist' => $compiler->default_modifier_list, 'value' => $output));
+ }
+ // autoescape html
+ if ($compiler->template->smarty->escape_html) {
+ $output = "htmlspecialchars({$output}, ENT_QUOTES, '" . addslashes(Smarty::$_CHARSET) . "')";
+ }
+ // loop over registerd filters
+ if (!empty($compiler->template->smarty->registered_filters[Smarty::FILTER_VARIABLE])) {
+ foreach ($compiler->template->smarty->registered_filters[Smarty::FILTER_VARIABLE] as $key => $function) {
+ if (!is_array($function)) {
+ $output = "{$function}({$output},\$_smarty_tpl)";
+ } else if (is_object($function[0])) {
+ $output = "\$_smarty_tpl->smarty->registered_filters[Smarty::FILTER_VARIABLE][{$key}][0]->{$function[1]}({$output},\$_smarty_tpl)";
+ } else {
+ $output = "{$function[0]}::{$function[1]}({$output},\$_smarty_tpl)";
+ }
+ }
+ }
+ // auto loaded filters
+ if (isset($compiler->smarty->autoload_filters[Smarty::FILTER_VARIABLE])) {
+ foreach ((array)$compiler->template->smarty->autoload_filters[Smarty::FILTER_VARIABLE] as $name) {
+ $result = $this->compile_output_filter($compiler, $name, $output);
+ if ($result !== false) {
+ $output = $result;
+ } else {
+ // not found, throw exception
+ throw new SmartyException("Unable to load filter '{$name}'");
+ }
+ }
+ }
+ if (isset($compiler->template->variable_filters)) {
+ foreach ($compiler->template->variable_filters as $filter) {
+ if (count($filter) == 1 && ($result = $this->compile_output_filter($compiler, $filter[0], $output)) !== false) {
+ $output = $result;
+ } else {
+ $output = $compiler->compileTag('private_modifier', array(), array('modifierlist' => array($filter), 'value' => $output));
+ }
+ }
+ }
+ }
+
+ $compiler->has_output = true;
+ $output = "<?php echo {$output};?>";
+ }
+ return $output;
+ }
+
+ /**
+ * @param object $compiler compiler object
+ * @param string $name name of variable filter
+ * @param type $output embedded output
+ * @return string
+ */
+ private function compile_output_filter($compiler, $name, $output)
+ {
+ $plugin_name = "smarty_variablefilter_{$name}";
+ $path = $compiler->smarty->loadPlugin($plugin_name, false);
+ if ($path) {
+ if ($compiler->template->caching) {
+ $compiler->template->required_plugins['nocache'][$name][Smarty::FILTER_VARIABLE]['file'] = $path;
+ $compiler->template->required_plugins['nocache'][$name][Smarty::FILTER_VARIABLE]['function'] = $plugin_name;
+ } else {
+ $compiler->template->required_plugins['compiled'][$name][Smarty::FILTER_VARIABLE]['file'] = $path;
+ $compiler->template->required_plugins['compiled'][$name][Smarty::FILTER_VARIABLE]['function'] = $plugin_name;
+ }
+ } else {
+ // not found
+ return false;
+ }
+ return "{$plugin_name}({$output},\$_smarty_tpl)";
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_registered_block.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_registered_block.php
new file mode 100644
index 000000000..9fed36c3b
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_registered_block.php
@@ -0,0 +1,113 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Registered Block
+ *
+ * Compiles code for the execution of a registered block function
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Registered Block Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Private_Registered_Block extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the execution of a block function
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of block function
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter, $tag)
+ {
+ if (!isset($tag[5]) || substr($tag,-5) != 'close') {
+ // opening tag of block plugin
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ if ($_attr['nocache']) {
+ $compiler->tag_nocache = true;
+ }
+ unset($_attr['nocache']);
+ if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$tag])) {
+ $tag_info = $compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$tag];
+ } else {
+ $tag_info = $compiler->default_handler_plugins[Smarty::PLUGIN_BLOCK][$tag];
+ }
+ // convert attributes into parameter array string
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } elseif ($compiler->template->caching && in_array($_key,$tag_info[2])) {
+ $_value = str_replace("'","^#^",$_value);
+ $_paramsArray[] = "'$_key'=>^#^.var_export($_value,true).^#^";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ $_params = 'array(' . implode(",", $_paramsArray) . ')';
+
+ $this->openTag($compiler, $tag, array($_params, $compiler->nocache));
+ // maybe nocache because of nocache variables or nocache plugin
+ $compiler->nocache = !$tag_info[1] | $compiler->nocache | $compiler->tag_nocache;
+ $function = $tag_info[0];
+ // compile code
+ if (!is_array($function)) {
+ $output = "<?php \$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \$_block_repeat=true; echo {$function}({$_params}, null, \$_smarty_tpl, \$_block_repeat);while (\$_block_repeat) { ob_start();?>";
+ } else if (is_object($function[0])) {
+ $output = "<?php \$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \$_block_repeat=true; echo \$_smarty_tpl->smarty->registered_plugins['block']['{$tag}'][0][0]->{$function[1]}({$_params}, null, \$_smarty_tpl, \$_block_repeat);while (\$_block_repeat) { ob_start();?>";
+ } else {
+ $output = "<?php \$_smarty_tpl->smarty->_tag_stack[] = array('{$tag}', {$_params}); \$_block_repeat=true; echo {$function[0]}::{$function[1]}({$_params}, null, \$_smarty_tpl, \$_block_repeat);while (\$_block_repeat) { ob_start();?>";
+ }
+ } else {
+ // must endblock be nocache?
+ if ($compiler->nocache) {
+ $compiler->tag_nocache = true;
+ }
+ $base_tag = substr($tag, 0, -5);
+ // closing tag of block plugin, restore nocache
+ list($_params, $compiler->nocache) = $this->closeTag($compiler, $base_tag);
+ // This tag does create output
+ $compiler->has_output = true;
+ if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$base_tag])) {
+ $function = $compiler->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$base_tag][0];
+ } else {
+ $function = $compiler->default_handler_plugins[Smarty::PLUGIN_BLOCK][$base_tag][0];
+ }
+ // compile code
+ if (!isset($parameter['modifier_list'])) {
+ $mod_pre = $mod_post ='';
+ } else {
+ $mod_pre = ' ob_start(); ';
+ $mod_post = 'echo '.$compiler->compileTag('private_modifier',array(),array('modifierlist'=>$parameter['modifier_list'],'value'=>'ob_get_clean()')).';';
+ }
+ if (!is_array($function)) {
+ $output = "<?php \$_block_content = ob_get_clean(); \$_block_repeat=false;".$mod_pre." echo {$function}({$_params}, \$_block_content, \$_smarty_tpl, \$_block_repeat);".$mod_post." } array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
+ } else if (is_object($function[0])) {
+ $output = "<?php \$_block_content = ob_get_clean(); \$_block_repeat=false;".$mod_pre." echo \$_smarty_tpl->smarty->registered_plugins['block']['{$base_tag}'][0][0]->{$function[1]}({$_params}, \$_block_content, \$_smarty_tpl, \$_block_repeat); ".$mod_post."} array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
+ } else {
+ $output = "<?php \$_block_content = ob_get_clean(); \$_block_repeat=false;".$mod_pre." echo {$function[0]}::{$function[1]}({$_params}, \$_block_content, \$_smarty_tpl, \$_block_repeat); ".$mod_post."} array_pop(\$_smarty_tpl->smarty->_tag_stack);?>";
+ }
+ }
+ return $output . "\n";
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_registered_function.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_registered_function.php
new file mode 100644
index 000000000..5058bfbbd
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_registered_function.php
@@ -0,0 +1,81 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Registered Function
+ *
+ * Compiles code for the execution of a registered function
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Registered Function Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('_any');
+
+ /**
+ * Compiles code for the execution of a registered function
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @param string $tag name of function
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter, $tag)
+ {
+ // This tag does create output
+ $compiler->has_output = true;
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ if ($_attr['nocache']) {
+ $compiler->tag_nocache = true;
+ }
+ unset($_attr['nocache']);
+ if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag])) {
+ $tag_info = $compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag];
+ } else {
+ $tag_info = $compiler->default_handler_plugins[Smarty::PLUGIN_FUNCTION][$tag];
+ }
+ // not cachable?
+ $compiler->tag_nocache = $compiler->tag_nocache || !$tag_info[1];
+ // convert attributes into parameter array string
+ $_paramsArray = array();
+ foreach ($_attr as $_key => $_value) {
+ if (is_int($_key)) {
+ $_paramsArray[] = "$_key=>$_value";
+ } elseif ($compiler->template->caching && in_array($_key,$tag_info[2])) {
+ $_value = str_replace("'","^#^",$_value);
+ $_paramsArray[] = "'$_key'=>^#^.var_export($_value,true).^#^";
+ } else {
+ $_paramsArray[] = "'$_key'=>$_value";
+ }
+ }
+ $_params = 'array(' . implode(",", $_paramsArray) . ')';
+ $function = $tag_info[0];
+ // compile code
+ if (!is_array($function)) {
+ $output = "<?php echo {$function}({$_params},\$_smarty_tpl);?>\n";
+ } else if (is_object($function[0])) {
+ $output = "<?php echo \$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['{$tag}'][0][0]->{$function[1]}({$_params},\$_smarty_tpl);?>\n";
+ } else {
+ $output = "<?php echo {$function[0]}::{$function[1]}({$_params},\$_smarty_tpl);?>\n";
+ }
+ return $output;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php
new file mode 100644
index 000000000..4760dbe3f
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_private_special_variable.php
@@ -0,0 +1,107 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Special Smarty Variable
+ *
+ * Compiles the special $smarty variables
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile special Smarty Variable Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the speical $smarty variables
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $_index = preg_split("/\]\[/",substr($parameter, 1, strlen($parameter)-2));
+ $compiled_ref = ' ';
+ $variable = trim($_index[0], "'");
+ switch ($variable) {
+ case 'foreach':
+ return "\$_smarty_tpl->getVariable('smarty')->value$parameter";
+ case 'section':
+ return "\$_smarty_tpl->getVariable('smarty')->value$parameter";
+ case 'capture':
+ return "Smarty::\$_smarty_vars$parameter";
+ case 'now':
+ return 'time()';
+ case 'cookies':
+ if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_super_globals) {
+ $compiler->trigger_template_error("(secure mode) super globals not permitted");
+ break;
+ }
+ $compiled_ref = '$_COOKIE';
+ break;
+
+ case 'get':
+ case 'post':
+ case 'env':
+ case 'server':
+ case 'session':
+ case 'request':
+ if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_super_globals) {
+ $compiler->trigger_template_error("(secure mode) super globals not permitted");
+ break;
+ }
+ $compiled_ref = '$_'.strtoupper($variable);
+ break;
+
+ case 'template':
+ return 'basename($_smarty_tpl->source->filepath)';
+
+ case 'template_object':
+ return '$_smarty_tpl';
+
+ case 'current_dir':
+ return 'dirname($_smarty_tpl->source->filepath)';
+
+ case 'version':
+ $_version = Smarty::SMARTY_VERSION;
+ return "'$_version'";
+
+ case 'const':
+ if (isset($compiler->smarty->security_policy) && !$compiler->smarty->security_policy->allow_constants) {
+ $compiler->trigger_template_error("(secure mode) constants not permitted");
+ break;
+ }
+ return '@' . trim($_index[1], "'");
+
+ case 'config':
+ return "\$_smarty_tpl->getConfigVariable($_index[1])";
+ case 'ldelim':
+ $_ldelim = $compiler->smarty->left_delimiter;
+ return "'$_ldelim'";
+
+ case 'rdelim':
+ $_rdelim = $compiler->smarty->right_delimiter;
+ return "'$_rdelim'";
+
+ default:
+ $compiler->trigger_template_error('$smarty.' . trim($_index[0], "'") . ' is invalid');
+ break;
+ }
+ if (isset($_index[1])) {
+ array_shift($_index);
+ foreach ($_index as $_ind) {
+ $compiled_ref = $compiled_ref . "[$_ind]";
+ }
+ }
+ return $compiled_ref;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_rdelim.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_rdelim.php
new file mode 100644
index 000000000..807c7e2b9
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_rdelim.php
@@ -0,0 +1,41 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Rdelim
+ *
+ * Compiles the {rdelim} tag
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Rdelim Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Rdelim extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {rdelim} tag
+ *
+ * This tag does output the right delimiter.
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $_attr = $this->getAttributes($compiler, $args);
+ if ($_attr['nocache'] === true) {
+ $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
+ }
+ // this tag does not return compiled code
+ $compiler->has_code = true;
+ return $compiler->smarty->right_delimiter;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_section.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_section.php
new file mode 100644
index 000000000..ccb7673d8
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_section.php
@@ -0,0 +1,203 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Section
+ *
+ * Compiles the {section} {sectionelse} {/section} tags
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Section Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Section extends Smarty_Internal_CompileBase {
+
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $required_attributes = array('name', 'loop');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $shorttag_order = array('name', 'loop');
+ /**
+ * Attribute definition: Overwrites base class.
+ *
+ * @var array
+ * @see Smarty_Internal_CompileBase
+ */
+ public $optional_attributes = array('start', 'step', 'max', 'show');
+
+ /**
+ * Compiles code for the {section} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ $this->openTag($compiler, 'section', array('section', $compiler->nocache));
+ // maybe nocache because of nocache variables
+ $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
+
+ $output = "<?php ";
+
+ $section_name = $_attr['name'];
+
+ $output .= "if (isset(\$_smarty_tpl->tpl_vars['smarty']->value['section'][$section_name])) unset(\$_smarty_tpl->tpl_vars['smarty']->value['section'][$section_name]);\n";
+ $section_props = "\$_smarty_tpl->tpl_vars['smarty']->value['section'][$section_name]";
+
+ foreach ($_attr as $attr_name => $attr_value) {
+ switch ($attr_name) {
+ case 'loop':
+ $output .= "{$section_props}['loop'] = is_array(\$_loop=$attr_value) ? count(\$_loop) : max(0, (int)\$_loop); unset(\$_loop);\n";
+ break;
+
+ case 'show':
+ if (is_bool($attr_value))
+ $show_attr_value = $attr_value ? 'true' : 'false';
+ else
+ $show_attr_value = "(bool)$attr_value";
+ $output .= "{$section_props}['show'] = $show_attr_value;\n";
+ break;
+
+ case 'name':
+ $output .= "{$section_props}['$attr_name'] = $attr_value;\n";
+ break;
+
+ case 'max':
+ case 'start':
+ $output .= "{$section_props}['$attr_name'] = (int)$attr_value;\n";
+ break;
+
+ case 'step':
+ $output .= "{$section_props}['$attr_name'] = ((int)$attr_value) == 0 ? 1 : (int)$attr_value;\n";
+ break;
+ }
+ }
+
+ if (!isset($_attr['show']))
+ $output .= "{$section_props}['show'] = true;\n";
+
+ if (!isset($_attr['loop']))
+ $output .= "{$section_props}['loop'] = 1;\n";
+
+ if (!isset($_attr['max']))
+ $output .= "{$section_props}['max'] = {$section_props}['loop'];\n";
+ else
+ $output .= "if ({$section_props}['max'] < 0)\n" . " {$section_props}['max'] = {$section_props}['loop'];\n";
+
+ if (!isset($_attr['step']))
+ $output .= "{$section_props}['step'] = 1;\n";
+
+ if (!isset($_attr['start']))
+ $output .= "{$section_props}['start'] = {$section_props}['step'] > 0 ? 0 : {$section_props}['loop']-1;\n";
+ else {
+ $output .= "if ({$section_props}['start'] < 0)\n" . " {$section_props}['start'] = max({$section_props}['step'] > 0 ? 0 : -1, {$section_props}['loop'] + {$section_props}['start']);\n" . "else\n" . " {$section_props}['start'] = min({$section_props}['start'], {$section_props}['step'] > 0 ? {$section_props}['loop'] : {$section_props}['loop']-1);\n";
+ }
+
+ $output .= "if ({$section_props}['show']) {\n";
+ if (!isset($_attr['start']) && !isset($_attr['step']) && !isset($_attr['max'])) {
+ $output .= " {$section_props}['total'] = {$section_props}['loop'];\n";
+ } else {
+ $output .= " {$section_props}['total'] = min(ceil(({$section_props}['step'] > 0 ? {$section_props}['loop'] - {$section_props}['start'] : {$section_props}['start']+1)/abs({$section_props}['step'])), {$section_props}['max']);\n";
+ }
+ $output .= " if ({$section_props}['total'] == 0)\n" . " {$section_props}['show'] = false;\n" . "} else\n" . " {$section_props}['total'] = 0;\n";
+
+ $output .= "if ({$section_props}['show']):\n";
+ $output .= "
+ for ({$section_props}['index'] = {$section_props}['start'], {$section_props}['iteration'] = 1;
+ {$section_props}['iteration'] <= {$section_props}['total'];
+ {$section_props}['index'] += {$section_props}['step'], {$section_props}['iteration']++):\n";
+ $output .= "{$section_props}['rownum'] = {$section_props}['iteration'];\n";
+ $output .= "{$section_props}['index_prev'] = {$section_props}['index'] - {$section_props}['step'];\n";
+ $output .= "{$section_props}['index_next'] = {$section_props}['index'] + {$section_props}['step'];\n";
+ $output .= "{$section_props}['first'] = ({$section_props}['iteration'] == 1);\n";
+ $output .= "{$section_props}['last'] = ({$section_props}['iteration'] == {$section_props}['total']);\n";
+
+ $output .= "?>";
+ return $output;
+ }
+
+}
+
+/**
+ * Smarty Internal Plugin Compile Sectionelse Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Sectionelse extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {sectionelse} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ list($openTag, $nocache) = $this->closeTag($compiler, array('section'));
+ $this->openTag($compiler, 'sectionelse', array('sectionelse', $nocache));
+
+ return "<?php endfor; else: ?>";
+ }
+
+}
+
+/**
+ * Smarty Internal Plugin Compile Sectionclose Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Sectionclose extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {/section} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+
+ // must endblock be nocache?
+ if ($compiler->nocache) {
+ $compiler->tag_nocache = true;
+ }
+
+ list($openTag, $compiler->nocache) = $this->closeTag($compiler, array('section', 'sectionelse'));
+
+ if ($openTag == 'sectionelse') {
+ return "<?php endif; ?>";
+ } else {
+ return "<?php endfor; endif; ?>";
+ }
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_setfilter.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_setfilter.php
new file mode 100644
index 000000000..d1dd90cf8
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_setfilter.php
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile Setfilter
+ *
+ * Compiles code for setfilter tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Setfilter Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Setfilter extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for setfilter tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ $compiler->variable_filter_stack[] = $compiler->template->variable_filters;
+ $compiler->template->variable_filters = $parameter['modifier_list'];
+ // this tag does not return compiled code
+ $compiler->has_code = false;
+ return true;
+ }
+
+}
+
+/**
+ * Smarty Internal Plugin Compile Setfilterclose Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Setfilterclose extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {/setfilter} tag
+ *
+ * This tag does not generate compiled output. It resets variable filter.
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ $_attr = $this->getAttributes($compiler, $args);
+ // reset variable filter to previous state
+ if (count($compiler->variable_filter_stack)) {
+ $compiler->template->variable_filters = array_pop($compiler->variable_filter_stack);
+ } else {
+ $compiler->template->variable_filters = array();
+ }
+ // this tag does not return compiled code
+ $compiler->has_code = false;
+ return true;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compile_while.php b/library/Smarty/libs/sysplugins/smarty_internal_compile_while.php
new file mode 100644
index 000000000..d7d986c34
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compile_while.php
@@ -0,0 +1,94 @@
+<?php
+/**
+ * Smarty Internal Plugin Compile While
+ *
+ * Compiles the {while} tag
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile While Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_While extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {while} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compile($args, $compiler, $parameter)
+ {
+ // check and get attributes
+ $_attr = $this->getAttributes($compiler, $args);
+ $this->openTag($compiler, 'while', $compiler->nocache);
+
+ if (!array_key_exists("if condition",$parameter)) {
+ $compiler->trigger_template_error("missing while condition", $compiler->lex->taglineno);
+ }
+
+ // maybe nocache because of nocache variables
+ $compiler->nocache = $compiler->nocache | $compiler->tag_nocache;
+ if (is_array($parameter['if condition'])) {
+ if ($compiler->nocache) {
+ $_nocache = ',true';
+ // create nocache var to make it know for further compiling
+ if (is_array($parameter['if condition']['var'])) {
+ $compiler->template->tpl_vars[trim($parameter['if condition']['var']['var'], "'")] = new Smarty_variable(null, true);
+ } else {
+ $compiler->template->tpl_vars[trim($parameter['if condition']['var'], "'")] = new Smarty_variable(null, true);
+ }
+ } else {
+ $_nocache = '';
+ }
+ if (is_array($parameter['if condition']['var'])) {
+ $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]) || !is_array(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]->value)) \$_smarty_tpl->createLocalArrayVariable(" . $parameter['if condition']['var']['var'] . "$_nocache);\n";
+ $_output .= "while (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var']['var'] . "]->value" . $parameter['if condition']['var']['smarty_internal_index'] . " = " . $parameter['if condition']['value'] . "){?>";
+ } else {
+ $_output = "<?php if (!isset(\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "])) \$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "] = new Smarty_Variable(null{$_nocache});";
+ $_output .= "while (\$_smarty_tpl->tpl_vars[" . $parameter['if condition']['var'] . "]->value = " . $parameter['if condition']['value'] . "){?>";
+ }
+ return $_output;
+ } else {
+ return "<?php while ({$parameter['if condition']}){?>";
+ }
+ }
+
+}
+
+/**
+ * Smarty Internal Plugin Compile Whileclose Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Compile_Whileclose extends Smarty_Internal_CompileBase {
+
+ /**
+ * Compiles code for the {/while} tag
+ *
+ * @param array $args array with attributes from parser
+ * @param object $compiler compiler object
+ * @return string compiled code
+ */
+ public function compile($args, $compiler)
+ {
+ // must endblock be nocache?
+ if ($compiler->nocache) {
+ $compiler->tag_nocache = true;
+ }
+ $compiler->nocache = $this->closeTag($compiler, array('while'));
+ return "<?php }?>";
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_compilebase.php b/library/Smarty/libs/sysplugins/smarty_internal_compilebase.php
new file mode 100644
index 000000000..5fb56f371
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_compilebase.php
@@ -0,0 +1,176 @@
+<?php
+/**
+ * Smarty Internal Plugin CompileBase
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * This class does extend all internal compile plugins
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+abstract class Smarty_Internal_CompileBase {
+
+ /**
+ * Array of names of required attribute required by tag
+ *
+ * @var array
+ */
+ public $required_attributes = array();
+ /**
+ * Array of names of optional attribute required by tag
+ * use array('_any') if there is no restriction of attributes names
+ *
+ * @var array
+ */
+ public $optional_attributes = array();
+ /**
+ * Shorttag attribute order defined by its names
+ *
+ * @var array
+ */
+ public $shorttag_order = array();
+ /**
+ * Array of names of valid option flags
+ *
+ * @var array
+ */
+ public $option_flags = array('nocache');
+
+ /**
+ * This function checks if the attributes passed are valid
+ *
+ * The attributes passed for the tag to compile are checked against the list of required and
+ * optional attributes. Required attributes must be present. Optional attributes are check against
+ * the corresponding list. The keyword '_any' specifies that any attribute will be accepted
+ * as valid
+ *
+ * @param object $compiler compiler object
+ * @param array $attributes attributes applied to the tag
+ * @return array of mapped attributes for further processing
+ */
+ public function getAttributes($compiler, $attributes)
+ {
+ $_indexed_attr = array();
+ // loop over attributes
+ foreach ($attributes as $key => $mixed) {
+ // shorthand ?
+ if (!is_array($mixed)) {
+ // option flag ?
+ if (in_array(trim($mixed, '\'"'), $this->option_flags)) {
+ $_indexed_attr[trim($mixed, '\'"')] = true;
+ // shorthand attribute ?
+ } else if (isset($this->shorttag_order[$key])) {
+ $_indexed_attr[$this->shorttag_order[$key]] = $mixed;
+ } else {
+ // too many shorthands
+ $compiler->trigger_template_error('too many shorthand attributes', $compiler->lex->taglineno);
+ }
+ // named attribute
+ } else {
+ $kv = each($mixed);
+ // option flag?
+ if (in_array($kv['key'], $this->option_flags)) {
+ if (is_bool($kv['value'])) {
+ $_indexed_attr[$kv['key']] = $kv['value'];
+ } else if (is_string($kv['value']) && in_array(trim($kv['value'], '\'"'), array('true', 'false'))) {
+ if (trim($kv['value']) == 'true') {
+ $_indexed_attr[$kv['key']] = true;
+ } else {
+ $_indexed_attr[$kv['key']] = false;
+ }
+ } else if (is_numeric($kv['value']) && in_array($kv['value'], array(0, 1))) {
+ if ($kv['value'] == 1) {
+ $_indexed_attr[$kv['key']] = true;
+ } else {
+ $_indexed_attr[$kv['key']] = false;
+ }
+ } else {
+ $compiler->trigger_template_error("illegal value of option flag \"{$kv['key']}\"", $compiler->lex->taglineno);
+ }
+ // must be named attribute
+ } else {
+ reset($mixed);
+ $_indexed_attr[key($mixed)] = $mixed[key($mixed)];
+ }
+ }
+ }
+ // check if all required attributes present
+ foreach ($this->required_attributes as $attr) {
+ if (!array_key_exists($attr, $_indexed_attr)) {
+ $compiler->trigger_template_error("missing \"" . $attr . "\" attribute", $compiler->lex->taglineno);
+ }
+ }
+ // check for unallowed attributes
+ if ($this->optional_attributes != array('_any')) {
+ $tmp_array = array_merge($this->required_attributes, $this->optional_attributes, $this->option_flags);
+ foreach ($_indexed_attr as $key => $dummy) {
+ if (!in_array($key, $tmp_array) && $key !== 0) {
+ $compiler->trigger_template_error("unexpected \"" . $key . "\" attribute", $compiler->lex->taglineno);
+ }
+ }
+ }
+ // default 'false' for all option flags not set
+ foreach ($this->option_flags as $flag) {
+ if (!isset($_indexed_attr[$flag])) {
+ $_indexed_attr[$flag] = false;
+ }
+ }
+
+ return $_indexed_attr;
+ }
+
+ /**
+ * Push opening tag name on stack
+ *
+ * Optionally additional data can be saved on stack
+ *
+ * @param object $compiler compiler object
+ * @param string $openTag the opening tag's name
+ * @param mixed $data optional data saved
+ */
+ public function openTag($compiler, $openTag, $data = null)
+ {
+ array_push($compiler->_tag_stack, array($openTag, $data));
+ }
+
+ /**
+ * Pop closing tag
+ *
+ * Raise an error if this stack-top doesn't match with expected opening tags
+ *
+ * @param object $compiler compiler object
+ * @param array|string $expectedTag the expected opening tag names
+ * @return mixed any type the opening tag's name or saved data
+ */
+ public function closeTag($compiler, $expectedTag)
+ {
+ if (count($compiler->_tag_stack) > 0) {
+ // get stacked info
+ list($_openTag, $_data) = array_pop($compiler->_tag_stack);
+ // open tag must match with the expected ones
+ if (in_array($_openTag, (array) $expectedTag)) {
+ if (is_null($_data)) {
+ // return opening tag
+ return $_openTag;
+ } else {
+ // return restored data
+ return $_data;
+ }
+ }
+ // wrong nesting of tags
+ $compiler->trigger_template_error("unclosed {" . $_openTag . "} tag");
+ return;
+ }
+ // wrong nesting of tags
+ $compiler->trigger_template_error("unexpected closing tag", $compiler->lex->taglineno);
+ return;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_config.php b/library/Smarty/libs/sysplugins/smarty_internal_config.php
new file mode 100644
index 000000000..a309ec9ff
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_config.php
@@ -0,0 +1,303 @@
+<?php
+/**
+ * Smarty Internal Plugin Config
+ *
+ * @package Smarty
+ * @subpackage Config
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Config
+ *
+ * Main class for config variables
+ *
+ * @package Smarty
+ * @subpackage Config
+ *
+ * @property Smarty_Config_Source $source
+ * @property Smarty_Config_Compiled $compiled
+ * @ignore
+ */
+class Smarty_Internal_Config {
+
+ /**
+ * Samrty instance
+ *
+ * @var Smarty object
+ */
+ public $smarty = null;
+ /**
+ * Object of config var storage
+ *
+ * @var object
+ */
+ public $data = null;
+ /**
+ * Config resource
+ * @var string
+ */
+ public $config_resource = null;
+ /**
+ * Compiled config file
+ *
+ * @var string
+ */
+ public $compiled_config = null;
+ /**
+ * filepath of compiled config file
+ *
+ * @var string
+ */
+ public $compiled_filepath = null;
+ /**
+ * Filemtime of compiled config Filemtime
+ *
+ * @var int
+ */
+ public $compiled_timestamp = null;
+ /**
+ * flag if compiled config file is invalid and must be (re)compiled
+ * @var bool
+ */
+ public $mustCompile = null;
+ /**
+ * Config file compiler object
+ *
+ * @var Smarty_Internal_Config_File_Compiler object
+ */
+ public $compiler_object = null;
+
+ /**
+ * Constructor of config file object
+ *
+ * @param string $config_resource config file resource name
+ * @param Smarty $smarty Smarty instance
+ * @param object $data object for config vars storage
+ */
+ public function __construct($config_resource, $smarty, $data = null)
+ {
+ $this->data = $data;
+ $this->smarty = $smarty;
+ $this->config_resource = $config_resource;
+ }
+
+ /**
+ * Returns the compiled filepath
+ *
+ * @return string the compiled filepath
+ */
+ public function getCompiledFilepath()
+ {
+ return $this->compiled_filepath === null ?
+ ($this->compiled_filepath = $this->buildCompiledFilepath()) :
+ $this->compiled_filepath;
+ }
+
+ /**
+ * Get file path.
+ *
+ * @return string
+ */
+ public function buildCompiledFilepath()
+ {
+ $_compile_id = isset($this->smarty->compile_id) ? preg_replace('![^\w\|]+!', '_', $this->smarty->compile_id) : null;
+ $_flag = (int) $this->smarty->config_read_hidden + (int) $this->smarty->config_booleanize * 2
+ + (int) $this->smarty->config_overwrite * 4;
+ $_filepath = sha1($this->source->name . $_flag);
+ // if use_sub_dirs, break file into directories
+ if ($this->smarty->use_sub_dirs) {
+ $_filepath = substr($_filepath, 0, 2) . DS
+ . substr($_filepath, 2, 2) . DS
+ . substr($_filepath, 4, 2) . DS
+ . $_filepath;
+ }
+ $_compile_dir_sep = $this->smarty->use_sub_dirs ? DS : '^';
+ if (isset($_compile_id)) {
+ $_filepath = $_compile_id . $_compile_dir_sep . $_filepath;
+ }
+ $_compile_dir = $this->smarty->getCompileDir();
+ return $_compile_dir . $_filepath . '.' . basename($this->source->name) . '.config' . '.php';
+ }
+
+ /**
+ * Returns the timpestamp of the compiled file
+ *
+ * @return integer the file timestamp
+ */
+ public function getCompiledTimestamp()
+ {
+ return $this->compiled_timestamp === null
+ ? ($this->compiled_timestamp = (file_exists($this->getCompiledFilepath())) ? filemtime($this->getCompiledFilepath()) : false)
+ : $this->compiled_timestamp;
+ }
+
+ /**
+ * Returns if the current config file must be compiled
+ *
+ * It does compare the timestamps of config source and the compiled config and checks the force compile configuration
+ *
+ * @return boolean true if the file must be compiled
+ */
+ public function mustCompile()
+ {
+ return $this->mustCompile === null ?
+ $this->mustCompile = ($this->smarty->force_compile || $this->getCompiledTimestamp () === false || $this->smarty->compile_check && $this->getCompiledTimestamp () < $this->source->timestamp):
+ $this->mustCompile;
+ }
+
+ /**
+ * Returns the compiled config file
+ *
+ * It checks if the config file must be compiled or just read the compiled version
+ *
+ * @return string the compiled config file
+ */
+ public function getCompiledConfig()
+ {
+ if ($this->compiled_config === null) {
+ // see if template needs compiling.
+ if ($this->mustCompile()) {
+ $this->compileConfigSource();
+ } else {
+ $this->compiled_config = file_get_contents($this->getCompiledFilepath());
+ }
+ }
+ return $this->compiled_config;
+ }
+
+ /**
+ * Compiles the config files
+ *
+ * @throws Exception
+ */
+ public function compileConfigSource()
+ {
+ // compile template
+ if (!is_object($this->compiler_object)) {
+ // load compiler
+ $this->compiler_object = new Smarty_Internal_Config_File_Compiler($this->smarty);
+ }
+ // compile locking
+ if ($this->smarty->compile_locking) {
+ if ($saved_timestamp = $this->getCompiledTimestamp()) {
+ touch($this->getCompiledFilepath());
+ }
+ }
+ // call compiler
+ try {
+ $this->compiler_object->compileSource($this);
+ } catch (Exception $e) {
+ // restore old timestamp in case of error
+ if ($this->smarty->compile_locking && $saved_timestamp) {
+ touch($this->getCompiledFilepath(), $saved_timestamp);
+ }
+ throw $e;
+ }
+ // compiling succeded
+ // write compiled template
+ Smarty_Internal_Write_File::writeFile($this->getCompiledFilepath(), $this->getCompiledConfig(), $this->smarty);
+ }
+
+ /**
+ * load config variables
+ *
+ * @param mixed $sections array of section names, single section or null
+ * @param object $scope global,parent or local
+ */
+ public function loadConfigVars($sections = null, $scope = 'local')
+ {
+ if ($this->data instanceof Smarty_Internal_Template) {
+ $this->data->properties['file_dependency'][sha1($this->source->filepath)] = array($this->source->filepath, $this->source->timestamp, 'file');
+ }
+ if ($this->mustCompile()) {
+ $this->compileConfigSource();
+ }
+ // pointer to scope
+ if ($scope == 'local') {
+ $scope_ptr = $this->data;
+ } elseif ($scope == 'parent') {
+ if (isset($this->data->parent)) {
+ $scope_ptr = $this->data->parent;
+ } else {
+ $scope_ptr = $this->data;
+ }
+ } elseif ($scope == 'root' || $scope == 'global') {
+ $scope_ptr = $this->data;
+ while (isset($scope_ptr->parent)) {
+ $scope_ptr = $scope_ptr->parent;
+ }
+ }
+ $_config_vars = array();
+ include($this->getCompiledFilepath());
+ // copy global config vars
+ foreach ($_config_vars['vars'] as $variable => $value) {
+ if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) {
+ $scope_ptr->config_vars[$variable] = $value;
+ } else {
+ $scope_ptr->config_vars[$variable] = array_merge((array) $scope_ptr->config_vars[$variable], (array) $value);
+ }
+ }
+ // scan sections
+ if (!empty($sections)) {
+ $sections = array_flip((array) $sections);
+ foreach ($_config_vars['sections'] as $this_section => $dummy) {
+ if (isset($sections[$this_section])) {
+ foreach ($_config_vars['sections'][$this_section]['vars'] as $variable => $value) {
+ if ($this->smarty->config_overwrite || !isset($scope_ptr->config_vars[$variable])) {
+ $scope_ptr->config_vars[$variable] = $value;
+ } else {
+ $scope_ptr->config_vars[$variable] = array_merge((array) $scope_ptr->config_vars[$variable], (array) $value);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * set Smarty property in template context
+ *
+ * @param string $property_name property name
+ * @param mixed $value value
+ * @throws SmartyException if $property_name is not valid
+ */
+ public function __set($property_name, $value)
+ {
+ switch ($property_name) {
+ case 'source':
+ case 'compiled':
+ $this->$property_name = $value;
+ return;
+ }
+
+ throw new SmartyException("invalid config property '$property_name'.");
+ }
+
+ /**
+ * get Smarty property in template context
+ *
+ * @param string $property_name property name
+ * @throws SmartyException if $property_name is not valid
+ */
+ public function __get($property_name)
+ {
+ switch ($property_name) {
+ case 'source':
+ if (empty($this->config_resource)) {
+ throw new SmartyException("Unable to parse resource name \"{$this->config_resource}\"");
+ }
+ $this->source = Smarty_Resource::config($this);
+ return $this->source;
+
+ case 'compiled':
+ $this->compiled = $this->source->getCompiled($this);
+ return $this->compiled;
+ }
+
+ throw new SmartyException("config attribute '$property_name' does not exist.");
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_config_file_compiler.php b/library/Smarty/libs/sysplugins/smarty_internal_config_file_compiler.php
new file mode 100644
index 000000000..b16a6940d
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_config_file_compiler.php
@@ -0,0 +1,144 @@
+<?php
+/**
+ * Smarty Internal Plugin Config File Compiler
+ *
+ * This is the config file compiler class. It calls the lexer and parser to
+ * perform the compiling.
+ *
+ * @package Smarty
+ * @subpackage Config
+ * @author Uwe Tews
+ */
+
+/**
+ * Main config file compiler class
+ *
+ * @package Smarty
+ * @subpackage Config
+ */
+class Smarty_Internal_Config_File_Compiler {
+
+ /**
+ * Lexer object
+ *
+ * @var object
+ */
+ public $lex;
+
+ /**
+ * Parser object
+ *
+ * @var object
+ */
+ public $parser;
+
+ /**
+ * Smarty object
+ *
+ * @var Smarty object
+ */
+ public $smarty;
+
+ /**
+ * Smarty object
+ *
+ * @var Smarty_Internal_Config object
+ */
+ public $config;
+
+ /**
+ * Compiled config data sections and variables
+ *
+ * @var array
+ */
+ public $config_data = array();
+
+ /**
+ * Initialize compiler
+ *
+ * @param Smarty $smarty base instance
+ */
+ public function __construct($smarty)
+ {
+ $this->smarty = $smarty;
+ $this->config_data['sections'] = array();
+ $this->config_data['vars'] = array();
+ }
+
+ /**
+ * Method to compile a Smarty template.
+ *
+ * @param Smarty_Internal_Config $config config object
+ * @return bool true if compiling succeeded, false if it failed
+ */
+ public function compileSource(Smarty_Internal_Config $config)
+ {
+ /* here is where the compiling takes place. Smarty
+ tags in the templates are replaces with PHP code,
+ then written to compiled files. */
+ $this->config = $config;
+ // get config file source
+ $_content = $config->source->content . "\n";
+ // on empty template just return
+ if ($_content == '') {
+ return true;
+ }
+ // init the lexer/parser to compile the config file
+ $lex = new Smarty_Internal_Configfilelexer($_content, $this->smarty);
+ $parser = new Smarty_Internal_Configfileparser($lex, $this);
+ if ($this->smarty->_parserdebug) $parser->PrintTrace();
+ // get tokens from lexer and parse them
+ while ($lex->yylex()) {
+ if ($this->smarty->_parserdebug) echo "<br>Parsing {$parser->yyTokenName[$lex->token]} Token {$lex->value} Line {$lex->line} \n";
+ $parser->doParse($lex->token, $lex->value);
+ }
+ // finish parsing process
+ $parser->doParse(0, 0);
+ $config->compiled_config = '<?php $_config_vars = ' . var_export($this->config_data, true) . '; ?>';
+ }
+
+ /**
+ * display compiler error messages without dying
+ *
+ * If parameter $args is empty it is a parser detected syntax error.
+ * In this case the parser is called to obtain information about exspected tokens.
+ *
+ * If parameter $args contains a string this is used as error message
+ *
+ * @param string $args individual error message or null
+ */
+ public function trigger_config_file_error($args = null)
+ {
+ $this->lex = Smarty_Internal_Configfilelexer::instance();
+ $this->parser = Smarty_Internal_Configfileparser::instance();
+ // get template source line which has error
+ $line = $this->lex->line;
+ if (isset($args)) {
+ // $line--;
+ }
+ $match = preg_split("/\n/", $this->lex->data);
+ $error_text = "Syntax error in config file '{$this->config->source->filepath}' on line {$line} '{$match[$line-1]}' ";
+ if (isset($args)) {
+ // individual error message
+ $error_text .= $args;
+ } else {
+ // exspected token from parser
+ foreach ($this->parser->yy_get_expected_tokens($this->parser->yymajor) as $token) {
+ $exp_token = $this->parser->yyTokenName[$token];
+ if (isset($this->lex->smarty_token_names[$exp_token])) {
+ // token type from lexer
+ $expect[] = '"' . $this->lex->smarty_token_names[$exp_token] . '"';
+ } else {
+ // otherwise internal token name
+ $expect[] = $this->parser->yyTokenName[$token];
+ }
+ }
+ // output parser error message
+ $error_text .= ' - Unexpected "' . $this->lex->value . '", expected one of: ' . implode(' , ', $expect);
+ }
+ throw new SmartyCompilerException($error_text);
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_configfilelexer.php b/library/Smarty/libs/sysplugins/smarty_internal_configfilelexer.php
new file mode 100644
index 000000000..bade2fe74
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_configfilelexer.php
@@ -0,0 +1,622 @@
+<?php
+/**
+* Smarty Internal Plugin Configfilelexer
+*
+* This is the lexer to break the config file source into tokens
+* @package Smarty
+* @subpackage Config
+* @author Uwe Tews
+*/
+/**
+* Smarty Internal Plugin Configfilelexer
+*/
+class Smarty_Internal_Configfilelexer
+{
+
+ public $data;
+ public $counter;
+ public $token;
+ public $value;
+ public $node;
+ public $line;
+ private $state = 1;
+ public $smarty_token_names = array ( // Text for parser error messages
+ );
+
+
+ function __construct($data, $smarty)
+ {
+ // set instance object
+ self::instance($this);
+ $this->data = $data . "\n"; //now all lines are \n-terminated
+ $this->counter = 0;
+ $this->line = 1;
+ $this->smarty = $smarty;
+ $this->mbstring_overload = ini_get('mbstring.func_overload') & 2;
+ }
+ public static function &instance($new_instance = null)
+ {
+ static $instance = null;
+ if (isset($new_instance) && is_object($new_instance))
+ $instance = $new_instance;
+ return $instance;
+ }
+
+
+
+ private $_yy_state = 1;
+ private $_yy_stack = array();
+
+ function yylex()
+ {
+ return $this->{'yylex' . $this->_yy_state}();
+ }
+
+ function yypushstate($state)
+ {
+ array_push($this->_yy_stack, $this->_yy_state);
+ $this->_yy_state = $state;
+ }
+
+ function yypopstate()
+ {
+ $this->_yy_state = array_pop($this->_yy_stack);
+ }
+
+ function yybegin($state)
+ {
+ $this->_yy_state = $state;
+ }
+
+
+
+
+ function yylex1()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ 3 => 0,
+ 4 => 0,
+ 5 => 0,
+ 6 => 0,
+ 7 => 0,
+ 8 => 0,
+ );
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/\G(#|;)|\G(\\[)|\G(\\])|\G(=)|\G([ \t\r]+)|\G(\n)|\G([0-9]*[a-zA-Z_]\\w*)|\G([\S\s])/iS";
+
+ do {
+ if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ ' an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state START');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r1_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const START = 1;
+ function yy_r1_1($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_COMMENTSTART;
+ $this->yypushstate(self::COMMENT);
+ }
+ function yy_r1_2($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_OPENB;
+ $this->yypushstate(self::SECTION);
+ }
+ function yy_r1_3($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_CLOSEB;
+ }
+ function yy_r1_4($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_EQUAL;
+ $this->yypushstate(self::VALUE);
+ }
+ function yy_r1_5($yy_subpatterns)
+ {
+
+ return false;
+ }
+ function yy_r1_6($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_NEWLINE;
+ }
+ function yy_r1_7($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_ID;
+ }
+ function yy_r1_8($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_OTHER;
+ }
+
+
+
+ function yylex2()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ 3 => 0,
+ 4 => 0,
+ 5 => 0,
+ 6 => 0,
+ 7 => 0,
+ 8 => 0,
+ 9 => 0,
+ );
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/\G([ \t\r]+)|\G(\\d+\\.\\d+(?=[ \t\r]*[\n#;]))|\G(\\d+(?=[ \t\r]*[\n#;]))|\G(\"\"\")|\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'(?=[ \t\r]*[\n#;]))|\G(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"(?=[ \t\r]*[\n#;]))|\G([a-zA-Z]+(?=[ \t\r]*[\n#;]))|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/iS";
+
+ do {
+ if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ ' an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state VALUE');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r2_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const VALUE = 2;
+ function yy_r2_1($yy_subpatterns)
+ {
+
+ return false;
+ }
+ function yy_r2_2($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_FLOAT;
+ $this->yypopstate();
+ }
+ function yy_r2_3($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_INT;
+ $this->yypopstate();
+ }
+ function yy_r2_4($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_QUOTES;
+ $this->yypushstate(self::TRIPPLE);
+ }
+ function yy_r2_5($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_SINGLE_QUOTED_STRING;
+ $this->yypopstate();
+ }
+ function yy_r2_6($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_DOUBLE_QUOTED_STRING;
+ $this->yypopstate();
+ }
+ function yy_r2_7($yy_subpatterns)
+ {
+
+ if (!$this->smarty->config_booleanize || !in_array(strtolower($this->value), Array("true", "false", "on", "off", "yes", "no")) ) {
+ $this->yypopstate();
+ $this->yypushstate(self::NAKED_STRING_VALUE);
+ return true; //reprocess in new state
+ } else {
+ $this->token = Smarty_Internal_Configfileparser::TPC_BOOL;
+ $this->yypopstate();
+ }
+ }
+ function yy_r2_8($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;
+ $this->yypopstate();
+ }
+ function yy_r2_9($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;
+ $this->value = "";
+ $this->yypopstate();
+ }
+
+
+
+ function yylex3()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ );
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/\G([^\n]+?(?=[ \t\r]*\n))/iS";
+
+ do {
+ if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ ' an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state NAKED_STRING_VALUE');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r3_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const NAKED_STRING_VALUE = 3;
+ function yy_r3_1($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;
+ $this->yypopstate();
+ }
+
+
+
+ function yylex4()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ 3 => 0,
+ );
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/\G([ \t\r]+)|\G([^\n]+?(?=[ \t\r]*\n))|\G(\n)/iS";
+
+ do {
+ if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ ' an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state COMMENT');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r4_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const COMMENT = 4;
+ function yy_r4_1($yy_subpatterns)
+ {
+
+ return false;
+ }
+ function yy_r4_2($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_NAKED_STRING;
+ }
+ function yy_r4_3($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_NEWLINE;
+ $this->yypopstate();
+ }
+
+
+
+ function yylex5()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ );
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/\G(\\.)|\G(.*?(?=[\.=[\]\r\n]))/iS";
+
+ do {
+ if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ ' an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state SECTION');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r5_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const SECTION = 5;
+ function yy_r5_1($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_DOT;
+ }
+ function yy_r5_2($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_SECTION;
+ $this->yypopstate();
+ }
+
+
+ function yylex6()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ );
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/\G(\"\"\"(?=[ \t\r]*[\n#;]))|\G([\S\s])/iS";
+
+ do {
+ if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ ' an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state TRIPPLE');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r6_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const TRIPPLE = 6;
+ function yy_r6_1($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_QUOTES_END;
+ $this->yypopstate();
+ $this->yypushstate(self::START);
+ }
+ function yy_r6_2($yy_subpatterns)
+ {
+
+ if ($this->mbstring_overload) {
+ $to = mb_strlen($this->data,'latin1');
+ } else {
+ $to = strlen($this->data);
+ }
+ preg_match("/\"\"\"[ \t\r]*[\n#;]/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter);
+ if (isset($match[0][1])) {
+ $to = $match[0][1];
+ } else {
+ $this->compiler->trigger_template_error ("missing or misspelled literal closing tag");
+ }
+ if ($this->mbstring_overload) {
+ $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1');
+ } else {
+ $this->value = substr($this->data,$this->counter,$to-$this->counter);
+ }
+ $this->token = Smarty_Internal_Configfileparser::TPC_TRIPPLE_TEXT;
+ }
+
+
+}
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_configfileparser.php b/library/Smarty/libs/sysplugins/smarty_internal_configfileparser.php
new file mode 100644
index 000000000..784bc684d
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_configfileparser.php
@@ -0,0 +1,921 @@
+<?php
+/**
+* Smarty Internal Plugin Configfileparser
+*
+* This is the config file parser.
+* It is generated from the internal.configfileparser.y file
+* @package Smarty
+* @subpackage Compiler
+* @author Uwe Tews
+*/
+
+class TPC_yyToken implements ArrayAccess
+{
+ public $string = '';
+ public $metadata = array();
+
+ function __construct($s, $m = array())
+ {
+ if ($s instanceof TPC_yyToken) {
+ $this->string = $s->string;
+ $this->metadata = $s->metadata;
+ } else {
+ $this->string = (string) $s;
+ if ($m instanceof TPC_yyToken) {
+ $this->metadata = $m->metadata;
+ } elseif (is_array($m)) {
+ $this->metadata = $m;
+ }
+ }
+ }
+
+ function __toString()
+ {
+ return $this->_string;
+ }
+
+ function offsetExists($offset)
+ {
+ return isset($this->metadata[$offset]);
+ }
+
+ function offsetGet($offset)
+ {
+ return $this->metadata[$offset];
+ }
+
+ function offsetSet($offset, $value)
+ {
+ if ($offset === null) {
+ if (isset($value[0])) {
+ $x = ($value instanceof TPC_yyToken) ?
+ $value->metadata : $value;
+ $this->metadata = array_merge($this->metadata, $x);
+ return;
+ }
+ $offset = count($this->metadata);
+ }
+ if ($value === null) {
+ return;
+ }
+ if ($value instanceof TPC_yyToken) {
+ if ($value->metadata) {
+ $this->metadata[$offset] = $value->metadata;
+ }
+ } elseif ($value) {
+ $this->metadata[$offset] = $value;
+ }
+ }
+
+ function offsetUnset($offset)
+ {
+ unset($this->metadata[$offset]);
+ }
+}
+
+class TPC_yyStackEntry
+{
+ public $stateno; /* The state-number */
+ public $major; /* The major token value. This is the code
+ ** number for the token at this stack level */
+ public $minor; /* The user-supplied minor token value. This
+ ** is the value of the token */
+};
+
+
+#line 12 "smarty_internal_configfileparser.y"
+class Smarty_Internal_Configfileparser#line 79 "smarty_internal_configfileparser.php"
+{
+#line 14 "smarty_internal_configfileparser.y"
+
+ // states whether the parse was successful or not
+ public $successful = true;
+ public $retvalue = 0;
+ private $lex;
+ private $internalError = false;
+
+ function __construct($lex, $compiler) {
+ // set instance object
+ self::instance($this);
+ $this->lex = $lex;
+ $this->smarty = $compiler->smarty;
+ $this->compiler = $compiler;
+ }
+ public static function &instance($new_instance = null)
+ {
+ static $instance = null;
+ if (isset($new_instance) && is_object($new_instance))
+ $instance = $new_instance;
+ return $instance;
+ }
+
+ private function parse_bool($str) {
+ if (in_array(strtolower($str) ,array('on','yes','true'))) {
+ $res = true;
+ } else {
+ $res = false;
+ }
+ return $res;
+ }
+
+ private static $escapes_single = Array('\\' => '\\',
+ '\'' => '\'');
+ private static function parse_single_quoted_string($qstr) {
+ $escaped_string = substr($qstr, 1, strlen($qstr)-2); //remove outer quotes
+
+ $ss = preg_split('/(\\\\.)/', $escaped_string, -1, PREG_SPLIT_DELIM_CAPTURE);
+
+ $str = "";
+ foreach ($ss as $s) {
+ if (strlen($s) === 2 && $s[0] === '\\') {
+ if (isset(self::$escapes_single[$s[1]])) {
+ $s = self::$escapes_single[$s[1]];
+ }
+ }
+
+ $str .= $s;
+ }
+
+ return $str;
+ }
+
+ private static function parse_double_quoted_string($qstr) {
+ $inner_str = substr($qstr, 1, strlen($qstr)-2);
+ return stripcslashes($inner_str);
+ }
+
+ private static function parse_tripple_double_quoted_string($qstr) {
+ return stripcslashes($qstr);
+ }
+
+ private function set_var(Array $var, Array &$target_array) {
+ $key = $var["key"];
+ $value = $var["value"];
+
+ if ($this->smarty->config_overwrite || !isset($target_array['vars'][$key])) {
+ $target_array['vars'][$key] = $value;
+ } else {
+ settype($target_array['vars'][$key], 'array');
+ $target_array['vars'][$key][] = $value;
+ }
+ }
+
+ private function add_global_vars(Array $vars) {
+ if (!isset($this->compiler->config_data['vars'])) {
+ $this->compiler->config_data['vars'] = Array();
+ }
+ foreach ($vars as $var) {
+ $this->set_var($var, $this->compiler->config_data);
+ }
+ }
+
+ private function add_section_vars($section_name, Array $vars) {
+ if (!isset($this->compiler->config_data['sections'][$section_name]['vars'])) {
+ $this->compiler->config_data['sections'][$section_name]['vars'] = Array();
+ }
+ foreach ($vars as $var) {
+ $this->set_var($var, $this->compiler->config_data['sections'][$section_name]);
+ }
+ }
+#line 173 "smarty_internal_configfileparser.php"
+
+ const TPC_OPENB = 1;
+ const TPC_SECTION = 2;
+ const TPC_CLOSEB = 3;
+ const TPC_DOT = 4;
+ const TPC_ID = 5;
+ const TPC_EQUAL = 6;
+ const TPC_FLOAT = 7;
+ const TPC_INT = 8;
+ const TPC_BOOL = 9;
+ const TPC_SINGLE_QUOTED_STRING = 10;
+ const TPC_DOUBLE_QUOTED_STRING = 11;
+ const TPC_TRIPPLE_QUOTES = 12;
+ const TPC_TRIPPLE_TEXT = 13;
+ const TPC_TRIPPLE_QUOTES_END = 14;
+ const TPC_NAKED_STRING = 15;
+ const TPC_OTHER = 16;
+ const TPC_NEWLINE = 17;
+ const TPC_COMMENTSTART = 18;
+ const YY_NO_ACTION = 60;
+ const YY_ACCEPT_ACTION = 59;
+ const YY_ERROR_ACTION = 58;
+
+ const YY_SZ_ACTTAB = 38;
+static public $yy_action = array(
+ /* 0 */ 29, 30, 34, 33, 24, 13, 19, 25, 35, 21,
+ /* 10 */ 59, 8, 3, 1, 20, 12, 14, 31, 20, 12,
+ /* 20 */ 15, 17, 23, 18, 27, 26, 4, 5, 6, 32,
+ /* 30 */ 2, 11, 28, 22, 16, 9, 7, 10,
+ );
+ static public $yy_lookahead = array(
+ /* 0 */ 7, 8, 9, 10, 11, 12, 5, 27, 15, 16,
+ /* 10 */ 20, 21, 23, 23, 17, 18, 13, 14, 17, 18,
+ /* 20 */ 15, 2, 17, 4, 25, 26, 6, 3, 3, 14,
+ /* 30 */ 23, 1, 24, 17, 2, 25, 22, 25,
+);
+ const YY_SHIFT_USE_DFLT = -8;
+ const YY_SHIFT_MAX = 19;
+ static public $yy_shift_ofst = array(
+ /* 0 */ -8, 1, 1, 1, -7, -3, -3, 30, -8, -8,
+ /* 10 */ -8, 19, 5, 3, 15, 16, 24, 25, 32, 20,
+);
+ const YY_REDUCE_USE_DFLT = -21;
+ const YY_REDUCE_MAX = 10;
+ static public $yy_reduce_ofst = array(
+ /* 0 */ -10, -1, -1, -1, -20, 10, 12, 8, 14, 7,
+ /* 10 */ -11,
+);
+ static public $yyExpectedTokens = array(
+ /* 0 */ array(),
+ /* 1 */ array(5, 17, 18, ),
+ /* 2 */ array(5, 17, 18, ),
+ /* 3 */ array(5, 17, 18, ),
+ /* 4 */ array(7, 8, 9, 10, 11, 12, 15, 16, ),
+ /* 5 */ array(17, 18, ),
+ /* 6 */ array(17, 18, ),
+ /* 7 */ array(1, ),
+ /* 8 */ array(),
+ /* 9 */ array(),
+ /* 10 */ array(),
+ /* 11 */ array(2, 4, ),
+ /* 12 */ array(15, 17, ),
+ /* 13 */ array(13, 14, ),
+ /* 14 */ array(14, ),
+ /* 15 */ array(17, ),
+ /* 16 */ array(3, ),
+ /* 17 */ array(3, ),
+ /* 18 */ array(2, ),
+ /* 19 */ array(6, ),
+ /* 20 */ array(),
+ /* 21 */ array(),
+ /* 22 */ array(),
+ /* 23 */ array(),
+ /* 24 */ array(),
+ /* 25 */ array(),
+ /* 26 */ array(),
+ /* 27 */ array(),
+ /* 28 */ array(),
+ /* 29 */ array(),
+ /* 30 */ array(),
+ /* 31 */ array(),
+ /* 32 */ array(),
+ /* 33 */ array(),
+ /* 34 */ array(),
+ /* 35 */ array(),
+);
+ static public $yy_default = array(
+ /* 0 */ 44, 37, 41, 40, 58, 58, 58, 36, 39, 44,
+ /* 10 */ 44, 58, 58, 58, 58, 58, 58, 58, 58, 58,
+ /* 20 */ 55, 54, 57, 56, 50, 45, 43, 42, 38, 46,
+ /* 30 */ 47, 52, 51, 49, 48, 53,
+);
+ const YYNOCODE = 29;
+ const YYSTACKDEPTH = 100;
+ const YYNSTATE = 36;
+ const YYNRULE = 22;
+ const YYERRORSYMBOL = 19;
+ const YYERRSYMDT = 'yy0';
+ const YYFALLBACK = 0;
+ static public $yyFallback = array(
+ );
+ static function Trace($TraceFILE, $zTracePrompt)
+ {
+ if (!$TraceFILE) {
+ $zTracePrompt = 0;
+ } elseif (!$zTracePrompt) {
+ $TraceFILE = 0;
+ }
+ self::$yyTraceFILE = $TraceFILE;
+ self::$yyTracePrompt = $zTracePrompt;
+ }
+
+ static function PrintTrace()
+ {
+ self::$yyTraceFILE = fopen('php://output', 'w');
+ self::$yyTracePrompt = '<br>';
+ }
+
+ static public $yyTraceFILE;
+ static public $yyTracePrompt;
+ public $yyidx; /* Index of top element in stack */
+ public $yyerrcnt; /* Shifts left before out of the error */
+ public $yystack = array(); /* The parser's stack */
+
+ public $yyTokenName = array(
+ '$', 'OPENB', 'SECTION', 'CLOSEB',
+ 'DOT', 'ID', 'EQUAL', 'FLOAT',
+ 'INT', 'BOOL', 'SINGLE_QUOTED_STRING', 'DOUBLE_QUOTED_STRING',
+ 'TRIPPLE_QUOTES', 'TRIPPLE_TEXT', 'TRIPPLE_QUOTES_END', 'NAKED_STRING',
+ 'OTHER', 'NEWLINE', 'COMMENTSTART', 'error',
+ 'start', 'global_vars', 'sections', 'var_list',
+ 'section', 'newline', 'var', 'value',
+ );
+
+ static public $yyRuleName = array(
+ /* 0 */ "start ::= global_vars sections",
+ /* 1 */ "global_vars ::= var_list",
+ /* 2 */ "sections ::= sections section",
+ /* 3 */ "sections ::=",
+ /* 4 */ "section ::= OPENB SECTION CLOSEB newline var_list",
+ /* 5 */ "section ::= OPENB DOT SECTION CLOSEB newline var_list",
+ /* 6 */ "var_list ::= var_list newline",
+ /* 7 */ "var_list ::= var_list var",
+ /* 8 */ "var_list ::=",
+ /* 9 */ "var ::= ID EQUAL value",
+ /* 10 */ "value ::= FLOAT",
+ /* 11 */ "value ::= INT",
+ /* 12 */ "value ::= BOOL",
+ /* 13 */ "value ::= SINGLE_QUOTED_STRING",
+ /* 14 */ "value ::= DOUBLE_QUOTED_STRING",
+ /* 15 */ "value ::= TRIPPLE_QUOTES TRIPPLE_TEXT TRIPPLE_QUOTES_END",
+ /* 16 */ "value ::= TRIPPLE_QUOTES TRIPPLE_QUOTES_END",
+ /* 17 */ "value ::= NAKED_STRING",
+ /* 18 */ "value ::= OTHER",
+ /* 19 */ "newline ::= NEWLINE",
+ /* 20 */ "newline ::= COMMENTSTART NEWLINE",
+ /* 21 */ "newline ::= COMMENTSTART NAKED_STRING NEWLINE",
+ );
+
+ function tokenName($tokenType)
+ {
+ if ($tokenType === 0) {
+ return 'End of Input';
+ }
+ if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) {
+ return $this->yyTokenName[$tokenType];
+ } else {
+ return "Unknown";
+ }
+ }
+
+ static function yy_destructor($yymajor, $yypminor)
+ {
+ switch ($yymajor) {
+ default: break; /* If no destructor action specified: do nothing */
+ }
+ }
+
+ function yy_pop_parser_stack()
+ {
+ if (!count($this->yystack)) {
+ return;
+ }
+ $yytos = array_pop($this->yystack);
+ if (self::$yyTraceFILE && $this->yyidx >= 0) {
+ fwrite(self::$yyTraceFILE,
+ self::$yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] .
+ "\n");
+ }
+ $yymajor = $yytos->major;
+ self::yy_destructor($yymajor, $yytos->minor);
+ $this->yyidx--;
+ return $yymajor;
+ }
+
+ function __destruct()
+ {
+ while ($this->yystack !== Array()) {
+ $this->yy_pop_parser_stack();
+ }
+ if (is_resource(self::$yyTraceFILE)) {
+ fclose(self::$yyTraceFILE);
+ }
+ }
+
+ function yy_get_expected_tokens($token)
+ {
+ $state = $this->yystack[$this->yyidx]->stateno;
+ $expected = self::$yyExpectedTokens[$state];
+ if (in_array($token, self::$yyExpectedTokens[$state], true)) {
+ return $expected;
+ }
+ $stack = $this->yystack;
+ $yyidx = $this->yyidx;
+ do {
+ $yyact = $this->yy_find_shift_action($token);
+ if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
+ // reduce action
+ $done = 0;
+ do {
+ if ($done++ == 100) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // too much recursion prevents proper detection
+ // so give up
+ return array_unique($expected);
+ }
+ $yyruleno = $yyact - self::YYNSTATE;
+ $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
+ $nextstate = $this->yy_find_reduce_action(
+ $this->yystack[$this->yyidx]->stateno,
+ self::$yyRuleInfo[$yyruleno]['lhs']);
+ if (isset(self::$yyExpectedTokens[$nextstate])) {
+ $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);
+ if (in_array($token,
+ self::$yyExpectedTokens[$nextstate], true)) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return array_unique($expected);
+ }
+ }
+ if ($nextstate < self::YYNSTATE) {
+ // we need to shift a non-terminal
+ $this->yyidx++;
+ $x = new TPC_yyStackEntry;
+ $x->stateno = $nextstate;
+ $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
+ $this->yystack[$this->yyidx] = $x;
+ continue 2;
+ } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // the last token was just ignored, we can't accept
+ // by ignoring input, this is in essence ignoring a
+ // syntax error!
+ return array_unique($expected);
+ } elseif ($nextstate === self::YY_NO_ACTION) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // input accepted, but not shifted (I guess)
+ return $expected;
+ } else {
+ $yyact = $nextstate;
+ }
+ } while (true);
+ }
+ break;
+ } while (true);
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return array_unique($expected);
+ }
+
+ function yy_is_expected_token($token)
+ {
+ if ($token === 0) {
+ return true; // 0 is not part of this
+ }
+ $state = $this->yystack[$this->yyidx]->stateno;
+ if (in_array($token, self::$yyExpectedTokens[$state], true)) {
+ return true;
+ }
+ $stack = $this->yystack;
+ $yyidx = $this->yyidx;
+ do {
+ $yyact = $this->yy_find_shift_action($token);
+ if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
+ // reduce action
+ $done = 0;
+ do {
+ if ($done++ == 100) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // too much recursion prevents proper detection
+ // so give up
+ return true;
+ }
+ $yyruleno = $yyact - self::YYNSTATE;
+ $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
+ $nextstate = $this->yy_find_reduce_action(
+ $this->yystack[$this->yyidx]->stateno,
+ self::$yyRuleInfo[$yyruleno]['lhs']);
+ if (isset(self::$yyExpectedTokens[$nextstate]) &&
+ in_array($token, self::$yyExpectedTokens[$nextstate], true)) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return true;
+ }
+ if ($nextstate < self::YYNSTATE) {
+ // we need to shift a non-terminal
+ $this->yyidx++;
+ $x = new TPC_yyStackEntry;
+ $x->stateno = $nextstate;
+ $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
+ $this->yystack[$this->yyidx] = $x;
+ continue 2;
+ } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ if (!$token) {
+ // end of input: this is valid
+ return true;
+ }
+ // the last token was just ignored, we can't accept
+ // by ignoring input, this is in essence ignoring a
+ // syntax error!
+ return false;
+ } elseif ($nextstate === self::YY_NO_ACTION) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // input accepted, but not shifted (I guess)
+ return true;
+ } else {
+ $yyact = $nextstate;
+ }
+ } while (true);
+ }
+ break;
+ } while (true);
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return true;
+ }
+
+ function yy_find_shift_action($iLookAhead)
+ {
+ $stateno = $this->yystack[$this->yyidx]->stateno;
+
+ /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */
+ if (!isset(self::$yy_shift_ofst[$stateno])) {
+ // no shift actions
+ return self::$yy_default[$stateno];
+ }
+ $i = self::$yy_shift_ofst[$stateno];
+ if ($i === self::YY_SHIFT_USE_DFLT) {
+ return self::$yy_default[$stateno];
+ }
+ if ($iLookAhead == self::YYNOCODE) {
+ return self::YY_NO_ACTION;
+ }
+ $i += $iLookAhead;
+ if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
+ self::$yy_lookahead[$i] != $iLookAhead) {
+ if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback)
+ && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) {
+ if (self::$yyTraceFILE) {
+ fwrite(self::$yyTraceFILE, self::$yyTracePrompt . "FALLBACK " .
+ $this->yyTokenName[$iLookAhead] . " => " .
+ $this->yyTokenName[$iFallback] . "\n");
+ }
+ return $this->yy_find_shift_action($iFallback);
+ }
+ return self::$yy_default[$stateno];
+ } else {
+ return self::$yy_action[$i];
+ }
+ }
+
+ function yy_find_reduce_action($stateno, $iLookAhead)
+ {
+ /* $stateno = $this->yystack[$this->yyidx]->stateno; */
+
+ if (!isset(self::$yy_reduce_ofst[$stateno])) {
+ return self::$yy_default[$stateno];
+ }
+ $i = self::$yy_reduce_ofst[$stateno];
+ if ($i == self::YY_REDUCE_USE_DFLT) {
+ return self::$yy_default[$stateno];
+ }
+ if ($iLookAhead == self::YYNOCODE) {
+ return self::YY_NO_ACTION;
+ }
+ $i += $iLookAhead;
+ if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
+ self::$yy_lookahead[$i] != $iLookAhead) {
+ return self::$yy_default[$stateno];
+ } else {
+ return self::$yy_action[$i];
+ }
+ }
+
+ function yy_shift($yyNewState, $yyMajor, $yypMinor)
+ {
+ $this->yyidx++;
+ if ($this->yyidx >= self::YYSTACKDEPTH) {
+ $this->yyidx--;
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sStack Overflow!\n", self::$yyTracePrompt);
+ }
+ while ($this->yyidx >= 0) {
+ $this->yy_pop_parser_stack();
+ }
+#line 125 "smarty_internal_configfileparser.y"
+
+ $this->internalError = true;
+ $this->compiler->trigger_config_file_error("Stack overflow in configfile parser");
+#line 593 "smarty_internal_configfileparser.php"
+ return;
+ }
+ $yytos = new TPC_yyStackEntry;
+ $yytos->stateno = $yyNewState;
+ $yytos->major = $yyMajor;
+ $yytos->minor = $yypMinor;
+ array_push($this->yystack, $yytos);
+ if (self::$yyTraceFILE && $this->yyidx > 0) {
+ fprintf(self::$yyTraceFILE, "%sShift %d\n", self::$yyTracePrompt,
+ $yyNewState);
+ fprintf(self::$yyTraceFILE, "%sStack:", self::$yyTracePrompt);
+ for($i = 1; $i <= $this->yyidx; $i++) {
+ fprintf(self::$yyTraceFILE, " %s",
+ $this->yyTokenName[$this->yystack[$i]->major]);
+ }
+ fwrite(self::$yyTraceFILE,"\n");
+ }
+ }
+
+ static public $yyRuleInfo = array(
+ array( 'lhs' => 20, 'rhs' => 2 ),
+ array( 'lhs' => 21, 'rhs' => 1 ),
+ array( 'lhs' => 22, 'rhs' => 2 ),
+ array( 'lhs' => 22, 'rhs' => 0 ),
+ array( 'lhs' => 24, 'rhs' => 5 ),
+ array( 'lhs' => 24, 'rhs' => 6 ),
+ array( 'lhs' => 23, 'rhs' => 2 ),
+ array( 'lhs' => 23, 'rhs' => 2 ),
+ array( 'lhs' => 23, 'rhs' => 0 ),
+ array( 'lhs' => 26, 'rhs' => 3 ),
+ array( 'lhs' => 27, 'rhs' => 1 ),
+ array( 'lhs' => 27, 'rhs' => 1 ),
+ array( 'lhs' => 27, 'rhs' => 1 ),
+ array( 'lhs' => 27, 'rhs' => 1 ),
+ array( 'lhs' => 27, 'rhs' => 1 ),
+ array( 'lhs' => 27, 'rhs' => 3 ),
+ array( 'lhs' => 27, 'rhs' => 2 ),
+ array( 'lhs' => 27, 'rhs' => 1 ),
+ array( 'lhs' => 27, 'rhs' => 1 ),
+ array( 'lhs' => 25, 'rhs' => 1 ),
+ array( 'lhs' => 25, 'rhs' => 2 ),
+ array( 'lhs' => 25, 'rhs' => 3 ),
+ );
+
+ static public $yyReduceMap = array(
+ 0 => 0,
+ 2 => 0,
+ 3 => 0,
+ 19 => 0,
+ 20 => 0,
+ 21 => 0,
+ 1 => 1,
+ 4 => 4,
+ 5 => 5,
+ 6 => 6,
+ 7 => 7,
+ 8 => 8,
+ 9 => 9,
+ 10 => 10,
+ 11 => 11,
+ 12 => 12,
+ 13 => 13,
+ 14 => 14,
+ 15 => 15,
+ 16 => 16,
+ 17 => 17,
+ 18 => 17,
+ );
+#line 131 "smarty_internal_configfileparser.y"
+ function yy_r0(){
+ $this->_retvalue = null;
+ }
+#line 666 "smarty_internal_configfileparser.php"
+#line 136 "smarty_internal_configfileparser.y"
+ function yy_r1(){
+ $this->add_global_vars($this->yystack[$this->yyidx + 0]->minor); $this->_retvalue = null;
+ }
+#line 671 "smarty_internal_configfileparser.php"
+#line 149 "smarty_internal_configfileparser.y"
+ function yy_r4(){
+ $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = null;
+ }
+#line 677 "smarty_internal_configfileparser.php"
+#line 154 "smarty_internal_configfileparser.y"
+ function yy_r5(){
+ if ($this->smarty->config_read_hidden) {
+ $this->add_section_vars($this->yystack[$this->yyidx + -3]->minor, $this->yystack[$this->yyidx + 0]->minor);
+ }
+ $this->_retvalue = null;
+ }
+#line 685 "smarty_internal_configfileparser.php"
+#line 162 "smarty_internal_configfileparser.y"
+ function yy_r6(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;
+ }
+#line 690 "smarty_internal_configfileparser.php"
+#line 166 "smarty_internal_configfileparser.y"
+ function yy_r7(){
+ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor, Array($this->yystack[$this->yyidx + 0]->minor));
+ }
+#line 695 "smarty_internal_configfileparser.php"
+#line 170 "smarty_internal_configfileparser.y"
+ function yy_r8(){
+ $this->_retvalue = Array();
+ }
+#line 700 "smarty_internal_configfileparser.php"
+#line 176 "smarty_internal_configfileparser.y"
+ function yy_r9(){
+ $this->_retvalue = Array("key" => $this->yystack[$this->yyidx + -2]->minor, "value" => $this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 705 "smarty_internal_configfileparser.php"
+#line 181 "smarty_internal_configfileparser.y"
+ function yy_r10(){
+ $this->_retvalue = (float) $this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 710 "smarty_internal_configfileparser.php"
+#line 185 "smarty_internal_configfileparser.y"
+ function yy_r11(){
+ $this->_retvalue = (int) $this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 715 "smarty_internal_configfileparser.php"
+#line 189 "smarty_internal_configfileparser.y"
+ function yy_r12(){
+ $this->_retvalue = $this->parse_bool($this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 720 "smarty_internal_configfileparser.php"
+#line 193 "smarty_internal_configfileparser.y"
+ function yy_r13(){
+ $this->_retvalue = self::parse_single_quoted_string($this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 725 "smarty_internal_configfileparser.php"
+#line 197 "smarty_internal_configfileparser.y"
+ function yy_r14(){
+ $this->_retvalue = self::parse_double_quoted_string($this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 730 "smarty_internal_configfileparser.php"
+#line 201 "smarty_internal_configfileparser.y"
+ function yy_r15(){
+ $this->_retvalue = self::parse_tripple_double_quoted_string($this->yystack[$this->yyidx + -1]->minor);
+ }
+#line 735 "smarty_internal_configfileparser.php"
+#line 205 "smarty_internal_configfileparser.y"
+ function yy_r16(){
+ $this->_retvalue = '';
+ }
+#line 740 "smarty_internal_configfileparser.php"
+#line 209 "smarty_internal_configfileparser.y"
+ function yy_r17(){
+ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 745 "smarty_internal_configfileparser.php"
+
+ private $_retvalue;
+
+ function yy_reduce($yyruleno)
+ {
+ $yymsp = $this->yystack[$this->yyidx];
+ if (self::$yyTraceFILE && $yyruleno >= 0
+ && $yyruleno < count(self::$yyRuleName)) {
+ fprintf(self::$yyTraceFILE, "%sReduce (%d) [%s].\n",
+ self::$yyTracePrompt, $yyruleno,
+ self::$yyRuleName[$yyruleno]);
+ }
+
+ $this->_retvalue = $yy_lefthand_side = null;
+ if (array_key_exists($yyruleno, self::$yyReduceMap)) {
+ // call the action
+ $this->_retvalue = null;
+ $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}();
+ $yy_lefthand_side = $this->_retvalue;
+ }
+ $yygoto = self::$yyRuleInfo[$yyruleno]['lhs'];
+ $yysize = self::$yyRuleInfo[$yyruleno]['rhs'];
+ $this->yyidx -= $yysize;
+ for($i = $yysize; $i; $i--) {
+ // pop all of the right-hand side parameters
+ array_pop($this->yystack);
+ }
+ $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto);
+ if ($yyact < self::YYNSTATE) {
+ if (!self::$yyTraceFILE && $yysize) {
+ $this->yyidx++;
+ $x = new TPC_yyStackEntry;
+ $x->stateno = $yyact;
+ $x->major = $yygoto;
+ $x->minor = $yy_lefthand_side;
+ $this->yystack[$this->yyidx] = $x;
+ } else {
+ $this->yy_shift($yyact, $yygoto, $yy_lefthand_side);
+ }
+ } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) {
+ $this->yy_accept();
+ }
+ }
+
+ function yy_parse_failed()
+ {
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sFail!\n", self::$yyTracePrompt);
+ }
+ while ($this->yyidx >= 0) {
+ $this->yy_pop_parser_stack();
+ }
+ }
+
+ function yy_syntax_error($yymajor, $TOKEN)
+ {
+#line 118 "smarty_internal_configfileparser.y"
+
+ $this->internalError = true;
+ $this->yymajor = $yymajor;
+ $this->compiler->trigger_config_file_error();
+#line 808 "smarty_internal_configfileparser.php"
+ }
+
+ function yy_accept()
+ {
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sAccept!\n", self::$yyTracePrompt);
+ }
+ while ($this->yyidx >= 0) {
+ $stack = $this->yy_pop_parser_stack();
+ }
+#line 110 "smarty_internal_configfileparser.y"
+
+ $this->successful = !$this->internalError;
+ $this->internalError = false;
+ $this->retvalue = $this->_retvalue;
+ //echo $this->retvalue."\n\n";
+#line 826 "smarty_internal_configfileparser.php"
+ }
+
+ function doParse($yymajor, $yytokenvalue)
+ {
+ $yyerrorhit = 0; /* True if yymajor has invoked an error */
+
+ if ($this->yyidx === null || $this->yyidx < 0) {
+ $this->yyidx = 0;
+ $this->yyerrcnt = -1;
+ $x = new TPC_yyStackEntry;
+ $x->stateno = 0;
+ $x->major = 0;
+ $this->yystack = array();
+ array_push($this->yystack, $x);
+ }
+ $yyendofinput = ($yymajor==0);
+
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sInput %s\n",
+ self::$yyTracePrompt, $this->yyTokenName[$yymajor]);
+ }
+
+ do {
+ $yyact = $this->yy_find_shift_action($yymajor);
+ if ($yymajor < self::YYERRORSYMBOL &&
+ !$this->yy_is_expected_token($yymajor)) {
+ // force a syntax error
+ $yyact = self::YY_ERROR_ACTION;
+ }
+ if ($yyact < self::YYNSTATE) {
+ $this->yy_shift($yyact, $yymajor, $yytokenvalue);
+ $this->yyerrcnt--;
+ if ($yyendofinput && $this->yyidx >= 0) {
+ $yymajor = 0;
+ } else {
+ $yymajor = self::YYNOCODE;
+ }
+ } elseif ($yyact < self::YYNSTATE + self::YYNRULE) {
+ $this->yy_reduce($yyact - self::YYNSTATE);
+ } elseif ($yyact == self::YY_ERROR_ACTION) {
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sSyntax Error!\n",
+ self::$yyTracePrompt);
+ }
+ if (self::YYERRORSYMBOL) {
+ if ($this->yyerrcnt < 0) {
+ $this->yy_syntax_error($yymajor, $yytokenvalue);
+ }
+ $yymx = $this->yystack[$this->yyidx]->major;
+ if ($yymx == self::YYERRORSYMBOL || $yyerrorhit ){
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sDiscard input token %s\n",
+ self::$yyTracePrompt, $this->yyTokenName[$yymajor]);
+ }
+ $this->yy_destructor($yymajor, $yytokenvalue);
+ $yymajor = self::YYNOCODE;
+ } else {
+ while ($this->yyidx >= 0 &&
+ $yymx != self::YYERRORSYMBOL &&
+ ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE
+ ){
+ $this->yy_pop_parser_stack();
+ }
+ if ($this->yyidx < 0 || $yymajor==0) {
+ $this->yy_destructor($yymajor, $yytokenvalue);
+ $this->yy_parse_failed();
+ $yymajor = self::YYNOCODE;
+ } elseif ($yymx != self::YYERRORSYMBOL) {
+ $u2 = 0;
+ $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2);
+ }
+ }
+ $this->yyerrcnt = 3;
+ $yyerrorhit = 1;
+ } else {
+ if ($this->yyerrcnt <= 0) {
+ $this->yy_syntax_error($yymajor, $yytokenvalue);
+ }
+ $this->yyerrcnt = 3;
+ $this->yy_destructor($yymajor, $yytokenvalue);
+ if ($yyendofinput) {
+ $this->yy_parse_failed();
+ }
+ $yymajor = self::YYNOCODE;
+ }
+ } else {
+ $this->yy_accept();
+ $yymajor = self::YYNOCODE;
+ }
+ } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
+ }
+}
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_data.php b/library/Smarty/libs/sysplugins/smarty_internal_data.php
new file mode 100644
index 000000000..5baf3b76d
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_data.php
@@ -0,0 +1,551 @@
+<?php
+/**
+ * Smarty Internal Plugin Data
+ *
+ * This file contains the basic classes and methodes for template and variable creation
+ *
+ * @package Smarty
+ * @subpackage Template
+ * @author Uwe Tews
+ */
+
+/**
+ * Base class with template and variable methodes
+ *
+ * @package Smarty
+ * @subpackage Template
+ */
+class Smarty_Internal_Data {
+
+ /**
+ * name of class used for templates
+ *
+ * @var string
+ */
+ public $template_class = 'Smarty_Internal_Template';
+ /**
+ * template variables
+ *
+ * @var array
+ */
+ public $tpl_vars = array();
+ /**
+ * parent template (if any)
+ *
+ * @var Smarty_Internal_Template
+ */
+ public $parent = null;
+ /**
+ * configuration settings
+ *
+ * @var array
+ */
+ public $config_vars = array();
+
+ /**
+ * assigns a Smarty variable
+ *
+ * @param array|string $tpl_var the template variable name(s)
+ * @param mixed $value the value to assign
+ * @param boolean $nocache if true any output of this variable will be not cached
+ * @param boolean $scope the scope the variable will have (local,parent or root)
+ * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function assign($tpl_var, $value = null, $nocache = false)
+ {
+ if (is_array($tpl_var)) {
+ foreach ($tpl_var as $_key => $_val) {
+ if ($_key != '') {
+ $this->tpl_vars[$_key] = new Smarty_variable($_val, $nocache);
+ }
+ }
+ } else {
+ if ($tpl_var != '') {
+ $this->tpl_vars[$tpl_var] = new Smarty_variable($value, $nocache);
+ }
+ }
+
+ return $this;
+ }
+
+ /**
+ * assigns a global Smarty variable
+ *
+ * @param string $varname the global variable name
+ * @param mixed $value the value to assign
+ * @param boolean $nocache if true any output of this variable will be not cached
+ * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function assignGlobal($varname, $value = null, $nocache = false)
+ {
+ if ($varname != '') {
+ Smarty::$global_tpl_vars[$varname] = new Smarty_variable($value, $nocache);
+ }
+
+ return $this;
+ }
+ /**
+ * assigns values to template variables by reference
+ *
+ * @param string $tpl_var the template variable name
+ * @param mixed $ &$value the referenced value to assign
+ * @param boolean $nocache if true any output of this variable will be not cached
+ * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function assignByRef($tpl_var, &$value, $nocache = false)
+ {
+ if ($tpl_var != '') {
+ $this->tpl_vars[$tpl_var] = new Smarty_variable(null, $nocache);
+ $this->tpl_vars[$tpl_var]->value = &$value;
+ }
+
+ return $this;
+ }
+
+ /**
+ * appends values to template variables
+ *
+ * @param array|string $tpl_var the template variable name(s)
+ * @param mixed $value the value to append
+ * @param boolean $merge flag if array elements shall be merged
+ * @param boolean $nocache if true any output of this variable will be not cached
+ * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function append($tpl_var, $value = null, $merge = false, $nocache = false)
+ {
+ if (is_array($tpl_var)) {
+ // $tpl_var is an array, ignore $value
+ foreach ($tpl_var as $_key => $_val) {
+ if ($_key != '') {
+ if (!isset($this->tpl_vars[$_key])) {
+ $tpl_var_inst = $this->getVariable($_key, null, true, false);
+ if ($tpl_var_inst instanceof Undefined_Smarty_Variable) {
+ $this->tpl_vars[$_key] = new Smarty_variable(null, $nocache);
+ } else {
+ $this->tpl_vars[$_key] = clone $tpl_var_inst;
+ }
+ }
+ if (!(is_array($this->tpl_vars[$_key]->value) || $this->tpl_vars[$_key]->value instanceof ArrayAccess)) {
+ settype($this->tpl_vars[$_key]->value, 'array');
+ }
+ if ($merge && is_array($_val)) {
+ foreach($_val as $_mkey => $_mval) {
+ $this->tpl_vars[$_key]->value[$_mkey] = $_mval;
+ }
+ } else {
+ $this->tpl_vars[$_key]->value[] = $_val;
+ }
+ }
+ }
+ } else {
+ if ($tpl_var != '' && isset($value)) {
+ if (!isset($this->tpl_vars[$tpl_var])) {
+ $tpl_var_inst = $this->getVariable($tpl_var, null, true, false);
+ if ($tpl_var_inst instanceof Undefined_Smarty_Variable) {
+ $this->tpl_vars[$tpl_var] = new Smarty_variable(null, $nocache);
+ } else {
+ $this->tpl_vars[$tpl_var] = clone $tpl_var_inst;
+ }
+ }
+ if (!(is_array($this->tpl_vars[$tpl_var]->value) || $this->tpl_vars[$tpl_var]->value instanceof ArrayAccess)) {
+ settype($this->tpl_vars[$tpl_var]->value, 'array');
+ }
+ if ($merge && is_array($value)) {
+ foreach($value as $_mkey => $_mval) {
+ $this->tpl_vars[$tpl_var]->value[$_mkey] = $_mval;
+ }
+ } else {
+ $this->tpl_vars[$tpl_var]->value[] = $value;
+ }
+ }
+ }
+
+ return $this;
+ }
+
+ /**
+ * appends values to template variables by reference
+ *
+ * @param string $tpl_var the template variable name
+ * @param mixed &$value the referenced value to append
+ * @param boolean $merge flag if array elements shall be merged
+ * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function appendByRef($tpl_var, &$value, $merge = false)
+ {
+ if ($tpl_var != '' && isset($value)) {
+ if (!isset($this->tpl_vars[$tpl_var])) {
+ $this->tpl_vars[$tpl_var] = new Smarty_variable();
+ }
+ if (!is_array($this->tpl_vars[$tpl_var]->value)) {
+ settype($this->tpl_vars[$tpl_var]->value, 'array');
+ }
+ if ($merge && is_array($value)) {
+ foreach($value as $_key => $_val) {
+ $this->tpl_vars[$tpl_var]->value[$_key] = &$value[$_key];
+ }
+ } else {
+ $this->tpl_vars[$tpl_var]->value[] = &$value;
+ }
+ }
+
+ return $this;
+ }
+
+ /**
+ * Returns a single or all template variables
+ *
+ * @param string $varname variable name or null
+ * @param string $_ptr optional pointer to data object
+ * @param boolean $search_parents include parent templates?
+ * @return string variable value or or array of variables
+ */
+ public function getTemplateVars($varname = null, $_ptr = null, $search_parents = true)
+ {
+ if (isset($varname)) {
+ $_var = $this->getVariable($varname, $_ptr, $search_parents, false);
+ if (is_object($_var)) {
+ return $_var->value;
+ } else {
+ return null;
+ }
+ } else {
+ $_result = array();
+ if ($_ptr === null) {
+ $_ptr = $this;
+ } while ($_ptr !== null) {
+ foreach ($_ptr->tpl_vars AS $key => $var) {
+ if (!array_key_exists($key, $_result)) {
+ $_result[$key] = $var->value;
+ }
+ }
+ // not found, try at parent
+ if ($search_parents) {
+ $_ptr = $_ptr->parent;
+ } else {
+ $_ptr = null;
+ }
+ }
+ if ($search_parents && isset(Smarty::$global_tpl_vars)) {
+ foreach (Smarty::$global_tpl_vars AS $key => $var) {
+ if (!array_key_exists($key, $_result)) {
+ $_result[$key] = $var->value;
+ }
+ }
+ }
+ return $_result;
+ }
+ }
+
+ /**
+ * clear the given assigned template variable.
+ *
+ * @param string|array $tpl_var the template variable(s) to clear
+ * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function clearAssign($tpl_var)
+ {
+ if (is_array($tpl_var)) {
+ foreach ($tpl_var as $curr_var) {
+ unset($this->tpl_vars[$curr_var]);
+ }
+ } else {
+ unset($this->tpl_vars[$tpl_var]);
+ }
+
+ return $this;
+ }
+
+ /**
+ * clear all the assigned template variables.
+ * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function clearAllAssign()
+ {
+ $this->tpl_vars = array();
+ return $this;
+ }
+
+ /**
+ * load a config file, optionally load just selected sections
+ *
+ * @param string $config_file filename
+ * @param mixed $sections array of section names, single section or null
+ * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function configLoad($config_file, $sections = null)
+ {
+ // load Config class
+ $config = new Smarty_Internal_Config($config_file, $this->smarty, $this);
+ $config->loadConfigVars($sections);
+ return $this;
+ }
+
+ /**
+ * gets the object of a Smarty variable
+ *
+ * @param string $variable the name of the Smarty variable
+ * @param object $_ptr optional pointer to data object
+ * @param boolean $search_parents search also in parent data
+ * @return object the object of the variable
+ */
+ public function getVariable($variable, $_ptr = null, $search_parents = true, $error_enable = true)
+ {
+ if ($_ptr === null) {
+ $_ptr = $this;
+ } while ($_ptr !== null) {
+ if (isset($_ptr->tpl_vars[$variable])) {
+ // found it, return it
+ return $_ptr->tpl_vars[$variable];
+ }
+ // not found, try at parent
+ if ($search_parents) {
+ $_ptr = $_ptr->parent;
+ } else {
+ $_ptr = null;
+ }
+ }
+ if (isset(Smarty::$global_tpl_vars[$variable])) {
+ // found it, return it
+ return Smarty::$global_tpl_vars[$variable];
+ }
+ if ($this->smarty->error_unassigned && $error_enable) {
+ // force a notice
+ $x = $$variable;
+ }
+ return new Undefined_Smarty_Variable;
+ }
+
+ /**
+ * gets a config variable
+ *
+ * @param string $variable the name of the config variable
+ * @return mixed the value of the config variable
+ */
+ public function getConfigVariable($variable, $error_enable = true)
+ {
+ $_ptr = $this;
+ while ($_ptr !== null) {
+ if (isset($_ptr->config_vars[$variable])) {
+ // found it, return it
+ return $_ptr->config_vars[$variable];
+ }
+ // not found, try at parent
+ $_ptr = $_ptr->parent;
+ }
+ if ($this->smarty->error_unassigned && $error_enable) {
+ // force a notice
+ $x = $$variable;
+ }
+ return null;
+ }
+
+ /**
+ * gets a stream variable
+ *
+ * @param string $variable the stream of the variable
+ * @return mixed the value of the stream variable
+ */
+ public function getStreamVariable($variable)
+ {
+ $_result = '';
+ $fp = fopen($variable, 'r+');
+ if ($fp) {
+ while (!feof($fp) && ($current_line = fgets($fp)) !== false ) {
+ $_result .= $current_line;
+ }
+ fclose($fp);
+ return $_result;
+ }
+
+ if ($this->smarty->error_unassigned) {
+ throw new SmartyException('Undefined stream variable "' . $variable . '"');
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Returns a single or all config variables
+ *
+ * @param string $varname variable name or null
+ * @return string variable value or or array of variables
+ */
+ public function getConfigVars($varname = null, $search_parents = true)
+ {
+ $_ptr = $this;
+ $var_array = array();
+ while ($_ptr !== null) {
+ if (isset($varname)) {
+ if (isset($_ptr->config_vars[$varname])) {
+ return $_ptr->config_vars[$varname];
+ }
+ } else {
+ $var_array = array_merge($_ptr->config_vars, $var_array);
+ }
+ // not found, try at parent
+ if ($search_parents) {
+ $_ptr = $_ptr->parent;
+ } else {
+ $_ptr = null;
+ }
+ }
+ if (isset($varname)) {
+ return '';
+ } else {
+ return $var_array;
+ }
+ }
+
+ /**
+ * Deassigns a single or all config variables
+ *
+ * @param string $varname variable name or null
+ * @return Smarty_Internal_Data current Smarty_Internal_Data (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function clearConfig($varname = null)
+ {
+ if (isset($varname)) {
+ unset($this->config_vars[$varname]);
+ } else {
+ $this->config_vars = array();
+ }
+ return $this;
+ }
+
+}
+
+/**
+ * class for the Smarty data object
+ *
+ * The Smarty data object will hold Smarty variables in the current scope
+ *
+ * @package Smarty
+ * @subpackage Template
+ */
+class Smarty_Data extends Smarty_Internal_Data {
+
+ /**
+ * Smarty object
+ *
+ * @var Smarty
+ */
+ public $smarty = null;
+
+ /**
+ * create Smarty data object
+ *
+ * @param Smarty|array $_parent parent template
+ * @param Smarty $smarty global smarty instance
+ */
+ public function __construct ($_parent = null, $smarty = null)
+ {
+ $this->smarty = $smarty;
+ if (is_object($_parent)) {
+ // when object set up back pointer
+ $this->parent = $_parent;
+ } elseif (is_array($_parent)) {
+ // set up variable values
+ foreach ($_parent as $_key => $_val) {
+ $this->tpl_vars[$_key] = new Smarty_variable($_val);
+ }
+ } elseif ($_parent != null) {
+ throw new SmartyException("Wrong type for template variables");
+ }
+ }
+
+}
+
+/**
+ * class for the Smarty variable object
+ *
+ * This class defines the Smarty variable object
+ *
+ * @package Smarty
+ * @subpackage Template
+ */
+class Smarty_Variable {
+
+ /**
+ * template variable
+ *
+ * @var mixed
+ */
+ public $value = null;
+ /**
+ * if true any output of this variable will be not cached
+ *
+ * @var boolean
+ */
+ public $nocache = false;
+ /**
+ * the scope the variable will have (local,parent or root)
+ *
+ * @var int
+ */
+ public $scope = Smarty::SCOPE_LOCAL;
+
+ /**
+ * create Smarty variable object
+ *
+ * @param mixed $value the value to assign
+ * @param boolean $nocache if true any output of this variable will be not cached
+ * @param int $scope the scope the variable will have (local,parent or root)
+ */
+ public function __construct($value = null, $nocache = false, $scope = Smarty::SCOPE_LOCAL)
+ {
+ $this->value = $value;
+ $this->nocache = $nocache;
+ $this->scope = $scope;
+ }
+
+ /**
+ * <<magic>> String conversion
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return (string) $this->value;
+ }
+
+}
+
+/**
+ * class for undefined variable object
+ *
+ * This class defines an object for undefined variable handling
+ *
+ * @package Smarty
+ * @subpackage Template
+ */
+class Undefined_Smarty_Variable {
+
+ /**
+ * Returns FALSE for 'nocache' and NULL otherwise.
+ *
+ * @param string $name
+ * @return bool
+ */
+ public function __get($name)
+ {
+ if ($name == 'nocache') {
+ return false;
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Always returns an empty string.
+ *
+ * @return string
+ */
+ public function __toString()
+ {
+ return "";
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_debug.php b/library/Smarty/libs/sysplugins/smarty_internal_debug.php
new file mode 100644
index 000000000..2aea13f30
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_debug.php
@@ -0,0 +1,206 @@
+<?php
+/**
+ * Smarty Internal Plugin Debug
+ *
+ * Class to collect data for the Smarty Debugging Consol
+ *
+ * @package Smarty
+ * @subpackage Debug
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Debug Class
+ *
+ * @package Smarty
+ * @subpackage Debug
+ */
+class Smarty_Internal_Debug extends Smarty_Internal_Data {
+
+ /**
+ * template data
+ *
+ * @var array
+ */
+ public static $template_data = array();
+
+ /**
+ * Start logging of compile time
+ *
+ * @param object $template
+ */
+ public static function start_compile($template)
+ {
+ $key = self::get_key($template);
+ self::$template_data[$key]['start_time'] = microtime(true);
+ }
+
+ /**
+ * End logging of compile time
+ *
+ * @param object $template
+ */
+ public static function end_compile($template)
+ {
+ $key = self::get_key($template);
+ self::$template_data[$key]['compile_time'] += microtime(true) - self::$template_data[$key]['start_time'];
+ }
+
+ /**
+ * Start logging of render time
+ *
+ * @param object $template
+ */
+ public static function start_render($template)
+ {
+ $key = self::get_key($template);
+ self::$template_data[$key]['start_time'] = microtime(true);
+ }
+
+ /**
+ * End logging of compile time
+ *
+ * @param object $template
+ */
+ public static function end_render($template)
+ {
+ $key = self::get_key($template);
+ self::$template_data[$key]['render_time'] += microtime(true) - self::$template_data[$key]['start_time'];
+ }
+
+ /**
+ * Start logging of cache time
+ *
+ * @param object $template cached template
+ */
+ public static function start_cache($template)
+ {
+ $key = self::get_key($template);
+ self::$template_data[$key]['start_time'] = microtime(true);
+ }
+
+ /**
+ * End logging of cache time
+ *
+ * @param object $template cached template
+ */
+ public static function end_cache($template)
+ {
+ $key = self::get_key($template);
+ self::$template_data[$key]['cache_time'] += microtime(true) - self::$template_data[$key]['start_time'];
+ }
+
+ /**
+ * Opens a window for the Smarty Debugging Consol and display the data
+ *
+ * @param Smarty_Internal_Template|Smarty $obj object to debug
+ */
+ public static function display_debug($obj)
+ {
+ // prepare information of assigned variables
+ $ptr = self::get_debug_vars($obj);
+ if ($obj instanceof Smarty) {
+ $smarty = clone $obj;
+ } else {
+ $smarty = clone $obj->smarty;
+ }
+ $_assigned_vars = $ptr->tpl_vars;
+ ksort($_assigned_vars);
+ $_config_vars = $ptr->config_vars;
+ ksort($_config_vars);
+ $smarty->registered_filters = array();
+ $smarty->autoload_filters = array();
+ $smarty->default_modifiers = array();
+ $smarty->force_compile = false;
+ $smarty->left_delimiter = '{';
+ $smarty->right_delimiter = '}';
+ $smarty->debugging = false;
+ $smarty->force_compile = false;
+ $_template = new Smarty_Internal_Template($smarty->debug_tpl, $smarty);
+ $_template->caching = false;
+ $_template->disableSecurity();
+ $_template->cache_id = null;
+ $_template->compile_id = null;
+ if ($obj instanceof Smarty_Internal_Template) {
+ $_template->assign('template_name', $obj->source->type . ':' . $obj->source->name);
+ }
+ if ($obj instanceof Smarty) {
+ $_template->assign('template_data', self::$template_data);
+ } else {
+ $_template->assign('template_data', null);
+ }
+ $_template->assign('assigned_vars', $_assigned_vars);
+ $_template->assign('config_vars', $_config_vars);
+ $_template->assign('execution_time', microtime(true) - $smarty->start_time);
+ echo $_template->fetch();
+ }
+
+ /**
+ * Recursively gets variables from all template/data scopes
+ *
+ * @param Smarty_Internal_Template|Smarty_Data $obj object to debug
+ * @return StdClass
+ */
+ public static function get_debug_vars($obj)
+ {
+ $config_vars = $obj->config_vars;
+ $tpl_vars = array();
+ foreach ($obj->tpl_vars as $key => $var) {
+ $tpl_vars[$key] = clone $var;
+ if ($obj instanceof Smarty_Internal_Template) {
+ $tpl_vars[$key]->scope = $obj->source->type . ':' . $obj->source->name;
+ } elseif ($obj instanceof Smarty_Data) {
+ $tpl_vars[$key]->scope = 'Data object';
+ } else {
+ $tpl_vars[$key]->scope = 'Smarty root';
+ }
+ }
+
+ if (isset($obj->parent)) {
+ $parent = self::get_debug_vars($obj->parent);
+ $tpl_vars = array_merge($parent->tpl_vars, $tpl_vars);
+ $config_vars = array_merge($parent->config_vars, $config_vars);
+ } else {
+ foreach (Smarty::$global_tpl_vars as $name => $var) {
+ if (!array_key_exists($name, $tpl_vars)) {
+ $clone = clone $var;
+ $clone->scope = 'Global';
+ $tpl_vars[$name] = $clone;
+ }
+ }
+ }
+ return (object) array('tpl_vars' => $tpl_vars, 'config_vars' => $config_vars);
+ }
+
+ /**
+ * Return key into $template_data for template
+ *
+ * @param object $template template object
+ * @return string key into $template_data
+ */
+ private static function get_key($template)
+ {
+ static $_is_stringy = array('string' => true, 'eval' => true);
+ // calculate Uid if not already done
+ if ($template->source->uid == '') {
+ $template->source->filepath;
+ }
+ $key = $template->source->uid;
+ if (isset(self::$template_data[$key])) {
+ return $key;
+ } else {
+ if (isset($_is_stringy[$template->source->type])) {
+ self::$template_data[$key]['name'] = '\''.substr($template->source->name,0,25).'...\'';
+ } else {
+ self::$template_data[$key]['name'] = $template->source->filepath;
+ }
+ self::$template_data[$key]['compile_time'] = 0;
+ self::$template_data[$key]['render_time'] = 0;
+ self::$template_data[$key]['cache_time'] = 0;
+ return $key;
+ }
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_filter_handler.php b/library/Smarty/libs/sysplugins/smarty_internal_filter_handler.php
new file mode 100644
index 000000000..c9370e1ac
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_filter_handler.php
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Smarty Internal Plugin Filter Handler
+ *
+ * Smarty filter handler class
+ *
+ * @package Smarty
+ * @subpackage PluginsInternal
+ * @author Uwe Tews
+ */
+
+/**
+ * Class for filter processing
+ *
+ * @package Smarty
+ * @subpackage PluginsInternal
+ */
+class Smarty_Internal_Filter_Handler {
+
+ /**
+ * Run filters over content
+ *
+ * The filters will be lazy loaded if required
+ * class name format: Smarty_FilterType_FilterName
+ * plugin filename format: filtertype.filtername.php
+ * Smarty2 filter plugins could be used
+ *
+ * @param string $type the type of filter ('pre','post','output') which shall run
+ * @param string $content the content which shall be processed by the filters
+ * @param Smarty_Internal_Template $template template object
+ * @return string the filtered content
+ */
+ public static function runFilter($type, $content, Smarty_Internal_Template $template)
+ {
+ $output = $content;
+ // loop over autoload filters of specified type
+ if (!empty($template->smarty->autoload_filters[$type])) {
+ foreach ((array)$template->smarty->autoload_filters[$type] as $name) {
+ $plugin_name = "Smarty_{$type}filter_{$name}";
+ if ($template->smarty->loadPlugin($plugin_name)) {
+ if (function_exists($plugin_name)) {
+ // use loaded Smarty2 style plugin
+ $output = $plugin_name($output, $template);
+ } elseif (class_exists($plugin_name, false)) {
+ // loaded class of filter plugin
+ $output = call_user_func(array($plugin_name, 'execute'), $output, $template);
+ }
+ } else {
+ // nothing found, throw exception
+ throw new SmartyException("Unable to load filter {$plugin_name}");
+ }
+ }
+ }
+ // loop over registerd filters of specified type
+ if (!empty($template->smarty->registered_filters[$type])) {
+ foreach ($template->smarty->registered_filters[$type] as $key => $name) {
+ if (is_array($template->smarty->registered_filters[$type][$key])) {
+ $output = call_user_func($template->smarty->registered_filters[$type][$key], $output, $template);
+ } else {
+ $output = $template->smarty->registered_filters[$type][$key]($output, $template);
+ }
+ }
+ }
+ // return filtered output
+ return $output;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_function_call_handler.php b/library/Smarty/libs/sysplugins/smarty_internal_function_call_handler.php
new file mode 100644
index 000000000..010d63592
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_function_call_handler.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Smarty Internal Plugin Function Call Handler
+ *
+ * @package Smarty
+ * @subpackage PluginsInternal
+ * @author Uwe Tews
+ */
+
+/**
+ * This class does call function defined with the {function} tag
+ *
+ * @package Smarty
+ * @subpackage PluginsInternal
+ */
+class Smarty_Internal_Function_Call_Handler {
+
+ /**
+ * This function handles calls to template functions defined by {function}
+ * It does create a PHP function at the first call
+ *
+ * @param string $_name template function name
+ * @param Smarty_Internal_Template $_template template object
+ * @param array $_params Smarty variables passed as call parameter
+ * @param string $_hash nocache hash value
+ * @param bool $_nocache nocache flag
+ */
+ public static function call($_name, Smarty_Internal_Template $_template, $_params, $_hash, $_nocache)
+ {
+ if ($_nocache) {
+ $_function = "smarty_template_function_{$_name}_nocache";
+ } else {
+ $_function = "smarty_template_function_{$_hash}_{$_name}";
+ }
+ if (!is_callable($_function)) {
+ $_code = "function {$_function}(\$_smarty_tpl,\$params) {
+ \$saved_tpl_vars = \$_smarty_tpl->tpl_vars;
+ foreach (\$_smarty_tpl->smarty->template_functions['{$_name}']['parameter'] as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);};
+ foreach (\$params as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);}?>";
+ if ($_nocache) {
+ $_code .= preg_replace(array("!<\?php echo \\'/\*%%SmartyNocache:{$_template->smarty->template_functions[$_name]['nocache_hash']}%%\*/|/\*/%%SmartyNocache:{$_template->smarty->template_functions[$_name]['nocache_hash']}%%\*/\\';\?>!",
+ "!\\\'!"), array('', "'"), $_template->smarty->template_functions[$_name]['compiled']);
+ $_template->smarty->template_functions[$_name]['called_nocache'] = true;
+ } else {
+ $_code .= preg_replace("/{$_template->smarty->template_functions[$_name]['nocache_hash']}/", $_template->properties['nocache_hash'], $_template->smarty->template_functions[$_name]['compiled']);
+ }
+ $_code .= "<?php \$_smarty_tpl->tpl_vars = \$saved_tpl_vars;}";
+ eval($_code);
+ }
+ $_function($_template, $_params);
+ }
+
+}
+
+?>
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_get_include_path.php b/library/Smarty/libs/sysplugins/smarty_internal_get_include_path.php
new file mode 100644
index 000000000..518c406aa
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_get_include_path.php
@@ -0,0 +1,48 @@
+<?php
+/**
+ * Smarty read include path plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsInternal
+ * @author Monte Ohrt
+ */
+
+/**
+ * Smarty Internal Read Include Path Class
+ *
+ * @package Smarty
+ * @subpackage PluginsInternal
+ */
+class Smarty_Internal_Get_Include_Path {
+
+ /**
+ * Return full file path from PHP include_path
+ *
+ * @param string $filepath filepath
+ * @return string|boolean full filepath or false
+ */
+ public static function getIncludePath($filepath)
+ {
+ static $_include_path = null;
+
+ if (function_exists('stream_resolve_include_path')) {
+ // available since PHP 5.3.2
+ return stream_resolve_include_path($filepath);
+ }
+
+ if ($_include_path === null) {
+ $_include_path = explode(PATH_SEPARATOR, get_include_path());
+ }
+
+ foreach ($_include_path as $_path) {
+ if (file_exists($_path . DS . $filepath)) {
+ return $_path . DS . $filepath;
+ }
+ }
+
+ return false;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_nocache_insert.php b/library/Smarty/libs/sysplugins/smarty_internal_nocache_insert.php
new file mode 100644
index 000000000..faae49af6
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_nocache_insert.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * Smarty Internal Plugin Nocache Insert
+ *
+ * Compiles the {insert} tag into the cache file
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Smarty Internal Plugin Compile Insert Class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_Nocache_Insert {
+
+ /**
+ * Compiles code for the {insert} tag into cache file
+ *
+ * @param string $_function insert function name
+ * @param array $_attr array with parameter
+ * @param Smarty_Internal_Template $_template template object
+ * @param string $_script script name to load or 'null'
+ * @param string $_assign optional variable name
+ * @return string compiled code
+ */
+ public static function compile($_function, $_attr, $_template, $_script, $_assign = null)
+ {
+ $_output = '<?php ';
+ if ($_script != 'null') {
+ // script which must be included
+ // code for script file loading
+ $_output .= "require_once '{$_script}';";
+ }
+ // call insert
+ if (isset($_assign)) {
+ $_output .= "\$_smarty_tpl->assign('{$_assign}' , {$_function} (" . var_export($_attr, true) . ",\$_smarty_tpl), true);?>";
+ } else {
+ $_output .= "echo {$_function}(" . var_export($_attr, true) . ",\$_smarty_tpl);?>";
+ }
+ $_tpl = $_template;
+ while ($_tpl->parent instanceof Smarty_Internal_Template) {
+ $_tpl = $_tpl->parent;
+ }
+ return "/*%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/" . $_output . "/*/%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/";
+ }
+
+}
+
+?>
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_parsetree.php b/library/Smarty/libs/sysplugins/smarty_internal_parsetree.php
new file mode 100644
index 000000000..c9fb1f762
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_parsetree.php
@@ -0,0 +1,395 @@
+<?php
+/**
+ * Smarty Internal Plugin Templateparser Parsetrees
+ *
+ * These are classes to build parsetrees in the template parser
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Thue Kristensen
+ * @author Uwe Tews
+ */
+
+/**
+ * @package Smarty
+ * @subpackage Compiler
+ * @ignore
+ */
+abstract class _smarty_parsetree {
+
+ /**
+ * Parser object
+ * @var object
+ */
+ public $parser;
+ /**
+ * Buffer content
+ * @var mixed
+ */
+ public $data;
+
+ /**
+ * Return buffer
+ *
+ * @return string buffer content
+ */
+ abstract public function to_smarty_php();
+
+}
+
+/**
+ * A complete smarty tag.
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @ignore
+ */
+class _smarty_tag extends _smarty_parsetree {
+
+ /**
+ * Saved block nesting level
+ * @var int
+ */
+ public $saved_block_nesting;
+
+ /**
+ * Create parse tree buffer for Smarty tag
+ *
+ * @param object $parser parser object
+ * @param string $data content
+ */
+ public function __construct($parser, $data)
+ {
+ $this->parser = $parser;
+ $this->data = $data;
+ $this->saved_block_nesting = $parser->block_nesting_level;
+ }
+
+ /**
+ * Return buffer content
+ *
+ * @return string content
+ */
+ public function to_smarty_php()
+ {
+ return $this->data;
+ }
+
+ /**
+ * Return complied code that loads the evaluated outout of buffer content into a temporary variable
+ *
+ * @return string template code
+ */
+ public function assign_to_var()
+ {
+ $var = sprintf('$_tmp%d', ++$this->parser->prefix_number);
+ $this->parser->compiler->prefix_code[] = sprintf('<?php ob_start();?>%s<?php %s=ob_get_clean();?>', $this->data, $var);
+ return $var;
+ }
+
+}
+
+/**
+ * Code fragment inside a tag.
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @ignore
+ */
+class _smarty_code extends _smarty_parsetree {
+
+
+ /**
+ * Create parse tree buffer for code fragment
+ *
+ * @param object $parser parser object
+ * @param string $data content
+ */
+ public function __construct($parser, $data)
+ {
+ $this->parser = $parser;
+ $this->data = $data;
+ }
+
+ /**
+ * Return buffer content in parentheses
+ *
+ * @return string content
+ */
+ public function to_smarty_php()
+ {
+ return sprintf("(%s)", $this->data);
+ }
+
+}
+
+/**
+ * Double quoted string inside a tag.
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @ignore
+ */
+class _smarty_doublequoted extends _smarty_parsetree {
+
+ /**
+ * Create parse tree buffer for double quoted string subtrees
+ *
+ * @param object $parser parser object
+ * @param _smarty_parsetree $subtree parsetree buffer
+ */
+ public function __construct($parser, _smarty_parsetree $subtree)
+ {
+ $this->parser = $parser;
+ $this->subtrees[] = $subtree;
+ if ($subtree instanceof _smarty_tag) {
+ $this->parser->block_nesting_level = count($this->parser->compiler->_tag_stack);
+ }
+ }
+
+ /**
+ * Append buffer to subtree
+ *
+ * @param _smarty_parsetree $subtree parsetree buffer
+ */
+ public function append_subtree(_smarty_parsetree $subtree)
+ {
+ $last_subtree = count($this->subtrees) - 1;
+ if ($last_subtree >= 0 && $this->subtrees[$last_subtree] instanceof _smarty_tag && $this->subtrees[$last_subtree]->saved_block_nesting < $this->parser->block_nesting_level) {
+ if ($subtree instanceof _smarty_code) {
+ $this->subtrees[$last_subtree]->data .= '<?php echo ' . $subtree->data . ';?>';
+ } elseif ($subtree instanceof _smarty_dq_content) {
+ $this->subtrees[$last_subtree]->data .= '<?php echo "' . $subtree->data . '";?>';
+ } else {
+ $this->subtrees[$last_subtree]->data .= $subtree->data;
+ }
+ } else {
+ $this->subtrees[] = $subtree;
+ }
+ if ($subtree instanceof _smarty_tag) {
+ $this->parser->block_nesting_level = count($this->parser->compiler->_tag_stack);
+ }
+ }
+
+ /**
+ * Merge subtree buffer content together
+ *
+ * @return string compiled template code
+ */
+ public function to_smarty_php()
+ {
+ $code = '';
+ foreach ($this->subtrees as $subtree) {
+ if ($code !== "") {
+ $code .= ".";
+ }
+ if ($subtree instanceof _smarty_tag) {
+ $more_php = $subtree->assign_to_var();
+ } else {
+ $more_php = $subtree->to_smarty_php();
+ }
+
+ $code .= $more_php;
+
+ if (!$subtree instanceof _smarty_dq_content) {
+ $this->parser->compiler->has_variable_string = true;
+ }
+ }
+ return $code;
+ }
+
+}
+
+/**
+ * Raw chars as part of a double quoted string.
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @ignore
+ */
+class _smarty_dq_content extends _smarty_parsetree {
+
+
+ /**
+ * Create parse tree buffer with string content
+ *
+ * @param object $parser parser object
+ * @param string $data string section
+ */
+ public function __construct($parser, $data)
+ {
+ $this->parser = $parser;
+ $this->data = $data;
+ }
+
+ /**
+ * Return content as double quoted string
+ *
+ * @return string doubled quoted string
+ */
+ public function to_smarty_php()
+ {
+ return '"' . $this->data . '"';
+ }
+
+}
+
+/**
+ * Template element
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @ignore
+ */
+class _smarty_template_buffer extends _smarty_parsetree {
+
+ /**
+ * Array of template elements
+ *
+ * @var array
+ */
+ public $subtrees = Array();
+
+ /**
+ * Create root of parse tree for template elements
+ *
+ * @param object $parser parse object
+ */
+ public function __construct($parser)
+ {
+ $this->parser = $parser;
+ }
+
+ /**
+ * Append buffer to subtree
+ *
+ * @param _smarty_parsetree $subtree
+ */
+ public function append_subtree(_smarty_parsetree $subtree)
+ {
+ $this->subtrees[] = $subtree;
+ }
+
+ /**
+ * Sanitize and merge subtree buffers together
+ *
+ * @return string template code content
+ */
+ public function to_smarty_php()
+ {
+ $code = '';
+ for ($key = 0, $cnt = count($this->subtrees); $key < $cnt; $key++) {
+ if ($key + 2 < $cnt) {
+ if ($this->subtrees[$key] instanceof _smarty_linebreak && $this->subtrees[$key + 1] instanceof _smarty_tag && $this->subtrees[$key + 1]->data == '' && $this->subtrees[$key + 2] instanceof _smarty_linebreak) {
+ $key = $key + 1;
+ continue;
+ }
+ if (substr($this->subtrees[$key]->data, -1) == '<' && $this->subtrees[$key + 1]->data == '' && substr($this->subtrees[$key + 2]->data, -1) == '?') {
+ $key = $key + 2;
+ continue;
+ }
+ }
+ if (substr($code, -1) == '<') {
+ $subtree = $this->subtrees[$key]->to_smarty_php();
+ if (substr($subtree, 0, 1) == '?') {
+ $code = substr($code, 0, strlen($code) - 1) . '<<?php ?>?' . substr($subtree, 1);
+ } elseif ($this->parser->asp_tags && substr($subtree, 0, 1) == '%') {
+ $code = substr($code, 0, strlen($code) - 1) . '<<?php ?>%' . substr($subtree, 1);
+ } else {
+ $code .= $subtree;
+ }
+ continue;
+ }
+ if ($this->parser->asp_tags && substr($code, -1) == '%') {
+ $subtree = $this->subtrees[$key]->to_smarty_php();
+ if (substr($subtree, 0, 1) == '>') {
+ $code = substr($code, 0, strlen($code) - 1) . '%<?php ?>>' . substr($subtree, 1);
+ } else {
+ $code .= $subtree;
+ }
+ continue;
+ }
+ if (substr($code, -1) == '?') {
+ $subtree = $this->subtrees[$key]->to_smarty_php();
+ if (substr($subtree, 0, 1) == '>') {
+ $code = substr($code, 0, strlen($code) - 1) . '?<?php ?>>' . substr($subtree, 1);
+ } else {
+ $code .= $subtree;
+ }
+ continue;
+ }
+ $code .= $this->subtrees[$key]->to_smarty_php();
+ }
+ return $code;
+ }
+
+}
+
+/**
+ * template text
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @ignore
+ */
+class _smarty_text extends _smarty_parsetree {
+
+
+ /**
+ * Create template text buffer
+ *
+ * @param object $parser parser object
+ * @param string $data text
+ */
+ public function __construct($parser, $data)
+ {
+ $this->parser = $parser;
+ $this->data = $data;
+ }
+
+ /**
+ * Return buffer content
+ *
+ * @return strint text
+ */
+ public function to_smarty_php()
+ {
+ return $this->data;
+ }
+
+}
+
+/**
+ * template linebreaks
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @ignore
+ */
+class _smarty_linebreak extends _smarty_parsetree {
+
+ /**
+ * Create buffer with linebreak content
+ *
+ * @param object $parser parser object
+ * @param string $data linebreak string
+ */
+ public function __construct($parser, $data)
+ {
+ $this->parser = $parser;
+ $this->data = $data;
+ }
+
+ /**
+ * Return linebrak
+ *
+ * @return string linebreak
+ */
+ public function to_smarty_php()
+ {
+ return $this->data;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_resource_eval.php b/library/Smarty/libs/sysplugins/smarty_internal_resource_eval.php
new file mode 100644
index 000000000..cf2ec3e1c
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_resource_eval.php
@@ -0,0 +1,94 @@
+<?php
+/**
+ * Smarty Internal Plugin Resource Eval
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Uwe Tews
+ * @author Rodney Rehm
+ */
+
+/**
+ * Smarty Internal Plugin Resource Eval
+ *
+ * Implements the strings as resource for Smarty template
+ *
+ * {@internal unlike string-resources the compiled state of eval-resources is NOT saved for subsequent access}}
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ */
+class Smarty_Internal_Resource_Eval extends Smarty_Resource_Recompiled {
+
+ /**
+ * populate Source Object with meta data from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ * @param Smarty_Internal_Template $_template template object
+ * @return void
+ */
+ public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
+ {
+ $source->uid = $source->filepath = sha1($source->name);
+ $source->timestamp = false;
+ $source->exists = true;
+ }
+
+ /**
+ * Load template's source from $resource_name into current template object
+ *
+ * @uses decode() to decode base64 and urlencoded template_resources
+ * @param Smarty_Template_Source $source source object
+ * @return string template source
+ */
+ public function getContent(Smarty_Template_Source $source)
+ {
+ return $this->decode($source->name);
+ }
+
+ /**
+ * decode base64 and urlencode
+ *
+ * @param string $string template_resource to decode
+ * @return string decoded template_resource
+ */
+ protected function decode($string)
+ {
+ // decode if specified
+ if (($pos = strpos($string, ':')) !== false) {
+ if (!strncmp($string, 'base64', 6)) {
+ return base64_decode(substr($string, 7));
+ } elseif (!strncmp($string, 'urlencode', 9)) {
+ return urldecode(substr($string, 10));
+ }
+ }
+
+ return $string;
+ }
+
+ /**
+ * modify resource_name according to resource handlers specifications
+ *
+ * @param Smarty $smarty Smarty instance
+ * @param string $resource_name resource_name to make unique
+ * @return string unique resource name
+ */
+ protected function buildUniqueResourceName(Smarty $smarty, $resource_name)
+ {
+ return get_class($this) . '#' .$this->decode($resource_name);
+ }
+
+ /**
+ * Determine basename for compiled filename
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return string resource's basename
+ */
+ protected function getBasename(Smarty_Template_Source $source)
+ {
+ return '';
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_resource_extends.php b/library/Smarty/libs/sysplugins/smarty_internal_resource_extends.php
new file mode 100644
index 000000000..9481d9922
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_resource_extends.php
@@ -0,0 +1,157 @@
+<?php
+/**
+* Smarty Internal Plugin Resource Extends
+*
+* @package Smarty
+* @subpackage TemplateResources
+* @author Uwe Tews
+* @author Rodney Rehm
+*/
+
+/**
+* Smarty Internal Plugin Resource Extends
+*
+* Implements the file system as resource for Smarty which {extend}s a chain of template files templates
+*
+* @package Smarty
+* @subpackage TemplateResources
+*/
+class Smarty_Internal_Resource_Extends extends Smarty_Resource {
+
+ /**
+ * mbstring.overload flag
+ *
+ * @var int
+ */
+ public $mbstring_overload = 0;
+
+ /**
+ * populate Source Object with meta data from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ * @param Smarty_Internal_Template $_template template object
+ */
+ public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
+ {
+ $uid = '';
+ $sources = array();
+ $components = explode('|', $source->name);
+ $exists = true;
+ foreach ($components as $component) {
+ $s = Smarty_Resource::source(null, $source->smarty, $component);
+ if ($s->type == 'php') {
+ throw new SmartyException("Resource type {$s->type} cannot be used with the extends resource type");
+ }
+ $sources[$s->uid] = $s;
+ $uid .= $s->filepath;
+ if ($_template && $_template->smarty->compile_check) {
+ $exists = $exists && $s->exists;
+ }
+ }
+ $source->components = $sources;
+ $source->filepath = $s->filepath;
+ $source->uid = sha1($uid);
+ if ($_template && $_template->smarty->compile_check) {
+ $source->timestamp = $s->timestamp;
+ $source->exists = $exists;
+ }
+ // need the template at getContent()
+ $source->template = $_template;
+ }
+
+ /**
+ * populate Source Object with timestamp and exists from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ */
+ public function populateTimestamp(Smarty_Template_Source $source)
+ {
+ $source->exists = true;
+ foreach ($source->components as $s) {
+ $source->exists = $source->exists && $s->exists;
+ }
+ $source->timestamp = $s->timestamp;
+ }
+
+ /**
+ * Load template's source from files into current template object
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return string template source
+ * @throws SmartyException if source cannot be loaded
+ */
+ public function getContent(Smarty_Template_Source $source)
+ {
+ if (!$source->exists) {
+ throw new SmartyException("Unable to read template {$source->type} '{$source->name}'");
+ }
+
+ $this->mbstring_overload = ini_get('mbstring.func_overload') & 2;
+ $_rdl = preg_quote($source->smarty->right_delimiter);
+ $_ldl = preg_quote($source->smarty->left_delimiter);
+ $_components = array_reverse($source->components);
+ $_first = reset($_components);
+ $_last = end($_components);
+
+ foreach ($_components as $_component) {
+ // register dependency
+ if ($_component != $_first) {
+ $source->template->properties['file_dependency'][$_component->uid] = array($_component->filepath, $_component->timestamp, $_component->type);
+ }
+
+ // read content
+ $source->filepath = $_component->filepath;
+ $_content = $_component->content;
+
+ // extend sources
+ if ($_component != $_last) {
+ if (preg_match_all("!({$_ldl}block\s(.+?){$_rdl})!", $_content, $_open) !=
+ preg_match_all("!({$_ldl}/block{$_rdl})!", $_content, $_close)) {
+ throw new SmartyException("unmatched {block} {/block} pairs in template {$_component->type} '{$_component->name}'");
+ }
+ preg_match_all("!{$_ldl}block\s(.+?){$_rdl}|{$_ldl}/block{$_rdl}|{$_ldl}\*([\S\s]*?)\*{$_rdl}!", $_content, $_result, PREG_OFFSET_CAPTURE);
+ $_result_count = count($_result[0]);
+ $_start = 0;
+ while ($_start+1 < $_result_count) {
+ $_end = 0;
+ $_level = 1;
+ if (($this->mbstring_overload ? mb_substr($_result[0][$_start][0],0,mb_strlen($source->smarty->left_delimiter,'latin1')+1, 'latin1') : substr($_result[0][$_start][0],0,strlen($source->smarty->left_delimiter)+1)) == $source->smarty->left_delimiter.'*') {
+ $_start++;
+ continue;
+ }
+ while ($_level != 0) {
+ $_end++;
+ if (($this->mbstring_overload ? mb_substr($_result[0][$_start + $_end][0],0,mb_strlen($source->smarty->left_delimiter,'latin1')+1, 'latin1') : substr($_result[0][$_start + $_end][0],0,strlen($source->smarty->left_delimiter)+1)) == $source->smarty->left_delimiter.'*') {
+ continue;
+ }
+ if (!strpos($_result[0][$_start + $_end][0], '/')) {
+ $_level++;
+ } else {
+ $_level--;
+ }
+ }
+ $_block_content = str_replace($source->smarty->left_delimiter . '$smarty.block.parent' . $source->smarty->right_delimiter, '%%%%SMARTY_PARENT%%%%',
+ ($this->mbstring_overload ? mb_substr($_content, $_result[0][$_start][1] + mb_strlen($_result[0][$_start][0], 'latin1'), $_result[0][$_start + $_end][1] - $_result[0][$_start][1] - + mb_strlen($_result[0][$_start][0], 'latin1'), 'latin1') : substr($_content, $_result[0][$_start][1] + strlen($_result[0][$_start][0]), $_result[0][$_start + $_end][1] - $_result[0][$_start][1] - + strlen($_result[0][$_start][0]))));
+ Smarty_Internal_Compile_Block::saveBlockData($_block_content, $_result[0][$_start][0], $source->template, $_component->filepath);
+ $_start = $_start + $_end + 1;
+ }
+ } else {
+ return $_content;
+ }
+ }
+ }
+
+ /**
+ * Determine basename for compiled filename
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return string resource's basename
+ */
+ public function getBasename(Smarty_Template_Source $source)
+ {
+ return str_replace(':', '.', basename($source->filepath));
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_resource_file.php b/library/Smarty/libs/sysplugins/smarty_internal_resource_file.php
new file mode 100644
index 000000000..48b391d20
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_resource_file.php
@@ -0,0 +1,90 @@
+<?php
+/**
+ * Smarty Internal Plugin Resource File
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Uwe Tews
+ * @author Rodney Rehm
+ */
+
+/**
+ * Smarty Internal Plugin Resource File
+ *
+ * Implements the file system as resource for Smarty templates
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ */
+class Smarty_Internal_Resource_File extends Smarty_Resource {
+
+ /**
+ * populate Source Object with meta data from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ * @param Smarty_Internal_Template $_template template object
+ */
+ public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
+ {
+ $source->filepath = $this->buildFilepath($source, $_template);
+
+ if ($source->filepath !== false) {
+ if (is_object($source->smarty->security_policy)) {
+ $source->smarty->security_policy->isTrustedResourceDir($source->filepath);
+ }
+
+ $source->uid = sha1($source->filepath);
+ if ($source->smarty->compile_check && !isset($source->timestamp)) {
+ $source->timestamp = @filemtime($source->filepath);
+ $source->exists = !!$source->timestamp;
+ }
+ }
+ }
+
+ /**
+ * populate Source Object with timestamp and exists from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ */
+ public function populateTimestamp(Smarty_Template_Source $source)
+ {
+ $source->timestamp = @filemtime($source->filepath);
+ $source->exists = !!$source->timestamp;
+ }
+
+ /**
+ * Load template's source from file into current template object
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return string template source
+ * @throws SmartyException if source cannot be loaded
+ */
+ public function getContent(Smarty_Template_Source $source)
+ {
+ if ($source->timestamp) {
+ return file_get_contents($source->filepath);
+ }
+ if ($source instanceof Smarty_Config_Source) {
+ throw new SmartyException("Unable to read config {$source->type} '{$source->name}'");
+ }
+ throw new SmartyException("Unable to read template {$source->type} '{$source->name}'");
+ }
+
+ /**
+ * Determine basename for compiled filename
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return string resource's basename
+ */
+ public function getBasename(Smarty_Template_Source $source)
+ {
+ $_file = $source->name;
+ if (($_pos = strpos($_file, ']')) !== false) {
+ $_file = substr($_file, $_pos + 1);
+ }
+ return basename($_file);
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_resource_php.php b/library/Smarty/libs/sysplugins/smarty_internal_resource_php.php
new file mode 100644
index 000000000..7cd8baeec
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_resource_php.php
@@ -0,0 +1,114 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Resource PHP
+ *
+ * Implements the file system as resource for PHP templates
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Uwe Tews
+ * @author Rodney Rehm
+ */
+class Smarty_Internal_Resource_PHP extends Smarty_Resource_Uncompiled {
+ /**
+ * container for short_open_tag directive's value before executing PHP templates
+ * @var string
+ */
+ protected $short_open_tag;
+
+ /**
+ * Create a new PHP Resource
+ *
+ */
+ public function __construct()
+ {
+ $this->short_open_tag = ini_get( 'short_open_tag' );
+ }
+
+ /**
+ * populate Source Object with meta data from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ * @param Smarty_Internal_Template $_template template object
+ * @return void
+ */
+ public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
+ {
+ $source->filepath = $this->buildFilepath($source, $_template);
+
+ if ($source->filepath !== false) {
+ if (is_object($source->smarty->security_policy)) {
+ $source->smarty->security_policy->isTrustedResourceDir($source->filepath);
+ }
+
+ $source->uid = sha1($source->filepath);
+ if ($source->smarty->compile_check) {
+ $source->timestamp = @filemtime($source->filepath);
+ $source->exists = !!$source->timestamp;
+ }
+ }
+ }
+
+ /**
+ * populate Source Object with timestamp and exists from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return void
+ */
+ public function populateTimestamp(Smarty_Template_Source $source)
+ {
+ $source->timestamp = @filemtime($source->filepath);
+ $source->exists = !!$source->timestamp;
+ }
+
+ /**
+ * Load template's source from file into current template object
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return string template source
+ * @throws SmartyException if source cannot be loaded
+ */
+ public function getContent(Smarty_Template_Source $source)
+ {
+ if ($source->timestamp) {
+ return '';
+ }
+ throw new SmartyException("Unable to read template {$source->type} '{$source->name}'");
+ }
+
+ /**
+ * Render and output the template (without using the compiler)
+ *
+ * @param Smarty_Template_Source $source source object
+ * @param Smarty_Internal_Template $_template template object
+ * @return void
+ * @throws SmartyException if template cannot be loaded or allow_php_templates is disabled
+ */
+ public function renderUncompiled(Smarty_Template_Source $source, Smarty_Internal_Template $_template)
+ {
+ $_smarty_template = $_template;
+
+ if (!$source->smarty->allow_php_templates) {
+ throw new SmartyException("PHP templates are disabled");
+ }
+ if (!$source->exists) {
+ if ($_template->parent instanceof Smarty_Internal_Template) {
+ $parent_resource = " in '{$_template->parent->template_resource}'";
+ } else {
+ $parent_resource = '';
+ }
+ throw new SmartyException("Unable to load template {$source->type} '{$source->name}'{$parent_resource}");
+ }
+
+ // prepare variables
+ extract($_template->getTemplateVars());
+
+ // include PHP template with short open tags enabled
+ ini_set( 'short_open_tag', '1' );
+ include($source->filepath);
+ ini_set( 'short_open_tag', $this->short_open_tag );
+ }
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_resource_registered.php b/library/Smarty/libs/sysplugins/smarty_internal_resource_registered.php
new file mode 100644
index 000000000..44497b922
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_resource_registered.php
@@ -0,0 +1,95 @@
+<?php
+/**
+ * Smarty Internal Plugin Resource Registered
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Uwe Tews
+ * @author Rodney Rehm
+ */
+
+/**
+ * Smarty Internal Plugin Resource Registered
+ *
+ * Implements the registered resource for Smarty template
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @deprecated
+ */
+class Smarty_Internal_Resource_Registered extends Smarty_Resource {
+
+ /**
+ * populate Source Object with meta data from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ * @param Smarty_Internal_Template $_template template object
+ * @return void
+ */
+ public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
+ {
+ $source->filepath = $source->type . ':' . $source->name;
+ $source->uid = sha1($source->filepath);
+ if ($source->smarty->compile_check) {
+ $source->timestamp = $this->getTemplateTimestamp($source);
+ $source->exists = !!$source->timestamp;
+ }
+ }
+
+ /**
+ * populate Source Object with timestamp and exists from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return void
+ */
+ public function populateTimestamp(Smarty_Template_Source $source)
+ {
+ $source->timestamp = $this->getTemplateTimestamp($source);
+ $source->exists = !!$source->timestamp;
+ }
+
+ /**
+ * Get timestamp (epoch) the template source was modified
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return integer|boolean timestamp (epoch) the template was modified, false if resources has no timestamp
+ */
+ public function getTemplateTimestamp(Smarty_Template_Source $source)
+ {
+ // return timestamp
+ $time_stamp = false;
+ call_user_func_array($source->smarty->registered_resources[$source->type][0][1], array($source->name, &$time_stamp, $source->smarty));
+ return is_numeric($time_stamp) ? (int) $time_stamp : $time_stamp;
+ }
+
+ /**
+ * Load template's source by invoking the registered callback into current template object
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return string template source
+ * @throws SmartyException if source cannot be loaded
+ */
+ public function getContent(Smarty_Template_Source $source)
+ {
+ // return template string
+ $t = call_user_func_array($source->smarty->registered_resources[$source->type][0][0], array($source->name, &$source->content, $source->smarty));
+ if (is_bool($t) && !$t) {
+ throw new SmartyException("Unable to read template {$source->type} '{$source->name}'");
+ }
+ return $source->content;
+ }
+
+ /**
+ * Determine basename for compiled filename
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return string resource's basename
+ */
+ protected function getBasename(Smarty_Template_Source $source)
+ {
+ return basename($source->name);
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_resource_stream.php b/library/Smarty/libs/sysplugins/smarty_internal_resource_stream.php
new file mode 100644
index 000000000..85698c232
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_resource_stream.php
@@ -0,0 +1,76 @@
+<?php
+/**
+ * Smarty Internal Plugin Resource Stream
+ *
+ * Implements the streams as resource for Smarty template
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Uwe Tews
+ * @author Rodney Rehm
+ */
+
+/**
+ * Smarty Internal Plugin Resource Stream
+ *
+ * Implements the streams as resource for Smarty template
+ *
+ * @link http://php.net/streams
+ * @package Smarty
+ * @subpackage TemplateResources
+ */
+class Smarty_Internal_Resource_Stream extends Smarty_Resource_Recompiled {
+
+ /**
+ * populate Source Object with meta data from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ * @param Smarty_Internal_Template $_template template object
+ * @return void
+ */
+ public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
+ {
+ $source->filepath = str_replace(':', '://', $source->resource);
+ $source->uid = false;
+ $source->content = $this->getContent($source);
+ $source->timestamp = false;
+ $source->exists = !!$source->content;
+ }
+
+ /**
+ * Load template's source from stream into current template object
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return string template source
+ * @throws SmartyException if source cannot be loaded
+ */
+ public function getContent(Smarty_Template_Source $source)
+ {
+ $t = '';
+ // the availability of the stream has already been checked in Smarty_Resource::fetch()
+ $fp = fopen($source->filepath, 'r+');
+ if ($fp) {
+ while (!feof($fp) && ($current_line = fgets($fp)) !== false) {
+ $t .= $current_line;
+ }
+ fclose($fp);
+ return $t;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * modify resource_name according to resource handlers specifications
+ *
+ * @param Smarty $smarty Smarty instance
+ * @param string $resource_name resource_name to make unique
+ * @return string unique resource name
+ */
+ protected function buildUniqueResourceName(Smarty $smarty, $resource_name)
+ {
+ return get_class($this) . '#' . $resource_name;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_resource_string.php b/library/Smarty/libs/sysplugins/smarty_internal_resource_string.php
new file mode 100644
index 000000000..9571337b0
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_resource_string.php
@@ -0,0 +1,96 @@
+<?php
+/**
+ * Smarty Internal Plugin Resource String
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Uwe Tews
+ * @author Rodney Rehm
+ */
+
+/**
+ * Smarty Internal Plugin Resource String
+ *
+ * Implements the strings as resource for Smarty template
+ *
+ * {@internal unlike eval-resources the compiled state of string-resources is saved for subsequent access}}
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ */
+class Smarty_Internal_Resource_String extends Smarty_Resource {
+
+ /**
+ * populate Source Object with meta data from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ * @param Smarty_Internal_Template $_template template object
+ * @return void
+ */
+ public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
+ {
+ $source->uid = $source->filepath = sha1($source->name);
+ $source->timestamp = 0;
+ $source->exists = true;
+ }
+
+ /**
+ * Load template's source from $resource_name into current template object
+ *
+ * @uses decode() to decode base64 and urlencoded template_resources
+ * @param Smarty_Template_Source $source source object
+ * @return string template source
+ */
+ public function getContent(Smarty_Template_Source $source)
+ {
+ return $this->decode($source->name);
+ }
+
+ /**
+ * decode base64 and urlencode
+ *
+ * @param string $string template_resource to decode
+ * @return string decoded template_resource
+ */
+ protected function decode($string)
+ {
+ // decode if specified
+ if (($pos = strpos($string, ':')) !== false) {
+ if (!strncmp($string, 'base64', 6)) {
+ return base64_decode(substr($string, 7));
+ } elseif (!strncmp($string, 'urlencode', 9)) {
+ return urldecode(substr($string, 10));
+ }
+ }
+
+ return $string;
+ }
+
+ /**
+ * modify resource_name according to resource handlers specifications
+ *
+ * @param Smarty $smarty Smarty instance
+ * @param string $resource_name resource_name to make unique
+ * @return string unique resource name
+ */
+ protected function buildUniqueResourceName(Smarty $smarty, $resource_name)
+ {
+ return get_class($this) . '#' .$this->decode($resource_name);
+ }
+
+ /**
+ * Determine basename for compiled filename
+ *
+ * Always returns an empty string.
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return string resource's basename
+ */
+ protected function getBasename(Smarty_Template_Source $source)
+ {
+ return '';
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_smartytemplatecompiler.php b/library/Smarty/libs/sysplugins/smarty_internal_smartytemplatecompiler.php
new file mode 100644
index 000000000..1ec1aa430
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_smartytemplatecompiler.php
@@ -0,0 +1,127 @@
+<?php
+/**
+ * Smarty Internal Plugin Smarty Template Compiler Base
+ *
+ * This file contains the basic classes and methodes for compiling Smarty templates with lexer/parser
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * @ignore
+ */
+include ("smarty_internal_parsetree.php");
+
+/**
+ * Class SmartyTemplateCompiler
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCompilerBase {
+
+ /**
+ * Lexer class name
+ *
+ * @var string
+ */
+ public $lexer_class;
+
+ /**
+ * Parser class name
+ *
+ * @var string
+ */
+ public $parser_class;
+
+ /**
+ * Lexer object
+ *
+ * @var object
+ */
+ public $lex;
+
+ /**
+ * Parser object
+ *
+ * @var object
+ */
+ public $parser;
+
+ /**
+ * Smarty object
+ *
+ * @var object
+ */
+ public $smarty;
+
+ /**
+ * array of vars which can be compiled in local scope
+ *
+ * @var array
+ */
+ public $local_var = array();
+
+ /**
+ * Initialize compiler
+ *
+ * @param string $lexer_class class name
+ * @param string $parser_class class name
+ * @param Smarty $smarty global instance
+ */
+ public function __construct($lexer_class, $parser_class, $smarty)
+ {
+ $this->smarty = $smarty;
+ parent::__construct();
+ // get required plugins
+ $this->lexer_class = $lexer_class;
+ $this->parser_class = $parser_class;
+ }
+
+ /**
+ * Methode to compile a Smarty template
+ *
+ * @param mixed $_content template source
+ * @return bool true if compiling succeeded, false if it failed
+ */
+ protected function doCompile($_content)
+ {
+ /* here is where the compiling takes place. Smarty
+ tags in the templates are replaces with PHP code,
+ then written to compiled files. */
+ // init the lexer/parser to compile the template
+ $this->lex = new $this->lexer_class($_content, $this);
+ $this->parser = new $this->parser_class($this->lex, $this);
+ if ($this->smarty->_parserdebug)
+ $this->parser->PrintTrace();
+ // get tokens from lexer and parse them
+ while ($this->lex->yylex() && !$this->abort_and_recompile) {
+ if ($this->smarty->_parserdebug) {
+ echo "<pre>Line {$this->lex->line} Parsing {$this->parser->yyTokenName[$this->lex->token]} Token " .
+ htmlentities($this->lex->value) . "</pre>";
+ }
+ $this->parser->doParse($this->lex->token, $this->lex->value);
+ }
+
+ if ($this->abort_and_recompile) {
+ // exit here on abort
+ return false;
+ }
+ // finish parsing process
+ $this->parser->doParse(0, 0);
+ // check for unclosed tags
+ if (count($this->_tag_stack) > 0) {
+ // get stacked info
+ list($openTag, $_data) = array_pop($this->_tag_stack);
+ $this->trigger_template_error("unclosed {" . $openTag . "} tag");
+ }
+ // return compiled code
+ // return str_replace(array("? >\n<?php","? ><?php"), array('',''), $this->parser->retvalue);
+ return $this->parser->retvalue;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_template.php b/library/Smarty/libs/sysplugins/smarty_internal_template.php
new file mode 100644
index 000000000..de9d54cf6
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_template.php
@@ -0,0 +1,684 @@
+<?php
+/**
+ * Smarty Internal Plugin Template
+ *
+ * This file contains the Smarty template engine
+ *
+ * @package Smarty
+ * @subpackage Template
+ * @author Uwe Tews
+ */
+
+/**
+ * Main class with template data structures and methods
+ *
+ * @package Smarty
+ * @subpackage Template
+ *
+ * @property Smarty_Template_Source $source
+ * @property Smarty_Template_Compiled $compiled
+ * @property Smarty_Template_Cached $cached
+ */
+class Smarty_Internal_Template extends Smarty_Internal_TemplateBase {
+
+ /**
+ * cache_id
+ * @var string
+ */
+ public $cache_id = null;
+ /**
+ * $compile_id
+ * @var string
+ */
+ public $compile_id = null;
+ /**
+ * caching enabled
+ * @var boolean
+ */
+ public $caching = null;
+ /**
+ * cache lifetime in seconds
+ * @var integer
+ */
+ public $cache_lifetime = null;
+ /**
+ * Template resource
+ * @var string
+ */
+ public $template_resource = null;
+ /**
+ * flag if compiled template is invalid and must be (re)compiled
+ * @var bool
+ */
+ public $mustCompile = null;
+ /**
+ * flag if template does contain nocache code sections
+ * @var bool
+ */
+ public $has_nocache_code = false;
+ /**
+ * special compiled and cached template properties
+ * @var array
+ */
+ public $properties = array('file_dependency' => array(),
+ 'nocache_hash' => '',
+ 'function' => array());
+ /**
+ * required plugins
+ * @var array
+ */
+ public $required_plugins = array('compiled' => array(), 'nocache' => array());
+ /**
+ * Global smarty instance
+ * @var Smarty
+ */
+ public $smarty = null;
+ /**
+ * blocks for template inheritance
+ * @var array
+ */
+ public $block_data = array();
+ /**
+ * variable filters
+ * @var array
+ */
+ public $variable_filters = array();
+ /**
+ * optional log of tag/attributes
+ * @var array
+ */
+ public $used_tags = array();
+ /**
+ * internal flag to allow relative path in child template blocks
+ * @var bool
+ */
+ public $allow_relative_path = false;
+ /**
+ * internal capture runtime stack
+ * @var array
+ */
+ public $_capture_stack = array(0 => array());
+
+ /**
+ * Create template data object
+ *
+ * Some of the global Smarty settings copied to template scope
+ * It load the required template resources and cacher plugins
+ *
+ * @param string $template_resource template resource string
+ * @param Smarty $smarty Smarty instance
+ * @param Smarty_Internal_Template $_parent back pointer to parent object with variables or null
+ * @param mixed $_cache_id cache id or null
+ * @param mixed $_compile_id compile id or null
+ * @param bool $_caching use caching?
+ * @param int $_cache_lifetime cache life-time in seconds
+ */
+ public function __construct($template_resource, $smarty, $_parent = null, $_cache_id = null, $_compile_id = null, $_caching = null, $_cache_lifetime = null)
+ {
+ $this->smarty = &$smarty;
+ // Smarty parameter
+ $this->cache_id = $_cache_id === null ? $this->smarty->cache_id : $_cache_id;
+ $this->compile_id = $_compile_id === null ? $this->smarty->compile_id : $_compile_id;
+ $this->caching = $_caching === null ? $this->smarty->caching : $_caching;
+ if ($this->caching === true)
+ $this->caching = Smarty::CACHING_LIFETIME_CURRENT;
+ $this->cache_lifetime = $_cache_lifetime === null ? $this->smarty->cache_lifetime : $_cache_lifetime;
+ $this->parent = $_parent;
+ // Template resource
+ $this->template_resource = $template_resource;
+ // copy block data of template inheritance
+ if ($this->parent instanceof Smarty_Internal_Template) {
+ $this->block_data = $this->parent->block_data;
+ }
+ }
+
+ /**
+ * Returns if the current template must be compiled by the Smarty compiler
+ *
+ * It does compare the timestamps of template source and the compiled templates and checks the force compile configuration
+ *
+ * @return boolean true if the template must be compiled
+ */
+ public function mustCompile()
+ {
+ if (!$this->source->exists) {
+ if ($this->parent instanceof Smarty_Internal_Template) {
+ $parent_resource = " in '$this->parent->template_resource}'";
+ } else {
+ $parent_resource = '';
+ }
+ throw new SmartyException("Unable to load template {$this->source->type} '{$this->source->name}'{$parent_resource}");
+ }
+ if ($this->mustCompile === null) {
+ $this->mustCompile = (!$this->source->uncompiled && ($this->smarty->force_compile || $this->source->recompiled || $this->compiled->timestamp === false ||
+ ($this->smarty->compile_check && $this->compiled->timestamp < $this->source->timestamp)));
+ }
+ return $this->mustCompile;
+ }
+
+ /**
+ * Compiles the template
+ *
+ * If the template is not evaluated the compiled template is saved on disk
+ */
+ public function compileTemplateSource()
+ {
+ if (!$this->source->recompiled) {
+ $this->properties['file_dependency'] = array();
+ if ($this->source->components) {
+ // uses real resource for file dependency
+ $source = end($this->source->components);
+ $this->properties['file_dependency'][$this->source->uid] = array($this->source->filepath, $this->source->timestamp, $source->type);
+ } else {
+ $this->properties['file_dependency'][$this->source->uid] = array($this->source->filepath, $this->source->timestamp, $this->source->type);
+ }
+ }
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::start_compile($this);
+ }
+ // compile locking
+ if ($this->smarty->compile_locking && !$this->source->recompiled) {
+ if ($saved_timestamp = $this->compiled->timestamp) {
+ touch($this->compiled->filepath);
+ }
+ }
+ // call compiler
+ try {
+ $code = $this->compiler->compileTemplate($this);
+ } catch (Exception $e) {
+ // restore old timestamp in case of error
+ if ($this->smarty->compile_locking && !$this->source->recompiled && $saved_timestamp) {
+ touch($this->compiled->filepath, $saved_timestamp);
+ }
+ throw $e;
+ }
+ // compiling succeded
+ if (!$this->source->recompiled && $this->compiler->write_compiled_code) {
+ // write compiled template
+ $_filepath = $this->compiled->filepath;
+ if ($_filepath === false)
+ throw new SmartyException('getCompiledFilepath() did not return a destination to save the compiled template to');
+ Smarty_Internal_Write_File::writeFile($_filepath, $code, $this->smarty);
+ $this->compiled->exists = true;
+ $this->compiled->isCompiled = true;
+ }
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::end_compile($this);
+ }
+ // release compiler object to free memory
+ unset($this->compiler);
+ }
+
+ /**
+ * Writes the cached template output
+ *
+ * @return bool
+ */
+ public function writeCachedContent($content)
+ {
+ if ($this->source->recompiled || !($this->caching == Smarty::CACHING_LIFETIME_CURRENT || $this->caching == Smarty::CACHING_LIFETIME_SAVED)) {
+ // don't write cache file
+ return false;
+ }
+ $this->properties['cache_lifetime'] = $this->cache_lifetime;
+ $this->properties['unifunc'] = 'content_' . str_replace('.', '_', uniqid('', true));
+ $content = $this->createTemplateCodeFrame($content, true);
+ $_smarty_tpl = $this;
+ eval("?>" . $content);
+ $this->cached->valid = true;
+ $this->cached->processed = true;
+ return $this->cached->write($this, $content);
+ }
+
+ /**
+ * Template code runtime function to get subtemplate content
+ *
+ * @param string $template the resource handle of the template file
+ * @param mixed $cache_id cache id to be used with this template
+ * @param mixed $compile_id compile id to be used with this template
+ * @param integer $caching cache mode
+ * @param integer $cache_lifetime life time of cache data
+ * @param array $vars optional variables to assign
+ * @param int $parent_scope scope in which {include} should execute
+ * @returns string template content
+ */
+ public function getSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope)
+ {
+ // already in template cache?
+ if ($this->smarty->allow_ambiguous_resources) {
+ $_templateId = Smarty_Resource::getUniqueTemplateName($this->smarty, $template) . $cache_id . $compile_id;
+ } else {
+ $_templateId = $this->smarty->joined_template_dir . '#' . $template . $cache_id . $compile_id;
+ }
+
+ if (isset($_templateId[150])) {
+ $_templateId = sha1($_templateId);
+ }
+ if (isset($this->smarty->template_objects[$_templateId])) {
+ // clone cached template object because of possible recursive call
+ $tpl = clone $this->smarty->template_objects[$_templateId];
+ $tpl->parent = $this;
+ $tpl->caching = $caching;
+ $tpl->cache_lifetime = $cache_lifetime;
+ } else {
+ $tpl = new $this->smarty->template_class($template, $this->smarty, $this, $cache_id, $compile_id, $caching, $cache_lifetime);
+ }
+ // get variables from calling scope
+ if ($parent_scope == Smarty::SCOPE_LOCAL) {
+ $tpl->tpl_vars = $this->tpl_vars;
+ $tpl->tpl_vars['smarty'] = clone $this->tpl_vars['smarty'];
+ } elseif ($parent_scope == Smarty::SCOPE_PARENT) {
+ $tpl->tpl_vars = &$this->tpl_vars;
+ } elseif ($parent_scope == Smarty::SCOPE_GLOBAL) {
+ $tpl->tpl_vars = &Smarty::$global_tpl_vars;
+ } elseif (($scope_ptr = $this->getScopePointer($parent_scope)) == null) {
+ $tpl->tpl_vars = &$this->tpl_vars;
+ } else {
+ $tpl->tpl_vars = &$scope_ptr->tpl_vars;
+ }
+ $tpl->config_vars = $this->config_vars;
+ if (!empty($data)) {
+ // set up variable values
+ foreach ($data as $_key => $_val) {
+ $tpl->tpl_vars[$_key] = new Smarty_variable($_val);
+ }
+ }
+ return $tpl->fetch(null, null, null, null, false, false, true);
+ }
+
+ /**
+ * Template code runtime function to set up an inline subtemplate
+ *
+ * @param string $template the resource handle of the template file
+ * @param mixed $cache_id cache id to be used with this template
+ * @param mixed $compile_id compile id to be used with this template
+ * @param integer $caching cache mode
+ * @param integer $cache_lifetime life time of cache data
+ * @param array $vars optional variables to assign
+ * @param int $parent_scope scope in which {include} should execute
+ * @param string $hash nocache hash code
+ * @returns string template content
+ */
+ public function setupInlineSubTemplate($template, $cache_id, $compile_id, $caching, $cache_lifetime, $data, $parent_scope, $hash)
+ {
+ $tpl = new $this->smarty->template_class($template, $this->smarty, $this, $cache_id, $compile_id, $caching, $cache_lifetime);
+ $tpl->properties['nocache_hash'] = $hash;
+ // get variables from calling scope
+ if ($parent_scope == Smarty::SCOPE_LOCAL ) {
+ $tpl->tpl_vars = $this->tpl_vars;
+ $tpl->tpl_vars['smarty'] = clone $this->tpl_vars['smarty'];
+ } elseif ($parent_scope == Smarty::SCOPE_PARENT) {
+ $tpl->tpl_vars = &$this->tpl_vars;
+ } elseif ($parent_scope == Smarty::SCOPE_GLOBAL) {
+ $tpl->tpl_vars = &Smarty::$global_tpl_vars;
+ } elseif (($scope_ptr = $this->getScopePointer($parent_scope)) == null) {
+ $tpl->tpl_vars = &$this->tpl_vars;
+ } else {
+ $tpl->tpl_vars = &$scope_ptr->tpl_vars;
+ }
+ $tpl->config_vars = $this->config_vars;
+ if (!empty($data)) {
+ // set up variable values
+ foreach ($data as $_key => $_val) {
+ $tpl->tpl_vars[$_key] = new Smarty_variable($_val);
+ }
+ }
+ return $tpl;
+ }
+
+
+ /**
+ * Create code frame for compiled and cached templates
+ *
+ * @param string $content optional template content
+ * @param bool $cache flag for cache file
+ * @return string
+ */
+ public function createTemplateCodeFrame($content = '', $cache = false)
+ {
+ $plugins_string = '';
+ // include code for plugins
+ if (!$cache) {
+ if (!empty($this->required_plugins['compiled'])) {
+ $plugins_string = '<?php ';
+ foreach ($this->required_plugins['compiled'] as $tmp) {
+ foreach ($tmp as $data) {
+ $file = addslashes($data['file']);
+ $plugins_string .= "if (!is_callable('{$data['function']}')) include '{$file}';\n";
+ }
+ }
+ $plugins_string .= '?>';
+ }
+ if (!empty($this->required_plugins['nocache'])) {
+ $this->has_nocache_code = true;
+ $plugins_string .= "<?php echo '/*%%SmartyNocache:{$this->properties['nocache_hash']}%%*/<?php \$_smarty = \$_smarty_tpl->smarty; ";
+ foreach ($this->required_plugins['nocache'] as $tmp) {
+ foreach ($tmp as $data) {
+ $file = addslashes($data['file']);
+ $plugins_string .= addslashes("if (!is_callable('{$data['function']}')) include '{$file}';\n");
+ }
+ }
+ $plugins_string .= "?>/*/%%SmartyNocache:{$this->properties['nocache_hash']}%%*/';?>\n";
+ }
+ }
+ // build property code
+ $this->properties['has_nocache_code'] = $this->has_nocache_code;
+ $output = '';
+ if (!$this->source->recompiled) {
+ $output = "<?php /*%%SmartyHeaderCode:{$this->properties['nocache_hash']}%%*/";
+ if ($this->smarty->direct_access_security) {
+ $output .= "if(!defined('SMARTY_DIR')) exit('no direct access allowed');\n";
+ }
+ }
+ if ($cache) {
+ // remove compiled code of{function} definition
+ unset($this->properties['function']);
+ if (!empty($this->smarty->template_functions)) {
+ // copy code of {function} tags called in nocache mode
+ foreach ($this->smarty->template_functions as $name => $function_data) {
+ if (isset($function_data['called_nocache'])) {
+ foreach ($function_data['called_functions'] as $func_name) {
+ $this->smarty->template_functions[$func_name]['called_nocache'] = true;
+ }
+ }
+ }
+ foreach ($this->smarty->template_functions as $name => $function_data) {
+ if (isset($function_data['called_nocache'])) {
+ unset($function_data['called_nocache'], $function_data['called_functions'], $this->smarty->template_functions[$name]['called_nocache']);
+ $this->properties['function'][$name] = $function_data;
+ }
+ }
+ }
+ }
+ $this->properties['version'] = Smarty::SMARTY_VERSION;
+ if (!isset($this->properties['unifunc'])) {
+ $this->properties['unifunc'] = 'content_' . str_replace('.', '_', uniqid('', true));
+ }
+ if (!$this->source->recompiled) {
+ $output .= "\$_valid = \$_smarty_tpl->decodeProperties(" . var_export($this->properties, true) . ',' . ($cache ? 'true' : 'false') . "); /*/%%SmartyHeaderCode%%*/?>\n";
+ $output .= '<?php if ($_valid && !is_callable(\'' . $this->properties['unifunc'] . '\')) {function ' . $this->properties['unifunc'] . '($_smarty_tpl) {?>';
+ }
+ $output .= $plugins_string;
+ $output .= $content;
+ if (!$this->source->recompiled) {
+ $output .= '<?php }} ?>';
+ }
+ return $output;
+ }
+
+ /**
+ * This function is executed automatically when a compiled or cached template file is included
+ *
+ * - Decode saved properties from compiled template and cache files
+ * - Check if compiled or cache file is valid
+ *
+ * @param array $properties special template properties
+ * @param bool $cache flag if called from cache file
+ * @return bool flag if compiled or cache file is valid
+ */
+ public function decodeProperties($properties, $cache = false)
+ {
+ $this->has_nocache_code = $properties['has_nocache_code'];
+ $this->properties['nocache_hash'] = $properties['nocache_hash'];
+ if (isset($properties['cache_lifetime'])) {
+ $this->properties['cache_lifetime'] = $properties['cache_lifetime'];
+ }
+ if (isset($properties['file_dependency'])) {
+ $this->properties['file_dependency'] = array_merge($this->properties['file_dependency'], $properties['file_dependency']);
+ }
+ if (!empty($properties['function'])) {
+ $this->properties['function'] = array_merge($this->properties['function'], $properties['function']);
+ $this->smarty->template_functions = array_merge($this->smarty->template_functions, $properties['function']);
+ }
+ $this->properties['version'] = (isset($properties['version'])) ? $properties['version'] : '';
+ $this->properties['unifunc'] = $properties['unifunc'];
+ // check file dependencies at compiled code
+ $is_valid = true;
+ if ($this->properties['version'] != Smarty::SMARTY_VERSION) {
+ $is_valid = false;
+ } else if (((!$cache && $this->smarty->compile_check && empty($this->compiled->_properties) && !$this->compiled->isCompiled) || $cache && ($this->smarty->compile_check === true || $this->smarty->compile_check === Smarty::COMPILECHECK_ON)) && !empty($this->properties['file_dependency'])) {
+ foreach ($this->properties['file_dependency'] as $_file_to_check) {
+ if ($_file_to_check[2] == 'file' || $_file_to_check[2] == 'php') {
+ if ($this->source->filepath == $_file_to_check[0] && isset($this->source->timestamp)) {
+ // do not recheck current template
+ $mtime = $this->source->timestamp;
+ } else {
+ // file and php types can be checked without loading the respective resource handlers
+ $mtime = @filemtime($_file_to_check[0]);
+ }
+ } elseif ($_file_to_check[2] == 'string') {
+ continue;
+ } else {
+ $source = Smarty_Resource::source(null, $this->smarty, $_file_to_check[0]);
+ $mtime = $source->timestamp;
+ }
+ if (!$mtime || $mtime > $_file_to_check[1]) {
+ $is_valid = false;
+ break;
+ }
+ }
+ }
+ if ($cache) {
+ $this->cached->valid = $is_valid;
+ } else {
+ $this->mustCompile = !$is_valid;
+ }
+ // store data in reusable Smarty_Template_Compiled
+ if (!$cache) {
+ $this->compiled->_properties = $properties;
+ }
+ return $is_valid;
+ }
+
+ /**
+ * Template code runtime function to create a local Smarty variable for array assignments
+ *
+ * @param string $tpl_var tempate variable name
+ * @param bool $nocache cache mode of variable
+ * @param int $scope scope of variable
+ */
+ public function createLocalArrayVariable($tpl_var, $nocache = false, $scope = Smarty::SCOPE_LOCAL)
+ {
+ if (!isset($this->tpl_vars[$tpl_var])) {
+ $this->tpl_vars[$tpl_var] = new Smarty_variable(array(), $nocache, $scope);
+ } else {
+ $this->tpl_vars[$tpl_var] = clone $this->tpl_vars[$tpl_var];
+ if ($scope != Smarty::SCOPE_LOCAL) {
+ $this->tpl_vars[$tpl_var]->scope = $scope;
+ }
+ if (!(is_array($this->tpl_vars[$tpl_var]->value) || $this->tpl_vars[$tpl_var]->value instanceof ArrayAccess)) {
+ settype($this->tpl_vars[$tpl_var]->value, 'array');
+ }
+ }
+ }
+
+ /**
+ * Template code runtime function to get pointer to template variable array of requested scope
+ *
+ * @param int $scope requested variable scope
+ * @return array array of template variables
+ */
+ public function &getScope($scope)
+ {
+ if ($scope == Smarty::SCOPE_PARENT && !empty($this->parent)) {
+ return $this->parent->tpl_vars;
+ } elseif ($scope == Smarty::SCOPE_ROOT && !empty($this->parent)) {
+ $ptr = $this->parent;
+ while (!empty($ptr->parent)) {
+ $ptr = $ptr->parent;
+ }
+ return $ptr->tpl_vars;
+ } elseif ($scope == Smarty::SCOPE_GLOBAL) {
+ return Smarty::$global_tpl_vars;
+ }
+ $null = null;
+ return $null;
+ }
+
+ /**
+ * Get parent or root of template parent chain
+ *
+ * @param int $scope pqrent or root scope
+ * @return mixed object
+ */
+ public function getScopePointer($scope)
+ {
+ if ($scope == Smarty::SCOPE_PARENT && !empty($this->parent)) {
+ return $this->parent;
+ } elseif ($scope == Smarty::SCOPE_ROOT && !empty($this->parent)) {
+ $ptr = $this->parent;
+ while (!empty($ptr->parent)) {
+ $ptr = $ptr->parent;
+ }
+ return $ptr;
+ }
+ return null;
+ }
+
+ /**
+ * [util function] counts an array, arrayaccess/traversable or PDOStatement object
+ *
+ * @param mixed $value
+ * @return int the count for arrays and objects that implement countable, 1 for other objects that don't, and 0 for empty elements
+ */
+ public function _count($value)
+ {
+ if (is_array($value) === true || $value instanceof Countable) {
+ return count($value);
+ } elseif ($value instanceof IteratorAggregate) {
+ // Note: getIterator() returns a Traversable, not an Iterator
+ // thus rewind() and valid() methods may not be present
+ return iterator_count($value->getIterator());
+ } elseif ($value instanceof Iterator) {
+ return iterator_count($value);
+ } elseif ($value instanceof PDOStatement) {
+ return $value->rowCount();
+ } elseif ($value instanceof Traversable) {
+ return iterator_count($value);
+ } elseif ($value instanceof ArrayAccess) {
+ if ($value->offsetExists(0)) {
+ return 1;
+ }
+ } elseif (is_object($value)) {
+ return count($value);
+ }
+ return 0;
+ }
+
+ /**
+ * runtime error not matching capture tags
+ *
+ */
+ public function capture_error()
+ {
+ throw new SmartyException("Not matching {capture} open/close in \"{$this->template_resource}\"");
+ }
+
+ /**
+ * Empty cache for this template
+ *
+ * @param integer $exp_time expiration time
+ * @return integer number of cache files deleted
+ */
+ public function clearCache($exp_time=null)
+ {
+ Smarty_CacheResource::invalidLoadedCache($this->smarty);
+ return $this->cached->handler->clear($this->smarty, $this->template_name, $this->cache_id, $this->compile_id, $exp_time);
+ }
+
+ /**
+ * set Smarty property in template context
+ *
+ * @param string $property_name property name
+ * @param mixed $value value
+ */
+ public function __set($property_name, $value)
+ {
+ switch ($property_name) {
+ case 'source':
+ case 'compiled':
+ case 'cached':
+ case 'compiler':
+ $this->$property_name = $value;
+ return;
+
+ // FIXME: routing of template -> smarty attributes
+ default:
+ if (property_exists($this->smarty, $property_name)) {
+ $this->smarty->$property_name = $value;
+ return;
+ }
+ }
+
+ throw new SmartyException("invalid template property '$property_name'.");
+ }
+
+ /**
+ * get Smarty property in template context
+ *
+ * @param string $property_name property name
+ */
+ public function __get($property_name)
+ {
+ switch ($property_name) {
+ case 'source':
+ if (strlen($this->template_resource) == 0) {
+ throw new SmartyException('Missing template name');
+ }
+ $this->source = Smarty_Resource::source($this);
+ // cache template object under a unique ID
+ // do not cache eval resources
+ if ($this->source->type != 'eval') {
+ if ($this->smarty->allow_ambiguous_resources) {
+ $_templateId = $this->source->unique_resource . $this->cache_id . $this->compile_id;
+ } else {
+ $_templateId = $this->smarty->joined_template_dir . '#' . $this->template_resource . $this->cache_id . $this->compile_id;
+ }
+
+ if (isset($_templateId[150])) {
+ $_templateId = sha1($_templateId);
+ }
+ $this->smarty->template_objects[$_templateId] = $this;
+ }
+ return $this->source;
+
+ case 'compiled':
+ $this->compiled = $this->source->getCompiled($this);
+ return $this->compiled;
+
+ case 'cached':
+ if (!class_exists('Smarty_Template_Cached')) {
+ include SMARTY_SYSPLUGINS_DIR . 'smarty_cacheresource.php';
+ }
+ $this->cached = new Smarty_Template_Cached($this);
+ return $this->cached;
+
+ case 'compiler':
+ $this->smarty->loadPlugin($this->source->compiler_class);
+ $this->compiler = new $this->source->compiler_class($this->source->template_lexer_class, $this->source->template_parser_class, $this->smarty);
+ return $this->compiler;
+
+ // FIXME: routing of template -> smarty attributes
+ default:
+ if (property_exists($this->smarty, $property_name)) {
+ return $this->smarty->$property_name;
+ }
+ }
+
+ throw new SmartyException("template property '$property_name' does not exist.");
+ }
+
+ /**
+ * Template data object destrutor
+ *
+ */
+ public function __destruct()
+ {
+ if ($this->smarty->cache_locking && isset($this->cached) && $this->cached->is_locked) {
+ $this->cached->handler->releaseLock($this->smarty, $this->cached);
+ }
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_templatebase.php b/library/Smarty/libs/sysplugins/smarty_internal_templatebase.php
new file mode 100644
index 000000000..abd48b799
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_templatebase.php
@@ -0,0 +1,811 @@
+<?php
+/**
+ * Smarty Internal Plugin Smarty Template Base
+ *
+ * This file contains the basic shared methodes for template handling
+ *
+ * @package Smarty
+ * @subpackage Template
+ * @author Uwe Tews
+ */
+
+/**
+ * Class with shared template methodes
+ *
+ * @package Smarty
+ * @subpackage Template
+ */
+abstract class Smarty_Internal_TemplateBase extends Smarty_Internal_Data {
+
+ /**
+ * fetches a rendered Smarty template
+ *
+ * @param string $template the resource handle of the template file or template object
+ * @param mixed $cache_id cache id to be used with this template
+ * @param mixed $compile_id compile id to be used with this template
+ * @param object $parent next higher level of Smarty variables
+ * @param bool $display true: display, false: fetch
+ * @param bool $merge_tpl_vars if true parent template variables merged in to local scope
+ * @param bool $no_output_filter if true do not run output filter
+ * @return string rendered template output
+ */
+ public function fetch($template = null, $cache_id = null, $compile_id = null, $parent = null, $display = false, $merge_tpl_vars = true, $no_output_filter = false)
+ {
+ if ($template === null && $this instanceof $this->template_class) {
+ $template = $this;
+ }
+ if (!empty($cache_id) && is_object($cache_id)) {
+ $parent = $cache_id;
+ $cache_id = null;
+ }
+ if ($parent === null && ($this instanceof Smarty || is_string($template))) {
+ $parent = $this;
+ }
+ // create template object if necessary
+ $_template = ($template instanceof $this->template_class)
+ ? $template
+ : $this->smarty->createTemplate($template, $cache_id, $compile_id, $parent, false);
+ // if called by Smarty object make sure we use current caching status
+ if ($this instanceof Smarty) {
+ $_template->caching = $this->caching;
+ }
+ // merge all variable scopes into template
+ if ($merge_tpl_vars) {
+ // save local variables
+ $save_tpl_vars = $_template->tpl_vars;
+ $save_config_vars = $_template->config_vars;
+ $ptr_array = array($_template);
+ $ptr = $_template;
+ while (isset($ptr->parent)) {
+ $ptr_array[] = $ptr = $ptr->parent;
+ }
+ $ptr_array = array_reverse($ptr_array);
+ $parent_ptr = reset($ptr_array);
+ $tpl_vars = $parent_ptr->tpl_vars;
+ $config_vars = $parent_ptr->config_vars;
+ while ($parent_ptr = next($ptr_array)) {
+ if (!empty($parent_ptr->tpl_vars)) {
+ $tpl_vars = array_merge($tpl_vars, $parent_ptr->tpl_vars);
+ }
+ if (!empty($parent_ptr->config_vars)) {
+ $config_vars = array_merge($config_vars, $parent_ptr->config_vars);
+ }
+ }
+ if (!empty(Smarty::$global_tpl_vars)) {
+ $tpl_vars = array_merge(Smarty::$global_tpl_vars, $tpl_vars);
+ }
+ $_template->tpl_vars = $tpl_vars;
+ $_template->config_vars = $config_vars;
+ }
+ // dummy local smarty variable
+ if (!isset($_template->tpl_vars['smarty'])) {
+ $_template->tpl_vars['smarty'] = new Smarty_Variable;
+ }
+ if (isset($this->smarty->error_reporting)) {
+ $_smarty_old_error_level = error_reporting($this->smarty->error_reporting);
+ }
+ // check URL debugging control
+ if (!$this->smarty->debugging && $this->smarty->debugging_ctrl == 'URL') {
+ if (isset($_SERVER['QUERY_STRING'])) {
+ $_query_string = $_SERVER['QUERY_STRING'];
+ } else {
+ $_query_string = '';
+ }
+ if (false !== strpos($_query_string, $this->smarty->smarty_debug_id)) {
+ if (false !== strpos($_query_string, $this->smarty->smarty_debug_id . '=on')) {
+ // enable debugging for this browser session
+ setcookie('SMARTY_DEBUG', true);
+ $this->smarty->debugging = true;
+ } elseif (false !== strpos($_query_string, $this->smarty->smarty_debug_id . '=off')) {
+ // disable debugging for this browser session
+ setcookie('SMARTY_DEBUG', false);
+ $this->smarty->debugging = false;
+ } else {
+ // enable debugging for this page
+ $this->smarty->debugging = true;
+ }
+ } else {
+ if (isset($_COOKIE['SMARTY_DEBUG'])) {
+ $this->smarty->debugging = true;
+ }
+ }
+ }
+ // must reset merge template date
+ $_template->smarty->merged_templates_func = array();
+ // get rendered template
+ // disable caching for evaluated code
+ if ($_template->source->recompiled) {
+ $_template->caching = false;
+ }
+ // checks if template exists
+ if (!$_template->source->exists) {
+ if ($_template->parent instanceof Smarty_Internal_Template) {
+ $parent_resource = " in '{$_template->parent->template_resource}'";
+ } else {
+ $parent_resource = '';
+ }
+ throw new SmartyException("Unable to load template {$_template->source->type} '{$_template->source->name}'{$parent_resource}");
+ }
+ // read from cache or render
+ if (!($_template->caching == Smarty::CACHING_LIFETIME_CURRENT || $_template->caching == Smarty::CACHING_LIFETIME_SAVED) || !$_template->cached->valid) {
+ // render template (not loaded and not in cache)
+ if (!$_template->source->uncompiled) {
+ $_smarty_tpl = $_template;
+ if ($_template->source->recompiled) {
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::start_compile($_template);
+ }
+ $code = $_template->compiler->compileTemplate($_template);
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::end_compile($_template);
+ }
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::start_render($_template);
+ }
+ try {
+ ob_start();
+ eval("?>" . $code);
+ unset($code);
+ } catch (Exception $e) {
+ ob_get_clean();
+ throw $e;
+ }
+ } else {
+ if (!$_template->compiled->exists || ($_template->smarty->force_compile && !$_template->compiled->isCompiled)) {
+ $_template->compileTemplateSource();
+ }
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::start_render($_template);
+ }
+ if (!$_template->compiled->loaded) {
+ include($_template->compiled->filepath);
+ if ($_template->mustCompile) {
+ // recompile and load again
+ $_template->compileTemplateSource();
+ include($_template->compiled->filepath);
+ }
+ $_template->compiled->loaded = true;
+ } else {
+ $_template->decodeProperties($_template->compiled->_properties, false);
+ }
+ try {
+ ob_start();
+ if (empty($_template->properties['unifunc']) || !is_callable($_template->properties['unifunc'])) {
+ throw new SmartyException("Invalid compiled template for '{$_template->template_resource}'");
+ }
+ array_unshift($_template->_capture_stack,array());
+ //
+ // render compiled template
+ //
+ $_template->properties['unifunc']($_template);
+ // any unclosed {capture} tags ?
+ if (isset($_template->_capture_stack[0][0])) {
+ $_template->capture_error();
+ }
+ array_shift($_template->_capture_stack);
+ } catch (Exception $e) {
+ ob_get_clean();
+ throw $e;
+ }
+ }
+ } else {
+ if ($_template->source->uncompiled) {
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::start_render($_template);
+ }
+ try {
+ ob_start();
+ $_template->source->renderUncompiled($_template);
+ } catch (Exception $e) {
+ ob_get_clean();
+ throw $e;
+ }
+ } else {
+ throw new SmartyException("Resource '$_template->source->type' must have 'renderUncompiled' method");
+ }
+ }
+ $_output = ob_get_clean();
+ if (!$_template->source->recompiled && empty($_template->properties['file_dependency'][$_template->source->uid])) {
+ $_template->properties['file_dependency'][$_template->source->uid] = array($_template->source->filepath, $_template->source->timestamp, $_template->source->type);
+ }
+ if ($_template->parent instanceof Smarty_Internal_Template) {
+ $_template->parent->properties['file_dependency'] = array_merge($_template->parent->properties['file_dependency'], $_template->properties['file_dependency']);
+ foreach ($_template->required_plugins as $code => $tmp1) {
+ foreach ($tmp1 as $name => $tmp) {
+ foreach ($tmp as $type => $data) {
+ $_template->parent->required_plugins[$code][$name][$type] = $data;
+ }
+ }
+ }
+ }
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::end_render($_template);
+ }
+ // write to cache when nessecary
+ if (!$_template->source->recompiled && ($_template->caching == Smarty::CACHING_LIFETIME_SAVED || $_template->caching == Smarty::CACHING_LIFETIME_CURRENT)) {
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::start_cache($_template);
+ }
+ $_template->properties['has_nocache_code'] = false;
+ // get text between non-cached items
+ $cache_split = preg_split("!/\*%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*\/(.+?)/\*/%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*/!s", $_output);
+ // get non-cached items
+ preg_match_all("!/\*%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*\/(.+?)/\*/%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*/!s", $_output, $cache_parts);
+ $output = '';
+ // loop over items, stitch back together
+ foreach ($cache_split as $curr_idx => $curr_split) {
+ // escape PHP tags in template content
+ $output .= preg_replace('/(<%|%>|<\?php|<\?|\?>)/', '<?php echo \'$1\'; ?>', $curr_split);
+ if (isset($cache_parts[0][$curr_idx])) {
+ $_template->properties['has_nocache_code'] = true;
+ // remove nocache tags from cache output
+ $output .= preg_replace("!/\*/?%%SmartyNocache:{$_template->properties['nocache_hash']}%%\*/!", '', $cache_parts[0][$curr_idx]);
+ }
+ }
+ if (!$no_output_filter && !$_template->has_nocache_code && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) {
+ $output = Smarty_Internal_Filter_Handler::runFilter('output', $output, $_template);
+ }
+ // rendering (must be done before writing cache file because of {function} nocache handling)
+ $_smarty_tpl = $_template;
+ try {
+ ob_start();
+ eval("?>" . $output);
+ $_output = ob_get_clean();
+ } catch (Exception $e) {
+ ob_get_clean();
+ throw $e;
+ }
+ // write cache file content
+ $_template->writeCachedContent($output);
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::end_cache($_template);
+ }
+ } else {
+ // var_dump('renderTemplate', $_template->has_nocache_code, $_template->template_resource, $_template->properties['nocache_hash'], $_template->parent->properties['nocache_hash'], $_output);
+ if (!empty($_template->properties['nocache_hash']) && !empty($_template->parent->properties['nocache_hash'])) {
+ // replace nocache_hash
+ $_output = str_replace("{$_template->properties['nocache_hash']}", $_template->parent->properties['nocache_hash'], $_output);
+ $_template->parent->has_nocache_code = $_template->parent->has_nocache_code || $_template->has_nocache_code;
+ }
+ }
+ } else {
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::start_cache($_template);
+ }
+ try {
+ ob_start();
+ array_unshift($_template->_capture_stack,array());
+ //
+ // render cached template
+ //
+ $_template->properties['unifunc']($_template);
+ // any unclosed {capture} tags ?
+ if (isset($_template->_capture_stack[0][0])) {
+ $_template->capture_error();
+ }
+ array_shift($_template->_capture_stack);
+ $_output = ob_get_clean();
+ } catch (Exception $e) {
+ ob_get_clean();
+ throw $e;
+ }
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::end_cache($_template);
+ }
+ }
+ if ((!$this->caching || $_template->has_nocache_code || $_template->source->recompiled) && !$no_output_filter && (isset($this->smarty->autoload_filters['output']) || isset($this->smarty->registered_filters['output']))) {
+ $_output = Smarty_Internal_Filter_Handler::runFilter('output', $_output, $_template);
+ }
+ if (isset($this->error_reporting)) {
+ error_reporting($_smarty_old_error_level);
+ }
+ // display or fetch
+ if ($display) {
+ if ($this->caching && $this->cache_modified_check) {
+ $_isCached = $_template->isCached() && !$_template->has_nocache_code;
+ $_last_modified_date = @substr($_SERVER['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_SERVER['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
+ if ($_isCached && $_template->cached->timestamp <= strtotime($_last_modified_date)) {
+ switch (PHP_SAPI) {
+ case 'cgi': // php-cgi < 5.3
+ case 'cgi-fcgi': // php-cgi >= 5.3
+ case 'fpm-fcgi': // php-fpm >= 5.3.3
+ header('Status: 304 Not Modified');
+ break;
+
+ case 'cli':
+ if (/* ^phpunit */!empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS'])/* phpunit$ */) {
+ $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = '304 Not Modified';
+ }
+ break;
+
+ default:
+ header($_SERVER['SERVER_PROTOCOL'].' 304 Not Modified');
+ break;
+ }
+ } else {
+ switch (PHP_SAPI) {
+ case 'cli':
+ if (/* ^phpunit */!empty($_SERVER['SMARTY_PHPUNIT_DISABLE_HEADERS'])/* phpunit$ */) {
+ $_SERVER['SMARTY_PHPUNIT_HEADERS'][] = 'Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->cached->timestamp) . ' GMT';
+ }
+ break;
+
+ default:
+ header('Last-Modified: ' . gmdate('D, d M Y H:i:s', $_template->cached->timestamp) . ' GMT');
+ break;
+ }
+ echo $_output;
+ }
+ } else {
+ echo $_output;
+ }
+ // debug output
+ if ($this->smarty->debugging) {
+ Smarty_Internal_Debug::display_debug($this);
+ }
+ if ($merge_tpl_vars) {
+ // restore local variables
+ $_template->tpl_vars = $save_tpl_vars;
+ $_template->config_vars = $save_config_vars;
+ }
+ return;
+ } else {
+ if ($merge_tpl_vars) {
+ // restore local variables
+ $_template->tpl_vars = $save_tpl_vars;
+ $_template->config_vars = $save_config_vars;
+ }
+ // return fetched content
+ return $_output;
+ }
+ }
+
+ /**
+ * displays a Smarty template
+ *
+ * @param string $template the resource handle of the template file or template object
+ * @param mixed $cache_id cache id to be used with this template
+ * @param mixed $compile_id compile id to be used with this template
+ * @param object $parent next higher level of Smarty variables
+ */
+ public function display($template = null, $cache_id = null, $compile_id = null, $parent = null)
+ {
+ // display template
+ $this->fetch($template, $cache_id, $compile_id, $parent, true);
+ }
+
+ /**
+ * test if cache is valid
+ *
+ * @param string|object $template the resource handle of the template file or template object
+ * @param mixed $cache_id cache id to be used with this template
+ * @param mixed $compile_id compile id to be used with this template
+ * @param object $parent next higher level of Smarty variables
+ * @return boolean cache status
+ */
+ public function isCached($template = null, $cache_id = null, $compile_id = null, $parent = null)
+ {
+ if ($template === null && $this instanceof $this->template_class) {
+ return $this->cached->valid;
+ }
+ if (!($template instanceof $this->template_class)) {
+ if ($parent === null) {
+ $parent = $this;
+ }
+ $template = $this->smarty->createTemplate($template, $cache_id, $compile_id, $parent, false);
+ }
+ // return cache status of template
+ return $template->cached->valid;
+ }
+
+ /**
+ * creates a data object
+ *
+ * @param object $parent next higher level of Smarty variables
+ * @returns Smarty_Data data object
+ */
+ public function createData($parent = null)
+ {
+ return new Smarty_Data($parent, $this);
+ }
+
+ /**
+ * Registers plugin to be used in templates
+ *
+ * @param string $type plugin type
+ * @param string $tag name of template tag
+ * @param callback $callback PHP callback to register
+ * @param boolean $cacheable if true (default) this fuction is cachable
+ * @param array $cache_attr caching attributes if any
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ * @throws SmartyException when the plugin tag is invalid
+ */
+ public function registerPlugin($type, $tag, $callback, $cacheable = true, $cache_attr = null)
+ {
+ if (isset($this->smarty->registered_plugins[$type][$tag])) {
+ throw new SmartyException("Plugin tag \"{$tag}\" already registered");
+ } elseif (!is_callable($callback)) {
+ throw new SmartyException("Plugin \"{$tag}\" not callable");
+ } else {
+ $this->smarty->registered_plugins[$type][$tag] = array($callback, (bool) $cacheable, (array) $cache_attr);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Unregister Plugin
+ *
+ * @param string $type of plugin
+ * @param string $tag name of plugin
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function unregisterPlugin($type, $tag)
+ {
+ if (isset($this->smarty->registered_plugins[$type][$tag])) {
+ unset($this->smarty->registered_plugins[$type][$tag]);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Registers a resource to fetch a template
+ *
+ * @param string $type name of resource type
+ * @param Smarty_Resource|array $callback or instance of Smarty_Resource, or array of callbacks to handle resource (deprecated)
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function registerResource($type, $callback)
+ {
+ $this->smarty->registered_resources[$type] = $callback instanceof Smarty_Resource ? $callback : array($callback, false);
+ return $this;
+ }
+
+ /**
+ * Unregisters a resource
+ *
+ * @param string $type name of resource type
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function unregisterResource($type)
+ {
+ if (isset($this->smarty->registered_resources[$type])) {
+ unset($this->smarty->registered_resources[$type]);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Registers a cache resource to cache a template's output
+ *
+ * @param string $type name of cache resource type
+ * @param Smarty_CacheResource $callback instance of Smarty_CacheResource to handle output caching
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function registerCacheResource($type, Smarty_CacheResource $callback)
+ {
+ $this->smarty->registered_cache_resources[$type] = $callback;
+ return $this;
+ }
+
+ /**
+ * Unregisters a cache resource
+ *
+ * @param string $type name of cache resource type
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function unregisterCacheResource($type)
+ {
+ if (isset($this->smarty->registered_cache_resources[$type])) {
+ unset($this->smarty->registered_cache_resources[$type]);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Registers object to be used in templates
+ *
+ * @param string $object name of template object
+ * @param object $object_impl the referenced PHP object to register
+ * @param array $allowed list of allowed methods (empty = all)
+ * @param boolean $smarty_args smarty argument format, else traditional
+ * @param array $block_methods list of block-methods
+ * @param array $block_functs list of methods that are block format
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ * @throws SmartyException if any of the methods in $allowed or $block_methods are invalid
+ */
+ public function registerObject($object_name, $object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())
+ {
+ // test if allowed methodes callable
+ if (!empty($allowed)) {
+ foreach ((array) $allowed as $method) {
+ if (!is_callable(array($object_impl, $method))) {
+ throw new SmartyException("Undefined method '$method' in registered object");
+ }
+ }
+ }
+ // test if block methodes callable
+ if (!empty($block_methods)) {
+ foreach ((array) $block_methods as $method) {
+ if (!is_callable(array($object_impl, $method))) {
+ throw new SmartyException("Undefined method '$method' in registered object");
+ }
+ }
+ }
+ // register the object
+ $this->smarty->registered_objects[$object_name] =
+ array($object_impl, (array) $allowed, (boolean) $smarty_args, (array) $block_methods);
+ return $this;
+ }
+
+ /**
+ * return a reference to a registered object
+ *
+ * @param string $name object name
+ * @return object
+ * @throws SmartyException if no such object is found
+ */
+ public function getRegisteredObject($name)
+ {
+ if (!isset($this->smarty->registered_objects[$name])) {
+ throw new SmartyException("'$name' is not a registered object");
+ }
+ if (!is_object($this->smarty->registered_objects[$name][0])) {
+ throw new SmartyException("registered '$name' is not an object");
+ }
+ return $this->smarty->registered_objects[$name][0];
+ }
+
+ /**
+ * unregister an object
+ *
+ * @param string $name object name
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function unregisterObject($name)
+ {
+ if (isset($this->smarty->registered_objects[$name])) {
+ unset($this->smarty->registered_objects[$name]);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Registers static classes to be used in templates
+ *
+ * @param string $class name of template class
+ * @param string $class_impl the referenced PHP class to register
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ * @throws SmartyException if $class_impl does not refer to an existing class
+ */
+ public function registerClass($class_name, $class_impl)
+ {
+ // test if exists
+ if (!class_exists($class_impl)) {
+ throw new SmartyException("Undefined class '$class_impl' in register template class");
+ }
+ // register the class
+ $this->smarty->registered_classes[$class_name] = $class_impl;
+ return $this;
+ }
+
+ /**
+ * Registers a default plugin handler
+ *
+ * @param callable $callback class/method name
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ * @throws SmartyException if $callback is not callable
+ */
+ public function registerDefaultPluginHandler($callback)
+ {
+ if (is_callable($callback)) {
+ $this->smarty->default_plugin_handler_func = $callback;
+ } else {
+ throw new SmartyException("Default plugin handler '$callback' not callable");
+ }
+
+ return $this;
+ }
+
+ /**
+ * Registers a default template handler
+ *
+ * @param callable $callback class/method name
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ * @throws SmartyException if $callback is not callable
+ */
+ public function registerDefaultTemplateHandler($callback)
+ {
+ if (is_callable($callback)) {
+ $this->smarty->default_template_handler_func = $callback;
+ } else {
+ throw new SmartyException("Default template handler '$callback' not callable");
+ }
+
+ return $this;
+ }
+
+ /**
+ * Registers a default template handler
+ *
+ * @param callable $callback class/method name
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ * @throws SmartyException if $callback is not callable
+ */
+ public function registerDefaultConfigHandler($callback)
+ {
+ if (is_callable($callback)) {
+ $this->smarty->default_config_handler_func = $callback;
+ } else {
+ throw new SmartyException("Default config handler '$callback' not callable");
+ }
+
+ return $this;
+ }
+
+ /**
+ * Registers a filter function
+ *
+ * @param string $type filter type
+ * @param callback $callback
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function registerFilter($type, $callback)
+ {
+ $this->smarty->registered_filters[$type][$this->_get_filter_name($callback)] = $callback;
+ return $this;
+ }
+
+ /**
+ * Unregisters a filter function
+ *
+ * @param string $type filter type
+ * @param callback $callback
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function unregisterFilter($type, $callback)
+ {
+ $name = $this->_get_filter_name($callback);
+ if (isset($this->smarty->registered_filters[$type][$name])) {
+ unset($this->smarty->registered_filters[$type][$name]);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Return internal filter name
+ *
+ * @param callback $function_name
+ * @return string internal filter name
+ */
+ public function _get_filter_name($function_name)
+ {
+ if (is_array($function_name)) {
+ $_class_name = (is_object($function_name[0]) ?
+ get_class($function_name[0]) : $function_name[0]);
+ return $_class_name . '_' . $function_name[1];
+ } else {
+ return $function_name;
+ }
+ }
+
+ /**
+ * load a filter of specified type and name
+ *
+ * @param string $type filter type
+ * @param string $name filter name
+ * @throws SmartyException if filter could not be loaded
+ */
+ public function loadFilter($type, $name)
+ {
+ $_plugin = "smarty_{$type}filter_{$name}";
+ $_filter_name = $_plugin;
+ if ($this->smarty->loadPlugin($_plugin)) {
+ if (class_exists($_plugin, false)) {
+ $_plugin = array($_plugin, 'execute');
+ }
+ if (is_callable($_plugin)) {
+ $this->smarty->registered_filters[$type][$_filter_name] = $_plugin;
+ return true;
+ }
+ }
+ throw new SmartyException("{$type}filter \"{$name}\" not callable");
+ }
+
+ /**
+ * unload a filter of specified type and name
+ *
+ * @param string $type filter type
+ * @param string $name filter name
+ * @return Smarty_Internal_Templatebase current Smarty_Internal_Templatebase (or Smarty or Smarty_Internal_Template) instance for chaining
+ */
+ public function unloadFilter($type, $name)
+ {
+ $_filter_name = "smarty_{$type}filter_{$name}";
+ if (isset($this->smarty->registered_filters[$type][$_filter_name])) {
+ unset ($this->smarty->registered_filters[$type][$_filter_name]);
+ }
+
+ return $this;
+ }
+
+ /**
+ * preg_replace callback to convert camelcase getter/setter to underscore property names
+ *
+ * @param string $match match string
+ * @return string replacemant
+ */
+ private function replaceCamelcase($match) {
+ return "_" . strtolower($match[1]);
+ }
+
+ /**
+ * Handle unknown class methods
+ *
+ * @param string $name unknown method-name
+ * @param array $args argument array
+ */
+ public function __call($name, $args)
+ {
+ static $_prefixes = array('set' => true, 'get' => true);
+ static $_resolved_property_name = array();
+ static $_resolved_property_source = array();
+
+ // method of Smarty object?
+ if (method_exists($this->smarty, $name)) {
+ return call_user_func_array(array($this->smarty, $name), $args);
+ }
+ // see if this is a set/get for a property
+ $first3 = strtolower(substr($name, 0, 3));
+ if (isset($_prefixes[$first3]) && isset($name[3]) && $name[3] !== '_') {
+ if (isset($_resolved_property_name[$name])) {
+ $property_name = $_resolved_property_name[$name];
+ } else {
+ // try to keep case correct for future PHP 6.0 case-sensitive class methods
+ // lcfirst() not available < PHP 5.3.0, so improvise
+ $property_name = strtolower(substr($name, 3, 1)) . substr($name, 4);
+ // convert camel case to underscored name
+ $property_name = preg_replace_callback('/([A-Z])/', array($this,'replaceCamelcase'), $property_name);
+ $_resolved_property_name[$name] = $property_name;
+ }
+ if (isset($_resolved_property_source[$property_name])) {
+ $_is_this = $_resolved_property_source[$property_name];
+ } else {
+ $_is_this = null;
+ if (property_exists($this, $property_name)) {
+ $_is_this = true;
+ } else if (property_exists($this->smarty, $property_name)) {
+ $_is_this = false;
+ }
+ $_resolved_property_source[$property_name] = $_is_this;
+ }
+ if ($_is_this) {
+ if ($first3 == 'get')
+ return $this->$property_name;
+ else
+ return $this->$property_name = $args[0];
+ } else if ($_is_this === false) {
+ if ($first3 == 'get')
+ return $this->smarty->$property_name;
+ else
+ return $this->smarty->$property_name = $args[0];
+ } else {
+ throw new SmartyException("property '$property_name' does not exist.");
+ return false;
+ }
+ }
+ if ($name == 'Smarty') {
+ throw new SmartyException("PHP5 requires you to call __construct() instead of Smarty()");
+ }
+ // must be unknown
+ throw new SmartyException("Call of unknown method '$name'.");
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php b/library/Smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php
new file mode 100644
index 000000000..85906239d
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php
@@ -0,0 +1,661 @@
+<?php
+
+/**
+ * Smarty Internal Plugin Smarty Template Compiler Base
+ *
+ * This file contains the basic classes and methodes for compiling Smarty templates with lexer/parser
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ * @author Uwe Tews
+ */
+
+/**
+ * Main abstract compiler class
+ *
+ * @package Smarty
+ * @subpackage Compiler
+ */
+abstract class Smarty_Internal_TemplateCompilerBase {
+
+ /**
+ * hash for nocache sections
+ *
+ * @var mixed
+ */
+ private $nocache_hash = null;
+
+ /**
+ * suppress generation of nocache code
+ *
+ * @var bool
+ */
+ public $suppressNocacheProcessing = false;
+
+ /**
+ * suppress generation of merged template code
+ *
+ * @var bool
+ */
+ public $suppressMergedTemplates = false;
+
+ /**
+ * compile tag objects
+ *
+ * @var array
+ */
+ public static $_tag_objects = array();
+
+ /**
+ * tag stack
+ *
+ * @var array
+ */
+ public $_tag_stack = array();
+
+ /**
+ * current template
+ *
+ * @var Smarty_Internal_Template
+ */
+ public $template = null;
+
+ /**
+ * merged templates
+ *
+ * @var array
+ */
+ public $merged_templates = array();
+
+ /**
+ * flag when compiling {block}
+ *
+ * @var bool
+ */
+ public $inheritance = false;
+
+ /**
+ * plugins loaded by default plugin handler
+ *
+ * @var array
+ */
+ public $default_handler_plugins = array();
+
+ /**
+ * saved preprocessed modifier list
+ *
+ * @var mixed
+ */
+ public $default_modifier_list = null;
+
+ /**
+ * force compilation of complete template as nocache
+ * @var boolean
+ */
+ public $forceNocache = false;
+
+ /**
+ * suppress Smarty header code in compiled template
+ * @var bool
+ */
+ public $suppressHeader = false;
+
+ /**
+ * suppress template property header code in compiled template
+ * @var bool
+ */
+ public $suppressTemplatePropertyHeader = false;
+
+ /**
+ * flag if compiled template file shall we written
+ * @var bool
+ */
+ public $write_compiled_code = true;
+
+ /**
+ * flag if currently a template function is compiled
+ * @var bool
+ */
+ public $compiles_template_function = false;
+
+ /**
+ * called subfuntions from template function
+ * @var array
+ */
+ public $called_functions = array();
+
+ /**
+ * flags for used modifier plugins
+ * @var array
+ */
+ public $modifier_plugins = array();
+
+ /**
+ * type of already compiled modifier
+ * @var array
+ */
+ public $known_modifier_type = array();
+
+ /**
+ * Initialize compiler
+ */
+ public function __construct() {
+ $this->nocache_hash = str_replace('.', '-', uniqid(rand(), true));
+ }
+
+ /**
+ * Method to compile a Smarty template
+ *
+ * @param Smarty_Internal_Template $template template object to compile
+ * @return bool true if compiling succeeded, false if it failed
+ */
+ public function compileTemplate(Smarty_Internal_Template $template) {
+ if (empty($template->properties['nocache_hash'])) {
+ $template->properties['nocache_hash'] = $this->nocache_hash;
+ } else {
+ $this->nocache_hash = $template->properties['nocache_hash'];
+ }
+ // flag for nochache sections
+ $this->nocache = false;
+ $this->tag_nocache = false;
+ // save template object in compiler class
+ $this->template = $template;
+ // reset has noche code flag
+ $this->template->has_nocache_code = false;
+ $this->smarty->_current_file = $saved_filepath = $this->template->source->filepath;
+ // template header code
+ $template_header = '';
+ if (!$this->suppressHeader) {
+ $template_header .= "<?php /* Smarty version " . Smarty::SMARTY_VERSION . ", created on " . strftime("%Y-%m-%d %H:%M:%S") . "\n";
+ $template_header .= " compiled from \"" . $this->template->source->filepath . "\" */ ?>\n";
+ }
+
+ do {
+ // flag for aborting current and start recompile
+ $this->abort_and_recompile = false;
+ // get template source
+ $_content = $template->source->content;
+ // run prefilter if required
+ if (isset($this->smarty->autoload_filters['pre']) || isset($this->smarty->registered_filters['pre'])) {
+ $_content = Smarty_Internal_Filter_Handler::runFilter('pre', $_content, $template);
+ }
+ // on empty template just return header
+ if ($_content == '') {
+ if ($this->suppressTemplatePropertyHeader) {
+ $code = '';
+ } else {
+ $code = $template_header . $template->createTemplateCodeFrame();
+ }
+ return $code;
+ }
+ // call compiler
+ $_compiled_code = $this->doCompile($_content);
+ } while ($this->abort_and_recompile);
+ $this->template->source->filepath = $saved_filepath;
+ // free memory
+ unset($this->parser->root_buffer, $this->parser->current_buffer, $this->parser, $this->lex, $this->template);
+ self::$_tag_objects = array();
+ // return compiled code to template object
+ $merged_code = '';
+ if (!$this->suppressMergedTemplates && !empty($this->merged_templates)) {
+ foreach ($this->merged_templates as $code) {
+ $merged_code .= $code;
+ }
+ // run postfilter if required on merged code
+ if (isset($this->smarty->autoload_filters['post']) || isset($this->smarty->registered_filters['post'])) {
+ $merged_code = Smarty_Internal_Filter_Handler::runFilter('post', $merged_code, $template);
+ }
+ }
+ // run postfilter if required on compiled template code
+ if (isset($this->smarty->autoload_filters['post']) || isset($this->smarty->registered_filters['post'])) {
+ $_compiled_code = Smarty_Internal_Filter_Handler::runFilter('post', $_compiled_code, $template);
+ }
+ if ($this->suppressTemplatePropertyHeader) {
+ $code = $_compiled_code . $merged_code;
+ } else {
+ $code = $template_header . $template->createTemplateCodeFrame($_compiled_code) . $merged_code;
+ }
+ return $code;
+ }
+
+ /**
+ * Compile Tag
+ *
+ * This is a call back from the lexer/parser
+ * It executes the required compile plugin for the Smarty tag
+ *
+ * @param string $tag tag name
+ * @param array $args array with tag attributes
+ * @param array $parameter array with compilation parameter
+ * @return string compiled code
+ */
+ public function compileTag($tag, $args, $parameter = array()) {
+ // $args contains the attributes parsed and compiled by the lexer/parser
+ // assume that tag does compile into code, but creates no HTML output
+ $this->has_code = true;
+ $this->has_output = false;
+ // log tag/attributes
+ if (isset($this->smarty->get_used_tags) && $this->smarty->get_used_tags) {
+ $this->template->used_tags[] = array($tag, $args);
+ }
+ // check nocache option flag
+ if (in_array("'nocache'", $args) || in_array(array('nocache' => 'true'), $args)
+ || in_array(array('nocache' => '"true"'), $args) || in_array(array('nocache' => "'true'"), $args)) {
+ $this->tag_nocache = true;
+ }
+ // compile the smarty tag (required compile classes to compile the tag are autoloaded)
+ if (($_output = $this->callTagCompiler($tag, $args, $parameter)) === false) {
+ if (isset($this->smarty->template_functions[$tag])) {
+ // template defined by {template} tag
+ $args['_attr']['name'] = "'" . $tag . "'";
+ $_output = $this->callTagCompiler('call', $args, $parameter);
+ }
+ }
+ if ($_output !== false) {
+ if ($_output !== true) {
+ // did we get compiled code
+ if ($this->has_code) {
+ // Does it create output?
+ if ($this->has_output) {
+ $_output .= "\n";
+ }
+ // return compiled code
+ return $_output;
+ }
+ }
+ // tag did not produce compiled code
+ return '';
+ } else {
+ // map_named attributes
+ if (isset($args['_attr'])) {
+ foreach ($args['_attr'] as $key => $attribute) {
+ if (is_array($attribute)) {
+ $args = array_merge($args, $attribute);
+ }
+ }
+ }
+ // not an internal compiler tag
+ if (strlen($tag) < 6 || substr($tag, -5) != 'close') {
+ // check if tag is a registered object
+ if (isset($this->smarty->registered_objects[$tag]) && isset($parameter['object_methode'])) {
+ $methode = $parameter['object_methode'];
+ if (!in_array($methode, $this->smarty->registered_objects[$tag][3]) &&
+ (empty($this->smarty->registered_objects[$tag][1]) || in_array($methode, $this->smarty->registered_objects[$tag][1]))) {
+ return $this->callTagCompiler('private_object_function', $args, $parameter, $tag, $methode);
+ } elseif (in_array($methode, $this->smarty->registered_objects[$tag][3])) {
+ return $this->callTagCompiler('private_object_block_function', $args, $parameter, $tag, $methode);
+ } else {
+ return $this->trigger_template_error('unallowed methode "' . $methode . '" in registered object "' . $tag . '"', $this->lex->taglineno);
+ }
+ }
+ // check if tag is registered
+ foreach (array(Smarty::PLUGIN_COMPILER, Smarty::PLUGIN_FUNCTION, Smarty::PLUGIN_BLOCK) as $plugin_type) {
+ if (isset($this->smarty->registered_plugins[$plugin_type][$tag])) {
+ // if compiler function plugin call it now
+ if ($plugin_type == Smarty::PLUGIN_COMPILER) {
+ $new_args = array();
+ foreach ($args as $key => $mixed) {
+ if (is_array($mixed)) {
+ $new_args = array_merge($new_args, $mixed);
+ } else {
+ $new_args[$key] = $mixed;
+ }
+ }
+ if (!$this->smarty->registered_plugins[$plugin_type][$tag][1]) {
+ $this->tag_nocache = true;
+ }
+ $function = $this->smarty->registered_plugins[$plugin_type][$tag][0];
+ if (!is_array($function)) {
+ return $function($new_args, $this);
+ } else if (is_object($function[0])) {
+ return $this->smarty->registered_plugins[$plugin_type][$tag][0][0]->$function[1]($new_args, $this);
+ } else {
+ return call_user_func_array($function, array($new_args, $this));
+ }
+ }
+ // compile registered function or block function
+ if ($plugin_type == Smarty::PLUGIN_FUNCTION || $plugin_type == Smarty::PLUGIN_BLOCK) {
+ return $this->callTagCompiler('private_registered_' . $plugin_type, $args, $parameter, $tag);
+ }
+ }
+ }
+ // check plugins from plugins folder
+ foreach ($this->smarty->plugin_search_order as $plugin_type) {
+ if ($plugin_type == Smarty::PLUGIN_BLOCK && $this->smarty->loadPlugin('smarty_compiler_' . $tag) && (!isset($this->smarty->security_policy) || $this->smarty->security_policy->isTrustedTag($tag, $this))) {
+ $plugin = 'smarty_compiler_' . $tag;
+ if (is_callable($plugin)) {
+ // convert arguments format for old compiler plugins
+ $new_args = array();
+ foreach ($args as $key => $mixed) {
+ if (is_array($mixed)) {
+ $new_args = array_merge($new_args, $mixed);
+ } else {
+ $new_args[$key] = $mixed;
+ }
+ }
+ return $plugin($new_args, $this->smarty);
+ }
+ if (class_exists($plugin, false)) {
+ $plugin_object = new $plugin;
+ if (method_exists($plugin_object, 'compile')) {
+ return $plugin_object->compile($args, $this);
+ }
+ }
+ throw new SmartyException("Plugin \"{$tag}\" not callable");
+ } else {
+ if ($function = $this->getPlugin($tag, $plugin_type)) {
+ if (!isset($this->smarty->security_policy) || $this->smarty->security_policy->isTrustedTag($tag, $this)) {
+ return $this->callTagCompiler('private_' . $plugin_type . '_plugin', $args, $parameter, $tag, $function);
+ }
+ }
+ }
+ }
+ if (is_callable($this->smarty->default_plugin_handler_func)) {
+ $found = false;
+ // look for already resolved tags
+ foreach ($this->smarty->plugin_search_order as $plugin_type) {
+ if (isset($this->default_handler_plugins[$plugin_type][$tag])) {
+ $found = true;
+ break;
+ }
+ }
+ if (!$found) {
+ // call default handler
+ foreach ($this->smarty->plugin_search_order as $plugin_type) {
+ if ($this->getPluginFromDefaultHandler($tag, $plugin_type)) {
+ $found = true;
+ break;
+ }
+ }
+ }
+ if ($found) {
+ // if compiler function plugin call it now
+ if ($plugin_type == Smarty::PLUGIN_COMPILER) {
+ $new_args = array();
+ foreach ($args as $mixed) {
+ $new_args = array_merge($new_args, $mixed);
+ }
+ $function = $this->default_handler_plugins[$plugin_type][$tag][0];
+ if (!is_array($function)) {
+ return $function($new_args, $this);
+ } else if (is_object($function[0])) {
+ return $this->default_handler_plugins[$plugin_type][$tag][0][0]->$function[1]($new_args, $this);
+ } else {
+ return call_user_func_array($function, array($new_args, $this));
+ }
+ } else {
+ return $this->callTagCompiler('private_registered_' . $plugin_type, $args, $parameter, $tag);
+ }
+ }
+ }
+ } else {
+ // compile closing tag of block function
+ $base_tag = substr($tag, 0, -5);
+ // check if closing tag is a registered object
+ if (isset($this->smarty->registered_objects[$base_tag]) && isset($parameter['object_methode'])) {
+ $methode = $parameter['object_methode'];
+ if (in_array($methode, $this->smarty->registered_objects[$base_tag][3])) {
+ return $this->callTagCompiler('private_object_block_function', $args, $parameter, $tag, $methode);
+ } else {
+ return $this->trigger_template_error('unallowed closing tag methode "' . $methode . '" in registered object "' . $base_tag . '"', $this->lex->taglineno);
+ }
+ }
+ // registered block tag ?
+ if (isset($this->smarty->registered_plugins[Smarty::PLUGIN_BLOCK][$base_tag]) || isset($this->default_handler_plugins[Smarty::PLUGIN_BLOCK][$base_tag])) {
+ return $this->callTagCompiler('private_registered_block', $args, $parameter, $tag);
+ }
+ // block plugin?
+ if ($function = $this->getPlugin($base_tag, Smarty::PLUGIN_BLOCK)) {
+ return $this->callTagCompiler('private_block_plugin', $args, $parameter, $tag, $function);
+ }
+ // registered compiler plugin ?
+ if (isset($this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag])) {
+ // if compiler function plugin call it now
+ $args = array();
+ if (!$this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag][1]) {
+ $this->tag_nocache = true;
+ }
+ $function = $this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag][0];
+ if (!is_array($function)) {
+ return $function($args, $this);
+ } else if (is_object($function[0])) {
+ return $this->smarty->registered_plugins[Smarty::PLUGIN_COMPILER][$tag][0][0]->$function[1]($args, $this);
+ } else {
+ return call_user_func_array($function, array($args, $this));
+ }
+ }
+ if ($this->smarty->loadPlugin('smarty_compiler_' . $tag)) {
+ $plugin = 'smarty_compiler_' . $tag;
+ if (is_callable($plugin)) {
+ return $plugin($args, $this->smarty);
+ }
+ if (class_exists($plugin, false)) {
+ $plugin_object = new $plugin;
+ if (method_exists($plugin_object, 'compile')) {
+ return $plugin_object->compile($args, $this);
+ }
+ }
+ throw new SmartyException("Plugin \"{$tag}\" not callable");
+ }
+ }
+ $this->trigger_template_error("unknown tag \"" . $tag . "\"", $this->lex->taglineno);
+ }
+ }
+
+ /**
+ * lazy loads internal compile plugin for tag and calls the compile methode
+ *
+ * compile objects cached for reuse.
+ * class name format: Smarty_Internal_Compile_TagName
+ * plugin filename format: Smarty_Internal_Tagname.php
+ *
+ * @param string $tag tag name
+ * @param array $args list of tag attributes
+ * @param mixed $param1 optional parameter
+ * @param mixed $param2 optional parameter
+ * @param mixed $param3 optional parameter
+ * @return string compiled code
+ */
+ public function callTagCompiler($tag, $args, $param1 = null, $param2 = null, $param3 = null) {
+ // re-use object if already exists
+ if (isset(self::$_tag_objects[$tag])) {
+ // compile this tag
+ return self::$_tag_objects[$tag]->compile($args, $this, $param1, $param2, $param3);
+ }
+ // lazy load internal compiler plugin
+ $class_name = 'Smarty_Internal_Compile_' . $tag;
+ if ($this->smarty->loadPlugin($class_name)) {
+ // check if tag allowed by security
+ if (!isset($this->smarty->security_policy) || $this->smarty->security_policy->isTrustedTag($tag, $this)) {
+ // use plugin if found
+ self::$_tag_objects[$tag] = new $class_name;
+ // compile this tag
+ return self::$_tag_objects[$tag]->compile($args, $this, $param1, $param2, $param3);
+ }
+ }
+ // no internal compile plugin for this tag
+ return false;
+ }
+
+ /**
+ * Check for plugins and return function name
+ *
+ * @param string $pugin_name name of plugin or function
+ * @param string $plugin_type type of plugin
+ * @return string call name of function
+ */
+ public function getPlugin($plugin_name, $plugin_type) {
+ $function = null;
+ if ($this->template->caching && ($this->nocache || $this->tag_nocache)) {
+ if (isset($this->template->required_plugins['nocache'][$plugin_name][$plugin_type])) {
+ $function = $this->template->required_plugins['nocache'][$plugin_name][$plugin_type]['function'];
+ } else if (isset($this->template->required_plugins['compiled'][$plugin_name][$plugin_type])) {
+ $this->template->required_plugins['nocache'][$plugin_name][$plugin_type] = $this->template->required_plugins['compiled'][$plugin_name][$plugin_type];
+ $function = $this->template->required_plugins['nocache'][$plugin_name][$plugin_type]['function'];
+ }
+ } else {
+ if (isset($this->template->required_plugins['compiled'][$plugin_name][$plugin_type])) {
+ $function = $this->template->required_plugins['compiled'][$plugin_name][$plugin_type]['function'];
+ } else if (isset($this->template->required_plugins['nocache'][$plugin_name][$plugin_type])) {
+ $this->template->required_plugins['compiled'][$plugin_name][$plugin_type] = $this->template->required_plugins['nocache'][$plugin_name][$plugin_type];
+ $function = $this->template->required_plugins['compiled'][$plugin_name][$plugin_type]['function'];
+ }
+ }
+ if (isset($function)) {
+ if ($plugin_type == 'modifier') {
+ $this->modifier_plugins[$plugin_name] = true;
+ }
+ return $function;
+ }
+ // loop through plugin dirs and find the plugin
+ $function = 'smarty_' . $plugin_type . '_' . $plugin_name;
+ $file = $this->smarty->loadPlugin($function, false);
+
+ if (is_string($file)) {
+ if ($this->template->caching && ($this->nocache || $this->tag_nocache)) {
+ $this->template->required_plugins['nocache'][$plugin_name][$plugin_type]['file'] = $file;
+ $this->template->required_plugins['nocache'][$plugin_name][$plugin_type]['function'] = $function;
+ } else {
+ $this->template->required_plugins['compiled'][$plugin_name][$plugin_type]['file'] = $file;
+ $this->template->required_plugins['compiled'][$plugin_name][$plugin_type]['function'] = $function;
+ }
+ if ($plugin_type == 'modifier') {
+ $this->modifier_plugins[$plugin_name] = true;
+ }
+ return $function;
+ }
+ if (is_callable($function)) {
+ // plugin function is defined in the script
+ return $function;
+ }
+ return false;
+ }
+
+ /**
+ * Check for plugins by default plugin handler
+ *
+ * @param string $tag name of tag
+ * @param string $plugin_type type of plugin
+ * @return boolean true if found
+ */
+ public function getPluginFromDefaultHandler($tag, $plugin_type) {
+ $callback = null;
+ $script = null;
+ $cacheable = true;
+ $result = call_user_func_array(
+ $this->smarty->default_plugin_handler_func, array($tag, $plugin_type, $this->template, &$callback, &$script, &$cacheable)
+ );
+ if ($result) {
+ $this->tag_nocache = $this->tag_nocache || !$cacheable;
+ if ($script !== null) {
+ if (is_file($script)) {
+ if ($this->template->caching && ($this->nocache || $this->tag_nocache)) {
+ $this->template->required_plugins['nocache'][$tag][$plugin_type]['file'] = $script;
+ $this->template->required_plugins['nocache'][$tag][$plugin_type]['function'] = $callback;
+ } else {
+ $this->template->required_plugins['compiled'][$tag][$plugin_type]['file'] = $script;
+ $this->template->required_plugins['compiled'][$tag][$plugin_type]['function'] = $callback;
+ }
+ include_once $script;
+ } else {
+ $this->trigger_template_error("Default plugin handler: Returned script file \"{$script}\" for \"{$tag}\" not found");
+ }
+ }
+ if (!is_string($callback) && !(is_array($callback) && is_string($callback[0]) && is_string($callback[1]))) {
+ $this->trigger_template_error("Default plugin handler: Returned callback for \"{$tag}\" must be a static function name or array of class and function name");
+ }
+ if (is_callable($callback)) {
+ $this->default_handler_plugins[$plugin_type][$tag] = array($callback, true, array());
+ return true;
+ } else {
+ $this->trigger_template_error("Default plugin handler: Returned callback for \"{$tag}\" not callable");
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Inject inline code for nocache template sections
+ *
+ * This method gets the content of each template element from the parser.
+ * If the content is compiled code and it should be not cached the code is injected
+ * into the rendered output.
+ *
+ * @param string $content content of template element
+ * @param boolean $is_code true if content is compiled code
+ * @return string content
+ */
+ public function processNocacheCode($content, $is_code) {
+ // If the template is not evaluated and we have a nocache section and or a nocache tag
+ if ($is_code && !empty($content)) {
+ // generate replacement code
+ if ((!($this->template->source->recompiled) || $this->forceNocache) && $this->template->caching && !$this->suppressNocacheProcessing &&
+ ($this->nocache || $this->tag_nocache || $this->forceNocache == 2)) {
+ $this->template->has_nocache_code = true;
+ $_output = str_replace("'", "\'", $content);
+ $_output = str_replace('\\\\', '\\\\\\\\', $_output);
+ $_output = str_replace("^#^", "'", $_output);
+ $_output = "<?php echo '/*%%SmartyNocache:{$this->nocache_hash}%%*/" . $_output . "/*/%%SmartyNocache:{$this->nocache_hash}%%*/';?>\n";
+ // make sure we include modifer plugins for nocache code
+ foreach ($this->modifier_plugins as $plugin_name => $dummy) {
+ if (isset($this->template->required_plugins['compiled'][$plugin_name]['modifier'])) {
+ $this->template->required_plugins['nocache'][$plugin_name]['modifier'] = $this->template->required_plugins['compiled'][$plugin_name]['modifier'];
+ }
+ }
+ } else {
+ $_output = $content;
+ }
+ } else {
+ $_output = $content;
+ }
+ $this->modifier_plugins = array();
+ $this->suppressNocacheProcessing = false;
+ $this->tag_nocache = false;
+ return $_output;
+ }
+
+ /**
+ * display compiler error messages without dying
+ *
+ * If parameter $args is empty it is a parser detected syntax error.
+ * In this case the parser is called to obtain information about expected tokens.
+ *
+ * If parameter $args contains a string this is used as error message
+ *
+ * @param string $args individual error message or null
+ * @param string $line line-number
+ * @throws SmartyCompilerException when an unexpected token is found
+ */
+ public function trigger_template_error($args = null, $line = null) {
+ // get template source line which has error
+ if (!isset($line)) {
+ $line = $this->lex->line;
+ }
+ $match = preg_split("/\n/", $this->lex->data);
+ $error_text = 'Syntax Error in template "' . $this->template->source->filepath . '" on line ' . $line . ' "' . htmlspecialchars(trim(preg_replace('![\t\r\n]+!', ' ', $match[$line - 1]))) . '" ';
+ if (isset($args)) {
+ // individual error message
+ $error_text .= $args;
+ } else {
+ // expected token from parser
+ $error_text .= ' - Unexpected "' . $this->lex->value . '"';
+ if (count($this->parser->yy_get_expected_tokens($this->parser->yymajor)) <= 4) {
+ foreach ($this->parser->yy_get_expected_tokens($this->parser->yymajor) as $token) {
+ $exp_token = $this->parser->yyTokenName[$token];
+ if (isset($this->lex->smarty_token_names[$exp_token])) {
+ // token type from lexer
+ $expect[] = '"' . $this->lex->smarty_token_names[$exp_token] . '"';
+ } else {
+ // otherwise internal token name
+ $expect[] = $this->parser->yyTokenName[$token];
+ }
+ }
+ $error_text .= ', expected one of: ' . implode(' , ', $expect);
+ }
+ }
+ throw new SmartyCompilerException($error_text);
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_templatelexer.php b/library/Smarty/libs/sysplugins/smarty_internal_templatelexer.php
new file mode 100644
index 000000000..bfc413aef
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_templatelexer.php
@@ -0,0 +1,1190 @@
+<?php
+/**
+* Smarty Internal Plugin Templatelexer
+*
+* This is the lexer to break the template source into tokens
+* @package Smarty
+* @subpackage Compiler
+* @author Uwe Tews
+*/
+/**
+* Smarty Internal Plugin Templatelexer
+*/
+class Smarty_Internal_Templatelexer
+{
+ public $data;
+ public $counter;
+ public $token;
+ public $value;
+ public $node;
+ public $line;
+ public $taglineno;
+ public $state = 1;
+ private $heredoc_id_stack = Array();
+ public $smarty_token_names = array ( // Text for parser error messages
+ 'IDENTITY' => '===',
+ 'NONEIDENTITY' => '!==',
+ 'EQUALS' => '==',
+ 'NOTEQUALS' => '!=',
+ 'GREATEREQUAL' => '(>=,ge)',
+ 'LESSEQUAL' => '(<=,le)',
+ 'GREATERTHAN' => '(>,gt)',
+ 'LESSTHAN' => '(<,lt)',
+ 'MOD' => '(%,mod)',
+ 'NOT' => '(!,not)',
+ 'LAND' => '(&&,and)',
+ 'LOR' => '(||,or)',
+ 'LXOR' => 'xor',
+ 'OPENP' => '(',
+ 'CLOSEP' => ')',
+ 'OPENB' => '[',
+ 'CLOSEB' => ']',
+ 'PTR' => '->',
+ 'APTR' => '=>',
+ 'EQUAL' => '=',
+ 'NUMBER' => 'number',
+ 'UNIMATH' => '+" , "-',
+ 'MATH' => '*" , "/" , "%',
+ 'INCDEC' => '++" , "--',
+ 'SPACE' => ' ',
+ 'DOLLAR' => '$',
+ 'SEMICOLON' => ';',
+ 'COLON' => ':',
+ 'DOUBLECOLON' => '::',
+ 'AT' => '@',
+ 'HATCH' => '#',
+ 'QUOTE' => '"',
+ 'BACKTICK' => '`',
+ 'VERT' => '|',
+ 'DOT' => '.',
+ 'COMMA' => '","',
+ 'ANDSYM' => '"&"',
+ 'QMARK' => '"?"',
+ 'ID' => 'identifier',
+ 'TEXT' => 'text',
+ 'FAKEPHPSTARTTAG' => 'Fake PHP start tag',
+ 'PHPSTARTTAG' => 'PHP start tag',
+ 'PHPENDTAG' => 'PHP end tag',
+ 'LITERALSTART' => 'Literal start',
+ 'LITERALEND' => 'Literal end',
+ 'LDELSLASH' => 'closing tag',
+ 'COMMENT' => 'comment',
+ 'AS' => 'as',
+ 'TO' => 'to',
+ );
+
+
+ function __construct($data,$compiler)
+ {
+// $this->data = preg_replace("/(\r\n|\r|\n)/", "\n", $data);
+ $this->data = $data;
+ $this->counter = 0;
+ $this->line = 1;
+ $this->smarty = $compiler->smarty;
+ $this->compiler = $compiler;
+ $this->ldel = preg_quote($this->smarty->left_delimiter,'/');
+ $this->ldel_length = strlen($this->smarty->left_delimiter);
+ $this->rdel = preg_quote($this->smarty->right_delimiter,'/');
+ $this->smarty_token_names['LDEL'] = $this->smarty->left_delimiter;
+ $this->smarty_token_names['RDEL'] = $this->smarty->right_delimiter;
+ $this->mbstring_overload = ini_get('mbstring.func_overload') & 2;
+ }
+
+
+ private $_yy_state = 1;
+ private $_yy_stack = array();
+
+ function yylex()
+ {
+ return $this->{'yylex' . $this->_yy_state}();
+ }
+
+ function yypushstate($state)
+ {
+ array_push($this->_yy_stack, $this->_yy_state);
+ $this->_yy_state = $state;
+ }
+
+ function yypopstate()
+ {
+ $this->_yy_state = array_pop($this->_yy_stack);
+ }
+
+ function yybegin($state)
+ {
+ $this->_yy_state = $state;
+ }
+
+
+
+ function yylex1()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ 3 => 1,
+ 5 => 0,
+ 6 => 0,
+ 7 => 0,
+ 8 => 0,
+ 9 => 0,
+ 10 => 0,
+ 11 => 1,
+ 13 => 0,
+ 14 => 0,
+ 15 => 0,
+ 16 => 0,
+ 17 => 0,
+ 18 => 0,
+ 19 => 0,
+ 20 => 0,
+ 21 => 0,
+ 22 => 0,
+ 23 => 0,
+ );
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/\G(".$this->ldel."[$]smarty\\.block\\.child".$this->rdel.")|\G(\\{\\})|\G(".$this->ldel."\\*([\S\s]*?)\\*".$this->rdel.")|\G(".$this->ldel."strip".$this->rdel.")|\G(".$this->ldel."\\s{1,}strip\\s{1,}".$this->rdel.")|\G(".$this->ldel."\/strip".$this->rdel.")|\G(".$this->ldel."\\s{1,}\/strip\\s{1,}".$this->rdel.")|\G(".$this->ldel."\\s*literal\\s*".$this->rdel.")|\G(".$this->ldel."\\s{1,}\/)|\G(".$this->ldel."\\s*(if|elseif|else if|while)\\s+)|\G(".$this->ldel."\\s*for\\s+)|\G(".$this->ldel."\\s*foreach(?![^\s]))|\G(".$this->ldel."\\s*setfilter\\s+)|\G(".$this->ldel."\\s{1,})|\G(".$this->ldel."\/)|\G(".$this->ldel.")|\G(<\\?(?:php\\w+|=|[a-zA-Z]+)?)|\G(\\?>)|\G(<%)|\G(%>)|\G([\S\s])/iS";
+
+ do {
+ if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ ' an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state TEXT');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r1_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const TEXT = 1;
+ function yy_r1_1($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_SMARTYBLOCKCHILD;
+ }
+ function yy_r1_2($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ }
+ function yy_r1_3($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_COMMENT;
+ }
+ function yy_r1_5($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_STRIPON;
+ }
+ function yy_r1_6($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_STRIPON;
+ }
+ }
+ function yy_r1_7($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_STRIPOFF;
+ }
+ function yy_r1_8($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_STRIPOFF;
+ }
+ }
+ function yy_r1_9($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART;
+ $this->yypushstate(self::LITERAL);
+ }
+ function yy_r1_10($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r1_11($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELIF;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r1_13($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELFOR;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r1_14($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r1_15($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELSETFILTER;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r1_16($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDEL;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r1_17($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ function yy_r1_18($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LDEL;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ function yy_r1_19($yy_subpatterns)
+ {
+
+ if (in_array($this->value, Array('<?', '<?=', '<?php'))) {
+ $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
+ } elseif ($this->value == '<?xml') {
+ $this->token = Smarty_Internal_Templateparser::TP_XMLTAG;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG;
+ $this->value = substr($this->value, 0, 2);
+ }
+ }
+ function yy_r1_20($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;
+ }
+ function yy_r1_21($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
+ }
+ function yy_r1_22($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
+ }
+ function yy_r1_23($yy_subpatterns)
+ {
+
+ if ($this->mbstring_overload) {
+ $to = mb_strlen($this->data,'latin1');
+ } else {
+ $to = strlen($this->data);
+ }
+ preg_match("/{$this->ldel}|<\?|\?>|<%|%>/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter);
+ if (isset($match[0][1])) {
+ $to = $match[0][1];
+ }
+ if ($this->mbstring_overload) {
+ $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1');
+ } else {
+ $this->value = substr($this->data,$this->counter,$to-$this->counter);
+ }
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ }
+
+
+ function yylex2()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ 3 => 1,
+ 5 => 0,
+ 6 => 0,
+ 7 => 0,
+ 8 => 0,
+ 9 => 0,
+ 10 => 0,
+ 11 => 0,
+ 12 => 0,
+ 13 => 0,
+ 14 => 0,
+ 15 => 0,
+ 16 => 0,
+ 17 => 0,
+ 18 => 0,
+ 19 => 0,
+ 20 => 1,
+ 22 => 1,
+ 24 => 1,
+ 26 => 0,
+ 27 => 0,
+ 28 => 0,
+ 29 => 0,
+ 30 => 0,
+ 31 => 0,
+ 32 => 0,
+ 33 => 0,
+ 34 => 0,
+ 35 => 0,
+ 36 => 0,
+ 37 => 0,
+ 38 => 0,
+ 39 => 0,
+ 40 => 0,
+ 41 => 0,
+ 42 => 0,
+ 43 => 3,
+ 47 => 0,
+ 48 => 0,
+ 49 => 0,
+ 50 => 0,
+ 51 => 0,
+ 52 => 0,
+ 53 => 0,
+ 54 => 0,
+ 55 => 1,
+ 57 => 1,
+ 59 => 0,
+ 60 => 0,
+ 61 => 0,
+ 62 => 0,
+ 63 => 0,
+ 64 => 0,
+ 65 => 0,
+ 66 => 0,
+ 67 => 0,
+ 68 => 0,
+ 69 => 0,
+ 70 => 0,
+ 71 => 0,
+ 72 => 0,
+ 73 => 0,
+ 74 => 0,
+ 75 => 0,
+ 76 => 0,
+ 77 => 0,
+ );
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/\G('[^'\\\\]*(?:\\\\.[^'\\\\]*)*')|\G(".$this->ldel."\\s{1,}\/)|\G(".$this->ldel."\\s*(if|elseif|else if|while)\\s+)|\G(".$this->ldel."\\s*for\\s+)|\G(".$this->ldel."\\s*foreach(?![^\s]))|\G(".$this->ldel."\\s{1,})|\G(\\s{1,}".$this->rdel.")|\G(".$this->ldel."\/)|\G(".$this->ldel.")|\G(".$this->rdel.")|\G(\\s+is\\s+in\\s+)|\G(\\s+as\\s+)|\G(\\s+to\\s+)|\G(\\s+step\\s+)|\G(\\s+instanceof\\s+)|\G(\\s*===\\s*)|\G(\\s*!==\\s*)|\G(\\s*==\\s*|\\s+eq\\s+)|\G(\\s*!=\\s*|\\s*<>\\s*|\\s+(ne|neq)\\s+)|\G(\\s*>=\\s*|\\s+(ge|gte)\\s+)|\G(\\s*<=\\s*|\\s+(le|lte)\\s+)|\G(\\s*>\\s*|\\s+gt\\s+)|\G(\\s*<\\s*|\\s+lt\\s+)|\G(\\s+mod\\s+)|\G(!\\s*|not\\s+)|\G(\\s*&&\\s*|\\s*and\\s+)|\G(\\s*\\|\\|\\s*|\\s*or\\s+)|\G(\\s*xor\\s+)|\G(\\s+is\\s+odd\\s+by\\s+)|\G(\\s+is\\s+not\\s+odd\\s+by\\s+)|\G(\\s+is\\s+odd)|\G(\\s+is\\s+not\\s+odd)|\G(\\s+is\\s+even\\s+by\\s+)|\G(\\s+is\\s+not\\s+even\\s+by\\s+)|\G(\\s+is\\s+even)|\G(\\s+is\\s+not\\s+even)|\G(\\s+is\\s+div\\s+by\\s+)|\G(\\s+is\\s+not\\s+div\\s+by\\s+)|\G(\\((int(eger)?|bool(ean)?|float|double|real|string|binary|array|object)\\)\\s*)|\G(\\s*\\(\\s*)|\G(\\s*\\))|\G(\\[\\s*)|\G(\\s*\\])|\G(\\s*->\\s*)|\G(\\s*=>\\s*)|\G(\\s*=\\s*)|\G(\\+\\+|--)|\G(\\s*(\\+|-)\\s*)|\G(\\s*(\\*|\/|%)\\s*)|\G(\\$)|\G(\\s*;)|\G(::)|\G(\\s*:\\s*)|\G(@)|\G(#)|\G(\")|\G(`)|\G(\\|)|\G(\\.)|\G(\\s*,\\s*)|\G(\\s*&\\s*)|\G(\\s*\\?\\s*)|\G(0[xX][0-9a-fA-F]+)|\G(\\s+[0-9]*[a-zA-Z_][a-zA-Z0-9_\-:]*\\s?=\\s?)|\G([0-9]*[a-zA-Z_]\\w*)|\G(\\d+)|\G(\\s+)|\G([\S\s])/iS";
+
+ do {
+ if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ ' an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state SMARTY');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r2_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const SMARTY = 2;
+ function yy_r2_1($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_SINGLEQUOTESTRING;
+ }
+ function yy_r2_2($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r2_3($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELIF;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r2_5($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELFOR;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r2_6($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r2_7($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDEL;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r2_8($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_RDEL;
+ $this->yypopstate();
+ }
+ function yy_r2_9($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ function yy_r2_10($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LDEL;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ function yy_r2_11($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_RDEL;
+ $this->yypopstate();
+ }
+ function yy_r2_12($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISIN;
+ }
+ function yy_r2_13($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_AS;
+ }
+ function yy_r2_14($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_TO;
+ }
+ function yy_r2_15($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_STEP;
+ }
+ function yy_r2_16($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_INSTANCEOF;
+ }
+ function yy_r2_17($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_IDENTITY;
+ }
+ function yy_r2_18($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_NONEIDENTITY;
+ }
+ function yy_r2_19($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_EQUALS;
+ }
+ function yy_r2_20($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_NOTEQUALS;
+ }
+ function yy_r2_22($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_GREATEREQUAL;
+ }
+ function yy_r2_24($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LESSEQUAL;
+ }
+ function yy_r2_26($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_GREATERTHAN;
+ }
+ function yy_r2_27($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LESSTHAN;
+ }
+ function yy_r2_28($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_MOD;
+ }
+ function yy_r2_29($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_NOT;
+ }
+ function yy_r2_30($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LAND;
+ }
+ function yy_r2_31($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LOR;
+ }
+ function yy_r2_32($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LXOR;
+ }
+ function yy_r2_33($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISODDBY;
+ }
+ function yy_r2_34($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISNOTODDBY;
+ }
+ function yy_r2_35($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISODD;
+ }
+ function yy_r2_36($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISNOTODD;
+ }
+ function yy_r2_37($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISEVENBY;
+ }
+ function yy_r2_38($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISNOTEVENBY;
+ }
+ function yy_r2_39($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISEVEN;
+ }
+ function yy_r2_40($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISNOTEVEN;
+ }
+ function yy_r2_41($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISDIVBY;
+ }
+ function yy_r2_42($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ISNOTDIVBY;
+ }
+ function yy_r2_43($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_TYPECAST;
+ }
+ function yy_r2_47($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_OPENP;
+ }
+ function yy_r2_48($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_CLOSEP;
+ }
+ function yy_r2_49($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_OPENB;
+ }
+ function yy_r2_50($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_CLOSEB;
+ }
+ function yy_r2_51($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_PTR;
+ }
+ function yy_r2_52($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_APTR;
+ }
+ function yy_r2_53($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_EQUAL;
+ }
+ function yy_r2_54($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_INCDEC;
+ }
+ function yy_r2_55($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_UNIMATH;
+ }
+ function yy_r2_57($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_MATH;
+ }
+ function yy_r2_59($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_DOLLAR;
+ }
+ function yy_r2_60($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_SEMICOLON;
+ }
+ function yy_r2_61($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_DOUBLECOLON;
+ }
+ function yy_r2_62($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_COLON;
+ }
+ function yy_r2_63($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_AT;
+ }
+ function yy_r2_64($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_HATCH;
+ }
+ function yy_r2_65($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_QUOTE;
+ $this->yypushstate(self::DOUBLEQUOTEDSTRING);
+ }
+ function yy_r2_66($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
+ $this->yypopstate();
+ }
+ function yy_r2_67($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_VERT;
+ }
+ function yy_r2_68($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_DOT;
+ }
+ function yy_r2_69($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_COMMA;
+ }
+ function yy_r2_70($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ANDSYM;
+ }
+ function yy_r2_71($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_QMARK;
+ }
+ function yy_r2_72($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_HEX;
+ }
+ function yy_r2_73($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ATTR;
+ }
+ function yy_r2_74($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ID;
+ }
+ function yy_r2_75($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_INTEGER;
+ }
+ function yy_r2_76($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_SPACE;
+ }
+ function yy_r2_77($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ }
+
+
+
+ function yylex3()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 0,
+ 3 => 0,
+ 4 => 0,
+ 5 => 0,
+ 6 => 0,
+ 7 => 0,
+ );
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/\G(".$this->ldel."\\s*literal\\s*".$this->rdel.")|\G(".$this->ldel."\\s*\/literal\\s*".$this->rdel.")|\G(<\\?(?:php\\w+|=|[a-zA-Z]+)?)|\G(\\?>)|\G(<%)|\G(%>)|\G([\S\s])/iS";
+
+ do {
+ if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ ' an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state LITERAL');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r3_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const LITERAL = 3;
+ function yy_r3_1($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LITERALSTART;
+ $this->yypushstate(self::LITERAL);
+ }
+ function yy_r3_2($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LITERALEND;
+ $this->yypopstate();
+ }
+ function yy_r3_3($yy_subpatterns)
+ {
+
+ if (in_array($this->value, Array('<?', '<?=', '<?php'))) {
+ $this->token = Smarty_Internal_Templateparser::TP_PHPSTARTTAG;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_FAKEPHPSTARTTAG;
+ $this->value = substr($this->value, 0, 2);
+ }
+ }
+ function yy_r3_4($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_PHPENDTAG;
+ }
+ function yy_r3_5($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ASPSTARTTAG;
+ }
+ function yy_r3_6($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_ASPENDTAG;
+ }
+ function yy_r3_7($yy_subpatterns)
+ {
+
+ if ($this->mbstring_overload) {
+ $to = mb_strlen($this->data,'latin1');
+ } else {
+ $to = strlen($this->data);
+ }
+ preg_match("/{$this->ldel}\/?literal{$this->rdel}|<\?|<%|\?>|%>/",$this->data,$match,PREG_OFFSET_CAPTURE,$this->counter);
+ if (isset($match[0][1])) {
+ $to = $match[0][1];
+ } else {
+ $this->compiler->trigger_template_error ("missing or misspelled literal closing tag");
+ }
+ if ($this->mbstring_overload) {
+ $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1');
+ } else {
+ $this->value = substr($this->data,$this->counter,$to-$this->counter);
+ }
+ $this->token = Smarty_Internal_Templateparser::TP_LITERAL;
+ }
+
+
+ function yylex4()
+ {
+ $tokenMap = array (
+ 1 => 0,
+ 2 => 1,
+ 4 => 0,
+ 5 => 0,
+ 6 => 0,
+ 7 => 0,
+ 8 => 0,
+ 9 => 0,
+ 10 => 0,
+ 11 => 0,
+ 12 => 0,
+ 13 => 3,
+ 17 => 0,
+ );
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ $yy_global_pattern = "/\G(".$this->ldel."\\s{1,}\/)|\G(".$this->ldel."\\s*(if|elseif|else if|while)\\s+)|\G(".$this->ldel."\\s*for\\s+)|\G(".$this->ldel."\\s*foreach(?![^\s]))|\G(".$this->ldel."\\s{1,})|\G(".$this->ldel."\/)|\G(".$this->ldel.")|\G(\")|\G(`\\$)|\G(\\$[0-9]*[a-zA-Z_]\\w*)|\G(\\$)|\G(([^\"\\\\]*?)((?:\\\\.[^\"\\\\]*?)*?)(?=(".$this->ldel."|\\$|`\\$|\")))|\G([\S\s])/iS";
+
+ do {
+ if ($this->mbstring_overload ? preg_match($yy_global_pattern, mb_substr($this->data, $this->counter,2000000000,'latin1'), $yymatches) : preg_match($yy_global_pattern,$this->data, $yymatches, null, $this->counter)) {
+ $yysubmatches = $yymatches;
+ $yymatches = array_filter($yymatches, 'strlen'); // remove empty sub-patterns
+ if (!count($yymatches)) {
+ throw new Exception('Error: lexing failed because a rule matched' .
+ ' an empty string. Input "' . substr($this->data,
+ $this->counter, 5) . '... state DOUBLEQUOTEDSTRING');
+ }
+ next($yymatches); // skip global match
+ $this->token = key($yymatches); // token number
+ if ($tokenMap[$this->token]) {
+ // extract sub-patterns for passing to lex function
+ $yysubmatches = array_slice($yysubmatches, $this->token + 1,
+ $tokenMap[$this->token]);
+ } else {
+ $yysubmatches = array();
+ }
+ $this->value = current($yymatches); // token value
+ $r = $this->{'yy_r4_' . $this->token}($yysubmatches);
+ if ($r === null) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ // accept this token
+ return true;
+ } elseif ($r === true) {
+ // we have changed state
+ // process this token in the new state
+ return $this->yylex();
+ } elseif ($r === false) {
+ $this->counter += ($this->mbstring_overload ? mb_strlen($this->value,'latin1'): strlen($this->value));
+ $this->line += substr_count($this->value, "\n");
+ if ($this->counter >= ($this->mbstring_overload ? mb_strlen($this->data,'latin1'): strlen($this->data))) {
+ return false; // end of input
+ }
+ // skip this token
+ continue;
+ } } else {
+ throw new Exception('Unexpected input at line' . $this->line .
+ ': ' . $this->data[$this->counter]);
+ }
+ break;
+ } while (true);
+
+ } // end function
+
+
+ const DOUBLEQUOTEDSTRING = 4;
+ function yy_r4_1($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r4_2($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELIF;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r4_4($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELFOR;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r4_5($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal && trim(substr($this->value,$this->ldel_length,1)) == '') {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDELFOREACH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r4_6($yy_subpatterns)
+ {
+
+ if ($this->smarty->auto_literal) {
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ } else {
+ $this->token = Smarty_Internal_Templateparser::TP_LDEL;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ }
+ function yy_r4_7($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LDELSLASH;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ function yy_r4_8($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_LDEL;
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ function yy_r4_9($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_QUOTE;
+ $this->yypopstate();
+ }
+ function yy_r4_10($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_BACKTICK;
+ $this->value = substr($this->value,0,-1);
+ $this->yypushstate(self::SMARTY);
+ $this->taglineno = $this->line;
+ }
+ function yy_r4_11($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_DOLLARID;
+ }
+ function yy_r4_12($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ }
+ function yy_r4_13($yy_subpatterns)
+ {
+
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ }
+ function yy_r4_17($yy_subpatterns)
+ {
+
+ if ($this->mbstring_overload) {
+ $to = mb_strlen($this->data,'latin1');
+ } else {
+ $to = strlen($this->data);
+ }
+ if ($this->mbstring_overload) {
+ $this->value = mb_substr($this->data,$this->counter,$to-$this->counter,'latin1');
+ } else {
+ $this->value = substr($this->data,$this->counter,$to-$this->counter);
+ }
+ $this->token = Smarty_Internal_Templateparser::TP_TEXT;
+ }
+
+}
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_templateparser.php b/library/Smarty/libs/sysplugins/smarty_internal_templateparser.php
new file mode 100644
index 000000000..ed20e8237
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_templateparser.php
@@ -0,0 +1,3250 @@
+<?php
+/**
+* Smarty Internal Plugin Templateparser
+*
+* This is the template parser.
+* It is generated from the internal.templateparser.y file
+* @package Smarty
+* @subpackage Compiler
+* @author Uwe Tews
+*/
+
+class TP_yyToken implements ArrayAccess
+{
+ public $string = '';
+ public $metadata = array();
+
+ function __construct($s, $m = array())
+ {
+ if ($s instanceof TP_yyToken) {
+ $this->string = $s->string;
+ $this->metadata = $s->metadata;
+ } else {
+ $this->string = (string) $s;
+ if ($m instanceof TP_yyToken) {
+ $this->metadata = $m->metadata;
+ } elseif (is_array($m)) {
+ $this->metadata = $m;
+ }
+ }
+ }
+
+ function __toString()
+ {
+ return $this->_string;
+ }
+
+ function offsetExists($offset)
+ {
+ return isset($this->metadata[$offset]);
+ }
+
+ function offsetGet($offset)
+ {
+ return $this->metadata[$offset];
+ }
+
+ function offsetSet($offset, $value)
+ {
+ if ($offset === null) {
+ if (isset($value[0])) {
+ $x = ($value instanceof TP_yyToken) ?
+ $value->metadata : $value;
+ $this->metadata = array_merge($this->metadata, $x);
+ return;
+ }
+ $offset = count($this->metadata);
+ }
+ if ($value === null) {
+ return;
+ }
+ if ($value instanceof TP_yyToken) {
+ if ($value->metadata) {
+ $this->metadata[$offset] = $value->metadata;
+ }
+ } elseif ($value) {
+ $this->metadata[$offset] = $value;
+ }
+ }
+
+ function offsetUnset($offset)
+ {
+ unset($this->metadata[$offset]);
+ }
+}
+
+class TP_yyStackEntry
+{
+ public $stateno; /* The state-number */
+ public $major; /* The major token value. This is the code
+ ** number for the token at this stack level */
+ public $minor; /* The user-supplied minor token value. This
+ ** is the value of the token */
+};
+
+
+#line 12 "smarty_internal_templateparser.y"
+class Smarty_Internal_Templateparser#line 79 "smarty_internal_templateparser.php"
+{
+#line 14 "smarty_internal_templateparser.y"
+
+ const Err1 = "Security error: Call to private object member not allowed";
+ const Err2 = "Security error: Call to dynamic object member not allowed";
+ const Err3 = "PHP in template not allowed. Use SmartyBC to enable it";
+ // states whether the parse was successful or not
+ public $successful = true;
+ public $retvalue = 0;
+ private $lex;
+ private $internalError = false;
+ private $strip = false;
+
+ function __construct($lex, $compiler) {
+ $this->lex = $lex;
+ $this->compiler = $compiler;
+ $this->smarty = $this->compiler->smarty;
+ $this->template = $this->compiler->template;
+ $this->compiler->has_variable_string = false;
+ $this->compiler->prefix_code = array();
+ $this->prefix_number = 0;
+ $this->block_nesting_level = 0;
+ if ($this->security = isset($this->smarty->security_policy)) {
+ $this->php_handling = $this->smarty->security_policy->php_handling;
+ } else {
+ $this->php_handling = $this->smarty->php_handling;
+ }
+ $this->is_xml = false;
+ $this->asp_tags = (ini_get('asp_tags') != '0');
+ $this->current_buffer = $this->root_buffer = new _smarty_template_buffer($this);
+ }
+
+ public static function escape_start_tag($tag_text) {
+ $tag = preg_replace('/\A<\?(.*)\z/', '<<?php ?>?\1', $tag_text, -1 , $count); //Escape tag
+ return $tag;
+ }
+
+ public static function escape_end_tag($tag_text) {
+ return '?<?php ?>>';
+ }
+
+ public function compileVariable($variable) {
+ if (strpos($variable,'(') == 0) {
+ // not a variable variable
+ $var = trim($variable,'\'');
+ $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable($var, null, true, false)->nocache;
+ $this->template->properties['variables'][$var] = $this->compiler->tag_nocache|$this->compiler->nocache;
+ }
+// return '(isset($_smarty_tpl->tpl_vars['. $variable .'])?$_smarty_tpl->tpl_vars['. $variable .']->value:$_smarty_tpl->getVariable('. $variable .')->value)';
+ return '$_smarty_tpl->tpl_vars['. $variable .']->value';
+ }
+#line 132 "smarty_internal_templateparser.php"
+
+ const TP_VERT = 1;
+ const TP_COLON = 2;
+ const TP_COMMENT = 3;
+ const TP_PHPSTARTTAG = 4;
+ const TP_PHPENDTAG = 5;
+ const TP_ASPSTARTTAG = 6;
+ const TP_ASPENDTAG = 7;
+ const TP_FAKEPHPSTARTTAG = 8;
+ const TP_XMLTAG = 9;
+ const TP_TEXT = 10;
+ const TP_STRIPON = 11;
+ const TP_STRIPOFF = 12;
+ const TP_LITERALSTART = 13;
+ const TP_LITERALEND = 14;
+ const TP_LITERAL = 15;
+ const TP_LDEL = 16;
+ const TP_RDEL = 17;
+ const TP_DOLLAR = 18;
+ const TP_ID = 19;
+ const TP_EQUAL = 20;
+ const TP_PTR = 21;
+ const TP_LDELIF = 22;
+ const TP_LDELFOR = 23;
+ const TP_SEMICOLON = 24;
+ const TP_INCDEC = 25;
+ const TP_TO = 26;
+ const TP_STEP = 27;
+ const TP_LDELFOREACH = 28;
+ const TP_SPACE = 29;
+ const TP_AS = 30;
+ const TP_APTR = 31;
+ const TP_LDELSETFILTER = 32;
+ const TP_SMARTYBLOCKCHILD = 33;
+ const TP_LDELSLASH = 34;
+ const TP_ATTR = 35;
+ const TP_INTEGER = 36;
+ const TP_COMMA = 37;
+ const TP_OPENP = 38;
+ const TP_CLOSEP = 39;
+ const TP_MATH = 40;
+ const TP_UNIMATH = 41;
+ const TP_ANDSYM = 42;
+ const TP_ISIN = 43;
+ const TP_ISDIVBY = 44;
+ const TP_ISNOTDIVBY = 45;
+ const TP_ISEVEN = 46;
+ const TP_ISNOTEVEN = 47;
+ const TP_ISEVENBY = 48;
+ const TP_ISNOTEVENBY = 49;
+ const TP_ISODD = 50;
+ const TP_ISNOTODD = 51;
+ const TP_ISODDBY = 52;
+ const TP_ISNOTODDBY = 53;
+ const TP_INSTANCEOF = 54;
+ const TP_QMARK = 55;
+ const TP_NOT = 56;
+ const TP_TYPECAST = 57;
+ const TP_HEX = 58;
+ const TP_DOT = 59;
+ const TP_SINGLEQUOTESTRING = 60;
+ const TP_DOUBLECOLON = 61;
+ const TP_AT = 62;
+ const TP_HATCH = 63;
+ const TP_OPENB = 64;
+ const TP_CLOSEB = 65;
+ const TP_EQUALS = 66;
+ const TP_NOTEQUALS = 67;
+ const TP_GREATERTHAN = 68;
+ const TP_LESSTHAN = 69;
+ const TP_GREATEREQUAL = 70;
+ const TP_LESSEQUAL = 71;
+ const TP_IDENTITY = 72;
+ const TP_NONEIDENTITY = 73;
+ const TP_MOD = 74;
+ const TP_LAND = 75;
+ const TP_LOR = 76;
+ const TP_LXOR = 77;
+ const TP_QUOTE = 78;
+ const TP_BACKTICK = 79;
+ const TP_DOLLARID = 80;
+ const YY_NO_ACTION = 593;
+ const YY_ACCEPT_ACTION = 592;
+ const YY_ERROR_ACTION = 591;
+
+ const YY_SZ_ACTTAB = 2453;
+static public $yy_action = array(
+ /* 0 */ 210, 320, 317, 316, 312, 311, 313, 314, 315, 322,
+ /* 10 */ 323, 189, 191, 340, 43, 168, 292, 290, 161, 25,
+ /* 20 */ 3, 108, 284, 29, 294, 199, 146, 294, 15, 15,
+ /* 30 */ 244, 296, 243, 277, 18, 18, 285, 12, 127, 48,
+ /* 40 */ 52, 50, 44, 9, 14, 384, 385, 17, 16, 386,
+ /* 50 */ 283, 41, 39, 210, 592, 95, 260, 319, 321, 6,
+ /* 60 */ 21, 194, 135, 374, 193, 387, 383, 382, 378, 377,
+ /* 70 */ 379, 380, 381, 363, 362, 345, 344, 28, 31, 34,
+ /* 80 */ 370, 15, 19, 237, 137, 187, 25, 18, 203, 284,
+ /* 90 */ 29, 203, 48, 52, 50, 44, 9, 14, 384, 385,
+ /* 100 */ 17, 16, 386, 283, 41, 39, 329, 324, 326, 327,
+ /* 110 */ 325, 24, 288, 4, 4, 189, 332, 330, 387, 383,
+ /* 120 */ 382, 378, 377, 379, 380, 381, 363, 362, 345, 344,
+ /* 130 */ 210, 368, 231, 210, 251, 117, 139, 139, 84, 132,
+ /* 140 */ 278, 25, 10, 162, 284, 359, 338, 302, 346, 459,
+ /* 150 */ 226, 228, 369, 364, 15, 375, 230, 15, 15, 177,
+ /* 160 */ 18, 459, 240, 18, 18, 212, 257, 459, 294, 48,
+ /* 170 */ 52, 50, 44, 9, 14, 384, 385, 17, 16, 386,
+ /* 180 */ 283, 41, 39, 131, 101, 159, 47, 196, 340, 371,
+ /* 190 */ 25, 190, 340, 284, 294, 387, 383, 382, 378, 377,
+ /* 200 */ 379, 380, 381, 363, 362, 345, 344, 210, 368, 208,
+ /* 210 */ 210, 203, 140, 210, 8, 56, 123, 118, 210, 457,
+ /* 220 */ 366, 261, 234, 343, 302, 346, 453, 147, 228, 369,
+ /* 230 */ 364, 457, 375, 15, 342, 15, 231, 457, 15, 18,
+ /* 240 */ 4, 18, 307, 37, 18, 195, 48, 52, 50, 44,
+ /* 250 */ 9, 14, 384, 385, 17, 16, 386, 283, 41, 39,
+ /* 260 */ 210, 25, 2, 139, 284, 11, 47, 185, 210, 45,
+ /* 270 */ 266, 47, 387, 383, 382, 378, 377, 379, 380, 381,
+ /* 280 */ 363, 362, 345, 344, 286, 242, 104, 166, 15, 210,
+ /* 290 */ 276, 184, 188, 23, 18, 272, 294, 22, 162, 48,
+ /* 300 */ 52, 50, 44, 9, 14, 384, 385, 17, 16, 386,
+ /* 310 */ 283, 41, 39, 203, 106, 170, 13, 15, 203, 288,
+ /* 320 */ 318, 319, 321, 18, 294, 387, 383, 382, 378, 377,
+ /* 330 */ 379, 380, 381, 363, 362, 345, 344, 210, 131, 105,
+ /* 340 */ 210, 203, 23, 368, 268, 130, 249, 152, 355, 25,
+ /* 350 */ 197, 132, 284, 271, 32, 162, 287, 155, 354, 210,
+ /* 360 */ 3, 108, 15, 228, 369, 364, 146, 375, 18, 252,
+ /* 370 */ 244, 296, 243, 375, 303, 305, 48, 52, 50, 44,
+ /* 380 */ 9, 14, 384, 385, 17, 16, 386, 283, 41, 39,
+ /* 390 */ 103, 210, 36, 208, 109, 388, 303, 232, 8, 4,
+ /* 400 */ 248, 246, 387, 383, 382, 378, 377, 379, 380, 381,
+ /* 410 */ 363, 362, 345, 344, 198, 40, 361, 27, 353, 179,
+ /* 420 */ 175, 20, 139, 236, 239, 211, 116, 18, 294, 294,
+ /* 430 */ 48, 52, 50, 44, 9, 14, 384, 385, 17, 16,
+ /* 440 */ 386, 283, 41, 39, 178, 200, 200, 23, 25, 267,
+ /* 450 */ 351, 284, 186, 294, 285, 201, 387, 383, 382, 378,
+ /* 460 */ 377, 379, 380, 381, 363, 362, 345, 344, 210, 368,
+ /* 470 */ 200, 210, 210, 140, 301, 181, 69, 123, 238, 25,
+ /* 480 */ 210, 147, 284, 347, 202, 302, 346, 459, 304, 228,
+ /* 490 */ 369, 364, 15, 375, 241, 15, 297, 172, 18, 459,
+ /* 500 */ 235, 18, 203, 306, 129, 459, 294, 48, 52, 50,
+ /* 510 */ 44, 9, 14, 384, 385, 17, 16, 386, 283, 41,
+ /* 520 */ 39, 210, 25, 200, 47, 229, 25, 134, 210, 233,
+ /* 530 */ 120, 119, 210, 387, 383, 382, 378, 377, 379, 380,
+ /* 540 */ 381, 363, 362, 345, 344, 373, 373, 143, 308, 180,
+ /* 550 */ 236, 282, 25, 25, 42, 284, 216, 236, 238, 250,
+ /* 560 */ 48, 52, 50, 44, 9, 14, 384, 385, 17, 16,
+ /* 570 */ 386, 283, 41, 39, 210, 30, 203, 360, 182, 25,
+ /* 580 */ 285, 47, 222, 126, 167, 303, 387, 383, 382, 378,
+ /* 590 */ 377, 379, 380, 381, 363, 362, 345, 344, 245, 373,
+ /* 600 */ 15, 372, 160, 334, 6, 333, 18, 247, 254, 35,
+ /* 610 */ 255, 294, 114, 48, 52, 50, 44, 9, 14, 384,
+ /* 620 */ 385, 17, 16, 386, 283, 41, 39, 373, 192, 281,
+ /* 630 */ 253, 145, 38, 298, 300, 226, 94, 124, 102, 387,
+ /* 640 */ 383, 382, 378, 377, 379, 380, 381, 363, 362, 345,
+ /* 650 */ 344, 210, 368, 373, 210, 141, 140, 368, 336, 71,
+ /* 660 */ 132, 149, 136, 7, 10, 132, 165, 204, 302, 346,
+ /* 670 */ 456, 98, 228, 369, 364, 294, 375, 228, 369, 364,
+ /* 680 */ 279, 375, 456, 220, 232, 335, 373, 285, 456, 162,
+ /* 690 */ 48, 52, 50, 44, 9, 14, 384, 385, 17, 16,
+ /* 700 */ 386, 283, 41, 39, 210, 210, 309, 47, 285, 200,
+ /* 710 */ 371, 45, 162, 183, 144, 97, 387, 383, 382, 378,
+ /* 720 */ 377, 379, 380, 381, 363, 362, 345, 344, 285, 131,
+ /* 730 */ 373, 354, 331, 107, 110, 256, 376, 327, 327, 327,
+ /* 740 */ 327, 327, 115, 48, 52, 50, 44, 9, 14, 384,
+ /* 750 */ 385, 17, 16, 386, 283, 41, 39, 373, 327, 327,
+ /* 760 */ 327, 327, 327, 327, 327, 327, 327, 327, 356, 387,
+ /* 770 */ 383, 382, 378, 377, 379, 380, 381, 363, 362, 345,
+ /* 780 */ 344, 210, 352, 368, 327, 210, 327, 140, 327, 327,
+ /* 790 */ 71, 132, 327, 100, 339, 327, 138, 269, 337, 302,
+ /* 800 */ 346, 328, 327, 228, 369, 364, 15, 375, 373, 327,
+ /* 810 */ 15, 373, 18, 15, 219, 327, 18, 327, 327, 18,
+ /* 820 */ 48, 52, 50, 44, 9, 14, 384, 385, 17, 16,
+ /* 830 */ 386, 283, 41, 39, 210, 327, 327, 327, 47, 327,
+ /* 840 */ 327, 327, 327, 327, 327, 327, 387, 383, 382, 378,
+ /* 850 */ 377, 379, 380, 381, 363, 362, 345, 344, 327, 327,
+ /* 860 */ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ /* 870 */ 327, 327, 274, 48, 52, 50, 44, 9, 14, 384,
+ /* 880 */ 385, 17, 16, 386, 283, 41, 39, 210, 327, 327,
+ /* 890 */ 327, 327, 327, 327, 327, 327, 327, 327, 327, 387,
+ /* 900 */ 383, 382, 378, 377, 379, 380, 381, 363, 362, 345,
+ /* 910 */ 344, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ /* 920 */ 327, 327, 327, 327, 327, 327, 48, 52, 50, 44,
+ /* 930 */ 9, 14, 384, 385, 17, 16, 386, 283, 41, 39,
+ /* 940 */ 210, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ /* 950 */ 327, 265, 387, 383, 382, 378, 377, 379, 380, 381,
+ /* 960 */ 363, 362, 345, 344, 327, 327, 327, 327, 327, 224,
+ /* 970 */ 327, 327, 327, 327, 327, 327, 327, 327, 327, 48,
+ /* 980 */ 52, 50, 44, 9, 14, 384, 385, 17, 16, 386,
+ /* 990 */ 283, 41, 39, 210, 327, 327, 327, 327, 327, 327,
+ /* 1000 */ 327, 327, 327, 327, 327, 387, 383, 382, 378, 377,
+ /* 1010 */ 379, 380, 381, 363, 362, 345, 344, 327, 327, 327,
+ /* 1020 */ 327, 327, 327, 327, 327, 327, 327, 327, 327, 327,
+ /* 1030 */ 327, 327, 48, 52, 50, 44, 9, 14, 384, 385,
+ /* 1040 */ 17, 16, 386, 283, 41, 39, 327, 327, 327, 327,
+ /* 1050 */ 327, 327, 327, 327, 327, 327, 327, 327, 387, 383,
+ /* 1060 */ 382, 378, 377, 379, 380, 381, 363, 362, 345, 344,
+ /* 1070 */ 327, 327, 327, 48, 52, 50, 44, 9, 14, 384,
+ /* 1080 */ 385, 17, 16, 386, 283, 41, 39, 327, 327, 327,
+ /* 1090 */ 327, 327, 327, 327, 327, 327, 327, 327, 327, 387,
+ /* 1100 */ 383, 382, 378, 377, 379, 380, 381, 363, 362, 345,
+ /* 1110 */ 344, 327, 327, 327, 327, 327, 43, 327, 142, 207,
+ /* 1120 */ 327, 327, 3, 108, 327, 264, 327, 368, 146, 327,
+ /* 1130 */ 327, 151, 244, 296, 243, 132, 227, 15, 33, 327,
+ /* 1140 */ 327, 51, 327, 18, 367, 327, 368, 228, 369, 364,
+ /* 1150 */ 150, 375, 327, 174, 132, 327, 49, 46, 299, 225,
+ /* 1160 */ 365, 327, 294, 103, 1, 280, 228, 369, 364, 262,
+ /* 1170 */ 375, 327, 327, 43, 285, 142, 218, 327, 96, 3,
+ /* 1180 */ 108, 15, 289, 327, 327, 146, 327, 18, 327, 244,
+ /* 1190 */ 296, 243, 327, 227, 15, 33, 327, 327, 51, 327,
+ /* 1200 */ 18, 327, 368, 327, 327, 327, 121, 327, 327, 54,
+ /* 1210 */ 132, 327, 327, 49, 46, 299, 225, 365, 302, 346,
+ /* 1220 */ 103, 1, 228, 369, 364, 327, 375, 350, 327, 327,
+ /* 1230 */ 43, 327, 142, 205, 327, 96, 3, 108, 327, 15,
+ /* 1240 */ 169, 327, 146, 327, 358, 18, 244, 296, 243, 294,
+ /* 1250 */ 227, 327, 33, 327, 327, 51, 15, 327, 327, 368,
+ /* 1260 */ 327, 285, 18, 140, 327, 327, 66, 132, 327, 327,
+ /* 1270 */ 49, 46, 299, 225, 365, 302, 346, 103, 1, 228,
+ /* 1280 */ 369, 364, 327, 375, 295, 327, 327, 43, 327, 130,
+ /* 1290 */ 218, 327, 96, 3, 108, 327, 15, 327, 327, 146,
+ /* 1300 */ 327, 293, 18, 244, 296, 243, 327, 227, 327, 26,
+ /* 1310 */ 327, 327, 51, 15, 327, 327, 368, 327, 327, 18,
+ /* 1320 */ 140, 327, 327, 60, 132, 327, 327, 49, 46, 299,
+ /* 1330 */ 225, 365, 302, 346, 103, 1, 228, 369, 364, 327,
+ /* 1340 */ 375, 258, 327, 327, 43, 327, 128, 218, 327, 96,
+ /* 1350 */ 3, 108, 327, 15, 327, 327, 146, 327, 291, 18,
+ /* 1360 */ 244, 296, 243, 327, 227, 327, 5, 327, 327, 51,
+ /* 1370 */ 15, 327, 327, 368, 327, 327, 18, 140, 327, 327,
+ /* 1380 */ 75, 132, 327, 327, 49, 46, 299, 225, 365, 302,
+ /* 1390 */ 346, 103, 1, 228, 369, 364, 327, 375, 259, 327,
+ /* 1400 */ 327, 43, 327, 142, 209, 327, 96, 3, 108, 327,
+ /* 1410 */ 15, 327, 327, 146, 327, 273, 18, 244, 296, 243,
+ /* 1420 */ 327, 227, 327, 33, 327, 327, 51, 15, 327, 327,
+ /* 1430 */ 368, 327, 327, 18, 140, 327, 327, 87, 132, 327,
+ /* 1440 */ 327, 49, 46, 299, 225, 365, 302, 346, 103, 1,
+ /* 1450 */ 228, 369, 364, 327, 375, 275, 327, 327, 43, 327,
+ /* 1460 */ 125, 92, 327, 96, 3, 108, 327, 15, 327, 327,
+ /* 1470 */ 146, 327, 310, 18, 244, 296, 243, 327, 227, 327,
+ /* 1480 */ 33, 327, 327, 51, 15, 327, 327, 368, 327, 327,
+ /* 1490 */ 18, 140, 327, 327, 58, 132, 327, 327, 49, 46,
+ /* 1500 */ 299, 225, 365, 302, 346, 103, 1, 228, 369, 364,
+ /* 1510 */ 327, 375, 341, 327, 327, 43, 327, 133, 218, 327,
+ /* 1520 */ 96, 3, 108, 327, 15, 327, 327, 146, 327, 348,
+ /* 1530 */ 18, 244, 296, 243, 327, 227, 327, 33, 327, 327,
+ /* 1540 */ 51, 15, 327, 327, 368, 327, 327, 18, 140, 327,
+ /* 1550 */ 327, 68, 132, 327, 327, 49, 46, 299, 225, 365,
+ /* 1560 */ 302, 346, 103, 1, 215, 369, 364, 327, 375, 327,
+ /* 1570 */ 327, 327, 43, 327, 142, 206, 327, 96, 3, 108,
+ /* 1580 */ 327, 327, 327, 327, 146, 327, 327, 327, 244, 296,
+ /* 1590 */ 243, 327, 213, 327, 33, 327, 327, 51, 327, 327,
+ /* 1600 */ 327, 368, 327, 327, 327, 140, 327, 327, 89, 132,
+ /* 1610 */ 327, 327, 49, 46, 299, 225, 365, 302, 346, 103,
+ /* 1620 */ 1, 228, 369, 364, 327, 375, 327, 327, 327, 43,
+ /* 1630 */ 327, 130, 214, 327, 96, 3, 108, 327, 327, 327,
+ /* 1640 */ 327, 146, 327, 327, 327, 244, 296, 243, 327, 227,
+ /* 1650 */ 327, 26, 327, 327, 51, 327, 327, 327, 368, 327,
+ /* 1660 */ 327, 327, 93, 327, 327, 53, 122, 327, 327, 49,
+ /* 1670 */ 46, 299, 225, 365, 302, 346, 103, 327, 221, 369,
+ /* 1680 */ 364, 327, 375, 327, 327, 327, 43, 327, 130, 218,
+ /* 1690 */ 327, 96, 3, 108, 327, 327, 327, 327, 146, 327,
+ /* 1700 */ 327, 327, 244, 296, 243, 327, 227, 327, 26, 327,
+ /* 1710 */ 327, 51, 327, 327, 327, 368, 327, 327, 327, 140,
+ /* 1720 */ 327, 327, 71, 132, 327, 327, 49, 46, 299, 225,
+ /* 1730 */ 365, 302, 346, 103, 327, 228, 369, 364, 327, 375,
+ /* 1740 */ 327, 327, 327, 327, 502, 327, 217, 327, 96, 327,
+ /* 1750 */ 327, 502, 327, 502, 502, 355, 502, 502, 327, 327,
+ /* 1760 */ 327, 32, 502, 327, 502, 4, 502, 3, 108, 327,
+ /* 1770 */ 99, 171, 327, 146, 327, 327, 327, 244, 296, 243,
+ /* 1780 */ 294, 502, 327, 28, 31, 327, 327, 327, 139, 327,
+ /* 1790 */ 327, 327, 502, 327, 368, 193, 163, 203, 117, 327,
+ /* 1800 */ 327, 84, 132, 327, 327, 294, 502, 327, 28, 31,
+ /* 1810 */ 302, 346, 327, 368, 228, 369, 364, 157, 375, 327,
+ /* 1820 */ 327, 132, 203, 357, 27, 353, 327, 327, 327, 263,
+ /* 1830 */ 270, 327, 368, 228, 369, 364, 140, 375, 327, 69,
+ /* 1840 */ 132, 327, 210, 368, 327, 327, 327, 140, 302, 346,
+ /* 1850 */ 79, 132, 228, 369, 364, 327, 375, 327, 349, 302,
+ /* 1860 */ 346, 327, 223, 228, 369, 364, 327, 375, 327, 327,
+ /* 1870 */ 15, 327, 327, 327, 368, 327, 18, 327, 140, 4,
+ /* 1880 */ 327, 91, 132, 327, 327, 327, 327, 327, 327, 327,
+ /* 1890 */ 302, 346, 327, 327, 228, 369, 364, 368, 375, 327,
+ /* 1900 */ 327, 140, 139, 368, 76, 132, 327, 153, 327, 327,
+ /* 1910 */ 327, 132, 327, 302, 346, 327, 327, 228, 369, 364,
+ /* 1920 */ 327, 375, 368, 228, 369, 364, 140, 375, 327, 63,
+ /* 1930 */ 132, 327, 327, 368, 327, 327, 327, 111, 302, 346,
+ /* 1940 */ 62, 132, 228, 369, 364, 327, 375, 327, 327, 302,
+ /* 1950 */ 346, 327, 327, 228, 369, 364, 327, 375, 327, 327,
+ /* 1960 */ 368, 193, 176, 327, 140, 327, 327, 78, 132, 327,
+ /* 1970 */ 327, 294, 327, 327, 28, 31, 302, 346, 327, 327,
+ /* 1980 */ 228, 369, 364, 368, 375, 327, 327, 140, 203, 368,
+ /* 1990 */ 64, 132, 327, 154, 327, 327, 327, 132, 327, 302,
+ /* 2000 */ 346, 327, 327, 228, 369, 364, 327, 375, 368, 228,
+ /* 2010 */ 369, 364, 140, 375, 327, 77, 132, 327, 327, 368,
+ /* 2020 */ 327, 327, 327, 140, 302, 346, 80, 132, 228, 369,
+ /* 2030 */ 364, 327, 375, 327, 327, 302, 346, 327, 327, 228,
+ /* 2040 */ 369, 364, 327, 375, 327, 327, 368, 327, 327, 327,
+ /* 2050 */ 140, 327, 327, 61, 132, 327, 327, 327, 327, 327,
+ /* 2060 */ 327, 327, 302, 346, 327, 327, 228, 369, 364, 368,
+ /* 2070 */ 375, 327, 327, 140, 327, 368, 65, 132, 327, 156,
+ /* 2080 */ 327, 327, 327, 132, 327, 302, 346, 327, 327, 228,
+ /* 2090 */ 369, 364, 327, 375, 368, 228, 369, 364, 140, 375,
+ /* 2100 */ 327, 81, 132, 327, 327, 368, 327, 327, 327, 113,
+ /* 2110 */ 302, 346, 88, 132, 228, 369, 364, 327, 375, 327,
+ /* 2120 */ 327, 302, 346, 327, 327, 228, 369, 364, 327, 375,
+ /* 2130 */ 327, 327, 368, 327, 327, 327, 140, 327, 327, 67,
+ /* 2140 */ 132, 327, 327, 327, 327, 327, 327, 327, 302, 346,
+ /* 2150 */ 327, 327, 228, 369, 364, 368, 375, 327, 327, 140,
+ /* 2160 */ 327, 368, 86, 132, 327, 148, 327, 327, 327, 132,
+ /* 2170 */ 327, 302, 346, 327, 327, 228, 369, 364, 327, 375,
+ /* 2180 */ 368, 228, 369, 364, 140, 375, 327, 85, 132, 327,
+ /* 2190 */ 327, 368, 327, 327, 327, 112, 302, 346, 73, 132,
+ /* 2200 */ 228, 369, 364, 327, 375, 327, 327, 302, 346, 327,
+ /* 2210 */ 327, 228, 369, 364, 327, 375, 327, 327, 368, 327,
+ /* 2220 */ 327, 327, 140, 327, 327, 70, 132, 327, 327, 327,
+ /* 2230 */ 327, 327, 327, 327, 302, 346, 327, 327, 228, 369,
+ /* 2240 */ 364, 368, 375, 327, 327, 140, 327, 327, 57, 132,
+ /* 2250 */ 327, 327, 327, 327, 327, 327, 327, 302, 346, 327,
+ /* 2260 */ 327, 228, 369, 364, 327, 375, 368, 327, 327, 327,
+ /* 2270 */ 140, 327, 327, 90, 132, 327, 327, 368, 327, 327,
+ /* 2280 */ 327, 140, 302, 346, 83, 132, 228, 369, 364, 327,
+ /* 2290 */ 375, 327, 327, 302, 346, 327, 327, 228, 369, 364,
+ /* 2300 */ 327, 375, 327, 327, 368, 327, 327, 327, 140, 327,
+ /* 2310 */ 327, 82, 132, 327, 327, 327, 327, 327, 327, 327,
+ /* 2320 */ 302, 346, 327, 327, 228, 369, 364, 368, 375, 327,
+ /* 2330 */ 327, 140, 327, 327, 55, 132, 327, 327, 327, 327,
+ /* 2340 */ 327, 327, 327, 302, 346, 327, 327, 228, 369, 364,
+ /* 2350 */ 327, 375, 368, 327, 327, 327, 140, 327, 327, 72,
+ /* 2360 */ 132, 327, 327, 368, 327, 327, 327, 93, 302, 346,
+ /* 2370 */ 59, 122, 228, 369, 364, 327, 375, 327, 327, 302,
+ /* 2380 */ 346, 327, 327, 228, 369, 364, 327, 375, 327, 327,
+ /* 2390 */ 368, 327, 327, 327, 140, 327, 327, 74, 132, 327,
+ /* 2400 */ 327, 327, 327, 193, 158, 327, 302, 346, 327, 327,
+ /* 2410 */ 228, 369, 364, 294, 375, 327, 28, 31, 193, 173,
+ /* 2420 */ 327, 327, 327, 327, 327, 193, 164, 327, 294, 327,
+ /* 2430 */ 203, 28, 31, 327, 327, 294, 327, 327, 28, 31,
+ /* 2440 */ 327, 327, 327, 327, 327, 203, 327, 327, 327, 327,
+ /* 2450 */ 327, 327, 203,
+ );
+ static public $yy_lookahead = array(
+ /* 0 */ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ /* 10 */ 12, 13, 113, 114, 16, 91, 17, 17, 91, 16,
+ /* 20 */ 22, 23, 19, 20, 100, 24, 28, 100, 29, 29,
+ /* 30 */ 32, 33, 34, 29, 35, 35, 112, 16, 37, 40,
+ /* 40 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ /* 50 */ 51, 52, 53, 1, 82, 83, 84, 85, 86, 38,
+ /* 60 */ 16, 90, 18, 19, 90, 66, 67, 68, 69, 70,
+ /* 70 */ 71, 72, 73, 74, 75, 76, 77, 103, 104, 27,
+ /* 80 */ 36, 29, 16, 96, 18, 19, 16, 35, 117, 19,
+ /* 90 */ 20, 117, 40, 41, 42, 43, 44, 45, 46, 47,
+ /* 100 */ 48, 49, 50, 51, 52, 53, 4, 5, 6, 7,
+ /* 110 */ 8, 20, 118, 38, 38, 13, 14, 15, 66, 67,
+ /* 120 */ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ /* 130 */ 1, 85, 62, 1, 59, 89, 61, 61, 92, 93,
+ /* 140 */ 65, 16, 20, 21, 19, 17, 17, 101, 102, 17,
+ /* 150 */ 59, 105, 106, 107, 29, 109, 31, 29, 29, 91,
+ /* 160 */ 35, 29, 30, 35, 35, 119, 120, 35, 100, 40,
+ /* 170 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ /* 180 */ 51, 52, 53, 61, 90, 91, 54, 113, 114, 111,
+ /* 190 */ 16, 113, 114, 19, 100, 66, 67, 68, 69, 70,
+ /* 200 */ 71, 72, 73, 74, 75, 76, 77, 1, 85, 59,
+ /* 210 */ 1, 117, 89, 1, 64, 92, 93, 94, 1, 17,
+ /* 220 */ 108, 17, 20, 17, 101, 102, 17, 115, 105, 106,
+ /* 230 */ 107, 29, 109, 29, 17, 29, 62, 35, 29, 35,
+ /* 240 */ 38, 35, 19, 31, 35, 99, 40, 41, 42, 43,
+ /* 250 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ /* 260 */ 1, 16, 37, 61, 19, 20, 54, 110, 1, 2,
+ /* 270 */ 25, 54, 66, 67, 68, 69, 70, 71, 72, 73,
+ /* 280 */ 74, 75, 76, 77, 17, 62, 90, 91, 29, 1,
+ /* 290 */ 65, 90, 110, 37, 35, 39, 100, 20, 21, 40,
+ /* 300 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ /* 310 */ 51, 52, 53, 117, 90, 91, 96, 29, 117, 118,
+ /* 320 */ 84, 85, 86, 35, 100, 66, 67, 68, 69, 70,
+ /* 330 */ 71, 72, 73, 74, 75, 76, 77, 1, 61, 99,
+ /* 340 */ 1, 117, 37, 85, 39, 18, 19, 89, 10, 16,
+ /* 350 */ 99, 93, 19, 17, 16, 21, 17, 93, 85, 1,
+ /* 360 */ 22, 23, 29, 105, 106, 107, 28, 109, 35, 105,
+ /* 370 */ 32, 33, 34, 109, 25, 17, 40, 41, 42, 43,
+ /* 380 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ /* 390 */ 63, 1, 31, 59, 121, 122, 25, 2, 64, 38,
+ /* 400 */ 18, 19, 66, 67, 68, 69, 70, 71, 72, 73,
+ /* 410 */ 74, 75, 76, 77, 24, 20, 78, 79, 80, 91,
+ /* 420 */ 91, 29, 61, 93, 94, 95, 19, 35, 100, 100,
+ /* 430 */ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ /* 440 */ 50, 51, 52, 53, 91, 117, 117, 37, 16, 39,
+ /* 450 */ 79, 19, 110, 100, 112, 19, 66, 67, 68, 69,
+ /* 460 */ 70, 71, 72, 73, 74, 75, 76, 77, 1, 85,
+ /* 470 */ 117, 1, 1, 89, 108, 90, 92, 93, 94, 16,
+ /* 480 */ 1, 115, 19, 17, 17, 101, 102, 17, 17, 105,
+ /* 490 */ 106, 107, 29, 109, 31, 29, 17, 91, 35, 29,
+ /* 500 */ 21, 35, 117, 19, 18, 35, 100, 40, 41, 42,
+ /* 510 */ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ /* 520 */ 53, 1, 16, 117, 54, 19, 16, 18, 1, 19,
+ /* 530 */ 97, 97, 1, 66, 67, 68, 69, 70, 71, 72,
+ /* 540 */ 73, 74, 75, 76, 77, 112, 112, 38, 17, 90,
+ /* 550 */ 93, 94, 16, 16, 26, 19, 19, 93, 94, 39,
+ /* 560 */ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ /* 570 */ 50, 51, 52, 53, 1, 2, 117, 17, 110, 16,
+ /* 580 */ 112, 54, 19, 18, 97, 25, 66, 67, 68, 69,
+ /* 590 */ 70, 71, 72, 73, 74, 75, 76, 77, 62, 112,
+ /* 600 */ 29, 19, 91, 86, 38, 88, 35, 19, 63, 55,
+ /* 610 */ 63, 100, 97, 40, 41, 42, 43, 44, 45, 46,
+ /* 620 */ 47, 48, 49, 50, 51, 52, 53, 112, 19, 65,
+ /* 630 */ 39, 18, 2, 36, 36, 59, 19, 18, 97, 66,
+ /* 640 */ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ /* 650 */ 77, 1, 85, 112, 1, 18, 89, 85, 19, 92,
+ /* 660 */ 93, 89, 19, 38, 20, 93, 91, 17, 101, 102,
+ /* 670 */ 17, 97, 105, 106, 107, 100, 109, 105, 106, 107,
+ /* 680 */ 19, 109, 29, 116, 2, 19, 112, 112, 35, 21,
+ /* 690 */ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ /* 700 */ 50, 51, 52, 53, 1, 1, 100, 54, 112, 117,
+ /* 710 */ 111, 2, 21, 110, 98, 97, 66, 67, 68, 69,
+ /* 720 */ 70, 71, 72, 73, 74, 75, 76, 77, 112, 61,
+ /* 730 */ 112, 85, 14, 110, 87, 115, 114, 123, 123, 123,
+ /* 740 */ 123, 123, 97, 40, 41, 42, 43, 44, 45, 46,
+ /* 750 */ 47, 48, 49, 50, 51, 52, 53, 112, 123, 123,
+ /* 760 */ 123, 123, 123, 123, 123, 123, 123, 123, 122, 66,
+ /* 770 */ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ /* 780 */ 77, 1, 79, 85, 123, 1, 123, 89, 123, 123,
+ /* 790 */ 92, 93, 123, 97, 17, 123, 97, 17, 17, 101,
+ /* 800 */ 102, 17, 123, 105, 106, 107, 29, 109, 112, 123,
+ /* 810 */ 29, 112, 35, 29, 116, 123, 35, 123, 123, 35,
+ /* 820 */ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ /* 830 */ 50, 51, 52, 53, 1, 123, 123, 123, 54, 123,
+ /* 840 */ 123, 123, 123, 123, 123, 123, 66, 67, 68, 69,
+ /* 850 */ 70, 71, 72, 73, 74, 75, 76, 77, 123, 123,
+ /* 860 */ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ /* 870 */ 123, 123, 39, 40, 41, 42, 43, 44, 45, 46,
+ /* 880 */ 47, 48, 49, 50, 51, 52, 53, 1, 123, 123,
+ /* 890 */ 123, 123, 123, 123, 123, 123, 123, 123, 123, 66,
+ /* 900 */ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ /* 910 */ 77, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ /* 920 */ 123, 123, 123, 123, 123, 123, 40, 41, 42, 43,
+ /* 930 */ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ /* 940 */ 1, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ /* 950 */ 123, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ /* 960 */ 74, 75, 76, 77, 123, 123, 123, 123, 123, 30,
+ /* 970 */ 123, 123, 123, 123, 123, 123, 123, 123, 123, 40,
+ /* 980 */ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ /* 990 */ 51, 52, 53, 1, 123, 123, 123, 123, 123, 123,
+ /* 1000 */ 123, 123, 123, 123, 123, 66, 67, 68, 69, 70,
+ /* 1010 */ 71, 72, 73, 74, 75, 76, 77, 123, 123, 123,
+ /* 1020 */ 123, 123, 123, 123, 123, 123, 123, 123, 123, 123,
+ /* 1030 */ 123, 123, 40, 41, 42, 43, 44, 45, 46, 47,
+ /* 1040 */ 48, 49, 50, 51, 52, 53, 123, 123, 123, 123,
+ /* 1050 */ 123, 123, 123, 123, 123, 123, 123, 123, 66, 67,
+ /* 1060 */ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77,
+ /* 1070 */ 123, 123, 123, 40, 41, 42, 43, 44, 45, 46,
+ /* 1080 */ 47, 48, 49, 50, 51, 52, 53, 123, 123, 123,
+ /* 1090 */ 123, 123, 123, 123, 123, 123, 123, 123, 123, 66,
+ /* 1100 */ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
+ /* 1110 */ 77, 123, 123, 123, 123, 123, 16, 123, 18, 19,
+ /* 1120 */ 123, 123, 22, 23, 123, 17, 123, 85, 28, 123,
+ /* 1130 */ 123, 89, 32, 33, 34, 93, 36, 29, 38, 123,
+ /* 1140 */ 123, 41, 123, 35, 102, 123, 85, 105, 106, 107,
+ /* 1150 */ 89, 109, 123, 91, 93, 123, 56, 57, 58, 59,
+ /* 1160 */ 60, 123, 100, 63, 64, 65, 105, 106, 107, 17,
+ /* 1170 */ 109, 123, 123, 16, 112, 18, 19, 123, 78, 22,
+ /* 1180 */ 23, 29, 17, 123, 123, 28, 123, 35, 123, 32,
+ /* 1190 */ 33, 34, 123, 36, 29, 38, 123, 123, 41, 123,
+ /* 1200 */ 35, 123, 85, 123, 123, 123, 89, 123, 123, 92,
+ /* 1210 */ 93, 123, 123, 56, 57, 58, 59, 60, 101, 102,
+ /* 1220 */ 63, 64, 105, 106, 107, 123, 109, 17, 123, 123,
+ /* 1230 */ 16, 123, 18, 19, 123, 78, 22, 23, 123, 29,
+ /* 1240 */ 91, 123, 28, 123, 17, 35, 32, 33, 34, 100,
+ /* 1250 */ 36, 123, 38, 123, 123, 41, 29, 123, 123, 85,
+ /* 1260 */ 123, 112, 35, 89, 123, 123, 92, 93, 123, 123,
+ /* 1270 */ 56, 57, 58, 59, 60, 101, 102, 63, 64, 105,
+ /* 1280 */ 106, 107, 123, 109, 17, 123, 123, 16, 123, 18,
+ /* 1290 */ 19, 123, 78, 22, 23, 123, 29, 123, 123, 28,
+ /* 1300 */ 123, 17, 35, 32, 33, 34, 123, 36, 123, 38,
+ /* 1310 */ 123, 123, 41, 29, 123, 123, 85, 123, 123, 35,
+ /* 1320 */ 89, 123, 123, 92, 93, 123, 123, 56, 57, 58,
+ /* 1330 */ 59, 60, 101, 102, 63, 64, 105, 106, 107, 123,
+ /* 1340 */ 109, 17, 123, 123, 16, 123, 18, 19, 123, 78,
+ /* 1350 */ 22, 23, 123, 29, 123, 123, 28, 123, 17, 35,
+ /* 1360 */ 32, 33, 34, 123, 36, 123, 38, 123, 123, 41,
+ /* 1370 */ 29, 123, 123, 85, 123, 123, 35, 89, 123, 123,
+ /* 1380 */ 92, 93, 123, 123, 56, 57, 58, 59, 60, 101,
+ /* 1390 */ 102, 63, 64, 105, 106, 107, 123, 109, 17, 123,
+ /* 1400 */ 123, 16, 123, 18, 19, 123, 78, 22, 23, 123,
+ /* 1410 */ 29, 123, 123, 28, 123, 17, 35, 32, 33, 34,
+ /* 1420 */ 123, 36, 123, 38, 123, 123, 41, 29, 123, 123,
+ /* 1430 */ 85, 123, 123, 35, 89, 123, 123, 92, 93, 123,
+ /* 1440 */ 123, 56, 57, 58, 59, 60, 101, 102, 63, 64,
+ /* 1450 */ 105, 106, 107, 123, 109, 17, 123, 123, 16, 123,
+ /* 1460 */ 18, 19, 123, 78, 22, 23, 123, 29, 123, 123,
+ /* 1470 */ 28, 123, 17, 35, 32, 33, 34, 123, 36, 123,
+ /* 1480 */ 38, 123, 123, 41, 29, 123, 123, 85, 123, 123,
+ /* 1490 */ 35, 89, 123, 123, 92, 93, 123, 123, 56, 57,
+ /* 1500 */ 58, 59, 60, 101, 102, 63, 64, 105, 106, 107,
+ /* 1510 */ 123, 109, 17, 123, 123, 16, 123, 18, 19, 123,
+ /* 1520 */ 78, 22, 23, 123, 29, 123, 123, 28, 123, 17,
+ /* 1530 */ 35, 32, 33, 34, 123, 36, 123, 38, 123, 123,
+ /* 1540 */ 41, 29, 123, 123, 85, 123, 123, 35, 89, 123,
+ /* 1550 */ 123, 92, 93, 123, 123, 56, 57, 58, 59, 60,
+ /* 1560 */ 101, 102, 63, 64, 105, 106, 107, 123, 109, 123,
+ /* 1570 */ 123, 123, 16, 123, 18, 19, 123, 78, 22, 23,
+ /* 1580 */ 123, 123, 123, 123, 28, 123, 123, 123, 32, 33,
+ /* 1590 */ 34, 123, 36, 123, 38, 123, 123, 41, 123, 123,
+ /* 1600 */ 123, 85, 123, 123, 123, 89, 123, 123, 92, 93,
+ /* 1610 */ 123, 123, 56, 57, 58, 59, 60, 101, 102, 63,
+ /* 1620 */ 64, 105, 106, 107, 123, 109, 123, 123, 123, 16,
+ /* 1630 */ 123, 18, 19, 123, 78, 22, 23, 123, 123, 123,
+ /* 1640 */ 123, 28, 123, 123, 123, 32, 33, 34, 123, 36,
+ /* 1650 */ 123, 38, 123, 123, 41, 123, 123, 123, 85, 123,
+ /* 1660 */ 123, 123, 89, 123, 123, 92, 93, 123, 123, 56,
+ /* 1670 */ 57, 58, 59, 60, 101, 102, 63, 123, 105, 106,
+ /* 1680 */ 107, 123, 109, 123, 123, 123, 16, 123, 18, 19,
+ /* 1690 */ 123, 78, 22, 23, 123, 123, 123, 123, 28, 123,
+ /* 1700 */ 123, 123, 32, 33, 34, 123, 36, 123, 38, 123,
+ /* 1710 */ 123, 41, 123, 123, 123, 85, 123, 123, 123, 89,
+ /* 1720 */ 123, 123, 92, 93, 123, 123, 56, 57, 58, 59,
+ /* 1730 */ 60, 101, 102, 63, 123, 105, 106, 107, 123, 109,
+ /* 1740 */ 123, 123, 123, 123, 17, 123, 116, 123, 78, 123,
+ /* 1750 */ 123, 24, 123, 26, 27, 10, 29, 30, 123, 123,
+ /* 1760 */ 123, 16, 35, 123, 37, 38, 39, 22, 23, 123,
+ /* 1770 */ 90, 91, 123, 28, 123, 123, 123, 32, 33, 34,
+ /* 1780 */ 100, 54, 123, 103, 104, 123, 123, 123, 61, 123,
+ /* 1790 */ 123, 123, 65, 123, 85, 90, 91, 117, 89, 123,
+ /* 1800 */ 123, 92, 93, 123, 123, 100, 79, 123, 103, 104,
+ /* 1810 */ 101, 102, 123, 85, 105, 106, 107, 89, 109, 123,
+ /* 1820 */ 123, 93, 117, 78, 79, 80, 123, 123, 123, 120,
+ /* 1830 */ 102, 123, 85, 105, 106, 107, 89, 109, 123, 92,
+ /* 1840 */ 93, 123, 1, 85, 123, 123, 123, 89, 101, 102,
+ /* 1850 */ 92, 93, 105, 106, 107, 123, 109, 123, 17, 101,
+ /* 1860 */ 102, 123, 21, 105, 106, 107, 123, 109, 123, 123,
+ /* 1870 */ 29, 123, 123, 123, 85, 123, 35, 123, 89, 38,
+ /* 1880 */ 123, 92, 93, 123, 123, 123, 123, 123, 123, 123,
+ /* 1890 */ 101, 102, 123, 123, 105, 106, 107, 85, 109, 123,
+ /* 1900 */ 123, 89, 61, 85, 92, 93, 123, 89, 123, 123,
+ /* 1910 */ 123, 93, 123, 101, 102, 123, 123, 105, 106, 107,
+ /* 1920 */ 123, 109, 85, 105, 106, 107, 89, 109, 123, 92,
+ /* 1930 */ 93, 123, 123, 85, 123, 123, 123, 89, 101, 102,
+ /* 1940 */ 92, 93, 105, 106, 107, 123, 109, 123, 123, 101,
+ /* 1950 */ 102, 123, 123, 105, 106, 107, 123, 109, 123, 123,
+ /* 1960 */ 85, 90, 91, 123, 89, 123, 123, 92, 93, 123,
+ /* 1970 */ 123, 100, 123, 123, 103, 104, 101, 102, 123, 123,
+ /* 1980 */ 105, 106, 107, 85, 109, 123, 123, 89, 117, 85,
+ /* 1990 */ 92, 93, 123, 89, 123, 123, 123, 93, 123, 101,
+ /* 2000 */ 102, 123, 123, 105, 106, 107, 123, 109, 85, 105,
+ /* 2010 */ 106, 107, 89, 109, 123, 92, 93, 123, 123, 85,
+ /* 2020 */ 123, 123, 123, 89, 101, 102, 92, 93, 105, 106,
+ /* 2030 */ 107, 123, 109, 123, 123, 101, 102, 123, 123, 105,
+ /* 2040 */ 106, 107, 123, 109, 123, 123, 85, 123, 123, 123,
+ /* 2050 */ 89, 123, 123, 92, 93, 123, 123, 123, 123, 123,
+ /* 2060 */ 123, 123, 101, 102, 123, 123, 105, 106, 107, 85,
+ /* 2070 */ 109, 123, 123, 89, 123, 85, 92, 93, 123, 89,
+ /* 2080 */ 123, 123, 123, 93, 123, 101, 102, 123, 123, 105,
+ /* 2090 */ 106, 107, 123, 109, 85, 105, 106, 107, 89, 109,
+ /* 2100 */ 123, 92, 93, 123, 123, 85, 123, 123, 123, 89,
+ /* 2110 */ 101, 102, 92, 93, 105, 106, 107, 123, 109, 123,
+ /* 2120 */ 123, 101, 102, 123, 123, 105, 106, 107, 123, 109,
+ /* 2130 */ 123, 123, 85, 123, 123, 123, 89, 123, 123, 92,
+ /* 2140 */ 93, 123, 123, 123, 123, 123, 123, 123, 101, 102,
+ /* 2150 */ 123, 123, 105, 106, 107, 85, 109, 123, 123, 89,
+ /* 2160 */ 123, 85, 92, 93, 123, 89, 123, 123, 123, 93,
+ /* 2170 */ 123, 101, 102, 123, 123, 105, 106, 107, 123, 109,
+ /* 2180 */ 85, 105, 106, 107, 89, 109, 123, 92, 93, 123,
+ /* 2190 */ 123, 85, 123, 123, 123, 89, 101, 102, 92, 93,
+ /* 2200 */ 105, 106, 107, 123, 109, 123, 123, 101, 102, 123,
+ /* 2210 */ 123, 105, 106, 107, 123, 109, 123, 123, 85, 123,
+ /* 2220 */ 123, 123, 89, 123, 123, 92, 93, 123, 123, 123,
+ /* 2230 */ 123, 123, 123, 123, 101, 102, 123, 123, 105, 106,
+ /* 2240 */ 107, 85, 109, 123, 123, 89, 123, 123, 92, 93,
+ /* 2250 */ 123, 123, 123, 123, 123, 123, 123, 101, 102, 123,
+ /* 2260 */ 123, 105, 106, 107, 123, 109, 85, 123, 123, 123,
+ /* 2270 */ 89, 123, 123, 92, 93, 123, 123, 85, 123, 123,
+ /* 2280 */ 123, 89, 101, 102, 92, 93, 105, 106, 107, 123,
+ /* 2290 */ 109, 123, 123, 101, 102, 123, 123, 105, 106, 107,
+ /* 2300 */ 123, 109, 123, 123, 85, 123, 123, 123, 89, 123,
+ /* 2310 */ 123, 92, 93, 123, 123, 123, 123, 123, 123, 123,
+ /* 2320 */ 101, 102, 123, 123, 105, 106, 107, 85, 109, 123,
+ /* 2330 */ 123, 89, 123, 123, 92, 93, 123, 123, 123, 123,
+ /* 2340 */ 123, 123, 123, 101, 102, 123, 123, 105, 106, 107,
+ /* 2350 */ 123, 109, 85, 123, 123, 123, 89, 123, 123, 92,
+ /* 2360 */ 93, 123, 123, 85, 123, 123, 123, 89, 101, 102,
+ /* 2370 */ 92, 93, 105, 106, 107, 123, 109, 123, 123, 101,
+ /* 2380 */ 102, 123, 123, 105, 106, 107, 123, 109, 123, 123,
+ /* 2390 */ 85, 123, 123, 123, 89, 123, 123, 92, 93, 123,
+ /* 2400 */ 123, 123, 123, 90, 91, 123, 101, 102, 123, 123,
+ /* 2410 */ 105, 106, 107, 100, 109, 123, 103, 104, 90, 91,
+ /* 2420 */ 123, 123, 123, 123, 123, 90, 91, 123, 100, 123,
+ /* 2430 */ 117, 103, 104, 123, 123, 100, 123, 123, 103, 104,
+ /* 2440 */ 123, 123, 123, 123, 123, 117, 123, 123, 123, 123,
+ /* 2450 */ 123, 123, 117,
+);
+ const YY_SHIFT_USE_DFLT = -3;
+ const YY_SHIFT_MAX = 252;
+ static public $yy_shift_ofst = array(
+ /* 0 */ -2, 1385, 1385, 1328, 1157, 1328, 1157, 1157, 1100, 1157,
+ /* 10 */ 1157, 1157, 1157, 1157, 1157, 1556, 1157, 1157, 1157, 1157,
+ /* 20 */ 1556, 1157, 1157, 1157, 1157, 1157, 1157, 1157, 1157, 1157,
+ /* 30 */ 1157, 1157, 1442, 1157, 1157, 1499, 1157, 1157, 1214, 1157,
+ /* 40 */ 1157, 1157, 1157, 1442, 1271, 1271, 1670, 1613, 1670, 1670,
+ /* 50 */ 1670, 1670, 1670, 206, 129, 52, -1, 259, 259, 259,
+ /* 60 */ 833, 886, 939, 780, 650, 390, 336, 467, 703, 520,
+ /* 70 */ 573, 992, 992, 992, 992, 992, 992, 992, 992, 992,
+ /* 80 */ 992, 992, 992, 992, 992, 992, 992, 992, 992, 992,
+ /* 90 */ 1033, 1033, 1841, 784, 288, -2, 338, 125, 463, 209,
+ /* 100 */ 333, 209, 333, 327, 288, 267, 288, 334, 509, 1745,
+ /* 110 */ 102, 132, 470, 653, 70, 245, 479, 212, 204, 3,
+ /* 120 */ 174, 217, 277, 122, 432, 537, 432, 509, 510, 432,
+ /* 130 */ 432, 382, 668, 506, 432, 432, 531, 563, 432, 382,
+ /* 140 */ 527, 432, 510, 509, 571, 432, 392, 691, 704, 704,
+ /* 150 */ 704, 704, 704, 704, 704, 691, 704, -3, 1341, 1381,
+ /* 160 */ 1284, 1267, 66, 1108, 1152, 1165, 1210, 536, 1438, 1398,
+ /* 170 */ 1495, 1512, 466, 777, 0, 128, 781, 1324, 1455, 1227,
+ /* 180 */ 471, 358, 150, 150, 339, 150, 150, 21, 150, 718,
+ /* 190 */ 691, 691, 625, 704, 704, 709, 691, 709, 4, 4,
+ /* 200 */ -3, -3, -3, -3, -3, 1727, 202, 75, 44, 361,
+ /* 210 */ 223, 1, 225, 91, 76, 371, 395, 410, 76, 256,
+ /* 220 */ 305, 560, 625, 617, 619, 598, 597, 576, 349, 630,
+ /* 230 */ 637, 639, 666, 682, 661, 643, 644, 613, 591, 528,
+ /* 240 */ 565, 486, 484, 407, 436, 582, 566, 564, 609, 547,
+ /* 250 */ 554, 588, 545,
+);
+ const YY_REDUCE_USE_DFLT = -102;
+ const YY_REDUCE_MAX = 204;
+ static public $yy_reduce_ofst = array(
+ /* 0 */ -28, 46, 1709, 123, 567, 384, 1630, 698, 1961, 1934,
+ /* 10 */ 1923, 1875, 1898, 1984, 2009, 2106, 2095, 2070, 2020, 2047,
+ /* 20 */ 1848, 1837, 1402, 1345, 1288, 1174, 1231, 1459, 1516, 1812,
+ /* 30 */ 1789, 1758, 1573, 1747, 2156, 2133, 2305, 2267, 2181, 2192,
+ /* 40 */ 1117, 2219, 2242, 2278, 1042, 1728, 258, 1061, 572, 2076,
+ /* 50 */ 1990, 1904, 1818, 1680, 1871, 1705, 2313, 2335, 2328, 1680,
+ /* 60 */ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ /* 70 */ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ /* 80 */ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26,
+ /* 90 */ -26, -26, 224, 94, 196, 236, 273, 1149, 1062, 406,
+ /* 100 */ -76, 353, 575, 264, 328, 201, 329, 78, 330, 646,
+ /* 110 */ 517, -29, -29, -29, 342, 616, 385, -29, 68, 342,
+ /* 120 */ 342, -29, 74, 74, 618, 433, 574, 457, 515, 541,
+ /* 130 */ 433, 112, 74, 433, 434, 487, 459, 699, 468, 366,
+ /* 140 */ -29, 696, 433, 464, 511, 645, -73, -101, -29, -29,
+ /* 150 */ -29, -29, -29, -29, -29, 74, -29, -29, 606, 606,
+ /* 160 */ 606, 606, 620, 606, 606, 606, 606, 596, 606, 606,
+ /* 170 */ 606, 606, 606, 606, 606, 606, 606, 606, 606, 606,
+ /* 180 */ 592, 592, 599, 599, 592, 599, 599, 603, 599, 647,
+ /* 190 */ 622, 622, 623, 592, 592, -6, 622, -6, -13, 220,
+ /* 200 */ 251, 240, 182, 146, 157,
+);
+ static public $yyExpectedTokens = array(
+ /* 0 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 22, 23, 28, 32, 33, 34, ),
+ /* 1 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 2 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 3 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 4 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 5 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 6 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 7 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 8 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 65, 78, ),
+ /* 9 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 10 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 11 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 12 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 13 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 14 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 15 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 16 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 17 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 18 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 19 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 20 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 21 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 22 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 23 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 24 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 25 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 26 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 27 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 28 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 29 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 30 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 31 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 32 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 33 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 34 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 35 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 36 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 37 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 38 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 39 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 40 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 41 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 42 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 43 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 44 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 45 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 64, 78, ),
+ /* 46 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ),
+ /* 47 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ),
+ /* 48 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ),
+ /* 49 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ),
+ /* 50 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ),
+ /* 51 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ),
+ /* 52 */ array(16, 18, 19, 22, 23, 28, 32, 33, 34, 36, 38, 41, 56, 57, 58, 59, 60, 63, 78, ),
+ /* 53 */ array(1, 17, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 54 */ array(1, 17, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 55 */ array(1, 27, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 56 */ array(1, 17, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 57 */ array(1, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 58 */ array(1, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 59 */ array(1, 29, 35, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 60 */ array(1, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 61 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 62 */ array(1, 30, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 63 */ array(1, 17, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 64 */ array(1, 17, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 65 */ array(1, 24, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 66 */ array(1, 17, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 67 */ array(1, 17, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 68 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 79, ),
+ /* 69 */ array(1, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 70 */ array(1, 2, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 71 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 72 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 73 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 74 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 75 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 76 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 77 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 78 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 79 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 80 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 81 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 82 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 83 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 84 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 85 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 86 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 87 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 88 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 89 */ array(1, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 90 */ array(40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 91 */ array(40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, ),
+ /* 92 */ array(1, 17, 21, 29, 35, 38, 61, ),
+ /* 93 */ array(1, 17, 29, 35, 54, ),
+ /* 94 */ array(1, 29, 35, ),
+ /* 95 */ array(3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 22, 23, 28, 32, 33, 34, ),
+ /* 96 */ array(10, 16, 22, 23, 28, 32, 33, 34, 78, 79, 80, ),
+ /* 97 */ array(16, 19, 29, 31, 35, ),
+ /* 98 */ array(16, 19, 29, 31, 35, ),
+ /* 99 */ array(1, 17, 29, 35, ),
+ /* 100 */ array(16, 19, 29, 35, ),
+ /* 101 */ array(1, 17, 29, 35, ),
+ /* 102 */ array(16, 19, 29, 35, ),
+ /* 103 */ array(18, 19, 63, ),
+ /* 104 */ array(1, 29, 35, ),
+ /* 105 */ array(1, 2, 17, ),
+ /* 106 */ array(1, 29, 35, ),
+ /* 107 */ array(21, 59, 64, ),
+ /* 108 */ array(18, 38, ),
+ /* 109 */ array(10, 16, 22, 23, 28, 32, 33, 34, 78, 79, 80, ),
+ /* 110 */ array(4, 5, 6, 7, 8, 13, 14, 15, ),
+ /* 111 */ array(1, 17, 29, 30, 35, 54, ),
+ /* 112 */ array(1, 17, 29, 35, 54, ),
+ /* 113 */ array(1, 17, 29, 35, 54, ),
+ /* 114 */ array(16, 19, 20, 62, ),
+ /* 115 */ array(16, 19, 20, 25, ),
+ /* 116 */ array(1, 17, 21, ),
+ /* 117 */ array(1, 31, 54, ),
+ /* 118 */ array(17, 29, 35, ),
+ /* 119 */ array(16, 19, 20, ),
+ /* 120 */ array(16, 19, 62, ),
+ /* 121 */ array(1, 17, 54, ),
+ /* 122 */ array(20, 21, 61, ),
+ /* 123 */ array(20, 21, 61, ),
+ /* 124 */ array(16, 19, ),
+ /* 125 */ array(16, 19, ),
+ /* 126 */ array(16, 19, ),
+ /* 127 */ array(18, 38, ),
+ /* 128 */ array(16, 19, ),
+ /* 129 */ array(16, 19, ),
+ /* 130 */ array(16, 19, ),
+ /* 131 */ array(18, 19, ),
+ /* 132 */ array(21, 61, ),
+ /* 133 */ array(16, 19, ),
+ /* 134 */ array(16, 19, ),
+ /* 135 */ array(16, 19, ),
+ /* 136 */ array(1, 17, ),
+ /* 137 */ array(16, 19, ),
+ /* 138 */ array(16, 19, ),
+ /* 139 */ array(18, 19, ),
+ /* 140 */ array(1, 54, ),
+ /* 141 */ array(16, 19, ),
+ /* 142 */ array(16, 19, ),
+ /* 143 */ array(18, 38, ),
+ /* 144 */ array(29, 35, ),
+ /* 145 */ array(16, 19, ),
+ /* 146 */ array(29, 35, ),
+ /* 147 */ array(21, ),
+ /* 148 */ array(1, ),
+ /* 149 */ array(1, ),
+ /* 150 */ array(1, ),
+ /* 151 */ array(1, ),
+ /* 152 */ array(1, ),
+ /* 153 */ array(1, ),
+ /* 154 */ array(1, ),
+ /* 155 */ array(21, ),
+ /* 156 */ array(1, ),
+ /* 157 */ array(),
+ /* 158 */ array(17, 29, 35, ),
+ /* 159 */ array(17, 29, 35, ),
+ /* 160 */ array(17, 29, 35, ),
+ /* 161 */ array(17, 29, 35, ),
+ /* 162 */ array(16, 18, 19, ),
+ /* 163 */ array(17, 29, 35, ),
+ /* 164 */ array(17, 29, 35, ),
+ /* 165 */ array(17, 29, 35, ),
+ /* 166 */ array(17, 29, 35, ),
+ /* 167 */ array(16, 19, 62, ),
+ /* 168 */ array(17, 29, 35, ),
+ /* 169 */ array(17, 29, 35, ),
+ /* 170 */ array(17, 29, 35, ),
+ /* 171 */ array(17, 29, 35, ),
+ /* 172 */ array(17, 29, 35, ),
+ /* 173 */ array(17, 29, 35, ),
+ /* 174 */ array(17, 29, 35, ),
+ /* 175 */ array(17, 29, 35, ),
+ /* 176 */ array(17, 29, 35, ),
+ /* 177 */ array(17, 29, 35, ),
+ /* 178 */ array(17, 29, 35, ),
+ /* 179 */ array(17, 29, 35, ),
+ /* 180 */ array(1, 17, ),
+ /* 181 */ array(1, 17, ),
+ /* 182 */ array(59, 64, ),
+ /* 183 */ array(59, 64, ),
+ /* 184 */ array(1, 17, ),
+ /* 185 */ array(59, 64, ),
+ /* 186 */ array(59, 64, ),
+ /* 187 */ array(16, 38, ),
+ /* 188 */ array(59, 64, ),
+ /* 189 */ array(14, ),
+ /* 190 */ array(21, ),
+ /* 191 */ array(21, ),
+ /* 192 */ array(38, ),
+ /* 193 */ array(1, ),
+ /* 194 */ array(1, ),
+ /* 195 */ array(2, ),
+ /* 196 */ array(21, ),
+ /* 197 */ array(2, ),
+ /* 198 */ array(29, ),
+ /* 199 */ array(29, ),
+ /* 200 */ array(),
+ /* 201 */ array(),
+ /* 202 */ array(),
+ /* 203 */ array(),
+ /* 204 */ array(),
+ /* 205 */ array(17, 24, 26, 27, 29, 30, 35, 37, 38, 39, 54, 61, 65, 79, ),
+ /* 206 */ array(17, 20, 29, 35, 38, 61, ),
+ /* 207 */ array(38, 59, 61, 65, ),
+ /* 208 */ array(16, 18, 19, 36, ),
+ /* 209 */ array(31, 38, 61, ),
+ /* 210 */ array(19, 62, ),
+ /* 211 */ array(24, 37, ),
+ /* 212 */ array(37, 65, ),
+ /* 213 */ array(20, 59, ),
+ /* 214 */ array(38, 61, ),
+ /* 215 */ array(25, 79, ),
+ /* 216 */ array(2, 20, ),
+ /* 217 */ array(37, 39, ),
+ /* 218 */ array(38, 61, ),
+ /* 219 */ array(37, 39, ),
+ /* 220 */ array(37, 39, ),
+ /* 221 */ array(17, 25, ),
+ /* 222 */ array(38, ),
+ /* 223 */ array(19, ),
+ /* 224 */ array(18, ),
+ /* 225 */ array(36, ),
+ /* 226 */ array(36, ),
+ /* 227 */ array(59, ),
+ /* 228 */ array(25, ),
+ /* 229 */ array(2, ),
+ /* 230 */ array(18, ),
+ /* 231 */ array(19, ),
+ /* 232 */ array(19, ),
+ /* 233 */ array(2, ),
+ /* 234 */ array(19, ),
+ /* 235 */ array(19, ),
+ /* 236 */ array(20, ),
+ /* 237 */ array(18, ),
+ /* 238 */ array(39, ),
+ /* 239 */ array(26, ),
+ /* 240 */ array(18, ),
+ /* 241 */ array(18, ),
+ /* 242 */ array(19, ),
+ /* 243 */ array(19, ),
+ /* 244 */ array(19, ),
+ /* 245 */ array(19, ),
+ /* 246 */ array(38, ),
+ /* 247 */ array(65, ),
+ /* 248 */ array(19, ),
+ /* 249 */ array(63, ),
+ /* 250 */ array(55, ),
+ /* 251 */ array(19, ),
+ /* 252 */ array(63, ),
+ /* 253 */ array(),
+ /* 254 */ array(),
+ /* 255 */ array(),
+ /* 256 */ array(),
+ /* 257 */ array(),
+ /* 258 */ array(),
+ /* 259 */ array(),
+ /* 260 */ array(),
+ /* 261 */ array(),
+ /* 262 */ array(),
+ /* 263 */ array(),
+ /* 264 */ array(),
+ /* 265 */ array(),
+ /* 266 */ array(),
+ /* 267 */ array(),
+ /* 268 */ array(),
+ /* 269 */ array(),
+ /* 270 */ array(),
+ /* 271 */ array(),
+ /* 272 */ array(),
+ /* 273 */ array(),
+ /* 274 */ array(),
+ /* 275 */ array(),
+ /* 276 */ array(),
+ /* 277 */ array(),
+ /* 278 */ array(),
+ /* 279 */ array(),
+ /* 280 */ array(),
+ /* 281 */ array(),
+ /* 282 */ array(),
+ /* 283 */ array(),
+ /* 284 */ array(),
+ /* 285 */ array(),
+ /* 286 */ array(),
+ /* 287 */ array(),
+ /* 288 */ array(),
+ /* 289 */ array(),
+ /* 290 */ array(),
+ /* 291 */ array(),
+ /* 292 */ array(),
+ /* 293 */ array(),
+ /* 294 */ array(),
+ /* 295 */ array(),
+ /* 296 */ array(),
+ /* 297 */ array(),
+ /* 298 */ array(),
+ /* 299 */ array(),
+ /* 300 */ array(),
+ /* 301 */ array(),
+ /* 302 */ array(),
+ /* 303 */ array(),
+ /* 304 */ array(),
+ /* 305 */ array(),
+ /* 306 */ array(),
+ /* 307 */ array(),
+ /* 308 */ array(),
+ /* 309 */ array(),
+ /* 310 */ array(),
+ /* 311 */ array(),
+ /* 312 */ array(),
+ /* 313 */ array(),
+ /* 314 */ array(),
+ /* 315 */ array(),
+ /* 316 */ array(),
+ /* 317 */ array(),
+ /* 318 */ array(),
+ /* 319 */ array(),
+ /* 320 */ array(),
+ /* 321 */ array(),
+ /* 322 */ array(),
+ /* 323 */ array(),
+ /* 324 */ array(),
+ /* 325 */ array(),
+ /* 326 */ array(),
+ /* 327 */ array(),
+ /* 328 */ array(),
+ /* 329 */ array(),
+ /* 330 */ array(),
+ /* 331 */ array(),
+ /* 332 */ array(),
+ /* 333 */ array(),
+ /* 334 */ array(),
+ /* 335 */ array(),
+ /* 336 */ array(),
+ /* 337 */ array(),
+ /* 338 */ array(),
+ /* 339 */ array(),
+ /* 340 */ array(),
+ /* 341 */ array(),
+ /* 342 */ array(),
+ /* 343 */ array(),
+ /* 344 */ array(),
+ /* 345 */ array(),
+ /* 346 */ array(),
+ /* 347 */ array(),
+ /* 348 */ array(),
+ /* 349 */ array(),
+ /* 350 */ array(),
+ /* 351 */ array(),
+ /* 352 */ array(),
+ /* 353 */ array(),
+ /* 354 */ array(),
+ /* 355 */ array(),
+ /* 356 */ array(),
+ /* 357 */ array(),
+ /* 358 */ array(),
+ /* 359 */ array(),
+ /* 360 */ array(),
+ /* 361 */ array(),
+ /* 362 */ array(),
+ /* 363 */ array(),
+ /* 364 */ array(),
+ /* 365 */ array(),
+ /* 366 */ array(),
+ /* 367 */ array(),
+ /* 368 */ array(),
+ /* 369 */ array(),
+ /* 370 */ array(),
+ /* 371 */ array(),
+ /* 372 */ array(),
+ /* 373 */ array(),
+ /* 374 */ array(),
+ /* 375 */ array(),
+ /* 376 */ array(),
+ /* 377 */ array(),
+ /* 378 */ array(),
+ /* 379 */ array(),
+ /* 380 */ array(),
+ /* 381 */ array(),
+ /* 382 */ array(),
+ /* 383 */ array(),
+ /* 384 */ array(),
+ /* 385 */ array(),
+ /* 386 */ array(),
+ /* 387 */ array(),
+ /* 388 */ array(),
+);
+ static public $yy_default = array(
+ /* 0 */ 392, 574, 591, 591, 545, 591, 545, 545, 591, 591,
+ /* 10 */ 591, 591, 591, 591, 591, 591, 591, 591, 591, 591,
+ /* 20 */ 591, 591, 591, 591, 591, 591, 591, 591, 591, 591,
+ /* 30 */ 591, 591, 591, 591, 591, 591, 591, 591, 591, 591,
+ /* 40 */ 591, 591, 591, 591, 591, 591, 591, 591, 591, 591,
+ /* 50 */ 591, 591, 591, 591, 591, 453, 591, 453, 453, 453,
+ /* 60 */ 591, 591, 458, 591, 591, 591, 591, 591, 591, 591,
+ /* 70 */ 591, 544, 575, 458, 576, 460, 463, 464, 435, 477,
+ /* 80 */ 478, 479, 486, 487, 577, 483, 482, 543, 455, 474,
+ /* 90 */ 490, 491, 502, 466, 453, 389, 591, 453, 453, 473,
+ /* 100 */ 453, 510, 453, 591, 453, 591, 453, 557, 591, 591,
+ /* 110 */ 591, 466, 466, 466, 518, 591, 591, 466, 591, 518,
+ /* 120 */ 518, 466, 511, 511, 591, 591, 591, 591, 591, 591,
+ /* 130 */ 591, 591, 511, 591, 591, 591, 591, 591, 518, 591,
+ /* 140 */ 466, 591, 591, 591, 453, 591, 453, 554, 494, 469,
+ /* 150 */ 489, 476, 495, 470, 493, 511, 471, 552, 591, 591,
+ /* 160 */ 591, 591, 591, 591, 591, 591, 591, 519, 591, 591,
+ /* 170 */ 591, 591, 591, 591, 591, 591, 591, 591, 591, 591,
+ /* 180 */ 591, 591, 536, 535, 591, 538, 516, 518, 537, 408,
+ /* 190 */ 558, 555, 518, 473, 510, 547, 532, 546, 590, 590,
+ /* 200 */ 551, 551, 518, 551, 518, 468, 502, 502, 591, 502,
+ /* 210 */ 591, 591, 591, 498, 488, 492, 530, 591, 502, 591,
+ /* 220 */ 591, 492, 530, 591, 591, 591, 500, 498, 492, 530,
+ /* 230 */ 591, 591, 591, 530, 591, 591, 591, 591, 591, 461,
+ /* 240 */ 591, 591, 591, 591, 591, 591, 556, 591, 591, 591,
+ /* 250 */ 504, 591, 591, 465, 515, 514, 539, 572, 433, 418,
+ /* 260 */ 390, 432, 438, 573, 437, 526, 436, 541, 540, 523,
+ /* 270 */ 553, 531, 542, 442, 504, 443, 571, 589, 524, 454,
+ /* 280 */ 527, 525, 462, 485, 530, 529, 444, 445, 550, 441,
+ /* 290 */ 440, 431, 430, 434, 452, 439, 446, 447, 499, 497,
+ /* 300 */ 501, 507, 467, 496, 450, 448, 548, 549, 449, 451,
+ /* 310 */ 417, 399, 398, 400, 401, 402, 397, 396, 391, 393,
+ /* 320 */ 394, 395, 403, 404, 413, 412, 414, 415, 416, 411,
+ /* 330 */ 410, 405, 406, 407, 409, 468, 512, 423, 422, 424,
+ /* 340 */ 533, 425, 421, 586, 570, 569, 472, 419, 420, 426,
+ /* 350 */ 427, 582, 583, 584, 587, 588, 580, 579, 429, 428,
+ /* 360 */ 585, 578, 568, 567, 506, 505, 508, 475, 509, 503,
+ /* 370 */ 522, 517, 520, 528, 521, 513, 534, 563, 562, 564,
+ /* 380 */ 565, 566, 561, 560, 480, 481, 484, 559, 581,
+);
+ const YYNOCODE = 124;
+ const YYSTACKDEPTH = 100;
+ const YYNSTATE = 389;
+ const YYNRULE = 202;
+ const YYERRORSYMBOL = 81;
+ const YYERRSYMDT = 'yy0';
+ const YYFALLBACK = 0;
+ static public $yyFallback = array(
+ );
+ static function Trace($TraceFILE, $zTracePrompt)
+ {
+ if (!$TraceFILE) {
+ $zTracePrompt = 0;
+ } elseif (!$zTracePrompt) {
+ $TraceFILE = 0;
+ }
+ self::$yyTraceFILE = $TraceFILE;
+ self::$yyTracePrompt = $zTracePrompt;
+ }
+
+ static function PrintTrace()
+ {
+ self::$yyTraceFILE = fopen('php://output', 'w');
+ self::$yyTracePrompt = '<br>';
+ }
+
+ static public $yyTraceFILE;
+ static public $yyTracePrompt;
+ public $yyidx; /* Index of top element in stack */
+ public $yyerrcnt; /* Shifts left before out of the error */
+ public $yystack = array(); /* The parser's stack */
+
+ public $yyTokenName = array(
+ '$', 'VERT', 'COLON', 'COMMENT',
+ 'PHPSTARTTAG', 'PHPENDTAG', 'ASPSTARTTAG', 'ASPENDTAG',
+ 'FAKEPHPSTARTTAG', 'XMLTAG', 'TEXT', 'STRIPON',
+ 'STRIPOFF', 'LITERALSTART', 'LITERALEND', 'LITERAL',
+ 'LDEL', 'RDEL', 'DOLLAR', 'ID',
+ 'EQUAL', 'PTR', 'LDELIF', 'LDELFOR',
+ 'SEMICOLON', 'INCDEC', 'TO', 'STEP',
+ 'LDELFOREACH', 'SPACE', 'AS', 'APTR',
+ 'LDELSETFILTER', 'SMARTYBLOCKCHILD', 'LDELSLASH', 'ATTR',
+ 'INTEGER', 'COMMA', 'OPENP', 'CLOSEP',
+ 'MATH', 'UNIMATH', 'ANDSYM', 'ISIN',
+ 'ISDIVBY', 'ISNOTDIVBY', 'ISEVEN', 'ISNOTEVEN',
+ 'ISEVENBY', 'ISNOTEVENBY', 'ISODD', 'ISNOTODD',
+ 'ISODDBY', 'ISNOTODDBY', 'INSTANCEOF', 'QMARK',
+ 'NOT', 'TYPECAST', 'HEX', 'DOT',
+ 'SINGLEQUOTESTRING', 'DOUBLECOLON', 'AT', 'HATCH',
+ 'OPENB', 'CLOSEB', 'EQUALS', 'NOTEQUALS',
+ 'GREATERTHAN', 'LESSTHAN', 'GREATEREQUAL', 'LESSEQUAL',
+ 'IDENTITY', 'NONEIDENTITY', 'MOD', 'LAND',
+ 'LOR', 'LXOR', 'QUOTE', 'BACKTICK',
+ 'DOLLARID', 'error', 'start', 'template',
+ 'template_element', 'smartytag', 'literal', 'literal_elements',
+ 'literal_element', 'value', 'modifierlist', 'attributes',
+ 'expr', 'varindexed', 'statement', 'statements',
+ 'optspace', 'varvar', 'foraction', 'modparameters',
+ 'attribute', 'ternary', 'array', 'ifcond',
+ 'lop', 'variable', 'function', 'doublequoted_with_quotes',
+ 'static_class_access', 'object', 'arrayindex', 'indexdef',
+ 'varvarele', 'objectchain', 'objectelement', 'method',
+ 'params', 'modifier', 'modparameter', 'arrayelements',
+ 'arrayelement', 'doublequoted', 'doublequotedcontent',
+ );
+
+ static public $yyRuleName = array(
+ /* 0 */ "start ::= template",
+ /* 1 */ "template ::= template_element",
+ /* 2 */ "template ::= template template_element",
+ /* 3 */ "template ::=",
+ /* 4 */ "template_element ::= smartytag",
+ /* 5 */ "template_element ::= COMMENT",
+ /* 6 */ "template_element ::= literal",
+ /* 7 */ "template_element ::= PHPSTARTTAG",
+ /* 8 */ "template_element ::= PHPENDTAG",
+ /* 9 */ "template_element ::= ASPSTARTTAG",
+ /* 10 */ "template_element ::= ASPENDTAG",
+ /* 11 */ "template_element ::= FAKEPHPSTARTTAG",
+ /* 12 */ "template_element ::= XMLTAG",
+ /* 13 */ "template_element ::= TEXT",
+ /* 14 */ "template_element ::= STRIPON",
+ /* 15 */ "template_element ::= STRIPOFF",
+ /* 16 */ "literal ::= LITERALSTART LITERALEND",
+ /* 17 */ "literal ::= LITERALSTART literal_elements LITERALEND",
+ /* 18 */ "literal_elements ::= literal_elements literal_element",
+ /* 19 */ "literal_elements ::=",
+ /* 20 */ "literal_element ::= literal",
+ /* 21 */ "literal_element ::= LITERAL",
+ /* 22 */ "literal_element ::= PHPSTARTTAG",
+ /* 23 */ "literal_element ::= FAKEPHPSTARTTAG",
+ /* 24 */ "literal_element ::= PHPENDTAG",
+ /* 25 */ "literal_element ::= ASPSTARTTAG",
+ /* 26 */ "literal_element ::= ASPENDTAG",
+ /* 27 */ "smartytag ::= LDEL value RDEL",
+ /* 28 */ "smartytag ::= LDEL value modifierlist attributes RDEL",
+ /* 29 */ "smartytag ::= LDEL value attributes RDEL",
+ /* 30 */ "smartytag ::= LDEL expr modifierlist attributes RDEL",
+ /* 31 */ "smartytag ::= LDEL expr attributes RDEL",
+ /* 32 */ "smartytag ::= LDEL DOLLAR ID EQUAL value RDEL",
+ /* 33 */ "smartytag ::= LDEL DOLLAR ID EQUAL expr RDEL",
+ /* 34 */ "smartytag ::= LDEL DOLLAR ID EQUAL expr attributes RDEL",
+ /* 35 */ "smartytag ::= LDEL varindexed EQUAL expr attributes RDEL",
+ /* 36 */ "smartytag ::= LDEL ID attributes RDEL",
+ /* 37 */ "smartytag ::= LDEL ID RDEL",
+ /* 38 */ "smartytag ::= LDEL ID PTR ID attributes RDEL",
+ /* 39 */ "smartytag ::= LDEL ID modifierlist attributes RDEL",
+ /* 40 */ "smartytag ::= LDEL ID PTR ID modifierlist attributes RDEL",
+ /* 41 */ "smartytag ::= LDELIF expr RDEL",
+ /* 42 */ "smartytag ::= LDELIF expr attributes RDEL",
+ /* 43 */ "smartytag ::= LDELIF statement RDEL",
+ /* 44 */ "smartytag ::= LDELIF statement attributes RDEL",
+ /* 45 */ "smartytag ::= LDELFOR statements SEMICOLON optspace expr SEMICOLON optspace DOLLAR varvar foraction attributes RDEL",
+ /* 46 */ "foraction ::= EQUAL expr",
+ /* 47 */ "foraction ::= INCDEC",
+ /* 48 */ "smartytag ::= LDELFOR statement TO expr attributes RDEL",
+ /* 49 */ "smartytag ::= LDELFOR statement TO expr STEP expr attributes RDEL",
+ /* 50 */ "smartytag ::= LDELFOREACH attributes RDEL",
+ /* 51 */ "smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar attributes RDEL",
+ /* 52 */ "smartytag ::= LDELFOREACH SPACE value AS DOLLAR varvar APTR DOLLAR varvar attributes RDEL",
+ /* 53 */ "smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar attributes RDEL",
+ /* 54 */ "smartytag ::= LDELFOREACH SPACE expr AS DOLLAR varvar APTR DOLLAR varvar attributes RDEL",
+ /* 55 */ "smartytag ::= LDELSETFILTER ID modparameters RDEL",
+ /* 56 */ "smartytag ::= LDELSETFILTER ID modparameters modifierlist RDEL",
+ /* 57 */ "smartytag ::= SMARTYBLOCKCHILD",
+ /* 58 */ "smartytag ::= LDELSLASH ID RDEL",
+ /* 59 */ "smartytag ::= LDELSLASH ID modifierlist RDEL",
+ /* 60 */ "smartytag ::= LDELSLASH ID PTR ID RDEL",
+ /* 61 */ "smartytag ::= LDELSLASH ID PTR ID modifierlist RDEL",
+ /* 62 */ "attributes ::= attributes attribute",
+ /* 63 */ "attributes ::= attribute",
+ /* 64 */ "attributes ::=",
+ /* 65 */ "attribute ::= SPACE ID EQUAL ID",
+ /* 66 */ "attribute ::= ATTR expr",
+ /* 67 */ "attribute ::= ATTR value",
+ /* 68 */ "attribute ::= SPACE ID",
+ /* 69 */ "attribute ::= SPACE expr",
+ /* 70 */ "attribute ::= SPACE value",
+ /* 71 */ "attribute ::= SPACE INTEGER EQUAL expr",
+ /* 72 */ "statements ::= statement",
+ /* 73 */ "statements ::= statements COMMA statement",
+ /* 74 */ "statement ::= DOLLAR varvar EQUAL expr",
+ /* 75 */ "statement ::= varindexed EQUAL expr",
+ /* 76 */ "statement ::= OPENP statement CLOSEP",
+ /* 77 */ "expr ::= value",
+ /* 78 */ "expr ::= ternary",
+ /* 79 */ "expr ::= DOLLAR ID COLON ID",
+ /* 80 */ "expr ::= expr MATH value",
+ /* 81 */ "expr ::= expr UNIMATH value",
+ /* 82 */ "expr ::= expr ANDSYM value",
+ /* 83 */ "expr ::= array",
+ /* 84 */ "expr ::= expr modifierlist",
+ /* 85 */ "expr ::= expr ifcond expr",
+ /* 86 */ "expr ::= expr ISIN array",
+ /* 87 */ "expr ::= expr ISIN value",
+ /* 88 */ "expr ::= expr lop expr",
+ /* 89 */ "expr ::= expr ISDIVBY expr",
+ /* 90 */ "expr ::= expr ISNOTDIVBY expr",
+ /* 91 */ "expr ::= expr ISEVEN",
+ /* 92 */ "expr ::= expr ISNOTEVEN",
+ /* 93 */ "expr ::= expr ISEVENBY expr",
+ /* 94 */ "expr ::= expr ISNOTEVENBY expr",
+ /* 95 */ "expr ::= expr ISODD",
+ /* 96 */ "expr ::= expr ISNOTODD",
+ /* 97 */ "expr ::= expr ISODDBY expr",
+ /* 98 */ "expr ::= expr ISNOTODDBY expr",
+ /* 99 */ "expr ::= value INSTANCEOF ID",
+ /* 100 */ "expr ::= value INSTANCEOF value",
+ /* 101 */ "ternary ::= OPENP expr CLOSEP QMARK DOLLAR ID COLON expr",
+ /* 102 */ "ternary ::= OPENP expr CLOSEP QMARK expr COLON expr",
+ /* 103 */ "value ::= variable",
+ /* 104 */ "value ::= UNIMATH value",
+ /* 105 */ "value ::= NOT value",
+ /* 106 */ "value ::= TYPECAST value",
+ /* 107 */ "value ::= variable INCDEC",
+ /* 108 */ "value ::= HEX",
+ /* 109 */ "value ::= INTEGER",
+ /* 110 */ "value ::= INTEGER DOT INTEGER",
+ /* 111 */ "value ::= INTEGER DOT",
+ /* 112 */ "value ::= DOT INTEGER",
+ /* 113 */ "value ::= ID",
+ /* 114 */ "value ::= function",
+ /* 115 */ "value ::= OPENP expr CLOSEP",
+ /* 116 */ "value ::= SINGLEQUOTESTRING",
+ /* 117 */ "value ::= doublequoted_with_quotes",
+ /* 118 */ "value ::= ID DOUBLECOLON static_class_access",
+ /* 119 */ "value ::= varindexed DOUBLECOLON static_class_access",
+ /* 120 */ "value ::= smartytag",
+ /* 121 */ "value ::= value modifierlist",
+ /* 122 */ "variable ::= varindexed",
+ /* 123 */ "variable ::= DOLLAR varvar AT ID",
+ /* 124 */ "variable ::= object",
+ /* 125 */ "variable ::= HATCH ID HATCH",
+ /* 126 */ "variable ::= HATCH variable HATCH",
+ /* 127 */ "varindexed ::= DOLLAR varvar arrayindex",
+ /* 128 */ "arrayindex ::= arrayindex indexdef",
+ /* 129 */ "arrayindex ::=",
+ /* 130 */ "indexdef ::= DOT DOLLAR varvar",
+ /* 131 */ "indexdef ::= DOT DOLLAR varvar AT ID",
+ /* 132 */ "indexdef ::= DOT ID",
+ /* 133 */ "indexdef ::= DOT INTEGER",
+ /* 134 */ "indexdef ::= DOT LDEL expr RDEL",
+ /* 135 */ "indexdef ::= OPENB ID CLOSEB",
+ /* 136 */ "indexdef ::= OPENB ID DOT ID CLOSEB",
+ /* 137 */ "indexdef ::= OPENB expr CLOSEB",
+ /* 138 */ "indexdef ::= OPENB CLOSEB",
+ /* 139 */ "varvar ::= varvarele",
+ /* 140 */ "varvar ::= varvar varvarele",
+ /* 141 */ "varvarele ::= ID",
+ /* 142 */ "varvarele ::= LDEL expr RDEL",
+ /* 143 */ "object ::= varindexed objectchain",
+ /* 144 */ "objectchain ::= objectelement",
+ /* 145 */ "objectchain ::= objectchain objectelement",
+ /* 146 */ "objectelement ::= PTR ID arrayindex",
+ /* 147 */ "objectelement ::= PTR DOLLAR varvar arrayindex",
+ /* 148 */ "objectelement ::= PTR LDEL expr RDEL arrayindex",
+ /* 149 */ "objectelement ::= PTR ID LDEL expr RDEL arrayindex",
+ /* 150 */ "objectelement ::= PTR method",
+ /* 151 */ "function ::= ID OPENP params CLOSEP",
+ /* 152 */ "method ::= ID OPENP params CLOSEP",
+ /* 153 */ "method ::= DOLLAR ID OPENP params CLOSEP",
+ /* 154 */ "params ::= params COMMA expr",
+ /* 155 */ "params ::= expr",
+ /* 156 */ "params ::=",
+ /* 157 */ "modifierlist ::= modifierlist modifier modparameters",
+ /* 158 */ "modifierlist ::= modifier modparameters",
+ /* 159 */ "modifier ::= VERT AT ID",
+ /* 160 */ "modifier ::= VERT ID",
+ /* 161 */ "modparameters ::= modparameters modparameter",
+ /* 162 */ "modparameters ::=",
+ /* 163 */ "modparameter ::= COLON value",
+ /* 164 */ "modparameter ::= COLON array",
+ /* 165 */ "static_class_access ::= method",
+ /* 166 */ "static_class_access ::= method objectchain",
+ /* 167 */ "static_class_access ::= ID",
+ /* 168 */ "static_class_access ::= DOLLAR ID arrayindex",
+ /* 169 */ "static_class_access ::= DOLLAR ID arrayindex objectchain",
+ /* 170 */ "ifcond ::= EQUALS",
+ /* 171 */ "ifcond ::= NOTEQUALS",
+ /* 172 */ "ifcond ::= GREATERTHAN",
+ /* 173 */ "ifcond ::= LESSTHAN",
+ /* 174 */ "ifcond ::= GREATEREQUAL",
+ /* 175 */ "ifcond ::= LESSEQUAL",
+ /* 176 */ "ifcond ::= IDENTITY",
+ /* 177 */ "ifcond ::= NONEIDENTITY",
+ /* 178 */ "ifcond ::= MOD",
+ /* 179 */ "lop ::= LAND",
+ /* 180 */ "lop ::= LOR",
+ /* 181 */ "lop ::= LXOR",
+ /* 182 */ "array ::= OPENB arrayelements CLOSEB",
+ /* 183 */ "arrayelements ::= arrayelement",
+ /* 184 */ "arrayelements ::= arrayelements COMMA arrayelement",
+ /* 185 */ "arrayelements ::=",
+ /* 186 */ "arrayelement ::= value APTR expr",
+ /* 187 */ "arrayelement ::= ID APTR expr",
+ /* 188 */ "arrayelement ::= expr",
+ /* 189 */ "doublequoted_with_quotes ::= QUOTE QUOTE",
+ /* 190 */ "doublequoted_with_quotes ::= QUOTE doublequoted QUOTE",
+ /* 191 */ "doublequoted ::= doublequoted doublequotedcontent",
+ /* 192 */ "doublequoted ::= doublequotedcontent",
+ /* 193 */ "doublequotedcontent ::= BACKTICK variable BACKTICK",
+ /* 194 */ "doublequotedcontent ::= BACKTICK expr BACKTICK",
+ /* 195 */ "doublequotedcontent ::= DOLLARID",
+ /* 196 */ "doublequotedcontent ::= LDEL variable RDEL",
+ /* 197 */ "doublequotedcontent ::= LDEL expr RDEL",
+ /* 198 */ "doublequotedcontent ::= smartytag",
+ /* 199 */ "doublequotedcontent ::= TEXT",
+ /* 200 */ "optspace ::= SPACE",
+ /* 201 */ "optspace ::=",
+ );
+
+ function tokenName($tokenType)
+ {
+ if ($tokenType === 0) {
+ return 'End of Input';
+ }
+ if ($tokenType > 0 && $tokenType < count($this->yyTokenName)) {
+ return $this->yyTokenName[$tokenType];
+ } else {
+ return "Unknown";
+ }
+ }
+
+ static function yy_destructor($yymajor, $yypminor)
+ {
+ switch ($yymajor) {
+ default: break; /* If no destructor action specified: do nothing */
+ }
+ }
+
+ function yy_pop_parser_stack()
+ {
+ if (!count($this->yystack)) {
+ return;
+ }
+ $yytos = array_pop($this->yystack);
+ if (self::$yyTraceFILE && $this->yyidx >= 0) {
+ fwrite(self::$yyTraceFILE,
+ self::$yyTracePrompt . 'Popping ' . $this->yyTokenName[$yytos->major] .
+ "\n");
+ }
+ $yymajor = $yytos->major;
+ self::yy_destructor($yymajor, $yytos->minor);
+ $this->yyidx--;
+ return $yymajor;
+ }
+
+ function __destruct()
+ {
+ while ($this->yystack !== Array()) {
+ $this->yy_pop_parser_stack();
+ }
+ if (is_resource(self::$yyTraceFILE)) {
+ fclose(self::$yyTraceFILE);
+ }
+ }
+
+ function yy_get_expected_tokens($token)
+ {
+ $state = $this->yystack[$this->yyidx]->stateno;
+ $expected = self::$yyExpectedTokens[$state];
+ if (in_array($token, self::$yyExpectedTokens[$state], true)) {
+ return $expected;
+ }
+ $stack = $this->yystack;
+ $yyidx = $this->yyidx;
+ do {
+ $yyact = $this->yy_find_shift_action($token);
+ if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
+ // reduce action
+ $done = 0;
+ do {
+ if ($done++ == 100) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // too much recursion prevents proper detection
+ // so give up
+ return array_unique($expected);
+ }
+ $yyruleno = $yyact - self::YYNSTATE;
+ $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
+ $nextstate = $this->yy_find_reduce_action(
+ $this->yystack[$this->yyidx]->stateno,
+ self::$yyRuleInfo[$yyruleno]['lhs']);
+ if (isset(self::$yyExpectedTokens[$nextstate])) {
+ $expected = array_merge($expected, self::$yyExpectedTokens[$nextstate]);
+ if (in_array($token,
+ self::$yyExpectedTokens[$nextstate], true)) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return array_unique($expected);
+ }
+ }
+ if ($nextstate < self::YYNSTATE) {
+ // we need to shift a non-terminal
+ $this->yyidx++;
+ $x = new TP_yyStackEntry;
+ $x->stateno = $nextstate;
+ $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
+ $this->yystack[$this->yyidx] = $x;
+ continue 2;
+ } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // the last token was just ignored, we can't accept
+ // by ignoring input, this is in essence ignoring a
+ // syntax error!
+ return array_unique($expected);
+ } elseif ($nextstate === self::YY_NO_ACTION) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // input accepted, but not shifted (I guess)
+ return $expected;
+ } else {
+ $yyact = $nextstate;
+ }
+ } while (true);
+ }
+ break;
+ } while (true);
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return array_unique($expected);
+ }
+
+ function yy_is_expected_token($token)
+ {
+ if ($token === 0) {
+ return true; // 0 is not part of this
+ }
+ $state = $this->yystack[$this->yyidx]->stateno;
+ if (in_array($token, self::$yyExpectedTokens[$state], true)) {
+ return true;
+ }
+ $stack = $this->yystack;
+ $yyidx = $this->yyidx;
+ do {
+ $yyact = $this->yy_find_shift_action($token);
+ if ($yyact >= self::YYNSTATE && $yyact < self::YYNSTATE + self::YYNRULE) {
+ // reduce action
+ $done = 0;
+ do {
+ if ($done++ == 100) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // too much recursion prevents proper detection
+ // so give up
+ return true;
+ }
+ $yyruleno = $yyact - self::YYNSTATE;
+ $this->yyidx -= self::$yyRuleInfo[$yyruleno]['rhs'];
+ $nextstate = $this->yy_find_reduce_action(
+ $this->yystack[$this->yyidx]->stateno,
+ self::$yyRuleInfo[$yyruleno]['lhs']);
+ if (isset(self::$yyExpectedTokens[$nextstate]) &&
+ in_array($token, self::$yyExpectedTokens[$nextstate], true)) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return true;
+ }
+ if ($nextstate < self::YYNSTATE) {
+ // we need to shift a non-terminal
+ $this->yyidx++;
+ $x = new TP_yyStackEntry;
+ $x->stateno = $nextstate;
+ $x->major = self::$yyRuleInfo[$yyruleno]['lhs'];
+ $this->yystack[$this->yyidx] = $x;
+ continue 2;
+ } elseif ($nextstate == self::YYNSTATE + self::YYNRULE + 1) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ if (!$token) {
+ // end of input: this is valid
+ return true;
+ }
+ // the last token was just ignored, we can't accept
+ // by ignoring input, this is in essence ignoring a
+ // syntax error!
+ return false;
+ } elseif ($nextstate === self::YY_NO_ACTION) {
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ // input accepted, but not shifted (I guess)
+ return true;
+ } else {
+ $yyact = $nextstate;
+ }
+ } while (true);
+ }
+ break;
+ } while (true);
+ $this->yyidx = $yyidx;
+ $this->yystack = $stack;
+ return true;
+ }
+
+ function yy_find_shift_action($iLookAhead)
+ {
+ $stateno = $this->yystack[$this->yyidx]->stateno;
+
+ /* if ($this->yyidx < 0) return self::YY_NO_ACTION; */
+ if (!isset(self::$yy_shift_ofst[$stateno])) {
+ // no shift actions
+ return self::$yy_default[$stateno];
+ }
+ $i = self::$yy_shift_ofst[$stateno];
+ if ($i === self::YY_SHIFT_USE_DFLT) {
+ return self::$yy_default[$stateno];
+ }
+ if ($iLookAhead == self::YYNOCODE) {
+ return self::YY_NO_ACTION;
+ }
+ $i += $iLookAhead;
+ if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
+ self::$yy_lookahead[$i] != $iLookAhead) {
+ if (count(self::$yyFallback) && $iLookAhead < count(self::$yyFallback)
+ && ($iFallback = self::$yyFallback[$iLookAhead]) != 0) {
+ if (self::$yyTraceFILE) {
+ fwrite(self::$yyTraceFILE, self::$yyTracePrompt . "FALLBACK " .
+ $this->yyTokenName[$iLookAhead] . " => " .
+ $this->yyTokenName[$iFallback] . "\n");
+ }
+ return $this->yy_find_shift_action($iFallback);
+ }
+ return self::$yy_default[$stateno];
+ } else {
+ return self::$yy_action[$i];
+ }
+ }
+
+ function yy_find_reduce_action($stateno, $iLookAhead)
+ {
+ /* $stateno = $this->yystack[$this->yyidx]->stateno; */
+
+ if (!isset(self::$yy_reduce_ofst[$stateno])) {
+ return self::$yy_default[$stateno];
+ }
+ $i = self::$yy_reduce_ofst[$stateno];
+ if ($i == self::YY_REDUCE_USE_DFLT) {
+ return self::$yy_default[$stateno];
+ }
+ if ($iLookAhead == self::YYNOCODE) {
+ return self::YY_NO_ACTION;
+ }
+ $i += $iLookAhead;
+ if ($i < 0 || $i >= self::YY_SZ_ACTTAB ||
+ self::$yy_lookahead[$i] != $iLookAhead) {
+ return self::$yy_default[$stateno];
+ } else {
+ return self::$yy_action[$i];
+ }
+ }
+
+ function yy_shift($yyNewState, $yyMajor, $yypMinor)
+ {
+ $this->yyidx++;
+ if ($this->yyidx >= self::YYSTACKDEPTH) {
+ $this->yyidx--;
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sStack Overflow!\n", self::$yyTracePrompt);
+ }
+ while ($this->yyidx >= 0) {
+ $this->yy_pop_parser_stack();
+ }
+#line 84 "smarty_internal_templateparser.y"
+
+ $this->internalError = true;
+ $this->compiler->trigger_template_error("Stack overflow in template parser");
+#line 1733 "smarty_internal_templateparser.php"
+ return;
+ }
+ $yytos = new TP_yyStackEntry;
+ $yytos->stateno = $yyNewState;
+ $yytos->major = $yyMajor;
+ $yytos->minor = $yypMinor;
+ array_push($this->yystack, $yytos);
+ if (self::$yyTraceFILE && $this->yyidx > 0) {
+ fprintf(self::$yyTraceFILE, "%sShift %d\n", self::$yyTracePrompt,
+ $yyNewState);
+ fprintf(self::$yyTraceFILE, "%sStack:", self::$yyTracePrompt);
+ for($i = 1; $i <= $this->yyidx; $i++) {
+ fprintf(self::$yyTraceFILE, " %s",
+ $this->yyTokenName[$this->yystack[$i]->major]);
+ }
+ fwrite(self::$yyTraceFILE,"\n");
+ }
+ }
+
+ static public $yyRuleInfo = array(
+ array( 'lhs' => 82, 'rhs' => 1 ),
+ array( 'lhs' => 83, 'rhs' => 1 ),
+ array( 'lhs' => 83, 'rhs' => 2 ),
+ array( 'lhs' => 83, 'rhs' => 0 ),
+ array( 'lhs' => 84, 'rhs' => 1 ),
+ array( 'lhs' => 84, 'rhs' => 1 ),
+ array( 'lhs' => 84, 'rhs' => 1 ),
+ array( 'lhs' => 84, 'rhs' => 1 ),
+ array( 'lhs' => 84, 'rhs' => 1 ),
+ array( 'lhs' => 84, 'rhs' => 1 ),
+ array( 'lhs' => 84, 'rhs' => 1 ),
+ array( 'lhs' => 84, 'rhs' => 1 ),
+ array( 'lhs' => 84, 'rhs' => 1 ),
+ array( 'lhs' => 84, 'rhs' => 1 ),
+ array( 'lhs' => 84, 'rhs' => 1 ),
+ array( 'lhs' => 84, 'rhs' => 1 ),
+ array( 'lhs' => 86, 'rhs' => 2 ),
+ array( 'lhs' => 86, 'rhs' => 3 ),
+ array( 'lhs' => 87, 'rhs' => 2 ),
+ array( 'lhs' => 87, 'rhs' => 0 ),
+ array( 'lhs' => 88, 'rhs' => 1 ),
+ array( 'lhs' => 88, 'rhs' => 1 ),
+ array( 'lhs' => 88, 'rhs' => 1 ),
+ array( 'lhs' => 88, 'rhs' => 1 ),
+ array( 'lhs' => 88, 'rhs' => 1 ),
+ array( 'lhs' => 88, 'rhs' => 1 ),
+ array( 'lhs' => 88, 'rhs' => 1 ),
+ array( 'lhs' => 85, 'rhs' => 3 ),
+ array( 'lhs' => 85, 'rhs' => 5 ),
+ array( 'lhs' => 85, 'rhs' => 4 ),
+ array( 'lhs' => 85, 'rhs' => 5 ),
+ array( 'lhs' => 85, 'rhs' => 4 ),
+ array( 'lhs' => 85, 'rhs' => 6 ),
+ array( 'lhs' => 85, 'rhs' => 6 ),
+ array( 'lhs' => 85, 'rhs' => 7 ),
+ array( 'lhs' => 85, 'rhs' => 6 ),
+ array( 'lhs' => 85, 'rhs' => 4 ),
+ array( 'lhs' => 85, 'rhs' => 3 ),
+ array( 'lhs' => 85, 'rhs' => 6 ),
+ array( 'lhs' => 85, 'rhs' => 5 ),
+ array( 'lhs' => 85, 'rhs' => 7 ),
+ array( 'lhs' => 85, 'rhs' => 3 ),
+ array( 'lhs' => 85, 'rhs' => 4 ),
+ array( 'lhs' => 85, 'rhs' => 3 ),
+ array( 'lhs' => 85, 'rhs' => 4 ),
+ array( 'lhs' => 85, 'rhs' => 12 ),
+ array( 'lhs' => 98, 'rhs' => 2 ),
+ array( 'lhs' => 98, 'rhs' => 1 ),
+ array( 'lhs' => 85, 'rhs' => 6 ),
+ array( 'lhs' => 85, 'rhs' => 8 ),
+ array( 'lhs' => 85, 'rhs' => 3 ),
+ array( 'lhs' => 85, 'rhs' => 8 ),
+ array( 'lhs' => 85, 'rhs' => 11 ),
+ array( 'lhs' => 85, 'rhs' => 8 ),
+ array( 'lhs' => 85, 'rhs' => 11 ),
+ array( 'lhs' => 85, 'rhs' => 4 ),
+ array( 'lhs' => 85, 'rhs' => 5 ),
+ array( 'lhs' => 85, 'rhs' => 1 ),
+ array( 'lhs' => 85, 'rhs' => 3 ),
+ array( 'lhs' => 85, 'rhs' => 4 ),
+ array( 'lhs' => 85, 'rhs' => 5 ),
+ array( 'lhs' => 85, 'rhs' => 6 ),
+ array( 'lhs' => 91, 'rhs' => 2 ),
+ array( 'lhs' => 91, 'rhs' => 1 ),
+ array( 'lhs' => 91, 'rhs' => 0 ),
+ array( 'lhs' => 100, 'rhs' => 4 ),
+ array( 'lhs' => 100, 'rhs' => 2 ),
+ array( 'lhs' => 100, 'rhs' => 2 ),
+ array( 'lhs' => 100, 'rhs' => 2 ),
+ array( 'lhs' => 100, 'rhs' => 2 ),
+ array( 'lhs' => 100, 'rhs' => 2 ),
+ array( 'lhs' => 100, 'rhs' => 4 ),
+ array( 'lhs' => 95, 'rhs' => 1 ),
+ array( 'lhs' => 95, 'rhs' => 3 ),
+ array( 'lhs' => 94, 'rhs' => 4 ),
+ array( 'lhs' => 94, 'rhs' => 3 ),
+ array( 'lhs' => 94, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 1 ),
+ array( 'lhs' => 92, 'rhs' => 1 ),
+ array( 'lhs' => 92, 'rhs' => 4 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 1 ),
+ array( 'lhs' => 92, 'rhs' => 2 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 2 ),
+ array( 'lhs' => 92, 'rhs' => 2 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 2 ),
+ array( 'lhs' => 92, 'rhs' => 2 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 92, 'rhs' => 3 ),
+ array( 'lhs' => 101, 'rhs' => 8 ),
+ array( 'lhs' => 101, 'rhs' => 7 ),
+ array( 'lhs' => 89, 'rhs' => 1 ),
+ array( 'lhs' => 89, 'rhs' => 2 ),
+ array( 'lhs' => 89, 'rhs' => 2 ),
+ array( 'lhs' => 89, 'rhs' => 2 ),
+ array( 'lhs' => 89, 'rhs' => 2 ),
+ array( 'lhs' => 89, 'rhs' => 1 ),
+ array( 'lhs' => 89, 'rhs' => 1 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 2 ),
+ array( 'lhs' => 89, 'rhs' => 2 ),
+ array( 'lhs' => 89, 'rhs' => 1 ),
+ array( 'lhs' => 89, 'rhs' => 1 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 1 ),
+ array( 'lhs' => 89, 'rhs' => 1 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 3 ),
+ array( 'lhs' => 89, 'rhs' => 1 ),
+ array( 'lhs' => 89, 'rhs' => 2 ),
+ array( 'lhs' => 105, 'rhs' => 1 ),
+ array( 'lhs' => 105, 'rhs' => 4 ),
+ array( 'lhs' => 105, 'rhs' => 1 ),
+ array( 'lhs' => 105, 'rhs' => 3 ),
+ array( 'lhs' => 105, 'rhs' => 3 ),
+ array( 'lhs' => 93, 'rhs' => 3 ),
+ array( 'lhs' => 110, 'rhs' => 2 ),
+ array( 'lhs' => 110, 'rhs' => 0 ),
+ array( 'lhs' => 111, 'rhs' => 3 ),
+ array( 'lhs' => 111, 'rhs' => 5 ),
+ array( 'lhs' => 111, 'rhs' => 2 ),
+ array( 'lhs' => 111, 'rhs' => 2 ),
+ array( 'lhs' => 111, 'rhs' => 4 ),
+ array( 'lhs' => 111, 'rhs' => 3 ),
+ array( 'lhs' => 111, 'rhs' => 5 ),
+ array( 'lhs' => 111, 'rhs' => 3 ),
+ array( 'lhs' => 111, 'rhs' => 2 ),
+ array( 'lhs' => 97, 'rhs' => 1 ),
+ array( 'lhs' => 97, 'rhs' => 2 ),
+ array( 'lhs' => 112, 'rhs' => 1 ),
+ array( 'lhs' => 112, 'rhs' => 3 ),
+ array( 'lhs' => 109, 'rhs' => 2 ),
+ array( 'lhs' => 113, 'rhs' => 1 ),
+ array( 'lhs' => 113, 'rhs' => 2 ),
+ array( 'lhs' => 114, 'rhs' => 3 ),
+ array( 'lhs' => 114, 'rhs' => 4 ),
+ array( 'lhs' => 114, 'rhs' => 5 ),
+ array( 'lhs' => 114, 'rhs' => 6 ),
+ array( 'lhs' => 114, 'rhs' => 2 ),
+ array( 'lhs' => 106, 'rhs' => 4 ),
+ array( 'lhs' => 115, 'rhs' => 4 ),
+ array( 'lhs' => 115, 'rhs' => 5 ),
+ array( 'lhs' => 116, 'rhs' => 3 ),
+ array( 'lhs' => 116, 'rhs' => 1 ),
+ array( 'lhs' => 116, 'rhs' => 0 ),
+ array( 'lhs' => 90, 'rhs' => 3 ),
+ array( 'lhs' => 90, 'rhs' => 2 ),
+ array( 'lhs' => 117, 'rhs' => 3 ),
+ array( 'lhs' => 117, 'rhs' => 2 ),
+ array( 'lhs' => 99, 'rhs' => 2 ),
+ array( 'lhs' => 99, 'rhs' => 0 ),
+ array( 'lhs' => 118, 'rhs' => 2 ),
+ array( 'lhs' => 118, 'rhs' => 2 ),
+ array( 'lhs' => 108, 'rhs' => 1 ),
+ array( 'lhs' => 108, 'rhs' => 2 ),
+ array( 'lhs' => 108, 'rhs' => 1 ),
+ array( 'lhs' => 108, 'rhs' => 3 ),
+ array( 'lhs' => 108, 'rhs' => 4 ),
+ array( 'lhs' => 103, 'rhs' => 1 ),
+ array( 'lhs' => 103, 'rhs' => 1 ),
+ array( 'lhs' => 103, 'rhs' => 1 ),
+ array( 'lhs' => 103, 'rhs' => 1 ),
+ array( 'lhs' => 103, 'rhs' => 1 ),
+ array( 'lhs' => 103, 'rhs' => 1 ),
+ array( 'lhs' => 103, 'rhs' => 1 ),
+ array( 'lhs' => 103, 'rhs' => 1 ),
+ array( 'lhs' => 103, 'rhs' => 1 ),
+ array( 'lhs' => 104, 'rhs' => 1 ),
+ array( 'lhs' => 104, 'rhs' => 1 ),
+ array( 'lhs' => 104, 'rhs' => 1 ),
+ array( 'lhs' => 102, 'rhs' => 3 ),
+ array( 'lhs' => 119, 'rhs' => 1 ),
+ array( 'lhs' => 119, 'rhs' => 3 ),
+ array( 'lhs' => 119, 'rhs' => 0 ),
+ array( 'lhs' => 120, 'rhs' => 3 ),
+ array( 'lhs' => 120, 'rhs' => 3 ),
+ array( 'lhs' => 120, 'rhs' => 1 ),
+ array( 'lhs' => 107, 'rhs' => 2 ),
+ array( 'lhs' => 107, 'rhs' => 3 ),
+ array( 'lhs' => 121, 'rhs' => 2 ),
+ array( 'lhs' => 121, 'rhs' => 1 ),
+ array( 'lhs' => 122, 'rhs' => 3 ),
+ array( 'lhs' => 122, 'rhs' => 3 ),
+ array( 'lhs' => 122, 'rhs' => 1 ),
+ array( 'lhs' => 122, 'rhs' => 3 ),
+ array( 'lhs' => 122, 'rhs' => 3 ),
+ array( 'lhs' => 122, 'rhs' => 1 ),
+ array( 'lhs' => 122, 'rhs' => 1 ),
+ array( 'lhs' => 96, 'rhs' => 1 ),
+ array( 'lhs' => 96, 'rhs' => 0 ),
+ );
+
+ static public $yyReduceMap = array(
+ 0 => 0,
+ 1 => 1,
+ 2 => 1,
+ 4 => 4,
+ 5 => 5,
+ 6 => 6,
+ 7 => 7,
+ 8 => 8,
+ 9 => 9,
+ 10 => 10,
+ 11 => 11,
+ 12 => 12,
+ 13 => 13,
+ 14 => 14,
+ 15 => 15,
+ 16 => 16,
+ 19 => 16,
+ 201 => 16,
+ 17 => 17,
+ 76 => 17,
+ 18 => 18,
+ 104 => 18,
+ 106 => 18,
+ 107 => 18,
+ 128 => 18,
+ 166 => 18,
+ 20 => 20,
+ 21 => 20,
+ 47 => 20,
+ 69 => 20,
+ 70 => 20,
+ 77 => 20,
+ 78 => 20,
+ 83 => 20,
+ 103 => 20,
+ 108 => 20,
+ 109 => 20,
+ 114 => 20,
+ 116 => 20,
+ 117 => 20,
+ 124 => 20,
+ 139 => 20,
+ 165 => 20,
+ 167 => 20,
+ 183 => 20,
+ 188 => 20,
+ 200 => 20,
+ 22 => 22,
+ 23 => 22,
+ 24 => 24,
+ 25 => 25,
+ 26 => 26,
+ 27 => 27,
+ 28 => 28,
+ 29 => 29,
+ 31 => 29,
+ 30 => 30,
+ 32 => 32,
+ 33 => 32,
+ 34 => 34,
+ 35 => 35,
+ 36 => 36,
+ 37 => 37,
+ 38 => 38,
+ 39 => 39,
+ 40 => 40,
+ 41 => 41,
+ 42 => 42,
+ 44 => 42,
+ 43 => 43,
+ 45 => 45,
+ 46 => 46,
+ 48 => 48,
+ 49 => 49,
+ 50 => 50,
+ 51 => 51,
+ 52 => 52,
+ 53 => 53,
+ 54 => 54,
+ 55 => 55,
+ 56 => 56,
+ 57 => 57,
+ 58 => 58,
+ 59 => 59,
+ 60 => 60,
+ 61 => 61,
+ 62 => 62,
+ 63 => 63,
+ 72 => 63,
+ 155 => 63,
+ 159 => 63,
+ 163 => 63,
+ 164 => 63,
+ 64 => 64,
+ 156 => 64,
+ 162 => 64,
+ 65 => 65,
+ 66 => 66,
+ 67 => 66,
+ 68 => 68,
+ 71 => 71,
+ 73 => 73,
+ 74 => 74,
+ 75 => 74,
+ 79 => 79,
+ 80 => 80,
+ 81 => 80,
+ 82 => 80,
+ 84 => 84,
+ 121 => 84,
+ 85 => 85,
+ 88 => 85,
+ 99 => 85,
+ 86 => 86,
+ 87 => 87,
+ 89 => 89,
+ 90 => 90,
+ 91 => 91,
+ 96 => 91,
+ 92 => 92,
+ 95 => 92,
+ 93 => 93,
+ 98 => 93,
+ 94 => 94,
+ 97 => 94,
+ 100 => 100,
+ 101 => 101,
+ 102 => 102,
+ 105 => 105,
+ 110 => 110,
+ 111 => 111,
+ 112 => 112,
+ 113 => 113,
+ 115 => 115,
+ 118 => 118,
+ 119 => 119,
+ 120 => 120,
+ 122 => 122,
+ 123 => 123,
+ 125 => 125,
+ 126 => 126,
+ 127 => 127,
+ 129 => 129,
+ 185 => 129,
+ 130 => 130,
+ 131 => 131,
+ 132 => 132,
+ 133 => 133,
+ 134 => 134,
+ 137 => 134,
+ 135 => 135,
+ 136 => 136,
+ 138 => 138,
+ 140 => 140,
+ 141 => 141,
+ 142 => 142,
+ 143 => 143,
+ 144 => 144,
+ 145 => 145,
+ 146 => 146,
+ 147 => 147,
+ 148 => 148,
+ 149 => 149,
+ 150 => 150,
+ 151 => 151,
+ 152 => 152,
+ 153 => 153,
+ 154 => 154,
+ 157 => 157,
+ 158 => 158,
+ 160 => 160,
+ 161 => 161,
+ 168 => 168,
+ 169 => 169,
+ 170 => 170,
+ 171 => 171,
+ 172 => 172,
+ 173 => 173,
+ 174 => 174,
+ 175 => 175,
+ 176 => 176,
+ 177 => 177,
+ 178 => 178,
+ 179 => 179,
+ 180 => 180,
+ 181 => 181,
+ 182 => 182,
+ 184 => 184,
+ 186 => 186,
+ 187 => 187,
+ 189 => 189,
+ 190 => 190,
+ 191 => 191,
+ 192 => 192,
+ 193 => 193,
+ 194 => 193,
+ 196 => 193,
+ 195 => 195,
+ 197 => 197,
+ 198 => 198,
+ 199 => 199,
+ );
+#line 95 "smarty_internal_templateparser.y"
+ function yy_r0(){
+ $this->_retvalue = $this->root_buffer->to_smarty_php();
+ }
+#line 2165 "smarty_internal_templateparser.php"
+#line 103 "smarty_internal_templateparser.y"
+ function yy_r1(){
+ $this->current_buffer->append_subtree($this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 2170 "smarty_internal_templateparser.php"
+#line 119 "smarty_internal_templateparser.y"
+ function yy_r4(){
+ if ($this->compiler->has_code) {
+ $tmp =''; foreach ($this->compiler->prefix_code as $code) {$tmp.=$code;} $this->compiler->prefix_code=array();
+ $this->_retvalue = new _smarty_tag($this, $this->compiler->processNocacheCode($tmp.$this->yystack[$this->yyidx + 0]->minor,true));
+ } else {
+ $this->_retvalue = new _smarty_tag($this, $this->yystack[$this->yyidx + 0]->minor);
+ }
+ $this->compiler->has_variable_string = false;
+ $this->block_nesting_level = count($this->compiler->_tag_stack);
+ }
+#line 2182 "smarty_internal_templateparser.php"
+#line 131 "smarty_internal_templateparser.y"
+ function yy_r5(){
+ $this->_retvalue = new _smarty_tag($this, '');
+ }
+#line 2187 "smarty_internal_templateparser.php"
+#line 136 "smarty_internal_templateparser.y"
+ function yy_r6(){
+ $this->_retvalue = new _smarty_text($this, $this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 2192 "smarty_internal_templateparser.php"
+#line 141 "smarty_internal_templateparser.y"
+ function yy_r7(){
+ if ($this->php_handling == Smarty::PHP_PASSTHRU) {
+ $this->_retvalue = new _smarty_text($this, self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));
+ } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
+ $this->_retvalue = new _smarty_text($this, htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES));
+ } elseif ($this->php_handling == Smarty::PHP_ALLOW) {
+ if (!($this->smarty instanceof SmartyBC)) {
+ $this->compiler->trigger_template_error (self::Err3);
+ }
+ $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('<?php', true));
+ } elseif ($this->php_handling == Smarty::PHP_REMOVE) {
+ $this->_retvalue = new _smarty_text($this, '');
+ }
+ }
+#line 2208 "smarty_internal_templateparser.php"
+#line 157 "smarty_internal_templateparser.y"
+ function yy_r8(){
+ if ($this->is_xml) {
+ $this->compiler->tag_nocache = true;
+ $this->is_xml = false;
+ $save = $this->template->has_nocache_code;
+ $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode("<?php echo '?>';?>\n", $this->compiler, true));
+ $this->template->has_nocache_code = $save;
+ } elseif ($this->php_handling == Smarty::PHP_PASSTHRU) {
+ $this->_retvalue = new _smarty_text($this, '?<?php ?>>');
+ } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
+ $this->_retvalue = new _smarty_text($this, htmlspecialchars('?>', ENT_QUOTES));
+ } elseif ($this->php_handling == Smarty::PHP_ALLOW) {
+ $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('?>', true));
+ } elseif ($this->php_handling == Smarty::PHP_REMOVE) {
+ $this->_retvalue = new _smarty_text($this, '');
+ }
+ }
+#line 2227 "smarty_internal_templateparser.php"
+#line 176 "smarty_internal_templateparser.y"
+ function yy_r9(){
+ if ($this->php_handling == Smarty::PHP_PASSTHRU) {
+ $this->_retvalue = new _smarty_text($this, '<<?php ?>%');
+ } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
+ $this->_retvalue = new _smarty_text($this, htmlspecialchars($this->yystack[$this->yyidx + 0]->minor, ENT_QUOTES));
+ } elseif ($this->php_handling == Smarty::PHP_ALLOW) {
+ if ($this->asp_tags) {
+ if (!($this->smarty instanceof SmartyBC)) {
+ $this->compiler->trigger_template_error (self::Err3);
+ }
+ $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('<%', true));
+ } else {
+ $this->_retvalue = new _smarty_text($this, '<<?php ?>%');
+ }
+ } elseif ($this->php_handling == Smarty::PHP_REMOVE) {
+ if ($this->asp_tags) {
+ $this->_retvalue = new _smarty_text($this, '');
+ } else {
+ $this->_retvalue = new _smarty_text($this, '<<?php ?>%');
+ }
+ }
+ }
+#line 2251 "smarty_internal_templateparser.php"
+#line 200 "smarty_internal_templateparser.y"
+ function yy_r10(){
+ if ($this->php_handling == Smarty::PHP_PASSTHRU) {
+ $this->_retvalue = new _smarty_text($this, '%<?php ?>>');
+ } elseif ($this->php_handling == Smarty::PHP_QUOTE) {
+ $this->_retvalue = new _smarty_text($this, htmlspecialchars('%>', ENT_QUOTES));
+ } elseif ($this->php_handling == Smarty::PHP_ALLOW) {
+ if ($this->asp_tags) {
+ $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode('%>', true));
+ } else {
+ $this->_retvalue = new _smarty_text($this, '%<?php ?>>');
+ }
+ } elseif ($this->php_handling == Smarty::PHP_REMOVE) {
+ if ($this->asp_tags) {
+ $this->_retvalue = new _smarty_text($this, '');
+ } else {
+ $this->_retvalue = new _smarty_text($this, '%<?php ?>>');
+ }
+ }
+ }
+#line 2272 "smarty_internal_templateparser.php"
+#line 220 "smarty_internal_templateparser.y"
+ function yy_r11(){
+ if ($this->strip) {
+ $this->_retvalue = new _smarty_text($this, preg_replace('![\t ]*[\r\n]+[\t ]*!', '', self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor)));
+ } else {
+ $this->_retvalue = new _smarty_text($this, self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor));
+ }
+ }
+#line 2281 "smarty_internal_templateparser.php"
+#line 229 "smarty_internal_templateparser.y"
+ function yy_r12(){
+ $this->compiler->tag_nocache = true;
+ $this->is_xml = true;
+ $save = $this->template->has_nocache_code;
+ $this->_retvalue = new _smarty_text($this, $this->compiler->processNocacheCode("<?php echo '<?xml';?>", $this->compiler, true));
+ $this->template->has_nocache_code = $save;
+ }
+#line 2290 "smarty_internal_templateparser.php"
+#line 238 "smarty_internal_templateparser.y"
+ function yy_r13(){
+ if ($this->strip) {
+ $this->_retvalue = new _smarty_text($this, preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $this->yystack[$this->yyidx + 0]->minor));
+ } else {
+ $this->_retvalue = new _smarty_text($this, $this->yystack[$this->yyidx + 0]->minor);
+ }
+ }
+#line 2299 "smarty_internal_templateparser.php"
+#line 247 "smarty_internal_templateparser.y"
+ function yy_r14(){
+ $this->strip = true;
+ $this->_retvalue = new _smarty_text($this, '');
+ }
+#line 2305 "smarty_internal_templateparser.php"
+#line 252 "smarty_internal_templateparser.y"
+ function yy_r15(){
+ $this->strip = false;
+ $this->_retvalue = new _smarty_text($this, '');
+ }
+#line 2311 "smarty_internal_templateparser.php"
+#line 258 "smarty_internal_templateparser.y"
+ function yy_r16(){
+ $this->_retvalue = '';
+ }
+#line 2316 "smarty_internal_templateparser.php"
+#line 262 "smarty_internal_templateparser.y"
+ function yy_r17(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;
+ }
+#line 2321 "smarty_internal_templateparser.php"
+#line 266 "smarty_internal_templateparser.y"
+ function yy_r18(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2326 "smarty_internal_templateparser.php"
+#line 274 "smarty_internal_templateparser.y"
+ function yy_r20(){
+ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2331 "smarty_internal_templateparser.php"
+#line 282 "smarty_internal_templateparser.y"
+ function yy_r22(){
+ $this->_retvalue = self::escape_start_tag($this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 2336 "smarty_internal_templateparser.php"
+#line 290 "smarty_internal_templateparser.y"
+ function yy_r24(){
+ $this->_retvalue = self::escape_end_tag($this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 2341 "smarty_internal_templateparser.php"
+#line 294 "smarty_internal_templateparser.y"
+ function yy_r25(){
+ $this->_retvalue = '<<?php ?>%';
+ }
+#line 2346 "smarty_internal_templateparser.php"
+#line 298 "smarty_internal_templateparser.y"
+ function yy_r26(){
+ $this->_retvalue = '%<?php ?>>';
+ }
+#line 2351 "smarty_internal_templateparser.php"
+#line 307 "smarty_internal_templateparser.y"
+ function yy_r27(){
+ $this->_retvalue = $this->compiler->compileTag('private_print_expression',array(),array('value'=>$this->yystack[$this->yyidx + -1]->minor));
+ }
+#line 2356 "smarty_internal_templateparser.php"
+#line 311 "smarty_internal_templateparser.y"
+ function yy_r28(){
+ $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + -1]->minor,array('value'=>$this->yystack[$this->yyidx + -3]->minor, 'modifierlist'=>$this->yystack[$this->yyidx + -2]->minor));
+ }
+#line 2361 "smarty_internal_templateparser.php"
+#line 315 "smarty_internal_templateparser.y"
+ function yy_r29(){
+ $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + -1]->minor,array('value'=>$this->yystack[$this->yyidx + -2]->minor));
+ }
+#line 2366 "smarty_internal_templateparser.php"
+#line 319 "smarty_internal_templateparser.y"
+ function yy_r30(){
+ $this->_retvalue = $this->compiler->compileTag('private_print_expression',$this->yystack[$this->yyidx + -1]->minor,array('value'=>$this->yystack[$this->yyidx + -3]->minor,'modifierlist'=>$this->yystack[$this->yyidx + -2]->minor));
+ }
+#line 2371 "smarty_internal_templateparser.php"
+#line 332 "smarty_internal_templateparser.y"
+ function yy_r32(){
+ $this->_retvalue = $this->compiler->compileTag('assign',array(array('value'=>$this->yystack[$this->yyidx + -1]->minor),array('var'=>"'".$this->yystack[$this->yyidx + -3]->minor."'")));
+ }
+#line 2376 "smarty_internal_templateparser.php"
+#line 340 "smarty_internal_templateparser.y"
+ function yy_r34(){
+ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array(array('value'=>$this->yystack[$this->yyidx + -2]->minor),array('var'=>"'".$this->yystack[$this->yyidx + -4]->minor."'")),$this->yystack[$this->yyidx + -1]->minor));
+ }
+#line 2381 "smarty_internal_templateparser.php"
+#line 344 "smarty_internal_templateparser.y"
+ function yy_r35(){
+ $this->_retvalue = $this->compiler->compileTag('assign',array_merge(array(array('value'=>$this->yystack[$this->yyidx + -2]->minor),array('var'=>$this->yystack[$this->yyidx + -4]->minor['var'])),$this->yystack[$this->yyidx + -1]->minor),array('smarty_internal_index'=>$this->yystack[$this->yyidx + -4]->minor['smarty_internal_index']));
+ }
+#line 2386 "smarty_internal_templateparser.php"
+#line 349 "smarty_internal_templateparser.y"
+ function yy_r36(){
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor,$this->yystack[$this->yyidx + -1]->minor);
+ }
+#line 2391 "smarty_internal_templateparser.php"
+#line 353 "smarty_internal_templateparser.y"
+ function yy_r37(){
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor,array());
+ }
+#line 2396 "smarty_internal_templateparser.php"
+#line 358 "smarty_internal_templateparser.y"
+ function yy_r38(){
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor,$this->yystack[$this->yyidx + -1]->minor,array('object_methode'=>$this->yystack[$this->yyidx + -2]->minor));
+ }
+#line 2401 "smarty_internal_templateparser.php"
+#line 363 "smarty_internal_templateparser.y"
+ function yy_r39(){
+ $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor,$this->yystack[$this->yyidx + -1]->minor).'<?php echo ';
+ $this->_retvalue .= $this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>';
+ }
+#line 2407 "smarty_internal_templateparser.php"
+#line 369 "smarty_internal_templateparser.y"
+ function yy_r40(){
+ $this->_retvalue = '<?php ob_start();?>'.$this->compiler->compileTag($this->yystack[$this->yyidx + -5]->minor,$this->yystack[$this->yyidx + -1]->minor,array('object_methode'=>$this->yystack[$this->yyidx + -3]->minor)).'<?php echo ';
+ $this->_retvalue .= $this->compiler->compileTag('private_modifier',array(),array('modifierlist'=>$this->yystack[$this->yyidx + -2]->minor,'value'=>'ob_get_clean()')).'?>';
+ }
+#line 2413 "smarty_internal_templateparser.php"
+#line 375 "smarty_internal_templateparser.y"
+ function yy_r41(){
+ $tag = trim(substr($this->yystack[$this->yyidx + -2]->minor,$this->lex->ldel_length));
+ $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,array(),array('if condition'=>$this->yystack[$this->yyidx + -1]->minor));
+ }
+#line 2419 "smarty_internal_templateparser.php"
+#line 380 "smarty_internal_templateparser.y"
+ function yy_r42(){
+ $tag = trim(substr($this->yystack[$this->yyidx + -3]->minor,$this->lex->ldel_length));
+ $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,$this->yystack[$this->yyidx + -1]->minor,array('if condition'=>$this->yystack[$this->yyidx + -2]->minor));
+ }
+#line 2425 "smarty_internal_templateparser.php"
+#line 385 "smarty_internal_templateparser.y"
+ function yy_r43(){
+ $tag = trim(substr($this->yystack[$this->yyidx + -2]->minor,$this->lex->ldel_length));
+ $this->_retvalue = $this->compiler->compileTag(($tag == 'else if')? 'elseif' : $tag,array(),array('if condition'=>$this->yystack[$this->yyidx + -1]->minor));
+ }
+#line 2431 "smarty_internal_templateparser.php"
+#line 396 "smarty_internal_templateparser.y"
+ function yy_r45(){
+ $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -10]->minor),array('ifexp'=>$this->yystack[$this->yyidx + -7]->minor),array('var'=>$this->yystack[$this->yyidx + -3]->minor),array('step'=>$this->yystack[$this->yyidx + -2]->minor))),1);
+ }
+#line 2436 "smarty_internal_templateparser.php"
+#line 400 "smarty_internal_templateparser.y"
+ function yy_r46(){
+ $this->_retvalue = '='.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2441 "smarty_internal_templateparser.php"
+#line 408 "smarty_internal_templateparser.y"
+ function yy_r48(){
+ $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -4]->minor),array('to'=>$this->yystack[$this->yyidx + -2]->minor))),0);
+ }
+#line 2446 "smarty_internal_templateparser.php"
+#line 412 "smarty_internal_templateparser.y"
+ function yy_r49(){
+ $this->_retvalue = $this->compiler->compileTag('for',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('start'=>$this->yystack[$this->yyidx + -6]->minor),array('to'=>$this->yystack[$this->yyidx + -4]->minor),array('step'=>$this->yystack[$this->yyidx + -2]->minor))),0);
+ }
+#line 2451 "smarty_internal_templateparser.php"
+#line 417 "smarty_internal_templateparser.y"
+ function yy_r50(){
+ $this->_retvalue = $this->compiler->compileTag('foreach',$this->yystack[$this->yyidx + -1]->minor);
+ }
+#line 2456 "smarty_internal_templateparser.php"
+#line 422 "smarty_internal_templateparser.y"
+ function yy_r51(){
+ $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -5]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor))));
+ }
+#line 2461 "smarty_internal_templateparser.php"
+#line 426 "smarty_internal_templateparser.y"
+ function yy_r52(){
+ $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -8]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor),array('key'=>$this->yystack[$this->yyidx + -5]->minor))));
+ }
+#line 2466 "smarty_internal_templateparser.php"
+#line 430 "smarty_internal_templateparser.y"
+ function yy_r53(){
+ $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -5]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor))));
+ }
+#line 2471 "smarty_internal_templateparser.php"
+#line 434 "smarty_internal_templateparser.y"
+ function yy_r54(){
+ $this->_retvalue = $this->compiler->compileTag('foreach',array_merge($this->yystack[$this->yyidx + -1]->minor,array(array('from'=>$this->yystack[$this->yyidx + -8]->minor),array('item'=>$this->yystack[$this->yyidx + -2]->minor),array('key'=>$this->yystack[$this->yyidx + -5]->minor))));
+ }
+#line 2476 "smarty_internal_templateparser.php"
+#line 439 "smarty_internal_templateparser.y"
+ function yy_r55(){
+ $this->_retvalue = $this->compiler->compileTag('setfilter',array(),array('modifier_list'=>array(array_merge(array($this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -1]->minor))));
+ }
+#line 2481 "smarty_internal_templateparser.php"
+#line 443 "smarty_internal_templateparser.y"
+ function yy_r56(){
+ $this->_retvalue = $this->compiler->compileTag('setfilter',array(),array('modifier_list'=>array_merge(array(array_merge(array($this->yystack[$this->yyidx + -3]->minor),$this->yystack[$this->yyidx + -2]->minor)),$this->yystack[$this->yyidx + -1]->minor)));
+ }
+#line 2486 "smarty_internal_templateparser.php"
+#line 448 "smarty_internal_templateparser.y"
+ function yy_r57(){
+ $this->_retvalue = SMARTY_INTERNAL_COMPILE_BLOCK::compileChildBlock($this->compiler);
+ }
+#line 2491 "smarty_internal_templateparser.php"
+#line 454 "smarty_internal_templateparser.y"
+ function yy_r58(){
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -1]->minor.'close',array());
+ }
+#line 2496 "smarty_internal_templateparser.php"
+#line 458 "smarty_internal_templateparser.y"
+ function yy_r59(){
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -2]->minor.'close',array(),array('modifier_list'=>$this->yystack[$this->yyidx + -1]->minor));
+ }
+#line 2501 "smarty_internal_templateparser.php"
+#line 463 "smarty_internal_templateparser.y"
+ function yy_r60(){
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -3]->minor.'close',array(),array('object_methode'=>$this->yystack[$this->yyidx + -1]->minor));
+ }
+#line 2506 "smarty_internal_templateparser.php"
+#line 467 "smarty_internal_templateparser.y"
+ function yy_r61(){
+ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor.'close',array(),array('object_methode'=>$this->yystack[$this->yyidx + -2]->minor, 'modifier_list'=>$this->yystack[$this->yyidx + -1]->minor));
+ }
+#line 2511 "smarty_internal_templateparser.php"
+#line 475 "smarty_internal_templateparser.y"
+ function yy_r62(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;
+ $this->_retvalue[] = $this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2517 "smarty_internal_templateparser.php"
+#line 481 "smarty_internal_templateparser.y"
+ function yy_r63(){
+ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 2522 "smarty_internal_templateparser.php"
+#line 486 "smarty_internal_templateparser.y"
+ function yy_r64(){
+ $this->_retvalue = array();
+ }
+#line 2527 "smarty_internal_templateparser.php"
+#line 491 "smarty_internal_templateparser.y"
+ function yy_r65(){
+ if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) {
+ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'true');
+ } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) {
+ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'false');
+ } elseif (preg_match('~^null$~i', $this->yystack[$this->yyidx + 0]->minor)) {
+ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>'null');
+ } else {
+ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>"'".$this->yystack[$this->yyidx + 0]->minor."'");
+ }
+ }
+#line 2540 "smarty_internal_templateparser.php"
+#line 503 "smarty_internal_templateparser.y"
+ function yy_r66(){
+ $this->_retvalue = array(trim($this->yystack[$this->yyidx + -1]->minor," =\n\r\t")=>$this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 2545 "smarty_internal_templateparser.php"
+#line 511 "smarty_internal_templateparser.y"
+ function yy_r68(){
+ $this->_retvalue = "'".$this->yystack[$this->yyidx + 0]->minor."'";
+ }
+#line 2550 "smarty_internal_templateparser.php"
+#line 523 "smarty_internal_templateparser.y"
+ function yy_r71(){
+ $this->_retvalue = array($this->yystack[$this->yyidx + -2]->minor=>$this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 2555 "smarty_internal_templateparser.php"
+#line 536 "smarty_internal_templateparser.y"
+ function yy_r73(){
+ $this->yystack[$this->yyidx + -2]->minor[]=$this->yystack[$this->yyidx + 0]->minor;
+ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor;
+ }
+#line 2561 "smarty_internal_templateparser.php"
+#line 541 "smarty_internal_templateparser.y"
+ function yy_r74(){
+ $this->_retvalue = array('var' => $this->yystack[$this->yyidx + -2]->minor, 'value'=>$this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 2566 "smarty_internal_templateparser.php"
+#line 569 "smarty_internal_templateparser.y"
+ function yy_r79(){
+ $this->_retvalue = '$_smarty_tpl->getStreamVariable(\''. $this->yystack[$this->yyidx + -2]->minor .'://'. $this->yystack[$this->yyidx + 0]->minor . '\')';
+ }
+#line 2571 "smarty_internal_templateparser.php"
+#line 574 "smarty_internal_templateparser.y"
+ function yy_r80(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor . trim($this->yystack[$this->yyidx + -1]->minor) . $this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2576 "smarty_internal_templateparser.php"
+#line 593 "smarty_internal_templateparser.y"
+ function yy_r84(){
+ $this->_retvalue = $this->compiler->compileTag('private_modifier',array(),array('value'=>$this->yystack[$this->yyidx + -1]->minor,'modifierlist'=>$this->yystack[$this->yyidx + 0]->minor));
+ }
+#line 2581 "smarty_internal_templateparser.php"
+#line 599 "smarty_internal_templateparser.y"
+ function yy_r85(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2586 "smarty_internal_templateparser.php"
+#line 603 "smarty_internal_templateparser.y"
+ function yy_r86(){
+ $this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor.')';
+ }
+#line 2591 "smarty_internal_templateparser.php"
+#line 607 "smarty_internal_templateparser.y"
+ function yy_r87(){
+ $this->_retvalue = 'in_array('.$this->yystack[$this->yyidx + -2]->minor.',(array)'.$this->yystack[$this->yyidx + 0]->minor.')';
+ }
+#line 2596 "smarty_internal_templateparser.php"
+#line 615 "smarty_internal_templateparser.y"
+ function yy_r89(){
+ $this->_retvalue = '!('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')';
+ }
+#line 2601 "smarty_internal_templateparser.php"
+#line 619 "smarty_internal_templateparser.y"
+ function yy_r90(){
+ $this->_retvalue = '('.$this->yystack[$this->yyidx + -2]->minor.' % '.$this->yystack[$this->yyidx + 0]->minor.')';
+ }
+#line 2606 "smarty_internal_templateparser.php"
+#line 623 "smarty_internal_templateparser.y"
+ function yy_r91(){
+ $this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -1]->minor.')';
+ }
+#line 2611 "smarty_internal_templateparser.php"
+#line 627 "smarty_internal_templateparser.y"
+ function yy_r92(){
+ $this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -1]->minor.')';
+ }
+#line 2616 "smarty_internal_templateparser.php"
+#line 631 "smarty_internal_templateparser.y"
+ function yy_r93(){
+ $this->_retvalue = '!(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')';
+ }
+#line 2621 "smarty_internal_templateparser.php"
+#line 635 "smarty_internal_templateparser.y"
+ function yy_r94(){
+ $this->_retvalue = '(1 & '.$this->yystack[$this->yyidx + -2]->minor.' / '.$this->yystack[$this->yyidx + 0]->minor.')';
+ }
+#line 2626 "smarty_internal_templateparser.php"
+#line 659 "smarty_internal_templateparser.y"
+ function yy_r100(){
+ $this->prefix_number++;
+ $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'='.$this->yystack[$this->yyidx + 0]->minor.';?>';
+ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.'$_tmp'.$this->prefix_number;
+ }
+#line 2633 "smarty_internal_templateparser.php"
+#line 668 "smarty_internal_templateparser.y"
+ function yy_r101(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -6]->minor.' ? '. $this->compileVariable("'".$this->yystack[$this->yyidx + -2]->minor."'") . ' : '.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2638 "smarty_internal_templateparser.php"
+#line 672 "smarty_internal_templateparser.y"
+ function yy_r102(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -5]->minor.' ? '.$this->yystack[$this->yyidx + -2]->minor.' : '.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2643 "smarty_internal_templateparser.php"
+#line 687 "smarty_internal_templateparser.y"
+ function yy_r105(){
+ $this->_retvalue = '!'.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2648 "smarty_internal_templateparser.php"
+#line 708 "smarty_internal_templateparser.y"
+ function yy_r110(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2653 "smarty_internal_templateparser.php"
+#line 712 "smarty_internal_templateparser.y"
+ function yy_r111(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.';
+ }
+#line 2658 "smarty_internal_templateparser.php"
+#line 716 "smarty_internal_templateparser.y"
+ function yy_r112(){
+ $this->_retvalue = '.'.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2663 "smarty_internal_templateparser.php"
+#line 721 "smarty_internal_templateparser.y"
+ function yy_r113(){
+ if (preg_match('~^true$~i', $this->yystack[$this->yyidx + 0]->minor)) {
+ $this->_retvalue = 'true';
+ } elseif (preg_match('~^false$~i', $this->yystack[$this->yyidx + 0]->minor)) {
+ $this->_retvalue = 'false';
+ } elseif (preg_match('~^null$~i', $this->yystack[$this->yyidx + 0]->minor)) {
+ $this->_retvalue = 'null';
+ } else {
+ $this->_retvalue = "'".$this->yystack[$this->yyidx + 0]->minor."'";
+ }
+ }
+#line 2676 "smarty_internal_templateparser.php"
+#line 739 "smarty_internal_templateparser.y"
+ function yy_r115(){
+ $this->_retvalue = "(". $this->yystack[$this->yyidx + -1]->minor .")";
+ }
+#line 2681 "smarty_internal_templateparser.php"
+#line 754 "smarty_internal_templateparser.y"
+ function yy_r118(){
+ if (!$this->security || isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor]) || $this->smarty->security_policy->isTrustedStaticClass($this->yystack[$this->yyidx + -2]->minor, $this->compiler)) {
+ if (isset($this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor])) {
+ $this->_retvalue = $this->smarty->registered_classes[$this->yystack[$this->yyidx + -2]->minor].'::'.$this->yystack[$this->yyidx + 0]->minor;
+ } else {
+ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'::'.$this->yystack[$this->yyidx + 0]->minor;
+ }
+ } else {
+ $this->compiler->trigger_template_error ("static class '".$this->yystack[$this->yyidx + -2]->minor."' is undefined or not allowed by security setting");
+ }
+ }
+#line 2694 "smarty_internal_templateparser.php"
+#line 766 "smarty_internal_templateparser.y"
+ function yy_r119(){
+ if ($this->yystack[$this->yyidx + -2]->minor['var'] == '\'smarty\'') {
+ $this->_retvalue = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + -2]->minor['smarty_internal_index']).'::'.$this->yystack[$this->yyidx + 0]->minor;
+ } else {
+ $this->_retvalue = $this->compileVariable($this->yystack[$this->yyidx + -2]->minor['var']).$this->yystack[$this->yyidx + -2]->minor['smarty_internal_index'].'::'.$this->yystack[$this->yyidx + 0]->minor;
+ }
+ }
+#line 2703 "smarty_internal_templateparser.php"
+#line 775 "smarty_internal_templateparser.y"
+ function yy_r120(){
+ $this->prefix_number++;
+ $this->compiler->prefix_code[] = '<?php ob_start();?>'.$this->yystack[$this->yyidx + 0]->minor.'<?php $_tmp'.$this->prefix_number.'=ob_get_clean();?>';
+ $this->_retvalue = '$_tmp'.$this->prefix_number;
+ }
+#line 2710 "smarty_internal_templateparser.php"
+#line 790 "smarty_internal_templateparser.y"
+ function yy_r122(){
+ if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\'smarty\'') {
+ $smarty_var = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index']);
+ $this->_retvalue = $smarty_var;
+ } else {
+ // used for array reset,next,prev,end,current
+ $this->last_variable = $this->yystack[$this->yyidx + 0]->minor['var'];
+ $this->last_index = $this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];
+ $this->_retvalue = $this->compileVariable($this->yystack[$this->yyidx + 0]->minor['var']).$this->yystack[$this->yyidx + 0]->minor['smarty_internal_index'];
+ }
+ }
+#line 2723 "smarty_internal_templateparser.php"
+#line 803 "smarty_internal_templateparser.y"
+ function yy_r123(){
+ $this->_retvalue = '$_smarty_tpl->tpl_vars['. $this->yystack[$this->yyidx + -2]->minor .']->'.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2728 "smarty_internal_templateparser.php"
+#line 813 "smarty_internal_templateparser.y"
+ function yy_r125(){
+ $this->_retvalue = '$_smarty_tpl->getConfigVariable(\''. $this->yystack[$this->yyidx + -1]->minor .'\')';
+ }
+#line 2733 "smarty_internal_templateparser.php"
+#line 817 "smarty_internal_templateparser.y"
+ function yy_r126(){
+ $this->_retvalue = '$_smarty_tpl->getConfigVariable('. $this->yystack[$this->yyidx + -1]->minor .')';
+ }
+#line 2738 "smarty_internal_templateparser.php"
+#line 821 "smarty_internal_templateparser.y"
+ function yy_r127(){
+ $this->_retvalue = array('var'=>$this->yystack[$this->yyidx + -1]->minor, 'smarty_internal_index'=>$this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 2743 "smarty_internal_templateparser.php"
+#line 834 "smarty_internal_templateparser.y"
+ function yy_r129(){
+ return;
+ }
+#line 2748 "smarty_internal_templateparser.php"
+#line 840 "smarty_internal_templateparser.y"
+ function yy_r130(){
+ $this->_retvalue = '['.$this->compileVariable($this->yystack[$this->yyidx + 0]->minor).']';
+ }
+#line 2753 "smarty_internal_templateparser.php"
+#line 844 "smarty_internal_templateparser.y"
+ function yy_r131(){
+ $this->_retvalue = '['.$this->compileVariable($this->yystack[$this->yyidx + -2]->minor).'->'.$this->yystack[$this->yyidx + 0]->minor.']';
+ }
+#line 2758 "smarty_internal_templateparser.php"
+#line 848 "smarty_internal_templateparser.y"
+ function yy_r132(){
+ $this->_retvalue = "['". $this->yystack[$this->yyidx + 0]->minor ."']";
+ }
+#line 2763 "smarty_internal_templateparser.php"
+#line 852 "smarty_internal_templateparser.y"
+ function yy_r133(){
+ $this->_retvalue = "[". $this->yystack[$this->yyidx + 0]->minor ."]";
+ }
+#line 2768 "smarty_internal_templateparser.php"
+#line 856 "smarty_internal_templateparser.y"
+ function yy_r134(){
+ $this->_retvalue = "[". $this->yystack[$this->yyidx + -1]->minor ."]";
+ }
+#line 2773 "smarty_internal_templateparser.php"
+#line 861 "smarty_internal_templateparser.y"
+ function yy_r135(){
+ $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable',array(),'[\'section\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\'][\'index\']').']';
+ }
+#line 2778 "smarty_internal_templateparser.php"
+#line 865 "smarty_internal_templateparser.y"
+ function yy_r136(){
+ $this->_retvalue = '['.$this->compiler->compileTag('private_special_variable',array(),'[\'section\'][\''.$this->yystack[$this->yyidx + -3]->minor.'\'][\''.$this->yystack[$this->yyidx + -1]->minor.'\']').']';
+ }
+#line 2783 "smarty_internal_templateparser.php"
+#line 875 "smarty_internal_templateparser.y"
+ function yy_r138(){
+ $this->_retvalue = '[]';
+ }
+#line 2788 "smarty_internal_templateparser.php"
+#line 888 "smarty_internal_templateparser.y"
+ function yy_r140(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.'.'.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2793 "smarty_internal_templateparser.php"
+#line 893 "smarty_internal_templateparser.y"
+ function yy_r141(){
+ $this->_retvalue = '\''.$this->yystack[$this->yyidx + 0]->minor.'\'';
+ }
+#line 2798 "smarty_internal_templateparser.php"
+#line 898 "smarty_internal_templateparser.y"
+ function yy_r142(){
+ $this->_retvalue = '('.$this->yystack[$this->yyidx + -1]->minor.')';
+ }
+#line 2803 "smarty_internal_templateparser.php"
+#line 905 "smarty_internal_templateparser.y"
+ function yy_r143(){
+ if ($this->yystack[$this->yyidx + -1]->minor['var'] == '\'smarty\'') {
+ $this->_retvalue = $this->compiler->compileTag('private_special_variable',array(),$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index']).$this->yystack[$this->yyidx + 0]->minor;
+ } else {
+ $this->_retvalue = $this->compileVariable($this->yystack[$this->yyidx + -1]->minor['var']).$this->yystack[$this->yyidx + -1]->minor['smarty_internal_index'].$this->yystack[$this->yyidx + 0]->minor;
+ }
+ }
+#line 2812 "smarty_internal_templateparser.php"
+#line 914 "smarty_internal_templateparser.y"
+ function yy_r144(){
+ $this->_retvalue = $this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2817 "smarty_internal_templateparser.php"
+#line 919 "smarty_internal_templateparser.y"
+ function yy_r145(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2822 "smarty_internal_templateparser.php"
+#line 924 "smarty_internal_templateparser.y"
+ function yy_r146(){
+ if ($this->security && substr($this->yystack[$this->yyidx + -1]->minor,0,1) == '_') {
+ $this->compiler->trigger_template_error (self::Err1);
+ }
+ $this->_retvalue = '->'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2830 "smarty_internal_templateparser.php"
+#line 931 "smarty_internal_templateparser.y"
+ function yy_r147(){
+ if ($this->security) {
+ $this->compiler->trigger_template_error (self::Err2);
+ }
+ $this->_retvalue = '->{'.$this->compileVariable($this->yystack[$this->yyidx + -1]->minor).$this->yystack[$this->yyidx + 0]->minor.'}';
+ }
+#line 2838 "smarty_internal_templateparser.php"
+#line 938 "smarty_internal_templateparser.y"
+ function yy_r148(){
+ if ($this->security) {
+ $this->compiler->trigger_template_error (self::Err2);
+ }
+ $this->_retvalue = '->{'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}';
+ }
+#line 2846 "smarty_internal_templateparser.php"
+#line 945 "smarty_internal_templateparser.y"
+ function yy_r149(){
+ if ($this->security) {
+ $this->compiler->trigger_template_error (self::Err2);
+ }
+ $this->_retvalue = '->{\''.$this->yystack[$this->yyidx + -4]->minor.'\'.'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + 0]->minor.'}';
+ }
+#line 2854 "smarty_internal_templateparser.php"
+#line 953 "smarty_internal_templateparser.y"
+ function yy_r150(){
+ $this->_retvalue = '->'.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2859 "smarty_internal_templateparser.php"
+#line 961 "smarty_internal_templateparser.y"
+ function yy_r151(){
+ if (!$this->security || $this->smarty->security_policy->isTrustedPhpFunction($this->yystack[$this->yyidx + -3]->minor, $this->compiler)) {
+ if (strcasecmp($this->yystack[$this->yyidx + -3]->minor,'isset') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'empty') === 0 || strcasecmp($this->yystack[$this->yyidx + -3]->minor,'array') === 0 || is_callable($this->yystack[$this->yyidx + -3]->minor)) {
+ $func_name = strtolower($this->yystack[$this->yyidx + -3]->minor);
+ if ($func_name == 'isset') {
+ if (count($this->yystack[$this->yyidx + -1]->minor) == 0) {
+ $this->compiler->trigger_template_error ('Illegal number of paramer in "isset()"');
+ }
+ $par = implode(',',$this->yystack[$this->yyidx + -1]->minor);
+ if (strncasecmp($par,'$_smarty_tpl->getConfigVariable',strlen('$_smarty_tpl->getConfigVariable')) === 0) {
+ $this->prefix_number++;
+ $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'='.str_replace(')',', false)',$par).';?>';
+ $isset_par = '$_tmp'.$this->prefix_number;
+ } else {
+ $isset_par=str_replace("')->value","',null,true,false)->value",$par);
+ }
+ $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". $isset_par .")";
+ } elseif (in_array($func_name,array('empty','reset','current','end','prev','next'))){
+ if (count($this->yystack[$this->yyidx + -1]->minor) != 1) {
+ $this->compiler->trigger_template_error ('Illegal number of paramer in "empty()"');
+ }
+ if ($func_name == 'empty') {
+ $this->_retvalue = $func_name.'('.str_replace("')->value","',null,true,false)->value",$this->yystack[$this->yyidx + -1]->minor[0]).')';
+ } else {
+ $this->_retvalue = $func_name.'('.$this->yystack[$this->yyidx + -1]->minor[0].')';
+ }
+ } else {
+ $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". implode(',',$this->yystack[$this->yyidx + -1]->minor) .")";
+ }
+ } else {
+ $this->compiler->trigger_template_error ("unknown function \"" . $this->yystack[$this->yyidx + -3]->minor . "\"");
+ }
+ }
+ }
+#line 2895 "smarty_internal_templateparser.php"
+#line 999 "smarty_internal_templateparser.y"
+ function yy_r152(){
+ if ($this->security && substr($this->yystack[$this->yyidx + -3]->minor,0,1) == '_') {
+ $this->compiler->trigger_template_error (self::Err1);
+ }
+ $this->_retvalue = $this->yystack[$this->yyidx + -3]->minor . "(". implode(',',$this->yystack[$this->yyidx + -1]->minor) .")";
+ }
+#line 2903 "smarty_internal_templateparser.php"
+#line 1006 "smarty_internal_templateparser.y"
+ function yy_r153(){
+ if ($this->security) {
+ $this->compiler->trigger_template_error (self::Err2);
+ }
+ $this->prefix_number++;
+ $this->compiler->prefix_code[] = '<?php $_tmp'.$this->prefix_number.'='.$this->compileVariable("'".$this->yystack[$this->yyidx + -3]->minor."'").';?>';
+ $this->_retvalue = '$_tmp'.$this->prefix_number.'('. implode(',',$this->yystack[$this->yyidx + -1]->minor) .')';
+ }
+#line 2913 "smarty_internal_templateparser.php"
+#line 1017 "smarty_internal_templateparser.y"
+ function yy_r154(){
+ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array($this->yystack[$this->yyidx + 0]->minor));
+ }
+#line 2918 "smarty_internal_templateparser.php"
+#line 1034 "smarty_internal_templateparser.y"
+ function yy_r157(){
+ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -2]->minor,array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor)));
+ }
+#line 2923 "smarty_internal_templateparser.php"
+#line 1038 "smarty_internal_templateparser.y"
+ function yy_r158(){
+ $this->_retvalue = array(array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor));
+ }
+#line 2928 "smarty_internal_templateparser.php"
+#line 1046 "smarty_internal_templateparser.y"
+ function yy_r160(){
+ $this->_retvalue = array($this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 2933 "smarty_internal_templateparser.php"
+#line 1054 "smarty_internal_templateparser.y"
+ function yy_r161(){
+ $this->_retvalue = array_merge($this->yystack[$this->yyidx + -1]->minor,$this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 2938 "smarty_internal_templateparser.php"
+#line 1088 "smarty_internal_templateparser.y"
+ function yy_r168(){
+ $this->_retvalue = '$'.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2943 "smarty_internal_templateparser.php"
+#line 1093 "smarty_internal_templateparser.y"
+ function yy_r169(){
+ $this->_retvalue = '$'.$this->yystack[$this->yyidx + -2]->minor.$this->yystack[$this->yyidx + -1]->minor.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 2948 "smarty_internal_templateparser.php"
+#line 1099 "smarty_internal_templateparser.y"
+ function yy_r170(){
+ $this->_retvalue = '==';
+ }
+#line 2953 "smarty_internal_templateparser.php"
+#line 1103 "smarty_internal_templateparser.y"
+ function yy_r171(){
+ $this->_retvalue = '!=';
+ }
+#line 2958 "smarty_internal_templateparser.php"
+#line 1107 "smarty_internal_templateparser.y"
+ function yy_r172(){
+ $this->_retvalue = '>';
+ }
+#line 2963 "smarty_internal_templateparser.php"
+#line 1111 "smarty_internal_templateparser.y"
+ function yy_r173(){
+ $this->_retvalue = '<';
+ }
+#line 2968 "smarty_internal_templateparser.php"
+#line 1115 "smarty_internal_templateparser.y"
+ function yy_r174(){
+ $this->_retvalue = '>=';
+ }
+#line 2973 "smarty_internal_templateparser.php"
+#line 1119 "smarty_internal_templateparser.y"
+ function yy_r175(){
+ $this->_retvalue = '<=';
+ }
+#line 2978 "smarty_internal_templateparser.php"
+#line 1123 "smarty_internal_templateparser.y"
+ function yy_r176(){
+ $this->_retvalue = '===';
+ }
+#line 2983 "smarty_internal_templateparser.php"
+#line 1127 "smarty_internal_templateparser.y"
+ function yy_r177(){
+ $this->_retvalue = '!==';
+ }
+#line 2988 "smarty_internal_templateparser.php"
+#line 1131 "smarty_internal_templateparser.y"
+ function yy_r178(){
+ $this->_retvalue = '%';
+ }
+#line 2993 "smarty_internal_templateparser.php"
+#line 1135 "smarty_internal_templateparser.y"
+ function yy_r179(){
+ $this->_retvalue = '&&';
+ }
+#line 2998 "smarty_internal_templateparser.php"
+#line 1139 "smarty_internal_templateparser.y"
+ function yy_r180(){
+ $this->_retvalue = '||';
+ }
+#line 3003 "smarty_internal_templateparser.php"
+#line 1143 "smarty_internal_templateparser.y"
+ function yy_r181(){
+ $this->_retvalue = ' XOR ';
+ }
+#line 3008 "smarty_internal_templateparser.php"
+#line 1150 "smarty_internal_templateparser.y"
+ function yy_r182(){
+ $this->_retvalue = 'array('.$this->yystack[$this->yyidx + -1]->minor.')';
+ }
+#line 3013 "smarty_internal_templateparser.php"
+#line 1158 "smarty_internal_templateparser.y"
+ function yy_r184(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.','.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 3018 "smarty_internal_templateparser.php"
+#line 1166 "smarty_internal_templateparser.y"
+ function yy_r186(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -2]->minor.'=>'.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 3023 "smarty_internal_templateparser.php"
+#line 1170 "smarty_internal_templateparser.y"
+ function yy_r187(){
+ $this->_retvalue = '\''.$this->yystack[$this->yyidx + -2]->minor.'\'=>'.$this->yystack[$this->yyidx + 0]->minor;
+ }
+#line 3028 "smarty_internal_templateparser.php"
+#line 1182 "smarty_internal_templateparser.y"
+ function yy_r189(){
+ $this->_retvalue = "''";
+ }
+#line 3033 "smarty_internal_templateparser.php"
+#line 1186 "smarty_internal_templateparser.y"
+ function yy_r190(){
+ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor->to_smarty_php();
+ }
+#line 3038 "smarty_internal_templateparser.php"
+#line 1191 "smarty_internal_templateparser.y"
+ function yy_r191(){
+ $this->yystack[$this->yyidx + -1]->minor->append_subtree($this->yystack[$this->yyidx + 0]->minor);
+ $this->_retvalue = $this->yystack[$this->yyidx + -1]->minor;
+ }
+#line 3044 "smarty_internal_templateparser.php"
+#line 1196 "smarty_internal_templateparser.y"
+ function yy_r192(){
+ $this->_retvalue = new _smarty_doublequoted($this, $this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 3049 "smarty_internal_templateparser.php"
+#line 1200 "smarty_internal_templateparser.y"
+ function yy_r193(){
+ $this->_retvalue = new _smarty_code($this, '(string)'.$this->yystack[$this->yyidx + -1]->minor);
+ }
+#line 3054 "smarty_internal_templateparser.php"
+#line 1208 "smarty_internal_templateparser.y"
+ function yy_r195(){
+ $this->_retvalue = new _smarty_code($this, '(string)$_smarty_tpl->tpl_vars[\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\']->value');
+ }
+#line 3059 "smarty_internal_templateparser.php"
+#line 1216 "smarty_internal_templateparser.y"
+ function yy_r197(){
+ $this->_retvalue = new _smarty_code($this, '(string)('.$this->yystack[$this->yyidx + -1]->minor.')');
+ }
+#line 3064 "smarty_internal_templateparser.php"
+#line 1220 "smarty_internal_templateparser.y"
+ function yy_r198(){
+ $this->_retvalue = new _smarty_tag($this, $this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 3069 "smarty_internal_templateparser.php"
+#line 1224 "smarty_internal_templateparser.y"
+ function yy_r199(){
+ $this->_retvalue = new _smarty_dq_content($this, $this->yystack[$this->yyidx + 0]->minor);
+ }
+#line 3074 "smarty_internal_templateparser.php"
+
+ private $_retvalue;
+
+ function yy_reduce($yyruleno)
+ {
+ $yymsp = $this->yystack[$this->yyidx];
+ if (self::$yyTraceFILE && $yyruleno >= 0
+ && $yyruleno < count(self::$yyRuleName)) {
+ fprintf(self::$yyTraceFILE, "%sReduce (%d) [%s].\n",
+ self::$yyTracePrompt, $yyruleno,
+ self::$yyRuleName[$yyruleno]);
+ }
+
+ $this->_retvalue = $yy_lefthand_side = null;
+ if (array_key_exists($yyruleno, self::$yyReduceMap)) {
+ // call the action
+ $this->_retvalue = null;
+ $this->{'yy_r' . self::$yyReduceMap[$yyruleno]}();
+ $yy_lefthand_side = $this->_retvalue;
+ }
+ $yygoto = self::$yyRuleInfo[$yyruleno]['lhs'];
+ $yysize = self::$yyRuleInfo[$yyruleno]['rhs'];
+ $this->yyidx -= $yysize;
+ for($i = $yysize; $i; $i--) {
+ // pop all of the right-hand side parameters
+ array_pop($this->yystack);
+ }
+ $yyact = $this->yy_find_reduce_action($this->yystack[$this->yyidx]->stateno, $yygoto);
+ if ($yyact < self::YYNSTATE) {
+ if (!self::$yyTraceFILE && $yysize) {
+ $this->yyidx++;
+ $x = new TP_yyStackEntry;
+ $x->stateno = $yyact;
+ $x->major = $yygoto;
+ $x->minor = $yy_lefthand_side;
+ $this->yystack[$this->yyidx] = $x;
+ } else {
+ $this->yy_shift($yyact, $yygoto, $yy_lefthand_side);
+ }
+ } elseif ($yyact == self::YYNSTATE + self::YYNRULE + 1) {
+ $this->yy_accept();
+ }
+ }
+
+ function yy_parse_failed()
+ {
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sFail!\n", self::$yyTracePrompt);
+ }
+ while ($this->yyidx >= 0) {
+ $this->yy_pop_parser_stack();
+ }
+ }
+
+ function yy_syntax_error($yymajor, $TOKEN)
+ {
+#line 77 "smarty_internal_templateparser.y"
+
+ $this->internalError = true;
+ $this->yymajor = $yymajor;
+ $this->compiler->trigger_template_error();
+#line 3137 "smarty_internal_templateparser.php"
+ }
+
+ function yy_accept()
+ {
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sAccept!\n", self::$yyTracePrompt);
+ }
+ while ($this->yyidx >= 0) {
+ $stack = $this->yy_pop_parser_stack();
+ }
+#line 69 "smarty_internal_templateparser.y"
+
+ $this->successful = !$this->internalError;
+ $this->internalError = false;
+ $this->retvalue = $this->_retvalue;
+ //echo $this->retvalue."\n\n";
+#line 3155 "smarty_internal_templateparser.php"
+ }
+
+ function doParse($yymajor, $yytokenvalue)
+ {
+ $yyerrorhit = 0; /* True if yymajor has invoked an error */
+
+ if ($this->yyidx === null || $this->yyidx < 0) {
+ $this->yyidx = 0;
+ $this->yyerrcnt = -1;
+ $x = new TP_yyStackEntry;
+ $x->stateno = 0;
+ $x->major = 0;
+ $this->yystack = array();
+ array_push($this->yystack, $x);
+ }
+ $yyendofinput = ($yymajor==0);
+
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sInput %s\n",
+ self::$yyTracePrompt, $this->yyTokenName[$yymajor]);
+ }
+
+ do {
+ $yyact = $this->yy_find_shift_action($yymajor);
+ if ($yymajor < self::YYERRORSYMBOL &&
+ !$this->yy_is_expected_token($yymajor)) {
+ // force a syntax error
+ $yyact = self::YY_ERROR_ACTION;
+ }
+ if ($yyact < self::YYNSTATE) {
+ $this->yy_shift($yyact, $yymajor, $yytokenvalue);
+ $this->yyerrcnt--;
+ if ($yyendofinput && $this->yyidx >= 0) {
+ $yymajor = 0;
+ } else {
+ $yymajor = self::YYNOCODE;
+ }
+ } elseif ($yyact < self::YYNSTATE + self::YYNRULE) {
+ $this->yy_reduce($yyact - self::YYNSTATE);
+ } elseif ($yyact == self::YY_ERROR_ACTION) {
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sSyntax Error!\n",
+ self::$yyTracePrompt);
+ }
+ if (self::YYERRORSYMBOL) {
+ if ($this->yyerrcnt < 0) {
+ $this->yy_syntax_error($yymajor, $yytokenvalue);
+ }
+ $yymx = $this->yystack[$this->yyidx]->major;
+ if ($yymx == self::YYERRORSYMBOL || $yyerrorhit ){
+ if (self::$yyTraceFILE) {
+ fprintf(self::$yyTraceFILE, "%sDiscard input token %s\n",
+ self::$yyTracePrompt, $this->yyTokenName[$yymajor]);
+ }
+ $this->yy_destructor($yymajor, $yytokenvalue);
+ $yymajor = self::YYNOCODE;
+ } else {
+ while ($this->yyidx >= 0 &&
+ $yymx != self::YYERRORSYMBOL &&
+ ($yyact = $this->yy_find_shift_action(self::YYERRORSYMBOL)) >= self::YYNSTATE
+ ){
+ $this->yy_pop_parser_stack();
+ }
+ if ($this->yyidx < 0 || $yymajor==0) {
+ $this->yy_destructor($yymajor, $yytokenvalue);
+ $this->yy_parse_failed();
+ $yymajor = self::YYNOCODE;
+ } elseif ($yymx != self::YYERRORSYMBOL) {
+ $u2 = 0;
+ $this->yy_shift($yyact, self::YYERRORSYMBOL, $u2);
+ }
+ }
+ $this->yyerrcnt = 3;
+ $yyerrorhit = 1;
+ } else {
+ if ($this->yyerrcnt <= 0) {
+ $this->yy_syntax_error($yymajor, $yytokenvalue);
+ }
+ $this->yyerrcnt = 3;
+ $this->yy_destructor($yymajor, $yytokenvalue);
+ if ($yyendofinput) {
+ $this->yy_parse_failed();
+ }
+ $yymajor = self::YYNOCODE;
+ }
+ } else {
+ $this->yy_accept();
+ $yymajor = self::YYNOCODE;
+ }
+ } while ($yymajor != self::YYNOCODE && $this->yyidx >= 0);
+ }
+}
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_utility.php b/library/Smarty/libs/sysplugins/smarty_internal_utility.php
new file mode 100644
index 000000000..3e362855c
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_utility.php
@@ -0,0 +1,830 @@
+<?php
+/**
+ * Project: Smarty: the PHP compiling template engine
+ * File: smarty_internal_utility.php
+ * SVN: $Id: $
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * For questions, help, comments, discussion, etc., please join the
+ * Smarty mailing list. Send a blank e-mail to
+ * smarty-discussion-subscribe@googlegroups.com
+ *
+ * @link http://www.smarty.net/
+ * @copyright 2008 New Digital Group, Inc.
+ * @author Monte Ohrt <monte at ohrt dot com>
+ * @author Uwe Tews
+ * @package Smarty
+ * @subpackage PluginsInternal
+ * @version 3-SVN$Rev: 3286 $
+ */
+
+
+/**
+ * Utility class
+ *
+ * @package Smarty
+ * @subpackage Security
+ */
+class Smarty_Internal_Utility {
+
+ /**
+ * private constructor to prevent calls creation of new instances
+ */
+ private final function __construct()
+ {
+ // intentionally left blank
+ }
+
+ /**
+ * Compile all template files
+ *
+ * @param string $extension template file name extension
+ * @param bool $force_compile force all to recompile
+ * @param int $time_limit set maximum execution time
+ * @param int $max_errors set maximum allowed errors
+ * @param Smarty $smarty Smarty instance
+ * @return integer number of template files compiled
+ */
+ public static function compileAllTemplates($extention, $force_compile, $time_limit, $max_errors, Smarty $smarty)
+ {
+ // switch off time limit
+ if (function_exists('set_time_limit')) {
+ @set_time_limit($time_limit);
+ }
+ $smarty->force_compile = $force_compile;
+ $_count = 0;
+ $_error_count = 0;
+ // loop over array of template directories
+ foreach($smarty->getTemplateDir() as $_dir) {
+ $_compileDirs = new RecursiveDirectoryIterator($_dir);
+ $_compile = new RecursiveIteratorIterator($_compileDirs);
+ foreach ($_compile as $_fileinfo) {
+ if (substr($_fileinfo->getBasename(),0,1) == '.' || strpos($_fileinfo, '.svn') !== false) continue;
+ $_file = $_fileinfo->getFilename();
+ if (!substr_compare($_file, $extention, - strlen($extention)) == 0) continue;
+ if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {
+ $_template_file = $_file;
+ } else {
+ $_template_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file;
+ }
+ echo '<br>', $_dir, '---', $_template_file;
+ flush();
+ $_start_time = microtime(true);
+ try {
+ $_tpl = $smarty->createTemplate($_template_file,null,null,null,false);
+ if ($_tpl->mustCompile()) {
+ $_tpl->compileTemplateSource();
+ $_count++;
+ echo ' compiled in ', microtime(true) - $_start_time, ' seconds';
+ flush();
+ } else {
+ echo ' is up to date';
+ flush();
+ }
+ }
+ catch (Exception $e) {
+ echo 'Error: ', $e->getMessage(), "<br><br>";
+ $_error_count++;
+ }
+ // free memory
+ $smarty->template_objects = array();
+ $_tpl->smarty->template_objects = array();
+ $_tpl = null;
+ if ($max_errors !== null && $_error_count == $max_errors) {
+ echo '<br><br>too many errors';
+ exit();
+ }
+ }
+ }
+ return $_count;
+ }
+
+ /**
+ * Compile all config files
+ *
+ * @param string $extension config file name extension
+ * @param bool $force_compile force all to recompile
+ * @param int $time_limit set maximum execution time
+ * @param int $max_errors set maximum allowed errors
+ * @param Smarty $smarty Smarty instance
+ * @return integer number of config files compiled
+ */
+ public static function compileAllConfig($extention, $force_compile, $time_limit, $max_errors, Smarty $smarty)
+ {
+ // switch off time limit
+ if (function_exists('set_time_limit')) {
+ @set_time_limit($time_limit);
+ }
+ $smarty->force_compile = $force_compile;
+ $_count = 0;
+ $_error_count = 0;
+ // loop over array of template directories
+ foreach($smarty->getConfigDir() as $_dir) {
+ $_compileDirs = new RecursiveDirectoryIterator($_dir);
+ $_compile = new RecursiveIteratorIterator($_compileDirs);
+ foreach ($_compile as $_fileinfo) {
+ if (substr($_fileinfo->getBasename(),0,1) == '.' || strpos($_fileinfo, '.svn') !== false) continue;
+ $_file = $_fileinfo->getFilename();
+ if (!substr_compare($_file, $extention, - strlen($extention)) == 0) continue;
+ if ($_fileinfo->getPath() == substr($_dir, 0, -1)) {
+ $_config_file = $_file;
+ } else {
+ $_config_file = substr($_fileinfo->getPath(), strlen($_dir)) . DS . $_file;
+ }
+ echo '<br>', $_dir, '---', $_config_file;
+ flush();
+ $_start_time = microtime(true);
+ try {
+ $_config = new Smarty_Internal_Config($_config_file, $smarty);
+ if ($_config->mustCompile()) {
+ $_config->compileConfigSource();
+ $_count++;
+ echo ' compiled in ', microtime(true) - $_start_time, ' seconds';
+ flush();
+ } else {
+ echo ' is up to date';
+ flush();
+ }
+ }
+ catch (Exception $e) {
+ echo 'Error: ', $e->getMessage(), "<br><br>";
+ $_error_count++;
+ }
+ if ($max_errors !== null && $_error_count == $max_errors) {
+ echo '<br><br>too many errors';
+ exit();
+ }
+ }
+ }
+ return $_count;
+ }
+
+ /**
+ * Delete compiled template file
+ *
+ * @param string $resource_name template name
+ * @param string $compile_id compile id
+ * @param integer $exp_time expiration time
+ * @param Smarty $smarty Smarty instance
+ * @return integer number of template files deleted
+ */
+ public static function clearCompiledTemplate($resource_name, $compile_id, $exp_time, Smarty $smarty)
+ {
+ $_compile_dir = $smarty->getCompileDir();
+ $_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null;
+ $_dir_sep = $smarty->use_sub_dirs ? DS : '^';
+ if (isset($resource_name)) {
+ $_save_stat = $smarty->caching;
+ $smarty->caching = false;
+ $tpl = new $smarty->template_class($resource_name, $smarty);
+ $smarty->caching = $_save_stat;
+
+ // remove from template cache
+ $tpl->source; // have the template registered before unset()
+ if ($smarty->allow_ambiguous_resources) {
+ $_templateId = $tpl->source->unique_resource . $tpl->cache_id . $tpl->compile_id;
+ } else {
+ $_templateId = $smarty->joined_template_dir . '#' . $resource_name . $tpl->cache_id . $tpl->compile_id;
+ }
+ if (isset($_templateId[150])) {
+ $_templateId = sha1($_templateId);
+ }
+ unset($smarty->template_objects[$_templateId]);
+
+ if ($tpl->source->exists) {
+ $_resource_part_1 = basename(str_replace('^', '/', $tpl->compiled->filepath));
+ $_resource_part_1_length = strlen($_resource_part_1);
+ } else {
+ return 0;
+ }
+
+ $_resource_part_2 = str_replace('.php','.cache.php',$_resource_part_1);
+ $_resource_part_2_length = strlen($_resource_part_2);
+ }
+ $_dir = $_compile_dir;
+ if ($smarty->use_sub_dirs && isset($_compile_id)) {
+ $_dir .= $_compile_id . $_dir_sep;
+ }
+ if (isset($_compile_id)) {
+ $_compile_id_part = $_compile_dir . $_compile_id . $_dir_sep;
+ $_compile_id_part_length = strlen($_compile_id_part);
+ }
+ $_count = 0;
+ try {
+ $_compileDirs = new RecursiveDirectoryIterator($_dir);
+ // NOTE: UnexpectedValueException thrown for PHP >= 5.3
+ } catch (Exception $e) {
+ return 0;
+ }
+ $_compile = new RecursiveIteratorIterator($_compileDirs, RecursiveIteratorIterator::CHILD_FIRST);
+ foreach ($_compile as $_file) {
+ if (substr($_file->getBasename(), 0, 1) == '.' || strpos($_file, '.svn') !== false)
+ continue;
+
+ $_filepath = (string) $_file;
+
+ if ($_file->isDir()) {
+ if (!$_compile->isDot()) {
+ // delete folder if empty
+ @rmdir($_file->getPathname());
+ }
+ } else {
+ $unlink = false;
+ if ((!isset($_compile_id) || (isset($_filepath[$_compile_id_part_length]) && !strncmp($_filepath, $_compile_id_part, $_compile_id_part_length)))
+ && (!isset($resource_name)
+ || (isset($_filepath[$_resource_part_1_length])
+ && substr_compare($_filepath, $_resource_part_1, -$_resource_part_1_length, $_resource_part_1_length) == 0)
+ || (isset($_filepath[$_resource_part_2_length])
+ && substr_compare($_filepath, $_resource_part_2, -$_resource_part_2_length, $_resource_part_2_length) == 0))) {
+ if (isset($exp_time)) {
+ if (time() - @filemtime($_filepath) >= $exp_time) {
+ $unlink = true;
+ }
+ } else {
+ $unlink = true;
+ }
+ }
+
+ if ($unlink && @unlink($_filepath)) {
+ $_count++;
+ }
+ }
+ }
+ // clear compiled cache
+ Smarty_Resource::$sources = array();
+ Smarty_Resource::$compileds = array();
+ return $_count;
+ }
+
+ /**
+ * Return array of tag/attributes of all tags used by an template
+ *
+ * @param Smarty_Internal_Template $templae template object
+ * @return array of tag/attributes
+ */
+ public static function getTags(Smarty_Internal_Template $template)
+ {
+ $template->smarty->get_used_tags = true;
+ $template->compileTemplateSource();
+ return $template->used_tags;
+ }
+
+
+ /**
+ * diagnose Smarty setup
+ *
+ * If $errors is secified, the diagnostic report will be appended to the array, rather than being output.
+ *
+ * @param Smarty $smarty Smarty instance to test
+ * @param array $errors array to push results into rather than outputting them
+ * @return bool status, true if everything is fine, false else
+ */
+ public static function testInstall(Smarty $smarty, &$errors=null)
+ {
+ $status = true;
+
+ if ($errors === null) {
+ echo "<PRE>\n";
+ echo "Smarty Installation test...\n";
+ echo "Testing template directory...\n";
+ }
+
+ $_stream_resolve_include_path = function_exists('stream_resolve_include_path');
+
+ // test if all registered template_dir are accessible
+ foreach($smarty->getTemplateDir() as $template_dir) {
+ $_template_dir = $template_dir;
+ $template_dir = realpath($template_dir);
+ // resolve include_path or fail existance
+ if (!$template_dir) {
+ if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_template_dir)) {
+ // try PHP include_path
+ if ($_stream_resolve_include_path) {
+ $template_dir = stream_resolve_include_path($_template_dir);
+ } else {
+ $template_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_template_dir);
+ }
+
+ if ($template_dir !== false) {
+ if ($errors === null) {
+ echo "$template_dir is OK.\n";
+ }
+
+ continue;
+ } else {
+ $status = false;
+ $message = "FAILED: $_template_dir does not exist (and couldn't be found in include_path either)";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['template_dir'] = $message;
+ }
+
+ continue;
+ }
+ } else {
+ $status = false;
+ $message = "FAILED: $_template_dir does not exist";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['template_dir'] = $message;
+ }
+
+ continue;
+ }
+ }
+
+ if (!is_dir($template_dir)) {
+ $status = false;
+ $message = "FAILED: $template_dir is not a directory";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['template_dir'] = $message;
+ }
+ } elseif (!is_readable($template_dir)) {
+ $status = false;
+ $message = "FAILED: $template_dir is not readable";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['template_dir'] = $message;
+ }
+ } else {
+ if ($errors === null) {
+ echo "$template_dir is OK.\n";
+ }
+ }
+ }
+
+
+ if ($errors === null) {
+ echo "Testing compile directory...\n";
+ }
+
+ // test if registered compile_dir is accessible
+ $__compile_dir = $smarty->getCompileDir();
+ $_compile_dir = realpath($__compile_dir);
+ if (!$_compile_dir) {
+ $status = false;
+ $message = "FAILED: {$__compile_dir} does not exist";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['compile_dir'] = $message;
+ }
+ } elseif (!is_dir($_compile_dir)) {
+ $status = false;
+ $message = "FAILED: {$_compile_dir} is not a directory";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['compile_dir'] = $message;
+ }
+ } elseif (!is_readable($_compile_dir)) {
+ $status = false;
+ $message = "FAILED: {$_compile_dir} is not readable";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['compile_dir'] = $message;
+ }
+ } elseif (!is_writable($_compile_dir)) {
+ $status = false;
+ $message = "FAILED: {$_compile_dir} is not writable";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['compile_dir'] = $message;
+ }
+ } else {
+ if ($errors === null) {
+ echo "{$_compile_dir} is OK.\n";
+ }
+ }
+
+
+ if ($errors === null) {
+ echo "Testing plugins directory...\n";
+ }
+
+ // test if all registered plugins_dir are accessible
+ // and if core plugins directory is still registered
+ $_core_plugins_dir = realpath(dirname(__FILE__) .'/../plugins');
+ $_core_plugins_available = false;
+ foreach($smarty->getPluginsDir() as $plugin_dir) {
+ $_plugin_dir = $plugin_dir;
+ $plugin_dir = realpath($plugin_dir);
+ // resolve include_path or fail existance
+ if (!$plugin_dir) {
+ if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_plugin_dir)) {
+ // try PHP include_path
+ if ($_stream_resolve_include_path) {
+ $plugin_dir = stream_resolve_include_path($_plugin_dir);
+ } else {
+ $plugin_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_plugin_dir);
+ }
+
+ if ($plugin_dir !== false) {
+ if ($errors === null) {
+ echo "$plugin_dir is OK.\n";
+ }
+
+ continue;
+ } else {
+ $status = false;
+ $message = "FAILED: $_plugin_dir does not exist (and couldn't be found in include_path either)";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['plugins_dir'] = $message;
+ }
+
+ continue;
+ }
+ } else {
+ $status = false;
+ $message = "FAILED: $_plugin_dir does not exist";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['plugins_dir'] = $message;
+ }
+
+ continue;
+ }
+ }
+
+ if (!is_dir($plugin_dir)) {
+ $status = false;
+ $message = "FAILED: $plugin_dir is not a directory";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['plugins_dir'] = $message;
+ }
+ } elseif (!is_readable($plugin_dir)) {
+ $status = false;
+ $message = "FAILED: $plugin_dir is not readable";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['plugins_dir'] = $message;
+ }
+ } elseif ($_core_plugins_dir && $_core_plugins_dir == realpath($plugin_dir)) {
+ $_core_plugins_available = true;
+ if ($errors === null) {
+ echo "$plugin_dir is OK.\n";
+ }
+ } else {
+ if ($errors === null) {
+ echo "$plugin_dir is OK.\n";
+ }
+ }
+ }
+ if (!$_core_plugins_available) {
+ $status = false;
+ $message = "WARNING: Smarty's own libs/plugins is not available";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } elseif (!isset($errors['plugins_dir'])) {
+ $errors['plugins_dir'] = $message;
+ }
+ }
+
+ if ($errors === null) {
+ echo "Testing cache directory...\n";
+ }
+
+
+ // test if all registered cache_dir is accessible
+ $__cache_dir = $smarty->getCacheDir();
+ $_cache_dir = realpath($__cache_dir);
+ if (!$_cache_dir) {
+ $status = false;
+ $message = "FAILED: {$__cache_dir} does not exist";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['cache_dir'] = $message;
+ }
+ } elseif (!is_dir($_cache_dir)) {
+ $status = false;
+ $message = "FAILED: {$_cache_dir} is not a directory";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['cache_dir'] = $message;
+ }
+ } elseif (!is_readable($_cache_dir)) {
+ $status = false;
+ $message = "FAILED: {$_cache_dir} is not readable";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['cache_dir'] = $message;
+ }
+ } elseif (!is_writable($_cache_dir)) {
+ $status = false;
+ $message = "FAILED: {$_cache_dir} is not writable";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['cache_dir'] = $message;
+ }
+ } else {
+ if ($errors === null) {
+ echo "{$_cache_dir} is OK.\n";
+ }
+ }
+
+
+ if ($errors === null) {
+ echo "Testing configs directory...\n";
+ }
+
+ // test if all registered config_dir are accessible
+ foreach($smarty->getConfigDir() as $config_dir) {
+ $_config_dir = $config_dir;
+ $config_dir = realpath($config_dir);
+ // resolve include_path or fail existance
+ if (!$config_dir) {
+ if ($smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_config_dir)) {
+ // try PHP include_path
+ if ($_stream_resolve_include_path) {
+ $config_dir = stream_resolve_include_path($_config_dir);
+ } else {
+ $config_dir = Smarty_Internal_Get_Include_Path::getIncludePath($_config_dir);
+ }
+
+ if ($config_dir !== false) {
+ if ($errors === null) {
+ echo "$config_dir is OK.\n";
+ }
+
+ continue;
+ } else {
+ $status = false;
+ $message = "FAILED: $_config_dir does not exist (and couldn't be found in include_path either)";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['config_dir'] = $message;
+ }
+
+ continue;
+ }
+ } else {
+ $status = false;
+ $message = "FAILED: $_config_dir does not exist";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['config_dir'] = $message;
+ }
+
+ continue;
+ }
+ }
+
+ if (!is_dir($config_dir)) {
+ $status = false;
+ $message = "FAILED: $config_dir is not a directory";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['config_dir'] = $message;
+ }
+ } elseif (!is_readable($config_dir)) {
+ $status = false;
+ $message = "FAILED: $config_dir is not readable";
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['config_dir'] = $message;
+ }
+ } else {
+ if ($errors === null) {
+ echo "$config_dir is OK.\n";
+ }
+ }
+ }
+
+
+ if ($errors === null) {
+ echo "Testing sysplugin files...\n";
+ }
+ // test if sysplugins are available
+ $source = SMARTY_SYSPLUGINS_DIR;
+ if (is_dir($source)) {
+ $expected = array(
+ "smarty_cacheresource.php" => true,
+ "smarty_cacheresource_custom.php" => true,
+ "smarty_cacheresource_keyvaluestore.php" => true,
+ "smarty_config_source.php" => true,
+ "smarty_internal_cacheresource_file.php" => true,
+ "smarty_internal_compile_append.php" => true,
+ "smarty_internal_compile_assign.php" => true,
+ "smarty_internal_compile_block.php" => true,
+ "smarty_internal_compile_break.php" => true,
+ "smarty_internal_compile_call.php" => true,
+ "smarty_internal_compile_capture.php" => true,
+ "smarty_internal_compile_config_load.php" => true,
+ "smarty_internal_compile_continue.php" => true,
+ "smarty_internal_compile_debug.php" => true,
+ "smarty_internal_compile_eval.php" => true,
+ "smarty_internal_compile_extends.php" => true,
+ "smarty_internal_compile_for.php" => true,
+ "smarty_internal_compile_foreach.php" => true,
+ "smarty_internal_compile_function.php" => true,
+ "smarty_internal_compile_if.php" => true,
+ "smarty_internal_compile_include.php" => true,
+ "smarty_internal_compile_include_php.php" => true,
+ "smarty_internal_compile_insert.php" => true,
+ "smarty_internal_compile_ldelim.php" => true,
+ "smarty_internal_compile_nocache.php" => true,
+ "smarty_internal_compile_private_block_plugin.php" => true,
+ "smarty_internal_compile_private_function_plugin.php" => true,
+ "smarty_internal_compile_private_modifier.php" => true,
+ "smarty_internal_compile_private_object_block_function.php" => true,
+ "smarty_internal_compile_private_object_function.php" => true,
+ "smarty_internal_compile_private_print_expression.php" => true,
+ "smarty_internal_compile_private_registered_block.php" => true,
+ "smarty_internal_compile_private_registered_function.php" => true,
+ "smarty_internal_compile_private_special_variable.php" => true,
+ "smarty_internal_compile_rdelim.php" => true,
+ "smarty_internal_compile_section.php" => true,
+ "smarty_internal_compile_setfilter.php" => true,
+ "smarty_internal_compile_while.php" => true,
+ "smarty_internal_compilebase.php" => true,
+ "smarty_internal_config.php" => true,
+ "smarty_internal_config_file_compiler.php" => true,
+ "smarty_internal_configfilelexer.php" => true,
+ "smarty_internal_configfileparser.php" => true,
+ "smarty_internal_data.php" => true,
+ "smarty_internal_debug.php" => true,
+ "smarty_internal_filter_handler.php" => true,
+ "smarty_internal_function_call_handler.php" => true,
+ "smarty_internal_get_include_path.php" => true,
+ "smarty_internal_nocache_insert.php" => true,
+ "smarty_internal_parsetree.php" => true,
+ "smarty_internal_resource_eval.php" => true,
+ "smarty_internal_resource_extends.php" => true,
+ "smarty_internal_resource_file.php" => true,
+ "smarty_internal_resource_registered.php" => true,
+ "smarty_internal_resource_stream.php" => true,
+ "smarty_internal_resource_string.php" => true,
+ "smarty_internal_smartytemplatecompiler.php" => true,
+ "smarty_internal_template.php" => true,
+ "smarty_internal_templatebase.php" => true,
+ "smarty_internal_templatecompilerbase.php" => true,
+ "smarty_internal_templatelexer.php" => true,
+ "smarty_internal_templateparser.php" => true,
+ "smarty_internal_utility.php" => true,
+ "smarty_internal_write_file.php" => true,
+ "smarty_resource.php" => true,
+ "smarty_resource_custom.php" => true,
+ "smarty_resource_recompiled.php" => true,
+ "smarty_resource_uncompiled.php" => true,
+ "smarty_security.php" => true,
+ );
+ $iterator = new DirectoryIterator($source);
+ foreach ($iterator as $file) {
+ if (!$file->isDot()) {
+ $filename = $file->getFilename();
+ if (isset($expected[$filename])) {
+ unset($expected[$filename]);
+ }
+ }
+ }
+ if ($expected) {
+ $status = false;
+ $message = "FAILED: files missing from libs/sysplugins: ". join(', ', array_keys($expected));
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['sysplugins'] = $message;
+ }
+ } elseif ($errors === null) {
+ echo "... OK\n";
+ }
+ } else {
+ $status = false;
+ $message = "FAILED: ". SMARTY_SYSPLUGINS_DIR .' is not a directory';
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['sysplugins_dir_constant'] = $message;
+ }
+ }
+
+ if ($errors === null) {
+ echo "Testing plugin files...\n";
+ }
+ // test if core plugins are available
+ $source = SMARTY_PLUGINS_DIR;
+ if (is_dir($source)) {
+ $expected = array(
+ "block.textformat.php" => true,
+ "function.counter.php" => true,
+ "function.cycle.php" => true,
+ "function.fetch.php" => true,
+ "function.html_checkboxes.php" => true,
+ "function.html_image.php" => true,
+ "function.html_options.php" => true,
+ "function.html_radios.php" => true,
+ "function.html_select_date.php" => true,
+ "function.html_select_time.php" => true,
+ "function.html_table.php" => true,
+ "function.mailto.php" => true,
+ "function.math.php" => true,
+ "modifier.capitalize.php" => true,
+ "modifier.date_format.php" => true,
+ "modifier.debug_print_var.php" => true,
+ "modifier.escape.php" => true,
+ "modifier.regex_replace.php" => true,
+ "modifier.replace.php" => true,
+ "modifier.spacify.php" => true,
+ "modifier.truncate.php" => true,
+ "modifiercompiler.cat.php" => true,
+ "modifiercompiler.count_characters.php" => true,
+ "modifiercompiler.count_paragraphs.php" => true,
+ "modifiercompiler.count_sentences.php" => true,
+ "modifiercompiler.count_words.php" => true,
+ "modifiercompiler.default.php" => true,
+ "modifiercompiler.escape.php" => true,
+ "modifiercompiler.from_charset.php" => true,
+ "modifiercompiler.indent.php" => true,
+ "modifiercompiler.lower.php" => true,
+ "modifiercompiler.noprint.php" => true,
+ "modifiercompiler.string_format.php" => true,
+ "modifiercompiler.strip.php" => true,
+ "modifiercompiler.strip_tags.php" => true,
+ "modifiercompiler.to_charset.php" => true,
+ "modifiercompiler.unescape.php" => true,
+ "modifiercompiler.upper.php" => true,
+ "modifiercompiler.wordwrap.php" => true,
+ "outputfilter.trimwhitespace.php" => true,
+ "shared.escape_special_chars.php" => true,
+ "shared.literal_compiler_param.php" => true,
+ "shared.make_timestamp.php" => true,
+ "shared.mb_str_replace.php" => true,
+ "shared.mb_unicode.php" => true,
+ "shared.mb_wordwrap.php" => true,
+ "variablefilter.htmlspecialchars.php" => true,
+ );
+ $iterator = new DirectoryIterator($source);
+ foreach ($iterator as $file) {
+ if (!$file->isDot()) {
+ $filename = $file->getFilename();
+ if (isset($expected[$filename])) {
+ unset($expected[$filename]);
+ }
+ }
+ }
+ if ($expected) {
+ $status = false;
+ $message = "FAILED: files missing from libs/plugins: ". join(', ', array_keys($expected));
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['plugins'] = $message;
+ }
+ } elseif ($errors === null) {
+ echo "... OK\n";
+ }
+ } else {
+ $status = false;
+ $message = "FAILED: ". SMARTY_PLUGINS_DIR .' is not a directory';
+ if ($errors === null) {
+ echo $message . ".\n";
+ } else {
+ $errors['plugins_dir_constant'] = $message;
+ }
+ }
+
+ if ($errors === null) {
+ echo "Tests complete.\n";
+ echo "</PRE>\n";
+ }
+
+ return $status;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_internal_write_file.php b/library/Smarty/libs/sysplugins/smarty_internal_write_file.php
new file mode 100644
index 000000000..e5d19ce8d
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_internal_write_file.php
@@ -0,0 +1,88 @@
+<?php
+/**
+ * Smarty write file plugin
+ *
+ * @package Smarty
+ * @subpackage PluginsInternal
+ * @author Monte Ohrt
+ */
+
+/**
+ * Smarty Internal Write File Class
+ *
+ * @package Smarty
+ * @subpackage PluginsInternal
+ */
+class Smarty_Internal_Write_File {
+
+ /**
+ * Writes file in a safe way to disk
+ *
+ * @param string $_filepath complete filepath
+ * @param string $_contents file content
+ * @param Smarty $smarty smarty instance
+ * @return boolean true
+ */
+ public static function writeFile($_filepath, $_contents, Smarty $smarty)
+ {
+ $_error_reporting = error_reporting();
+ error_reporting($_error_reporting & ~E_NOTICE & ~E_WARNING);
+ if ($smarty->_file_perms !== null) {
+ $old_umask = umask(0);
+ }
+
+ $_dirpath = dirname($_filepath);
+ // if subdirs, create dir structure
+ if ($_dirpath !== '.' && !file_exists($_dirpath)) {
+ mkdir($_dirpath, $smarty->_dir_perms === null ? 0777 : $smarty->_dir_perms, true);
+ }
+
+ // write to tmp file, then move to overt file lock race condition
+ $_tmp_file = $_dirpath . DS . uniqid('wrt', true);
+ if (!file_put_contents($_tmp_file, $_contents)) {
+ error_reporting($_error_reporting);
+ throw new SmartyException("unable to write file {$_tmp_file}");
+ return false;
+ }
+
+ /*
+ * Windows' rename() fails if the destination exists,
+ * Linux' rename() properly handles the overwrite.
+ * Simply unlink()ing a file might cause other processes
+ * currently reading that file to fail, but linux' rename()
+ * seems to be smart enough to handle that for us.
+ */
+ if (Smarty::$_IS_WINDOWS) {
+ // remove original file
+ @unlink($_filepath);
+ // rename tmp file
+ $success = @rename($_tmp_file, $_filepath);
+ } else {
+ // rename tmp file
+ $success = @rename($_tmp_file, $_filepath);
+ if (!$success) {
+ // remove original file
+ @unlink($_filepath);
+ // rename tmp file
+ $success = @rename($_tmp_file, $_filepath);
+ }
+ }
+
+ if (!$success) {
+ error_reporting($_error_reporting);
+ throw new SmartyException("unable to write file {$_filepath}");
+ return false;
+ }
+
+ if ($smarty->_file_perms !== null) {
+ // set file permissions
+ chmod($_filepath, $smarty->_file_perms);
+ umask($old_umask);
+ }
+ error_reporting($_error_reporting);
+ return true;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_resource.php b/library/Smarty/libs/sysplugins/smarty_resource.php
new file mode 100644
index 000000000..f79373af3
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_resource.php
@@ -0,0 +1,860 @@
+<?php
+/**
+ * Smarty Resource Plugin
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Rodney Rehm
+ */
+
+/**
+ * Smarty Resource Plugin
+ *
+ * Base implementation for resource plugins
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ */
+abstract class Smarty_Resource {
+ /**
+ * cache for Smarty_Template_Source instances
+ * @var array
+ */
+ public static $sources = array();
+ /**
+ * cache for Smarty_Template_Compiled instances
+ * @var array
+ */
+ public static $compileds = array();
+ /**
+ * cache for Smarty_Resource instances
+ * @var array
+ */
+ public static $resources = array();
+ /**
+ * resource types provided by the core
+ * @var array
+ */
+ protected static $sysplugins = array(
+ 'file' => true,
+ 'string' => true,
+ 'extends' => true,
+ 'stream' => true,
+ 'eval' => true,
+ 'php' => true
+ );
+
+ /**
+ * Name of the Class to compile this resource's contents with
+ * @var string
+ */
+ public $compiler_class = 'Smarty_Internal_SmartyTemplateCompiler';
+
+ /**
+ * Name of the Class to tokenize this resource's contents with
+ * @var string
+ */
+ public $template_lexer_class = 'Smarty_Internal_Templatelexer';
+
+ /**
+ * Name of the Class to parse this resource's contents with
+ * @var string
+ */
+ public $template_parser_class = 'Smarty_Internal_Templateparser';
+
+ /**
+ * Load template's source into current template object
+ *
+ * {@internal The loaded source is assigned to $_template->source->content directly.}}
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return string template source
+ * @throws SmartyException if source cannot be loaded
+ */
+ public abstract function getContent(Smarty_Template_Source $source);
+
+ /**
+ * populate Source Object with meta data from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ * @param Smarty_Internal_Template $_template template object
+ */
+ public abstract function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null);
+
+ /**
+ * populate Source Object with timestamp and exists from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ */
+ public function populateTimestamp(Smarty_Template_Source $source)
+ {
+ // intentionally left blank
+ }
+
+
+ /**
+ * modify resource_name according to resource handlers specifications
+ *
+ * @param Smarty $smarty Smarty instance
+ * @param string $resource_name resource_name to make unique
+ * @return string unique resource name
+ */
+ protected function buildUniqueResourceName(Smarty $smarty, $resource_name)
+ {
+ return get_class($this) . '#' . $smarty->joined_template_dir . '#' . $resource_name;
+ }
+
+ /**
+ * populate Compiled Object with compiled filepath
+ *
+ * @param Smarty_Template_Compiled $compiled compiled object
+ * @param Smarty_Internal_Template $_template template object
+ */
+ public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)
+ {
+ $_compile_id = isset($_template->compile_id) ? preg_replace('![^\w\|]+!', '_', $_template->compile_id) : null;
+ $_filepath = $compiled->source->uid;
+ // if use_sub_dirs, break file into directories
+ if ($_template->smarty->use_sub_dirs) {
+ $_filepath = substr($_filepath, 0, 2) . DS
+ . substr($_filepath, 2, 2) . DS
+ . substr($_filepath, 4, 2) . DS
+ . $_filepath;
+ }
+ $_compile_dir_sep = $_template->smarty->use_sub_dirs ? DS : '^';
+ if (isset($_compile_id)) {
+ $_filepath = $_compile_id . $_compile_dir_sep . $_filepath;
+ }
+ // caching token
+ if ($_template->caching) {
+ $_cache = '.cache';
+ } else {
+ $_cache = '';
+ }
+ $_compile_dir = $_template->smarty->getCompileDir();
+ // set basename if not specified
+ $_basename = $this->getBasename($compiled->source);
+ if ($_basename === null) {
+ $_basename = basename( preg_replace('![^\w\/]+!', '_', $compiled->source->name) );
+ }
+ // separate (optional) basename by dot
+ if ($_basename) {
+ $_basename = '.' . $_basename;
+ }
+
+ $compiled->filepath = $_compile_dir . $_filepath . '.' . $compiled->source->type . $_basename . $_cache . '.php';
+ }
+
+ /**
+ * Normalize Paths "foo/../bar" to "bar"
+ *
+ * @param string $_path path to normalize
+ * @param boolean $ds respect windows directory separator
+ * @return string normalized path
+ */
+ protected function normalizePath($_path, $ds=true)
+ {
+ if ($ds) {
+ // don't we all just love windows?
+ $_path = str_replace('\\', '/', $_path);
+ }
+
+ // resolve simples
+ $_path = preg_replace('#(/\./(\./)*)|/{2,}#', '/', $_path);
+ // resolve parents
+ while (true) {
+ $_parent = strpos($_path, '/../');
+ if ($_parent === false) {
+ break;
+ } else if ($_parent === 0) {
+ $_path = substr($_path, 3);
+ break;
+ }
+
+ $_pos = strrpos($_path, '/', $_parent - strlen($_path) - 1);
+ if ($_pos === false) {
+ // don't we all just love windows?
+ $_pos = $_parent;
+ }
+
+ $_path = substr_replace($_path, '', $_pos, $_parent + 3 - $_pos);
+ }
+
+ if ($ds && DS != '/') {
+ // don't we all just love windows?
+ $_path = str_replace('/', '\\', $_path);
+ }
+
+ return $_path;
+ }
+
+ /**
+ * build template filepath by traversing the template_dir array
+ *
+ * @param Smarty_Template_Source $source source object
+ * @param Smarty_Internal_Template $_template template object
+ * @return string fully qualified filepath
+ * @throws SmartyException if default template handler is registered but not callable
+ */
+ protected function buildFilepath(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
+ {
+ $file = $source->name;
+ if ($source instanceof Smarty_Config_Source) {
+ $_directories = $source->smarty->getConfigDir();
+ $_default_handler = $source->smarty->default_config_handler_func;
+ } else {
+ $_directories = $source->smarty->getTemplateDir();
+ $_default_handler = $source->smarty->default_template_handler_func;
+ }
+
+ // go relative to a given template?
+ $_file_is_dotted = $file[0] == '.' && ($file[1] == '.' || $file[1] == '/' || $file[1] == "\\");
+ if ($_template && $_template->parent instanceof Smarty_Internal_Template && $_file_is_dotted) {
+ if ($_template->parent->source->type != 'file' && $_template->parent->source->type != 'extends' && !$_template->parent->allow_relative_path) {
+ throw new SmartyException("Template '{$file}' cannot be relative to template of resource type '{$_template->parent->source->type}'");
+ }
+ $file = dirname($_template->parent->source->filepath) . DS . $file;
+ $_file_exact_match = true;
+ if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $file)) {
+ // the path gained from the parent template is relative to the current working directory
+ // as expansions (like include_path) have already been done
+ $file = getcwd() . DS . $file;
+ }
+ }
+
+ // resolve relative path
+ if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $file)) {
+ // don't we all just love windows?
+ $_path = str_replace('\\', '/', $file);
+ $_was_relative_prefix = $file[0] == '.' ? substr($file, 0, strpos($_path, '/')) : null;
+ $_path = DS . trim($file, '/');
+ $_was_relative = true;
+ } else {
+ // don't we all just love windows?
+ $_path = str_replace('\\', '/', $file);
+ }
+ $_path = $this->normalizePath($_path, false);
+ if (DS != '/') {
+ // don't we all just love windows?
+ $_path = str_replace('/', '\\', $_path);
+ }
+ // revert to relative
+ if (isset($_was_relative)) {
+ if (isset($_was_relative_prefix)){
+ $_path = $_was_relative_prefix . $_path;
+ } else {
+ $_path = substr($_path, 1);
+ }
+ }
+
+ // this is only required for directories
+ $file = rtrim($_path, '/\\');
+
+ // files relative to a template only get one shot
+ if (isset($_file_exact_match)) {
+ return $this->fileExists($source, $file) ? $file : false;
+ }
+
+ // template_dir index?
+ if (preg_match('#^\[(?P<key>[^\]]+)\](?P<file>.+)$#', $file, $match)) {
+ $_directory = null;
+ // try string indexes
+ if (isset($_directories[$match['key']])) {
+ $_directory = $_directories[$match['key']];
+ } else if (is_numeric($match['key'])) {
+ // try numeric index
+ $match['key'] = (int) $match['key'];
+ if (isset($_directories[$match['key']])) {
+ $_directory = $_directories[$match['key']];
+ } else {
+ // try at location index
+ $keys = array_keys($_directories);
+ $_directory = $_directories[$keys[$match['key']]];
+ }
+ }
+
+ if ($_directory) {
+ $_file = substr($file, strpos($file, ']') + 1);
+ $_filepath = $_directory . $_file;
+ if ($this->fileExists($source, $_filepath)) {
+ return $_filepath;
+ }
+ }
+ }
+
+ $_stream_resolve_include_path = function_exists('stream_resolve_include_path');
+
+ // relative file name?
+ if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $file)) {
+ foreach ($_directories as $_directory) {
+ $_filepath = $_directory . $file;
+ if ($this->fileExists($source, $_filepath)) {
+ return $this->normalizePath($_filepath);
+ }
+ if ($source->smarty->use_include_path && !preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $_directory)) {
+ // try PHP include_path
+ if ($_stream_resolve_include_path) {
+ $_filepath = stream_resolve_include_path($_filepath);
+ } else {
+ $_filepath = Smarty_Internal_Get_Include_Path::getIncludePath($_filepath);
+ }
+
+ if ($_filepath !== false) {
+ if ($this->fileExists($source, $_filepath)) {
+ return $this->normalizePath($_filepath);
+ }
+ }
+ }
+ }
+ }
+
+ // try absolute filepath
+ if ($this->fileExists($source, $file)) {
+ return $file;
+ }
+
+ // no tpl file found
+ if ($_default_handler) {
+ if (!is_callable($_default_handler)) {
+ if ($source instanceof Smarty_Config_Source) {
+ throw new SmartyException("Default config handler not callable");
+ } else {
+ throw new SmartyException("Default template handler not callable");
+ }
+ }
+ $_return = call_user_func_array($_default_handler,
+ array($source->type, $source->name, &$_content, &$_timestamp, $source->smarty));
+ if (is_string($_return)) {
+ $source->timestamp = @filemtime($_return);
+ $source->exists = !!$source->timestamp;
+ return $_return;
+ } elseif ($_return === true) {
+ $source->content = $_content;
+ $source->timestamp = $_timestamp;
+ $source->exists = true;
+ return $_filepath;
+ }
+ }
+
+ // give up
+ return false;
+ }
+
+ /**
+ * test is file exists and save timestamp
+ *
+ * @param Smarty_Template_Source $source source object
+ * @param string $file file name
+ * @return bool true if file exists
+ */
+ protected function fileExists(Smarty_Template_Source $source, $file)
+ {
+ $source->timestamp = @filemtime($file);
+ return $source->exists = !!$source->timestamp;
+
+ }
+
+ /**
+ * Determine basename for compiled filename
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return string resource's basename
+ */
+ protected function getBasename(Smarty_Template_Source $source)
+ {
+ return null;
+ }
+
+ /**
+ * Load Resource Handler
+ *
+ * @param Smarty $smarty smarty object
+ * @param string $type name of the resource
+ * @return Smarty_Resource Resource Handler
+ */
+ public static function load(Smarty $smarty, $type)
+ {
+ // try smarty's cache
+ if (isset($smarty->_resource_handlers[$type])) {
+ return $smarty->_resource_handlers[$type];
+ }
+
+ // try registered resource
+ if (isset($smarty->registered_resources[$type])) {
+ if ($smarty->registered_resources[$type] instanceof Smarty_Resource) {
+ $smarty->_resource_handlers[$type] = $smarty->registered_resources[$type];
+ // note registered to smarty is not kept unique!
+ return $smarty->_resource_handlers[$type];
+ }
+
+ if (!isset(self::$resources['registered'])) {
+ self::$resources['registered'] = new Smarty_Internal_Resource_Registered();
+ }
+ if (!isset($smarty->_resource_handlers[$type])) {
+ $smarty->_resource_handlers[$type] = self::$resources['registered'];
+ }
+
+ return $smarty->_resource_handlers[$type];
+ }
+
+ // try sysplugins dir
+ if (isset(self::$sysplugins[$type])) {
+ if (!isset(self::$resources[$type])) {
+ $_resource_class = 'Smarty_Internal_Resource_' . ucfirst($type);
+ self::$resources[$type] = new $_resource_class();
+ }
+ return $smarty->_resource_handlers[$type] = self::$resources[$type];
+ }
+
+ // try plugins dir
+ $_resource_class = 'Smarty_Resource_' . ucfirst($type);
+ if ($smarty->loadPlugin($_resource_class)) {
+ if (isset(self::$resources[$type])) {
+ return $smarty->_resource_handlers[$type] = self::$resources[$type];
+ }
+
+ if (class_exists($_resource_class, false)) {
+ self::$resources[$type] = new $_resource_class();
+ return $smarty->_resource_handlers[$type] = self::$resources[$type];
+ } else {
+ $smarty->registerResource($type, array(
+ "smarty_resource_{$type}_source",
+ "smarty_resource_{$type}_timestamp",
+ "smarty_resource_{$type}_secure",
+ "smarty_resource_{$type}_trusted"
+ ));
+
+ // give it another try, now that the resource is registered properly
+ return self::load($smarty, $type);
+ }
+ }
+
+ // try streams
+ $_known_stream = stream_get_wrappers();
+ if (in_array($type, $_known_stream)) {
+ // is known stream
+ if (is_object($smarty->security_policy)) {
+ $smarty->security_policy->isTrustedStream($type);
+ }
+ if (!isset(self::$resources['stream'])) {
+ self::$resources['stream'] = new Smarty_Internal_Resource_Stream();
+ }
+ return $smarty->_resource_handlers[$type] = self::$resources['stream'];
+ }
+
+ // TODO: try default_(template|config)_handler
+
+ // give up
+ throw new SmartyException("Unkown resource type '{$type}'");
+ }
+
+ /**
+ * extract resource_type and resource_name from template_resource and config_resource
+ *
+ * @note "C:/foo.tpl" was forced to file resource up till Smarty 3.1.3 (including).
+ * @param string $resource_name template_resource or config_resource to parse
+ * @param string $default_resource the default resource_type defined in $smarty
+ * @param string &$name the parsed resource name
+ * @param string &$type the parsed resource type
+ * @return void
+ */
+ protected static function parseResourceName($resource_name, $default_resource, &$name, &$type)
+ {
+ $parts = explode(':', $resource_name, 2);
+ if (!isset($parts[1]) || !isset($parts[0][1])) {
+ // no resource given, use default
+ // or single character before the colon is not a resource type, but part of the filepath
+ $type = $default_resource;
+ $name = $resource_name;
+ } else {
+ $type = $parts[0];
+ $name = $parts[1];
+ }
+ }
+
+
+ /**
+ * modify resource_name according to resource handlers specifications
+ *
+ * @param Smarty $smarty Smarty instance
+ * @param string $resource_name resource_name to make unique
+ * @return string unique resource name
+ */
+
+ /**
+ * modify template_resource according to resource handlers specifications
+ *
+ * @param string $smarty Smarty instance
+ * @param string $template_resource template_resource to extracate resource handler and name of
+ * @return string unique resource name
+ */
+ public static function getUniqueTemplateName($smarty, $template_resource)
+ {
+ self::parseResourceName($template_resource, $smarty->default_resource_type, $name, $type);
+ // TODO: optimize for Smarty's internal resource types
+ $resource = Smarty_Resource::load($smarty, $type);
+ return $resource->buildUniqueResourceName($smarty, $name);
+ }
+
+ /**
+ * initialize Source Object for given resource
+ *
+ * Either [$_template] or [$smarty, $template_resource] must be specified
+ *
+ * @param Smarty_Internal_Template $_template template object
+ * @param Smarty $smarty smarty object
+ * @param string $template_resource resource identifier
+ * @return Smarty_Template_Source Source Object
+ */
+ public static function source(Smarty_Internal_Template $_template=null, Smarty $smarty=null, $template_resource=null)
+ {
+ if ($_template) {
+ $smarty = $_template->smarty;
+ $template_resource = $_template->template_resource;
+ }
+
+ // parse resource_name, load resource handler, identify unique resource name
+ self::parseResourceName($template_resource, $smarty->default_resource_type, $name, $type);
+ $resource = Smarty_Resource::load($smarty, $type);
+ $unique_resource_name = $resource->buildUniqueResourceName($smarty, $name);
+
+ // check runtime cache
+ $_cache_key = 'template|' . $unique_resource_name;
+ if ($smarty->compile_id) {
+ $_cache_key .= '|'.$smarty->compile_id;
+ }
+ if (isset(self::$sources[$_cache_key])) {
+ return self::$sources[$_cache_key];
+ }
+
+ // create source
+ $source = new Smarty_Template_Source($resource, $smarty, $template_resource, $type, $name, $unique_resource_name);
+ $resource->populate($source, $_template);
+
+ // runtime cache
+ self::$sources[$_cache_key] = $source;
+ return $source;
+ }
+
+ /**
+ * initialize Config Source Object for given resource
+ *
+ * @param Smarty_Internal_Config $_config config object
+ * @return Smarty_Config_Source Source Object
+ */
+ public static function config(Smarty_Internal_Config $_config)
+ {
+ static $_incompatible_resources = array('eval' => true, 'string' => true, 'extends' => true, 'php' => true);
+ $config_resource = $_config->config_resource;
+ $smarty = $_config->smarty;
+
+ // parse resource_name
+ self::parseResourceName($config_resource, $smarty->default_config_type, $name, $type);
+
+ // make sure configs are not loaded via anything smarty can't handle
+ if (isset($_incompatible_resources[$type])) {
+ throw new SmartyException ("Unable to use resource '{$type}' for config");
+ }
+
+ // load resource handler, identify unique resource name
+ $resource = Smarty_Resource::load($smarty, $type);
+ $unique_resource_name = $resource->buildUniqueResourceName($smarty, $name);
+
+ // check runtime cache
+ $_cache_key = 'config|' . $unique_resource_name;
+ if (isset(self::$sources[$_cache_key])) {
+ return self::$sources[$_cache_key];
+ }
+
+ // create source
+ $source = new Smarty_Config_Source($resource, $smarty, $config_resource, $type, $name, $unique_resource_name);
+ $resource->populate($source, null);
+
+ // runtime cache
+ self::$sources[$_cache_key] = $source;
+ return $source;
+ }
+
+}
+
+/**
+ * Smarty Resource Data Object
+ *
+ * Meta Data Container for Template Files
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Rodney Rehm
+ *
+ * @property integer $timestamp Source Timestamp
+ * @property boolean $exists Source Existance
+ * @property boolean $template Extended Template reference
+ * @property string $content Source Content
+ */
+class Smarty_Template_Source {
+
+ /**
+ * Name of the Class to compile this resource's contents with
+ * @var string
+ */
+ public $compiler_class = null;
+
+ /**
+ * Name of the Class to tokenize this resource's contents with
+ * @var string
+ */
+ public $template_lexer_class = null;
+
+ /**
+ * Name of the Class to parse this resource's contents with
+ * @var string
+ */
+ public $template_parser_class = null;
+
+ /**
+ * Unique Template ID
+ * @var string
+ */
+ public $uid = null;
+
+ /**
+ * Template Resource (Smarty_Internal_Template::$template_resource)
+ * @var string
+ */
+ public $resource = null;
+
+ /**
+ * Resource Type
+ * @var string
+ */
+ public $type = null;
+
+ /**
+ * Resource Name
+ * @var string
+ */
+ public $name = null;
+
+ /**
+ * Unique Resource Name
+ * @var string
+ */
+ public $unique_resource = null;
+
+ /**
+ * Source Filepath
+ * @var string
+ */
+ public $filepath = null;
+
+ /**
+ * Source is bypassing compiler
+ * @var boolean
+ */
+ public $uncompiled = null;
+
+ /**
+ * Source must be recompiled on every occasion
+ * @var boolean
+ */
+ public $recompiled = null;
+
+ /**
+ * The Components an extended template is made of
+ * @var array
+ */
+ public $components = null;
+
+ /**
+ * Resource Handler
+ * @var Smarty_Resource
+ */
+ public $handler = null;
+
+ /**
+ * Smarty instance
+ * @var Smarty
+ */
+ public $smarty = null;
+
+ /**
+ * create Source Object container
+ *
+ * @param Smarty_Resource $handler Resource Handler this source object communicates with
+ * @param Smarty $smarty Smarty instance this source object belongs to
+ * @param string $resource full template_resource
+ * @param string $type type of resource
+ * @param string $name resource name
+ * @param string $unique_resource unqiue resource name
+ */
+ public function __construct(Smarty_Resource $handler, Smarty $smarty, $resource, $type, $name, $unique_resource)
+ {
+ $this->handler = $handler; // Note: prone to circular references
+
+ $this->compiler_class = $handler->compiler_class;
+ $this->template_lexer_class = $handler->template_lexer_class;
+ $this->template_parser_class = $handler->template_parser_class;
+ $this->uncompiled = $this->handler instanceof Smarty_Resource_Uncompiled;
+ $this->recompiled = $this->handler instanceof Smarty_Resource_Recompiled;
+
+ $this->smarty = $smarty;
+ $this->resource = $resource;
+ $this->type = $type;
+ $this->name = $name;
+ $this->unique_resource = $unique_resource;
+ }
+
+ /**
+ * get a Compiled Object of this source
+ *
+ * @param Smarty_Internal_Template $_template template objet
+ * @return Smarty_Template_Compiled compiled object
+ */
+ public function getCompiled(Smarty_Internal_Template $_template)
+ {
+ // check runtime cache
+ $_cache_key = $this->unique_resource . '#' . $_template->compile_id;
+ if (isset(Smarty_Resource::$compileds[$_cache_key])) {
+ return Smarty_Resource::$compileds[$_cache_key];
+ }
+
+ $compiled = new Smarty_Template_Compiled($this);
+ $this->handler->populateCompiledFilepath($compiled, $_template);
+ $compiled->timestamp = @filemtime($compiled->filepath);
+ $compiled->exists = !!$compiled->timestamp;
+
+ // runtime cache
+ Smarty_Resource::$compileds[$_cache_key] = $compiled;
+
+ return $compiled;
+ }
+
+ /**
+ * render the uncompiled source
+ *
+ * @param Smarty_Internal_Template $_template template object
+ */
+ public function renderUncompiled(Smarty_Internal_Template $_template)
+ {
+ return $this->handler->renderUncompiled($this, $_template);
+ }
+
+ /**
+ * <<magic>> Generic Setter.
+ *
+ * @param string $property_name valid: timestamp, exists, content, template
+ * @param mixed $value new value (is not checked)
+ * @throws SmartyException if $property_name is not valid
+ */
+ public function __set($property_name, $value)
+ {
+ switch ($property_name) {
+ // regular attributes
+ case 'timestamp':
+ case 'exists':
+ case 'content':
+ // required for extends: only
+ case 'template':
+ $this->$property_name = $value;
+ break;
+
+ default:
+ throw new SmartyException("invalid source property '$property_name'.");
+ }
+ }
+
+ /**
+ * <<magic>> Generic getter.
+ *
+ * @param string $property_name valid: timestamp, exists, content
+ * @return mixed
+ * @throws SmartyException if $property_name is not valid
+ */
+ public function __get($property_name)
+ {
+ switch ($property_name) {
+ case 'timestamp':
+ case 'exists':
+ $this->handler->populateTimestamp($this);
+ return $this->$property_name;
+
+ case 'content':
+ return $this->content = $this->handler->getContent($this);
+
+ default:
+ throw new SmartyException("source property '$property_name' does not exist.");
+ }
+ }
+
+}
+
+/**
+ * Smarty Resource Data Object
+ *
+ * Meta Data Container for Template Files
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Rodney Rehm
+ *
+ * @property string $content compiled content
+ */
+class Smarty_Template_Compiled {
+
+ /**
+ * Compiled Filepath
+ * @var string
+ */
+ public $filepath = null;
+
+ /**
+ * Compiled Timestamp
+ * @var integer
+ */
+ public $timestamp = null;
+
+ /**
+ * Compiled Existance
+ * @var boolean
+ */
+ public $exists = false;
+
+ /**
+ * Compiled Content Loaded
+ * @var boolean
+ */
+ public $loaded = false;
+
+ /**
+ * Template was compiled
+ * @var boolean
+ */
+ public $isCompiled = false;
+
+ /**
+ * Source Object
+ * @var Smarty_Template_Source
+ */
+ public $source = null;
+
+ /**
+ * Metadata properties
+ *
+ * populated by Smarty_Internal_Template::decodeProperties()
+ * @var array
+ */
+ public $_properties = null;
+
+ /**
+ * create Compiled Object container
+ *
+ * @param Smarty_Template_Source $source source object this compiled object belongs to
+ */
+ public function __construct(Smarty_Template_Source $source)
+ {
+ $this->source = $source;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_resource_custom.php b/library/Smarty/libs/sysplugins/smarty_resource_custom.php
new file mode 100644
index 000000000..9ec1f356b
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_resource_custom.php
@@ -0,0 +1,96 @@
+<?php
+/**
+ * Smarty Resource Plugin
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Rodney Rehm
+ */
+
+/**
+ * Smarty Resource Plugin
+ *
+ * Wrapper Implementation for custom resource plugins
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ */
+abstract class Smarty_Resource_Custom extends Smarty_Resource {
+
+ /**
+ * fetch template and its modification time from data source
+ *
+ * @param string $name template name
+ * @param string &$source template source
+ * @param integer &$mtime template modification timestamp (epoch)
+ */
+ protected abstract function fetch($name, &$source, &$mtime);
+
+ /**
+ * Fetch template's modification timestamp from data source
+ *
+ * {@internal implementing this method is optional.
+ * Only implement it if modification times can be accessed faster than loading the complete template source.}}
+ *
+ * @param string $name template name
+ * @return integer|boolean timestamp (epoch) the template was modified, or false if not found
+ */
+ protected function fetchTimestamp($name)
+ {
+ return null;
+ }
+
+ /**
+ * populate Source Object with meta data from Resource
+ *
+ * @param Smarty_Template_Source $source source object
+ * @param Smarty_Internal_Template $_template template object
+ */
+ public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template=null)
+ {
+ $source->filepath = strtolower($source->type . ':' . $source->name);
+ $source->uid = sha1($source->type . ':' . $source->name);
+
+ $mtime = $this->fetchTimestamp($source->name);
+ if ($mtime !== null) {
+ $source->timestamp = $mtime;
+ } else {
+ $this->fetch($source->name, $content, $timestamp);
+ $source->timestamp = isset($timestamp) ? $timestamp : false;
+ if( isset($content) )
+ $source->content = $content;
+ }
+ $source->exists = !!$source->timestamp;
+ }
+
+ /**
+ * Load template's source into current template object
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return string template source
+ * @throws SmartyException if source cannot be loaded
+ */
+ public function getContent(Smarty_Template_Source $source)
+ {
+ $this->fetch($source->name, $content, $timestamp);
+ if (isset($content)) {
+ return $content;
+ }
+
+ throw new SmartyException("Unable to read template {$source->type} '{$source->name}'");
+ }
+
+ /**
+ * Determine basename for compiled filename
+ *
+ * @param Smarty_Template_Source $source source object
+ * @return string resource's basename
+ */
+ protected function getBasename(Smarty_Template_Source $source)
+ {
+ return basename($source->name);
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_resource_recompiled.php b/library/Smarty/libs/sysplugins/smarty_resource_recompiled.php
new file mode 100644
index 000000000..ab55b93a6
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_resource_recompiled.php
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Smarty Resource Plugin
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Rodney Rehm
+ */
+
+/**
+ * Smarty Resource Plugin
+ *
+ * Base implementation for resource plugins that don't compile cache
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ */
+abstract class Smarty_Resource_Recompiled extends Smarty_Resource {
+
+ /**
+ * populate Compiled Object with compiled filepath
+ *
+ * @param Smarty_Template_Compiled $compiled compiled object
+ * @param Smarty_Internal_Template $_template template object
+ * @return void
+ */
+ public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)
+ {
+ $compiled->filepath = false;
+ $compiled->timestamp = false;
+ $compiled->exists = false;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_resource_uncompiled.php b/library/Smarty/libs/sysplugins/smarty_resource_uncompiled.php
new file mode 100644
index 000000000..ea8023507
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_resource_uncompiled.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * Smarty Resource Plugin
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ * @author Rodney Rehm
+ */
+
+/**
+ * Smarty Resource Plugin
+ *
+ * Base implementation for resource plugins that don't use the compiler
+ *
+ * @package Smarty
+ * @subpackage TemplateResources
+ */
+abstract class Smarty_Resource_Uncompiled extends Smarty_Resource {
+
+ /**
+ * Render and output the template (without using the compiler)
+ *
+ * @param Smarty_Template_Source $source source object
+ * @param Smarty_Internal_Template $_template template object
+ * @throws SmartyException on failure
+ */
+ public abstract function renderUncompiled(Smarty_Template_Source $source, Smarty_Internal_Template $_template);
+
+ /**
+ * populate compiled object with compiled filepath
+ *
+ * @param Smarty_Template_Compiled $compiled compiled object
+ * @param Smarty_Internal_Template $_template template object (is ignored)
+ */
+ public function populateCompiledFilepath(Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template)
+ {
+ $compiled->filepath = false;
+ $compiled->timestamp = false;
+ $compiled->exists = false;
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/Smarty/libs/sysplugins/smarty_security.php b/library/Smarty/libs/sysplugins/smarty_security.php
new file mode 100644
index 000000000..f8b31d963
--- /dev/null
+++ b/library/Smarty/libs/sysplugins/smarty_security.php
@@ -0,0 +1,459 @@
+<?php
+/**
+ * Smarty plugin
+ *
+ * @package Smarty
+ * @subpackage Security
+ * @author Uwe Tews
+ */
+
+/*
+ * FIXME: Smarty_Security API
+ * - getter and setter instead of public properties would allow cultivating an internal cache properly
+ * - current implementation of isTrustedResourceDir() assumes that Smarty::$template_dir and Smarty::$config_dir are immutable
+ * the cache is killed every time either of the variables change. That means that two distinct Smarty objects with differing
+ * $template_dir or $config_dir should NOT share the same Smarty_Security instance,
+ * as this would lead to (severe) performance penalty! how should this be handled?
+ */
+
+/**
+ * This class does contain the security settings
+ */
+class Smarty_Security {
+
+ /**
+ * This determines how Smarty handles "<?php ... ?>" tags in templates.
+ * possible values:
+ * <ul>
+ * <li>Smarty::PHP_PASSTHRU -> echo PHP tags as they are</li>
+ * <li>Smarty::PHP_QUOTE -> escape tags as entities</li>
+ * <li>Smarty::PHP_REMOVE -> remove php tags</li>
+ * <li>Smarty::PHP_ALLOW -> execute php tags</li>
+ * </ul>
+ *
+ * @var integer
+ */
+ public $php_handling = Smarty::PHP_PASSTHRU;
+ /**
+ * This is the list of template directories that are considered secure.
+ * $template_dir is in this list implicitly.
+ *
+ * @var array
+ */
+ public $secure_dir = array();
+ /**
+ * This is an array of directories where trusted php scripts reside.
+ * {@link $security} is disabled during their inclusion/execution.
+ *
+ * @var array
+ */
+ public $trusted_dir = array();
+ /**
+ * List of regular expressions (PCRE) that include trusted URIs
+ *
+ * @var array
+ */
+ public $trusted_uri = array();
+ /**
+ * This is an array of trusted static classes.
+ *
+ * If empty access to all static classes is allowed.
+ * If set to 'none' none is allowed.
+ * @var array
+ */
+ public $static_classes = array();
+ /**
+ * This is an array of trusted PHP functions.
+ *
+ * If empty all functions are allowed.
+ * To disable all PHP functions set $php_functions = null.
+ * @var array
+ */
+ public $php_functions = array(
+ 'isset', 'empty',
+ 'count', 'sizeof',
+ 'in_array', 'is_array',
+ 'time',
+ 'nl2br',
+ );
+ /**
+ * This is an array of trusted PHP modifers.
+ *
+ * If empty all modifiers are allowed.
+ * To disable all modifier set $modifiers = null.
+ * @var array
+ */
+ public $php_modifiers = array(
+ 'escape',
+ 'count'
+ );
+ /**
+ * This is an array of allowed tags.
+ *
+ * If empty no restriction by allowed_tags.
+ * @var array
+ */
+ public $allowed_tags = array();
+ /**
+ * This is an array of disabled tags.
+ *
+ * If empty no restriction by disabled_tags.
+ * @var array
+ */
+ public $disabled_tags = array();
+ /**
+ * This is an array of allowed modifier plugins.
+ *
+ * If empty no restriction by allowed_modifiers.
+ * @var array
+ */
+ public $allowed_modifiers = array();
+ /**
+ * This is an array of disabled modifier plugins.
+ *
+ * If empty no restriction by disabled_modifiers.
+ * @var array
+ */
+ public $disabled_modifiers = array();
+ /**
+ * This is an array of trusted streams.
+ *
+ * If empty all streams are allowed.
+ * To disable all streams set $streams = null.
+ * @var array
+ */
+ public $streams = array('file');
+ /**
+ * + flag if constants can be accessed from template
+ * @var boolean
+ */
+ public $allow_constants = true;
+ /**
+ * + flag if super globals can be accessed from template
+ * @var boolean
+ */
+ public $allow_super_globals = true;
+
+ /**
+ * Cache for $resource_dir lookups
+ * @var array
+ */
+ protected $_resource_dir = null;
+ /**
+ * Cache for $template_dir lookups
+ * @var array
+ */
+ protected $_template_dir = null;
+ /**
+ * Cache for $config_dir lookups
+ * @var array
+ */
+ protected $_config_dir = null;
+ /**
+ * Cache for $secure_dir lookups
+ * @var array
+ */
+ protected $_secure_dir = null;
+ /**
+ * Cache for $php_resource_dir lookups
+ * @var array
+ */
+ protected $_php_resource_dir = null;
+ /**
+ * Cache for $trusted_dir lookups
+ * @var array
+ */
+ protected $_trusted_dir = null;
+
+
+ /**
+ * @param Smarty $smarty
+ */
+ public function __construct($smarty)
+ {
+ $this->smarty = $smarty;
+ }
+
+ /**
+ * Check if PHP function is trusted.
+ *
+ * @param string $function_name
+ * @param object $compiler compiler object
+ * @return boolean true if function is trusted
+ * @throws SmartyCompilerException if php function is not trusted
+ */
+ public function isTrustedPhpFunction($function_name, $compiler)
+ {
+ if (isset($this->php_functions) && (empty($this->php_functions) || in_array($function_name, $this->php_functions))) {
+ return true;
+ }
+
+ $compiler->trigger_template_error("PHP function '{$function_name}' not allowed by security setting");
+ return false; // should not, but who knows what happens to the compiler in the future?
+ }
+
+ /**
+ * Check if static class is trusted.
+ *
+ * @param string $class_name
+ * @param object $compiler compiler object
+ * @return boolean true if class is trusted
+ * @throws SmartyCompilerException if static class is not trusted
+ */
+ public function isTrustedStaticClass($class_name, $compiler)
+ {
+ if (isset($this->static_classes) && (empty($this->static_classes) || in_array($class_name, $this->static_classes))) {
+ return true;
+ }
+
+ $compiler->trigger_template_error("access to static class '{$class_name}' not allowed by security setting");
+ return false; // should not, but who knows what happens to the compiler in the future?
+ }
+
+ /**
+ * Check if PHP modifier is trusted.
+ *
+ * @param string $modifier_name
+ * @param object $compiler compiler object
+ * @return boolean true if modifier is trusted
+ * @throws SmartyCompilerException if modifier is not trusted
+ */
+ public function isTrustedPhpModifier($modifier_name, $compiler)
+ {
+ if (isset($this->php_modifiers) && (empty($this->php_modifiers) || in_array($modifier_name, $this->php_modifiers))) {
+ return true;
+ }
+
+ $compiler->trigger_template_error("modifier '{$modifier_name}' not allowed by security setting");
+ return false; // should not, but who knows what happens to the compiler in the future?
+ }
+
+ /**
+ * Check if tag is trusted.
+ *
+ * @param string $tag_name
+ * @param object $compiler compiler object
+ * @return boolean true if tag is trusted
+ * @throws SmartyCompilerException if modifier is not trusted
+ */
+ public function isTrustedTag($tag_name, $compiler)
+ {
+ // check for internal always required tags
+ if (in_array($tag_name, array('assign', 'call', 'private_filter', 'private_block_plugin', 'private_function_plugin', 'private_object_block_function',
+ 'private_object_function', 'private_registered_function', 'private_registered_block', 'private_special_variable', 'private_print_expression', 'private_modifier'))) {
+ return true;
+ }
+ // check security settings
+ if (empty($this->allowed_tags)) {
+ if (empty($this->disabled_tags) || !in_array($tag_name, $this->disabled_tags)) {
+ return true;
+ } else {
+ $compiler->trigger_template_error("tag '{$tag_name}' disabled by security setting", $compiler->lex->taglineno);
+ }
+ } else if (in_array($tag_name, $this->allowed_tags) && !in_array($tag_name, $this->disabled_tags)) {
+ return true;
+ } else {
+ $compiler->trigger_template_error("tag '{$tag_name}' not allowed by security setting", $compiler->lex->taglineno);
+ }
+ return false; // should not, but who knows what happens to the compiler in the future?
+ }
+
+ /**
+ * Check if modifier plugin is trusted.
+ *
+ * @param string $modifier_name
+ * @param object $compiler compiler object
+ * @return boolean true if tag is trusted
+ * @throws SmartyCompilerException if modifier is not trusted
+ */
+ public function isTrustedModifier($modifier_name, $compiler)
+ {
+ // check for internal always allowed modifier
+ if (in_array($modifier_name, array('default'))) {
+ return true;
+ }
+ // check security settings
+ if (empty($this->allowed_modifiers)) {
+ if (empty($this->disabled_modifiers) || !in_array($modifier_name, $this->disabled_modifiers)) {
+ return true;
+ } else {
+ $compiler->trigger_template_error("modifier '{$modifier_name}' disabled by security setting", $compiler->lex->taglineno);
+ }
+ } else if (in_array($modifier_name, $this->allowed_modifiers) && !in_array($modifier_name, $this->disabled_modifiers)) {
+ return true;
+ } else {
+ $compiler->trigger_template_error("modifier '{$modifier_name}' not allowed by security setting", $compiler->lex->taglineno);
+ }
+ return false; // should not, but who knows what happens to the compiler in the future?
+ }
+
+ /**
+ * Check if stream is trusted.
+ *
+ * @param string $stream_name
+ * @return boolean true if stream is trusted
+ * @throws SmartyException if stream is not trusted
+ */
+ public function isTrustedStream($stream_name)
+ {
+ if (isset($this->streams) && (empty($this->streams) || in_array($stream_name, $this->streams))) {
+ return true;
+ }
+
+ throw new SmartyException("stream '{$stream_name}' not allowed by security setting");
+ }
+
+ /**
+ * Check if directory of file resource is trusted.
+ *
+ * @param string $filepath
+ * @return boolean true if directory is trusted
+ * @throws SmartyException if directory is not trusted
+ */
+ public function isTrustedResourceDir($filepath)
+ {
+ $_template = false;
+ $_config = false;
+ $_secure = false;
+
+ $_template_dir = $this->smarty->getTemplateDir();
+ $_config_dir = $this->smarty->getConfigDir();
+
+ // check if index is outdated
+ if ((!$this->_template_dir || $this->_template_dir !== $_template_dir)
+ || (!$this->_config_dir || $this->_config_dir !== $_config_dir)
+ || (!empty($this->secure_dir) && (!$this->_secure_dir || $this->_secure_dir !== $this->secure_dir))
+ ) {
+ $this->_resource_dir = array();
+ $_template = true;
+ $_config = true;
+ $_secure = !empty($this->secure_dir);
+ }
+
+ // rebuild template dir index
+ if ($_template) {
+ $this->_template_dir = $_template_dir;
+ foreach ($_template_dir as $directory) {
+ $directory = realpath($directory);
+ $this->_resource_dir[$directory] = true;
+ }
+ }
+
+ // rebuild config dir index
+ if ($_config) {
+ $this->_config_dir = $_config_dir;
+ foreach ($_config_dir as $directory) {
+ $directory = realpath($directory);
+ $this->_resource_dir[$directory] = true;
+ }
+ }
+
+ // rebuild secure dir index
+ if ($_secure) {
+ $this->_secure_dir = $this->secure_dir;
+ foreach ((array) $this->secure_dir as $directory) {
+ $directory = realpath($directory);
+ $this->_resource_dir[$directory] = true;
+ }
+ }
+
+ $_filepath = realpath($filepath);
+ $directory = dirname($_filepath);
+ $_directory = array();
+ while (true) {
+ // remember the directory to add it to _resource_dir in case we're successful
+ $_directory[$directory] = true;
+ // test if the directory is trusted
+ if (isset($this->_resource_dir[$directory])) {
+ // merge sub directories of current $directory into _resource_dir to speed up subsequent lookups
+ $this->_resource_dir = array_merge($this->_resource_dir, $_directory);
+ return true;
+ }
+ // abort if we've reached root
+ if (($pos = strrpos($directory, DS)) === false || !isset($directory[1])) {
+ break;
+ }
+ // bubble up one level
+ $directory = substr($directory, 0, $pos);
+ }
+
+ // give up
+ throw new SmartyException("directory '{$_filepath}' not allowed by security setting");
+ }
+
+ /**
+ * Check if URI (e.g. {fetch} or {html_image}) is trusted
+ *
+ * To simplify things, isTrustedUri() resolves all input to "{$PROTOCOL}://{$HOSTNAME}".
+ * So "http://username:password@hello.world.example.org:8080/some-path?some=query-string"
+ * is reduced to "http://hello.world.example.org" prior to applying the patters from {@link $trusted_uri}.
+ * @param string $uri
+ * @return boolean true if URI is trusted
+ * @throws SmartyException if URI is not trusted
+ * @uses $trusted_uri for list of patterns to match against $uri
+ */
+ public function isTrustedUri($uri)
+ {
+ $_uri = parse_url($uri);
+ if (!empty($_uri['scheme']) && !empty($_uri['host'])) {
+ $_uri = $_uri['scheme'] . '://' . $_uri['host'];
+ foreach ($this->trusted_uri as $pattern) {
+ if (preg_match($pattern, $_uri)) {
+ return true;
+ }
+ }
+ }
+
+ throw new SmartyException("URI '{$uri}' not allowed by security setting");
+ }
+
+ /**
+ * Check if directory of file resource is trusted.
+ *
+ * @param string $filepath
+ * @return boolean true if directory is trusted
+ * @throws SmartyException if PHP directory is not trusted
+ */
+ public function isTrustedPHPDir($filepath)
+ {
+ if (empty($this->trusted_dir)) {
+ throw new SmartyException("directory '{$filepath}' not allowed by security setting (no trusted_dir specified)");
+ }
+
+ // check if index is outdated
+ if (!$this->_trusted_dir || $this->_trusted_dir !== $this->trusted_dir) {
+ $this->_php_resource_dir = array();
+
+ $this->_trusted_dir = $this->trusted_dir;
+ foreach ((array) $this->trusted_dir as $directory) {
+ $directory = realpath($directory);
+ $this->_php_resource_dir[$directory] = true;
+ }
+ }
+
+ $_filepath = realpath($filepath);
+ $directory = dirname($_filepath);
+ $_directory = array();
+ while (true) {
+ // remember the directory to add it to _resource_dir in case we're successful
+ $_directory[] = $directory;
+ // test if the directory is trusted
+ if (isset($this->_php_resource_dir[$directory])) {
+ // merge sub directories of current $directory into _resource_dir to speed up subsequent lookups
+ $this->_php_resource_dir = array_merge($this->_php_resource_dir, $_directory);
+ return true;
+ }
+ // abort if we've reached root
+ if (($pos = strrpos($directory, DS)) === false || !isset($directory[2])) {
+ break;
+ }
+ // bubble up one level
+ $directory = substr($directory, 0, $pos);
+ }
+
+ throw new SmartyException("directory '{$_filepath}' not allowed by security setting");
+ }
+
+}
+
+?> \ No newline at end of file
diff --git a/library/mcefixes/plugins.bbcode.editor_plugin_src.js b/library/mcefixes/plugins.bbcode.editor_plugin_src.js
index a2829a21c..f94fbc5d7 100644
--- a/library/mcefixes/plugins.bbcode.editor_plugin_src.js
+++ b/library/mcefixes/plugins.bbcode.editor_plugin_src.js
@@ -46,10 +46,19 @@
function rep(re, str) {
+
+s = s.replace(re,str);
+
//modify code to keep stuff intact within [code][/code] blocks
//Waitman Gobble NO WARRANTY
+/* This doesn't seem to work well with
+[code]line1
+line2[/code]
+commenting out for now
+*/
+/*
var o = new Array();
var x = s.split("[code]");
var i = 0;
@@ -71,7 +80,7 @@
}
s = o.join("[code]");
-
+*/
};
@@ -150,8 +159,8 @@
rep(/<blockquote[^>]*>/gi,"[quote]");
rep(/<\/blockquote>/gi,"[/quote]");
rep(/<hr \/>/gi,"[hr]");
- rep(/<br (.*?)\/>/gi,"\n\n");
- rep(/<br\/>/gi,"\n\n");
+ rep(/<br (.*?)\/>/gi,"\n");
+ rep(/<br\/>/gi,"\n");
rep(/<br>/gi,"\n");
rep(/<p>/gi,"");
rep(/<\/p>/gi,"\n");
@@ -171,6 +180,7 @@
function rep(re, str) {
+
//modify code to keep stuff intact within [code][/code] blocks
//Waitman Gobble NO WARRANTY
diff --git a/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js b/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js
index a2829a21c..f94fbc5d7 100644
--- a/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js
+++ b/library/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js
@@ -46,10 +46,19 @@
function rep(re, str) {
+
+s = s.replace(re,str);
+
//modify code to keep stuff intact within [code][/code] blocks
//Waitman Gobble NO WARRANTY
+/* This doesn't seem to work well with
+[code]line1
+line2[/code]
+commenting out for now
+*/
+/*
var o = new Array();
var x = s.split("[code]");
var i = 0;
@@ -71,7 +80,7 @@
}
s = o.join("[code]");
-
+*/
};
@@ -150,8 +159,8 @@
rep(/<blockquote[^>]*>/gi,"[quote]");
rep(/<\/blockquote>/gi,"[/quote]");
rep(/<hr \/>/gi,"[hr]");
- rep(/<br (.*?)\/>/gi,"\n\n");
- rep(/<br\/>/gi,"\n\n");
+ rep(/<br (.*?)\/>/gi,"\n");
+ rep(/<br\/>/gi,"\n");
rep(/<br>/gi,"\n");
rep(/<p>/gi,"");
rep(/<\/p>/gi,"\n");
@@ -171,6 +180,7 @@
function rep(re, str) {
+
//modify code to keep stuff intact within [code][/code] blocks
//Waitman Gobble NO WARRANTY
diff --git a/mod/admin.php b/mod/admin.php
index 56f88a489..c8ed7a53b 100644
--- a/mod/admin.php
+++ b/mod/admin.php
@@ -183,13 +183,15 @@ function admin_page_summary(&$a) {
Array( t('Normal Account'), 0),
Array( t('Soapbox Account'), 0),
Array( t('Community/Celebrity Account'), 0),
- Array( t('Automatic Friend Account'), 0)
+ Array( t('Automatic Friend Account'), 0),
+ Array( t('Blog Account'), 0),
+ Array( t('Private Forum'), 0)
);
$users=0;
foreach ($r as $u){ $accounts[$u['page-flags']][1] = $u['count']; $users+= $u['count']; }
- logger('accounts: ' . print_r($accounts,true));
+ logger('accounts: ' . print_r($accounts,true),LOGGER_DATA);
$r = q("SELECT COUNT(id) as `count` FROM `register`");
$pending = $r[0]['count'];
diff --git a/mod/babel.php b/mod/babel.php
new file mode 100644
index 000000000..1c881a5bd
--- /dev/null
+++ b/mod/babel.php
@@ -0,0 +1,56 @@
+<?php
+
+require_once('include/bbcode.php');
+require_once('library/markdown.php');
+require_once('include/bb2diaspora.php');
+require_once('include/html2bbcode.php');
+
+function visible_lf($s) {
+ return str_replace("\n",'<br />', $s);
+}
+
+function babel_content(&$a) {
+
+ $o .= '<h3>Babel Diagnostic</h3>';
+
+ $o .= '<form action="babel" method="post">';
+ $o .= t('Source (bbcode) text:') . EOL . '<textarea name="text" >' . htmlspecialchars($_REQUEST['text']) .'</textarea>' . EOL;
+ $o .= '<input type="submit" name="submit" value="Submit" /></form>';
+
+ $o .= '<br /><br />';
+
+ if(x($_REQUEST,'text')) {
+
+ $text = trim($_REQUEST['text']);
+ $o .= t("Source input: ") . EOL. EOL;
+ $o .= visible_lf($text) . EOL. EOL;
+
+ $html = bbcode($text);
+ $o .= t("bb2html: ") . EOL. EOL;
+ $o .= $html. EOL. EOL;
+
+ $bbcode = html2bbcode($html);
+ $o .= t("bb2html2bb: ") . EOL. EOL;
+ $o .= visible_lf($bbcode) . EOL. EOL;
+
+ $diaspora = bb2diaspora($text);
+ $o .= t("bb2md: ") . EOL. EOL;
+ $o .= visible_lf($diaspora) . EOL. EOL;
+
+ $html = Markdown($diaspora);
+ $o .= t("bb2md2html: ") . EOL. EOL;
+ $o .= $html. EOL. EOL;
+
+ $bbcode = diaspora2bb($diaspora);
+ $o .= t("bb2dia2bb: ") . EOL. EOL;
+ $o .= visible_lf($bbcode) . EOL. EOL;
+
+ $bbcode = html2bbcode($html);
+ $o .= t("bb2md2html2bb: ") . EOL. EOL;
+ $o .= visible_lf($bbcode) . EOL. EOL;
+
+
+
+ }
+ return $o;
+}
diff --git a/mod/content.php b/mod/content.php
new file mode 100644
index 000000000..5f3e954f6
--- /dev/null
+++ b/mod/content.php
@@ -0,0 +1,858 @@
+<?php
+
+// This is a purely experimental module and is not yet generally useful.
+
+// The eventual goal is to provide a json backend to fetch content and fill the current page.
+// The page will be filled in on the frontend using javascript.
+// At the present time this page is based on "network", but the hope is to extend to serving
+// any content (wall, community, search, etc.).
+// All search parameters, etc. will be managed in javascript and sent as request params.
+// Security will be managed on the backend.
+// There is no "pagination query", but we will manage the "current page" on the client
+// and provide a link to fetch the next page - until there are no pages left to fetch.
+
+// With the exception of complex tag and text searches, this prototype is incredibly
+// fast - e.g. one or two milliseconds to fetch parent items for the current content,
+// and 10-20 milliseconds to fetch all the child items.
+
+
+function content_content(&$a, $update = 0) {
+
+ require_once('include/conversation.php');
+
+
+ // Currently security is based on the logged in user
+
+ if(! local_user()) {
+ return;
+ }
+
+ $arr = array('query' => $a->query_string);
+
+ call_hooks('content_content_init', $arr);
+
+
+ $datequery = $datequery2 = '';
+
+ $group = 0;
+
+ $nouveau = false;
+
+ if($a->argc > 1) {
+ for($x = 1; $x < $a->argc; $x ++) {
+ if(is_a_date_arg($a->argv[$x])) {
+ if($datequery)
+ $datequery2 = escape_tags($a->argv[$x]);
+ else {
+ $datequery = escape_tags($a->argv[$x]);
+ $_GET['order'] = 'post';
+ }
+ }
+ elseif($a->argv[$x] === 'new') {
+ $nouveau = true;
+ }
+ elseif(intval($a->argv[$x])) {
+ $group = intval($a->argv[$x]);
+ $def_acl = array('allow_gid' => '<' . $group . '>');
+ }
+ }
+ }
+
+
+ $o = '';
+
+
+
+ $contact_id = $a->cid;
+
+ require_once('include/acl_selectors.php');
+
+ $cid = ((x($_GET,'cid')) ? intval($_GET['cid']) : 0);
+ $star = ((x($_GET,'star')) ? intval($_GET['star']) : 0);
+ $bmark = ((x($_GET,'bmark')) ? intval($_GET['bmark']) : 0);
+ $order = ((x($_GET,'order')) ? notags($_GET['order']) : 'comment');
+ $liked = ((x($_GET,'liked')) ? intval($_GET['liked']) : 0);
+ $conv = ((x($_GET,'conv')) ? intval($_GET['conv']) : 0);
+ $spam = ((x($_GET,'spam')) ? intval($_GET['spam']) : 0);
+ $nets = ((x($_GET,'nets')) ? $_GET['nets'] : '');
+ $cmin = ((x($_GET,'cmin')) ? intval($_GET['cmin']) : 0);
+ $cmax = ((x($_GET,'cmax')) ? intval($_GET['cmax']) : 99);
+ $file = ((x($_GET,'file')) ? $_GET['file'] : '');
+
+
+
+ if(x($_GET,'search') || x($_GET,'file'))
+ $nouveau = true;
+ if($cid)
+ $def_acl = array('allow_cid' => '<' . intval($cid) . '>');
+
+ if($nets) {
+ $r = q("select id from contact where uid = %d and network = '%s' and self = 0",
+ intval(local_user()),
+ dbesc($nets)
+ );
+
+ $str = '';
+ if(count($r))
+ foreach($r as $rr)
+ $str .= '<' . $rr['id'] . '>';
+ if(strlen($str))
+ $def_acl = array('allow_cid' => $str);
+ }
+
+
+ $sql_options = (($star) ? " and starred = 1 " : '');
+ $sql_options .= (($bmark) ? " and bookmark = 1 " : '');
+
+ $sql_nets = (($nets) ? sprintf(" and `contact`.`network` = '%s' ", dbesc($nets)) : '');
+
+ $sql_extra = " AND `item`.`parent` IN ( SELECT `parent` FROM `item` WHERE `id` = `parent` $sql_options ) ";
+
+ if($group) {
+ $r = q("SELECT `name`, `id` FROM `group` WHERE `id` = %d AND `uid` = %d LIMIT 1",
+ intval($group),
+ intval($_SESSION['uid'])
+ );
+ if(! count($r)) {
+ if($update)
+ killme();
+ notice( t('No such group') . EOL );
+ goaway($a->get_baseurl(true) . '/network');
+ // NOTREACHED
+ }
+
+ $contacts = expand_groups(array($group));
+ if((is_array($contacts)) && count($contacts)) {
+ $contact_str = implode(',',$contacts);
+ }
+ else {
+ $contact_str = ' 0 ';
+ info( t('Group is empty'));
+ }
+
+ $sql_extra = " AND `item`.`parent` IN ( SELECT DISTINCT(`parent`) FROM `item` WHERE 1 $sql_options AND ( `contact-id` IN ( $contact_str ) OR `allow_gid` like '" . protect_sprintf('%<' . intval($group) . '>%') . "' ) and deleted = 0 ) ";
+ $o = '<h2>' . t('Group: ') . $r[0]['name'] . '</h2>' . $o;
+ }
+ elseif($cid) {
+
+ $r = q("SELECT `id`,`name`,`network`,`writable`,`nurl` FROM `contact` WHERE `id` = %d
+ AND `blocked` = 0 AND `pending` = 0 LIMIT 1",
+ intval($cid)
+ );
+ if(count($r)) {
+ $sql_extra = " AND `item`.`parent` IN ( SELECT DISTINCT(`parent`) FROM `item` WHERE 1 $sql_options AND `contact-id` = " . intval($cid) . " and deleted = 0 ) ";
+
+ }
+ else {
+ killme();
+ }
+ }
+
+
+ $sql_extra3 = '';
+
+ if($datequery) {
+ $sql_extra3 .= protect_sprintf(sprintf(" AND item.created <= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery))));
+ }
+ if($datequery2) {
+ $sql_extra3 .= protect_sprintf(sprintf(" AND item.created >= '%s' ", dbesc(datetime_convert(date_default_timezone_get(),'',$datequery2))));
+ }
+
+ $sql_extra2 = (($nouveau) ? '' : " AND `item`.`parent` = `item`.`id` ");
+ $sql_extra3 = (($nouveau) ? '' : $sql_extra3);
+
+ if(x($_GET,'search')) {
+ $search = escape_tags($_GET['search']);
+ if (get_config('system','use_fulltext_engine')) {
+ if(strpos($search,'#') === 0)
+ $sql_extra .= sprintf(" AND (MATCH(tag) AGAINST ('".'"%s"'."' in boolean mode)) ",
+ dbesc(protect_sprintf($search))
+ );
+ else
+ $sql_extra .= sprintf(" AND (MATCH(`item`.`body`) AGAINST ('".'"%s"'."' in boolean mode) or MATCH(tag) AGAINST ('".'"%s"'."' in boolean mode)) ",
+ dbesc(protect_sprintf($search)),
+ dbesc(protect_sprintf($search))
+ );
+ } else {
+ $sql_extra .= sprintf(" AND ( `item`.`body` like '%s' OR `item`.`tag` like '%s' ) ",
+ dbesc(protect_sprintf('%' . $search . '%')),
+ dbesc(protect_sprintf('%]' . $search . '[%'))
+ );
+ }
+ }
+ if(strlen($file)) {
+ $sql_extra .= file_tag_file_query('item',unxmlify($file));
+ }
+
+ if($conv) {
+ $myurl = $a->get_baseurl() . '/profile/'. $a->user['nickname'];
+ $myurl = substr($myurl,strpos($myurl,'://')+3);
+ $myurl = str_replace('www.','',$myurl);
+ $diasp_url = str_replace('/profile/','/u/',$myurl);
+ if (get_config('system','use_fulltext_engine'))
+ $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where (MATCH(`author-link`) AGAINST ('".'"%s"'."' in boolean mode) or MATCH(`tag`) AGAINST ('".'"%s"'."' in boolean mode) or MATCH(tag) AGAINST ('".'"%s"'."' in boolean mode))) ",
+ dbesc(protect_sprintf($myurl)),
+ dbesc(protect_sprintf($myurl)),
+ dbesc(protect_sprintf($diasp_url))
+ );
+ else
+ $sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` like '%s' or `tag` like '%s' or tag like '%s' )) ",
+ dbesc(protect_sprintf('%' . $myurl)),
+ dbesc(protect_sprintf('%' . $myurl . ']%')),
+ dbesc(protect_sprintf('%' . $diasp_url . ']%'))
+ );
+
+ }
+
+ $pager_sql = sprintf(" LIMIT %d, %d ",intval($a->pager['start']), intval($a->pager['itemspage']));
+
+
+
+
+ if($nouveau) {
+ // "New Item View" - show all items unthreaded in reverse created date order
+
+ $items = q("SELECT `item`.*, `item`.`id` AS `item_id`,
+ `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`writable`,
+ `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
+ `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
+ FROM `item`, `contact`
+ WHERE `item`.`uid` = %d AND `item`.`visible` = 1
+ AND `item`.`deleted` = 0 and `item`.`moderated` = 0
+ $simple_update
+ AND `contact`.`id` = `item`.`contact-id`
+ AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
+ $sql_extra $sql_nets
+ ORDER BY `item`.`received` DESC $pager_sql ",
+ intval($_SESSION['uid'])
+ );
+
+ }
+ else {
+
+ // Normal conversation view
+
+
+ if($order === 'post')
+ $ordering = "`created`";
+ else
+ $ordering = "`commented`";
+
+ $start = dba_timer();
+
+ $r = q("SELECT `item`.`id` AS `item_id`, `contact`.`uid` AS `contact_uid`
+ FROM `item` LEFT JOIN `contact` ON `contact`.`id` = `item`.`contact-id`
+ WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
+ AND `item`.`moderated` = 0 AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
+ AND `item`.`parent` = `item`.`id`
+ $sql_extra3 $sql_extra $sql_nets
+ ORDER BY `item`.$ordering DESC $pager_sql ",
+ intval(local_user())
+ );
+
+ $first = dba_timer();
+
+
+ // Then fetch all the children of the parents that are on this page
+
+ $parents_arr = array();
+ $parents_str = '';
+
+ if(count($r)) {
+ foreach($r as $rr)
+ if(! in_array($rr['item_id'],$parents_arr))
+ $parents_arr[] = $rr['item_id'];
+ $parents_str = implode(', ', $parents_arr);
+
+ $items = q("SELECT `item`.*, `item`.`id` AS `item_id`,
+ `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`alias`, `contact`.`rel`, `contact`.`writable`,
+ `contact`.`network`, `contact`.`thumb`, `contact`.`dfrn-id`, `contact`.`self`,
+ `contact`.`id` AS `cid`, `contact`.`uid` AS `contact-uid`
+ FROM `item`, `contact`
+ WHERE `item`.`uid` = %d AND `item`.`visible` = 1 AND `item`.`deleted` = 0
+ AND `item`.`moderated` = 0 AND `contact`.`id` = `item`.`contact-id`
+ AND `contact`.`blocked` = 0 AND `contact`.`pending` = 0
+ AND `item`.`parent` IN ( %s )
+ $sql_extra ",
+ intval(local_user()),
+ dbesc($parents_str)
+ );
+
+ $second = dba_timer();
+
+ $items = conv_sort($items,$ordering);
+
+ } else {
+ $items = array();
+ }
+ }
+
+
+ logger('parent dba_timer: ' . sprintf('%01.4f',$first - $start));
+ logger('child dba_timer: ' . sprintf('%01.4f',$second - $first));
+
+ // Set this so that the conversation function can find out contact info for our wall-wall items
+ $a->page_contact = $a->contact;
+
+ $mode = (($nouveau) ? 'network-new' : 'network');
+
+ $o = render_content($a,$items,$mode,false);
+
+
+ header('Content-type: application/json');
+ echo json_encode($o);
+ killme();
+}
+
+
+
+function render_content(&$a, $items, $mode, $update, $preview = false) {
+
+
+ require_once('bbcode.php');
+
+ $ssl_state = ((local_user()) ? true : false);
+
+ $profile_owner = 0;
+ $page_writeable = false;
+
+ $previewing = (($preview) ? ' preview ' : '');
+
+ if($mode === 'network') {
+ $profile_owner = local_user();
+ $page_writeable = true;
+ }
+
+ if($mode === 'profile') {
+ $profile_owner = $a->profile['profile_uid'];
+ $page_writeable = can_write_wall($a,$profile_owner);
+ }
+
+ if($mode === 'notes') {
+ $profile_owner = local_user();
+ $page_writeable = true;
+ }
+
+ if($mode === 'display') {
+ $profile_owner = $a->profile['uid'];
+ $page_writeable = can_write_wall($a,$profile_owner);
+ }
+
+ if($mode === 'community') {
+ $profile_owner = 0;
+ $page_writeable = false;
+ }
+
+ if($update)
+ $return_url = $_SESSION['return_url'];
+ else
+ $return_url = $_SESSION['return_url'] = $a->query_string;
+
+ load_contact_links(local_user());
+
+ $cb = array('items' => $items, 'mode' => $mode, 'update' => $update, 'preview' => $preview);
+ call_hooks('conversation_start',$cb);
+
+ $items = $cb['items'];
+
+ $cmnt_tpl = get_markup_template('comment_item.tpl');
+ $tpl = 'wall_item.tpl';
+ $wallwall = 'wallwall_item.tpl';
+ $hide_comments_tpl = get_markup_template('hide_comments.tpl');
+
+ $alike = array();
+ $dlike = array();
+
+
+ // array with html for each thread (parent+comments)
+ $threads = array();
+ $threadsid = -1;
+
+ if($items && count($items)) {
+
+ if($mode === 'network-new' || $mode === 'search' || $mode === 'community') {
+
+ // "New Item View" on network page or search page results
+ // - just loop through the items and format them minimally for display
+
+ //$tpl = get_markup_template('search_item.tpl');
+ $tpl = 'search_item.tpl';
+
+ foreach($items as $item) {
+ $threadsid++;
+
+ $comment = '';
+ $owner_url = '';
+ $owner_photo = '';
+ $owner_name = '';
+ $sparkle = '';
+
+ if($mode === 'search' || $mode === 'community') {
+ if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE)))
+ && ($item['id'] != $item['parent']))
+ continue;
+ $nickname = $item['nickname'];
+ }
+ else
+ $nickname = $a->user['nickname'];
+
+ // prevent private email from leaking.
+ if($item['network'] === NETWORK_MAIL && local_user() != $item['uid'])
+ continue;
+
+ $profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']);
+ if($item['author-link'] && (! $item['author-name']))
+ $profile_name = $item['author-link'];
+
+
+
+ $sp = false;
+ $profile_link = best_link_url($item,$sp);
+ if($profile_link === 'mailbox')
+ $profile_link = '';
+ if($sp)
+ $sparkle = ' sparkle';
+ else
+ $profile_link = zrl($profile_link);
+
+ $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
+ if(($normalised != 'mailbox') && (x($a->contacts[$normalised])))
+ $profile_avatar = $a->contacts[$normalised]['thumb'];
+ else
+ $profile_avatar = ((strlen($item['author-avatar'])) ? $a->get_cached_avatar_image($item['author-avatar']) : $item['thumb']);
+
+ $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
+ call_hooks('render_location',$locate);
+
+ $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate));
+
+ localize_item($item);
+ if($mode === 'network-new')
+ $dropping = true;
+ else
+ $dropping = false;
+
+
+ $drop = array(
+ 'dropping' => $dropping,
+ 'select' => t('Select'),
+ 'delete' => t('Delete'),
+ );
+
+ $star = false;
+ $isstarred = "unstarred";
+
+ $lock = false;
+ $likebuttons = false;
+ $shareable = false;
+
+ $body = prepare_body($item,true);
+
+ //$tmp_item = replace_macros($tpl,array(
+ $tmp_item = array(
+ 'template' => $tpl,
+ 'id' => (($preview) ? 'P0' : $item['item_id']),
+ 'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
+ 'profile_url' => $profile_link,
+ 'item_photo_menu' => item_photo_menu($item),
+ 'name' => template_escape($profile_name),
+ 'sparkle' => $sparkle,
+ 'lock' => $lock,
+ 'thumb' => $profile_avatar,
+ 'title' => template_escape($item['title']),
+ 'body' => template_escape($body),
+ 'text' => strip_tags(template_escape($body)),
+ 'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
+ 'location' => template_escape($location),
+ 'indent' => '',
+ 'owner_name' => template_escape($owner_name),
+ 'owner_url' => $owner_url,
+ 'owner_photo' => $owner_photo,
+ 'plink' => get_plink($item),
+ 'edpost' => false,
+ 'isstarred' => $isstarred,
+ 'star' => $star,
+ 'drop' => $drop,
+ 'vote' => $likebuttons,
+ 'like' => '',
+ 'dislike' => '',
+ 'comment' => '',
+ 'conv' => (($preview) ? '' : array('href'=> $a->get_baseurl($ssl_state) . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context'))),
+ 'previewing' => $previewing,
+ 'wait' => t('Please wait'),
+ );
+
+ $arr = array('item' => $item, 'output' => $tmp_item);
+ call_hooks('display_item', $arr);
+
+ $threads[$threadsid]['id'] = $item['item_id'];
+ $threads[$threadsid]['items'] = array($arr['output']);
+
+ }
+
+ }
+ else
+ {
+ // Normal View
+
+
+ // Figure out how many comments each parent has
+ // (Comments all have gravity of 6)
+ // Store the result in the $comments array
+
+ $comments = array();
+ foreach($items as $item) {
+ if((intval($item['gravity']) == 6) && ($item['id'] != $item['parent'])) {
+ if(! x($comments,$item['parent']))
+ $comments[$item['parent']] = 1;
+ else
+ $comments[$item['parent']] += 1;
+ } elseif(! x($comments,$item['parent']))
+ $comments[$item['parent']] = 0; // avoid notices later on
+ }
+
+ // map all the like/dislike activities for each parent item
+ // Store these in the $alike and $dlike arrays
+
+ foreach($items as $item) {
+ like_puller($a,$item,$alike,'like');
+ like_puller($a,$item,$dlike,'dislike');
+ }
+
+ $comments_collapsed = false;
+ $comments_seen = 0;
+ $comment_lastcollapsed = false;
+ $comment_firstcollapsed = false;
+ $blowhard = 0;
+ $blowhard_count = 0;
+
+
+ foreach($items as $item) {
+
+ $comment = '';
+ $template = $tpl;
+ $commentww = '';
+ $sparkle = '';
+ $owner_url = $owner_photo = $owner_name = '';
+
+ // We've already parsed out like/dislike for special treatment. We can ignore them now
+
+ if(((activity_match($item['verb'],ACTIVITY_LIKE))
+ || (activity_match($item['verb'],ACTIVITY_DISLIKE)))
+ && ($item['id'] != $item['parent']))
+ continue;
+
+ $toplevelpost = (($item['id'] == $item['parent']) ? true : false);
+
+
+ // Take care of author collapsing and comment collapsing
+ // (author collapsing is currently disabled)
+ // If a single author has more than 3 consecutive top-level posts, squash the remaining ones.
+ // If there are more than two comments, squash all but the last 2.
+
+ if($toplevelpost) {
+
+ $item_writeable = (($item['writable'] || $item['self']) ? true : false);
+
+ $comments_seen = 0;
+ $comments_collapsed = false;
+ $comment_lastcollapsed = false;
+ $comment_firstcollapsed = false;
+
+ $threadsid++;
+ $threads[$threadsid]['id'] = $item['item_id'];
+ $threads[$threadsid]['private'] = $item['private'];
+ $threads[$threadsid]['items'] = array();
+
+ }
+ else {
+
+ // prevent private email reply to public conversation from leaking.
+ if($item['network'] === NETWORK_MAIL && local_user() != $item['uid'])
+ continue;
+
+ $comments_seen ++;
+ $comment_lastcollapsed = false;
+ $comment_firstcollapsed = false;
+ }
+
+ $override_comment_box = ((($page_writeable) && ($item_writeable)) ? true : false);
+ $show_comment_box = ((($page_writeable) && ($item_writeable) && ($comments_seen == $comments[$item['parent']])) ? true : false);
+
+
+ if(($comments[$item['parent']] > 2) && ($comments_seen <= ($comments[$item['parent']] - 2)) && ($item['gravity'] == 6)) {
+
+ if (!$comments_collapsed){
+ $threads[$threadsid]['num_comments'] = sprintf( tt('%d comment','%d comments',$comments[$item['parent']]),$comments[$item['parent']] );
+ $threads[$threadsid]['hide_text'] = t('show more');
+ $comments_collapsed = true;
+ $comment_firstcollapsed = true;
+ }
+ }
+ if(($comments[$item['parent']] > 2) && ($comments_seen == ($comments[$item['parent']] - 1))) {
+
+ $comment_lastcollapsed = true;
+ }
+
+ $redirect_url = $a->get_baseurl($ssl_state) . '/redir/' . $item['cid'] ;
+
+ $lock = ((($item['private'] == 1) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
+ || strlen($item['deny_cid']) || strlen($item['deny_gid']))))
+ ? t('Private Message')
+ : false);
+
+
+ // Top-level wall post not written by the wall owner (wall-to-wall)
+ // First figure out who owns it.
+
+ $osparkle = '';
+
+ if(($toplevelpost) && (! $item['self']) && ($mode !== 'profile')) {
+
+ if($item['wall']) {
+
+ // On the network page, I am the owner. On the display page it will be the profile owner.
+ // This will have been stored in $a->page_contact by our calling page.
+ // Put this person as the wall owner of the wall-to-wall notice.
+
+ $owner_url = zrl($a->page_contact['url']);
+ $owner_photo = $a->page_contact['thumb'];
+ $owner_name = $a->page_contact['name'];
+ $template = $wallwall;
+ $commentww = 'ww';
+ }
+
+ if((! $item['wall']) && $item['owner-link']) {
+
+ $owner_linkmatch = (($item['owner-link']) && link_compare($item['owner-link'],$item['author-link']));
+ $alias_linkmatch = (($item['alias']) && link_compare($item['alias'],$item['author-link']));
+ $owner_namematch = (($item['owner-name']) && $item['owner-name'] == $item['author-name']);
+ if((! $owner_linkmatch) && (! $alias_linkmatch) && (! $owner_namematch)) {
+
+ // The author url doesn't match the owner (typically the contact)
+ // and also doesn't match the contact alias.
+ // The name match is a hack to catch several weird cases where URLs are
+ // all over the park. It can be tricked, but this prevents you from
+ // seeing "Bob Smith to Bob Smith via Wall-to-wall" and you know darn
+ // well that it's the same Bob Smith.
+
+ // But it could be somebody else with the same name. It just isn't highly likely.
+
+
+ $owner_url = $item['owner-link'];
+ $owner_photo = $item['owner-avatar'];
+ $owner_name = $item['owner-name'];
+ $template = $wallwall;
+ $commentww = 'ww';
+ // If it is our contact, use a friendly redirect link
+ if((link_compare($item['owner-link'],$item['url']))
+ && ($item['network'] === NETWORK_DFRN)) {
+ $owner_url = $redirect_url;
+ $osparkle = ' sparkle';
+ }
+ else
+ $owner_url = zrl($owner_url);
+ }
+ }
+ }
+
+ $likebuttons = '';
+ $shareable = ((($profile_owner == local_user()) && ($item['private'] != 1)) ? true : false);
+
+ if($page_writeable) {
+/* if($toplevelpost) { */
+ $likebuttons = array(
+ 'like' => array( t("I like this \x28toggle\x29"), t("like")),
+ 'dislike' => array( t("I don't like this \x28toggle\x29"), t("dislike")),
+ );
+ if ($shareable) $likebuttons['share'] = array( t('Share this'), t('share'));
+/* } */
+
+ $qc = $qcomment = null;
+
+ if(in_array('qcomment',$a->plugins)) {
+ $qc = ((local_user()) ? get_pconfig(local_user(),'qcomment','words') : null);
+ $qcomment = (($qc) ? explode("\n",$qc) : null);
+ }
+
+ if(($show_comment_box) || (($show_comment_box == false) && ($override_comment_box == false) && ($item['last-child']))) {
+ $comment = replace_macros($cmnt_tpl,array(
+ '$return_path' => '',
+ '$jsreload' => (($mode === 'display') ? $_SESSION['return_url'] : ''),
+ '$type' => (($mode === 'profile') ? 'wall-comment' : 'net-comment'),
+ '$id' => $item['item_id'],
+ '$parent' => $item['parent'],
+ '$qcomment' => $qcomment,
+ '$profile_uid' => $profile_owner,
+ '$mylink' => $a->contact['url'],
+ '$mytitle' => t('This is you'),
+ '$myphoto' => $a->contact['thumb'],
+ '$comment' => t('Comment'),
+ '$submit' => t('Submit'),
+ '$edbold' => t('Bold'),
+ '$editalic' => t('Italic'),
+ '$eduline' => t('Underline'),
+ '$edquote' => t('Quote'),
+ '$edcode' => t('Code'),
+ '$edimg' => t('Image'),
+ '$edurl' => t('Link'),
+ '$edvideo' => t('Video'),
+ '$preview' => t('Preview'),
+ '$ww' => (($mode === 'network') ? $commentww : '')
+ ));
+ }
+ }
+
+ if(local_user() && link_compare($a->contact['url'],$item['author-link']))
+ $edpost = array($a->get_baseurl($ssl_state)."/editpost/".$item['id'], t("Edit"));
+ else
+ $edpost = false;
+
+ $drop = '';
+ $dropping = false;
+
+ if((intval($item['contact-id']) && $item['contact-id'] == remote_user()) || ($item['uid'] == local_user()))
+ $dropping = true;
+
+ $drop = array(
+ 'dropping' => $dropping,
+ 'select' => t('Select'),
+ 'delete' => t('Delete'),
+ );
+
+ $star = false;
+ $filer = false;
+
+ $isstarred = "unstarred";
+ if ($profile_owner == local_user()) {
+ if($toplevelpost) {
+ $isstarred = (($item['starred']) ? "starred" : "unstarred");
+
+ $star = array(
+ 'do' => t("add star"),
+ 'undo' => t("remove star"),
+ 'toggle' => t("toggle star status"),
+ 'classdo' => (($item['starred']) ? "hidden" : ""),
+ 'classundo' => (($item['starred']) ? "" : "hidden"),
+ 'starred' => t('starred'),
+ 'tagger' => t("add tag"),
+ 'classtagger' => "",
+ );
+ }
+ $filer = t("save to folder");
+ }
+
+
+ $photo = $item['photo'];
+ $thumb = $item['thumb'];
+
+ // Post was remotely authored.
+
+ $diff_author = ((link_compare($item['url'],$item['author-link'])) ? false : true);
+
+ $profile_name = (((strlen($item['author-name'])) && $diff_author) ? $item['author-name'] : $item['name']);
+
+ if($item['author-link'] && (! $item['author-name']))
+ $profile_name = $item['author-link'];
+
+ $sp = false;
+ $profile_link = best_link_url($item,$sp);
+ if($profile_link === 'mailbox')
+ $profile_link = '';
+ if($sp)
+ $sparkle = ' sparkle';
+ else
+ $profile_link = zrl($profile_link);
+
+ $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
+ if(($normalised != 'mailbox') && (x($a->contacts,$normalised)))
+ $profile_avatar = $a->contacts[$normalised]['thumb'];
+ else
+ $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $a->get_cached_avatar_image($thumb));
+
+ $like = ((x($alike,$item['uri'])) ? format_like($alike[$item['uri']],$alike[$item['uri'] . '-l'],'like',$item['uri']) : '');
+ $dislike = ((x($dlike,$item['uri'])) ? format_like($dlike[$item['uri']],$dlike[$item['uri'] . '-l'],'dislike',$item['uri']) : '');
+
+ $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
+ call_hooks('render_location',$locate);
+
+ $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate));
+
+ $indent = (($toplevelpost) ? '' : ' comment');
+
+ if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
+ $indent .= ' shiny';
+
+ //
+ localize_item($item);
+
+
+ $tags=array();
+ foreach(explode(',',$item['tag']) as $tag){
+ $tag = trim($tag);
+ if ($tag!="") $tags[] = bbcode($tag);
+ }
+
+ // Build the HTML
+
+ $body = prepare_body($item,true);
+ //$tmp_item = replace_macros($template,
+ $tmp_item = array(
+ // collapse comments in template. I don't like this much...
+ 'comment_firstcollapsed' => $comment_firstcollapsed,
+ 'comment_lastcollapsed' => $comment_lastcollapsed,
+ // template to use to render item (wall, walltowall, search)
+ 'template' => $template,
+
+ 'type' => implode("",array_slice(explode("/",$item['verb']),-1)),
+ 'tags' => $tags,
+ 'body' => template_escape($body),
+ 'text' => strip_tags(template_escape($body)),
+ 'id' => $item['item_id'],
+ 'linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
+ 'olinktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['owner-link'])) ? $item['owner-link'] : $item['url'])),
+ 'to' => t('to'),
+ 'wall' => t('Wall-to-Wall'),
+ 'vwall' => t('via Wall-To-Wall:'),
+ 'profile_url' => $profile_link,
+ 'item_photo_menu' => item_photo_menu($item),
+ 'name' => template_escape($profile_name),
+ 'thumb' => $profile_avatar,
+ 'osparkle' => $osparkle,
+ 'sparkle' => $sparkle,
+ 'title' => template_escape($item['title']),
+ 'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
+ 'lock' => $lock,
+ 'location' => template_escape($location),
+ 'indent' => $indent,
+ 'owner_url' => $owner_url,
+ 'owner_photo' => $owner_photo,
+ 'owner_name' => template_escape($owner_name),
+ 'plink' => get_plink($item),
+ 'edpost' => $edpost,
+ 'isstarred' => $isstarred,
+ 'star' => $star,
+ 'filer' => $filer,
+ 'drop' => $drop,
+ 'vote' => $likebuttons,
+ 'like' => $like,
+ 'dislike' => $dislike,
+ 'comment' => $comment,
+ 'previewing' => $previewing,
+ 'wait' => t('Please wait'),
+
+ );
+
+
+ $arr = array('item' => $item, 'output' => $tmp_item);
+ call_hooks('display_item', $arr);
+
+ $threads[$threadsid]['items'][] = $arr['output'];
+ }
+ }
+ }
+
+
+ return $threads;
+
+}
diff --git a/mod/dfrn_confirm.php b/mod/dfrn_confirm.php
index 76b99cbca..8e39f5fd0 100644
--- a/mod/dfrn_confirm.php
+++ b/mod/dfrn_confirm.php
@@ -146,7 +146,7 @@ function dfrn_confirm_post(&$a,$handsfree = null) {
*/
require_once('include/crypto.php');
- $res = new_keypair(1024);
+ $res = new_keypair(4096);
$private_key = $res['prvkey'];
$public_key = $res['pubkey'];
diff --git a/mod/directory.php b/mod/directory.php
index 930a575b6..8a5685c9a 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -73,14 +73,12 @@ function directory_content(&$a) {
$order = " ORDER BY `name` ASC ";
- $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`, `user`.`timezone` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra $order LIMIT %d , %d ",
+ $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`, `user`.`timezone` , `user`.`page-flags` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $sql_extra $order LIMIT %d , %d ",
intval($a->pager['start']),
intval($a->pager['itemspage'])
);
if(count($r)) {
- $tpl = get_markup_template('directory_item.tpl');
-
if(in_array('small', $a->argv))
$photo = 'thumb';
else
@@ -113,20 +111,60 @@ function directory_content(&$a) {
if(strlen($rr['gender']))
$details .= '<br />' . t('Gender: ') . $rr['gender'];
+ if($rr['page-flags'] == PAGE_NORMAL)
+ $page_type = "Personal Profile";
+ if($rr['page-flags'] == PAGE_SOAPBOX)
+ $page_type = "Fan Page";
+ if($rr['page-flags'] == PAGE_COMMUNITY)
+ $page_type = "Community Forum";
+ if($rr['page-flags'] == PAGE_FREELOVE)
+ $page_type = "Open Forum";
+ if($rr['page-flags'] == PAGE_PRVGROUP)
+ $page_type = "Private Group";
+
+ $profile = $rr;
+
+ if((x($profile,'address') == 1)
+ || (x($profile,'locality') == 1)
+ || (x($profile,'region') == 1)
+ || (x($profile,'postal-code') == 1)
+ || (x($profile,'country-name') == 1))
+ $location = t('Location:');
+
+ $gender = ((x($profile,'gender') == 1) ? t('Gender:') : False);
+
+ $marital = ((x($profile,'marital') == 1) ? t('Status:') : False);
+
+ $homepage = ((x($profile,'homepage') == 1) ? t('Homepage:') : False);
+
+ $about = ((x($profile,'about') == 1) ? t('About:') : False);
+
+ $tpl = get_markup_template('directory_item.tpl');
+
$entry = replace_macros($tpl,array(
'$id' => $rr['id'],
'$profile-link' => $profile_link,
'$photo' => $a->get_cached_avatar_image($rr[$photo]),
'$alt-text' => $rr['name'],
'$name' => $rr['name'],
- '$details' => $pdesc . $details
-
+ '$details' => $pdesc . $details,
+ '$page-type' => $page_type,
+ '$profile' => $profile,
+ '$location' => template_escape($location),
+ '$gender' => $gender,
+ '$pdesc' => $pdesc,
+ '$marital' => $marital,
+ '$homepage' => $homepage,
+ '$about' => $about,
));
$arr = array('contact' => $rr, 'entry' => $entry);
call_hooks('directory_item', $arr);
+
+ unset($profile);
+ unset($location);
$o .= $entry;
diff --git a/mod/events.php b/mod/events.php
index 2a6fb692e..bf02f8309 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -57,12 +57,13 @@ function events_post(&$a) {
if(strcmp($finish,$start) < 0)
$finish = $start;
+ $summary = escape_tags(trim($_POST['summary']));
$desc = escape_tags(trim($_POST['desc']));
$location = escape_tags(trim($_POST['location']));
$type = 'event';
- if((! $desc) || (! $start)) {
- notice( t('Event description and start time are required.') . EOL);
+ if((! $summary) || (! $start)) {
+ notice( t('Event title and start time are required.') . EOL);
goaway($a->get_baseurl() . '/events/new');
}
@@ -107,6 +108,7 @@ function events_post(&$a) {
$datarray = array();
$datarray['start'] = $start;
$datarray['finish'] = $finish;
+ $datarray['summary'] = $summary;
$datarray['desc'] = $desc;
$datarray['location'] = $location;
$datarray['type'] = $type;
@@ -118,7 +120,7 @@ function events_post(&$a) {
$datarray['allow_gid'] = $str_group_allow;
$datarray['deny_cid'] = $str_contact_deny;
$datarray['deny_gid'] = $str_group_deny;
- $datarray['private'] = $private_event;
+ $datarray['private'] = (($private_event) ? 1 : 0);
$datarray['id'] = $event_id;
$datarray['created'] = $created;
$datarray['edited'] = $edited;
@@ -278,9 +280,11 @@ function events_content(&$a) {
$last_date = $d;
$edit = ((! $rr['cid']) ? array($a->get_baseurl().'/events/event/'.$rr['id'],t('Edit event'),'','') : null);
-
- list($title, $_trash) = explode("<br",bbcode($rr['desc']),2);
- $title = strip_tags($title);
+ $title = strip_tags(html_entity_decode(bbcode($rr['summary']),ENT_QUOTES,'UTF-8'));
+ if(! $title) {
+ list($title, $_trash) = explode("<br",bbcode($rr['desc']),2);
+ $title = strip_tags(html_entity_decode($title,ENT_QUOTES,'UTF-8'));
+ }
$html = format_event_html($rr);
$rr['desc'] = bbcode($rr['desc']);
$rr['location'] = bbcode($rr['location']);
@@ -351,6 +355,7 @@ function events_content(&$a) {
$n_checked = ((x($orig_event) && $orig_event['nofinish']) ? ' checked="checked" ' : '');
$a_checked = ((x($orig_event) && $orig_event['adjust']) ? ' checked="checked" ' : '');
+ $t_orig = ((x($orig_event)) ? $orig_event['summary'] : '');
$d_orig = ((x($orig_event)) ? $orig_event['desc'] : '');
$l_orig = ((x($orig_event)) ? $orig_event['location'] : '');
$eid = ((x($orig_event)) ? $orig_event['id'] : 0);
@@ -405,10 +410,11 @@ function events_content(&$a) {
'$eid' => $eid,
'$cid' => $cid,
'$uri' => $uri,
+
'$title' => t('Event details'),
- '$desc' => sprintf( t('Format is %s %s. Starting date and Description are required.'),$dateformat,$timeformat),
+ '$desc' => sprintf( t('Format is %s %s. Starting date and Title are required.'),$dateformat,$timeformat),
- '$s_text' => t('Event Starts:') . ' <span class="required">*</span> ',
+ '$s_text' => t('Event Starts:') . ' <span class="required" title="' . t('Required') . '">*</span>',
'$s_dsel' => datesel($f,'start',$syear+5,$syear,false,$syear,$smonth,$sday),
'$s_tsel' => timesel('start',$shour,$sminute),
'$n_text' => t('Finish date/time is not known or not relevant'),
@@ -418,10 +424,12 @@ function events_content(&$a) {
'$f_tsel' => timesel('finish',$fhour,$fminute),
'$a_text' => t('Adjust for viewer timezone'),
'$a_checked' => $a_checked,
- '$d_text' => t('Description:') . ' <span class="required">*</span>',
+ '$d_text' => t('Description:'),
'$d_orig' => $d_orig,
'$l_text' => t('Location:'),
'$l_orig' => $l_orig,
+ '$t_text' => t('Title:') . ' <span class="required" title="' . t('Required') . '">*</span>',
+ '$t_orig' => $t_orig,
'$sh_text' => t('Share this event'),
'$sh_checked' => $sh_checked,
'$acl' => (($cid) ? '' : populate_acl(((x($orig_event)) ? $orig_event : $a->user),false)),
diff --git a/mod/item.php b/mod/item.php
index c1c0b14ec..554e97fe4 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -108,7 +108,7 @@ function item_post(&$a) {
}
}
- if($parent) logger('mod_post: parent=' . $parent);
+ if($parent) logger('mod_item: item_post parent=' . $parent);
$profile_uid = ((x($_REQUEST,'profile_uid')) ? intval($_REQUEST['profile_uid']) : 0);
$post_id = ((x($_REQUEST,'post_id')) ? intval($_REQUEST['post_id']) : 0);
@@ -228,7 +228,7 @@ function item_post(&$a) {
|| strlen($parent_item['allow_gid'])
|| strlen($parent_item['deny_cid'])
|| strlen($parent_item['deny_gid'])) {
- $private = 1;
+ $private = (($parent_item['private']) ? $parent_item['private'] : 1);
}
$str_contact_allow = $parent_item['allow_cid'];
@@ -728,26 +728,10 @@ function item_post(&$a) {
}
- // We won't be able to sign Diaspora comments for authenticated visitors - we don't have their private key
- if($self) {
- require_once('include/bb2diaspora.php');
- $signed_body = html_entity_decode(bb2diaspora($datarray['body']));
- $myaddr = $a->user['nickname'] . '@' . substr($a->get_baseurl(), strpos($a->get_baseurl(),'://') + 3);
- if($datarray['verb'] === ACTIVITY_LIKE)
- $signed_text = $datarray['guid'] . ';' . 'Post' . ';' . $parent_item['guid'] . ';' . 'true' . ';' . $myaddr;
- else
- $signed_text = $datarray['guid'] . ';' . $parent_item['guid'] . ';' . $signed_body . ';' . $myaddr;
-
- $authorsig = base64_encode(rsa_sign($signed_text,$a->user['prvkey'],'sha256'));
+ // Store the comment signature information in case we need to relay to Diaspora
+ store_diaspora_comment_sig($datarray, $author, ($self ? $a->user['prvkey'] : false), $parent_item, $post_id);
- q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
- intval($post_id),
- dbesc($signed_text),
- dbesc(base64_encode($authorsig)),
- dbesc($myaddr)
- );
- }
}
else {
$parent = $post_id;
@@ -1038,3 +1022,47 @@ function handle_tag($a, &$body, &$inform, &$str_tags, $profile_uid, $tag) {
return array('replaced' => $replaced, 'contact' => $r[0]);
}
+
+
+function store_diaspora_comment_sig($datarray, $author, $uprvkey, $parent_item, $post_id) {
+ // We won't be able to sign Diaspora comments for authenticated visitors - we don't have their private key
+
+ $enabled = intval(get_config('system','diaspora_enabled'));
+ if(! $enabled) {
+ logger('mod_item: diaspora support disabled, not storing comment signature', LOGGER_DEBUG);
+ return;
+ }
+
+
+ logger('mod_item: storing diaspora comment signature');
+
+ require_once('include/bb2diaspora.php');
+ $signed_body = html_entity_decode(bb2diaspora($datarray['body']));
+
+// $myaddr = $user['nickname'] . '@' . substr($baseurl, strpos($baseurl,'://') + 3);
+// if( $author['network'] === NETWORK_DIASPORA)
+// $diaspora_handle = $author['addr'];
+// else {
+ // Only works for NETWORK_DFRN
+ $contact_baseurl_start = strpos($author['url'],'://') + 3;
+ $contact_baseurl_length = strpos($author['url'],'/profile') - $contact_baseurl_start;
+ $contact_baseurl = substr($author['url'], $contact_baseurl_start, $contact_baseurl_length);
+ $diaspora_handle = $author['nick'] . '@' . $contact_baseurl;
+// }
+
+ $signed_text = $datarray['guid'] . ';' . $parent_item['guid'] . ';' . $signed_body . ';' . $diaspora_handle;
+
+ if( $uprvkey !== false )
+ $authorsig = base64_encode(rsa_sign($signed_text,$uprvkey,'sha256'));
+ else
+ $authorsig = '';
+
+ q("insert into sign (`iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
+ intval($post_id),
+ dbesc($signed_text),
+ dbesc(base64_encode($authorsig)),
+ dbesc($diaspora_handle)
+ );
+
+ return;
+}
diff --git a/mod/like.php b/mod/like.php
index 942a04fe7..1176c3110 100755
--- a/mod/like.php
+++ b/mod/like.php
@@ -37,7 +37,7 @@ function like_content(&$a) {
logger('like: verb ' . $verb . ' item ' . $item_id);
- $r = q("SELECT * FROM `item` WHERE ( `id` = '%s' OR `uri` = '%s') AND `id` = `parent` LIMIT 1",
+ $r = q("SELECT * FROM `item` WHERE `id` = '%s' OR `uri` = '%s' LIMIT 1",
dbesc($item_id),
dbesc($item_id)
);
@@ -121,57 +121,16 @@ function like_content(&$a) {
intval($like_item['id'])
);
- // Clean up the `sign` table
+
+ // Clean up the Diaspora signatures for this like
+ // Go ahead and do it even if Diaspora support is disabled. We still want to clean up
+ // if it had been enabled in the past
$r = q("DELETE FROM `sign` WHERE `iid` = %d",
intval($like_item['id'])
);
// Save the author information for the unlike in case we need to relay to Diaspora
- // Note that we can only create a signature for a user of the local server. We don't have
- // a key for remote users. That is ok, because if a remote user is "unlike"ing a post, it
- // means we are the relay, and for relayable_retractions, Diaspora
- // only checks the parent_author_signature if it doesn't have to relay further
- //
- // If $item['resource-id'] exists, it means the item is a photo. Diaspora doesn't support
- // likes on photos, so don't bother.
-
- if(($activity === ACTIVITY_LIKE) && (! $item['resource-id'])) {
- $signed_text = $like_item['guid'] . ';' . 'Like';
-
- if( $contact['network'] === NETWORK_DIASPORA)
- $diaspora_handle = $contact['addr'];
- else { // Only works for NETWORK_DFRN
- $contact_baseurl_start = strpos($contact['url'],'://') + 3;
- $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start;
- $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length);
- $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl;
-
- // Get contact's private key if he's a user of the local Friendica server
- $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1",
- dbesc($contact['url'])
- );
-
- if( $r) {
- $contact_uid = $r['uid'];
- $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1",
- intval($contact_uid)
- );
-
- if( $r)
- $authorsig = base64_encode(rsa_sign($signed_text,$r['prvkey'],'sha256'));
- }
- }
-
- if(! isset($authorsig))
- $authorsig = '';
-
- q("insert into sign (`retract_iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
- intval($like_item['id']),
- dbesc($signed_text),
- dbesc($authorsig),
- dbesc($diaspora_handle)
- );
- }
+ store_diaspora_like_retract_sig($activity, $item, $like_item, $contact);
// proc_run('php',"include/notifier.php","like","$post_id"); // $post_id isn't defined here!
@@ -217,6 +176,7 @@ EOT;
$arr['gravity'] = GRAVITY_LIKE;
$arr['parent'] = $item['id'];
$arr['parent-uri'] = $item['uri'];
+ $arr['thr-parent'] = $item['uri'];
$arr['owner-name'] = $remote_owner['name'];
$arr['owner-link'] = $remote_owner['url'];
$arr['owner-avatar'] = $remote_owner['thumb'];
@@ -251,35 +211,118 @@ EOT;
// Save the author information for the like in case we need to relay to Diaspora
+ store_diaspora_like_sig($activity, $post_type, $contact, $post_id);
+
+
+ $arr['id'] = $post_id;
+
+ call_hooks('post_local_end', $arr);
+
+ proc_run('php',"include/notifier.php","like","$post_id");
+
+ killme();
+// return; // NOTREACHED
+}
+
+
+function store_diaspora_like_retract_sig($activity, $item, $like_item, $contact) {
// Note that we can only create a signature for a user of the local server. We don't have
// a key for remote users. That is ok, because if a remote user is "unlike"ing a post, it
// means we are the relay, and for relayable_retractions, Diaspora
// only checks the parent_author_signature if it doesn't have to relay further
+ //
+ // If $item['resource-id'] exists, it means the item is a photo. Diaspora doesn't support
+ // likes on photos, so don't bother.
- if(($activity === ACTIVITY_LIKE) && ($post_type === t('status'))) {
- if( $contact['network'] === NETWORK_DIASPORA)
- $diaspora_handle = $contact['addr'];
- else { // Only works for NETWORK_DFRN
- $contact_baseurl_start = strpos($contact['url'],'://') + 3;
- $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start;
- $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length);
- $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl;
-
- // Get contact's private key if he's a user of the local Friendica server
- $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1",
- dbesc($contact['url'])
+ $enabled = intval(get_config('system','diaspora_enabled'));
+ if(! $enabled) {
+ logger('mod_like: diaspora support disabled, not storing like retraction signature', LOGGER_DEBUG);
+ return;
+ }
+
+ logger('mod_like: storing diaspora like retraction signature');
+
+ if(($activity === ACTIVITY_LIKE) && (! $item['resource-id'])) {
+ $signed_text = $like_item['guid'] . ';' . 'Like';
+
+// if( $contact['network'] === NETWORK_DIASPORA)
+// $diaspora_handle = $contact['addr'];
+// else {
+ // Only works for NETWORK_DFRN
+ $contact_baseurl_start = strpos($contact['url'],'://') + 3;
+ $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start;
+ $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length);
+ $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl;
+
+ // Get contact's private key if he's a user of the local Friendica server
+ $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1",
+ dbesc($contact['url'])
+ );
+
+ if( $r) {
+ $contact_uid = $r['uid'];
+ $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1",
+ intval($contact_uid)
);
- if( $r) {
- $contact_uid = $r['uid'];
- $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1",
- intval($contact_uid)
- );
+ if( $r)
+ $authorsig = base64_encode(rsa_sign($signed_text,$r['prvkey'],'sha256'));
+ }
+// }
- if( $r)
- $contact_uprvkey = $r['prvkey'];
- }
+ if(! isset($authorsig))
+ $authorsig = '';
+
+ q("insert into sign (`retract_iid`,`signed_text`,`signature`,`signer`) values (%d,'%s','%s','%s') ",
+ intval($like_item['id']),
+ dbesc($signed_text),
+ dbesc($authorsig),
+ dbesc($diaspora_handle)
+ );
+ }
+
+ return;
+}
+
+function store_diaspora_like_sig($activity, $post_type, $contact, $post_id) {
+ // Note that we can only create a signature for a user of the local server. We don't have
+ // a key for remote users. That is ok, because if a remote user is "unlike"ing a post, it
+ // means we are the relay, and for relayable_retractions, Diaspora
+ // only checks the parent_author_signature if it doesn't have to relay further
+
+ $enabled = intval(get_config('system','diaspora_enabled'));
+ if(! $enabled) {
+ logger('mod_like: diaspora support disabled, not storing like signature', LOGGER_DEBUG);
+ return;
+ }
+
+ logger('mod_like: storing diaspora like signature');
+
+ if(($activity === ACTIVITY_LIKE) && ($post_type === t('status'))) {
+// if( $contact['network'] === NETWORK_DIASPORA)
+// $diaspora_handle = $contact['addr'];
+// else {
+ // Only works for NETWORK_DFRN
+ $contact_baseurl_start = strpos($contact['url'],'://') + 3;
+ $contact_baseurl_length = strpos($contact['url'],'/profile') - $contact_baseurl_start;
+ $contact_baseurl = substr($contact['url'], $contact_baseurl_start, $contact_baseurl_length);
+ $diaspora_handle = $contact['nick'] . '@' . $contact_baseurl;
+
+ // Get contact's private key if he's a user of the local Friendica server
+ $r = q("SELECT `contact`.`uid` FROM `contact` WHERE `url` = '%s' AND `self` = 1 LIMIT 1",
+ dbesc($contact['url'])
+ );
+
+ if( $r) {
+ $contact_uid = $r['uid'];
+ $r = q("SELECT prvkey FROM user WHERE uid = %d LIMIT 1",
+ intval($contact_uid)
+ );
+
+ if( $r)
+ $contact_uprvkey = $r['prvkey'];
}
+// }
$r = q("SELECT guid, parent FROM `item` WHERE id = %d LIMIT 1",
intval($post_id)
@@ -307,13 +350,5 @@ EOT;
}
}
-
- $arr['id'] = $post_id;
-
- call_hooks('post_local_end', $arr);
-
- proc_run('php',"include/notifier.php","like","$post_id");
-
- killme();
-// return; // NOTREACHED
+ return;
}
diff --git a/mod/lockview.php b/mod/lockview.php
index 9e64e2608..a832629f1 100644
--- a/mod/lockview.php
+++ b/mod/lockview.php
@@ -33,7 +33,7 @@ function lockview_content(&$a) {
$deny_users = expand_acl($item['deny_cid']);
$deny_groups = expand_acl($item['deny_gid']);
- if(($item['private']) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))
+ if(($item['private'] == 1) && (! strlen($item['allow_cid'])) && (! strlen($item['allow_gid']))
&& (! strlen($item['deny_cid'])) && (! strlen($item['deny_gid']))) {
echo t('Remote privacy information not available.') . '<br />';
diff --git a/mod/message.php b/mod/message.php
index 519634be5..80d2c6d99 100644
--- a/mod/message.php
+++ b/mod/message.php
@@ -224,6 +224,7 @@ function message_content(&$a) {
// list messages
$o .= $header;
+
$r = q("SELECT count(*) AS `total` FROM `mail`
WHERE `mail`.`uid` = %d GROUP BY `parent-uri` ORDER BY `created` DESC",
@@ -232,7 +233,7 @@ function message_content(&$a) {
);
if(count($r))
$a->set_pager_total($r[0]['total']);
-
+
$r = q("SELECT max(`mail`.`created`) AS `mailcreated`, min(`mail`.`seen`) AS `mailseen`,
`mail`.* , `contact`.`name`, `contact`.`url`, `contact`.`thumb` , `contact`.`network`,
count( * ) as count
@@ -243,6 +244,7 @@ function message_content(&$a) {
intval($a->pager['start']),
intval($a->pager['itemspage'])
);
+
if(! count($r)) {
info( t('No messages.') . EOL);
return $o;
diff --git a/mod/parse_url.php b/mod/parse_url.php
index cdf2223a8..a38f7e270 100644
--- a/mod/parse_url.php
+++ b/mod/parse_url.php
@@ -215,10 +215,10 @@ function parse_url_content(&$a) {
$i = fetch_url($image);
if($i) {
+ require_once('include/Photo.php');
// guess mimetype from headers or filename
$type = guess_image_type($image,true);
-
- require_once('include/Photo.php');
+
$ph = new Photo($i, $type);
if($ph->is_valid()) {
if($ph->getWidth() > 300 || $ph->getHeight() > 300) {
diff --git a/mod/photos.php b/mod/photos.php
index d96bc135e..624f0bdca 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -38,8 +38,10 @@ function photos_init(&$a) {
$o .= '<div class="fn">' . $a->data['user']['username'] . '</div>';
$o .= '<div id="profile-photo-wrapper"><img class="photo" style="width: 175px; height: 175px;" src="' . $a->get_cached_avatar_image($a->get_baseurl() . '/photo/profile/' . $a->data['user']['uid'] . '.jpg') . '" alt="' . $a->data['user']['username'] . '" /></div>';
$o .= '</div>';
-
- if(! intval($a->data['user']['hidewall'])) {
+
+ $albums_visible = ((intval($a->data['user']['hidewall']) && (! local_user()) && (! remote_user())) ? false : true);
+
+ if($albums_visible) {
$o .= '<div id="side-bar-photos-albums" class="widget">';
$o .= '<h3>' . '<a href="' . $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'] . '">' . t('Photo Albums') . '</a></h3>';
@@ -709,6 +711,24 @@ function photos_post(&$a) {
logger('mod/photos.php: photos_post(): loading the contents of ' . $src , LOGGER_DEBUG);
$imagedata = @file_get_contents($src);
+
+
+
+ $r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ",
+ intval($a->data['user']['uid'])
+ );
+
+ $limit = service_class_fetch($a->data['user']['uid'],'photo_upload_limit');
+
+ if(($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) {
+ notice( upgrade_message() . EOL );
+ @unlink($src);
+ $foo = 0;
+ call_hooks('photo_post_end',$foo);
+ killme();
+ }
+
+
$ph = new Photo($imagedata, $type);
if(! $ph->is_valid()) {
@@ -723,6 +743,12 @@ function photos_post(&$a) {
$ph->orient($src);
@unlink($src);
+ $max_length = get_config('system','max_image_length');
+ if(! $max_length)
+ $max_length = MAX_IMAGE_LENGTH;
+ if($max_length > 0)
+ $ph->scaleImage($max_length);
+
$width = $ph->getWidth();
$height = $ph->getHeight();
@@ -966,12 +992,25 @@ function photos_content(&$a) {
<input type="submit" name="submit" value="' . t('Submit') . '" id="photos-upload-submit" /> </div>';
-
+ $r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ",
+ intval($a->data['user']['uid'])
+ );
+
+
+ $limit = service_class_fetch($a->data['user']['uid'],'photo_upload_limit');
+ if($limit !== false) {
+ $usage_message = sprintf( t("You have used %1$.2f Mbytes of %2$.2f Mbytes photo storage."), $r[0]['total'] / 1024000, $limit / 1024000 );
+ }
+ else {
+ $usage_message = sprintf( t('You have used %1$.2f Mbytes of photo storage.'), $r[0]['total'] / 1024000 );
+ }
+
$tpl = get_markup_template('photos_upload.tpl');
$o .= replace_macros($tpl,array(
'$pagename' => t('Upload Photos'),
'$sessid' => session_id(),
+ '$usage' => $usage_message,
'$nickname' => $a->data['user']['nickname'],
'$newalbum' => t('New album name: '),
'$existalbumtext' => t('or existing album name: '),
diff --git a/mod/profiles.php b/mod/profiles.php
index a9da5454c..4df8a5af7 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -130,6 +130,9 @@ function profiles_post(&$a) {
$politic = notags(trim($_POST['politic']));
$religion = notags(trim($_POST['religion']));
+ $likes = fix_mce_lf(escape_tags(trim($_POST['likes'])));
+ $dislikes = fix_mce_lf(escape_tags(trim($_POST['dislikes'])));
+
$about = fix_mce_lf(escape_tags(trim($_POST['about'])));
$interest = fix_mce_lf(escape_tags(trim($_POST['interest'])));
$contact = fix_mce_lf(escape_tags(trim($_POST['contact'])));
@@ -155,7 +158,15 @@ function profiles_post(&$a) {
if($withchanged) {
$changes[] = '[color=#ff0000]&hearts;[/color] ' . t('Romantic Partner');
$value = strip_tags($with);
- }
+ }
+ if($likes != $orig[0]['likes']) {
+ $changes[] = t('Likes');
+ $value = $likes;
+ }
+ if($dislikes != $orig[0]['dislikes']) {
+ $changes[] = t('Dislikes');
+ $value = $dislikes;
+ }
if($work != $orig[0]['work']) {
$changes[] = t('Work/Employment');
}
@@ -222,6 +233,8 @@ function profiles_post(&$a) {
`religion` = '%s',
`pub_keywords` = '%s',
`prv_keywords` = '%s',
+ `likes` = '%s',
+ `dislikes` = '%s',
`about` = '%s',
`interest` = '%s',
`contact` = '%s',
@@ -254,6 +267,8 @@ function profiles_post(&$a) {
dbesc($religion),
dbesc($pub_keywords),
dbesc($prv_keywords),
+ dbesc($likes),
+ dbesc($dislikes),
dbesc($about),
dbesc($interest),
dbesc($contact),
@@ -577,6 +592,8 @@ function profiles_content(&$a) {
'$lbl_religion' => t('Religious Views:'),
'$lbl_pubkey' => t('Public Keywords:'),
'$lbl_prvkey' => t('Private Keywords:'),
+ '$lbl_likes' => t('Likes:'),
+ '$lbl_dislikes' => t('Dislikes:'),
'$lbl_ex2' => t('Example: fishing photography software'),
'$lbl_pubdsc' => t("\x28Used for suggesting potential friends, can be seen by others\x29"),
'$lbl_prvdsc' => t("\x28Used for searching profiles, never shown to others\x29"),
@@ -617,6 +634,8 @@ function profiles_content(&$a) {
'$religion' => $r[0]['religion'],
'$pub_keywords' => $r[0]['pub_keywords'],
'$prv_keywords' => $r[0]['prv_keywords'],
+ '$likes' => $r[0]['likes'],
+ '$dislikes' => $r[0]['dislikes'],
'$music' => $r[0]['music'],
'$book' => $r[0]['book'],
'$tv' => $r[0]['tv'],
diff --git a/mod/settings.php b/mod/settings.php
index 92593d7a8..b1c3cf7d4 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -677,6 +677,14 @@ function settings_content(&$a) {
$tpl = get_markup_template("settings_connectors.tpl");
+
+ if(! service_class_allows(local_user(),'email_connect')) {
+ $mail_disabled_message = upgrade_bool_message();
+ }
+ else {
+ $mail_disabled_message = (($mail_disabled) ? t('Email access is disabled on this site.') : '');
+ }
+
$o .= replace_macros($tpl, array(
'$form_security_token' => get_form_security_token("settings_connectors"),
@@ -688,7 +696,7 @@ function settings_content(&$a) {
'$h_imap' => t('Email/Mailbox Setup'),
'$imap_desc' => t("If you wish to communicate with email contacts using this service \x28optional\x29, please specify how to connect to your mailbox."),
'$imap_lastcheck' => array('imap_lastcheck', t('Last successful email check:'), $mail_chk,''),
- '$mail_disabled' => (($mail_disabled) ? t('Email access is disabled on this site.') : ''),
+ '$mail_disabled' => $mail_disabled_message,
'$mail_server' => array('mail_server', t('IMAP server name:'), $mail_server, ''),
'$mail_port' => array('mail_port', t('IMAP port:'), $mail_port, ''),
'$mail_ssl' => array('mail_ssl', t('Security:'), strtoupper($mail_ssl), '', array( 'notls'=>t('None'), 'TLS'=>'TLS', 'SSL'=>'SSL')),
@@ -921,18 +929,12 @@ function settings_content(&$a) {
));
-
-
-
$invisible = (((! $profile['publish']) && (! $profile['net-publish']))
? true : false);
if($invisible)
info( t('Profile is <strong>not published</strong>.') . EOL );
-
-
-
$subdir = ((strlen($a->get_path())) ? '<br />' . t('or') . ' ' . $a->get_baseurl(true) . '/profile/' . $nickname : '');
@@ -1029,17 +1031,6 @@ function settings_content(&$a) {
'$h_descadvn' => t('Change the behaviour of this account for special situations'),
'$pagetype' => $pagetype,
-
-
-
-
-
-
-
-
-
-
-
));
call_hooks('settings_form',$o);
diff --git a/mod/share.php b/mod/share.php
index c7525113e..761220ad7 100644
--- a/mod/share.php
+++ b/mod/share.php
@@ -8,26 +8,25 @@ function share_init(&$a) {
if((! $post_id) || (! local_user()))
killme();
- $r = q("SELECT item.*, contact.network FROM `item` left join contact on `item`.`contact-id` = `contact`.`id` WHERE `item`.`id` = %d LIMIT 1",
- intval($post_id)
+ $r = q("SELECT item.*, contact.network FROM `item`
+ left join contact on `item`.`contact-id` = `contact`.`id`
+ WHERE `item`.`id` = %d AND `item`.`uid` = %d LIMIT 1",
+
+ intval($post_id),
+ intval(local_user())
);
- if(! count($r) || ($r[0]['private'] && ($r[0]['network'] != NETWORK_FEED)))
+ if(! count($r) || ($r[0]['private'] == 1))
killme();
$o = '';
-// if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) {
- $o .= "\xE2\x99\xb2" . ' [url=' . $r[0]['author-link'] . ']' . $r[0]['author-name'] . '[/url]' . "\n";
- if($r[0]['title'])
- $o .= '[b]' . $r[0]['title'] . '[/b]' . "\n";
- $o .= $r[0]['body'] . "\n";
-// }
-// else {
-// $o .= '&#x2672; <a href="' . $r[0]['author-link'] . '">' . $r[0]['author-name'] . '</a><br />';
-// if($r[0]['title'])
-// $o .= '<strong>' . $r[0]['title'] . '</strong><br />';
-// $o .= $r[0]['body'] . "\n";
-// }
+ $o .= "\xE2\x99\xb2" . ' [url=' . $r[0]['author-link'] . ']' . $r[0]['author-name'] . '[/url]' . "\n";
+ if($r[0]['title'])
+ $o .= '[b]' . $r[0]['title'] . '[/b]' . "\n";
+ $o .= $r[0]['body'] . "\n" ;
+
+ $o .= (($r[0]['plink']) ? '[url=' . $r[0]['plink'] . ']' . t('link') . '[/url]' . "\n" : '');
+
echo $o;
killme();
}
diff --git a/mod/wall_attach.php b/mod/wall_attach.php
index 03d9f5105..f179b3ca5 100644
--- a/mod/wall_attach.php
+++ b/mod/wall_attach.php
@@ -60,6 +60,19 @@ function wall_attach_post(&$a) {
return;
}
+ $r = q("select sum(octet_length(data)) as total from attach where uid = %d ",
+ intval($page_owner_uid)
+ );
+
+ $limit = service_class_fetch($page_owner_uid,'attach_upload_limit');
+
+ if(($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) {
+ echo upgrade_message(true) . EOL ;
+ @unlink($src);
+ killme();
+ }
+
+
$filedata = @file_get_contents($src);
$mimetype = z_mime_content_type($filename);
$hash = random_string();
diff --git a/mod/wall_upload.php b/mod/wall_upload.php
index 4b81f8d1c..5990f2834 100644
--- a/mod/wall_upload.php
+++ b/mod/wall_upload.php
@@ -79,6 +79,19 @@ function wall_upload_post(&$a) {
killme();
}
+ $r = q("select sum(octet_length(data)) as total from photo where uid = %d and scale = 0 and album != 'Contact Photos' ",
+ intval($page_owner_uid)
+ );
+
+ $limit = service_class_fetch($page_owner_uid,'photo_upload_limit');
+
+ if(($limit !== false) && (($r[0]['total'] + strlen($imagedata)) > $limit)) {
+ echo upgrade_message(true) . EOL ;
+ @unlink($src);
+ killme();
+ }
+
+
$imagedata = @file_get_contents($src);
$ph = new Photo($imagedata, $filetype);
diff --git a/update.php b/update.php
index 0f7bf664d..d752eaa6d 100644
--- a/update.php
+++ b/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1149 );
+define( 'UPDATE_VERSION' , 1153 );
/**
*
@@ -1289,3 +1289,51 @@ function update_1148() {
return UPDATE_FAILED;
return UPDATE_SUCCESS;
}
+
+
+function update_1149() {
+ $r1 = q("ALTER TABLE profile ADD likes text NOT NULL after prv_keywords");
+ $r2 = q("ALTER TABLE profile ADD dislikes text NOT NULL after likes");
+ if (! ($r1 && $r2))
+ return UPDATE_FAILED;
+ return UPDATE_SUCCESS;
+}
+
+
+function update_1150() {
+ $r = q("ALTER TABLE event ADD summary text NOT NULL after finish, add index ( uid ), add index ( cid ), add index ( uri ), add index ( `start` ), add index ( finish ), add index ( `type` ), add index ( adjust ) ");
+ if(! $r)
+ return UPDATE_FAILED;
+ return UPDATE_SUCCESS;
+}
+
+
+function update_1151() {
+ $r = q("CREATE TABLE IF NOT EXISTS locks (
+ id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+ name CHAR( 128 ) NOT NULL ,
+ locked TINYINT( 1 ) NOT NULL DEFAULT '0'
+ ) ENGINE = MYISAM DEFAULT CHARSET=utf8 ");
+ if (!$r)
+ return UPDATE_FAILED;
+ return UPDATE_SUCCESS;
+}
+
+function update_1152() {
+ $r = q("CREATE TABLE IF NOT EXISTS `term` (
+ `tid` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+ `oid` INT UNSIGNED NOT NULL ,
+ `otype` TINYINT( 3 ) UNSIGNED NOT NULL ,
+ `type` TINYINT( 3 ) UNSIGNED NOT NULL ,
+ `term` CHAR( 255 ) NOT NULL ,
+ `url` CHAR( 255 ) NOT NULL,
+ KEY `oid` ( `oid` ),
+ KEY `otype` ( `otype` ),
+ KEY `type` ( `type` ),
+ KEY `term` ( `term` )
+ ) ENGINE = MYISAM DEFAULT CHARSET=utf8 ");
+ if (!$r)
+ return UPDATE_FAILED;
+ return UPDATE_SUCCESS;
+}
+
diff --git a/util/messages.po b/util/messages.po
index 416e30ef8..c4a47cc25 100644
--- a/util/messages.po
+++ b/util/messages.po
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: 3.0.1382\n"
+"Project-Id-Version: 3.0.1395\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-06-22 10:00-0700\n"
+"POT-Creation-Date: 2012-07-05 10:00-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -35,8 +35,8 @@ msgid "Contact update failed."
msgstr ""
#: ../../mod/crepair.php:115 ../../mod/wall_attach.php:44
-#: ../../mod/fsuggest.php:78 ../../mod/events.php:138 ../../mod/api.php:26
-#: ../../mod/api.php:31 ../../mod/photos.php:133 ../../mod/photos.php:931
+#: ../../mod/fsuggest.php:78 ../../mod/events.php:140 ../../mod/api.php:26
+#: ../../mod/api.php:31 ../../mod/photos.php:135 ../../mod/photos.php:957
#: ../../mod/editpost.php:10 ../../mod/install.php:151
#: ../../mod/notifications.php:66 ../../mod/contacts.php:145
#: ../../mod/settings.php:106 ../../mod/settings.php:537
@@ -52,11 +52,11 @@ msgstr ""
#: ../../mod/message.php:97 ../../mod/allfriends.php:9
#: ../../mod/nogroup.php:25 ../../mod/wall_upload.php:53
#: ../../mod/follow.php:9 ../../mod/display.php:138 ../../mod/profiles.php:7
-#: ../../mod/profiles.php:385 ../../mod/delegate.php:6
+#: ../../mod/profiles.php:400 ../../mod/delegate.php:6
#: ../../mod/suggest.php:28 ../../mod/invite.php:13 ../../mod/invite.php:81
-#: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:507
-#: ../../addon/dav/layout.fnk.php:353 ../../include/items.php:3401
-#: ../../index.php:309
+#: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:510
+#: ../../addon/facebook/facebook.php:516 ../../addon/dav/layout.fnk.php:353
+#: ../../include/items.php:3455 ../../index.php:309
msgid "Permission denied."
msgstr ""
@@ -123,20 +123,22 @@ msgid "New photo from this URL"
msgstr ""
#: ../../mod/crepair.php:166 ../../mod/fsuggest.php:107
-#: ../../mod/events.php:428 ../../mod/photos.php:966 ../../mod/photos.php:1024
-#: ../../mod/photos.php:1270 ../../mod/photos.php:1310
-#: ../../mod/photos.php:1350 ../../mod/photos.php:1381
+#: ../../mod/events.php:436 ../../mod/photos.php:992 ../../mod/photos.php:1063
+#: ../../mod/photos.php:1309 ../../mod/photos.php:1349
+#: ../../mod/photos.php:1389 ../../mod/photos.php:1420
#: ../../mod/install.php:246 ../../mod/install.php:284
-#: ../../mod/localtime.php:45 ../../mod/contacts.php:343
-#: ../../mod/settings.php:555 ../../mod/settings.php:701
-#: ../../mod/settings.php:762 ../../mod/settings.php:969
-#: ../../mod/group.php:85 ../../mod/message.php:216 ../../mod/message.php:410
-#: ../../mod/admin.php:420 ../../mod/admin.php:656 ../../mod/admin.php:792
-#: ../../mod/admin.php:991 ../../mod/admin.php:1078 ../../mod/profiles.php:554
-#: ../../mod/invite.php:119 ../../addon/facebook/facebook.php:609
+#: ../../mod/localtime.php:45 ../../mod/content.php:691
+#: ../../mod/contacts.php:343 ../../mod/settings.php:555
+#: ../../mod/settings.php:709 ../../mod/settings.php:770
+#: ../../mod/settings.php:971 ../../mod/group.php:85 ../../mod/message.php:216
+#: ../../mod/message.php:412 ../../mod/admin.php:420 ../../mod/admin.php:656
+#: ../../mod/admin.php:792 ../../mod/admin.php:991 ../../mod/admin.php:1078
+#: ../../mod/profiles.php:569 ../../mod/invite.php:119
+#: ../../addon/fromgplus/fromgplus.php:40
+#: ../../addon/facebook/facebook.php:619
#: ../../addon/snautofollow/snautofollow.php:64
#: ../../addon/yourls/yourls.php:76 ../../addon/ljpost/ljpost.php:93
-#: ../../addon/nsfw/nsfw.php:57 ../../addon/page/page.php:164
+#: ../../addon/nsfw/nsfw.php:57 ../../addon/page/page.php:210
#: ../../addon/planets/planets.php:158
#: ../../addon/uhremotestorage/uhremotestorage.php:89
#: ../../addon/randplace/randplace.php:177 ../../addon/dwpost/dwpost.php:93
@@ -156,11 +158,11 @@ msgstr ""
#: ../../addon/statusnet/statusnet.php:318
#: ../../addon/statusnet/statusnet.php:325
#: ../../addon/statusnet/statusnet.php:353
-#: ../../addon/statusnet/statusnet.php:561 ../../addon/tumblr/tumblr.php:90
+#: ../../addon/statusnet/statusnet.php:567 ../../addon/tumblr/tumblr.php:90
#: ../../addon/numfriends/numfriends.php:85 ../../addon/gnot/gnot.php:88
#: ../../addon/wppost/wppost.php:110 ../../addon/showmore/showmore.php:48
#: ../../addon/piwik/piwik.php:89 ../../addon/twitter/twitter.php:180
-#: ../../addon/twitter/twitter.php:209 ../../addon/twitter/twitter.php:381
+#: ../../addon/twitter/twitter.php:209 ../../addon/twitter/twitter.php:387
#: ../../addon/irc/irc.php:55 ../../addon/blogger/blogger.php:102
#: ../../addon/posterous/posterous.php:103
#: ../../view/theme/cleanzero/config.php:80
@@ -193,7 +195,7 @@ msgstr ""
msgid "File exceeds size limit of %d"
msgstr ""
-#: ../../mod/wall_attach.php:86 ../../mod/wall_attach.php:97
+#: ../../mod/wall_attach.php:99 ../../mod/wall_attach.php:110
msgid "File upload failed."
msgstr ""
@@ -210,79 +212,88 @@ msgstr ""
msgid "Suggest a friend for %s"
msgstr ""
-#: ../../mod/events.php:65
-msgid "Event description and start time are required."
+#: ../../mod/events.php:66
+msgid "Event title and start time are required."
msgstr ""
-#: ../../mod/events.php:258
+#: ../../mod/events.php:260
msgid "l, F j"
msgstr ""
-#: ../../mod/events.php:280
+#: ../../mod/events.php:282
msgid "Edit event"
msgstr ""
-#: ../../mod/events.php:300 ../../include/text.php:1065
+#: ../../mod/events.php:304 ../../include/text.php:1069
msgid "link to source"
msgstr ""
-#: ../../mod/events.php:324 ../../view/theme/diabook/theme.php:131
-#: ../../include/nav.php:52 ../../boot.php:1546
+#: ../../mod/events.php:328 ../../view/theme/diabook/theme.php:131
+#: ../../include/nav.php:52 ../../boot.php:1577
msgid "Events"
msgstr ""
-#: ../../mod/events.php:325
+#: ../../mod/events.php:329
msgid "Create New Event"
msgstr ""
-#: ../../mod/events.php:326 ../../addon/dav/layout.fnk.php:154
+#: ../../mod/events.php:330 ../../addon/dav/layout.fnk.php:154
msgid "Previous"
msgstr ""
-#: ../../mod/events.php:327 ../../mod/install.php:205
+#: ../../mod/events.php:331 ../../mod/install.php:205
#: ../../addon/dav/layout.fnk.php:157
msgid "Next"
msgstr ""
-#: ../../mod/events.php:399
+#: ../../mod/events.php:404
msgid "hour:minute"
msgstr ""
-#: ../../mod/events.php:408
+#: ../../mod/events.php:414
msgid "Event details"
msgstr ""
-#: ../../mod/events.php:409
+#: ../../mod/events.php:415
#, php-format
-msgid "Format is %s %s. Starting date and Description are required."
+msgid "Format is %s %s. Starting date and Title are required."
msgstr ""
-#: ../../mod/events.php:411
+#: ../../mod/events.php:417
msgid "Event Starts:"
msgstr ""
-#: ../../mod/events.php:414
+#: ../../mod/events.php:417 ../../mod/events.php:431
+msgid "Required"
+msgstr ""
+
+#: ../../mod/events.php:420
msgid "Finish date/time is not known or not relevant"
msgstr ""
-#: ../../mod/events.php:416
+#: ../../mod/events.php:422
msgid "Event Finishes:"
msgstr ""
-#: ../../mod/events.php:419
+#: ../../mod/events.php:425
msgid "Adjust for viewer timezone"
msgstr ""
-#: ../../mod/events.php:421
+#: ../../mod/events.php:427
msgid "Description:"
msgstr ""
-#: ../../mod/events.php:423 ../../include/event.php:37
-#: ../../include/bb2diaspora.php:265 ../../boot.php:1126
+#: ../../mod/events.php:429 ../../mod/directory.php:132
+#: ../../include/event.php:40 ../../include/bb2diaspora.php:377
+#: ../../boot.php:1154
msgid "Location:"
msgstr ""
-#: ../../mod/events.php:425
+#: ../../mod/events.php:431
+msgid "Title:"
+msgstr ""
+
+#: ../../mod/events.php:433
msgid "Share this event"
msgstr ""
@@ -332,258 +343,275 @@ msgid ""
msgstr ""
#: ../../mod/api.php:105 ../../mod/dfrn_request.php:833
-#: ../../mod/settings.php:879 ../../mod/settings.php:885
-#: ../../mod/settings.php:893 ../../mod/settings.php:897
-#: ../../mod/settings.php:902 ../../mod/settings.php:908
-#: ../../mod/settings.php:914 ../../mod/settings.php:920
-#: ../../mod/settings.php:956 ../../mod/settings.php:957
+#: ../../mod/settings.php:887 ../../mod/settings.php:893
+#: ../../mod/settings.php:901 ../../mod/settings.php:905
+#: ../../mod/settings.php:910 ../../mod/settings.php:916
+#: ../../mod/settings.php:922 ../../mod/settings.php:928
#: ../../mod/settings.php:958 ../../mod/settings.php:959
-#: ../../mod/settings.php:960 ../../mod/register.php:234
-#: ../../mod/profiles.php:531
+#: ../../mod/settings.php:960 ../../mod/settings.php:961
+#: ../../mod/settings.php:962 ../../mod/register.php:234
+#: ../../mod/profiles.php:546
msgid "Yes"
msgstr ""
#: ../../mod/api.php:106 ../../mod/dfrn_request.php:834
-#: ../../mod/settings.php:879 ../../mod/settings.php:885
-#: ../../mod/settings.php:893 ../../mod/settings.php:897
-#: ../../mod/settings.php:902 ../../mod/settings.php:908
-#: ../../mod/settings.php:914 ../../mod/settings.php:920
-#: ../../mod/settings.php:956 ../../mod/settings.php:957
+#: ../../mod/settings.php:887 ../../mod/settings.php:893
+#: ../../mod/settings.php:901 ../../mod/settings.php:905
+#: ../../mod/settings.php:910 ../../mod/settings.php:916
+#: ../../mod/settings.php:922 ../../mod/settings.php:928
#: ../../mod/settings.php:958 ../../mod/settings.php:959
-#: ../../mod/settings.php:960 ../../mod/register.php:235
-#: ../../mod/profiles.php:532
+#: ../../mod/settings.php:960 ../../mod/settings.php:961
+#: ../../mod/settings.php:962 ../../mod/register.php:235
+#: ../../mod/profiles.php:547
msgid "No"
msgstr ""
-#: ../../mod/photos.php:44 ../../boot.php:1540
+#: ../../mod/photos.php:46 ../../boot.php:1571
msgid "Photo Albums"
msgstr ""
-#: ../../mod/photos.php:52 ../../mod/photos.php:154 ../../mod/photos.php:945
-#: ../../mod/photos.php:1016 ../../mod/photos.php:1031
-#: ../../mod/photos.php:1459 ../../mod/photos.php:1471
+#: ../../mod/photos.php:54 ../../mod/photos.php:156 ../../mod/photos.php:971
+#: ../../mod/photos.php:1055 ../../mod/photos.php:1070
+#: ../../mod/photos.php:1498 ../../mod/photos.php:1510
#: ../../addon/communityhome/communityhome.php:110
#: ../../view/theme/diabook/theme.php:598
msgid "Contact Photos"
msgstr ""
-#: ../../mod/photos.php:59 ../../mod/photos.php:1041 ../../mod/photos.php:1509
+#: ../../mod/photos.php:61 ../../mod/photos.php:1080 ../../mod/photos.php:1548
msgid "Upload New Photos"
msgstr ""
-#: ../../mod/photos.php:70 ../../mod/settings.php:21
+#: ../../mod/photos.php:72 ../../mod/settings.php:21
msgid "everybody"
msgstr ""
-#: ../../mod/photos.php:143
+#: ../../mod/photos.php:145
msgid "Contact information unavailable"
msgstr ""
-#: ../../mod/photos.php:154 ../../mod/photos.php:658 ../../mod/photos.php:1016
-#: ../../mod/photos.php:1031 ../../mod/profile_photo.php:60
+#: ../../mod/photos.php:156 ../../mod/photos.php:660 ../../mod/photos.php:1055
+#: ../../mod/photos.php:1070 ../../mod/profile_photo.php:60
#: ../../mod/profile_photo.php:67 ../../mod/profile_photo.php:74
#: ../../mod/profile_photo.php:176 ../../mod/profile_photo.php:254
#: ../../mod/profile_photo.php:263
#: ../../addon/communityhome/communityhome.php:111
-#: ../../view/theme/diabook/theme.php:599 ../../include/user.php:298
-#: ../../include/user.php:305 ../../include/user.php:312
+#: ../../view/theme/diabook/theme.php:599 ../../include/user.php:304
+#: ../../include/user.php:311 ../../include/user.php:318
msgid "Profile Photos"
msgstr ""
-#: ../../mod/photos.php:164
+#: ../../mod/photos.php:166
msgid "Album not found."
msgstr ""
-#: ../../mod/photos.php:182 ../../mod/photos.php:1025
+#: ../../mod/photos.php:184 ../../mod/photos.php:1064
msgid "Delete Album"
msgstr ""
-#: ../../mod/photos.php:245 ../../mod/photos.php:1271
+#: ../../mod/photos.php:247 ../../mod/photos.php:1310
msgid "Delete Photo"
msgstr ""
-#: ../../mod/photos.php:589
+#: ../../mod/photos.php:591
msgid "was tagged in a"
msgstr ""
-#: ../../mod/photos.php:589 ../../mod/like.php:185 ../../mod/tagger.php:70
+#: ../../mod/photos.php:591 ../../mod/like.php:144 ../../mod/tagger.php:70
#: ../../addon/communityhome/communityhome.php:163
-#: ../../view/theme/diabook/theme.php:570 ../../include/text.php:1316
-#: ../../include/diaspora.php:1709 ../../include/conversation.php:53
+#: ../../view/theme/diabook/theme.php:570 ../../include/text.php:1321
+#: ../../include/diaspora.php:1710 ../../include/conversation.php:53
#: ../../include/conversation.php:126
msgid "photo"
msgstr ""
-#: ../../mod/photos.php:589
+#: ../../mod/photos.php:591
msgid "by"
msgstr ""
-#: ../../mod/photos.php:694 ../../addon/js_upload/js_upload.php:315
+#: ../../mod/photos.php:696 ../../addon/js_upload/js_upload.php:315
msgid "Image exceeds size limit of "
msgstr ""
-#: ../../mod/photos.php:702
+#: ../../mod/photos.php:704
msgid "Image file is empty."
msgstr ""
-#: ../../mod/photos.php:716 ../../mod/profile_photo.php:126
-#: ../../mod/wall_upload.php:86
+#: ../../mod/photos.php:736 ../../mod/profile_photo.php:126
+#: ../../mod/wall_upload.php:99
msgid "Unable to process image."
msgstr ""
-#: ../../mod/photos.php:737 ../../mod/profile_photo.php:259
-#: ../../mod/wall_upload.php:105
+#: ../../mod/photos.php:763 ../../mod/profile_photo.php:259
+#: ../../mod/wall_upload.php:118
msgid "Image upload failed."
msgstr ""
-#: ../../mod/photos.php:823 ../../mod/community.php:16
+#: ../../mod/photos.php:849 ../../mod/community.php:16
#: ../../mod/dfrn_request.php:759 ../../mod/viewcontacts.php:17
#: ../../mod/display.php:7 ../../mod/search.php:71 ../../mod/directory.php:29
msgid "Public access denied."
msgstr ""
-#: ../../mod/photos.php:833
+#: ../../mod/photos.php:859
msgid "No photos selected"
msgstr ""
-#: ../../mod/photos.php:912
+#: ../../mod/photos.php:938
msgid "Access to this item is restricted."
msgstr ""
-#: ../../mod/photos.php:973
+#: ../../mod/photos.php:1002
+#, php-format
+msgid "You have used %1$.2f Mbytes of %2$.2f Mbytes photo storage."
+msgstr ""
+
+#: ../../mod/photos.php:1005
+#, php-format
+msgid "You have used %1$.2f Mbytes of photo storage."
+msgstr ""
+
+#: ../../mod/photos.php:1011
msgid "Upload Photos"
msgstr ""
-#: ../../mod/photos.php:976 ../../mod/photos.php:1020
+#: ../../mod/photos.php:1015 ../../mod/photos.php:1059
msgid "New album name: "
msgstr ""
-#: ../../mod/photos.php:977
+#: ../../mod/photos.php:1016
msgid "or existing album name: "
msgstr ""
-#: ../../mod/photos.php:978
+#: ../../mod/photos.php:1017
msgid "Do not show a status post for this upload"
msgstr ""
-#: ../../mod/photos.php:980 ../../mod/photos.php:1266
+#: ../../mod/photos.php:1019 ../../mod/photos.php:1305
msgid "Permissions"
msgstr ""
-#: ../../mod/photos.php:1035
+#: ../../mod/photos.php:1074
msgid "Edit Album"
msgstr ""
-#: ../../mod/photos.php:1059 ../../mod/photos.php:1492
+#: ../../mod/photos.php:1098 ../../mod/photos.php:1531
msgid "View Photo"
msgstr ""
-#: ../../mod/photos.php:1094
+#: ../../mod/photos.php:1133
msgid "Permission denied. Access to this item may be restricted."
msgstr ""
-#: ../../mod/photos.php:1096
+#: ../../mod/photos.php:1135
msgid "Photo not available"
msgstr ""
-#: ../../mod/photos.php:1146
+#: ../../mod/photos.php:1185
msgid "View photo"
msgstr ""
-#: ../../mod/photos.php:1146
+#: ../../mod/photos.php:1185
msgid "Edit photo"
msgstr ""
-#: ../../mod/photos.php:1147
+#: ../../mod/photos.php:1186
msgid "Use as profile photo"
msgstr ""
-#: ../../mod/photos.php:1153 ../../include/conversation.php:490
+#: ../../mod/photos.php:1192 ../../mod/content.php:601
+#: ../../include/conversation.php:490
msgid "Private Message"
msgstr ""
-#: ../../mod/photos.php:1175
+#: ../../mod/photos.php:1214
msgid "View Full Size"
msgstr ""
-#: ../../mod/photos.php:1243
+#: ../../mod/photos.php:1282
msgid "Tags: "
msgstr ""
-#: ../../mod/photos.php:1246
+#: ../../mod/photos.php:1285
msgid "[Remove any tag]"
msgstr ""
-#: ../../mod/photos.php:1256
+#: ../../mod/photos.php:1295
msgid "Rotate CW (right)"
msgstr ""
-#: ../../mod/photos.php:1257
+#: ../../mod/photos.php:1296
msgid "Rotate CCW (left)"
msgstr ""
-#: ../../mod/photos.php:1259
+#: ../../mod/photos.php:1298
msgid "New album name"
msgstr ""
-#: ../../mod/photos.php:1262
+#: ../../mod/photos.php:1301
msgid "Caption"
msgstr ""
-#: ../../mod/photos.php:1264
+#: ../../mod/photos.php:1303
msgid "Add a Tag"
msgstr ""
-#: ../../mod/photos.php:1268
+#: ../../mod/photos.php:1307
msgid "Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping"
msgstr ""
-#: ../../mod/photos.php:1288 ../../include/conversation.php:554
+#: ../../mod/photos.php:1327 ../../mod/content.php:665
+#: ../../include/conversation.php:554
msgid "I like this (toggle)"
msgstr ""
-#: ../../mod/photos.php:1289 ../../include/conversation.php:555
+#: ../../mod/photos.php:1328 ../../mod/content.php:666
+#: ../../include/conversation.php:555
msgid "I don't like this (toggle)"
msgstr ""
-#: ../../mod/photos.php:1290 ../../include/conversation.php:989
+#: ../../mod/photos.php:1329 ../../include/conversation.php:993
msgid "Share"
msgstr ""
-#: ../../mod/photos.php:1291 ../../mod/editpost.php:104
+#: ../../mod/photos.php:1330 ../../mod/editpost.php:104
+#: ../../mod/content.php:482 ../../mod/content.php:842
#: ../../mod/wallmessage.php:145 ../../mod/message.php:215
-#: ../../mod/message.php:411 ../../include/conversation.php:371
-#: ../../include/conversation.php:731 ../../include/conversation.php:1008
+#: ../../mod/message.php:413 ../../include/conversation.php:371
+#: ../../include/conversation.php:731 ../../include/conversation.php:1012
msgid "Please wait"
msgstr ""
-#: ../../mod/photos.php:1307 ../../mod/photos.php:1347
-#: ../../mod/photos.php:1378 ../../include/conversation.php:577
+#: ../../mod/photos.php:1346 ../../mod/photos.php:1386
+#: ../../mod/photos.php:1417 ../../mod/content.php:688
+#: ../../include/conversation.php:577
msgid "This is you"
msgstr ""
-#: ../../mod/photos.php:1309 ../../mod/photos.php:1349
-#: ../../mod/photos.php:1380 ../../include/conversation.php:579
-#: ../../boot.php:518
+#: ../../mod/photos.php:1348 ../../mod/photos.php:1388
+#: ../../mod/photos.php:1419 ../../mod/content.php:690
+#: ../../include/conversation.php:579 ../../boot.php:546
msgid "Comment"
msgstr ""
-#: ../../mod/photos.php:1311 ../../mod/editpost.php:125
-#: ../../include/conversation.php:589 ../../include/conversation.php:1026
+#: ../../mod/photos.php:1350 ../../mod/editpost.php:125
+#: ../../mod/content.php:700 ../../include/conversation.php:589
+#: ../../include/conversation.php:1030
msgid "Preview"
msgstr ""
-#: ../../mod/photos.php:1408 ../../mod/settings.php:618
-#: ../../mod/settings.php:699 ../../mod/group.php:168 ../../mod/admin.php:663
+#: ../../mod/photos.php:1447 ../../mod/content.php:439
+#: ../../mod/content.php:720 ../../mod/settings.php:618
+#: ../../mod/settings.php:707 ../../mod/group.php:168 ../../mod/admin.php:663
#: ../../include/conversation.php:328 ../../include/conversation.php:609
msgid "Delete"
msgstr ""
-#: ../../mod/photos.php:1498
+#: ../../mod/photos.php:1537
msgid "View Album"
msgstr ""
-#: ../../mod/photos.php:1507
+#: ../../mod/photos.php:1546
msgid "Recent Photos"
msgstr ""
@@ -640,28 +668,28 @@ msgstr ""
msgid "Edit post"
msgstr ""
-#: ../../mod/editpost.php:80 ../../include/conversation.php:975
+#: ../../mod/editpost.php:80 ../../include/conversation.php:979
msgid "Post to Email"
msgstr ""
-#: ../../mod/editpost.php:95 ../../mod/settings.php:617
-#: ../../include/conversation.php:596
+#: ../../mod/editpost.php:95 ../../mod/content.php:707
+#: ../../mod/settings.php:617 ../../include/conversation.php:596
msgid "Edit"
msgstr ""
#: ../../mod/editpost.php:96 ../../mod/wallmessage.php:143
-#: ../../mod/message.php:213 ../../mod/message.php:408
-#: ../../include/conversation.php:990
+#: ../../mod/message.php:213 ../../mod/message.php:410
+#: ../../include/conversation.php:994
msgid "Upload photo"
msgstr ""
-#: ../../mod/editpost.php:97 ../../include/conversation.php:992
+#: ../../mod/editpost.php:97 ../../include/conversation.php:996
msgid "Attach file"
msgstr ""
#: ../../mod/editpost.php:98 ../../mod/wallmessage.php:144
-#: ../../mod/message.php:214 ../../mod/message.php:409
-#: ../../include/conversation.php:994
+#: ../../mod/message.php:214 ../../mod/message.php:411
+#: ../../include/conversation.php:998
msgid "Insert web link"
msgstr ""
@@ -677,35 +705,35 @@ msgstr ""
msgid "Insert Vorbis [.ogg] audio"
msgstr ""
-#: ../../mod/editpost.php:102 ../../include/conversation.php:1000
+#: ../../mod/editpost.php:102 ../../include/conversation.php:1004
msgid "Set your location"
msgstr ""
-#: ../../mod/editpost.php:103 ../../include/conversation.php:1002
+#: ../../mod/editpost.php:103 ../../include/conversation.php:1006
msgid "Clear browser location"
msgstr ""
-#: ../../mod/editpost.php:105 ../../include/conversation.php:1009
+#: ../../mod/editpost.php:105 ../../include/conversation.php:1013
msgid "Permission settings"
msgstr ""
-#: ../../mod/editpost.php:113 ../../include/conversation.php:1018
+#: ../../mod/editpost.php:113 ../../include/conversation.php:1022
msgid "CC: email addresses"
msgstr ""
-#: ../../mod/editpost.php:114 ../../include/conversation.php:1019
+#: ../../mod/editpost.php:114 ../../include/conversation.php:1023
msgid "Public post"
msgstr ""
-#: ../../mod/editpost.php:117 ../../include/conversation.php:1005
+#: ../../mod/editpost.php:117 ../../include/conversation.php:1009
msgid "Set title"
msgstr ""
-#: ../../mod/editpost.php:119 ../../include/conversation.php:1007
+#: ../../mod/editpost.php:119 ../../include/conversation.php:1011
msgid "Categories (comma-separated list)"
msgstr ""
-#: ../../mod/editpost.php:120 ../../include/conversation.php:1021
+#: ../../mod/editpost.php:120 ../../include/conversation.php:1025
msgid "Example: bob@example.com, mary@example.com"
msgstr ""
@@ -826,7 +854,7 @@ msgstr ""
msgid "Confirm"
msgstr ""
-#: ../../mod/dfrn_request.php:715 ../../include/items.php:2797
+#: ../../mod/dfrn_request.php:715 ../../include/items.php:2881
msgid "[Name Withheld]"
msgstr ""
@@ -1152,7 +1180,7 @@ msgid ""
msgstr ""
#: ../../mod/localtime.php:12 ../../include/event.php:11
-#: ../../include/bb2diaspora.php:243
+#: ../../include/bb2diaspora.php:355
msgid "l F d, Y \\@ g:i A"
msgstr ""
@@ -1198,7 +1226,7 @@ msgid "is interested in:"
msgstr ""
#: ../../mod/match.php:58 ../../mod/suggest.php:59
-#: ../../include/contact_widgets.php:9 ../../boot.php:1070
+#: ../../include/contact_widgets.php:9 ../../boot.php:1098
msgid "Connect"
msgstr ""
@@ -1214,6 +1242,138 @@ msgstr ""
msgid "Visible to:"
msgstr ""
+#: ../../mod/content.php:119 ../../mod/network.php:436
+msgid "No such group"
+msgstr ""
+
+#: ../../mod/content.php:130 ../../mod/network.php:447
+msgid "Group is empty"
+msgstr ""
+
+#: ../../mod/content.php:134 ../../mod/network.php:451
+msgid "Group: "
+msgstr ""
+
+#: ../../mod/content.php:438 ../../mod/content.php:719
+#: ../../include/conversation.php:327 ../../include/conversation.php:608
+msgid "Select"
+msgstr ""
+
+#: ../../mod/content.php:455 ../../mod/content.php:812
+#: ../../mod/content.php:813 ../../include/conversation.php:344
+#: ../../include/conversation.php:701 ../../include/conversation.php:702
+#, php-format
+msgid "View %s's profile @ %s"
+msgstr ""
+
+#: ../../mod/content.php:465 ../../mod/content.php:824
+#: ../../include/conversation.php:354 ../../include/conversation.php:713
+#, php-format
+msgid "%s from %s"
+msgstr ""
+
+#: ../../mod/content.php:480 ../../include/conversation.php:369
+msgid "View in context"
+msgstr ""
+
+#: ../../mod/content.php:586 ../../include/conversation.php:475
+#, php-format
+msgid "%d comment"
+msgid_plural "%d comments"
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../../mod/content.php:587 ../../addon/page/page.php:76
+#: ../../addon/page/page.php:110 ../../addon/showmore/showmore.php:87
+#: ../../include/contact_widgets.php:188 ../../include/conversation.php:476
+#: ../../boot.php:547
+msgid "show more"
+msgstr ""
+
+#: ../../mod/content.php:665 ../../include/conversation.php:554
+msgid "like"
+msgstr ""
+
+#: ../../mod/content.php:666 ../../include/conversation.php:555
+msgid "dislike"
+msgstr ""
+
+#: ../../mod/content.php:668 ../../include/conversation.php:557
+msgid "Share this"
+msgstr ""
+
+#: ../../mod/content.php:668 ../../include/conversation.php:557
+msgid "share"
+msgstr ""
+
+#: ../../mod/content.php:692 ../../include/conversation.php:581
+msgid "Bold"
+msgstr ""
+
+#: ../../mod/content.php:693 ../../include/conversation.php:582
+msgid "Italic"
+msgstr ""
+
+#: ../../mod/content.php:694 ../../include/conversation.php:583
+msgid "Underline"
+msgstr ""
+
+#: ../../mod/content.php:695 ../../include/conversation.php:584
+msgid "Quote"
+msgstr ""
+
+#: ../../mod/content.php:696 ../../include/conversation.php:585
+msgid "Code"
+msgstr ""
+
+#: ../../mod/content.php:697 ../../include/conversation.php:586
+msgid "Image"
+msgstr ""
+
+#: ../../mod/content.php:698 ../../include/conversation.php:587
+msgid "Link"
+msgstr ""
+
+#: ../../mod/content.php:699 ../../include/conversation.php:588
+msgid "Video"
+msgstr ""
+
+#: ../../mod/content.php:732 ../../include/conversation.php:621
+msgid "add star"
+msgstr ""
+
+#: ../../mod/content.php:733 ../../include/conversation.php:622
+msgid "remove star"
+msgstr ""
+
+#: ../../mod/content.php:734 ../../include/conversation.php:623
+msgid "toggle star status"
+msgstr ""
+
+#: ../../mod/content.php:737 ../../include/conversation.php:626
+msgid "starred"
+msgstr ""
+
+#: ../../mod/content.php:738 ../../include/conversation.php:627
+msgid "add tag"
+msgstr ""
+
+#: ../../mod/content.php:742 ../../include/conversation.php:631
+msgid "save to folder"
+msgstr ""
+
+#: ../../mod/content.php:814 ../../include/conversation.php:703
+msgid "to"
+msgstr ""
+
+#: ../../mod/content.php:815 ../../include/conversation.php:704
+msgid "Wall-to-Wall"
+msgstr ""
+
+#: ../../mod/content.php:816 ../../include/conversation.php:705
+msgid "via Wall-To-Wall:"
+msgstr ""
+
#: ../../mod/home.php:26 ../../addon/communityhome/communityhome.php:179
#, php-format
msgid "Welcome to %s"
@@ -1725,11 +1885,11 @@ msgstr ""
#: ../../mod/lostpass.php:45 ../../mod/lostpass.php:107
#: ../../mod/register.php:90 ../../mod/register.php:144
#: ../../mod/regmod.php:54 ../../mod/dfrn_confirm.php:752
-#: ../../addon/facebook/facebook.php:692
-#: ../../addon/facebook/facebook.php:1182
+#: ../../addon/facebook/facebook.php:702
+#: ../../addon/facebook/facebook.php:1192
#: ../../addon/public_server/public_server.php:62
-#: ../../addon/testdrive/testdrive.php:67 ../../include/items.php:2806
-#: ../../boot.php:720
+#: ../../addon/testdrive/testdrive.php:67 ../../include/items.php:2890
+#: ../../boot.php:748
msgid "Administrator"
msgstr ""
@@ -1739,7 +1899,7 @@ msgid ""
"Password reset failed."
msgstr ""
-#: ../../mod/lostpass.php:83 ../../boot.php:852
+#: ../../mod/lostpass.php:83 ../../boot.php:880
msgid "Password Reset"
msgstr ""
@@ -1874,11 +2034,11 @@ msgstr ""
msgid "Private forum has no privacy permissions and no default privacy group."
msgstr ""
-#: ../../mod/settings.php:484 ../../addon/facebook/facebook.php:492
+#: ../../mod/settings.php:484 ../../addon/facebook/facebook.php:495
#: ../../addon/impressum/impressum.php:77
#: ../../addon/openstreetmap/openstreetmap.php:80
#: ../../addon/mathjax/mathjax.php:66 ../../addon/piwik/piwik.php:105
-#: ../../addon/twitter/twitter.php:376
+#: ../../addon/twitter/twitter.php:382
msgid "Settings updated."
msgstr ""
@@ -1888,12 +2048,12 @@ msgid "Add application"
msgstr ""
#: ../../mod/settings.php:558 ../../mod/settings.php:584
-#: ../../addon/statusnet/statusnet.php:555
+#: ../../addon/statusnet/statusnet.php:561
msgid "Consumer Key"
msgstr ""
#: ../../mod/settings.php:559 ../../mod/settings.php:585
-#: ../../addon/statusnet/statusnet.php:554
+#: ../../addon/statusnet/statusnet.php:560
msgid "Consumer Secret"
msgstr ""
@@ -1950,357 +2110,357 @@ msgstr ""
msgid "StatusNet"
msgstr ""
-#: ../../mod/settings.php:683
+#: ../../mod/settings.php:685
+msgid "Email access is disabled on this site."
+msgstr ""
+
+#: ../../mod/settings.php:691
msgid "Connector Settings"
msgstr ""
-#: ../../mod/settings.php:688
+#: ../../mod/settings.php:696
msgid "Email/Mailbox Setup"
msgstr ""
-#: ../../mod/settings.php:689
+#: ../../mod/settings.php:697
msgid ""
"If you wish to communicate with email contacts using this service "
"(optional), please specify how to connect to your mailbox."
msgstr ""
-#: ../../mod/settings.php:690
+#: ../../mod/settings.php:698
msgid "Last successful email check:"
msgstr ""
-#: ../../mod/settings.php:691
-msgid "Email access is disabled on this site."
-msgstr ""
-
-#: ../../mod/settings.php:692
+#: ../../mod/settings.php:700
msgid "IMAP server name:"
msgstr ""
-#: ../../mod/settings.php:693
+#: ../../mod/settings.php:701
msgid "IMAP port:"
msgstr ""
-#: ../../mod/settings.php:694
+#: ../../mod/settings.php:702
msgid "Security:"
msgstr ""
-#: ../../mod/settings.php:694 ../../mod/settings.php:699
+#: ../../mod/settings.php:702 ../../mod/settings.php:707
msgid "None"
msgstr ""
-#: ../../mod/settings.php:695
+#: ../../mod/settings.php:703
msgid "Email login name:"
msgstr ""
-#: ../../mod/settings.php:696
+#: ../../mod/settings.php:704
msgid "Email password:"
msgstr ""
-#: ../../mod/settings.php:697
+#: ../../mod/settings.php:705
msgid "Reply-to address:"
msgstr ""
-#: ../../mod/settings.php:698
+#: ../../mod/settings.php:706
msgid "Send public posts to all email contacts:"
msgstr ""
-#: ../../mod/settings.php:699
+#: ../../mod/settings.php:707
msgid "Action after import:"
msgstr ""
-#: ../../mod/settings.php:699
+#: ../../mod/settings.php:707
msgid "Mark as seen"
msgstr ""
-#: ../../mod/settings.php:699
+#: ../../mod/settings.php:707
msgid "Move to folder"
msgstr ""
-#: ../../mod/settings.php:700
+#: ../../mod/settings.php:708
msgid "Move to folder:"
msgstr ""
-#: ../../mod/settings.php:760
+#: ../../mod/settings.php:768
msgid "Display Settings"
msgstr ""
-#: ../../mod/settings.php:766
+#: ../../mod/settings.php:774
msgid "Display Theme:"
msgstr ""
-#: ../../mod/settings.php:767
+#: ../../mod/settings.php:775
msgid "Update browser every xx seconds"
msgstr ""
-#: ../../mod/settings.php:767
+#: ../../mod/settings.php:775
msgid "Minimum of 10 seconds, no maximum"
msgstr ""
-#: ../../mod/settings.php:768
+#: ../../mod/settings.php:776
msgid "Number of items to display on the network page:"
msgstr ""
-#: ../../mod/settings.php:768
+#: ../../mod/settings.php:776
msgid "Maximum of 100 items"
msgstr ""
-#: ../../mod/settings.php:769
+#: ../../mod/settings.php:777
msgid "Don't show emoticons"
msgstr ""
-#: ../../mod/settings.php:840
+#: ../../mod/settings.php:848
msgid "Normal Account Page"
msgstr ""
-#: ../../mod/settings.php:841
+#: ../../mod/settings.php:849
msgid "This account is a normal personal profile"
msgstr ""
-#: ../../mod/settings.php:844
+#: ../../mod/settings.php:852
msgid "Soapbox Page"
msgstr ""
-#: ../../mod/settings.php:845
+#: ../../mod/settings.php:853
msgid "Automatically approve all connection/friend requests as read-only fans"
msgstr ""
-#: ../../mod/settings.php:848
+#: ../../mod/settings.php:856
msgid "Community Forum/Celebrity Account"
msgstr ""
-#: ../../mod/settings.php:849
+#: ../../mod/settings.php:857
msgid "Automatically approve all connection/friend requests as read-write fans"
msgstr ""
-#: ../../mod/settings.php:852
+#: ../../mod/settings.php:860
msgid "Automatic Friend Page"
msgstr ""
-#: ../../mod/settings.php:853
+#: ../../mod/settings.php:861
msgid "Automatically approve all connection/friend requests as friends"
msgstr ""
-#: ../../mod/settings.php:856
+#: ../../mod/settings.php:864
msgid "Private Forum [Experimental]"
msgstr ""
-#: ../../mod/settings.php:857
+#: ../../mod/settings.php:865
msgid "Private forum - approved members only"
msgstr ""
-#: ../../mod/settings.php:869
+#: ../../mod/settings.php:877
msgid "OpenID:"
msgstr ""
-#: ../../mod/settings.php:869
+#: ../../mod/settings.php:877
msgid "(Optional) Allow this OpenID to login to this account."
msgstr ""
-#: ../../mod/settings.php:879
+#: ../../mod/settings.php:887
msgid "Publish your default profile in your local site directory?"
msgstr ""
-#: ../../mod/settings.php:885
+#: ../../mod/settings.php:893
msgid "Publish your default profile in the global social directory?"
msgstr ""
-#: ../../mod/settings.php:893
+#: ../../mod/settings.php:901
msgid "Hide your contact/friend list from viewers of your default profile?"
msgstr ""
-#: ../../mod/settings.php:897
+#: ../../mod/settings.php:905
msgid "Hide your profile details from unknown viewers?"
msgstr ""
-#: ../../mod/settings.php:902
+#: ../../mod/settings.php:910
msgid "Allow friends to post to your profile page?"
msgstr ""
-#: ../../mod/settings.php:908
+#: ../../mod/settings.php:916
msgid "Allow friends to tag your posts?"
msgstr ""
-#: ../../mod/settings.php:914
+#: ../../mod/settings.php:922
msgid "Allow us to suggest you as a potential friend to new members?"
msgstr ""
-#: ../../mod/settings.php:920
+#: ../../mod/settings.php:928
msgid "Permit unknown people to send you private mail?"
msgstr ""
-#: ../../mod/settings.php:931
+#: ../../mod/settings.php:936
msgid "Profile is <strong>not published</strong>."
msgstr ""
-#: ../../mod/settings.php:937 ../../mod/profile_photo.php:213
+#: ../../mod/settings.php:939 ../../mod/profile_photo.php:213
msgid "or"
msgstr ""
-#: ../../mod/settings.php:942
+#: ../../mod/settings.php:944
msgid "Your Identity Address is"
msgstr ""
-#: ../../mod/settings.php:953
+#: ../../mod/settings.php:955
msgid "Automatically expire posts after this many days:"
msgstr ""
-#: ../../mod/settings.php:953
+#: ../../mod/settings.php:955
msgid "If empty, posts will not expire. Expired posts will be deleted"
msgstr ""
-#: ../../mod/settings.php:954
+#: ../../mod/settings.php:956
msgid "Advanced expiration settings"
msgstr ""
-#: ../../mod/settings.php:955
+#: ../../mod/settings.php:957
msgid "Advanced Expiration"
msgstr ""
-#: ../../mod/settings.php:956
+#: ../../mod/settings.php:958
msgid "Expire posts:"
msgstr ""
-#: ../../mod/settings.php:957
+#: ../../mod/settings.php:959
msgid "Expire personal notes:"
msgstr ""
-#: ../../mod/settings.php:958
+#: ../../mod/settings.php:960
msgid "Expire starred posts:"
msgstr ""
-#: ../../mod/settings.php:959
+#: ../../mod/settings.php:961
msgid "Expire photos:"
msgstr ""
-#: ../../mod/settings.php:960
+#: ../../mod/settings.php:962
msgid "Only expire posts by others:"
msgstr ""
-#: ../../mod/settings.php:967
+#: ../../mod/settings.php:969
msgid "Account Settings"
msgstr ""
-#: ../../mod/settings.php:975
+#: ../../mod/settings.php:977
msgid "Password Settings"
msgstr ""
-#: ../../mod/settings.php:976
+#: ../../mod/settings.php:978
msgid "New Password:"
msgstr ""
-#: ../../mod/settings.php:977
+#: ../../mod/settings.php:979
msgid "Confirm:"
msgstr ""
-#: ../../mod/settings.php:977
+#: ../../mod/settings.php:979
msgid "Leave password fields blank unless changing"
msgstr ""
-#: ../../mod/settings.php:981
+#: ../../mod/settings.php:983
msgid "Basic Settings"
msgstr ""
-#: ../../mod/settings.php:982 ../../include/profile_advanced.php:15
+#: ../../mod/settings.php:984 ../../include/profile_advanced.php:15
msgid "Full Name:"
msgstr ""
-#: ../../mod/settings.php:983
+#: ../../mod/settings.php:985
msgid "Email Address:"
msgstr ""
-#: ../../mod/settings.php:984
+#: ../../mod/settings.php:986
msgid "Your Timezone:"
msgstr ""
-#: ../../mod/settings.php:985
+#: ../../mod/settings.php:987
msgid "Default Post Location:"
msgstr ""
-#: ../../mod/settings.php:986
+#: ../../mod/settings.php:988
msgid "Use Browser Location:"
msgstr ""
-#: ../../mod/settings.php:989
+#: ../../mod/settings.php:991
msgid "Security and Privacy Settings"
msgstr ""
-#: ../../mod/settings.php:991
+#: ../../mod/settings.php:993
msgid "Maximum Friend Requests/Day:"
msgstr ""
-#: ../../mod/settings.php:991 ../../mod/settings.php:1010
+#: ../../mod/settings.php:993 ../../mod/settings.php:1012
msgid "(to prevent spam abuse)"
msgstr ""
-#: ../../mod/settings.php:992
+#: ../../mod/settings.php:994
msgid "Default Post Permissions"
msgstr ""
-#: ../../mod/settings.php:993
+#: ../../mod/settings.php:995
msgid "(click to open/close)"
msgstr ""
-#: ../../mod/settings.php:1010
+#: ../../mod/settings.php:1012
msgid "Maximum private messages per day from unknown people:"
msgstr ""
-#: ../../mod/settings.php:1013
+#: ../../mod/settings.php:1015
msgid "Notification Settings"
msgstr ""
-#: ../../mod/settings.php:1014
+#: ../../mod/settings.php:1016
msgid "By default post a status message when:"
msgstr ""
-#: ../../mod/settings.php:1015
+#: ../../mod/settings.php:1017
msgid "accepting a friend request"
msgstr ""
-#: ../../mod/settings.php:1016
+#: ../../mod/settings.php:1018
msgid "joining a forum/community"
msgstr ""
-#: ../../mod/settings.php:1017
+#: ../../mod/settings.php:1019
msgid "making an <em>interesting</em> profile change"
msgstr ""
-#: ../../mod/settings.php:1018
+#: ../../mod/settings.php:1020
msgid "Send a notification email when:"
msgstr ""
-#: ../../mod/settings.php:1019
+#: ../../mod/settings.php:1021
msgid "You receive an introduction"
msgstr ""
-#: ../../mod/settings.php:1020
+#: ../../mod/settings.php:1022
msgid "Your introductions are confirmed"
msgstr ""
-#: ../../mod/settings.php:1021
+#: ../../mod/settings.php:1023
msgid "Someone writes on your profile wall"
msgstr ""
-#: ../../mod/settings.php:1022
+#: ../../mod/settings.php:1024
msgid "Someone writes a followup comment"
msgstr ""
-#: ../../mod/settings.php:1023
+#: ../../mod/settings.php:1025
msgid "You receive a private message"
msgstr ""
-#: ../../mod/settings.php:1024
+#: ../../mod/settings.php:1026
msgid "You receive a friend suggestion"
msgstr ""
-#: ../../mod/settings.php:1025
+#: ../../mod/settings.php:1027
msgid "You are tagged in a post"
msgstr ""
-#: ../../mod/settings.php:1028
+#: ../../mod/settings.php:1030
msgid "Advanced Account/Page Type Settings"
msgstr ""
-#: ../../mod/settings.php:1029
+#: ../../mod/settings.php:1031
msgid "Change the behaviour of this account for special situations"
msgstr ""
@@ -2390,18 +2550,6 @@ msgstr[1] ""
msgid "Private messages to this group are at risk of public disclosure."
msgstr ""
-#: ../../mod/network.php:436
-msgid "No such group"
-msgstr ""
-
-#: ../../mod/network.php:447
-msgid "Group is empty"
-msgstr ""
-
-#: ../../mod/network.php:451
-msgid "Group: "
-msgstr ""
-
#: ../../mod/network.php:461
msgid "Contact: "
msgstr ""
@@ -2414,13 +2562,13 @@ msgstr ""
msgid "Invalid contact."
msgstr ""
-#: ../../mod/notes.php:44 ../../boot.php:1552
+#: ../../mod/notes.php:44 ../../boot.php:1583
msgid "Personal Notes"
msgstr ""
#: ../../mod/notes.php:63 ../../mod/filer.php:30
-#: ../../addon/facebook/facebook.php:760
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:185
+#: ../../addon/facebook/facebook.php:770
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:187
#: ../../addon/dav/layout.fnk.php:384 ../../include/text.php:652
msgid "Save"
msgstr ""
@@ -2455,7 +2603,7 @@ msgid "No recipient."
msgstr ""
#: ../../mod/wallmessage.php:124 ../../mod/message.php:172
-#: ../../include/conversation.php:943
+#: ../../include/conversation.php:947
msgid "Please enter a link URL:"
msgstr ""
@@ -2471,17 +2619,17 @@ msgid ""
msgstr ""
#: ../../mod/wallmessage.php:133 ../../mod/message.php:201
-#: ../../mod/message.php:399
+#: ../../mod/message.php:401
msgid "To:"
msgstr ""
#: ../../mod/wallmessage.php:134 ../../mod/message.php:206
-#: ../../mod/message.php:401
+#: ../../mod/message.php:403
msgid "Subject:"
msgstr ""
#: ../../mod/wallmessage.php:140 ../../mod/message.php:210
-#: ../../mod/message.php:404 ../../mod/invite.php:113
+#: ../../mod/message.php:406 ../../mod/invite.php:113
msgid "Your message:"
msgstr ""
@@ -2664,8 +2812,8 @@ msgid "Profile Visibility Editor"
msgstr ""
#: ../../mod/profperm.php:103 ../../view/theme/diabook/theme.php:128
-#: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:79
-#: ../../include/nav.php:50 ../../boot.php:1531
+#: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:84
+#: ../../include/nav.php:50 ../../boot.php:1562
msgid "Profile"
msgstr ""
@@ -2769,7 +2917,7 @@ msgstr ""
msgid "Choose a nickname: "
msgstr ""
-#: ../../mod/register.php:269 ../../include/nav.php:81 ../../boot.php:818
+#: ../../mod/register.php:269 ../../include/nav.php:81 ../../boot.php:846
msgid "Register"
msgstr ""
@@ -2777,33 +2925,33 @@ msgstr ""
msgid "People Search"
msgstr ""
-#: ../../mod/like.php:185 ../../mod/like.php:259 ../../mod/tagger.php:70
-#: ../../addon/facebook/facebook.php:1576
+#: ../../mod/like.php:144 ../../mod/like.php:301 ../../mod/tagger.php:70
+#: ../../addon/facebook/facebook.php:1586
#: ../../addon/communityhome/communityhome.php:158
#: ../../addon/communityhome/communityhome.php:167
#: ../../view/theme/diabook/theme.php:565
-#: ../../view/theme/diabook/theme.php:574 ../../include/diaspora.php:1709
+#: ../../view/theme/diabook/theme.php:574 ../../include/diaspora.php:1710
#: ../../include/conversation.php:48 ../../include/conversation.php:57
#: ../../include/conversation.php:121 ../../include/conversation.php:130
msgid "status"
msgstr ""
-#: ../../mod/like.php:202 ../../addon/facebook/facebook.php:1580
+#: ../../mod/like.php:161 ../../addon/facebook/facebook.php:1590
#: ../../addon/communityhome/communityhome.php:172
-#: ../../view/theme/diabook/theme.php:579 ../../include/diaspora.php:1725
+#: ../../view/theme/diabook/theme.php:579 ../../include/diaspora.php:1726
#: ../../include/conversation.php:65
#, php-format
msgid "%1$s likes %2$s's %3$s"
msgstr ""
-#: ../../mod/like.php:204 ../../include/conversation.php:68
+#: ../../mod/like.php:163 ../../include/conversation.php:68
#, php-format
msgid "%1$s doesn't like %2$s's %3$s"
msgstr ""
#: ../../mod/notice.php:15 ../../mod/viewsrc.php:15 ../../mod/admin.php:159
#: ../../mod/admin.php:700 ../../mod/admin.php:899 ../../mod/display.php:37
-#: ../../mod/display.php:142 ../../include/items.php:3248
+#: ../../mod/display.php:142 ../../include/items.php:3334
msgid "Item not found."
msgstr ""
@@ -2812,7 +2960,7 @@ msgid "Access denied."
msgstr ""
#: ../../mod/fbrowser.php:25 ../../view/theme/diabook/theme.php:130
-#: ../../include/nav.php:51 ../../boot.php:1537
+#: ../../include/nav.php:51 ../../boot.php:1568
msgid "Photos"
msgstr ""
@@ -2841,34 +2989,34 @@ msgstr ""
msgid "Empty post discarded."
msgstr ""
-#: ../../mod/item.php:379 ../../mod/wall_upload.php:102
-#: ../../mod/wall_upload.php:111 ../../mod/wall_upload.php:118
+#: ../../mod/item.php:379 ../../mod/wall_upload.php:115
+#: ../../mod/wall_upload.php:124 ../../mod/wall_upload.php:131
#: ../../include/message.php:144
msgid "Wall Photos"
msgstr ""
-#: ../../mod/item.php:800
+#: ../../mod/item.php:784
msgid "System error. Post not saved."
msgstr ""
-#: ../../mod/item.php:825
+#: ../../mod/item.php:809
#, php-format
msgid ""
"This message was sent to you by %s, a member of the Friendica social network."
msgstr ""
-#: ../../mod/item.php:827
+#: ../../mod/item.php:811
#, php-format
msgid "You may visit them online at %s"
msgstr ""
-#: ../../mod/item.php:828
+#: ../../mod/item.php:812
msgid ""
"Please contact the sender by replying to this post if you do not wish to "
"receive these messages."
msgstr ""
-#: ../../mod/item.php:830
+#: ../../mod/item.php:814
#, php-format
msgid "%s posted an update."
msgstr ""
@@ -2968,55 +3116,55 @@ msgstr ""
msgid "Conversation removed."
msgstr ""
-#: ../../mod/message.php:247
+#: ../../mod/message.php:249
msgid "No messages."
msgstr ""
-#: ../../mod/message.php:254
+#: ../../mod/message.php:256
#, php-format
msgid "Unknown sender - %s"
msgstr ""
-#: ../../mod/message.php:257
+#: ../../mod/message.php:259
#, php-format
msgid "You and %s"
msgstr ""
-#: ../../mod/message.php:260
+#: ../../mod/message.php:262
#, php-format
msgid "%s and You"
msgstr ""
-#: ../../mod/message.php:270 ../../mod/message.php:392
+#: ../../mod/message.php:272 ../../mod/message.php:394
msgid "Delete conversation"
msgstr ""
-#: ../../mod/message.php:273
+#: ../../mod/message.php:275
msgid "D, d M Y - g:i A"
msgstr ""
-#: ../../mod/message.php:275
+#: ../../mod/message.php:277
#, php-format
msgid "%d message"
msgid_plural "%d messages"
msgstr[0] ""
msgstr[1] ""
-#: ../../mod/message.php:310
+#: ../../mod/message.php:312
msgid "Message not available."
msgstr ""
-#: ../../mod/message.php:375
+#: ../../mod/message.php:377
msgid "Delete message"
msgstr ""
-#: ../../mod/message.php:394
+#: ../../mod/message.php:396
msgid ""
"No secure communications available. You <strong>may</strong> be able to "
"respond from the sender's profile page."
msgstr ""
-#: ../../mod/message.php:398
+#: ../../mod/message.php:400
msgid "Send Reply"
msgstr ""
@@ -3155,7 +3303,7 @@ msgstr ""
msgid "Advanced"
msgstr ""
-#: ../../mod/admin.php:428 ../../addon/statusnet/statusnet.php:552
+#: ../../mod/admin.php:428 ../../addon/statusnet/statusnet.php:558
msgid "Site name"
msgstr ""
@@ -3615,7 +3763,7 @@ msgstr ""
msgid "FTP Password"
msgstr ""
-#: ../../mod/profile.php:21 ../../boot.php:983
+#: ../../mod/profile.php:21 ../../boot.php:1011
msgid "Requested profile is not available."
msgstr ""
@@ -3702,6 +3850,10 @@ msgstr ""
msgid "No contacts in common."
msgstr ""
+#: ../../mod/share.php:28 ../../include/bb2diaspora.php:200
+msgid "link"
+msgstr ""
+
#: ../../mod/display.php:135
msgid "Item has been removed."
msgstr ""
@@ -3719,8 +3871,8 @@ msgstr ""
msgid "Search"
msgstr ""
-#: ../../mod/profiles.php:21 ../../mod/profiles.php:395
-#: ../../mod/profiles.php:509 ../../mod/dfrn_confirm.php:62
+#: ../../mod/profiles.php:21 ../../mod/profiles.php:410
+#: ../../mod/profiles.php:524 ../../mod/dfrn_confirm.php:62
msgid "Profile not found."
msgstr ""
@@ -3728,289 +3880,305 @@ msgstr ""
msgid "Profile Name is required."
msgstr ""
-#: ../../mod/profiles.php:152
+#: ../../mod/profiles.php:155
msgid "Marital Status"
msgstr ""
-#: ../../mod/profiles.php:156
+#: ../../mod/profiles.php:159
msgid "Romantic Partner"
msgstr ""
-#: ../../mod/profiles.php:160
+#: ../../mod/profiles.php:163
+msgid "Likes"
+msgstr ""
+
+#: ../../mod/profiles.php:167
+msgid "Dislikes"
+msgstr ""
+
+#: ../../mod/profiles.php:171
msgid "Work/Employment"
msgstr ""
-#: ../../mod/profiles.php:163
+#: ../../mod/profiles.php:174
msgid "Religion"
msgstr ""
-#: ../../mod/profiles.php:167
+#: ../../mod/profiles.php:178
msgid "Political Views"
msgstr ""
-#: ../../mod/profiles.php:171
+#: ../../mod/profiles.php:182
msgid "Gender"
msgstr ""
-#: ../../mod/profiles.php:175
+#: ../../mod/profiles.php:186
msgid "Sexual Preference"
msgstr ""
-#: ../../mod/profiles.php:179
+#: ../../mod/profiles.php:190
msgid "Homepage"
msgstr ""
-#: ../../mod/profiles.php:183
+#: ../../mod/profiles.php:194
msgid "Interests"
msgstr ""
-#: ../../mod/profiles.php:187
+#: ../../mod/profiles.php:198
msgid "Address"
msgstr ""
-#: ../../mod/profiles.php:194 ../../addon/dav/layout.fnk.php:310
+#: ../../mod/profiles.php:205 ../../addon/dav/layout.fnk.php:310
msgid "Location"
msgstr ""
-#: ../../mod/profiles.php:273
+#: ../../mod/profiles.php:288
msgid "Profile updated."
msgstr ""
-#: ../../mod/profiles.php:340
+#: ../../mod/profiles.php:355
msgid " and "
msgstr ""
-#: ../../mod/profiles.php:348
+#: ../../mod/profiles.php:363
msgid "public profile"
msgstr ""
-#: ../../mod/profiles.php:351
+#: ../../mod/profiles.php:366
#, php-format
msgid "%1$s changed %2$s to &ldquo;%3$s&rdquo;"
msgstr ""
-#: ../../mod/profiles.php:352
+#: ../../mod/profiles.php:367
#, php-format
msgid " - Visit %1$s's %2$s"
msgstr ""
-#: ../../mod/profiles.php:355
+#: ../../mod/profiles.php:370
#, php-format
msgid "%1$s has an updated %2$s, changing %3$s."
msgstr ""
-#: ../../mod/profiles.php:414
+#: ../../mod/profiles.php:429
msgid "Profile deleted."
msgstr ""
-#: ../../mod/profiles.php:432 ../../mod/profiles.php:466
+#: ../../mod/profiles.php:447 ../../mod/profiles.php:481
msgid "Profile-"
msgstr ""
-#: ../../mod/profiles.php:451 ../../mod/profiles.php:493
+#: ../../mod/profiles.php:466 ../../mod/profiles.php:508
msgid "New profile created."
msgstr ""
-#: ../../mod/profiles.php:472
+#: ../../mod/profiles.php:487
msgid "Profile unavailable to clone."
msgstr ""
-#: ../../mod/profiles.php:530
+#: ../../mod/profiles.php:545
msgid "Hide your contact/friend list from viewers of this profile?"
msgstr ""
-#: ../../mod/profiles.php:553
+#: ../../mod/profiles.php:568
msgid "Edit Profile Details"
msgstr ""
-#: ../../mod/profiles.php:555
+#: ../../mod/profiles.php:570
msgid "View this profile"
msgstr ""
-#: ../../mod/profiles.php:556
+#: ../../mod/profiles.php:571
msgid "Create a new profile using these settings"
msgstr ""
-#: ../../mod/profiles.php:557
+#: ../../mod/profiles.php:572
msgid "Clone this profile"
msgstr ""
-#: ../../mod/profiles.php:558
+#: ../../mod/profiles.php:573
msgid "Delete this profile"
msgstr ""
-#: ../../mod/profiles.php:559
+#: ../../mod/profiles.php:574
msgid "Profile Name:"
msgstr ""
-#: ../../mod/profiles.php:560
+#: ../../mod/profiles.php:575
msgid "Your Full Name:"
msgstr ""
-#: ../../mod/profiles.php:561
+#: ../../mod/profiles.php:576
msgid "Title/Description:"
msgstr ""
-#: ../../mod/profiles.php:562
+#: ../../mod/profiles.php:577
msgid "Your Gender:"
msgstr ""
-#: ../../mod/profiles.php:563
+#: ../../mod/profiles.php:578
#, php-format
msgid "Birthday (%s):"
msgstr ""
-#: ../../mod/profiles.php:564
+#: ../../mod/profiles.php:579
msgid "Street Address:"
msgstr ""
-#: ../../mod/profiles.php:565
+#: ../../mod/profiles.php:580
msgid "Locality/City:"
msgstr ""
-#: ../../mod/profiles.php:566
+#: ../../mod/profiles.php:581
msgid "Postal/Zip Code:"
msgstr ""
-#: ../../mod/profiles.php:567
+#: ../../mod/profiles.php:582
msgid "Country:"
msgstr ""
-#: ../../mod/profiles.php:568
+#: ../../mod/profiles.php:583
msgid "Region/State:"
msgstr ""
-#: ../../mod/profiles.php:569
+#: ../../mod/profiles.php:584
msgid "<span class=\"heart\">&hearts;</span> Marital Status:"
msgstr ""
-#: ../../mod/profiles.php:570
+#: ../../mod/profiles.php:585
msgid "Who: (if applicable)"
msgstr ""
-#: ../../mod/profiles.php:571
+#: ../../mod/profiles.php:586
msgid "Examples: cathy123, Cathy Williams, cathy@example.com"
msgstr ""
-#: ../../mod/profiles.php:572
+#: ../../mod/profiles.php:587
msgid "Since [date]:"
msgstr ""
-#: ../../mod/profiles.php:573 ../../include/profile_advanced.php:46
+#: ../../mod/profiles.php:588 ../../include/profile_advanced.php:46
msgid "Sexual Preference:"
msgstr ""
-#: ../../mod/profiles.php:574
+#: ../../mod/profiles.php:589
msgid "Homepage URL:"
msgstr ""
-#: ../../mod/profiles.php:575 ../../include/profile_advanced.php:50
+#: ../../mod/profiles.php:590 ../../include/profile_advanced.php:50
msgid "Hometown:"
msgstr ""
-#: ../../mod/profiles.php:576 ../../include/profile_advanced.php:54
+#: ../../mod/profiles.php:591 ../../include/profile_advanced.php:54
msgid "Political Views:"
msgstr ""
-#: ../../mod/profiles.php:577
+#: ../../mod/profiles.php:592
msgid "Religious Views:"
msgstr ""
-#: ../../mod/profiles.php:578
+#: ../../mod/profiles.php:593
msgid "Public Keywords:"
msgstr ""
-#: ../../mod/profiles.php:579
+#: ../../mod/profiles.php:594
msgid "Private Keywords:"
msgstr ""
-#: ../../mod/profiles.php:580
+#: ../../mod/profiles.php:595 ../../include/profile_advanced.php:62
+msgid "Likes:"
+msgstr ""
+
+#: ../../mod/profiles.php:596 ../../include/profile_advanced.php:64
+msgid "Dislikes:"
+msgstr ""
+
+#: ../../mod/profiles.php:597
msgid "Example: fishing photography software"
msgstr ""
-#: ../../mod/profiles.php:581
+#: ../../mod/profiles.php:598
msgid "(Used for suggesting potential friends, can be seen by others)"
msgstr ""
-#: ../../mod/profiles.php:582
+#: ../../mod/profiles.php:599
msgid "(Used for searching profiles, never shown to others)"
msgstr ""
-#: ../../mod/profiles.php:583
+#: ../../mod/profiles.php:600
msgid "Tell us about yourself..."
msgstr ""
-#: ../../mod/profiles.php:584
+#: ../../mod/profiles.php:601
msgid "Hobbies/Interests"
msgstr ""
-#: ../../mod/profiles.php:585
+#: ../../mod/profiles.php:602
msgid "Contact information and Social Networks"
msgstr ""
-#: ../../mod/profiles.php:586
+#: ../../mod/profiles.php:603
msgid "Musical interests"
msgstr ""
-#: ../../mod/profiles.php:587
+#: ../../mod/profiles.php:604
msgid "Books, literature"
msgstr ""
-#: ../../mod/profiles.php:588
+#: ../../mod/profiles.php:605
msgid "Television"
msgstr ""
-#: ../../mod/profiles.php:589
+#: ../../mod/profiles.php:606
msgid "Film/dance/culture/entertainment"
msgstr ""
-#: ../../mod/profiles.php:590
+#: ../../mod/profiles.php:607
msgid "Love/romance"
msgstr ""
-#: ../../mod/profiles.php:591
+#: ../../mod/profiles.php:608
msgid "Work/employment"
msgstr ""
-#: ../../mod/profiles.php:592
+#: ../../mod/profiles.php:609
msgid "School/education"
msgstr ""
-#: ../../mod/profiles.php:597
+#: ../../mod/profiles.php:614
msgid ""
"This is your <strong>public</strong> profile.<br />It <strong>may</strong> "
"be visible to anybody using the internet."
msgstr ""
-#: ../../mod/profiles.php:607 ../../mod/directory.php:111
+#: ../../mod/profiles.php:624 ../../mod/directory.php:109
msgid "Age: "
msgstr ""
-#: ../../mod/profiles.php:644
+#: ../../mod/profiles.php:663
msgid "Edit/Manage Profiles"
msgstr ""
-#: ../../mod/profiles.php:645 ../../boot.php:1092
+#: ../../mod/profiles.php:664 ../../boot.php:1120
msgid "Change profile photo"
msgstr ""
-#: ../../mod/profiles.php:646 ../../boot.php:1093
+#: ../../mod/profiles.php:665 ../../boot.php:1121
msgid "Create New Profile"
msgstr ""
-#: ../../mod/profiles.php:657 ../../boot.php:1103
+#: ../../mod/profiles.php:676 ../../boot.php:1131
msgid "Profile Image"
msgstr ""
-#: ../../mod/profiles.php:659 ../../boot.php:1106
+#: ../../mod/profiles.php:678 ../../boot.php:1134
msgid "visible to everybody"
msgstr ""
-#: ../../mod/profiles.php:660 ../../boot.php:1107
+#: ../../mod/profiles.php:679 ../../boot.php:1135
msgid "Edit visibility"
msgstr ""
-#: ../../mod/filer.php:29 ../../include/conversation.php:947
+#: ../../mod/filer.php:29 ../../include/conversation.php:951
msgid "Save to Folder:"
msgstr ""
@@ -4058,6 +4226,38 @@ msgstr ""
msgid "No entries."
msgstr ""
+#: ../../mod/babel.php:17
+msgid "Source (bbcode) text:"
+msgstr ""
+
+#: ../../mod/babel.php:25
+msgid "Source input: "
+msgstr ""
+
+#: ../../mod/babel.php:29
+msgid "bb2html: "
+msgstr ""
+
+#: ../../mod/babel.php:33
+msgid "bb2html2bb: "
+msgstr ""
+
+#: ../../mod/babel.php:37
+msgid "bb2md: "
+msgstr ""
+
+#: ../../mod/babel.php:41
+msgid "bb2md2html: "
+msgstr ""
+
+#: ../../mod/babel.php:45
+msgid "bb2dia2bb: "
+msgstr ""
+
+#: ../../mod/babel.php:49
+msgid "bb2md2html2bb: "
+msgstr ""
+
#: ../../mod/suggest.php:38 ../../view/theme/diabook/theme.php:626
#: ../../include/contact_widgets.php:34
msgid "Friend Suggestions"
@@ -4085,11 +4285,30 @@ msgstr ""
msgid "Site Directory"
msgstr ""
-#: ../../mod/directory.php:114
+#: ../../mod/directory.php:112
msgid "Gender: "
msgstr ""
-#: ../../mod/directory.php:140
+#: ../../mod/directory.php:134 ../../include/profile_advanced.php:17
+#: ../../boot.php:1156
+msgid "Gender:"
+msgstr ""
+
+#: ../../mod/directory.php:136 ../../include/profile_advanced.php:37
+#: ../../boot.php:1159
+msgid "Status:"
+msgstr ""
+
+#: ../../mod/directory.php:138 ../../include/profile_advanced.php:48
+#: ../../boot.php:1161
+msgid "Homepage:"
+msgstr ""
+
+#: ../../mod/directory.php:140 ../../include/profile_advanced.php:58
+msgid "About:"
+msgstr ""
+
+#: ../../mod/directory.php:178
msgid "No entries (some entries may be hidden)."
msgstr ""
@@ -4264,83 +4483,99 @@ msgstr ""
msgid "%1$s has joined %2$s"
msgstr ""
-#: ../../addon/facebook/facebook.php:513
+#: ../../addon/fromgplus/fromgplus.php:29
+msgid "Google+ Import Settings"
+msgstr ""
+
+#: ../../addon/fromgplus/fromgplus.php:32
+msgid "Enable Google+ Import"
+msgstr ""
+
+#: ../../addon/fromgplus/fromgplus.php:35
+msgid "Google Account ID"
+msgstr ""
+
+#: ../../addon/fromgplus/fromgplus.php:55
+msgid "Google+ Import Settings saved."
+msgstr ""
+
+#: ../../addon/facebook/facebook.php:523
msgid "Facebook disabled"
msgstr ""
-#: ../../addon/facebook/facebook.php:518
+#: ../../addon/facebook/facebook.php:528
msgid "Updating contacts"
msgstr ""
-#: ../../addon/facebook/facebook.php:541
+#: ../../addon/facebook/facebook.php:551
msgid "Facebook API key is missing."
msgstr ""
-#: ../../addon/facebook/facebook.php:548
+#: ../../addon/facebook/facebook.php:558
msgid "Facebook Connect"
msgstr ""
-#: ../../addon/facebook/facebook.php:554
+#: ../../addon/facebook/facebook.php:564
msgid "Install Facebook connector for this account."
msgstr ""
-#: ../../addon/facebook/facebook.php:561
+#: ../../addon/facebook/facebook.php:571
msgid "Remove Facebook connector"
msgstr ""
-#: ../../addon/facebook/facebook.php:566
+#: ../../addon/facebook/facebook.php:576
msgid ""
"Re-authenticate [This is necessary whenever your Facebook password is "
"changed.]"
msgstr ""
-#: ../../addon/facebook/facebook.php:573
+#: ../../addon/facebook/facebook.php:583
msgid "Post to Facebook by default"
msgstr ""
-#: ../../addon/facebook/facebook.php:579
+#: ../../addon/facebook/facebook.php:589
msgid ""
"Facebook friend linking has been disabled on this site. The following "
"settings will have no effect."
msgstr ""
-#: ../../addon/facebook/facebook.php:583
+#: ../../addon/facebook/facebook.php:593
msgid ""
"Facebook friend linking has been disabled on this site. If you disable it, "
"you will be unable to re-enable it."
msgstr ""
-#: ../../addon/facebook/facebook.php:586
+#: ../../addon/facebook/facebook.php:596
msgid "Link all your Facebook friends and conversations on this website"
msgstr ""
-#: ../../addon/facebook/facebook.php:588
+#: ../../addon/facebook/facebook.php:598
msgid ""
"Facebook conversations consist of your <em>profile wall</em> and your friend "
"<em>stream</em>."
msgstr ""
-#: ../../addon/facebook/facebook.php:589
+#: ../../addon/facebook/facebook.php:599
msgid "On this website, your Facebook friend stream is only visible to you."
msgstr ""
-#: ../../addon/facebook/facebook.php:590
+#: ../../addon/facebook/facebook.php:600
msgid ""
"The following settings determine the privacy of your Facebook profile wall "
"on this website."
msgstr ""
-#: ../../addon/facebook/facebook.php:594
+#: ../../addon/facebook/facebook.php:604
msgid ""
"On this website your Facebook profile wall conversations will only be "
"visible to you"
msgstr ""
-#: ../../addon/facebook/facebook.php:599
+#: ../../addon/facebook/facebook.php:609
msgid "Do not import your Facebook profile wall conversations"
msgstr ""
-#: ../../addon/facebook/facebook.php:601
+#: ../../addon/facebook/facebook.php:611
msgid ""
"If you choose to link conversations and leave both of these boxes unchecked, "
"your Facebook profile wall will be merged with your profile wall on this "
@@ -4348,120 +4583,120 @@ msgid ""
"who may see the conversations."
msgstr ""
-#: ../../addon/facebook/facebook.php:606
+#: ../../addon/facebook/facebook.php:616
msgid "Comma separated applications to ignore"
msgstr ""
-#: ../../addon/facebook/facebook.php:690
+#: ../../addon/facebook/facebook.php:700
msgid "Problems with Facebook Real-Time Updates"
msgstr ""
-#: ../../addon/facebook/facebook.php:718
+#: ../../addon/facebook/facebook.php:728
#: ../../include/contact_selectors.php:81
msgid "Facebook"
msgstr ""
-#: ../../addon/facebook/facebook.php:719
+#: ../../addon/facebook/facebook.php:729
msgid "Facebook Connector Settings"
msgstr ""
-#: ../../addon/facebook/facebook.php:734
+#: ../../addon/facebook/facebook.php:744
msgid "Facebook API Key"
msgstr ""
-#: ../../addon/facebook/facebook.php:744
+#: ../../addon/facebook/facebook.php:754
msgid ""
"Error: it appears that you have specified the App-ID and -Secret in your ."
"htconfig.php file. As long as they are specified there, they cannot be set "
"using this form.<br><br>"
msgstr ""
-#: ../../addon/facebook/facebook.php:749
+#: ../../addon/facebook/facebook.php:759
msgid ""
"Error: the given API Key seems to be incorrect (the application access token "
"could not be retrieved)."
msgstr ""
-#: ../../addon/facebook/facebook.php:751
+#: ../../addon/facebook/facebook.php:761
msgid "The given API Key seems to work correctly."
msgstr ""
-#: ../../addon/facebook/facebook.php:753
+#: ../../addon/facebook/facebook.php:763
msgid ""
-"The correctness of the API Key could not be detected. Somthing strange's "
+"The correctness of the API Key could not be detected. Something strange's "
"going on."
msgstr ""
-#: ../../addon/facebook/facebook.php:756
+#: ../../addon/facebook/facebook.php:766
msgid "App-ID / API-Key"
msgstr ""
-#: ../../addon/facebook/facebook.php:757
+#: ../../addon/facebook/facebook.php:767
msgid "Application secret"
msgstr ""
-#: ../../addon/facebook/facebook.php:758
+#: ../../addon/facebook/facebook.php:768
#, php-format
msgid "Polling Interval in minutes (minimum %1$s minutes)"
msgstr ""
-#: ../../addon/facebook/facebook.php:759
+#: ../../addon/facebook/facebook.php:769
msgid ""
"Synchronize comments (no comments on Facebook are missed, at the cost of "
"increased system load)"
msgstr ""
-#: ../../addon/facebook/facebook.php:763
+#: ../../addon/facebook/facebook.php:773
msgid "Real-Time Updates"
msgstr ""
-#: ../../addon/facebook/facebook.php:767
+#: ../../addon/facebook/facebook.php:777
msgid "Real-Time Updates are activated."
msgstr ""
-#: ../../addon/facebook/facebook.php:768
+#: ../../addon/facebook/facebook.php:778
msgid "Deactivate Real-Time Updates"
msgstr ""
-#: ../../addon/facebook/facebook.php:770
+#: ../../addon/facebook/facebook.php:780
msgid "Real-Time Updates not activated."
msgstr ""
-#: ../../addon/facebook/facebook.php:770
+#: ../../addon/facebook/facebook.php:780
msgid "Activate Real-Time Updates"
msgstr ""
-#: ../../addon/facebook/facebook.php:789 ../../addon/dav/layout.fnk.php:360
+#: ../../addon/facebook/facebook.php:799 ../../addon/dav/layout.fnk.php:360
msgid "The new values have been saved."
msgstr ""
-#: ../../addon/facebook/facebook.php:813
+#: ../../addon/facebook/facebook.php:823
msgid "Post to Facebook"
msgstr ""
-#: ../../addon/facebook/facebook.php:911
+#: ../../addon/facebook/facebook.php:921
msgid ""
"Post to Facebook cancelled because of multi-network access permission "
"conflict."
msgstr ""
-#: ../../addon/facebook/facebook.php:1131
+#: ../../addon/facebook/facebook.php:1141
msgid "View on Friendica"
msgstr ""
-#: ../../addon/facebook/facebook.php:1164
+#: ../../addon/facebook/facebook.php:1174
msgid "Facebook post failed. Queued for retry."
msgstr ""
-#: ../../addon/facebook/facebook.php:1204
+#: ../../addon/facebook/facebook.php:1214
msgid "Your Facebook connection became invalid. Please Re-authenticate."
msgstr ""
-#: ../../addon/facebook/facebook.php:1205
+#: ../../addon/facebook/facebook.php:1215
msgid "Facebook connection became invalid"
msgstr ""
-#: ../../addon/facebook/facebook.php:1206
+#: ../../addon/facebook/facebook.php:1216
#, php-format
msgid ""
"Hi %1$s,\n"
@@ -4483,23 +4718,23 @@ msgstr ""
msgid "Automatically follow any StatusNet followers/mentioners"
msgstr ""
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:182
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:184
msgid "Lifetime of the cache (in hours)"
msgstr ""
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:187
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:189
msgid "Cache Statistics"
msgstr ""
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:190
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:192
msgid "Number of items"
msgstr ""
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:192
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:194
msgid "Size of the cache"
msgstr ""
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:194
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:196
msgid "Delete the whole cache"
msgstr ""
@@ -4620,32 +4855,34 @@ msgstr ""
msgid "%s - Click to open/close"
msgstr ""
-#: ../../addon/page/page.php:58 ../../addon/page/page.php:88
+#: ../../addon/page/page.php:61 ../../addon/page/page.php:91
msgid "Forums"
msgstr ""
-#: ../../addon/page/page.php:73 ../../addon/page/page.php:107
-#: ../../addon/showmore/showmore.php:87 ../../include/contact_widgets.php:188
-#: ../../include/conversation.php:476 ../../boot.php:519
-msgid "show more"
+#: ../../addon/page/page.php:129
+msgid "Forums:"
msgstr ""
-#: ../../addon/page/page.php:125
+#: ../../addon/page/page.php:165
msgid "Page settings updated."
msgstr ""
-#: ../../addon/page/page.php:151
+#: ../../addon/page/page.php:194
msgid "Page Settings"
msgstr ""
-#: ../../addon/page/page.php:153
+#: ../../addon/page/page.php:196
msgid "How many forums to display on sidebar without paging"
msgstr ""
-#: ../../addon/page/page.php:156
+#: ../../addon/page/page.php:199
msgid "Randomise Page/Forum list"
msgstr ""
+#: ../../addon/page/page.php:202
+msgid "Show pages/forums on profile page"
+msgstr ""
+
#: ../../addon/planets/planets.php:150
msgid "Planets Settings"
msgstr ""
@@ -4658,7 +4895,7 @@ msgstr ""
#: ../../addon/communityhome/communityhome.php:34
#: ../../addon/communityhome/twillingham/communityhome.php:28
#: ../../addon/communityhome/twillingham/communityhome.php:34
-#: ../../include/nav.php:64 ../../boot.php:839
+#: ../../include/nav.php:64 ../../boot.php:867
msgid "Login"
msgstr ""
@@ -4686,7 +4923,7 @@ msgid "Latest likes"
msgstr ""
#: ../../addon/communityhome/communityhome.php:155
-#: ../../view/theme/diabook/theme.php:562 ../../include/text.php:1314
+#: ../../view/theme/diabook/theme.php:562 ../../include/text.php:1319
#: ../../include/conversation.php:45 ../../include/conversation.php:118
msgid "event"
msgstr ""
@@ -5034,7 +5271,7 @@ msgstr ""
msgid "Post to Drupal by default"
msgstr ""
-#: ../../addon/drpost/drpost.php:184 ../../addon/wppost/wppost.php:199
+#: ../../addon/drpost/drpost.php:184 ../../addon/wppost/wppost.php:201
#: ../../addon/blogger/blogger.php:172 ../../addon/posterous/posterous.php:189
msgid "Post from Friendica"
msgstr ""
@@ -5551,7 +5788,7 @@ msgstr ""
msgid "Clear OAuth configuration"
msgstr ""
-#: ../../addon/statusnet/statusnet.php:553
+#: ../../addon/statusnet/statusnet.php:559
msgid "API URL"
msgstr ""
@@ -5650,7 +5887,7 @@ msgstr ""
msgid "Provide a backlink to the Friendica post"
msgstr ""
-#: ../../addon/wppost/wppost.php:205
+#: ../../addon/wppost/wppost.php:207
msgid "Read the original post and comment stream on Friendica"
msgstr ""
@@ -5768,11 +6005,11 @@ msgstr ""
msgid "Send linked #-tags and @-names to Twitter"
msgstr ""
-#: ../../addon/twitter/twitter.php:383
+#: ../../addon/twitter/twitter.php:389
msgid "Consumer key"
msgstr ""
-#: ../../addon/twitter/twitter.php:384
+#: ../../addon/twitter/twitter.php:390
msgid "Consumer secret"
msgstr ""
@@ -6072,10 +6309,6 @@ msgstr ""
msgid "Set colour scheme"
msgstr ""
-#: ../../include/profile_advanced.php:17 ../../boot.php:1128
-msgid "Gender:"
-msgstr ""
-
#: ../../include/profile_advanced.php:22
msgid "j F, Y"
msgstr ""
@@ -6084,8 +6317,7 @@ msgstr ""
msgid "j F"
msgstr ""
-#: ../../include/profile_advanced.php:30 ../../include/datetime.php:450
-#: ../../include/items.php:1460
+#: ../../include/profile_advanced.php:30
msgid "Birthday:"
msgstr ""
@@ -6093,19 +6325,11 @@ msgstr ""
msgid "Age:"
msgstr ""
-#: ../../include/profile_advanced.php:37 ../../boot.php:1131
-msgid "Status:"
-msgstr ""
-
#: ../../include/profile_advanced.php:43
#, php-format
msgid "for %1$d %2$s"
msgstr ""
-#: ../../include/profile_advanced.php:48 ../../boot.php:1133
-msgid "Homepage:"
-msgstr ""
-
#: ../../include/profile_advanced.php:52
msgid "Tags:"
msgstr ""
@@ -6114,43 +6338,39 @@ msgstr ""
msgid "Religion:"
msgstr ""
-#: ../../include/profile_advanced.php:58
-msgid "About:"
-msgstr ""
-
#: ../../include/profile_advanced.php:60
msgid "Hobbies/Interests:"
msgstr ""
-#: ../../include/profile_advanced.php:62
+#: ../../include/profile_advanced.php:67
msgid "Contact information and Social Networks:"
msgstr ""
-#: ../../include/profile_advanced.php:64
+#: ../../include/profile_advanced.php:69
msgid "Musical interests:"
msgstr ""
-#: ../../include/profile_advanced.php:66
+#: ../../include/profile_advanced.php:71
msgid "Books, literature:"
msgstr ""
-#: ../../include/profile_advanced.php:68
+#: ../../include/profile_advanced.php:73
msgid "Television:"
msgstr ""
-#: ../../include/profile_advanced.php:70
+#: ../../include/profile_advanced.php:75
msgid "Film/dance/culture/entertainment:"
msgstr ""
-#: ../../include/profile_advanced.php:72
+#: ../../include/profile_advanced.php:77
msgid "Love/Romance:"
msgstr ""
-#: ../../include/profile_advanced.php:74
+#: ../../include/profile_advanced.php:79
msgid "Work/employment:"
msgstr ""
-#: ../../include/profile_advanced.php:76
+#: ../../include/profile_advanced.php:81
msgid "School/education:"
msgstr ""
@@ -6370,7 +6590,7 @@ msgstr ""
msgid "Sex Addict"
msgstr ""
-#: ../../include/profile_selectors.php:42 ../../include/user.php:272
+#: ../../include/profile_selectors.php:42 ../../include/user.php:278
msgid "Friends"
msgstr ""
@@ -6458,11 +6678,11 @@ msgstr ""
msgid "Ask me"
msgstr ""
-#: ../../include/event.php:17 ../../include/bb2diaspora.php:249
+#: ../../include/event.php:20 ../../include/bb2diaspora.php:361
msgid "Starts:"
msgstr ""
-#: ../../include/event.php:27 ../../include/bb2diaspora.php:257
+#: ../../include/event.php:30 ../../include/bb2diaspora.php:369
msgid "Finishes:"
msgstr ""
@@ -6506,127 +6726,127 @@ msgid_plural "%d Contacts"
msgstr[0] ""
msgstr[1] ""
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "Monday"
msgstr ""
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "Tuesday"
msgstr ""
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "Wednesday"
msgstr ""
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "Thursday"
msgstr ""
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "Friday"
msgstr ""
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "Saturday"
msgstr ""
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "Sunday"
msgstr ""
-#: ../../include/text.php:839
+#: ../../include/text.php:843
msgid "January"
msgstr ""
-#: ../../include/text.php:839
+#: ../../include/text.php:843
msgid "February"
msgstr ""
-#: ../../include/text.php:839
+#: ../../include/text.php:843
msgid "March"
msgstr ""
-#: ../../include/text.php:839
+#: ../../include/text.php:843
msgid "April"
msgstr ""
-#: ../../include/text.php:839
+#: ../../include/text.php:843
msgid "May"
msgstr ""
-#: ../../include/text.php:839
+#: ../../include/text.php:843
msgid "June"
msgstr ""
-#: ../../include/text.php:839
+#: ../../include/text.php:843
msgid "July"
msgstr ""
-#: ../../include/text.php:839
+#: ../../include/text.php:843
msgid "August"
msgstr ""
-#: ../../include/text.php:839
+#: ../../include/text.php:843
msgid "September"
msgstr ""
-#: ../../include/text.php:839
+#: ../../include/text.php:843
msgid "October"
msgstr ""
-#: ../../include/text.php:839
+#: ../../include/text.php:843
msgid "November"
msgstr ""
-#: ../../include/text.php:839
+#: ../../include/text.php:843
msgid "December"
msgstr ""
-#: ../../include/text.php:925
+#: ../../include/text.php:929
msgid "bytes"
msgstr ""
-#: ../../include/text.php:945 ../../include/text.php:960
+#: ../../include/text.php:949 ../../include/text.php:964
msgid "remove"
msgstr ""
-#: ../../include/text.php:945 ../../include/text.php:960
+#: ../../include/text.php:949 ../../include/text.php:964
msgid "[remove]"
msgstr ""
-#: ../../include/text.php:948
+#: ../../include/text.php:952
msgid "Categories:"
msgstr ""
-#: ../../include/text.php:963
+#: ../../include/text.php:967
msgid "Filed under:"
msgstr ""
-#: ../../include/text.php:979 ../../include/text.php:991
+#: ../../include/text.php:983 ../../include/text.php:995
msgid "Click to open/close"
msgstr ""
-#: ../../include/text.php:1096 ../../include/user.php:230
+#: ../../include/text.php:1101 ../../include/user.php:236
msgid "default"
msgstr ""
-#: ../../include/text.php:1108
+#: ../../include/text.php:1113
msgid "Select an alternate language"
msgstr ""
-#: ../../include/text.php:1318
+#: ../../include/text.php:1323
msgid "activity"
msgstr ""
-#: ../../include/text.php:1320
+#: ../../include/text.php:1325
msgid "comment"
msgstr ""
-#: ../../include/text.php:1321
+#: ../../include/text.php:1326
msgid "post"
msgstr ""
-#: ../../include/text.php:1476
+#: ../../include/text.php:1481
msgid "Item filed"
msgstr ""
@@ -6634,19 +6854,19 @@ msgstr ""
msgid "Sharing notification from Diaspora network"
msgstr ""
-#: ../../include/diaspora.php:2074
+#: ../../include/diaspora.php:2085
msgid "Attachments:"
msgstr ""
-#: ../../include/network.php:827
+#: ../../include/network.php:842
msgid "view full size"
msgstr ""
-#: ../../include/oembed.php:134
+#: ../../include/oembed.php:135
msgid "Embedded content"
msgstr ""
-#: ../../include/oembed.php:143
+#: ../../include/oembed.php:144
msgid "Embedding disabled"
msgstr ""
@@ -6685,7 +6905,7 @@ msgstr ""
msgid "Contacts not in any group"
msgstr ""
-#: ../../include/nav.php:46 ../../boot.php:838
+#: ../../include/nav.php:46 ../../boot.php:866
msgid "Logout"
msgstr ""
@@ -6693,7 +6913,7 @@ msgstr ""
msgid "End this session"
msgstr ""
-#: ../../include/nav.php:49 ../../boot.php:1525
+#: ../../include/nav.php:49 ../../boot.php:1556
msgid "Status"
msgstr ""
@@ -6773,11 +6993,11 @@ msgstr ""
msgid "Manage other pages"
msgstr ""
-#: ../../include/nav.php:138 ../../boot.php:1086
+#: ../../include/nav.php:138 ../../boot.php:1114
msgid "Profiles"
msgstr ""
-#: ../../include/nav.php:138 ../../boot.php:1086
+#: ../../include/nav.php:138 ../../boot.php:1114
msgid "Manage/edit profiles"
msgstr ""
@@ -6789,7 +7009,7 @@ msgstr ""
msgid "Site setup and configuration"
msgstr ""
-#: ../../include/nav.php:169
+#: ../../include/nav.php:170
msgid "Nothing new here"
msgstr ""
@@ -6939,15 +7159,25 @@ msgstr ""
msgid "%1$d %2$s ago"
msgstr ""
+#: ../../include/datetime.php:450 ../../include/items.php:1460
+#, php-format
+msgid "%s's birthday"
+msgstr ""
+
+#: ../../include/datetime.php:451 ../../include/items.php:1461
+#, php-format
+msgid "Happy Birthday %s"
+msgstr ""
+
#: ../../include/onepoll.php:399
msgid "From: "
msgstr ""
-#: ../../include/bbcode.php:210 ../../include/bbcode.php:230
+#: ../../include/bbcode.php:224 ../../include/bbcode.php:244
msgid "$1 wrote:"
msgstr ""
-#: ../../include/bbcode.php:245 ../../include/bbcode.php:314
+#: ../../include/bbcode.php:259 ../../include/bbcode.php:336
msgid "Image/photo"
msgstr ""
@@ -7006,129 +7236,129 @@ msgstr ""
msgid "Please visit %s to view and/or reply to your private messages."
msgstr ""
-#: ../../include/enotify.php:73
+#: ../../include/enotify.php:87
#, php-format
msgid "%1$s commented on [url=%2$s]a %3$s[/url]"
msgstr ""
-#: ../../include/enotify.php:80
+#: ../../include/enotify.php:94
#, php-format
msgid "%1$s commented on [url=%2$s]%3$s's %4$s[/url]"
msgstr ""
-#: ../../include/enotify.php:88
+#: ../../include/enotify.php:102
#, php-format
msgid "%1$s commented on [url=%2$s]your %3$s[/url]"
msgstr ""
-#: ../../include/enotify.php:98
+#: ../../include/enotify.php:112
#, php-format
msgid "[Friendica:Notify] Comment to conversation #%1$d by %2$s"
msgstr ""
-#: ../../include/enotify.php:99
+#: ../../include/enotify.php:113
#, php-format
msgid "%s commented on an item/conversation you have been following."
msgstr ""
-#: ../../include/enotify.php:102 ../../include/enotify.php:117
-#: ../../include/enotify.php:130 ../../include/enotify.php:143
+#: ../../include/enotify.php:116 ../../include/enotify.php:131
+#: ../../include/enotify.php:144 ../../include/enotify.php:157
#, php-format
msgid "Please visit %s to view and/or reply to the conversation."
msgstr ""
-#: ../../include/enotify.php:109
+#: ../../include/enotify.php:123
#, php-format
msgid "[Friendica:Notify] %s posted to your profile wall"
msgstr ""
-#: ../../include/enotify.php:111
+#: ../../include/enotify.php:125
#, php-format
msgid "%1$s posted to your profile wall at %2$s"
msgstr ""
-#: ../../include/enotify.php:113
+#: ../../include/enotify.php:127
#, php-format
msgid "%1$s posted to [url=%2s]your wall[/url]"
msgstr ""
-#: ../../include/enotify.php:124
+#: ../../include/enotify.php:138
#, php-format
msgid "[Friendica:Notify] %s tagged you"
msgstr ""
-#: ../../include/enotify.php:125
+#: ../../include/enotify.php:139
#, php-format
msgid "%1$s tagged you at %2$s"
msgstr ""
-#: ../../include/enotify.php:126
+#: ../../include/enotify.php:140
#, php-format
msgid "%1$s [url=%2$s]tagged you[/url]."
msgstr ""
-#: ../../include/enotify.php:137
+#: ../../include/enotify.php:151
#, php-format
msgid "[Friendica:Notify] %s tagged your post"
msgstr ""
-#: ../../include/enotify.php:138
+#: ../../include/enotify.php:152
#, php-format
msgid "%1$s tagged your post at %2$s"
msgstr ""
-#: ../../include/enotify.php:139
+#: ../../include/enotify.php:153
#, php-format
msgid "%1$s tagged [url=%2$s]your post[/url]"
msgstr ""
-#: ../../include/enotify.php:150
+#: ../../include/enotify.php:164
msgid "[Friendica:Notify] Introduction received"
msgstr ""
-#: ../../include/enotify.php:151
+#: ../../include/enotify.php:165
#, php-format
msgid "You've received an introduction from '%1$s' at %2$s"
msgstr ""
-#: ../../include/enotify.php:152
+#: ../../include/enotify.php:166
#, php-format
msgid "You've received [url=%1$s]an introduction[/url] from %2$s."
msgstr ""
-#: ../../include/enotify.php:155 ../../include/enotify.php:173
+#: ../../include/enotify.php:169 ../../include/enotify.php:187
#, php-format
msgid "You may visit their profile at %s"
msgstr ""
-#: ../../include/enotify.php:157
+#: ../../include/enotify.php:171
#, php-format
msgid "Please visit %s to approve or reject the introduction."
msgstr ""
-#: ../../include/enotify.php:164
+#: ../../include/enotify.php:178
msgid "[Friendica:Notify] Friend suggestion received"
msgstr ""
-#: ../../include/enotify.php:165
+#: ../../include/enotify.php:179
#, php-format
msgid "You've received a friend suggestion from '%1$s' at %2$s"
msgstr ""
-#: ../../include/enotify.php:166
+#: ../../include/enotify.php:180
#, php-format
msgid "You've received [url=%1$s]a friend suggestion[/url] for %2$s from %3$s."
msgstr ""
-#: ../../include/enotify.php:171
+#: ../../include/enotify.php:185
msgid "Name:"
msgstr ""
-#: ../../include/enotify.php:172
+#: ../../include/enotify.php:186
msgid "Photo:"
msgstr ""
-#: ../../include/enotify.php:175
+#: ../../include/enotify.php:189
#, php-format
msgid "Please visit %s to approve or reject the suggestion."
msgstr ""
@@ -7142,73 +7372,69 @@ msgid ""
"This site is not configured to allow communications with other networks."
msgstr ""
-#: ../../include/follow.php:60 ../../include/follow.php:75
+#: ../../include/follow.php:60 ../../include/follow.php:80
msgid "No compatible communication protocols or feeds were discovered."
msgstr ""
-#: ../../include/follow.php:73
+#: ../../include/follow.php:78
msgid "The profile address specified does not provide adequate information."
msgstr ""
-#: ../../include/follow.php:77
+#: ../../include/follow.php:82
msgid "An author or name was not found."
msgstr ""
-#: ../../include/follow.php:79
+#: ../../include/follow.php:84
msgid "No browser URL could be matched to this address."
msgstr ""
-#: ../../include/follow.php:81
+#: ../../include/follow.php:86
msgid ""
"Unable to match @-style Identity Address with a known protocol or email "
"contact."
msgstr ""
-#: ../../include/follow.php:82
+#: ../../include/follow.php:87
msgid "Use mailto: in front of address to force email check."
msgstr ""
-#: ../../include/follow.php:88
+#: ../../include/follow.php:93
msgid ""
"The profile address specified belongs to a network which has been disabled "
"on this site."
msgstr ""
-#: ../../include/follow.php:93
+#: ../../include/follow.php:103
msgid ""
"Limited profile. This person will be unable to receive direct/personal "
"notifications from you."
msgstr ""
-#: ../../include/follow.php:169
+#: ../../include/follow.php:205
msgid "Unable to retrieve contact information."
msgstr ""
-#: ../../include/follow.php:223
+#: ../../include/follow.php:259
msgid "following"
msgstr ""
-#: ../../include/items.php:2804
+#: ../../include/items.php:2888
msgid "A new person is sharing with you at "
msgstr ""
-#: ../../include/items.php:2804
+#: ../../include/items.php:2888
msgid "You have a new follower at "
msgstr ""
-#: ../../include/items.php:3466
+#: ../../include/items.php:3520
msgid "Archives"
msgstr ""
-#: ../../include/bb2diaspora.php:102 ../../include/bb2diaspora.php:112
-#: ../../include/bb2diaspora.php:113
+#: ../../include/bb2diaspora.php:200 ../../include/bb2diaspora.php:210
+#: ../../include/bb2diaspora.php:211
msgid "image/photo"
msgstr ""
-#: ../../include/bb2diaspora.php:102
-msgid "link"
-msgstr ""
-
#: ../../include/user.php:38
msgid "An invitation is required."
msgstr ""
@@ -7255,7 +7481,7 @@ msgid ""
"must also begin with a letter."
msgstr ""
-#: ../../include/user.php:127 ../../include/user.php:219
+#: ../../include/user.php:127 ../../include/user.php:225
msgid "Nickname is already registered. Please choose another."
msgstr ""
@@ -7269,11 +7495,11 @@ msgstr ""
msgid "SERIOUS ERROR: Generation of security keys failed."
msgstr ""
-#: ../../include/user.php:205
+#: ../../include/user.php:211
msgid "An error occurred during registration. Please try again."
msgstr ""
-#: ../../include/user.php:240
+#: ../../include/user.php:246
msgid "An error occurred creating your default profile. Please try again."
msgstr ""
@@ -7335,309 +7561,211 @@ msgstr ""
msgid "%1$s marked %2$s's %3$s as favorite"
msgstr ""
-#: ../../include/conversation.php:327 ../../include/conversation.php:608
-msgid "Select"
-msgstr ""
-
-#: ../../include/conversation.php:344 ../../include/conversation.php:701
-#: ../../include/conversation.php:702
-#, php-format
-msgid "View %s's profile @ %s"
-msgstr ""
-
-#: ../../include/conversation.php:354 ../../include/conversation.php:713
-#, php-format
-msgid "%s from %s"
-msgstr ""
-
-#: ../../include/conversation.php:369
-msgid "View in context"
-msgstr ""
-
-#: ../../include/conversation.php:475
-#, php-format
-msgid "%d comment"
-msgid_plural "%d comments"
-msgstr[0] ""
-msgstr[1] ""
-
-#: ../../include/conversation.php:554
-msgid "like"
-msgstr ""
-
-#: ../../include/conversation.php:555
-msgid "dislike"
-msgstr ""
-
-#: ../../include/conversation.php:557
-msgid "Share this"
-msgstr ""
-
-#: ../../include/conversation.php:557
-msgid "share"
-msgstr ""
-
-#: ../../include/conversation.php:581
-msgid "Bold"
-msgstr ""
-
-#: ../../include/conversation.php:582
-msgid "Italic"
-msgstr ""
-
-#: ../../include/conversation.php:583
-msgid "Underline"
-msgstr ""
-
-#: ../../include/conversation.php:584
-msgid "Quote"
-msgstr ""
-
-#: ../../include/conversation.php:585
-msgid "Code"
-msgstr ""
-
-#: ../../include/conversation.php:586
-msgid "Image"
-msgstr ""
-
-#: ../../include/conversation.php:587
-msgid "Link"
-msgstr ""
-
-#: ../../include/conversation.php:588
-msgid "Video"
-msgstr ""
-
-#: ../../include/conversation.php:621
-msgid "add star"
-msgstr ""
-
-#: ../../include/conversation.php:622
-msgid "remove star"
-msgstr ""
-
-#: ../../include/conversation.php:623
-msgid "toggle star status"
-msgstr ""
-
-#: ../../include/conversation.php:626
-msgid "starred"
-msgstr ""
-
-#: ../../include/conversation.php:627
-msgid "add tag"
-msgstr ""
-
-#: ../../include/conversation.php:631
-msgid "save to folder"
-msgstr ""
-
-#: ../../include/conversation.php:703
-msgid "to"
-msgstr ""
-
-#: ../../include/conversation.php:704
-msgid "Wall-to-Wall"
-msgstr ""
-
-#: ../../include/conversation.php:705
-msgid "via Wall-To-Wall:"
-msgstr ""
-
#: ../../include/conversation.php:750
msgid "Delete Selected Items"
msgstr ""
-#: ../../include/conversation.php:901
+#: ../../include/conversation.php:905
#, php-format
msgid "%s likes this."
msgstr ""
-#: ../../include/conversation.php:901
+#: ../../include/conversation.php:905
#, php-format
msgid "%s doesn't like this."
msgstr ""
-#: ../../include/conversation.php:905
+#: ../../include/conversation.php:909
#, php-format
msgid "<span %1$s>%2$d people</span> like this."
msgstr ""
-#: ../../include/conversation.php:907
+#: ../../include/conversation.php:911
#, php-format
msgid "<span %1$s>%2$d people</span> don't like this."
msgstr ""
-#: ../../include/conversation.php:913
+#: ../../include/conversation.php:917
msgid "and"
msgstr ""
-#: ../../include/conversation.php:916
+#: ../../include/conversation.php:920
#, php-format
msgid ", and %d other people"
msgstr ""
-#: ../../include/conversation.php:917
+#: ../../include/conversation.php:921
#, php-format
msgid "%s like this."
msgstr ""
-#: ../../include/conversation.php:917
+#: ../../include/conversation.php:921
#, php-format
msgid "%s don't like this."
msgstr ""
-#: ../../include/conversation.php:942
+#: ../../include/conversation.php:946
msgid "Visible to <strong>everybody</strong>"
msgstr ""
-#: ../../include/conversation.php:944
+#: ../../include/conversation.php:948
msgid "Please enter a video link/URL:"
msgstr ""
-#: ../../include/conversation.php:945
+#: ../../include/conversation.php:949
msgid "Please enter an audio link/URL:"
msgstr ""
-#: ../../include/conversation.php:946
+#: ../../include/conversation.php:950
msgid "Tag term:"
msgstr ""
-#: ../../include/conversation.php:948
+#: ../../include/conversation.php:952
msgid "Where are you right now?"
msgstr ""
-#: ../../include/conversation.php:991
+#: ../../include/conversation.php:995
msgid "upload photo"
msgstr ""
-#: ../../include/conversation.php:993
+#: ../../include/conversation.php:997
msgid "attach file"
msgstr ""
-#: ../../include/conversation.php:995
+#: ../../include/conversation.php:999
msgid "web link"
msgstr ""
-#: ../../include/conversation.php:996
+#: ../../include/conversation.php:1000
msgid "Insert video link"
msgstr ""
-#: ../../include/conversation.php:997
+#: ../../include/conversation.php:1001
msgid "video link"
msgstr ""
-#: ../../include/conversation.php:998
+#: ../../include/conversation.php:1002
msgid "Insert audio link"
msgstr ""
-#: ../../include/conversation.php:999
+#: ../../include/conversation.php:1003
msgid "audio link"
msgstr ""
-#: ../../include/conversation.php:1001
+#: ../../include/conversation.php:1005
msgid "set location"
msgstr ""
-#: ../../include/conversation.php:1003
+#: ../../include/conversation.php:1007
msgid "clear location"
msgstr ""
-#: ../../include/conversation.php:1010
+#: ../../include/conversation.php:1014
msgid "permissions"
msgstr ""
-#: ../../boot.php:517
+#: ../../include/plugin.php:388 ../../include/plugin.php:390
+msgid "Click here to upgrade."
+msgstr ""
+
+#: ../../include/plugin.php:396
+msgid "This action exceeds the limits set by your subscription plan."
+msgstr ""
+
+#: ../../include/plugin.php:401
+msgid "This action is not available under your subscription plan."
+msgstr ""
+
+#: ../../boot.php:545
msgid "Delete this item?"
msgstr ""
-#: ../../boot.php:520
+#: ../../boot.php:548
msgid "show fewer"
msgstr ""
-#: ../../boot.php:715
+#: ../../boot.php:743
#, php-format
msgid "Update %s failed. See error logs."
msgstr ""
-#: ../../boot.php:717
+#: ../../boot.php:745
#, php-format
msgid "Update Error at %s"
msgstr ""
-#: ../../boot.php:817
+#: ../../boot.php:845
msgid "Create a New Account"
msgstr ""
-#: ../../boot.php:841
+#: ../../boot.php:869
msgid "Nickname or Email address: "
msgstr ""
-#: ../../boot.php:842
+#: ../../boot.php:870
msgid "Password: "
msgstr ""
-#: ../../boot.php:845
+#: ../../boot.php:873
msgid "Or login using OpenID: "
msgstr ""
-#: ../../boot.php:851
+#: ../../boot.php:879
msgid "Forgot your password?"
msgstr ""
-#: ../../boot.php:1018
+#: ../../boot.php:1046
msgid "Edit profile"
msgstr ""
-#: ../../boot.php:1078
+#: ../../boot.php:1106
msgid "Message"
msgstr ""
-#: ../../boot.php:1194 ../../boot.php:1270
+#: ../../boot.php:1222 ../../boot.php:1301
msgid "g A l F d"
msgstr ""
-#: ../../boot.php:1195 ../../boot.php:1271
+#: ../../boot.php:1223 ../../boot.php:1302
msgid "F d"
msgstr ""
-#: ../../boot.php:1240 ../../boot.php:1311
+#: ../../boot.php:1268 ../../boot.php:1342
msgid "[today]"
msgstr ""
-#: ../../boot.php:1252
+#: ../../boot.php:1280
msgid "Birthday Reminders"
msgstr ""
-#: ../../boot.php:1253
+#: ../../boot.php:1281
msgid "Birthdays this week:"
msgstr ""
-#: ../../boot.php:1304
+#: ../../boot.php:1335
msgid "[No description]"
msgstr ""
-#: ../../boot.php:1322
+#: ../../boot.php:1353
msgid "Event Reminders"
msgstr ""
-#: ../../boot.php:1323
+#: ../../boot.php:1354
msgid "Events this week:"
msgstr ""
-#: ../../boot.php:1528
+#: ../../boot.php:1559
msgid "Status Messages and Posts"
msgstr ""
-#: ../../boot.php:1534
+#: ../../boot.php:1565
msgid "Profile Details"
msgstr ""
-#: ../../boot.php:1549
+#: ../../boot.php:1580
msgid "Events and Calendar"
msgstr ""
-#: ../../boot.php:1555
+#: ../../boot.php:1586
msgid "Only You Can See This"
msgstr ""
diff --git a/view/content.tpl b/view/content.tpl
new file mode 100644
index 000000000..466045d39
--- /dev/null
+++ b/view/content.tpl
@@ -0,0 +1,2 @@
+<div id="content-begin"></div>
+<div id="content-end"></div>
diff --git a/view/en/update_fail_eml.tpl b/view/en/update_fail_eml.tpl
index f68a3dece..548e1a0df 100644
--- a/view/en/update_fail_eml.tpl
+++ b/view/en/update_fail_eml.tpl
@@ -1,5 +1,5 @@
Hey,
-I'm $sitename.
+I'm $sitename;
The friendica developers released update $update recently,
but when I tried to install it, something went terribly wrong.
This needs to be fixed soon and I can't do it alone. Please contact a
diff --git a/view/eo/lostpass_eml.tpl b/view/eo/lostpass_eml.tpl
index aad63b62a..26d1a3c23 100644
--- a/view/eo/lostpass_eml.tpl
+++ b/view/eo/lostpass_eml.tpl
@@ -8,7 +8,7 @@ Se vi NE petis tiun ÅanÄon, bonvolu NE KLAKU la
sekvantan ligilon kaj ignoru aÅ­ forvisu ĉi-mesaÄon.
Ni ne ÅanÄu vian pasvorton se ni ne povas kontroli ĉu estas vi
-kiu petis lala ÅanÄon.
+kiu petis la ÅanÄon.
Sekvu ĉi tion ligilon por konfirmi vian identecon:
diff --git a/view/eo/messages.po b/view/eo/messages.po
index 390dea96c..26d823d73 100644
--- a/view/eo/messages.po
+++ b/view/eo/messages.po
@@ -9,10 +9,10 @@ msgid ""
msgstr ""
"Project-Id-Version: friendica\n"
"Report-Msgid-Bugs-To: http://bugs.friendica.com/\n"
-"POT-Creation-Date: 2012-05-10 10:00-0700\n"
-"PO-Revision-Date: 2012-05-11 22:39+0000\n"
+"POT-Creation-Date: 2012-06-30 10:00-0700\n"
+"PO-Revision-Date: 2012-07-01 16:55+0000\n"
"Last-Translator: Martin Schmitt <mas@scsy.de>\n"
-"Language-Team: Esperanto (http://www.transifex.net/projects/p/friendica/language/eo/)\n"
+"Language-Team: Esperanto (http://www.transifex.com/projects/p/friendica/language/eo/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -37,27 +37,28 @@ msgid "Contact update failed."
msgstr "Äœisdatigo de kontakto malsukcesis."
#: ../../mod/crepair.php:115 ../../mod/wall_attach.php:44
-#: ../../mod/fsuggest.php:78 ../../mod/events.php:138 ../../mod/api.php:26
-#: ../../mod/api.php:31 ../../mod/photos.php:130 ../../mod/photos.php:865
-#: ../../mod/editpost.php:10 ../../mod/install.php:171
-#: ../../mod/notifications.php:66 ../../mod/contacts.php:125
-#: ../../mod/settings.php:104 ../../mod/settings.php:521
-#: ../../mod/settings.php:526 ../../mod/manage.php:86 ../../mod/network.php:6
+#: ../../mod/fsuggest.php:78 ../../mod/events.php:140 ../../mod/api.php:26
+#: ../../mod/api.php:31 ../../mod/photos.php:135 ../../mod/photos.php:951
+#: ../../mod/editpost.php:10 ../../mod/install.php:151
+#: ../../mod/notifications.php:66 ../../mod/contacts.php:145
+#: ../../mod/settings.php:106 ../../mod/settings.php:537
+#: ../../mod/settings.php:542 ../../mod/manage.php:86 ../../mod/network.php:6
#: ../../mod/notes.php:20 ../../mod/wallmessage.php:9
#: ../../mod/wallmessage.php:33 ../../mod/wallmessage.php:79
#: ../../mod/wallmessage.php:103 ../../mod/attach.php:33
#: ../../mod/group.php:19 ../../mod/viewcontacts.php:22
#: ../../mod/register.php:38 ../../mod/regmod.php:116 ../../mod/item.php:124
#: ../../mod/item.php:140 ../../mod/profile_photo.php:19
-#: ../../mod/profile_photo.php:139 ../../mod/profile_photo.php:150
-#: ../../mod/profile_photo.php:163 ../../mod/message.php:44
-#: ../../mod/message.php:96 ../../mod/allfriends.php:9
+#: ../../mod/profile_photo.php:141 ../../mod/profile_photo.php:152
+#: ../../mod/profile_photo.php:165 ../../mod/message.php:45
+#: ../../mod/message.php:97 ../../mod/allfriends.php:9
#: ../../mod/nogroup.php:25 ../../mod/wall_upload.php:53
-#: ../../mod/follow.php:8 ../../mod/display.php:138 ../../mod/profiles.php:7
-#: ../../mod/profiles.php:365 ../../mod/delegate.php:6
+#: ../../mod/follow.php:9 ../../mod/display.php:138 ../../mod/profiles.php:7
+#: ../../mod/profiles.php:400 ../../mod/delegate.php:6
#: ../../mod/suggest.php:28 ../../mod/invite.php:13 ../../mod/invite.php:81
-#: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:495
-#: ../../include/items.php:3202 ../../index.php:306
+#: ../../mod/dfrn_confirm.php:53 ../../addon/facebook/facebook.php:508
+#: ../../addon/facebook/facebook.php:514 ../../addon/dav/layout.fnk.php:353
+#: ../../include/items.php:3455 ../../index.php:309
msgid "Permission denied."
msgstr "Malpermesita."
@@ -86,8 +87,8 @@ msgstr "Bonvolu klaki 'malantaÅ­en' en via retesplorilo <strong>nun</strong> se
msgid "Return to contact editor"
msgstr "Reen al kontakta redaktilo"
-#: ../../mod/crepair.php:148 ../../mod/settings.php:541
-#: ../../mod/settings.php:567 ../../mod/admin.php:643 ../../mod/admin.php:652
+#: ../../mod/crepair.php:148 ../../mod/settings.php:557
+#: ../../mod/settings.php:583 ../../mod/admin.php:659 ../../mod/admin.php:668
msgid "Name"
msgstr "Nomo"
@@ -124,27 +125,33 @@ msgid "New photo from this URL"
msgstr "Nova bildo el tiu adreso"
#: ../../mod/crepair.php:166 ../../mod/fsuggest.php:107
-#: ../../mod/events.php:428 ../../mod/photos.php:900 ../../mod/photos.php:958
-#: ../../mod/photos.php:1193 ../../mod/photos.php:1233
-#: ../../mod/photos.php:1273 ../../mod/photos.php:1304
-#: ../../mod/install.php:251 ../../mod/install.php:289
-#: ../../mod/localtime.php:45 ../../mod/contacts.php:322
-#: ../../mod/settings.php:539 ../../mod/settings.php:685
-#: ../../mod/settings.php:746 ../../mod/settings.php:940
-#: ../../mod/manage.php:109 ../../mod/group.php:85 ../../mod/admin.php:404
-#: ../../mod/admin.php:640 ../../mod/admin.php:776 ../../mod/admin.php:975
-#: ../../mod/admin.php:1062 ../../mod/profiles.php:534
-#: ../../mod/invite.php:119 ../../addon/facebook/facebook.php:597
+#: ../../mod/events.php:436 ../../mod/photos.php:986 ../../mod/photos.php:1057
+#: ../../mod/photos.php:1303 ../../mod/photos.php:1343
+#: ../../mod/photos.php:1383 ../../mod/photos.php:1414
+#: ../../mod/install.php:246 ../../mod/install.php:284
+#: ../../mod/localtime.php:45 ../../mod/contacts.php:343
+#: ../../mod/settings.php:555 ../../mod/settings.php:709
+#: ../../mod/settings.php:770 ../../mod/settings.php:971
+#: ../../mod/group.php:85 ../../mod/message.php:216 ../../mod/message.php:410
+#: ../../mod/admin.php:420 ../../mod/admin.php:656 ../../mod/admin.php:792
+#: ../../mod/admin.php:991 ../../mod/admin.php:1078 ../../mod/profiles.php:569
+#: ../../mod/invite.php:119 ../../addon/fromgplus/fromgplus.php:40
+#: ../../addon/facebook/facebook.php:617
+#: ../../addon/snautofollow/snautofollow.php:64
#: ../../addon/yourls/yourls.php:76 ../../addon/ljpost/ljpost.php:93
-#: ../../addon/nsfw/nsfw.php:57 ../../addon/planets/planets.php:158
+#: ../../addon/nsfw/nsfw.php:57 ../../addon/page/page.php:208
+#: ../../addon/planets/planets.php:158
#: ../../addon/uhremotestorage/uhremotestorage.php:89
#: ../../addon/randplace/randplace.php:177 ../../addon/dwpost/dwpost.php:93
-#: ../../addon/drpost/drpost.php:110 ../../addon/geonames/geonames.php:187
-#: ../../addon/oembed.old/oembed.php:41 ../../addon/impressum/impressum.php:82
-#: ../../addon/blockem/blockem.php:57 ../../addon/qcomment/qcomment.php:61
+#: ../../addon/drpost/drpost.php:110 ../../addon/startpage/startpage.php:92
+#: ../../addon/geonames/geonames.php:187 ../../addon/oembed.old/oembed.php:41
+#: ../../addon/impressum/impressum.php:82
+#: ../../addon/notimeline/notimeline.php:64 ../../addon/blockem/blockem.php:57
+#: ../../addon/qcomment/qcomment.php:61
#: ../../addon/openstreetmap/openstreetmap.php:70
-#: ../../addon/mathjax/mathjax.php:42 ../../addon/editplain/editplain.php:84
-#: ../../addon/blackout/blackout.php:94 ../../addon/gravatar/gravatar.php:86
+#: ../../addon/libertree/libertree.php:90 ../../addon/mathjax/mathjax.php:42
+#: ../../addon/editplain/editplain.php:84 ../../addon/blackout/blackout.php:98
+#: ../../addon/gravatar/gravatar.php:86
#: ../../addon/pageheader/pageheader.php:55 ../../addon/ijpost/ijpost.php:93
#: ../../addon/jappixmini/jappixmini.php:302
#: ../../addon/statusnet/statusnet.php:278
@@ -152,18 +159,18 @@ msgstr "Nova bildo el tiu adreso"
#: ../../addon/statusnet/statusnet.php:318
#: ../../addon/statusnet/statusnet.php:325
#: ../../addon/statusnet/statusnet.php:353
-#: ../../addon/statusnet/statusnet.php:553 ../../addon/tumblr/tumblr.php:90
+#: ../../addon/statusnet/statusnet.php:567 ../../addon/tumblr/tumblr.php:90
#: ../../addon/numfriends/numfriends.php:85 ../../addon/gnot/gnot.php:88
-#: ../../addon/wppost/wppost.php:102 ../../addon/showmore/showmore.php:48
+#: ../../addon/wppost/wppost.php:110 ../../addon/showmore/showmore.php:48
#: ../../addon/piwik/piwik.php:89 ../../addon/twitter/twitter.php:180
-#: ../../addon/twitter/twitter.php:209 ../../addon/twitter/twitter.php:375
+#: ../../addon/twitter/twitter.php:209 ../../addon/twitter/twitter.php:387
#: ../../addon/irc/irc.php:55 ../../addon/blogger/blogger.php:102
#: ../../addon/posterous/posterous.php:103
#: ../../view/theme/cleanzero/config.php:80
-#: ../../view/theme/diabook/theme.php:685
+#: ../../view/theme/diabook/theme.php:757
#: ../../view/theme/diabook/config.php:190
#: ../../view/theme/quattro/config.php:52 ../../view/theme/dispy/config.php:70
-#: ../../include/conversation.php:555
+#: ../../include/conversation.php:580
msgid "Submit"
msgstr "Sendi"
@@ -171,15 +178,16 @@ msgstr "Sendi"
msgid "Help:"
msgstr "Helpo:"
-#: ../../mod/help.php:34 ../../include/nav.php:86
+#: ../../mod/help.php:34 ../../addon/dav/layout.fnk.php:116
+#: ../../include/nav.php:86
msgid "Help"
msgstr "Helpo"
-#: ../../mod/help.php:38 ../../index.php:225
+#: ../../mod/help.php:38 ../../index.php:218
msgid "Not Found"
msgstr "Ne trovita"
-#: ../../mod/help.php:41 ../../index.php:228
+#: ../../mod/help.php:41 ../../index.php:221
msgid "Page not found."
msgstr "PaÄo ne trovita"
@@ -188,7 +196,7 @@ msgstr "PaÄo ne trovita"
msgid "File exceeds size limit of %d"
msgstr "Dosiero estas pli granda ol la limito de %d"
-#: ../../mod/wall_attach.php:86 ../../mod/wall_attach.php:97
+#: ../../mod/wall_attach.php:99 ../../mod/wall_attach.php:110
msgid "File upload failed."
msgstr "AlÅutado malsukcesis."
@@ -205,84 +213,93 @@ msgstr "Sugesti amikojn"
msgid "Suggest a friend for %s"
msgstr "Sugesti amikon por %s"
-#: ../../mod/events.php:65
-msgid "Event description and start time are required."
-msgstr "Okazo bezonas priskribon kaj startotempon."
+#: ../../mod/events.php:66
+msgid "Event title and start time are required."
+msgstr "Titolo kaj starttempo estas bezonataj por la okazo."
-#: ../../mod/events.php:258
+#: ../../mod/events.php:260
msgid "l, F j"
msgstr "l, F j"
-#: ../../mod/events.php:280
+#: ../../mod/events.php:282
msgid "Edit event"
msgstr "Redakti okazon"
-#: ../../mod/events.php:300 ../../include/text.php:1054
+#: ../../mod/events.php:304 ../../include/text.php:1065
msgid "link to source"
msgstr "ligilo al fonto"
-#: ../../mod/events.php:324 ../../view/theme/diabook/theme.php:127
-#: ../../include/nav.php:52 ../../boot.php:1499
+#: ../../mod/events.php:328 ../../view/theme/diabook/theme.php:131
+#: ../../include/nav.php:52 ../../boot.php:1559
msgid "Events"
msgstr "Okazoj"
-#: ../../mod/events.php:325
+#: ../../mod/events.php:329
msgid "Create New Event"
msgstr "Krei novan okazon"
-#: ../../mod/events.php:326
+#: ../../mod/events.php:330 ../../addon/dav/layout.fnk.php:154
msgid "Previous"
msgstr "antaÅ­a"
-#: ../../mod/events.php:327 ../../mod/install.php:210
+#: ../../mod/events.php:331 ../../mod/install.php:205
+#: ../../addon/dav/layout.fnk.php:157
msgid "Next"
msgstr "sekva"
-#: ../../mod/events.php:399
+#: ../../mod/events.php:404
msgid "hour:minute"
msgstr "horo:minuto"
-#: ../../mod/events.php:408
+#: ../../mod/events.php:414
msgid "Event details"
msgstr "Detaloj de okazo"
-#: ../../mod/events.php:409
+#: ../../mod/events.php:415
#, php-format
-msgid "Format is %s %s. Starting date and Description are required."
-msgstr "Formato estas %s %s. Startotempo kaj priskribo estas bezonataj"
+msgid "Format is %s %s. Starting date and Title are required."
+msgstr "Format is %s %s. Titolo kaj starttempo estas bezonataj."
-#: ../../mod/events.php:411
+#: ../../mod/events.php:417
msgid "Event Starts:"
msgstr "Okazo startas:"
-#: ../../mod/events.php:414
+#: ../../mod/events.php:417 ../../mod/events.php:431
+msgid "Required"
+msgstr "Bezonata"
+
+#: ../../mod/events.php:420
msgid "Finish date/time is not known or not relevant"
msgstr "Fina dato/tempo ne estas konata aÅ­ ne bezonata"
-#: ../../mod/events.php:416
+#: ../../mod/events.php:422
msgid "Event Finishes:"
msgstr "Okazo finas:"
-#: ../../mod/events.php:419
+#: ../../mod/events.php:425
msgid "Adjust for viewer timezone"
msgstr "Agordi al horzono de la leganto"
-#: ../../mod/events.php:421
+#: ../../mod/events.php:427
msgid "Description:"
msgstr "Priskribo"
-#: ../../mod/events.php:423 ../../include/event.php:37
-#: ../../include/bb2diaspora.php:260 ../../boot.php:1098
+#: ../../mod/events.php:429 ../../include/event.php:40
+#: ../../include/bb2diaspora.php:357 ../../boot.php:1136
msgid "Location:"
msgstr "Loko:"
-#: ../../mod/events.php:425
+#: ../../mod/events.php:431
+msgid "Title:"
+msgstr "Titolo:"
+
+#: ../../mod/events.php:433
msgid "Share this event"
msgstr "Kunhavigi la okazon"
#: ../../mod/tagrm.php:11 ../../mod/tagrm.php:94
-#: ../../mod/dfrn_request.php:818 ../../mod/settings.php:540
-#: ../../mod/settings.php:566 ../../addon/js_upload/js_upload.php:45
+#: ../../mod/dfrn_request.php:845 ../../mod/settings.php:556
+#: ../../mod/settings.php:582 ../../addon/js_upload/js_upload.php:45
msgid "Cancel"
msgstr "Nuligi"
@@ -325,249 +342,270 @@ msgid ""
" and/or create new posts for you?"
msgstr "Ĉu rajtigi ĉi tiun programon por atingi viajn afiÅojn kaj kontaktojn kaj/aÅ­ krei novajn afiÅojn?"
-#: ../../mod/api.php:105 ../../mod/dfrn_request.php:806
-#: ../../mod/settings.php:854 ../../mod/settings.php:860
-#: ../../mod/settings.php:868 ../../mod/settings.php:872
-#: ../../mod/settings.php:877 ../../mod/settings.php:883
-#: ../../mod/settings.php:889 ../../mod/settings.php:895
-#: ../../mod/settings.php:931 ../../mod/settings.php:932
-#: ../../mod/settings.php:933 ../../mod/settings.php:934
-#: ../../mod/register.php:532 ../../mod/profiles.php:511
+#: ../../mod/api.php:105 ../../mod/dfrn_request.php:833
+#: ../../mod/settings.php:887 ../../mod/settings.php:893
+#: ../../mod/settings.php:901 ../../mod/settings.php:905
+#: ../../mod/settings.php:910 ../../mod/settings.php:916
+#: ../../mod/settings.php:922 ../../mod/settings.php:928
+#: ../../mod/settings.php:958 ../../mod/settings.php:959
+#: ../../mod/settings.php:960 ../../mod/settings.php:961
+#: ../../mod/settings.php:962 ../../mod/register.php:234
+#: ../../mod/profiles.php:546
msgid "Yes"
msgstr "Jes"
-#: ../../mod/api.php:106 ../../mod/dfrn_request.php:807
-#: ../../mod/settings.php:854 ../../mod/settings.php:860
-#: ../../mod/settings.php:868 ../../mod/settings.php:872
-#: ../../mod/settings.php:877 ../../mod/settings.php:883
-#: ../../mod/settings.php:889 ../../mod/settings.php:895
-#: ../../mod/settings.php:931 ../../mod/settings.php:932
-#: ../../mod/settings.php:933 ../../mod/settings.php:934
-#: ../../mod/register.php:533 ../../mod/profiles.php:512
+#: ../../mod/api.php:106 ../../mod/dfrn_request.php:834
+#: ../../mod/settings.php:887 ../../mod/settings.php:893
+#: ../../mod/settings.php:901 ../../mod/settings.php:905
+#: ../../mod/settings.php:910 ../../mod/settings.php:916
+#: ../../mod/settings.php:922 ../../mod/settings.php:928
+#: ../../mod/settings.php:958 ../../mod/settings.php:959
+#: ../../mod/settings.php:960 ../../mod/settings.php:961
+#: ../../mod/settings.php:962 ../../mod/register.php:235
+#: ../../mod/profiles.php:547
msgid "No"
msgstr "Ne"
-#: ../../mod/photos.php:43 ../../boot.php:1493
+#: ../../mod/photos.php:46 ../../boot.php:1553
msgid "Photo Albums"
msgstr "Bildalbumoj"
-#: ../../mod/photos.php:51 ../../mod/photos.php:151 ../../mod/photos.php:879
-#: ../../mod/photos.php:950 ../../mod/photos.php:965 ../../mod/photos.php:1382
-#: ../../mod/photos.php:1394 ../../addon/communityhome/communityhome.php:110
-#: ../../view/theme/diabook/theme.php:526
+#: ../../mod/photos.php:54 ../../mod/photos.php:156 ../../mod/photos.php:965
+#: ../../mod/photos.php:1049 ../../mod/photos.php:1064
+#: ../../mod/photos.php:1492 ../../mod/photos.php:1504
+#: ../../addon/communityhome/communityhome.php:110
+#: ../../view/theme/diabook/theme.php:598
msgid "Contact Photos"
msgstr "Kontaktbildoj"
-#: ../../mod/photos.php:58 ../../mod/photos.php:975 ../../mod/photos.php:1424
+#: ../../mod/photos.php:61 ../../mod/photos.php:1074 ../../mod/photos.php:1542
msgid "Upload New Photos"
msgstr "AlÅuti novajn bildojn"
-#: ../../mod/photos.php:69 ../../mod/settings.php:20
+#: ../../mod/photos.php:72 ../../mod/settings.php:21
msgid "everybody"
msgstr "ĉiuj"
-#: ../../mod/photos.php:140
+#: ../../mod/photos.php:145
msgid "Contact information unavailable"
msgstr "Kontaktoj informoj ne disponeblas"
-#: ../../mod/photos.php:151 ../../mod/photos.php:597 ../../mod/photos.php:950
-#: ../../mod/photos.php:965 ../../mod/register.php:335
-#: ../../mod/register.php:342 ../../mod/register.php:349
-#: ../../mod/profile_photo.php:60 ../../mod/profile_photo.php:67
-#: ../../mod/profile_photo.php:74 ../../mod/profile_photo.php:174
-#: ../../mod/profile_photo.php:252 ../../mod/profile_photo.php:261
+#: ../../mod/photos.php:156 ../../mod/photos.php:660 ../../mod/photos.php:1049
+#: ../../mod/photos.php:1064 ../../mod/profile_photo.php:60
+#: ../../mod/profile_photo.php:67 ../../mod/profile_photo.php:74
+#: ../../mod/profile_photo.php:176 ../../mod/profile_photo.php:254
+#: ../../mod/profile_photo.php:263
#: ../../addon/communityhome/communityhome.php:111
-#: ../../view/theme/diabook/theme.php:527
+#: ../../view/theme/diabook/theme.php:599 ../../include/user.php:304
+#: ../../include/user.php:311 ../../include/user.php:318
msgid "Profile Photos"
msgstr "Profilbildoj"
-#: ../../mod/photos.php:161
+#: ../../mod/photos.php:166
msgid "Album not found."
msgstr "Albumo ne trovita."
-#: ../../mod/photos.php:179 ../../mod/photos.php:959
+#: ../../mod/photos.php:184 ../../mod/photos.php:1058
msgid "Delete Album"
msgstr "ForviÅi albumon"
-#: ../../mod/photos.php:242 ../../mod/photos.php:1194
+#: ../../mod/photos.php:247 ../../mod/photos.php:1304
msgid "Delete Photo"
msgstr "ForviÅi bildon"
-#: ../../mod/photos.php:528
+#: ../../mod/photos.php:591
msgid "was tagged in a"
msgstr "estas markita en"
-#: ../../mod/photos.php:528 ../../mod/like.php:127 ../../mod/tagger.php:70
+#: ../../mod/photos.php:591 ../../mod/like.php:144 ../../mod/tagger.php:70
#: ../../addon/communityhome/communityhome.php:163
-#: ../../view/theme/diabook/theme.php:498 ../../include/text.php:1305
-#: ../../include/diaspora.php:1654 ../../include/conversation.php:53
+#: ../../view/theme/diabook/theme.php:570 ../../include/text.php:1317
+#: ../../include/diaspora.php:1710 ../../include/conversation.php:53
#: ../../include/conversation.php:126
msgid "photo"
msgstr "bildo"
-#: ../../mod/photos.php:528
+#: ../../mod/photos.php:591
msgid "by"
msgstr "de"
-#: ../../mod/photos.php:631 ../../addon/js_upload/js_upload.php:315
+#: ../../mod/photos.php:696 ../../addon/js_upload/js_upload.php:315
msgid "Image exceeds size limit of "
msgstr "Bildo estas pli granda ol la limito de"
-#: ../../mod/photos.php:639
+#: ../../mod/photos.php:704
msgid "Image file is empty."
msgstr "Bilddosiero estas malplena."
-#: ../../mod/photos.php:653 ../../mod/profile_photo.php:124
-#: ../../mod/wall_upload.php:83
+#: ../../mod/photos.php:736 ../../mod/profile_photo.php:126
+#: ../../mod/wall_upload.php:99
msgid "Unable to process image."
msgstr "Ne eblas procedi la bildon."
-#: ../../mod/photos.php:673 ../../mod/profile_photo.php:257
-#: ../../mod/wall_upload.php:102
+#: ../../mod/photos.php:757 ../../mod/profile_photo.php:259
+#: ../../mod/wall_upload.php:118
msgid "Image upload failed."
msgstr "AlÅuto de bildo malsukcesis."
-#: ../../mod/photos.php:759 ../../mod/community.php:16
-#: ../../mod/dfrn_request.php:732 ../../mod/viewcontacts.php:17
+#: ../../mod/photos.php:843 ../../mod/community.php:16
+#: ../../mod/dfrn_request.php:759 ../../mod/viewcontacts.php:17
#: ../../mod/display.php:7 ../../mod/search.php:71 ../../mod/directory.php:29
msgid "Public access denied."
msgstr "Publika atingo ne permesita."
-#: ../../mod/photos.php:769
+#: ../../mod/photos.php:853
msgid "No photos selected"
msgstr "Neniu bildoj elektita"
-#: ../../mod/photos.php:846
+#: ../../mod/photos.php:932
msgid "Access to this item is restricted."
msgstr "Atingo al tio elemento estas limigita."
-#: ../../mod/photos.php:907
+#: ../../mod/photos.php:996
+#, php-format
+msgid "You have used %1$.2f Mbytes of %2$.2f Mbytes photo storage."
+msgstr "Vi uzas %1$.2f MB de %2$.2f MB bildkonservejo."
+
+#: ../../mod/photos.php:999
+#, php-format
+msgid "You have used %1$.2f Mbytes of photo storage."
+msgstr "Vi uzas %1$.2f MB de bildkonservejo."
+
+#: ../../mod/photos.php:1005
msgid "Upload Photos"
msgstr "AlÅuti bildojn"
-#: ../../mod/photos.php:910 ../../mod/photos.php:954
+#: ../../mod/photos.php:1009 ../../mod/photos.php:1053
msgid "New album name: "
msgstr "Nomo por nova albumo:"
-#: ../../mod/photos.php:911
+#: ../../mod/photos.php:1010
msgid "or existing album name: "
msgstr "aÅ­ nomo de estanta albumo:"
-#: ../../mod/photos.php:912
+#: ../../mod/photos.php:1011
msgid "Do not show a status post for this upload"
msgstr "Ne kreu statan afiÅon por tio alÅuto."
-#: ../../mod/photos.php:914 ../../mod/photos.php:1189
+#: ../../mod/photos.php:1013 ../../mod/photos.php:1299
msgid "Permissions"
msgstr "Permesoj"
-#: ../../mod/photos.php:969
+#: ../../mod/photos.php:1068
msgid "Edit Album"
msgstr "Redakti albumon"
-#: ../../mod/photos.php:984 ../../mod/photos.php:1407
+#: ../../mod/photos.php:1092 ../../mod/photos.php:1525
msgid "View Photo"
msgstr "Vidi bildon"
-#: ../../mod/photos.php:1019
+#: ../../mod/photos.php:1127
msgid "Permission denied. Access to this item may be restricted."
msgstr "Malpermesita. Atingo al tio elemento eble estas limigita."
-#: ../../mod/photos.php:1021
+#: ../../mod/photos.php:1129
msgid "Photo not available"
msgstr "La bildo ne disponeblas"
-#: ../../mod/photos.php:1071
+#: ../../mod/photos.php:1179
msgid "View photo"
msgstr "Vidi bildon"
-#: ../../mod/photos.php:1071
+#: ../../mod/photos.php:1179
msgid "Edit photo"
msgstr "Redakti bildon"
-#: ../../mod/photos.php:1072
+#: ../../mod/photos.php:1180
msgid "Use as profile photo"
msgstr "Uzi kiel profilbildo"
-#: ../../mod/photos.php:1078 ../../include/conversation.php:480
+#: ../../mod/photos.php:1186 ../../include/conversation.php:490
msgid "Private Message"
msgstr "Privata mesaÄo"
-#: ../../mod/photos.php:1100
+#: ../../mod/photos.php:1208
msgid "View Full Size"
msgstr "Vidi plengrande "
-#: ../../mod/photos.php:1168
+#: ../../mod/photos.php:1276
msgid "Tags: "
msgstr "Markoj:"
-#: ../../mod/photos.php:1171
+#: ../../mod/photos.php:1279
msgid "[Remove any tag]"
msgstr "[ForviÅi iun markon]"
-#: ../../mod/photos.php:1182
+#: ../../mod/photos.php:1289
+msgid "Rotate CW (right)"
+msgstr "Turni horloÄdirekte (dekstren)"
+
+#: ../../mod/photos.php:1290
+msgid "Rotate CCW (left)"
+msgstr "Turni kontraÅ­horloÄdirekte (maldekstren)"
+
+#: ../../mod/photos.php:1292
msgid "New album name"
msgstr "Nova nomo de albumo"
-#: ../../mod/photos.php:1185
+#: ../../mod/photos.php:1295
msgid "Caption"
msgstr "Apudskribo"
-#: ../../mod/photos.php:1187
+#: ../../mod/photos.php:1297
msgid "Add a Tag"
msgstr "Aldoni markon"
-#: ../../mod/photos.php:1191
+#: ../../mod/photos.php:1301
msgid ""
"Example: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping"
msgstr "Ekzemple: @bob, @Barbara_Jensen, @jim@example.com, #California, #camping"
-#: ../../mod/photos.php:1211 ../../include/conversation.php:529
+#: ../../mod/photos.php:1321 ../../include/conversation.php:554
msgid "I like this (toggle)"
msgstr "Mi Åatas tion (Åalti)"
-#: ../../mod/photos.php:1212 ../../include/conversation.php:530
+#: ../../mod/photos.php:1322 ../../include/conversation.php:555
msgid "I don't like this (toggle)"
msgstr "Mi malÅatas tion(Åalti)"
-#: ../../mod/photos.php:1213 ../../include/conversation.php:964
+#: ../../mod/photos.php:1323 ../../include/conversation.php:993
msgid "Share"
msgstr "Kunhavigi"
-#: ../../mod/photos.php:1214 ../../mod/editpost.php:104
-#: ../../mod/wallmessage.php:145 ../../mod/message.php:213
-#: ../../mod/message.php:405 ../../include/conversation.php:361
-#: ../../include/conversation.php:706 ../../include/conversation.php:983
+#: ../../mod/photos.php:1324 ../../mod/editpost.php:104
+#: ../../mod/wallmessage.php:145 ../../mod/message.php:215
+#: ../../mod/message.php:411 ../../include/conversation.php:371
+#: ../../include/conversation.php:731 ../../include/conversation.php:1012
msgid "Please wait"
msgstr "Bonvolu atendi"
-#: ../../mod/photos.php:1230 ../../mod/photos.php:1270
-#: ../../mod/photos.php:1301 ../../include/conversation.php:552
+#: ../../mod/photos.php:1340 ../../mod/photos.php:1380
+#: ../../mod/photos.php:1411 ../../include/conversation.php:577
msgid "This is you"
msgstr "Tiu estas vi"
-#: ../../mod/photos.php:1232 ../../mod/photos.php:1272
-#: ../../mod/photos.php:1303 ../../include/conversation.php:554
-#: ../../boot.php:512
+#: ../../mod/photos.php:1342 ../../mod/photos.php:1382
+#: ../../mod/photos.php:1413 ../../include/conversation.php:579
+#: ../../boot.php:528
msgid "Comment"
msgstr "Komenti"
-#: ../../mod/photos.php:1234 ../../mod/editpost.php:125
-#: ../../include/conversation.php:564 ../../include/conversation.php:1001
+#: ../../mod/photos.php:1344 ../../mod/editpost.php:125
+#: ../../include/conversation.php:589 ../../include/conversation.php:1030
msgid "Preview"
msgstr "AntaÅ­rigardi"
-#: ../../mod/photos.php:1331 ../../mod/settings.php:602
-#: ../../mod/settings.php:683 ../../mod/group.php:168 ../../mod/admin.php:647
-#: ../../include/conversation.php:318 ../../include/conversation.php:584
+#: ../../mod/photos.php:1441 ../../mod/settings.php:618
+#: ../../mod/settings.php:707 ../../mod/group.php:168 ../../mod/admin.php:663
+#: ../../include/conversation.php:328 ../../include/conversation.php:609
msgid "Delete"
msgstr "ForviÅi"
-#: ../../mod/photos.php:1413
+#: ../../mod/photos.php:1531
msgid "View Album"
msgstr "Vidi albumon"
-#: ../../mod/photos.php:1422
+#: ../../mod/photos.php:1540
msgid "Recent Photos"
msgstr "Ì‚Ä´usaj bildoj"
@@ -575,12 +613,12 @@ msgstr "Ì‚Ä´usaj bildoj"
msgid "Not available."
msgstr "Ne disponebla."
-#: ../../mod/community.php:30 ../../view/theme/diabook/theme.php:129
+#: ../../mod/community.php:30 ../../view/theme/diabook/theme.php:133
#: ../../include/nav.php:101
msgid "Community"
msgstr "Komunumo"
-#: ../../mod/community.php:61 ../../mod/search.php:128
+#: ../../mod/community.php:61 ../../mod/search.php:144
msgid "No results."
msgstr "Nenion trovita."
@@ -624,28 +662,28 @@ msgstr "Elemento ne trovita"
msgid "Edit post"
msgstr "Redakti afiÅon"
-#: ../../mod/editpost.php:80 ../../include/conversation.php:950
+#: ../../mod/editpost.php:80 ../../include/conversation.php:979
msgid "Post to Email"
-msgstr "Sendi tra retpoÅto"
+msgstr "Sendi per retpoÅto"
-#: ../../mod/editpost.php:95 ../../mod/settings.php:601
-#: ../../include/conversation.php:571
+#: ../../mod/editpost.php:95 ../../mod/settings.php:617
+#: ../../include/conversation.php:596
msgid "Edit"
msgstr "Redakti"
#: ../../mod/editpost.php:96 ../../mod/wallmessage.php:143
-#: ../../mod/message.php:211 ../../mod/message.php:403
-#: ../../include/conversation.php:965
+#: ../../mod/message.php:213 ../../mod/message.php:408
+#: ../../include/conversation.php:994
msgid "Upload photo"
msgstr "AlÅuti bildon"
-#: ../../mod/editpost.php:97 ../../include/conversation.php:967
+#: ../../mod/editpost.php:97 ../../include/conversation.php:996
msgid "Attach file"
msgstr "Kunligi dosieron"
#: ../../mod/editpost.php:98 ../../mod/wallmessage.php:144
-#: ../../mod/message.php:212 ../../mod/message.php:404
-#: ../../include/conversation.php:969
+#: ../../mod/message.php:214 ../../mod/message.php:409
+#: ../../include/conversation.php:998
msgid "Insert web link"
msgstr "Enmeti retan adreson"
@@ -661,35 +699,35 @@ msgstr "Enmeti videton en formato Vorbis [.ogg]"
msgid "Insert Vorbis [.ogg] audio"
msgstr "Enmeti sonon en formato Vorbis [.ogg]"
-#: ../../mod/editpost.php:102 ../../include/conversation.php:975
+#: ../../mod/editpost.php:102 ../../include/conversation.php:1004
msgid "Set your location"
msgstr "Agordi vian lokon"
-#: ../../mod/editpost.php:103 ../../include/conversation.php:977
+#: ../../mod/editpost.php:103 ../../include/conversation.php:1006
msgid "Clear browser location"
msgstr "ForviÅu retesplorilan lokon"
-#: ../../mod/editpost.php:105 ../../include/conversation.php:984
+#: ../../mod/editpost.php:105 ../../include/conversation.php:1013
msgid "Permission settings"
msgstr "Permesagordoj"
-#: ../../mod/editpost.php:113 ../../include/conversation.php:993
+#: ../../mod/editpost.php:113 ../../include/conversation.php:1022
msgid "CC: email addresses"
msgstr "CC: retpoÅtadresojn"
-#: ../../mod/editpost.php:114 ../../include/conversation.php:994
+#: ../../mod/editpost.php:114 ../../include/conversation.php:1023
msgid "Public post"
msgstr "Publika afiÅo"
-#: ../../mod/editpost.php:117 ../../include/conversation.php:980
+#: ../../mod/editpost.php:117 ../../include/conversation.php:1009
msgid "Set title"
msgstr "Redakti titolon"
-#: ../../mod/editpost.php:119 ../../include/conversation.php:982
+#: ../../mod/editpost.php:119 ../../include/conversation.php:1011
msgid "Categories (comma-separated list)"
msgstr "Kategorioj (disigita per komo)"
-#: ../../mod/editpost.php:120 ../../include/conversation.php:996
+#: ../../mod/editpost.php:120 ../../include/conversation.php:1025
msgid "Example: bob@example.com, mary@example.com"
msgstr "Ekzemple: bob@example.com, mary@example.com"
@@ -697,201 +735,200 @@ msgstr "Ekzemple: bob@example.com, mary@example.com"
msgid "This introduction has already been accepted."
msgstr "Tia prezento jam estas akceptita"
-#: ../../mod/dfrn_request.php:117 ../../mod/dfrn_request.php:487
+#: ../../mod/dfrn_request.php:118 ../../mod/dfrn_request.php:512
msgid "Profile location is not valid or does not contain profile information."
msgstr "La adreso de la profilo ne validas aÅ­ ne enhavas profilinformojn."
-#: ../../mod/dfrn_request.php:122 ../../mod/dfrn_request.php:492
+#: ../../mod/dfrn_request.php:123 ../../mod/dfrn_request.php:517
msgid "Warning: profile location has no identifiable owner name."
msgstr "Averto: La adreso de la profilo ne enhavas identeblan personan nomon."
-#: ../../mod/dfrn_request.php:124 ../../mod/dfrn_request.php:494
+#: ../../mod/dfrn_request.php:125 ../../mod/dfrn_request.php:519
msgid "Warning: profile location has no profile photo."
msgstr "Averto: La adreso de la profilo ne enhavas bildon."
-#: ../../mod/dfrn_request.php:127 ../../mod/dfrn_request.php:497
+#: ../../mod/dfrn_request.php:128 ../../mod/dfrn_request.php:522
#, php-format
msgid "%d required parameter was not found at the given location"
msgid_plural "%d required parameters were not found at the given location"
msgstr[0] "%d bezonataj parametroj ne trovita ĉe la donata adreso."
msgstr[1] "%d bezonataj parametroj ne trovita ĉe la donata adreso."
-#: ../../mod/dfrn_request.php:168
+#: ../../mod/dfrn_request.php:170
msgid "Introduction complete."
msgstr "Prezento sukcesis."
-#: ../../mod/dfrn_request.php:192
+#: ../../mod/dfrn_request.php:209
msgid "Unrecoverable protocol error."
msgstr "NeÄustigebla eraro en protokolo."
-#: ../../mod/dfrn_request.php:220
+#: ../../mod/dfrn_request.php:237
msgid "Profile unavailable."
msgstr "Profilo ne estas disponebla."
-#: ../../mod/dfrn_request.php:245
+#: ../../mod/dfrn_request.php:262
#, php-format
msgid "%s has received too many connection requests today."
msgstr "%s hodiaÅ­ ricevis tro multe da konektpetoj."
-#: ../../mod/dfrn_request.php:246
+#: ../../mod/dfrn_request.php:263
msgid "Spam protection measures have been invoked."
msgstr "KontraÅ­spamilo estas aktivita."
-#: ../../mod/dfrn_request.php:247
+#: ../../mod/dfrn_request.php:264
msgid "Friends are advised to please try again in 24 hours."
msgstr "Amikoj, vi bonvolu ripeti post 24 horoj."
-#: ../../mod/dfrn_request.php:309
+#: ../../mod/dfrn_request.php:326
msgid "Invalid locator"
msgstr "Nevalida adreso."
-#: ../../mod/dfrn_request.php:318
+#: ../../mod/dfrn_request.php:335
msgid "Invalid email address."
msgstr "Nevalida repoÅtadreso."
-#: ../../mod/dfrn_request.php:344
+#: ../../mod/dfrn_request.php:361
msgid "This account has not been configured for email. Request failed."
msgstr "La konto ne estas agordita por retpoÅto. La peto malsukcesis."
-#: ../../mod/dfrn_request.php:432
+#: ../../mod/dfrn_request.php:457
msgid "Unable to resolve your name at the provided location."
msgstr "Via nomo ne troveblas al la donita adreso."
-#: ../../mod/dfrn_request.php:445
+#: ../../mod/dfrn_request.php:470
msgid "You have already introduced yourself here."
msgstr "Vi vin jam prezentis tie."
-#: ../../mod/dfrn_request.php:449
+#: ../../mod/dfrn_request.php:474
#, php-format
msgid "Apparently you are already friends with %s."
msgstr "Åœajnas kvazaÅ­ vi jam amikiÄis kun %s."
-#: ../../mod/dfrn_request.php:470
+#: ../../mod/dfrn_request.php:495
msgid "Invalid profile URL."
msgstr "Nevalida adreso de profilo."
-#: ../../mod/dfrn_request.php:476 ../../mod/follow.php:23
+#: ../../mod/dfrn_request.php:501 ../../include/follow.php:27
msgid "Disallowed profile URL."
msgstr "Malpermesita adreso de profilo."
-#: ../../mod/dfrn_request.php:545 ../../mod/contacts.php:102
+#: ../../mod/dfrn_request.php:570 ../../mod/contacts.php:122
msgid "Failed to update contact record."
msgstr "Äœisdatigo de via kontaktrikordo malsukcesis."
-#: ../../mod/dfrn_request.php:566
+#: ../../mod/dfrn_request.php:591
msgid "Your introduction has been sent."
msgstr "Via prezento estas sendita."
-#: ../../mod/dfrn_request.php:619
+#: ../../mod/dfrn_request.php:644
msgid "Please login to confirm introduction."
msgstr "Bonvolu ensaluti por jesigi la prezenton."
-#: ../../mod/dfrn_request.php:633
+#: ../../mod/dfrn_request.php:658
msgid ""
"Incorrect identity currently logged in. Please login to "
"<strong>this</strong> profile."
msgstr "MalÄusta identaĵo ensalutata. Bonvolu ensaluti en <strong>tiun</strong> profilon."
-#: ../../mod/dfrn_request.php:645
+#: ../../mod/dfrn_request.php:669
+msgid "Hide this contact"
+msgstr "KaÅi tiun kontakton"
+
+#: ../../mod/dfrn_request.php:672
#, php-format
msgid "Welcome home %s."
msgstr "Bonvenon hejme, %s."
-#: ../../mod/dfrn_request.php:646
+#: ../../mod/dfrn_request.php:673
#, php-format
msgid "Please confirm your introduction/connection request to %s."
msgstr "Bonvolu konfirmi vian prezenton / kontaktpeton al %s."
-#: ../../mod/dfrn_request.php:647
+#: ../../mod/dfrn_request.php:674
msgid "Confirm"
msgstr "Konfirmi."
-#: ../../mod/dfrn_request.php:688 ../../include/items.php:2717
+#: ../../mod/dfrn_request.php:715 ../../include/items.php:2881
msgid "[Name Withheld]"
msgstr "[KaÅita nomo]"
-#: ../../mod/dfrn_request.php:781
+#: ../../mod/dfrn_request.php:808
msgid ""
"Please enter your 'Identity Address' from one of the following supported "
"communications networks:"
msgstr "Bonvolu entajpi vian 'Identecan Adreson' de iu de tiuj subtenataj komunikaj retejoj: "
-#: ../../mod/dfrn_request.php:797
+#: ../../mod/dfrn_request.php:824
msgid "<strike>Connect as an email follower</strike> (Coming soon)"
msgstr "<strike>Konektu kiel retpoÅta sekvanto</strike> (BaldaÅ­ venos)"
-#: ../../mod/dfrn_request.php:799
+#: ../../mod/dfrn_request.php:826
msgid ""
"If you are not yet a member of the free social web, <a "
"href=\"http://dir.friendica.com/siteinfo\">follow this link to find a public"
" Friendica site and join us today</a>."
msgstr "Se vi ne estas membro de la libra interkona reto, <a href=\"http://dir.friendica.com/siteinfo\">sekvu ĉi-ligilon por trovi publikan Friendica retejon kaj aliÄi kun ni hodiaÅ­</a>."
-#: ../../mod/dfrn_request.php:802
+#: ../../mod/dfrn_request.php:829
msgid "Friend/Connection Request"
msgstr "Prezento / Konektpeto"
-#: ../../mod/dfrn_request.php:803
+#: ../../mod/dfrn_request.php:830
msgid ""
"Examples: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, "
"testuser@identi.ca"
msgstr "Ekzemploj: jojo@demo.friendica.com, http://demo.friendica.com/profile/jojo, testuser@identi.ca"
-#: ../../mod/dfrn_request.php:804
+#: ../../mod/dfrn_request.php:831
msgid "Please answer the following:"
msgstr "Bonvolu respondi:"
-#: ../../mod/dfrn_request.php:805
+#: ../../mod/dfrn_request.php:832
#, php-format
msgid "Does %s know you?"
msgstr "Ĉu %s konas vin?"
-#: ../../mod/dfrn_request.php:808
+#: ../../mod/dfrn_request.php:835
msgid "Add a personal note:"
msgstr "Aldoni personan noton:"
-#: ../../mod/dfrn_request.php:810 ../../include/contact_selectors.php:76
+#: ../../mod/dfrn_request.php:837 ../../include/contact_selectors.php:76
msgid "Friendica"
msgstr "Friendica"
-#: ../../mod/dfrn_request.php:811
+#: ../../mod/dfrn_request.php:838
msgid "StatusNet/Federated Social Web"
msgstr "StatusNet/Federaciaj interkonaj retejoj"
-#: ../../mod/dfrn_request.php:812 ../../mod/settings.php:636
+#: ../../mod/dfrn_request.php:839 ../../mod/settings.php:652
#: ../../include/contact_selectors.php:80
msgid "Diaspora"
msgstr "Diaspora"
-#: ../../mod/dfrn_request.php:813
+#: ../../mod/dfrn_request.php:840
#, php-format
msgid ""
" - please do not use this form. Instead, enter %s into your Diaspora search"
" bar."
msgstr " - bonvolu ne uzi ĉi formo. Anstataŭe, entajpu %s en la Diaspora serĉilo."
-#: ../../mod/dfrn_request.php:814
+#: ../../mod/dfrn_request.php:841
msgid "Your Identity Address:"
msgstr "Via identeca adreso:"
-#: ../../mod/dfrn_request.php:817
+#: ../../mod/dfrn_request.php:844
msgid "Submit Request"
msgstr "Sendi peton"
-#: ../../mod/install.php:111
+#: ../../mod/install.php:117
msgid "Friendica Social Communications Server - Setup"
msgstr "Friendica Interkona Komunikada Servilo - Instalo"
-#: ../../mod/install.php:117 ../../mod/install.php:157
-#: ../../mod/install.php:230
-msgid "Database connection"
-msgstr "Datumbaza konekto"
-
-#: ../../mod/install.php:124
+#: ../../mod/install.php:123
msgid "Could not connect to database."
msgstr "Ne eblas konekti la datumbazon."
-#: ../../mod/install.php:128
+#: ../../mod/install.php:127
msgid "Could not create table."
msgstr "Ne eblas krei tabelon."
@@ -899,232 +936,246 @@ msgstr "Ne eblas krei tabelon."
msgid "Your Friendica site database has been installed."
msgstr "La datumbazo de vi Friendica retjo estas instalita."
-#: ../../mod/install.php:134
-msgid ""
-"IMPORTANT: You will need to [manually] setup a scheduled task for the "
-"poller."
-msgstr "GRAVA: Vi bezonas [mane] agordi planitan taskon por la Friendica poller."
-
-#: ../../mod/install.php:135 ../../mod/install.php:151
-#: ../../mod/install.php:209
-msgid "Please see the file \"INSTALL.txt\"."
-msgstr "Bonvolu legi la dosieron \"INSTALL.txt\"."
-
-#: ../../mod/install.php:137
-msgid "Proceed to registration"
-msgstr "Pluigi al la registrilo"
-
-#: ../../mod/install.php:143
-msgid "Proceed with Installation"
-msgstr "Pluigi la instalado"
-
-#: ../../mod/install.php:150
+#: ../../mod/install.php:138
msgid ""
"You may need to import the file \"database.sql\" manually using phpmyadmin "
"or mysql."
-msgstr "Vi bezonas mane importi la dosieron \"database.sql\" tra phpmyadmin aÅ­ mysql."
+msgstr "Vi bezonas mane importi la dosieron \"database.sql\" per phpmyadmin aÅ­ mysql."
-#: ../../mod/install.php:158
-msgid "Database import failed."
-msgstr "Importo de la datumbazo malsukcesis."
+#: ../../mod/install.php:139 ../../mod/install.php:204
+#: ../../mod/install.php:489
+msgid "Please see the file \"INSTALL.txt\"."
+msgstr "Bonvolu legi la dosieron \"INSTALL.txt\"."
-#: ../../mod/install.php:206
+#: ../../mod/install.php:201
msgid "System check"
msgstr "Sistema kontrolo"
-#: ../../mod/install.php:211
+#: ../../mod/install.php:206
msgid "Check again"
msgstr "Ree kontroli"
-#: ../../mod/install.php:231
+#: ../../mod/install.php:225
+msgid "Database connection"
+msgstr "Datumbaza konekto"
+
+#: ../../mod/install.php:226
msgid ""
"In order to install Friendica we need to know how to connect to your "
"database."
msgstr "Por instali Friendica, ni bezonas scii kiel konekti al via datumbazo."
-#: ../../mod/install.php:232
+#: ../../mod/install.php:227
msgid ""
"Please contact your hosting provider or site administrator if you have "
"questions about these settings."
msgstr "Bonvolu kontakti vian servilprovizanton aŭ administranton se vi havas demandoj pri ĉi tiaj agordoj."
-#: ../../mod/install.php:233
+#: ../../mod/install.php:228
msgid ""
"The database you specify below should already exist. If it does not, please "
"create it before continuing."
msgstr "La datumbazo nomata malsupren jam ekzistu. Se Äi ne ekzistas, bonvolu unue krei Äin antaÅ­ progresi."
-#: ../../mod/install.php:237
+#: ../../mod/install.php:232
msgid "Database Server Name"
msgstr "Nomo de datumbaza servilo."
-#: ../../mod/install.php:238
+#: ../../mod/install.php:233
msgid "Database Login Name"
msgstr "Salutnomo ĉe la datumbazo."
-#: ../../mod/install.php:239
+#: ../../mod/install.php:234
msgid "Database Login Password"
msgstr "Pasvorto ĉe la datumbazo."
-#: ../../mod/install.php:240
+#: ../../mod/install.php:235
msgid "Database Name"
msgstr "Nomo de la datumbazo."
-#: ../../mod/install.php:241 ../../mod/install.php:280
+#: ../../mod/install.php:236 ../../mod/install.php:275
msgid "Site administrator email address"
msgstr "RetpoÅtadreso de la reteja administranto"
-#: ../../mod/install.php:241 ../../mod/install.php:280
+#: ../../mod/install.php:236 ../../mod/install.php:275
msgid ""
"Your account email address must match this in order to use the web admin "
"panel."
msgstr "La repoÅtadreso de via konto bezonas esti la sama por uzi la TTTa administrilo."
-#: ../../mod/install.php:245 ../../mod/install.php:283
+#: ../../mod/install.php:240 ../../mod/install.php:278
msgid "Please select a default timezone for your website"
msgstr "Bonvolu elekti defaÅ­ltan horzonon por via retejo."
-#: ../../mod/install.php:270
+#: ../../mod/install.php:265
msgid "Site settings"
msgstr "Retejaj agordoj"
-#: ../../mod/install.php:323
+#: ../../mod/install.php:318
msgid "Could not find a command line version of PHP in the web server PATH."
msgstr "Komanda linia versio de PHP ne trovita en $PATH de la retservilo."
-#: ../../mod/install.php:326
+#: ../../mod/install.php:319
+msgid ""
+"If you don't have a command line version of PHP installed on server, you "
+"will not be able to run background polling via cron. See <a "
+"href='http://friendica.com/node/27'>'Activating scheduled tasks'</a>"
+msgstr "Se vi ne havas komandlinian version de PHP sur la servilo, vi ne eblas plenumi fonan planitan enketon per cron. Bonvolu legi <a href='http://friendica.com/node/27'>'Activating scheduled tasks'</a>"
+
+#: ../../mod/install.php:323
msgid "PHP executable path"
msgstr "Vojo de la komanda linia versio de PHP"
-#: ../../mod/install.php:326
-msgid "Enter full path to php executable"
-msgstr "Entajpu plenan vojon al la komanda linia versio de PHP"
+#: ../../mod/install.php:323
+msgid ""
+"Enter full path to php executable. You can leave this blank to continue the "
+"installation."
+msgstr "Entajpu la plenan vojon al la php komandodosiero. Vi eblas lasi tion malplena por pluigi la instalado."
-#: ../../mod/install.php:331
+#: ../../mod/install.php:328
msgid "Command line PHP"
msgstr "komanda linia versio de PHP"
-#: ../../mod/install.php:340
+#: ../../mod/install.php:337
msgid ""
"The command line version of PHP on your system does not have "
"\"register_argc_argv\" enabled."
msgstr "En via komanda linia versio de PHP je via sistemo, \"register_argc_argv\" ne estas aktivita."
-#: ../../mod/install.php:341
+#: ../../mod/install.php:338
msgid "This is required for message delivery to work."
msgstr "Tio estas bezonata por la livero de mesaÄoj."
-#: ../../mod/install.php:343
+#: ../../mod/install.php:340
msgid "PHP register_argc_argv"
msgstr "PHP register_argc_argv"
-#: ../../mod/install.php:364
+#: ../../mod/install.php:361
msgid ""
"Error: the \"openssl_pkey_new\" function on this system is not able to "
"generate encryption keys"
msgstr "Eraro: La funkcio \"openssl_pkey_new\" je tia sistemo ne eblas generi ĉifroÅlosilojn."
-#: ../../mod/install.php:365
+#: ../../mod/install.php:362
msgid ""
"If running under Windows, please see "
"\"http://www.php.net/manual/en/openssl.installation.php\"."
msgstr "Se la operaciumo sistemo estas Windows, bonvolu legi: http://www.php.net/manual/en/openssl.installation.php"
-#: ../../mod/install.php:367
+#: ../../mod/install.php:364
msgid "Generate encryption keys"
msgstr "Generi ĉifroÅlosilojn"
-#: ../../mod/install.php:374
+#: ../../mod/install.php:371
msgid "libCurl PHP module"
msgstr "PHP modulo libCurl"
-#: ../../mod/install.php:375
+#: ../../mod/install.php:372
msgid "GD graphics PHP module"
msgstr "PHP modulo GD"
-#: ../../mod/install.php:376
+#: ../../mod/install.php:373
msgid "OpenSSL PHP module"
msgstr "PHP modulo OpenSSL"
-#: ../../mod/install.php:377
+#: ../../mod/install.php:374
msgid "mysqli PHP module"
msgstr "PHP modulo mysqli"
-#: ../../mod/install.php:378
+#: ../../mod/install.php:375
msgid "mb_string PHP module"
msgstr "PHP modulo mb_string"
-#: ../../mod/install.php:383 ../../mod/install.php:385
+#: ../../mod/install.php:380 ../../mod/install.php:382
msgid "Apache mod_rewrite module"
msgstr "Apache mod_rewrite modulo"
-#: ../../mod/install.php:383
+#: ../../mod/install.php:380
msgid ""
"Error: Apache webserver mod-rewrite module is required but not installed."
msgstr "Eraro: La modulo mod_rewrite en la Apache retservilo estas bezonata sed ne instalita."
-#: ../../mod/install.php:390
+#: ../../mod/install.php:388
msgid "Error: libCURL PHP module required but not installed."
msgstr "Eraro: La modulo libCURL en PHP estas bezonata sed ne instalita."
-#: ../../mod/install.php:394
+#: ../../mod/install.php:392
msgid ""
"Error: GD graphics PHP module with JPEG support required but not installed."
msgstr "Eraro: La modulo GD en PHP kun subteno por JPEG estas bezonata sed ne instalita."
-#: ../../mod/install.php:398
+#: ../../mod/install.php:396
msgid "Error: openssl PHP module required but not installed."
msgstr "Eraro: La modulo OpenSSL en PHP estas bezonata sed ne instalita."
-#: ../../mod/install.php:402
+#: ../../mod/install.php:400
msgid "Error: mysqli PHP module required but not installed."
msgstr "Eraro: La modulo mysqli en PHP estas bezonata sed ne instalita."
-#: ../../mod/install.php:406
+#: ../../mod/install.php:404
msgid "Error: mb_string PHP module required but not installed."
msgstr "Eraro: La modulo mb_string en PHP estas bezonata sed ne instalita."
-#: ../../mod/install.php:423
+#: ../../mod/install.php:421
msgid ""
"The web installer needs to be able to create a file called \".htconfig.php\""
" in the top folder of your web server and it is unable to do so."
msgstr "La reta instalilo bezonas skribi dosieron nomata \".htconfig.php\" en la baza dosierujo de la retservilo, sed ne sukcesis."
-#: ../../mod/install.php:424
+#: ../../mod/install.php:422
msgid ""
"This is most often a permission setting, as the web server may not be able "
"to write files in your folder - even if you can."
msgstr "Tio ĉi plej ofte estas agordo rilate al permesoj, ĉar la servilo eble ne povas skribi en via dosierujo, eĉ se vi mem povas skribi."
-#: ../../mod/install.php:425
+#: ../../mod/install.php:423
msgid ""
-"Please check with your site documentation or support people to see if this "
-"situation can be corrected."
-msgstr "Bonvolu kontroli la dokumentojn de via servilo aÅ­ teÄ¥nikiston por ekscii ĉu la situacio Äustigeblas."
+"At the end of this procedure, we will give you a text to save in a file "
+"named .htconfig.php in your Friendica top folder."
+msgstr "Post la fino de tiu proceduro, ni donos al vi tekston por konservi en dosiero .htconfig.php en via baza Friendica dosierujo."
-#: ../../mod/install.php:426
+#: ../../mod/install.php:424
msgid ""
-"If not, you may be required to perform a manual installation. Please see the"
-" file \"INSTALL.txt\" for instructions."
-msgstr "Se ne, vi eble bezonas instali mane. Bonvolu legi la dosieron \"INSTALL.txt\" por pluaj instruaĵoj."
+"You can alternatively skip this procedure and perform a manual installation."
+" Please see the file \"INSTALL.txt\" for instructions."
+msgstr "Vi ankaÅ­ povas preterpasi tiun proceduron kaj fari permanan instaladon. Bonvolu legi la dosieron \"INSTALL.txt\" por trovi instrukciojn."
-#: ../../mod/install.php:429
+#: ../../mod/install.php:427
msgid ".htconfig.php is writable"
msgstr ".htconfig.php estas skribebla."
-#: ../../mod/install.php:436
+#: ../../mod/install.php:439
+msgid ""
+"Url rewrite in .htaccess is not working. Check your server configuration."
+msgstr "Url rewrite en .htaccess ne funkcias. Kontrolu la agordojn de la servilo."
+
+#: ../../mod/install.php:441
+msgid "Url rewrite is working"
+msgstr "URL rewrite funkcias."
+
+#: ../../mod/install.php:451
msgid ""
"The database configuration file \".htconfig.php\" could not be written. "
"Please use the enclosed text to create a configuration file in your web "
"server root."
msgstr "Ne povis skribi la datumbaza agordoj en la dosiero \".htconfig.php\". Bonvolu uzi la inkluzivan tekston por krei agordan dosieron en la baza dosierujo de la retservilo."
-#: ../../mod/install.php:461
+#: ../../mod/install.php:476
msgid "Errors encountered creating database tables."
msgstr "Okazis eraroj dum la kreado de tabeloj en la datumbazo."
+#: ../../mod/install.php:487
+msgid "<h1>What next</h1>"
+msgstr "<h1>Kio sekvas nun?</h1>"
+
+#: ../../mod/install.php:488
+msgid ""
+"IMPORTANT: You will need to [manually] setup a scheduled task for the "
+"poller."
+msgstr "GRAVA: Vi bezonas [mane] agordi planitan taskon por la Friendica poller."
+
#: ../../mod/localtime.php:12 ../../include/event.php:11
-#: ../../include/bb2diaspora.php:238
+#: ../../include/bb2diaspora.php:335
msgid "l F d, Y \\@ g:i A"
msgstr "l F d, Y \\@ g:i A"
@@ -1170,11 +1221,11 @@ msgid "is interested in:"
msgstr "interesiÄas pri:"
#: ../../mod/match.php:58 ../../mod/suggest.php:59
-#: ../../include/contact_widgets.php:9 ../../boot.php:1042
+#: ../../include/contact_widgets.php:9 ../../boot.php:1080
msgid "Connect"
msgstr "Konekti"
-#: ../../mod/match.php:65 ../../mod/dirfind.php:57
+#: ../../mod/match.php:65 ../../mod/dirfind.php:60
msgid "No matches"
msgstr "Nenio estas trovita"
@@ -1201,8 +1252,8 @@ msgid "Discard"
msgstr "ForviÅi"
#: ../../mod/notifications.php:51 ../../mod/notifications.php:160
-#: ../../mod/notifications.php:206 ../../mod/contacts.php:296
-#: ../../mod/contacts.php:348
+#: ../../mod/notifications.php:206 ../../mod/contacts.php:316
+#: ../../mod/contacts.php:370
msgid "Ignore"
msgstr "Ignori"
@@ -1214,11 +1265,11 @@ msgstr "Sistemo"
msgid "Network"
msgstr "Reto"
-#: ../../mod/notifications.php:85 ../../mod/network.php:184
+#: ../../mod/notifications.php:85 ../../mod/network.php:300
msgid "Personal"
msgstr "Propra"
-#: ../../mod/notifications.php:90 ../../view/theme/diabook/theme.php:123
+#: ../../mod/notifications.php:90 ../../view/theme/diabook/theme.php:127
#: ../../include/nav.php:77 ../../include/nav.php:115
msgid "Home"
msgstr "Hejmo"
@@ -1227,7 +1278,7 @@ msgstr "Hejmo"
msgid "Introductions"
msgstr "Prezentoj"
-#: ../../mod/notifications.php:100 ../../mod/message.php:104
+#: ../../mod/notifications.php:100 ../../mod/message.php:105
#: ../../include/nav.php:128
msgid "Messages"
msgstr "MesaÄoj"
@@ -1254,7 +1305,7 @@ msgid "suggested by %s"
msgstr "sugestita de %s"
#: ../../mod/notifications.php:153 ../../mod/notifications.php:200
-#: ../../mod/contacts.php:354
+#: ../../mod/contacts.php:376
msgid "Hide this contact from others"
msgstr "KaÅi ĉi tiun kontakton al aliaj"
@@ -1267,7 +1318,7 @@ msgid "if applicable"
msgstr "se aplikebla"
#: ../../mod/notifications.php:157 ../../mod/notifications.php:204
-#: ../../mod/admin.php:645
+#: ../../mod/admin.php:661
msgid "Approve"
msgstr "Aprobi"
@@ -1376,303 +1427,307 @@ msgstr "Ne pli da hejmrilataj atentigoj."
msgid "Home Notifications"
msgstr "Hejmrilataj atentigoj"
-#: ../../mod/contacts.php:63 ../../mod/contacts.php:143
+#: ../../mod/contacts.php:83 ../../mod/contacts.php:163
msgid "Could not access contact record."
msgstr "Ne eblis atingi kontaktrikordo."
-#: ../../mod/contacts.php:77
+#: ../../mod/contacts.php:97
msgid "Could not locate selected profile."
msgstr "Ne trovis elektitan profilon."
-#: ../../mod/contacts.php:100
+#: ../../mod/contacts.php:120
msgid "Contact updated."
msgstr "Kontakto estas Äisdatigita."
-#: ../../mod/contacts.php:165
+#: ../../mod/contacts.php:185
msgid "Contact has been blocked"
msgstr "Kontakto estas blokita."
-#: ../../mod/contacts.php:165
+#: ../../mod/contacts.php:185
msgid "Contact has been unblocked"
msgstr "Kontakto estas malblokita."
-#: ../../mod/contacts.php:179
+#: ../../mod/contacts.php:199
msgid "Contact has been ignored"
msgstr "Kontakto estas ignorita."
-#: ../../mod/contacts.php:179
+#: ../../mod/contacts.php:199
msgid "Contact has been unignored"
msgstr "Kontakto estas malignorita."
-#: ../../mod/contacts.php:195
+#: ../../mod/contacts.php:215
msgid "Contact has been archived"
msgstr "Enarkivigis kontakton"
-#: ../../mod/contacts.php:195
+#: ../../mod/contacts.php:215
msgid "Contact has been unarchived"
msgstr "Elarkivigis kontakton"
-#: ../../mod/contacts.php:208
+#: ../../mod/contacts.php:228
msgid "Contact has been removed."
msgstr "Kontakto estas forigita."
-#: ../../mod/contacts.php:238
+#: ../../mod/contacts.php:258
#, php-format
msgid "You are mutual friends with %s"
msgstr "Vi estas reciproka amiko de %s"
-#: ../../mod/contacts.php:242
+#: ../../mod/contacts.php:262
#, php-format
msgid "You are sharing with %s"
msgstr "Vi kunhavigas kun %s"
-#: ../../mod/contacts.php:247
+#: ../../mod/contacts.php:267
#, php-format
msgid "%s is sharing with you"
msgstr "%s kunhavigas kun vi"
-#: ../../mod/contacts.php:264
+#: ../../mod/contacts.php:284
msgid "Private communications are not available for this contact."
msgstr "Privataj komunikadoj ne disponeblas por ĉi tiu kontakto."
-#: ../../mod/contacts.php:267
+#: ../../mod/contacts.php:287
msgid "Never"
msgstr "Neniam"
-#: ../../mod/contacts.php:271
+#: ../../mod/contacts.php:291
msgid "(Update was successful)"
msgstr "(Äœisdatigo sukcesis.)"
-#: ../../mod/contacts.php:271
+#: ../../mod/contacts.php:291
msgid "(Update was not successful)"
msgstr "(Äœisdatigo malsukcesis.)"
-#: ../../mod/contacts.php:273
+#: ../../mod/contacts.php:293
msgid "Suggest friends"
msgstr "Sugesti amikojn"
-#: ../../mod/contacts.php:277
+#: ../../mod/contacts.php:297
#, php-format
msgid "Network type: %s"
msgstr "Reta tipo: %s"
-#: ../../mod/contacts.php:280 ../../include/contact_widgets.php:183
+#: ../../mod/contacts.php:300 ../../include/contact_widgets.php:183
#, php-format
msgid "%d contact in common"
msgid_plural "%d contacts in common"
msgstr[0] "%d komuna kontakto"
msgstr[1] "%d komunaj kontaktoj"
-#: ../../mod/contacts.php:285
+#: ../../mod/contacts.php:305
msgid "View all contacts"
msgstr "Vidi ĉiujn kontaktojn"
-#: ../../mod/contacts.php:290 ../../mod/contacts.php:347
-#: ../../mod/admin.php:649
+#: ../../mod/contacts.php:310 ../../mod/contacts.php:369
+#: ../../mod/admin.php:665
msgid "Unblock"
msgstr "Malbloki"
-#: ../../mod/contacts.php:290 ../../mod/contacts.php:347
-#: ../../mod/admin.php:648
+#: ../../mod/contacts.php:310 ../../mod/contacts.php:369
+#: ../../mod/admin.php:664
msgid "Block"
msgstr "Bloki"
-#: ../../mod/contacts.php:293
+#: ../../mod/contacts.php:313
msgid "Toggle Blocked status"
msgstr "Åœalti/malÅalti Blokitan staton"
-#: ../../mod/contacts.php:296 ../../mod/contacts.php:348
+#: ../../mod/contacts.php:316 ../../mod/contacts.php:370
msgid "Unignore"
msgstr "Malignori"
-#: ../../mod/contacts.php:299
+#: ../../mod/contacts.php:319
msgid "Toggle Ignored status"
msgstr "Åœalti/malÅalti Ignoritan staton"
-#: ../../mod/contacts.php:303
+#: ../../mod/contacts.php:323
msgid "Unarchive"
msgstr "Elarkivigi"
-#: ../../mod/contacts.php:303
+#: ../../mod/contacts.php:323
msgid "Archive"
msgstr "Enarkivigi"
-#: ../../mod/contacts.php:306
+#: ../../mod/contacts.php:326
msgid "Toggle Archive status"
msgstr "Åœalti/malÅalti Enarkivigitan staton"
-#: ../../mod/contacts.php:309
+#: ../../mod/contacts.php:329
msgid "Repair"
msgstr "Ripari"
-#: ../../mod/contacts.php:312
+#: ../../mod/contacts.php:332
msgid "Advanced Contact Settings"
msgstr "Specialaj Kontaktagordoj"
-#: ../../mod/contacts.php:320
+#: ../../mod/contacts.php:338
+msgid "Communications lost with this contact!"
+msgstr "Mi perdis la kommunikadon kun tiu kontakto!"
+
+#: ../../mod/contacts.php:341
msgid "Contact Editor"
msgstr "Kontakta redaktilo."
-#: ../../mod/contacts.php:323
+#: ../../mod/contacts.php:344
msgid "Profile Visibility"
msgstr "Videbleco de profilo"
-#: ../../mod/contacts.php:324
+#: ../../mod/contacts.php:345
#, php-format
msgid ""
"Please choose the profile you would like to display to %s when viewing your "
"profile securely."
msgstr "Bonvolu elekti la profilon kiu vi volas montri al %s aspektinde kiam sekure aspektante vian profilon."
-#: ../../mod/contacts.php:325
+#: ../../mod/contacts.php:346
msgid "Contact Information / Notes"
msgstr "Kontaktaj informoj / Notoj"
-#: ../../mod/contacts.php:326
+#: ../../mod/contacts.php:347
msgid "Edit contact notes"
msgstr "Redakti kontaktnotojn"
-#: ../../mod/contacts.php:331 ../../mod/contacts.php:522
+#: ../../mod/contacts.php:352 ../../mod/contacts.php:544
#: ../../mod/viewcontacts.php:62 ../../mod/nogroup.php:40
#, php-format
msgid "Visit %s's profile [%s]"
msgstr "Viziti la profilon de %s [%s]"
-#: ../../mod/contacts.php:332
+#: ../../mod/contacts.php:353
msgid "Block/Unblock contact"
msgstr "Bloki/Malbloki kontakton"
-#: ../../mod/contacts.php:333
+#: ../../mod/contacts.php:354
msgid "Ignore contact"
msgstr "Ignori kontakton"
-#: ../../mod/contacts.php:334
+#: ../../mod/contacts.php:355
msgid "Repair URL settings"
msgstr "Ripari URL agordoj"
-#: ../../mod/contacts.php:335
+#: ../../mod/contacts.php:356
msgid "View conversations"
msgstr "Vidi konversaciojn"
-#: ../../mod/contacts.php:337
+#: ../../mod/contacts.php:358
msgid "Delete contact"
msgstr "ForviÅi kontakton"
-#: ../../mod/contacts.php:341
+#: ../../mod/contacts.php:362
msgid "Last update:"
msgstr "Plej ĵusa Äisdatigo:"
-#: ../../mod/contacts.php:342
+#: ../../mod/contacts.php:364
msgid "Update public posts"
msgstr "Äœisdatigi publikajn afiÅojn"
-#: ../../mod/contacts.php:344 ../../mod/admin.php:1120
+#: ../../mod/contacts.php:366 ../../mod/admin.php:1136
msgid "Update now"
msgstr "Äœisdatigi nun"
-#: ../../mod/contacts.php:351
+#: ../../mod/contacts.php:373
msgid "Currently blocked"
msgstr "Nuntempe blokata"
-#: ../../mod/contacts.php:352
+#: ../../mod/contacts.php:374
msgid "Currently ignored"
msgstr "Nuntempe ignorata"
-#: ../../mod/contacts.php:353
+#: ../../mod/contacts.php:375
msgid "Currently archived"
msgstr "Nuntempe enarkivigita"
-#: ../../mod/contacts.php:354
+#: ../../mod/contacts.php:376
msgid ""
"Replies/likes to your public posts <strong>may</strong> still be visible"
msgstr "Rispondoj/Åataĵo al viaj publikaj afiÅoj <strong>eble</strong> plu estos videbla"
-#: ../../mod/contacts.php:407
+#: ../../mod/contacts.php:429
msgid "Suggestions"
msgstr "Sugestoj"
-#: ../../mod/contacts.php:410
+#: ../../mod/contacts.php:432
msgid "Suggest potential friends"
msgstr "Sugesti amikojn"
-#: ../../mod/contacts.php:413 ../../mod/group.php:191
+#: ../../mod/contacts.php:435 ../../mod/group.php:191
msgid "All Contacts"
msgstr "Ĉiuj Kontaktoj"
-#: ../../mod/contacts.php:416
+#: ../../mod/contacts.php:438
msgid "Show all contacts"
msgstr "Montri ĉiujn kontaktojn"
-#: ../../mod/contacts.php:419
+#: ../../mod/contacts.php:441
msgid "Unblocked"
msgstr "Malblokita"
-#: ../../mod/contacts.php:422
+#: ../../mod/contacts.php:444
msgid "Only show unblocked contacts"
msgstr "Nur montri neblokitajn kontaktojn"
-#: ../../mod/contacts.php:426
+#: ../../mod/contacts.php:448
msgid "Blocked"
msgstr "Blokita"
-#: ../../mod/contacts.php:429
+#: ../../mod/contacts.php:451
msgid "Only show blocked contacts"
msgstr "Nur montri blokitajn kontaktojn"
-#: ../../mod/contacts.php:433
+#: ../../mod/contacts.php:455
msgid "Ignored"
msgstr "Ignorita"
-#: ../../mod/contacts.php:436
+#: ../../mod/contacts.php:458
msgid "Only show ignored contacts"
msgstr "Nur montri ignoritajn kontaktojn"
-#: ../../mod/contacts.php:440
+#: ../../mod/contacts.php:462
msgid "Archived"
msgstr "Enarkivigita"
-#: ../../mod/contacts.php:443
+#: ../../mod/contacts.php:465
msgid "Only show archived contacts"
msgstr "Nur montri enarkivigitajn kontaktojn"
-#: ../../mod/contacts.php:447
+#: ../../mod/contacts.php:469
msgid "Hidden"
msgstr "KaÅita"
-#: ../../mod/contacts.php:450
+#: ../../mod/contacts.php:472
msgid "Only show hidden contacts"
msgstr "Nur montri kaÅitajn kontaktojn"
-#: ../../mod/contacts.php:498
+#: ../../mod/contacts.php:520
msgid "Mutual Friendship"
msgstr "Reciproka amikeco"
-#: ../../mod/contacts.php:502
+#: ../../mod/contacts.php:524
msgid "is a fan of yours"
msgstr "estas admiranto de vi"
-#: ../../mod/contacts.php:506
+#: ../../mod/contacts.php:528
msgid "you are a fan of"
msgstr "vi estas admiranto de"
-#: ../../mod/contacts.php:523 ../../mod/nogroup.php:41
+#: ../../mod/contacts.php:545 ../../mod/nogroup.php:41
msgid "Edit contact"
msgstr "Redakti kontakton"
-#: ../../mod/contacts.php:544 ../../view/theme/diabook/theme.php:125
+#: ../../mod/contacts.php:566 ../../view/theme/diabook/theme.php:129
#: ../../include/nav.php:139
msgid "Contacts"
msgstr "Kontaktoj"
-#: ../../mod/contacts.php:548
+#: ../../mod/contacts.php:570
msgid "Search your contacts"
msgstr "Serĉi viajn kontaktojn"
-#: ../../mod/contacts.php:549 ../../mod/directory.php:57
+#: ../../mod/contacts.php:571 ../../mod/directory.php:57
msgid "Finding: "
msgstr "Trovata:"
-#: ../../mod/contacts.php:550 ../../mod/directory.php:59
+#: ../../mod/contacts.php:572 ../../mod/directory.php:59
#: ../../include/contact_widgets.php:33
msgid "Find"
msgstr "Trovi"
@@ -1691,12 +1746,13 @@ msgid "Password reset requested at %s"
msgstr "Pasvorta riparado petita je %s"
#: ../../mod/lostpass.php:45 ../../mod/lostpass.php:107
-#: ../../mod/register.php:388 ../../mod/register.php:442
-#: ../../mod/regmod.php:54 ../../mod/dfrn_confirm.php:742
-#: ../../addon/facebook/facebook.php:680
-#: ../../addon/facebook/facebook.php:1170
-#: ../../addon/testdrive/testdrive.php:58 ../../include/items.php:2726
-#: ../../boot.php:692
+#: ../../mod/register.php:90 ../../mod/register.php:144
+#: ../../mod/regmod.php:54 ../../mod/dfrn_confirm.php:752
+#: ../../addon/facebook/facebook.php:700
+#: ../../addon/facebook/facebook.php:1190
+#: ../../addon/public_server/public_server.php:62
+#: ../../addon/testdrive/testdrive.php:67 ../../include/items.php:2890
+#: ../../boot.php:730
msgid "Administrator"
msgstr "Administranto"
@@ -1706,7 +1762,7 @@ msgid ""
"Password reset failed."
msgstr "Ne povis konfirmi la peton. (Eble vi sendis Äin antaÅ­.) Pasvorta riparado malsukcesis."
-#: ../../mod/lostpass.php:83 ../../boot.php:824
+#: ../../mod/lostpass.php:83 ../../boot.php:862
msgid "Password Reset"
msgstr "Pasvorta riparado"
@@ -1750,502 +1806,527 @@ msgstr "Salutnomo aÅ­ retpoÅtadreso: "
msgid "Reset"
msgstr "Repari"
-#: ../../mod/settings.php:49 ../../include/nav.php:137
+#: ../../mod/settings.php:50 ../../include/nav.php:137
msgid "Account settings"
msgstr "Konto"
-#: ../../mod/settings.php:54
+#: ../../mod/settings.php:55
msgid "Display settings"
msgstr "Ekrano"
-#: ../../mod/settings.php:60
+#: ../../mod/settings.php:61
msgid "Connector settings"
msgstr "Konektiloj"
-#: ../../mod/settings.php:65
+#: ../../mod/settings.php:66
msgid "Plugin settings"
msgstr "Kromprogramoj"
-#: ../../mod/settings.php:70
+#: ../../mod/settings.php:71
msgid "Connected apps"
msgstr "Konektitaj programoj"
-#: ../../mod/settings.php:75
+#: ../../mod/settings.php:76
msgid "Export personal data"
msgstr "Eksporto"
-#: ../../mod/settings.php:80
+#: ../../mod/settings.php:81
msgid "Remove account"
msgstr "Forigi konton"
-#: ../../mod/settings.php:88 ../../mod/admin.php:735 ../../mod/admin.php:940
-#: ../../addon/mathjax/mathjax.php:36 ../../view/theme/diabook/theme.php:571
-#: ../../view/theme/diabook/theme.php:701 ../../include/nav.php:137
+#: ../../mod/settings.php:89 ../../mod/admin.php:751 ../../mod/admin.php:956
+#: ../../addon/dav/layout.fnk.php:116 ../../addon/mathjax/mathjax.php:36
+#: ../../view/theme/diabook/theme.php:643
+#: ../../view/theme/diabook/theme.php:773 ../../include/nav.php:137
msgid "Settings"
msgstr "Agordoj"
-#: ../../mod/settings.php:131
+#: ../../mod/settings.php:133
msgid "Missing some important data!"
msgstr "Mankas importantaj datumoj!"
-#: ../../mod/settings.php:134 ../../mod/settings.php:565
+#: ../../mod/settings.php:136 ../../mod/settings.php:581
msgid "Update"
msgstr "Äœisdatigi"
-#: ../../mod/settings.php:239
+#: ../../mod/settings.php:241
msgid "Failed to connect with email account using the settings provided."
msgstr "Ne sukcesis konekti al retpoÅtkonto kun la provizitaj agordoj."
-#: ../../mod/settings.php:244
+#: ../../mod/settings.php:246
msgid "Email settings updated."
msgstr "RetpoÅtagordoj Äisdatigita"
-#: ../../mod/settings.php:303
+#: ../../mod/settings.php:305
msgid "Passwords do not match. Password unchanged."
msgstr "La pasvortoj ne estas egala. Pasvorto ne ÅanÄita."
-#: ../../mod/settings.php:308
+#: ../../mod/settings.php:310
msgid "Empty passwords are not allowed. Password unchanged."
msgstr "Malplenaj pasvortoj ne estas permesita. Pasvorto ne ÅanÄita."
-#: ../../mod/settings.php:319
+#: ../../mod/settings.php:321
msgid "Password changed."
msgstr "Pasvorto ÅanÄita."
-#: ../../mod/settings.php:321
+#: ../../mod/settings.php:323
msgid "Password update failed. Please try again."
msgstr "Äœisdatigo de pasvorto malsukcesis. Bonvolu provi refoje."
-#: ../../mod/settings.php:385
+#: ../../mod/settings.php:386
msgid " Please use a shorter name."
msgstr " Bonvolu uzi pli mallongan nomon."
-#: ../../mod/settings.php:387
+#: ../../mod/settings.php:388
msgid " Name too short."
msgstr " Nomo estas tro mallonga."
-#: ../../mod/settings.php:393
+#: ../../mod/settings.php:394
msgid " Not valid email."
msgstr " RepoÅtadreso ne validas."
-#: ../../mod/settings.php:395
+#: ../../mod/settings.php:396
msgid " Cannot change to that email."
msgstr " Ne povas ÅanÄi al tio retpoÅtadreso."
-#: ../../mod/settings.php:468 ../../addon/facebook/facebook.php:480
+#: ../../mod/settings.php:450
+msgid "Private forum has no privacy permissions. Using default privacy group."
+msgstr "Privata forumo ne havas privatecajn agordojn. DefaÅ­lta privateca grupo estas uzata."
+
+#: ../../mod/settings.php:454
+msgid "Private forum has no privacy permissions and no default privacy group."
+msgstr "Privata forumo havas nek privatecajn agordojn nek defaÅ­ltan privatecan grupon."
+
+#: ../../mod/settings.php:484 ../../addon/facebook/facebook.php:493
#: ../../addon/impressum/impressum.php:77
#: ../../addon/openstreetmap/openstreetmap.php:80
#: ../../addon/mathjax/mathjax.php:66 ../../addon/piwik/piwik.php:105
-#: ../../addon/twitter/twitter.php:370
+#: ../../addon/twitter/twitter.php:382
msgid "Settings updated."
msgstr "Agordoj Äisdatigita."
-#: ../../mod/settings.php:538 ../../mod/settings.php:564
-#: ../../mod/settings.php:600
+#: ../../mod/settings.php:554 ../../mod/settings.php:580
+#: ../../mod/settings.php:616
msgid "Add application"
msgstr "Aldoni programon"
-#: ../../mod/settings.php:542 ../../mod/settings.php:568
-#: ../../addon/statusnet/statusnet.php:547
+#: ../../mod/settings.php:558 ../../mod/settings.php:584
+#: ../../addon/statusnet/statusnet.php:561
msgid "Consumer Key"
msgstr "Åœlosilo de kliento"
-#: ../../mod/settings.php:543 ../../mod/settings.php:569
-#: ../../addon/statusnet/statusnet.php:546
+#: ../../mod/settings.php:559 ../../mod/settings.php:585
+#: ../../addon/statusnet/statusnet.php:560
msgid "Consumer Secret"
msgstr "Sekreto de kliento"
-#: ../../mod/settings.php:544 ../../mod/settings.php:570
+#: ../../mod/settings.php:560 ../../mod/settings.php:586
msgid "Redirect"
msgstr "Alidirekto"
-#: ../../mod/settings.php:545 ../../mod/settings.php:571
+#: ../../mod/settings.php:561 ../../mod/settings.php:587
msgid "Icon url"
msgstr "Piktograma adreso"
-#: ../../mod/settings.php:556
+#: ../../mod/settings.php:572
msgid "You can't edit this application."
msgstr "Ĉi tio programo ne estas redaktebla."
-#: ../../mod/settings.php:599
+#: ../../mod/settings.php:615
msgid "Connected Apps"
msgstr "Konektitaj Programoj"
-#: ../../mod/settings.php:603
+#: ../../mod/settings.php:619
msgid "Client key starts with"
msgstr "Åœlosilo de kliento komencas kun"
-#: ../../mod/settings.php:604
+#: ../../mod/settings.php:620
msgid "No name"
msgstr "Neniu nomo"
-#: ../../mod/settings.php:605
+#: ../../mod/settings.php:621
msgid "Remove authorization"
msgstr "ForviÅi rajtigon"
-#: ../../mod/settings.php:616
+#: ../../mod/settings.php:632
msgid "No Plugin settings configured"
msgstr "Neniom da kromprogramoagordoj farita"
-#: ../../mod/settings.php:624 ../../addon/widgets/widgets.php:123
+#: ../../mod/settings.php:640 ../../addon/widgets/widgets.php:123
msgid "Plugin Settings"
msgstr "Kromprogramoagordoj"
-#: ../../mod/settings.php:636 ../../mod/settings.php:637
+#: ../../mod/settings.php:652 ../../mod/settings.php:653
#, php-format
msgid "Built-in support for %s connectivity is %s"
msgstr "Integrita subteno por %s koneto estas %s"
-#: ../../mod/settings.php:636 ../../mod/settings.php:637
+#: ../../mod/settings.php:652 ../../mod/settings.php:653
msgid "enabled"
msgstr "Åaltita"
-#: ../../mod/settings.php:636 ../../mod/settings.php:637
+#: ../../mod/settings.php:652 ../../mod/settings.php:653
msgid "disabled"
msgstr "malÅaltita"
-#: ../../mod/settings.php:637
+#: ../../mod/settings.php:653
msgid "StatusNet"
msgstr "StatusNet"
-#: ../../mod/settings.php:667
+#: ../../mod/settings.php:685
+msgid "Email access is disabled on this site."
+msgstr "RetpoÅta atingo ne disponeblas ĉi tie."
+
+#: ../../mod/settings.php:691
msgid "Connector Settings"
msgstr "Konektiloagordoj"
-#: ../../mod/settings.php:672
+#: ../../mod/settings.php:696
msgid "Email/Mailbox Setup"
msgstr "Agordoj pri RetpoÅto"
-#: ../../mod/settings.php:673
+#: ../../mod/settings.php:697
msgid ""
"If you wish to communicate with email contacts using this service "
"(optional), please specify how to connect to your mailbox."
-msgstr "Se vi volas uzi ĉi tiun servon por komuniki tra retpoÅto (nedeviga), bonvolu specifi kiel konekti al vian retpoÅtkonton."
+msgstr "Se vi volas uzi ĉi tiun servon por komuniki per retpoÅto (nedeviga), bonvolu specifi kiel konekti al vian retpoÅtkonton."
-#: ../../mod/settings.php:674
+#: ../../mod/settings.php:698
msgid "Last successful email check:"
msgstr "Plej ĵusa sukcesa kontrolo de poÅto:"
-#: ../../mod/settings.php:675
-msgid "Email access is disabled on this site."
-msgstr "RetpoÅta atingo ne disponeblas ĉi tie."
-
-#: ../../mod/settings.php:676
+#: ../../mod/settings.php:700
msgid "IMAP server name:"
msgstr "Nomo de IMAP servilo:"
-#: ../../mod/settings.php:677
+#: ../../mod/settings.php:701
msgid "IMAP port:"
msgstr "Numero de IMAP pordo:"
-#: ../../mod/settings.php:678
+#: ../../mod/settings.php:702
msgid "Security:"
msgstr "Sekureco:"
-#: ../../mod/settings.php:678 ../../mod/settings.php:683
+#: ../../mod/settings.php:702 ../../mod/settings.php:707
msgid "None"
msgstr "Nenio"
-#: ../../mod/settings.php:679
+#: ../../mod/settings.php:703
msgid "Email login name:"
msgstr "RetpoÅta salutnomo:"
-#: ../../mod/settings.php:680
+#: ../../mod/settings.php:704
msgid "Email password:"
msgstr "RetpoÅta pasvorto:"
-#: ../../mod/settings.php:681
+#: ../../mod/settings.php:705
msgid "Reply-to address:"
msgstr "Responda adreso (Reply-to):"
-#: ../../mod/settings.php:682
+#: ../../mod/settings.php:706
msgid "Send public posts to all email contacts:"
msgstr "Sendu publikajn afiÅojn al ĉiuj retpoÅtkontaktoj:"
-#: ../../mod/settings.php:683
+#: ../../mod/settings.php:707
msgid "Action after import:"
msgstr "Ago post la importado:"
-#: ../../mod/settings.php:683
+#: ../../mod/settings.php:707
msgid "Mark as seen"
msgstr "Marki kiel legita"
-#: ../../mod/settings.php:683
+#: ../../mod/settings.php:707
msgid "Move to folder"
msgstr "Movi al dosierujo"
-#: ../../mod/settings.php:684
+#: ../../mod/settings.php:708
msgid "Move to folder:"
msgstr "Movi al dosierujo:"
-#: ../../mod/settings.php:744
+#: ../../mod/settings.php:768
msgid "Display Settings"
msgstr "Ekranagordoj"
-#: ../../mod/settings.php:750
+#: ../../mod/settings.php:774
msgid "Display Theme:"
msgstr "Vidiga etoso:"
-#: ../../mod/settings.php:751
+#: ../../mod/settings.php:775
msgid "Update browser every xx seconds"
msgstr "Ĝisdatigu retesplorilon ĉiu xxx sekundoj"
-#: ../../mod/settings.php:751
+#: ../../mod/settings.php:775
msgid "Minimum of 10 seconds, no maximum"
msgstr "Minimume 10 sekundoj, sen maksimumo"
-#: ../../mod/settings.php:752
+#: ../../mod/settings.php:776
msgid "Number of items to display on the network page:"
msgstr "Kvanto da elementoj kiuj estos montrata ĉe la reto paÄo."
-#: ../../mod/settings.php:752
+#: ../../mod/settings.php:776
msgid "Maximum of 100 items"
msgstr "Maksimume 100 eroj"
-#: ../../mod/settings.php:753
+#: ../../mod/settings.php:777
msgid "Don't show emoticons"
msgstr "Ne montru ridetulojn"
-#: ../../mod/settings.php:821 ../../mod/admin.php:180 ../../mod/admin.php:621
-msgid "Normal Account"
-msgstr "Normala konto"
+#: ../../mod/settings.php:848
+msgid "Normal Account Page"
+msgstr "Normala KontopaÄo"
-#: ../../mod/settings.php:822
+#: ../../mod/settings.php:849
msgid "This account is a normal personal profile"
msgstr "Tiu konto estas normala persona profilo"
-#: ../../mod/settings.php:825 ../../mod/admin.php:181 ../../mod/admin.php:622
-msgid "Soapbox Account"
-msgstr "Soapbox Konto"
+#: ../../mod/settings.php:852
+msgid "Soapbox Page"
+msgstr "Soapbox PaÄo"
-#: ../../mod/settings.php:826
+#: ../../mod/settings.php:853
msgid "Automatically approve all connection/friend requests as read-only fans"
msgstr "Aŭtomate konfirmi ĉiujn kontaktpetojn kiel nurlegaj admirantoj"
-#: ../../mod/settings.php:829 ../../mod/admin.php:182 ../../mod/admin.php:623
-msgid "Community/Celebrity Account"
-msgstr "Komunuma/eminentula Konto"
+#: ../../mod/settings.php:856
+msgid "Community Forum/Celebrity Account"
+msgstr "Komunuma Forumo/Eminentula Konto"
-#: ../../mod/settings.php:830
+#: ../../mod/settings.php:857
msgid ""
"Automatically approve all connection/friend requests as read-write fans"
msgstr "Aŭtomate konfirmi ĉiujn kontaktpetojn kiel admirantoj kapable legi kaj skribi"
-#: ../../mod/settings.php:833 ../../mod/admin.php:183 ../../mod/admin.php:624
-msgid "Automatic Friend Account"
-msgstr "AÅ­tomata Amika Konto"
+#: ../../mod/settings.php:860
+msgid "Automatic Friend Page"
+msgstr "AÅ­tomata Amiko PaÄo"
-#: ../../mod/settings.php:834
+#: ../../mod/settings.php:861
msgid "Automatically approve all connection/friend requests as friends"
msgstr "Aŭtomate konfirmi ĉiujn kontaktpetojn kiel amikoj"
-#: ../../mod/settings.php:844
+#: ../../mod/settings.php:864
+msgid "Private Forum [Experimental]"
+msgstr "Privata Forumo [eksperimenta]"
+
+#: ../../mod/settings.php:865
+msgid "Private forum - approved members only"
+msgstr "Privata forumo - nur por aprobitaj membroj"
+
+#: ../../mod/settings.php:877
msgid "OpenID:"
msgstr "OpenID:"
-#: ../../mod/settings.php:844
+#: ../../mod/settings.php:877
msgid "(Optional) Allow this OpenID to login to this account."
msgstr "(Nedeviga) Permesi atingon al la konton al ĉi tio OpenID."
-#: ../../mod/settings.php:854
+#: ../../mod/settings.php:887
msgid "Publish your default profile in your local site directory?"
msgstr "Publikigi vian defaÅ­ltan profilon en la loka reteja katalogo?"
-#: ../../mod/settings.php:860
+#: ../../mod/settings.php:893
msgid "Publish your default profile in the global social directory?"
msgstr "Publikigi vian defaÅ­ltan profilon en la tutmonda interkona katalogo?"
-#: ../../mod/settings.php:868
+#: ../../mod/settings.php:901
msgid "Hide your contact/friend list from viewers of your default profile?"
msgstr "KaÅi vian liston de kontaktoj/amiko al spektantoj de via defaÅ­lta profilo?"
-#: ../../mod/settings.php:872
+#: ../../mod/settings.php:905
msgid "Hide your profile details from unknown viewers?"
msgstr "KaÅi viajn profilajn detalojn al nekonataj spektantoj?"
-#: ../../mod/settings.php:877
+#: ../../mod/settings.php:910
msgid "Allow friends to post to your profile page?"
msgstr "Ĉu amikoj povu afiÅi al via profilo?"
-#: ../../mod/settings.php:883
+#: ../../mod/settings.php:916
msgid "Allow friends to tag your posts?"
msgstr "Ĉu amikoj povu aldoni markojn al viaj afiÅoj?"
-#: ../../mod/settings.php:889
+#: ../../mod/settings.php:922
msgid "Allow us to suggest you as a potential friend to new members?"
msgstr "Ĉu ni povu sugesti vin kiel amiko al novaj membroj?"
-#: ../../mod/settings.php:895
+#: ../../mod/settings.php:928
msgid "Permit unknown people to send you private mail?"
msgstr "Permesigi nekonatulojn sendi retpoÅton al vi?"
-#: ../../mod/settings.php:906
+#: ../../mod/settings.php:936
msgid "Profile is <strong>not published</strong>."
msgstr "Profilo <strong>ne estas publika</strong>."
-#: ../../mod/settings.php:912 ../../mod/profile_photo.php:211
+#: ../../mod/settings.php:939 ../../mod/profile_photo.php:213
msgid "or"
msgstr "aÅ­"
-#: ../../mod/settings.php:917
+#: ../../mod/settings.php:944
msgid "Your Identity Address is"
msgstr "Via identeca adreso estas"
-#: ../../mod/settings.php:928
+#: ../../mod/settings.php:955
msgid "Automatically expire posts after this many days:"
msgstr "Automatike senvalidigi afiÅojn post tiom da tagoj:"
-#: ../../mod/settings.php:928
+#: ../../mod/settings.php:955
msgid "If empty, posts will not expire. Expired posts will be deleted"
msgstr "Se malplena, afiÅoj neniam senvalidiÄos. Senvalidigitajn afiÅon estos forviÅata"
-#: ../../mod/settings.php:929
+#: ../../mod/settings.php:956
msgid "Advanced expiration settings"
msgstr "Detalaj agordoj rilate al senvalidiÄo"
-#: ../../mod/settings.php:930
+#: ../../mod/settings.php:957
msgid "Advanced Expiration"
msgstr "Detala senvalidiÄo"
-#: ../../mod/settings.php:931
+#: ../../mod/settings.php:958
msgid "Expire posts:"
msgstr "Senvalidigi afiÅojn:"
-#: ../../mod/settings.php:932
+#: ../../mod/settings.php:959
msgid "Expire personal notes:"
msgstr "Senvalidigi personajn notojn:"
-#: ../../mod/settings.php:933
+#: ../../mod/settings.php:960
msgid "Expire starred posts:"
msgstr "Senvalidigi steligitajn afiÅojn:"
-#: ../../mod/settings.php:934
+#: ../../mod/settings.php:961
msgid "Expire photos:"
msgstr "Senvalidigi bildojn:"
-#: ../../mod/settings.php:938
+#: ../../mod/settings.php:962
+msgid "Only expire posts by others:"
+msgstr "Nur senvalidigi afiÅojn de aliaj: "
+
+#: ../../mod/settings.php:969
msgid "Account Settings"
msgstr "Kontoagordoj"
-#: ../../mod/settings.php:947
+#: ../../mod/settings.php:977
msgid "Password Settings"
msgstr "Agordoj pri Pasvorto"
-#: ../../mod/settings.php:948
+#: ../../mod/settings.php:978
msgid "New Password:"
msgstr "Nova pasvorto:"
-#: ../../mod/settings.php:949
+#: ../../mod/settings.php:979
msgid "Confirm:"
msgstr "Konfirmi:"
-#: ../../mod/settings.php:949
+#: ../../mod/settings.php:979
msgid "Leave password fields blank unless changing"
msgstr "Lasu pasvortkampojn malplenaj se vi ne ÅanÄas la pasvorton."
-#: ../../mod/settings.php:953
+#: ../../mod/settings.php:983
msgid "Basic Settings"
msgstr "Bazaj Agordoj"
-#: ../../mod/settings.php:954 ../../include/profile_advanced.php:15
+#: ../../mod/settings.php:984 ../../include/profile_advanced.php:15
msgid "Full Name:"
msgstr "Plena Nomo:"
-#: ../../mod/settings.php:955
+#: ../../mod/settings.php:985
msgid "Email Address:"
msgstr "RetpoÅtadreso:"
-#: ../../mod/settings.php:956
+#: ../../mod/settings.php:986
msgid "Your Timezone:"
msgstr "Via Horzono:"
-#: ../../mod/settings.php:957
+#: ../../mod/settings.php:987
msgid "Default Post Location:"
msgstr "DefaÅ­lta Loko por AfiÅoj:"
-#: ../../mod/settings.php:958
+#: ../../mod/settings.php:988
msgid "Use Browser Location:"
msgstr "Uzu Lokon laÅ­ Retesplorilo:"
-#: ../../mod/settings.php:961
+#: ../../mod/settings.php:991
msgid "Security and Privacy Settings"
msgstr "Agordoj pri Sekureco kaj Privateco"
-#: ../../mod/settings.php:963
+#: ../../mod/settings.php:993
msgid "Maximum Friend Requests/Day:"
msgstr "Taga maksimumo da kontaktpetoj:"
-#: ../../mod/settings.php:963 ../../mod/settings.php:978
+#: ../../mod/settings.php:993 ../../mod/settings.php:1012
msgid "(to prevent spam abuse)"
msgstr "(por malhelpi spamaĵojn)"
-#: ../../mod/settings.php:964
+#: ../../mod/settings.php:994
msgid "Default Post Permissions"
msgstr "DefaÅ­ltaj permesoj por afiÅoj"
-#: ../../mod/settings.php:965
+#: ../../mod/settings.php:995
msgid "(click to open/close)"
msgstr "(klaku por malfermi/fermi)"
-#: ../../mod/settings.php:978
+#: ../../mod/settings.php:1012
msgid "Maximum private messages per day from unknown people:"
msgstr "Taga maksimumo da privataj mesaÄoj."
-#: ../../mod/settings.php:981
+#: ../../mod/settings.php:1015
msgid "Notification Settings"
msgstr "Agordoj pri Atentigoj"
-#: ../../mod/settings.php:982
+#: ../../mod/settings.php:1016
msgid "By default post a status message when:"
msgstr "DefaÅ­lte afiÅi statmesaÄon okaze de:"
-#: ../../mod/settings.php:983
+#: ../../mod/settings.php:1017
msgid "accepting a friend request"
msgstr "akcepti kontaktpeton"
-#: ../../mod/settings.php:984
+#: ../../mod/settings.php:1018
msgid "joining a forum/community"
msgstr "aliÄi forumon/komunumon"
-#: ../../mod/settings.php:985
+#: ../../mod/settings.php:1019
msgid "making an <em>interesting</em> profile change"
msgstr "fari <em>interesan</em> profilÅanÄon"
-#: ../../mod/settings.php:986
+#: ../../mod/settings.php:1020
msgid "Send a notification email when:"
msgstr "Sendu atentiga repoÅton se:"
-#: ../../mod/settings.php:987
+#: ../../mod/settings.php:1021
msgid "You receive an introduction"
msgstr "Vi ricevas inviton"
-#: ../../mod/settings.php:988
+#: ../../mod/settings.php:1022
msgid "Your introductions are confirmed"
msgstr "Viaj prezentoj estas konfirmata."
-#: ../../mod/settings.php:989
+#: ../../mod/settings.php:1023
msgid "Someone writes on your profile wall"
msgstr "Iu skribas je via profila muro."
-#: ../../mod/settings.php:990
+#: ../../mod/settings.php:1024
msgid "Someone writes a followup comment"
msgstr "Iu skribas sekvan komenton"
-#: ../../mod/settings.php:991
+#: ../../mod/settings.php:1025
msgid "You receive a private message"
msgstr "Vi ricevas privatan mesaÄon."
-#: ../../mod/settings.php:992
+#: ../../mod/settings.php:1026
msgid "You receive a friend suggestion"
msgstr "Vi ricevas amikosugeston"
-#: ../../mod/settings.php:993
+#: ../../mod/settings.php:1027
msgid "You are tagged in a post"
msgstr "Vi estas markita en afiÅon"
-#: ../../mod/settings.php:996
-msgid "Advanced Page Settings"
-msgstr "Specialaj agordoj pri paÄoj"
+#: ../../mod/settings.php:1030
+msgid "Advanced Account/Page Type Settings"
+msgstr "Detalaj Agordoj pri Tipo de Konto/PaÄo."
+
+#: ../../mod/settings.php:1031
+msgid "Change the behaviour of this account for special situations"
+msgstr "Agordi la teniÄon de la konto en specialaj situacioj"
#: ../../mod/manage.php:90
msgid "Manage Identities and/or Pages"
@@ -2261,67 +2342,67 @@ msgstr "Åœalti inter aliaj identecojn aj komunumaj/grupaj paÄoj kiuj kunhavas v
msgid "Select an identity to manage: "
msgstr "Elektu identencon por administrado:"
-#: ../../mod/network.php:43
+#: ../../mod/network.php:97
msgid "Search Results For:"
msgstr "Rezultoj de la serĉado pri:"
-#: ../../mod/network.php:82 ../../mod/search.php:16
+#: ../../mod/network.php:137 ../../mod/search.php:16
msgid "Remove term"
msgstr "ForviÅu terminon"
-#: ../../mod/network.php:91 ../../mod/search.php:13
+#: ../../mod/network.php:146 ../../mod/search.php:13
msgid "Saved Searches"
msgstr "Konservitaj Serĉadoj"
-#: ../../mod/network.php:92 ../../include/group.php:217
+#: ../../mod/network.php:147 ../../include/group.php:244
msgid "add"
msgstr "aldoni"
-#: ../../mod/network.php:171
+#: ../../mod/network.php:287
msgid "Commented Order"
msgstr "Komenta Ordo"
-#: ../../mod/network.php:174
+#: ../../mod/network.php:290
msgid "Sort by Comment Date"
msgstr "Ordigi laÅ­ Dato de Komento"
-#: ../../mod/network.php:177
+#: ../../mod/network.php:293
msgid "Posted Order"
msgstr "AfiÅita Ordo"
-#: ../../mod/network.php:180
+#: ../../mod/network.php:296
msgid "Sort by Post Date"
msgstr "Ordigi laÅ­ Dato de AfiÅado"
-#: ../../mod/network.php:187
+#: ../../mod/network.php:303
msgid "Posts that mention or involve you"
msgstr "AfiÅoj menciantaj vin aÅ­ pri vi"
-#: ../../mod/network.php:190
+#: ../../mod/network.php:306
msgid "New"
msgstr "Nova"
-#: ../../mod/network.php:193
+#: ../../mod/network.php:309
msgid "Activity Stream - by date"
msgstr "Fluo de Aktiveco - laÅ­ dato"
-#: ../../mod/network.php:196
+#: ../../mod/network.php:312
msgid "Starred"
msgstr "Steligita"
-#: ../../mod/network.php:199
+#: ../../mod/network.php:315
msgid "Favourite Posts"
msgstr "Favorigitaj AfiÅoj"
-#: ../../mod/network.php:202
+#: ../../mod/network.php:318
msgid "Shared Links"
msgstr "Kunhavigitaj Ligiloj"
-#: ../../mod/network.php:205
+#: ../../mod/network.php:321
msgid "Interesting Links"
msgstr "Interesaj Ligiloj"
-#: ../../mod/network.php:281
+#: ../../mod/network.php:388
#, php-format
msgid "Warning: This group contains %s member from an insecure network."
msgid_plural ""
@@ -2329,42 +2410,42 @@ msgid_plural ""
msgstr[0] "Averto: La grupo enhavas %s membron el nesekuraj retejoj."
msgstr[1] "Averto: La grupo enhavas %s membrojn el nesekuraj retejoj."
-#: ../../mod/network.php:284
+#: ../../mod/network.php:391
msgid "Private messages to this group are at risk of public disclosure."
msgstr "La privateco de privataj mesaÄoj al ĉi tiu grupo ne ĉiam estas garantita."
-#: ../../mod/network.php:329
+#: ../../mod/network.php:436
msgid "No such group"
msgstr "Grupo ne estas trovita"
-#: ../../mod/network.php:340
+#: ../../mod/network.php:447
msgid "Group is empty"
msgstr "Grupo estas malplena"
-#: ../../mod/network.php:344
+#: ../../mod/network.php:451
msgid "Group: "
msgstr "Grupo:"
-#: ../../mod/network.php:354
+#: ../../mod/network.php:461
msgid "Contact: "
msgstr "Kontakto:"
-#: ../../mod/network.php:356
+#: ../../mod/network.php:463
msgid "Private messages to this person are at risk of public disclosure."
msgstr "La privateco de privataj mesaÄoj al ĉi tiu persono ne ĉiam estas garantita."
-#: ../../mod/network.php:361
+#: ../../mod/network.php:468
msgid "Invalid contact."
msgstr "Nevalida kontakto."
-#: ../../mod/notes.php:44 ../../boot.php:1505
+#: ../../mod/notes.php:44 ../../boot.php:1565
msgid "Personal Notes"
msgstr "Personaj Notoj"
#: ../../mod/notes.php:63 ../../mod/filer.php:30
-#: ../../addon/facebook/facebook.php:748
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:147
-#: ../../include/text.php:652
+#: ../../addon/facebook/facebook.php:768
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:187
+#: ../../addon/dav/layout.fnk.php:384 ../../include/text.php:652
msgid "Save"
msgstr "Konservi"
@@ -2373,7 +2454,7 @@ msgstr "Konservi"
msgid "Number of daily wall messages for %s exceeded. Message failed."
msgstr "Number of daily wall messages for %s exceeded. MessaÄo malsukcesis."
-#: ../../mod/wallmessage.php:56 ../../mod/message.php:65
+#: ../../mod/wallmessage.php:56 ../../mod/message.php:66
msgid "No recipient selected."
msgstr "Neniom da ricevontoj."
@@ -2381,15 +2462,15 @@ msgstr "Neniom da ricevontoj."
msgid "Unable to check your home location."
msgstr "Ne eblas kontroli vian hejmlokon."
-#: ../../mod/wallmessage.php:62 ../../mod/message.php:72
+#: ../../mod/wallmessage.php:62 ../../mod/message.php:73
msgid "Message could not be sent."
msgstr "Ne povas sendi la mesaÄon."
-#: ../../mod/wallmessage.php:65 ../../mod/message.php:75
+#: ../../mod/wallmessage.php:65 ../../mod/message.php:76
msgid "Message collection failure."
msgstr "Malsukcese provis kolekti mesaÄojn."
-#: ../../mod/wallmessage.php:68 ../../mod/message.php:78
+#: ../../mod/wallmessage.php:68 ../../mod/message.php:79
msgid "Message sent."
msgstr "MesaÄo estas sendita."
@@ -2397,12 +2478,12 @@ msgstr "MesaÄo estas sendita."
msgid "No recipient."
msgstr "Neniom da ricevontoj."
-#: ../../mod/wallmessage.php:124 ../../mod/message.php:171
-#: ../../include/conversation.php:918
+#: ../../mod/wallmessage.php:124 ../../mod/message.php:172
+#: ../../include/conversation.php:947
msgid "Please enter a link URL:"
msgstr "Bonvolu entajpu adreson de ligilo:"
-#: ../../mod/wallmessage.php:131 ../../mod/message.php:199
+#: ../../mod/wallmessage.php:131 ../../mod/message.php:200
msgid "Send Private Message"
msgstr "Sendi Privatan MesaÄon"
@@ -2413,18 +2494,18 @@ msgid ""
"your site allow private mail from unknown senders."
msgstr "Se vi deziras ke %s respondu, bonvolu kontroli ke la privatecaj agordoj je via retejo permesas privatajn mesaÄojn de nekonataj sendantoj."
-#: ../../mod/wallmessage.php:133 ../../mod/message.php:200
-#: ../../mod/message.php:395
+#: ../../mod/wallmessage.php:133 ../../mod/message.php:201
+#: ../../mod/message.php:399
msgid "To:"
msgstr "Al:"
-#: ../../mod/wallmessage.php:134 ../../mod/message.php:204
-#: ../../mod/message.php:396
+#: ../../mod/wallmessage.php:134 ../../mod/message.php:206
+#: ../../mod/message.php:401
msgid "Subject:"
msgstr "Temo:"
-#: ../../mod/wallmessage.php:140 ../../mod/message.php:208
-#: ../../mod/message.php:399 ../../mod/invite.php:113
+#: ../../mod/wallmessage.php:140 ../../mod/message.php:210
+#: ../../mod/message.php:404 ../../mod/invite.php:113
msgid "Your message:"
msgstr "Via mesaÄo:"
@@ -2490,7 +2571,7 @@ msgid ""
"Enter your email access information on your Connector Settings page if you "
"wish to import and interact with friends or mailing lists from your email "
"INBOX"
-msgstr "Entajpu la akreditaĵojn por via retpoÅtkonto en la konektilagordoj se vi volas importi aÅ­ interagi kun amikoj aÅ­ dissendlistoj tra via retkesto."
+msgstr "Entajpu la akreditaĵojn por via retpoÅtkonto en la konektilagordoj se vi volas importi aÅ­ interagi kun amikoj aÅ­ dissendlistoj pere de via retkesto."
#: ../../mod/newmember.php:34
msgid ""
@@ -2566,7 +2647,7 @@ msgstr "Grupo ne estas trovita."
msgid "Group name changed."
msgstr "La nomo de la grupo estas ÅanÄita."
-#: ../../mod/group.php:72 ../../mod/profperm.php:19 ../../index.php:305
+#: ../../mod/group.php:72 ../../mod/profperm.php:19 ../../index.php:308
msgid "Permission denied"
msgstr "Malpermesita"
@@ -2606,9 +2687,9 @@ msgstr "Nevaliada profila identigilo."
msgid "Profile Visibility Editor"
msgstr "Redaktilo por profila videbleco."
-#: ../../mod/profperm.php:103 ../../view/theme/diabook/theme.php:124
-#: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:74
-#: ../../include/nav.php:50 ../../boot.php:1484
+#: ../../mod/profperm.php:103 ../../view/theme/diabook/theme.php:128
+#: ../../include/profile_advanced.php:7 ../../include/profile_advanced.php:84
+#: ../../include/nav.php:50 ../../boot.php:1544
msgid "Profile"
msgstr "Profilo"
@@ -2628,193 +2709,125 @@ msgstr "Neniu kontaktojn."
msgid "View Contacts"
msgstr "Vidi Kontaktojn"
-#: ../../mod/register.php:64
-msgid "An invitation is required."
-msgstr "Invio bezonata."
-
-#: ../../mod/register.php:69
-msgid "Invitation could not be verified."
-msgstr "Ne povis kontroli la inviton."
-
-#: ../../mod/register.php:77
-msgid "Invalid OpenID url"
-msgstr "Nevalida OpenID adreso"
-
-#: ../../mod/register.php:92
-msgid "Please enter the required information."
-msgstr "Bonvolu entajpi la bezonatajn informojn."
-
-#: ../../mod/register.php:106
-msgid "Please use a shorter name."
-msgstr "Bonvolu uzi pli mallongan nomon."
-
-#: ../../mod/register.php:108
-msgid "Name too short."
-msgstr "Nomo estas tro mallonga."
-
-#: ../../mod/register.php:123
-msgid "That doesn't appear to be your full (First Last) name."
-msgstr "Tio Åajne ne estas via plena (persona, familia) nomo."
-
-#: ../../mod/register.php:128
-msgid "Your email domain is not among those allowed on this site."
-msgstr "Via retpoÅtodomajno ne estas permesita ĉi tie."
-
-#: ../../mod/register.php:131
-msgid "Not a valid email address."
-msgstr "Nevalida retpoÅtadreso."
-
-#: ../../mod/register.php:141
-msgid "Cannot use that email."
-msgstr "Neuzebla retpoÅtadreso."
-
-#: ../../mod/register.php:147
-msgid ""
-"Your \"nickname\" can only contain \"a-z\", \"0-9\", \"-\", and \"_\", and "
-"must also begin with a letter."
-msgstr "Via kaÅnomo nur povas enhavi \"a-z\", \"0-9\", \"-\", kaj \"_\". Äœi ankaÅ­ devas komenci kun litero."
-
-#: ../../mod/register.php:153 ../../mod/register.php:264
-msgid "Nickname is already registered. Please choose another."
-msgstr "Tio kaÅnomo jam estas registrita. Bonvolu elekti alian."
-
-#: ../../mod/register.php:163
-msgid ""
-"Nickname was once registered here and may not be re-used. Please choose "
-"another."
-msgstr "Tiu kaÅnomo iam estis registrita ĉi tie kaj ne ree uzeblas. Bonvolu elekti alian."
-
-#: ../../mod/register.php:182
-msgid "SERIOUS ERROR: Generation of security keys failed."
-msgstr "GRAVA ERARO: La generacio de sekurecaj ĉifroÅlosiloj malsukcesis."
-
-#: ../../mod/register.php:250
-msgid "An error occurred during registration. Please try again."
-msgstr "Eraro okazis dum registrado. Bonvolu provi denove."
-
-#: ../../mod/register.php:286
-msgid "An error occurred creating your default profile. Please try again."
-msgstr "Eraro okazi dum kreado de via defaÅ­lta profilo. Bonvolu provi denove."
-
-#: ../../mod/register.php:386 ../../mod/regmod.php:52
+#: ../../mod/register.php:88 ../../mod/regmod.php:52
#, php-format
msgid "Registration details for %s"
msgstr "Detaloj de la registrado por %s"
-#: ../../mod/register.php:394
+#: ../../mod/register.php:96
msgid ""
"Registration successful. Please check your email for further instructions."
msgstr "Registrado sukcesis. Bonvolu kontroli vian retpoÅton por pli da instruoj."
-#: ../../mod/register.php:398
+#: ../../mod/register.php:100
msgid "Failed to send email message. Here is the message that failed."
msgstr "Malsukcesis sendi retpoÅton. Jen la malsukcesa mesaÄo."
-#: ../../mod/register.php:403
+#: ../../mod/register.php:105
msgid "Your registration can not be processed."
msgstr "Mi ne povas prilabori vian registradon."
-#: ../../mod/register.php:440
+#: ../../mod/register.php:142
#, php-format
msgid "Registration request at %s"
msgstr "Peto de registrado al %s"
-#: ../../mod/register.php:449
+#: ../../mod/register.php:151
msgid "Your registration is pending approval by the site owner."
msgstr "Via registrado bezonas apropbon de la administranto."
-#: ../../mod/register.php:487
+#: ../../mod/register.php:189
msgid ""
"This site has exceeded the number of allowed daily account registrations. "
"Please try again tomorrow."
msgstr "La retejo transiras la maksimuman kvanton da ĉiutagaj kontaj registradoj. Bonvolu provi denove morgaŭ."
-#: ../../mod/register.php:513
+#: ../../mod/register.php:215
msgid ""
"You may (optionally) fill in this form via OpenID by supplying your OpenID "
"and clicking 'Register'."
-msgstr "Vi ankaÅ­ (nedeviga) povas plenigi la formularon tra OpenID se vi provizas vian OpenID adreson kaj klakas 'Registri'."
+msgstr "Vi ankaÅ­ (nedeviga) povas plenigi la formularon per OpenID se vi provizas vian OpenID adreson kaj klakas 'Registri'."
-#: ../../mod/register.php:514
+#: ../../mod/register.php:216
msgid ""
"If you are not familiar with OpenID, please leave that field blank and fill "
"in the rest of the items."
msgstr "Se vi ne konas OpenID, bonvolu lasi tiun kampon malplena kaj entajpu la aliajn elementojn."
-#: ../../mod/register.php:515
+#: ../../mod/register.php:217
msgid "Your OpenID (optional): "
msgstr "Via OpenID (nedeviga):"
-#: ../../mod/register.php:529
+#: ../../mod/register.php:231
msgid "Include your profile in member directory?"
msgstr "Aldoni vian profilon al la membrokatalogo?"
-#: ../../mod/register.php:549
+#: ../../mod/register.php:251
msgid "Membership on this site is by invitation only."
msgstr "MembriÄi ĉi tie nur eblas laÅ­ invito."
-#: ../../mod/register.php:550
+#: ../../mod/register.php:252
msgid "Your invitation ID: "
msgstr "Via invita idento: "
-#: ../../mod/register.php:553 ../../mod/admin.php:405
+#: ../../mod/register.php:255 ../../mod/admin.php:421
msgid "Registration"
msgstr "Registrado"
-#: ../../mod/register.php:561
+#: ../../mod/register.php:263
msgid "Your Full Name (e.g. Joe Smith): "
msgstr "Via Plena Nomo (e.g. Joe Smith): "
-#: ../../mod/register.php:562
+#: ../../mod/register.php:264
msgid "Your Email Address: "
msgstr "Via RetpoÅtadreso: "
-#: ../../mod/register.php:563
+#: ../../mod/register.php:265
msgid ""
"Choose a profile nickname. This must begin with a text character. Your "
"profile address on this site will then be "
"'<strong>nickname@$sitename</strong>'."
msgstr "Elektu kaÅnomon por la profilo. Tiu bezonas komenci kun teksta litero. Poste, via profila adreso ĉi tie estos: '<strong>kaÅnomo@$sitename</strong>'."
-#: ../../mod/register.php:564
+#: ../../mod/register.php:266
msgid "Choose a nickname: "
msgstr "Elektu kaÅnomon: "
-#: ../../mod/register.php:567 ../../include/nav.php:81 ../../boot.php:790
+#: ../../mod/register.php:269 ../../include/nav.php:81 ../../boot.php:828
msgid "Register"
msgstr "Registri"
-#: ../../mod/dirfind.php:23
+#: ../../mod/dirfind.php:26
msgid "People Search"
msgstr "Serĉi Membrojn"
-#: ../../mod/like.php:127 ../../mod/tagger.php:70
-#: ../../addon/facebook/facebook.php:1564
+#: ../../mod/like.php:144 ../../mod/like.php:301 ../../mod/tagger.php:70
+#: ../../addon/facebook/facebook.php:1584
#: ../../addon/communityhome/communityhome.php:158
#: ../../addon/communityhome/communityhome.php:167
-#: ../../view/theme/diabook/theme.php:493
-#: ../../view/theme/diabook/theme.php:502 ../../include/diaspora.php:1654
+#: ../../view/theme/diabook/theme.php:565
+#: ../../view/theme/diabook/theme.php:574 ../../include/diaspora.php:1710
#: ../../include/conversation.php:48 ../../include/conversation.php:57
#: ../../include/conversation.php:121 ../../include/conversation.php:130
msgid "status"
msgstr "staton"
-#: ../../mod/like.php:144 ../../addon/facebook/facebook.php:1568
+#: ../../mod/like.php:161 ../../addon/facebook/facebook.php:1588
#: ../../addon/communityhome/communityhome.php:172
-#: ../../view/theme/diabook/theme.php:507 ../../include/diaspora.php:1670
+#: ../../view/theme/diabook/theme.php:579 ../../include/diaspora.php:1726
#: ../../include/conversation.php:65
#, php-format
msgid "%1$s likes %2$s's %3$s"
msgstr "%1$s Åatas la %3$s de %2$s"
-#: ../../mod/like.php:146 ../../include/conversation.php:68
+#: ../../mod/like.php:163 ../../include/conversation.php:68
#, php-format
msgid "%1$s doesn't like %2$s's %3$s"
msgstr "%1$s malÅatas la %3$s de %2$s"
-#: ../../mod/notice.php:15 ../../mod/viewsrc.php:15 ../../mod/admin.php:156
-#: ../../mod/admin.php:684 ../../mod/admin.php:883 ../../mod/display.php:37
-#: ../../mod/display.php:142 ../../include/items.php:3084
+#: ../../mod/notice.php:15 ../../mod/viewsrc.php:15 ../../mod/admin.php:159
+#: ../../mod/admin.php:700 ../../mod/admin.php:899 ../../mod/display.php:37
+#: ../../mod/display.php:142 ../../include/items.php:3334
msgid "Item not found."
msgstr "Elemento ne estas trovita."
@@ -2822,12 +2835,12 @@ msgstr "Elemento ne estas trovita."
msgid "Access denied."
msgstr "Atingo nepermesita."
-#: ../../mod/fbrowser.php:23 ../../view/theme/diabook/theme.php:126
-#: ../../include/nav.php:51 ../../boot.php:1490
+#: ../../mod/fbrowser.php:25 ../../view/theme/diabook/theme.php:130
+#: ../../include/nav.php:51 ../../boot.php:1550
msgid "Photos"
msgstr "Bildoj"
-#: ../../mod/fbrowser.php:86
+#: ../../mod/fbrowser.php:96
msgid "Files"
msgstr "Dosieroj"
@@ -2848,39 +2861,39 @@ msgstr "Bonvolu ensaluti."
msgid "Unable to locate original post."
msgstr "Ne eblas trovi originalan afiÅon."
-#: ../../mod/item.php:249
+#: ../../mod/item.php:258
msgid "Empty post discarded."
msgstr "ForviÅis malplenan afiÅon."
-#: ../../mod/item.php:372 ../../mod/wall_upload.php:99
-#: ../../mod/wall_upload.php:108 ../../mod/wall_upload.php:115
+#: ../../mod/item.php:379 ../../mod/wall_upload.php:115
+#: ../../mod/wall_upload.php:124 ../../mod/wall_upload.php:131
#: ../../include/message.php:144
msgid "Wall Photos"
msgstr "Muraj Bildoj"
-#: ../../mod/item.php:781
+#: ../../mod/item.php:784
msgid "System error. Post not saved."
msgstr "Sistema eraro. AfiÅo ne registrita."
-#: ../../mod/item.php:806
+#: ../../mod/item.php:809
#, php-format
msgid ""
"This message was sent to you by %s, a member of the Friendica social "
"network."
msgstr "Ĉi mesaÄo estas sendita al vi de %s, membro de la Friendica interkona reto."
-#: ../../mod/item.php:808
+#: ../../mod/item.php:811
#, php-format
msgid "You may visit them online at %s"
msgstr "Vi povas viziti ilin rete ĉe %s"
-#: ../../mod/item.php:809
+#: ../../mod/item.php:812
msgid ""
"Please contact the sender by replying to this post if you do not wish to "
"receive these messages."
msgstr "Bonvolu rispondi al ĉi mesaÄo kaj kontaktu la sendinto se vi ne volas ricevi tiujn mesaÄojn."
-#: ../../mod/item.php:811
+#: ../../mod/item.php:814
#, php-format
msgid "%s posted an update."
msgstr "%s publikigis afiÅon."
@@ -2890,7 +2903,7 @@ msgid "Image uploaded but image cropping failed."
msgstr "Bildo estas alÅutita, sed malsukcesis tranĉi la bildon."
#: ../../mod/profile_photo.php:63 ../../mod/profile_photo.php:70
-#: ../../mod/profile_photo.php:77 ../../mod/profile_photo.php:264
+#: ../../mod/profile_photo.php:77 ../../mod/profile_photo.php:266
#, php-format
msgid "Image size reduction [%s] failed."
msgstr "Malsukcesis malpligrandigi [%s] la bildon."
@@ -2905,44 +2918,44 @@ msgstr "ReÅarÄu la paÄon au malplenigu la kaÅmemoro de la retesplorilo se la
msgid "Unable to process image"
msgstr "Ne eblas procezi bildon."
-#: ../../mod/profile_photo.php:115 ../../mod/wall_upload.php:74
+#: ../../mod/profile_photo.php:117 ../../mod/wall_upload.php:77
#, php-format
msgid "Image exceeds size limit of %d"
msgstr "Bildo estas pli granda ol la limito %d"
-#: ../../mod/profile_photo.php:207
+#: ../../mod/profile_photo.php:209
msgid "Upload File:"
msgstr "AlÅuti dosieron:"
-#: ../../mod/profile_photo.php:208
+#: ../../mod/profile_photo.php:210
msgid "Upload Profile Photo"
msgstr "AlÅuti profilbildon"
-#: ../../mod/profile_photo.php:209
+#: ../../mod/profile_photo.php:211
msgid "Upload"
msgstr "AlÅuti"
-#: ../../mod/profile_photo.php:211
+#: ../../mod/profile_photo.php:213
msgid "skip this step"
msgstr "Preterpasi tian paÅon"
-#: ../../mod/profile_photo.php:211
+#: ../../mod/profile_photo.php:213
msgid "select a photo from your photo albums"
msgstr "elekti bildon el viaj albumoj"
-#: ../../mod/profile_photo.php:224
+#: ../../mod/profile_photo.php:226
msgid "Crop Image"
msgstr "Stuci Bildon"
-#: ../../mod/profile_photo.php:225
+#: ../../mod/profile_photo.php:227
msgid "Please adjust the image cropping for optimum viewing."
msgstr "Bonvolu agordi la stuco de la bildo por optimuma aspekto."
-#: ../../mod/profile_photo.php:227
+#: ../../mod/profile_photo.php:229
msgid "Done Editing"
msgstr "Finigi Redaktado"
-#: ../../mod/profile_photo.php:255
+#: ../../mod/profile_photo.php:257
msgid "Image uploaded successfully."
msgstr "Bildo estas sukcese enÅutita."
@@ -2968,67 +2981,67 @@ msgstr "Bonvolu entajpi vian pasvorton por kontrolado:"
msgid "New Message"
msgstr "Nova MesaÄo"
-#: ../../mod/message.php:69
+#: ../../mod/message.php:70
msgid "Unable to locate contact information."
msgstr "Ne eblas trovi kontaktajn informojn."
-#: ../../mod/message.php:119
+#: ../../mod/message.php:120
msgid "Message deleted."
msgstr "MesaÄo estas forviÅita."
-#: ../../mod/message.php:149
+#: ../../mod/message.php:150
msgid "Conversation removed."
msgstr "Dialogo estas forviÅita."
-#: ../../mod/message.php:244
+#: ../../mod/message.php:247
msgid "No messages."
msgstr "Neniom da mesaÄoj."
-#: ../../mod/message.php:251
+#: ../../mod/message.php:254
#, php-format
msgid "Unknown sender - %s"
msgstr "Nekonata sendanto - %s"
-#: ../../mod/message.php:254
+#: ../../mod/message.php:257
#, php-format
msgid "You and %s"
msgstr "Vi kaj %s"
-#: ../../mod/message.php:257
+#: ../../mod/message.php:260
#, php-format
msgid "%s and You"
msgstr "%s kaj vi"
-#: ../../mod/message.php:267 ../../mod/message.php:388
+#: ../../mod/message.php:270 ../../mod/message.php:392
msgid "Delete conversation"
msgstr "ForviÅi dialogon"
-#: ../../mod/message.php:270
+#: ../../mod/message.php:273
msgid "D, d M Y - g:i A"
msgstr "D, d M Y - g:i A"
-#: ../../mod/message.php:272
+#: ../../mod/message.php:275
#, php-format
msgid "%d message"
msgid_plural "%d messages"
msgstr[0] "%d mesaÄo"
msgstr[1] "%d mesaÄoj"
-#: ../../mod/message.php:307
+#: ../../mod/message.php:310
msgid "Message not available."
msgstr "MesaÄo nedisponebla."
-#: ../../mod/message.php:372
+#: ../../mod/message.php:375
msgid "Delete message"
msgstr "ForviÅu mesaÄon"
-#: ../../mod/message.php:390
+#: ../../mod/message.php:394
msgid ""
"No secure communications available. You <strong>may</strong> be able to "
"respond from the sender's profile page."
msgstr "Sekura komunikado ne disponeblas. Vi <strong>eble</strong> povus respondi sur la profilpaÄo de la sendanto."
-#: ../../mod/message.php:394
+#: ../../mod/message.php:398
msgid "Send Reply"
msgstr "Respondi"
@@ -3045,19 +3058,19 @@ msgstr "Neniom da amiko al montri."
msgid "Theme settings updated."
msgstr "Gisdatigis agordojn pri etosoj."
-#: ../../mod/admin.php:96 ../../mod/admin.php:403
+#: ../../mod/admin.php:96 ../../mod/admin.php:419
msgid "Site"
msgstr "Retejo"
-#: ../../mod/admin.php:97 ../../mod/admin.php:639 ../../mod/admin.php:651
+#: ../../mod/admin.php:97 ../../mod/admin.php:655 ../../mod/admin.php:667
msgid "Users"
msgstr "Uzantoj"
-#: ../../mod/admin.php:98 ../../mod/admin.php:733 ../../mod/admin.php:775
+#: ../../mod/admin.php:98 ../../mod/admin.php:749 ../../mod/admin.php:791
msgid "Plugins"
msgstr "Kromprogramoj"
-#: ../../mod/admin.php:99 ../../mod/admin.php:938 ../../mod/admin.php:974
+#: ../../mod/admin.php:99 ../../mod/admin.php:954 ../../mod/admin.php:990
msgid "Themes"
msgstr "Etosoj"
@@ -3065,598 +3078,622 @@ msgstr "Etosoj"
msgid "DB updates"
msgstr "DB Äisdatigoj"
-#: ../../mod/admin.php:101
-msgid "Software Update"
-msgstr "Friendica Äœisdatigoj"
-
-#: ../../mod/admin.php:115 ../../mod/admin.php:1061
+#: ../../mod/admin.php:115 ../../mod/admin.php:122 ../../mod/admin.php:1077
msgid "Logs"
msgstr "Protokoloj"
-#: ../../mod/admin.php:120
+#: ../../mod/admin.php:120 ../../include/nav.php:146
+msgid "Admin"
+msgstr "Administrado"
+
+#: ../../mod/admin.php:121
+msgid "Plugin Features"
+msgstr "Kromprogramaj Trajtoj"
+
+#: ../../mod/admin.php:123
msgid "User registrations waiting for confirmation"
msgstr "Uzantaj registradoj atendante konfirmon"
-#: ../../mod/admin.php:195 ../../mod/admin.php:402 ../../mod/admin.php:638
-#: ../../mod/admin.php:732 ../../mod/admin.php:774 ../../mod/admin.php:937
-#: ../../mod/admin.php:973 ../../mod/admin.php:1060
+#: ../../mod/admin.php:183 ../../mod/admin.php:637
+msgid "Normal Account"
+msgstr "Normala konto"
+
+#: ../../mod/admin.php:184 ../../mod/admin.php:638
+msgid "Soapbox Account"
+msgstr "Soapbox Konto"
+
+#: ../../mod/admin.php:185 ../../mod/admin.php:639
+msgid "Community/Celebrity Account"
+msgstr "Komunuma/eminentula Konto"
+
+#: ../../mod/admin.php:186 ../../mod/admin.php:640
+msgid "Automatic Friend Account"
+msgstr "AÅ­tomata Amika Konto"
+
+#: ../../mod/admin.php:205
+msgid "Message queues"
+msgstr "MesaÄvicoj"
+
+#: ../../mod/admin.php:210 ../../mod/admin.php:418 ../../mod/admin.php:654
+#: ../../mod/admin.php:748 ../../mod/admin.php:790 ../../mod/admin.php:953
+#: ../../mod/admin.php:989 ../../mod/admin.php:1076
msgid "Administration"
msgstr "Administrado"
-#: ../../mod/admin.php:196
+#: ../../mod/admin.php:211
msgid "Summary"
msgstr "Resumo"
-#: ../../mod/admin.php:197
+#: ../../mod/admin.php:213
msgid "Registered users"
msgstr "Registrataj uzantoj"
-#: ../../mod/admin.php:199
+#: ../../mod/admin.php:215
msgid "Pending registrations"
msgstr "Okazontaj registradoj"
-#: ../../mod/admin.php:200
+#: ../../mod/admin.php:216
msgid "Version"
msgstr "Versio"
-#: ../../mod/admin.php:202
+#: ../../mod/admin.php:218
msgid "Active plugins"
msgstr "Åœaltitaj kromprogramoj"
-#: ../../mod/admin.php:341
+#: ../../mod/admin.php:357
msgid "Site settings updated."
msgstr "Äœisdatigis retejaj agordoj."
-#: ../../mod/admin.php:389
+#: ../../mod/admin.php:405
msgid "Closed"
msgstr "Ferma"
-#: ../../mod/admin.php:390
+#: ../../mod/admin.php:406
msgid "Requires approval"
msgstr "Bezonas aprobon"
-#: ../../mod/admin.php:391
+#: ../../mod/admin.php:407
msgid "Open"
msgstr "Malferma"
-#: ../../mod/admin.php:395
+#: ../../mod/admin.php:411
msgid "No SSL policy, links will track page SSL state"
msgstr "Sen SSL strategio. Ligiloj sekvos la SSL staton de la paÄo."
-#: ../../mod/admin.php:396
+#: ../../mod/admin.php:412
msgid "Force all links to use SSL"
msgstr "Devigi ke ĉiuj ligiloj uzu SSL."
-#: ../../mod/admin.php:397
+#: ../../mod/admin.php:413
msgid "Self-signed certificate, use SSL for local links only (discouraged)"
msgstr "Memsubskribita atestilo, nur uzu SSL por lokaj ligiloj (malkuraÄigata)"
-#: ../../mod/admin.php:406
+#: ../../mod/admin.php:422
msgid "File upload"
msgstr "AlÅuto"
-#: ../../mod/admin.php:407
+#: ../../mod/admin.php:423
msgid "Policies"
msgstr "Politiko"
-#: ../../mod/admin.php:408
+#: ../../mod/admin.php:424
msgid "Advanced"
msgstr "Altnivela"
-#: ../../mod/admin.php:412 ../../addon/statusnet/statusnet.php:544
+#: ../../mod/admin.php:428 ../../addon/statusnet/statusnet.php:558
msgid "Site name"
msgstr "Nomo de retejo"
-#: ../../mod/admin.php:413
+#: ../../mod/admin.php:429
msgid "Banner/Logo"
msgstr "Emblemo"
-#: ../../mod/admin.php:414
+#: ../../mod/admin.php:430
msgid "System language"
msgstr "Sistema lingvo"
-#: ../../mod/admin.php:415
+#: ../../mod/admin.php:431
msgid "System theme"
msgstr "Sistema etoso"
-#: ../../mod/admin.php:415
+#: ../../mod/admin.php:431
msgid ""
"Default system theme - may be over-ridden by user profiles - <a href='#' "
"id='cnftheme'>change theme settings</a>"
msgstr "DefaÅ­lta sistema etoso - transpasebla de uzantprofiloj - <a href='#' id='cnftheme'>redakti agordoj pri etosoj</a>"
-#: ../../mod/admin.php:416
+#: ../../mod/admin.php:432
msgid "SSL link policy"
msgstr "Strategio por SSL ligiloj"
-#: ../../mod/admin.php:416
+#: ../../mod/admin.php:432
msgid "Determines whether generated links should be forced to use SSL"
msgstr "Difinas ĉu generotaj ligiloj devige uzu SSL."
-#: ../../mod/admin.php:417
+#: ../../mod/admin.php:433
msgid "Maximum image size"
msgstr "Maksimuma bildgrando"
-#: ../../mod/admin.php:417
+#: ../../mod/admin.php:433
msgid ""
"Maximum size in bytes of uploaded images. Default is 0, which means no "
"limits."
msgstr "Maksimuma grando en bajtoj por alÅutotaj bildoj. DefaÅ­lte 0, kio signifas neniu limito."
-#: ../../mod/admin.php:419
+#: ../../mod/admin.php:435
msgid "Register policy"
msgstr "Interkonsento pri registrado"
-#: ../../mod/admin.php:420
+#: ../../mod/admin.php:436
msgid "Register text"
msgstr "Interkonsento teksto"
-#: ../../mod/admin.php:420
+#: ../../mod/admin.php:436
msgid "Will be displayed prominently on the registration page."
msgstr "Tio estos eminente montrata en la registro paÄo."
-#: ../../mod/admin.php:421
+#: ../../mod/admin.php:437
msgid "Accounts abandoned after x days"
msgstr "Kontoj forlasitaj post x tagoj"
-#: ../../mod/admin.php:421
+#: ../../mod/admin.php:437
msgid ""
"Will not waste system resources polling external sites for abandonded "
"accounts. Enter 0 for no time limit."
msgstr "Mi ne malÅparu energion por enketi aliajn retejojn pri forlasitaj kontoj. Entajpu 0 por ne uzi templimo."
-#: ../../mod/admin.php:422
+#: ../../mod/admin.php:438
msgid "Allowed friend domains"
msgstr "Permesitaj amikaj domainoj"
-#: ../../mod/admin.php:422
+#: ../../mod/admin.php:438
msgid ""
"Comma separated list of domains which are allowed to establish friendships "
"with this site. Wildcards are accepted. Empty to allow any domains"
msgstr "Perkome disigita listo da domajnoj kiuj rajtas konstrui amikecojn kun ĉi tiu retejo. Ĵokeroj eblas. Malplena por rajtigi ĉiujn ajn domajnojn."
-#: ../../mod/admin.php:423
+#: ../../mod/admin.php:439
msgid "Allowed email domains"
msgstr "Permesitaj retpoÅtaj domajnoj"
-#: ../../mod/admin.php:423
+#: ../../mod/admin.php:439
msgid ""
"Comma separated list of domains which are allowed in email addresses for "
"registrations to this site. Wildcards are accepted. Empty to allow any "
"domains"
msgstr "Perkome disigita listo da domajnoj kiuj uzeblas kiel retpoÅtaj adresoj en novaj registradoj. Ä´okeroj eblas. Malplena por rajtigi ĉiujn ajn domajnojn."
-#: ../../mod/admin.php:424
+#: ../../mod/admin.php:440
msgid "Block public"
msgstr "Bloki publike"
-#: ../../mod/admin.php:424
+#: ../../mod/admin.php:440
msgid ""
"Check to block public access to all otherwise public personal pages on this "
"site unless you are currently logged in."
msgstr "Elektu por bloki publikan atingon al ĉiuj alie publikajn paÄojn en ĉi tiu retejo kiam vi ne estas ensalutita."
-#: ../../mod/admin.php:425
+#: ../../mod/admin.php:441
msgid "Force publish"
msgstr "Devigi publikigon"
-#: ../../mod/admin.php:425
+#: ../../mod/admin.php:441
msgid ""
"Check to force all profiles on this site to be listed in the site directory."
msgstr "Elektu por devigi la registradon en la loka katalogo al ĉiuj profiloj en ĉi tiu retejo."
-#: ../../mod/admin.php:426
+#: ../../mod/admin.php:442
msgid "Global directory update URL"
msgstr "Äœenerala adreso por Äisdatigi la katalogon"
-#: ../../mod/admin.php:426
+#: ../../mod/admin.php:442
msgid ""
"URL to update the global directory. If this is not set, the global directory"
" is completely unavailable to the application."
msgstr "URL adreso por Äisdatigi la tutmondan katalogon. Se ne agordita, la tutmonda katatolge tute ne disponeblas al la programo."
-#: ../../mod/admin.php:428
+#: ../../mod/admin.php:444
msgid "Block multiple registrations"
msgstr "Bloki pluroblajn registradojn."
-#: ../../mod/admin.php:428
+#: ../../mod/admin.php:444
msgid "Disallow users to register additional accounts for use as pages."
msgstr "Malpermesi al uzantoj la permeson por registri pluajn kontojn kiel paÄoj."
-#: ../../mod/admin.php:429
+#: ../../mod/admin.php:445
msgid "OpenID support"
msgstr "Subteno por OpenID"
-#: ../../mod/admin.php:429
+#: ../../mod/admin.php:445
msgid "OpenID support for registration and logins."
msgstr "Subteni OpenID por registrado kaj ensaluto."
-#: ../../mod/admin.php:430
+#: ../../mod/admin.php:446
msgid "Fullname check"
msgstr "Kontroli plenan nomon"
-#: ../../mod/admin.php:430
+#: ../../mod/admin.php:446
msgid ""
"Force users to register with a space between firstname and lastname in Full "
"name, as an antispam measure"
msgstr "Kiel kontraÅ­spamilo, devigi uzantoj al registrado kun spaceto inter la persona nomo kaj la familia nomo."
-#: ../../mod/admin.php:431
+#: ../../mod/admin.php:447
msgid "UTF-8 Regular expressions"
msgstr "UTF-8 regulaj exprimoj"
-#: ../../mod/admin.php:431
+#: ../../mod/admin.php:447
msgid "Use PHP UTF8 regular expressions"
msgstr "Uzi PHP UTF8 regulajn esprimojn."
-#: ../../mod/admin.php:432
+#: ../../mod/admin.php:448
msgid "Show Community Page"
msgstr "Montri Komunuma PaÄo"
-#: ../../mod/admin.php:432
+#: ../../mod/admin.php:448
msgid ""
"Display a Community page showing all recent public postings on this site."
msgstr "Montri komunuma paÄo kun ĉiuj ĵusaj afiÅoj en ĉi tiu retejo."
-#: ../../mod/admin.php:433
+#: ../../mod/admin.php:449
msgid "Enable OStatus support"
msgstr "Åœalti subtenon por OStatus"
-#: ../../mod/admin.php:433
+#: ../../mod/admin.php:449
msgid ""
"Provide built-in OStatus (identi.ca, status.net, etc.) compatibility. All "
"communications in OStatus are public, so privacy warnings will be "
"occasionally displayed."
msgstr "Provizi integritan OStatus (identi.ca, status.net ktp) subtenon. Ĉiuj komunikadoj en OStatus estas publikaj, do privatecaj avertoj aperos de tempo al tempo."
-#: ../../mod/admin.php:434
+#: ../../mod/admin.php:450
msgid "Enable Diaspora support"
msgstr "Åœalti subtenon por Diaspora"
-#: ../../mod/admin.php:434
+#: ../../mod/admin.php:450
msgid "Provide built-in Diaspora network compatibility."
msgstr "Provizi integritan Diaspora subtenon."
-#: ../../mod/admin.php:435
+#: ../../mod/admin.php:451
msgid "Only allow Friendica contacts"
msgstr "Nur permesigi Friendica kontaktojn"
-#: ../../mod/admin.php:435
+#: ../../mod/admin.php:451
msgid ""
"All contacts must use Friendica protocols. All other built-in communication "
"protocols disabled."
msgstr "Ĉiuj kontaktoj devas uzi Friendica protokolojn. Ĉiuj aliaj komunikaj protokoloj malaktivita."
-#: ../../mod/admin.php:436
+#: ../../mod/admin.php:452
msgid "Verify SSL"
msgstr "Kontroli SSL"
-#: ../../mod/admin.php:436
+#: ../../mod/admin.php:452
msgid ""
"If you wish, you can turn on strict certificate checking. This will mean you"
" cannot connect (at all) to self-signed SSL sites."
msgstr "Se vi deziras, vi povas aktivigi severan kontroladon de SSL atestiloj. Pro tio, vie (tute) ne eblos konekti al SSL retejoj kun memsubskribitaj atestiloj."
-#: ../../mod/admin.php:437
+#: ../../mod/admin.php:453
msgid "Proxy user"
msgstr "Uzantnomo por retperanto"
-#: ../../mod/admin.php:438
+#: ../../mod/admin.php:454
msgid "Proxy URL"
msgstr "URL adreso de retperanto"
-#: ../../mod/admin.php:439
+#: ../../mod/admin.php:455
msgid "Network timeout"
msgstr "Reta tempolimo"
-#: ../../mod/admin.php:439
+#: ../../mod/admin.php:455
msgid "Value is in seconds. Set to 0 for unlimited (not recommended)."
msgstr "Valoro en sekundoj. Uzu 0 por mallimitigi (ne rekomendata)."
-#: ../../mod/admin.php:440
+#: ../../mod/admin.php:456
msgid "Delivery interval"
msgstr "Intervalo de liverado"
-#: ../../mod/admin.php:440
+#: ../../mod/admin.php:456
msgid ""
"Delay background delivery processes by this many seconds to reduce system "
"load. Recommend: 4-5 for shared hosts, 2-3 for virtual private servers. 0-1 "
"for large dedicated servers."
msgstr "Malfruigi fonan liveradon dum tiom da sekundoj por malpliigi la Åargon de la sistemo. Rekomendoj: 4-5 por komunaj serviloj, 2-3 por virtualaj privataj serviloj, 0-1 por grandaj dediĉitaj serviloj."
-#: ../../mod/admin.php:441
+#: ../../mod/admin.php:457
msgid "Poll interval"
msgstr "Enketintervalo"
-#: ../../mod/admin.php:441
+#: ../../mod/admin.php:457
msgid ""
"Delay background polling processes by this many seconds to reduce system "
"load. If 0, use delivery interval."
msgstr "Malfruigi fonajn enketprocesojn je tiom da sekundoj por malpliigi la Åargon de la sistemo. Se 0, uzas la liverintervalon."
-#: ../../mod/admin.php:442
+#: ../../mod/admin.php:458
msgid "Maximum Load Average"
msgstr "Maksimuma Meza SistemÅargo"
-#: ../../mod/admin.php:442
+#: ../../mod/admin.php:458
msgid ""
"Maximum system load before delivery and poll processes are deferred - "
"default 50."
msgstr "Maksimuma sistemÅargo post kiu livero- kaj enketprocesoj estos prokrastinataj. - DefaÅ­lte 50."
-#: ../../mod/admin.php:456
+#: ../../mod/admin.php:472
msgid "Update has been marked successful"
msgstr "Äœisdatigo estas markita sukcesa"
-#: ../../mod/admin.php:466
+#: ../../mod/admin.php:482
#, php-format
msgid "Executing %s failed. Check system logs."
msgstr "Ne sukcesis plenumi %s. Kontrolu la sistemprotokolojn."
-#: ../../mod/admin.php:469
+#: ../../mod/admin.php:485
#, php-format
msgid "Update %s was successfully applied."
msgstr "Sukcese aplikis la Äisdatigo %s."
-#: ../../mod/admin.php:473
+#: ../../mod/admin.php:489
#, php-format
msgid "Update %s did not return a status. Unknown if it succeeded."
msgstr "Äœisdatigo %s ne liveris elirstaton. "
-#: ../../mod/admin.php:476
+#: ../../mod/admin.php:492
#, php-format
msgid "Update function %s could not be found."
msgstr "Ne troveblas Äisdatigo funkcio %s."
-#: ../../mod/admin.php:491
+#: ../../mod/admin.php:507
msgid "No failed updates."
msgstr "Neniom da malsukcesaj Äisdatigoj."
-#: ../../mod/admin.php:495
+#: ../../mod/admin.php:511
msgid "Failed Updates"
msgstr "Malsukcesaj Äœisdatigoj"
-#: ../../mod/admin.php:496
+#: ../../mod/admin.php:512
msgid ""
"This does not include updates prior to 1139, which did not return a status."
msgstr "Ne inkluzivas Äisdatigojn antaÅ­ 1139, kiuj ne liveris elirstaton."
-#: ../../mod/admin.php:497
+#: ../../mod/admin.php:513
msgid "Mark success (if update was manually applied)"
msgstr "Marki sukcesa (se la Äisdatigo estas instalita mane)"
-#: ../../mod/admin.php:498
+#: ../../mod/admin.php:514
msgid "Attempt to execute this update step automatically"
msgstr "Provi automate plenumi ĉi tian paÅon de la Äisdatigo."
-#: ../../mod/admin.php:523
+#: ../../mod/admin.php:539
#, php-format
msgid "%s user blocked/unblocked"
msgid_plural "%s users blocked/unblocked"
msgstr[0] "Blokis/malblokis %s uzanton"
msgstr[1] "Blokis/malblokis %s uzantojn"
-#: ../../mod/admin.php:530
+#: ../../mod/admin.php:546
#, php-format
msgid "%s user deleted"
msgid_plural "%s users deleted"
msgstr[0] "%s uzanto forviÅita"
msgstr[1] "%s uzanto forviÅitaj"
-#: ../../mod/admin.php:569
+#: ../../mod/admin.php:585
#, php-format
msgid "User '%s' deleted"
msgstr "Uzanto '%s' forviÅita"
-#: ../../mod/admin.php:577
+#: ../../mod/admin.php:593
#, php-format
msgid "User '%s' unblocked"
msgstr "Uzanto '%s' malblokita"
-#: ../../mod/admin.php:577
+#: ../../mod/admin.php:593
#, php-format
msgid "User '%s' blocked"
msgstr "Uzanto '%s' blokita"
-#: ../../mod/admin.php:641
+#: ../../mod/admin.php:657
msgid "select all"
msgstr "elekti ĉiujn"
-#: ../../mod/admin.php:642
+#: ../../mod/admin.php:658
msgid "User registrations waiting for confirm"
msgstr "RegistriÄoj atendante aprobon"
-#: ../../mod/admin.php:643
+#: ../../mod/admin.php:659
msgid "Request date"
msgstr "Dato de peto"
-#: ../../mod/admin.php:643 ../../mod/admin.php:652
+#: ../../mod/admin.php:659 ../../mod/admin.php:668
#: ../../include/contact_selectors.php:79
msgid "Email"
msgstr "RetpoÅto"
-#: ../../mod/admin.php:644
+#: ../../mod/admin.php:660
msgid "No registrations."
msgstr "Neniom da registriÄoj."
-#: ../../mod/admin.php:646
+#: ../../mod/admin.php:662
msgid "Deny"
msgstr "Negi"
-#: ../../mod/admin.php:652
+#: ../../mod/admin.php:668
msgid "Register date"
msgstr "Dato de registrado"
-#: ../../mod/admin.php:652
+#: ../../mod/admin.php:668
msgid "Last login"
msgstr "Plej ĵusa ensaluto"
-#: ../../mod/admin.php:652
+#: ../../mod/admin.php:668
msgid "Last item"
msgstr "Plej ĵusa elemento"
-#: ../../mod/admin.php:652
+#: ../../mod/admin.php:668
msgid "Account"
msgstr "Konto"
-#: ../../mod/admin.php:654
+#: ../../mod/admin.php:670
msgid ""
"Selected users will be deleted!\\n\\nEverything these users had posted on "
"this site will be permanently deleted!\\n\\nAre you sure?"
msgstr "La elektitaj uzantkontoj estas forviÅotaj!\\n\\nĈiuj elementoj kiujn ili afiÅis je la retpaÄo estos permanente forviÅitaj.\\n\\nĈu vi certas?"
-#: ../../mod/admin.php:655
+#: ../../mod/admin.php:671
msgid ""
"The user {0} will be deleted!\\n\\nEverything this user has posted on this "
"site will be permanently deleted!\\n\\nAre you sure?"
msgstr "La uzanto {0} estas forviÅota!\\n\\nĈiuj elementoj kiujn li afiÅis je la retpaÄo estos permanente forviÅitaj.\\n\\nĈu vi certas?"
-#: ../../mod/admin.php:696
+#: ../../mod/admin.php:712
#, php-format
msgid "Plugin %s disabled."
msgstr "Kromprogramo %s estas malÅaltita."
-#: ../../mod/admin.php:700
+#: ../../mod/admin.php:716
#, php-format
msgid "Plugin %s enabled."
msgstr "Kromprogramo %s estas Åaltita."
-#: ../../mod/admin.php:710 ../../mod/admin.php:908
+#: ../../mod/admin.php:726 ../../mod/admin.php:924
msgid "Disable"
msgstr "MalÅalti"
-#: ../../mod/admin.php:712 ../../mod/admin.php:910
+#: ../../mod/admin.php:728 ../../mod/admin.php:926
msgid "Enable"
msgstr "Åœalti"
-#: ../../mod/admin.php:734 ../../mod/admin.php:939
+#: ../../mod/admin.php:750 ../../mod/admin.php:955
msgid "Toggle"
msgstr "Åœalti/MalÅalti"
-#: ../../mod/admin.php:742 ../../mod/admin.php:949
+#: ../../mod/admin.php:758 ../../mod/admin.php:965
msgid "Author: "
msgstr "AÅ­toro: "
-#: ../../mod/admin.php:743 ../../mod/admin.php:950
+#: ../../mod/admin.php:759 ../../mod/admin.php:966
msgid "Maintainer: "
msgstr "Prizorganto: "
-#: ../../mod/admin.php:872
+#: ../../mod/admin.php:888
msgid "No themes found."
msgstr "Ne trovis etosojn."
-#: ../../mod/admin.php:931
+#: ../../mod/admin.php:947
msgid "Screenshot"
msgstr "Ekrankopio"
-#: ../../mod/admin.php:979
+#: ../../mod/admin.php:995
msgid "[Experimental]"
msgstr "[Eksperimenta]"
-#: ../../mod/admin.php:980
+#: ../../mod/admin.php:996
msgid "[Unsupported]"
msgstr "[Nesubtenata]"
-#: ../../mod/admin.php:1007
+#: ../../mod/admin.php:1023
msgid "Log settings updated."
msgstr "Protokolagordoj Äisdatigitaj."
-#: ../../mod/admin.php:1063
+#: ../../mod/admin.php:1079
msgid "Clear"
msgstr "ForviÅi"
-#: ../../mod/admin.php:1069
+#: ../../mod/admin.php:1085
msgid "Debugging"
msgstr "Sencimigado"
-#: ../../mod/admin.php:1070
+#: ../../mod/admin.php:1086
msgid "Log file"
msgstr "Protokolo"
-#: ../../mod/admin.php:1070
+#: ../../mod/admin.php:1086
msgid ""
"Must be writable by web server. Relative to your Friendica top-level "
"directory."
msgstr "Devas esti skribebla de la retservilo. Relativa al via plej supra Friendica dosierujo."
-#: ../../mod/admin.php:1071
+#: ../../mod/admin.php:1087
msgid "Log level"
msgstr "Protokolnivelo"
-#: ../../mod/admin.php:1121
+#: ../../mod/admin.php:1137
msgid "Close"
msgstr "Fermi"
-#: ../../mod/admin.php:1127
+#: ../../mod/admin.php:1143
msgid "FTP Host"
msgstr "FTP Servilo"
-#: ../../mod/admin.php:1128
+#: ../../mod/admin.php:1144
msgid "FTP Path"
msgstr "FTP Vojo"
-#: ../../mod/admin.php:1129
+#: ../../mod/admin.php:1145
msgid "FTP User"
msgstr "FTP Uzanto"
-#: ../../mod/admin.php:1130
+#: ../../mod/admin.php:1146
msgid "FTP Password"
msgstr "FTP Pasvorto"
-#: ../../mod/profile.php:21 ../../boot.php:955
+#: ../../mod/profile.php:21 ../../boot.php:993
msgid "Requested profile is not available."
msgstr "La petita profilo ne disponeblas."
-#: ../../mod/profile.php:126 ../../mod/display.php:75
+#: ../../mod/profile.php:141 ../../mod/display.php:75
msgid "Access to this profile has been restricted."
msgstr "Atingo al ĉi tio profilo estas limitigita"
-#: ../../mod/profile.php:151
+#: ../../mod/profile.php:166
msgid "Tips for New Members"
msgstr "Konsilo por novaj membroj"
-#: ../../mod/ping.php:177
+#: ../../mod/ping.php:185
msgid "{0} wants to be your friend"
msgstr "{0} volas amikiÄi kun vi"
-#: ../../mod/ping.php:182
+#: ../../mod/ping.php:190
msgid "{0} sent you a message"
msgstr "{0} sendis mesaÄon al vi"
-#: ../../mod/ping.php:187
+#: ../../mod/ping.php:195
msgid "{0} requested registration"
msgstr "{0} petis registradon"
-#: ../../mod/ping.php:193
+#: ../../mod/ping.php:201
#, php-format
msgid "{0} commented %s's post"
msgstr "{0} komentis pri la afiÅo de %s"
-#: ../../mod/ping.php:198
+#: ../../mod/ping.php:206
#, php-format
msgid "{0} liked %s's post"
msgstr "{0} satis la afiÅon de %s"
-#: ../../mod/ping.php:203
+#: ../../mod/ping.php:211
#, php-format
msgid "{0} disliked %s's post"
msgstr "{0} malÅatis la afiÅon de %s"
-#: ../../mod/ping.php:208
+#: ../../mod/ping.php:216
#, php-format
msgid "{0} is now friends with %s"
msgstr "{0} amikiÄis kun %s"
-#: ../../mod/ping.php:213
+#: ../../mod/ping.php:221
msgid "{0} posted"
msgstr "{0} afiÅis"
-#: ../../mod/ping.php:218
+#: ../../mod/ping.php:226
#, php-format
msgid "{0} tagged %s's post with #%s"
msgstr "{0} markis la afiÅon de %s kun #%s"
-#: ../../mod/ping.php:224
+#: ../../mod/ping.php:232
msgid "{0} mentioned you in a post"
msgstr "{0} menciis vin en afiÅo"
@@ -3671,67 +3708,16 @@ msgstr "Eraro en OpenID protokolo. Ne resendis identecon."
#: ../../mod/openid.php:53
msgid ""
"Account not found and OpenID registration is not permitted on this site."
-msgstr "Ne trovis kontoj, kaj registrado tra OpenID estas malpermesita ĉi tie."
+msgstr "Ne trovis kontoj, kaj registrado per OpenID estas malpermesita ĉi tie."
-#: ../../mod/openid.php:93 ../../include/auth.php:90
-#: ../../include/auth.php:153
+#: ../../mod/openid.php:93 ../../include/auth.php:99
+#: ../../include/auth.php:162
msgid "Login failed."
msgstr "Ensalutado malsukcesis."
-#: ../../mod/follow.php:30
-msgid "Connect URL missing."
-msgstr "Ne ekzistas URL adreso por konekti."
-
-#: ../../mod/follow.php:56
-msgid ""
-"This site is not configured to allow communications with other networks."
-msgstr "Tiu retpaÄo ne permesas komunikadon kun aliaj retoj."
-
-#: ../../mod/follow.php:57 ../../mod/follow.php:72
-msgid "No compatible communication protocols or feeds were discovered."
-msgstr "Ne malkovris kongruajn protokolojn por komunikado aÅ­ fluojn."
-
-#: ../../mod/follow.php:70
-msgid "The profile address specified does not provide adequate information."
-msgstr "La specifita profiladreso ne enhavas sufiĉe da informoj."
-
-#: ../../mod/follow.php:74
-msgid "An author or name was not found."
-msgstr "Ne trovis aÅ­toron aÅ­ nomon."
-
-#: ../../mod/follow.php:76
-msgid "No browser URL could be matched to this address."
-msgstr "Neniu retuma URL adreso kongruas al la adreso."
-
-#: ../../mod/follow.php:78
-msgid ""
-"Unable to match @-style Identity Address with a known protocol or email "
-"contact."
-msgstr "Ne eblas kongrui @-stilan identecon adreson al iu konata protokolo au retpoÅtadreso."
-
-#: ../../mod/follow.php:79
-msgid "Use mailto: in front of address to force email check."
-msgstr "Uzu mailto: antaÅ­ la adreso por devigi la testadon per retpoÅto."
-
-#: ../../mod/follow.php:85
-msgid ""
-"The profile address specified belongs to a network which has been disabled "
-"on this site."
-msgstr "Tiu profila adreso apartenas al retejo kiu estas maÅaltita je ĉi tiu retejo."
-
-#: ../../mod/follow.php:90
-msgid ""
-"Limited profile. This person will be unable to receive direct/personal "
-"notifications from you."
-msgstr "Profilo limigata. Ĉi persono ne eblos ricevi rektajn/personajn atentigojn de vi. "
-
-#: ../../mod/follow.php:160
-msgid "Unable to retrieve contact information."
-msgstr "Ne eblas ricevi kontaktinformojn."
-
-#: ../../mod/follow.php:206
-msgid "following"
-msgstr "sekvanta"
+#: ../../mod/follow.php:27
+msgid "Contact added"
+msgstr "Aldonis kontakton"
#: ../../mod/common.php:42
msgid "Common Friends"
@@ -3753,12 +3739,13 @@ msgstr "Programoj"
msgid "No installed applications."
msgstr "Neniom da instalitaj programoj."
-#: ../../mod/search.php:83
-msgid "Search This Site"
-msgstr "Serĉi ĉi-tiun retejon"
+#: ../../mod/search.php:83 ../../include/text.php:649
+#: ../../include/text.php:650 ../../include/nav.php:91
+msgid "Search"
+msgstr "Serĉi"
-#: ../../mod/profiles.php:21 ../../mod/profiles.php:375
-#: ../../mod/profiles.php:489 ../../mod/dfrn_confirm.php:62
+#: ../../mod/profiles.php:21 ../../mod/profiles.php:410
+#: ../../mod/profiles.php:524 ../../mod/dfrn_confirm.php:62
msgid "Profile not found."
msgstr "Profilo ne trovita."
@@ -3766,272 +3753,305 @@ msgstr "Profilo ne trovita."
msgid "Profile Name is required."
msgstr "Nomo de profilo estas bezonata."
-#: ../../mod/profiles.php:145
+#: ../../mod/profiles.php:155
msgid "Marital Status"
msgstr "Amrilata Stato"
-#: ../../mod/profiles.php:149
+#: ../../mod/profiles.php:159
msgid "Romantic Partner"
msgstr "Kora Partnero"
-#: ../../mod/profiles.php:153
+#: ../../mod/profiles.php:163
+msgid "Likes"
+msgstr "Åœatoj"
+
+#: ../../mod/profiles.php:167
+msgid "Dislikes"
+msgstr "MalÅatoj"
+
+#: ../../mod/profiles.php:171
msgid "Work/Employment"
msgstr "Laboro"
-#: ../../mod/profiles.php:156
+#: ../../mod/profiles.php:174
msgid "Religion"
msgstr "Religio"
-#: ../../mod/profiles.php:160
+#: ../../mod/profiles.php:178
msgid "Political Views"
msgstr "Politikaj Opinioj"
-#: ../../mod/profiles.php:164
+#: ../../mod/profiles.php:182
msgid "Gender"
msgstr "Sekso"
-#: ../../mod/profiles.php:168
+#: ../../mod/profiles.php:186
msgid "Sexual Preference"
msgstr "Seksa Prefero"
-#: ../../mod/profiles.php:172
+#: ../../mod/profiles.php:190
msgid "Homepage"
msgstr "HejmpaÄo"
-#: ../../mod/profiles.php:176
+#: ../../mod/profiles.php:194
msgid "Interests"
msgstr "Interesoj"
-#: ../../mod/profiles.php:181
+#: ../../mod/profiles.php:198
+msgid "Address"
+msgstr "Adreso"
+
+#: ../../mod/profiles.php:205 ../../addon/dav/layout.fnk.php:310
msgid "Location"
msgstr "Loko"
-#: ../../mod/profiles.php:253
+#: ../../mod/profiles.php:288
msgid "Profile updated."
msgstr "Profilo Äisdatigita."
-#: ../../mod/profiles.php:320
+#: ../../mod/profiles.php:355
msgid " and "
msgstr " kaj "
-#: ../../mod/profiles.php:328
+#: ../../mod/profiles.php:363
msgid "public profile"
msgstr "publika profilo"
-#: ../../mod/profiles.php:331
+#: ../../mod/profiles.php:366
#, php-format
msgid "%1$s changed %2$s to &ldquo;%3$s&rdquo;"
msgstr "%1$s ÅanÄis %2$s al &ldquo;%3$s&rdquo;"
-#: ../../mod/profiles.php:335
+#: ../../mod/profiles.php:367
+#, php-format
+msgid " - Visit %1$s's %2$s"
+msgstr " - Vizitu la %2$s de %1$s"
+
+#: ../../mod/profiles.php:370
#, php-format
msgid "%1$s has an updated %2$s, changing %3$s."
msgstr "%1$s havas Äisdatigigan %2$s, ÅanÄas %3$s."
-#: ../../mod/profiles.php:394
+#: ../../mod/profiles.php:429
msgid "Profile deleted."
msgstr "Profilo forviÅita."
-#: ../../mod/profiles.php:412 ../../mod/profiles.php:446
+#: ../../mod/profiles.php:447 ../../mod/profiles.php:481
msgid "Profile-"
msgstr "Profilo-"
-#: ../../mod/profiles.php:431 ../../mod/profiles.php:473
+#: ../../mod/profiles.php:466 ../../mod/profiles.php:508
msgid "New profile created."
msgstr "Nova profilo kreita."
-#: ../../mod/profiles.php:452
+#: ../../mod/profiles.php:487
msgid "Profile unavailable to clone."
msgstr "Ne eblas kopii profilon."
-#: ../../mod/profiles.php:510
+#: ../../mod/profiles.php:545
msgid "Hide your contact/friend list from viewers of this profile?"
msgstr "KaÅi vian liston de kontaktoj/amikoj al vidantoj de ĉi-tio profilo?"
-#: ../../mod/profiles.php:533
+#: ../../mod/profiles.php:568
msgid "Edit Profile Details"
msgstr "Redakti Detalojn de Profilo"
-#: ../../mod/profiles.php:535
+#: ../../mod/profiles.php:570
msgid "View this profile"
msgstr "Vidi la profilon."
-#: ../../mod/profiles.php:536
+#: ../../mod/profiles.php:571
msgid "Create a new profile using these settings"
msgstr "Krei novan profilon kun tiaj agordoj"
-#: ../../mod/profiles.php:537
+#: ../../mod/profiles.php:572
msgid "Clone this profile"
msgstr "Kopii ĉi tiun profilon"
-#: ../../mod/profiles.php:538
+#: ../../mod/profiles.php:573
msgid "Delete this profile"
msgstr "ForviÅi ĉi tiun profilon"
-#: ../../mod/profiles.php:539
+#: ../../mod/profiles.php:574
msgid "Profile Name:"
msgstr "Nomo de Profilo:"
-#: ../../mod/profiles.php:540
+#: ../../mod/profiles.php:575
msgid "Your Full Name:"
msgstr "Via Plena Nomo:"
-#: ../../mod/profiles.php:541
+#: ../../mod/profiles.php:576
msgid "Title/Description:"
msgstr "Titolo/Priskribo:"
-#: ../../mod/profiles.php:542
+#: ../../mod/profiles.php:577
msgid "Your Gender:"
msgstr "Via Sekso:"
-#: ../../mod/profiles.php:543
+#: ../../mod/profiles.php:578
#, php-format
msgid "Birthday (%s):"
msgstr "NaskiÄtago (%s):"
-#: ../../mod/profiles.php:544
+#: ../../mod/profiles.php:579
msgid "Street Address:"
msgstr "Adreso:"
-#: ../../mod/profiles.php:545
+#: ../../mod/profiles.php:580
msgid "Locality/City:"
msgstr "Urbo:"
-#: ../../mod/profiles.php:546
+#: ../../mod/profiles.php:581
msgid "Postal/Zip Code:"
msgstr "PoÅtkodo:"
-#: ../../mod/profiles.php:547
+#: ../../mod/profiles.php:582
msgid "Country:"
msgstr "Lando:"
-#: ../../mod/profiles.php:548
+#: ../../mod/profiles.php:583
msgid "Region/State:"
msgstr "Åœtato:"
-#: ../../mod/profiles.php:549
+#: ../../mod/profiles.php:584
msgid "<span class=\"heart\">&hearts;</span> Marital Status:"
msgstr "<span class=\"heart\">&hearts;</span> Civita Stato:"
-#: ../../mod/profiles.php:550
+#: ../../mod/profiles.php:585
msgid "Who: (if applicable)"
msgstr "Kiu (se aplikeble):"
-#: ../../mod/profiles.php:551
+#: ../../mod/profiles.php:586
msgid "Examples: cathy123, Cathy Williams, cathy@example.com"
msgstr "Ekzemploj: cathy123, Cathy Williams, cathy@example.com"
-#: ../../mod/profiles.php:552 ../../include/profile_advanced.php:43
+#: ../../mod/profiles.php:587
+msgid "Since [date]:"
+msgstr "Ekde [dato]:"
+
+#: ../../mod/profiles.php:588 ../../include/profile_advanced.php:46
msgid "Sexual Preference:"
msgstr "Seksa Prefero:"
-#: ../../mod/profiles.php:553
+#: ../../mod/profiles.php:589
msgid "Homepage URL:"
msgstr "Adreso de HejmpaÄo:"
-#: ../../mod/profiles.php:554 ../../include/profile_advanced.php:49
+#: ../../mod/profiles.php:590 ../../include/profile_advanced.php:50
+msgid "Hometown:"
+msgstr "Hejmurbo:"
+
+#: ../../mod/profiles.php:591 ../../include/profile_advanced.php:54
msgid "Political Views:"
msgstr "Politikaj Opinioj:"
-#: ../../mod/profiles.php:555
+#: ../../mod/profiles.php:592
msgid "Religious Views:"
msgstr "Religiaj Opinioj:"
-#: ../../mod/profiles.php:556
+#: ../../mod/profiles.php:593
msgid "Public Keywords:"
msgstr "Publikaj Ålosilvortoj:"
-#: ../../mod/profiles.php:557
+#: ../../mod/profiles.php:594
msgid "Private Keywords:"
msgstr "Privataj Ålosilvortoj:"
-#: ../../mod/profiles.php:558
+#: ../../mod/profiles.php:595 ../../include/profile_advanced.php:62
+msgid "Likes:"
+msgstr "Åœatoj:"
+
+#: ../../mod/profiles.php:596 ../../include/profile_advanced.php:64
+msgid "Dislikes:"
+msgstr "MalÅatoj:"
+
+#: ../../mod/profiles.php:597
msgid "Example: fishing photography software"
msgstr "Ekzemple: fiÅkapti fotografio programaro"
-#: ../../mod/profiles.php:559
+#: ../../mod/profiles.php:598
msgid "(Used for suggesting potential friends, can be seen by others)"
msgstr "(Por sugesti amikoj. Videbla al aliaj.)"
-#: ../../mod/profiles.php:560
+#: ../../mod/profiles.php:599
msgid "(Used for searching profiles, never shown to others)"
msgstr "(Por serĉi profilojn. Neniam videbla al aliaj.)"
-#: ../../mod/profiles.php:561
+#: ../../mod/profiles.php:600
msgid "Tell us about yourself..."
msgstr "Diru al ni pri vi..."
-#: ../../mod/profiles.php:562
+#: ../../mod/profiles.php:601
msgid "Hobbies/Interests"
msgstr "Åœatokupoj/Interesoj"
-#: ../../mod/profiles.php:563
+#: ../../mod/profiles.php:602
msgid "Contact information and Social Networks"
msgstr "Kontaktaj informoj kaj Interkonaj Retejoj"
-#: ../../mod/profiles.php:564
+#: ../../mod/profiles.php:603
msgid "Musical interests"
msgstr "Muzikaj interesoj"
-#: ../../mod/profiles.php:565
+#: ../../mod/profiles.php:604
msgid "Books, literature"
msgstr "Libroj, literaturo"
-#: ../../mod/profiles.php:566
+#: ../../mod/profiles.php:605
msgid "Television"
msgstr "Televido"
-#: ../../mod/profiles.php:567
+#: ../../mod/profiles.php:606
msgid "Film/dance/culture/entertainment"
msgstr "Filmoj/dancoj/arto/amuzaĵoj"
-#: ../../mod/profiles.php:568
+#: ../../mod/profiles.php:607
msgid "Love/romance"
msgstr "Amo/romanco"
-#: ../../mod/profiles.php:569
+#: ../../mod/profiles.php:608
msgid "Work/employment"
msgstr "Laboro"
-#: ../../mod/profiles.php:570
+#: ../../mod/profiles.php:609
msgid "School/education"
msgstr "Lernejo/eduko"
-#: ../../mod/profiles.php:575
+#: ../../mod/profiles.php:614
msgid ""
"This is your <strong>public</strong> profile.<br />It <strong>may</strong> "
"be visible to anybody using the internet."
msgstr "Ĉi tio estas via <strong>publika</strong> profilo. Ĝi <strong>eble</strong> estas videbla al ĉiuj en interreto. "
-#: ../../mod/profiles.php:585 ../../mod/directory.php:111
+#: ../../mod/profiles.php:624 ../../mod/directory.php:111
msgid "Age: "
msgstr "AÄo:"
-#: ../../mod/profiles.php:620
+#: ../../mod/profiles.php:663
msgid "Edit/Manage Profiles"
msgstr "Redakti/administri Profilojn"
-#: ../../mod/profiles.php:621 ../../boot.php:1064
+#: ../../mod/profiles.php:664 ../../boot.php:1102
msgid "Change profile photo"
msgstr "ÅœanÄi profilbildon"
-#: ../../mod/profiles.php:622 ../../boot.php:1065
+#: ../../mod/profiles.php:665 ../../boot.php:1103
msgid "Create New Profile"
msgstr "Krei novan profilon"
-#: ../../mod/profiles.php:633 ../../boot.php:1075
+#: ../../mod/profiles.php:676 ../../boot.php:1113
msgid "Profile Image"
msgstr "Profilbildo"
-#: ../../mod/profiles.php:635 ../../boot.php:1078
+#: ../../mod/profiles.php:678 ../../boot.php:1116
msgid "visible to everybody"
msgstr "videbla al ĉiuj"
-#: ../../mod/profiles.php:636 ../../boot.php:1079
+#: ../../mod/profiles.php:679 ../../boot.php:1117
msgid "Edit visibility"
msgstr "Redakti videblecon"
-#: ../../mod/filer.php:29 ../../include/conversation.php:922
+#: ../../mod/filer.php:29 ../../include/conversation.php:951
msgid "Save to Folder:"
msgstr "Konservi en Dosierujo:"
@@ -4079,7 +4099,7 @@ msgstr "Aldoni"
msgid "No entries."
msgstr "Neniom da afiÅoj."
-#: ../../mod/suggest.php:38 ../../view/theme/diabook/theme.php:554
+#: ../../mod/suggest.php:38 ../../view/theme/diabook/theme.php:626
#: ../../include/contact_widgets.php:34
msgid "Friend Suggestions"
msgstr "Amikosugestoj"
@@ -4094,12 +4114,7 @@ msgstr "Neniu sugestoj disponeblas. Se ĉi tiu estas nova retejo, bonvolu reprov
msgid "Ignore/Hide"
msgstr "Ignori/KaÅi"
-#: ../../mod/acl.php:134
-#, php-format
-msgid "%s [%s]"
-msgstr "%s [%s]"
-
-#: ../../mod/directory.php:47 ../../view/theme/diabook/theme.php:552
+#: ../../mod/directory.php:47 ../../view/theme/diabook/theme.php:624
msgid "Global Directory"
msgstr "Tutmonda Katalogo"
@@ -4195,7 +4210,7 @@ msgstr "Vi bezonas ĉi-tiun invitkodon: $invite_code"
#: ../../mod/invite.php:116
msgid ""
"Once you have registered, please connect with me via my profile page at:"
-msgstr "Kiam vi registris, bonvolu konekti al mi tra mi profilo ĉe: "
+msgstr "Kiam vi registris, bonvolu konekti al mi pere de mi profilo ĉe: "
#: ../../mod/invite.php:118
msgid ""
@@ -4209,164 +4224,180 @@ msgid ""
" has already been approved."
msgstr "Tio ĉi okazis de tempo al tempo se ambaÅ­ personoj petas kontakton ka Äi jam estas aprobita."
-#: ../../mod/dfrn_confirm.php:242
+#: ../../mod/dfrn_confirm.php:237
msgid "Response from remote site was not understood."
msgstr "Ne komprenis la rispondon de la fora retejo."
-#: ../../mod/dfrn_confirm.php:251
+#: ../../mod/dfrn_confirm.php:246
msgid "Unexpected response from remote site: "
msgstr "Neatendita rispondo de la fora retejo:"
-#: ../../mod/dfrn_confirm.php:259
+#: ../../mod/dfrn_confirm.php:254
msgid "Confirmation completed successfully."
msgstr "Konfirmo sukcese kompletigita."
-#: ../../mod/dfrn_confirm.php:261 ../../mod/dfrn_confirm.php:275
-#: ../../mod/dfrn_confirm.php:282
+#: ../../mod/dfrn_confirm.php:256 ../../mod/dfrn_confirm.php:270
+#: ../../mod/dfrn_confirm.php:277
msgid "Remote site reported: "
msgstr "La fora retejo raportis:"
-#: ../../mod/dfrn_confirm.php:273
+#: ../../mod/dfrn_confirm.php:268
msgid "Temporary failure. Please wait and try again."
msgstr "Dumtempa eraro. Bonvolu atendi kaj provi refoje."
-#: ../../mod/dfrn_confirm.php:280
+#: ../../mod/dfrn_confirm.php:275
msgid "Introduction failed or was revoked."
msgstr "La prezento malsukcesis au estas revokita."
-#: ../../mod/dfrn_confirm.php:425
+#: ../../mod/dfrn_confirm.php:420
msgid "Unable to set contact photo."
msgstr "Neeblas agordi la kontaktbildo."
-#: ../../mod/dfrn_confirm.php:482 ../../include/diaspora.php:507
+#: ../../mod/dfrn_confirm.php:477 ../../include/diaspora.php:510
#: ../../include/conversation.php:101
#, php-format
msgid "%1$s is now friends with %2$s"
msgstr "%1$s amikiÄis kun %2$s"
-#: ../../mod/dfrn_confirm.php:554
+#: ../../mod/dfrn_confirm.php:562
#, php-format
msgid "No user record found for '%s' "
msgstr "Ne trovis uzanton '%s' "
-#: ../../mod/dfrn_confirm.php:564
+#: ../../mod/dfrn_confirm.php:572
msgid "Our site encryption key is apparently messed up."
msgstr "Åœajnas kvazaÅ­ la ĉifroÅlosilo de nia retejo estas fuÅita."
-#: ../../mod/dfrn_confirm.php:575
+#: ../../mod/dfrn_confirm.php:583
msgid "Empty site URL was provided or URL could not be decrypted by us."
msgstr "Malplena adreso de retejo provizita, aŭ ni ne povis malĉifri la adreson."
-#: ../../mod/dfrn_confirm.php:596
+#: ../../mod/dfrn_confirm.php:604
msgid "Contact record was not found for you on our site."
msgstr "Kontakto ne trovita por vi en via retejo."
-#: ../../mod/dfrn_confirm.php:610
+#: ../../mod/dfrn_confirm.php:618
#, php-format
msgid "Site public key not available in contact record for URL %s."
msgstr "Publika Ålosilo de retejo ne disponeblas en la kontaktrikordo por la URL adreso %s."
-#: ../../mod/dfrn_confirm.php:630
+#: ../../mod/dfrn_confirm.php:638
msgid ""
"The ID provided by your system is a duplicate on our system. It should work "
"if you try again."
msgstr "La identeco provizita de via sistemo estas duoblo ĉe nia sistemo. Ĝi eble funkcias se vi provas refoje."
-#: ../../mod/dfrn_confirm.php:641
+#: ../../mod/dfrn_confirm.php:649
msgid "Unable to set your contact credentials on our system."
msgstr "Ne sukcesis agordi la legitimaĵojn de via kontakto ĉe nia sistemo."
-#: ../../mod/dfrn_confirm.php:706
+#: ../../mod/dfrn_confirm.php:716
msgid "Unable to update your contact profile details on our system"
msgstr "Neeblas Äisdatigi viajn profildetalojn ĉe nia sistemo."
-#: ../../mod/dfrn_confirm.php:740
+#: ../../mod/dfrn_confirm.php:750
#, php-format
msgid "Connection accepted at %s"
msgstr "Konekto akceptita je %s"
-#: ../../mod/dfrn_confirm.php:789
+#: ../../mod/dfrn_confirm.php:799
#, php-format
msgid "%1$s has joined %2$s"
msgstr "%1$s aliÄis al %2$s"
-#: ../../addon/facebook/facebook.php:501
+#: ../../addon/fromgplus/fromgplus.php:29
+msgid "Google+ Import Settings"
+msgstr "Google+ Importo"
+
+#: ../../addon/fromgplus/fromgplus.php:32
+msgid "Enable Google+ Import"
+msgstr "Aktivigi Äœoogle+ Importon"
+
+#: ../../addon/fromgplus/fromgplus.php:35
+msgid "Google Account ID"
+msgstr "Google Konto ID"
+
+#: ../../addon/fromgplus/fromgplus.php:55
+msgid "Google+ Import Settings saved."
+msgstr "Konservis Agordojn por Google+ Importo."
+
+#: ../../addon/facebook/facebook.php:521
msgid "Facebook disabled"
msgstr "Facebook malÅaltita"
-#: ../../addon/facebook/facebook.php:506
+#: ../../addon/facebook/facebook.php:526
msgid "Updating contacts"
msgstr "Mi Äisdatigas la kontaktojn."
-#: ../../addon/facebook/facebook.php:529
+#: ../../addon/facebook/facebook.php:549
msgid "Facebook API key is missing."
msgstr "La API Ålosilo de Facebook ne estas konata ĉi tie."
-#: ../../addon/facebook/facebook.php:536
+#: ../../addon/facebook/facebook.php:556
msgid "Facebook Connect"
msgstr "Kontekto al Facebook"
-#: ../../addon/facebook/facebook.php:542
+#: ../../addon/facebook/facebook.php:562
msgid "Install Facebook connector for this account."
msgstr "Instali la Facebook konektilo por ĉi tiu konto."
-#: ../../addon/facebook/facebook.php:549
+#: ../../addon/facebook/facebook.php:569
msgid "Remove Facebook connector"
msgstr "Forigi la Facebook konektilon."
-#: ../../addon/facebook/facebook.php:554
+#: ../../addon/facebook/facebook.php:574
msgid ""
"Re-authenticate [This is necessary whenever your Facebook password is "
"changed.]"
msgstr "ReaÅ­tentiÄi [Tio estas bezonata ĉiam kiam vi ÅanÄis vian pasvorton ĉe Facebook.]"
-#: ../../addon/facebook/facebook.php:561
+#: ../../addon/facebook/facebook.php:581
msgid "Post to Facebook by default"
msgstr "Ĉiam afiÅi al Facebook."
-#: ../../addon/facebook/facebook.php:567
+#: ../../addon/facebook/facebook.php:587
msgid ""
"Facebook friend linking has been disabled on this site. The following "
"settings will have no effect."
msgstr "Ligado kun Facebook amikoj estas malaktivita ĉe tiu retejo. La sekvantaj agordoj do ne havas validecon."
-#: ../../addon/facebook/facebook.php:571
+#: ../../addon/facebook/facebook.php:591
msgid ""
"Facebook friend linking has been disabled on this site. If you disable it, "
"you will be unable to re-enable it."
msgstr "Ligado kun Facebook amikoj estas malaktivita ĉe tiu retejo. Se vi malÅaltas Äin, vi ne eblos ree Åalti Äin."
-#: ../../addon/facebook/facebook.php:574
+#: ../../addon/facebook/facebook.php:594
msgid "Link all your Facebook friends and conversations on this website"
msgstr "Alligu ĉiujn viajn Facebook amikojn kaj konversaciojn je ĉi-tiu retejo."
-#: ../../addon/facebook/facebook.php:576
+#: ../../addon/facebook/facebook.php:596
msgid ""
"Facebook conversations consist of your <em>profile wall</em> and your friend"
" <em>stream</em>."
msgstr "Facebok konversacioj konsistas el via <em>profilmuro</em> kaj la <em>fluo</em> de viaj amikoj."
-#: ../../addon/facebook/facebook.php:577
+#: ../../addon/facebook/facebook.php:597
msgid "On this website, your Facebook friend stream is only visible to you."
msgstr "Je ĉi-tiu retejo, la fluo de viaj amikoj ĉe Facebook nur videblas al vi."
-#: ../../addon/facebook/facebook.php:578
+#: ../../addon/facebook/facebook.php:598
msgid ""
"The following settings determine the privacy of your Facebook profile wall "
"on this website."
msgstr "La sekvontaj agordoj difinas la privatecon de via Facebook profilmuro je ĉi-tiu retejo."
-#: ../../addon/facebook/facebook.php:582
+#: ../../addon/facebook/facebook.php:602
msgid ""
"On this website your Facebook profile wall conversations will only be "
"visible to you"
msgstr "Je ĉi-tiu retejo, la conversacioj sur via Facebook profilmuro nur videblas al vi."
-#: ../../addon/facebook/facebook.php:587
+#: ../../addon/facebook/facebook.php:607
msgid "Do not import your Facebook profile wall conversations"
msgstr "Ne importi konversaciojn de via Facebook profilmuro"
-#: ../../addon/facebook/facebook.php:589
+#: ../../addon/facebook/facebook.php:609
msgid ""
"If you choose to link conversations and leave both of these boxes unchecked,"
" your Facebook profile wall will be merged with your profile wall on this "
@@ -4374,120 +4405,120 @@ msgid ""
"who may see the conversations."
msgstr "Se vi elektas alligi conversaciojn kaj ne elektas tiujn butonojn, via Facebook profilmuro estas kunigota kun via profilmuro ĉi tie. Viaj privatecaj agordoj ĉi tie difinos kiu povas vidi la coversaciojn."
-#: ../../addon/facebook/facebook.php:594
+#: ../../addon/facebook/facebook.php:614
msgid "Comma separated applications to ignore"
msgstr "Ignorotaj programoj, disigita per komo"
-#: ../../addon/facebook/facebook.php:678
+#: ../../addon/facebook/facebook.php:698
msgid "Problems with Facebook Real-Time Updates"
msgstr "Problemoj kun Facebook Realtempaj Äœisdatigoj"
-#: ../../addon/facebook/facebook.php:706
+#: ../../addon/facebook/facebook.php:726
#: ../../include/contact_selectors.php:81
msgid "Facebook"
msgstr "Facebook"
-#: ../../addon/facebook/facebook.php:707
+#: ../../addon/facebook/facebook.php:727
msgid "Facebook Connector Settings"
msgstr "Agordoj por la Facebook konektilo"
-#: ../../addon/facebook/facebook.php:722
+#: ../../addon/facebook/facebook.php:742
msgid "Facebook API Key"
msgstr "Facebook API Ålosilo"
-#: ../../addon/facebook/facebook.php:732
+#: ../../addon/facebook/facebook.php:752
msgid ""
"Error: it appears that you have specified the App-ID and -Secret in your "
".htconfig.php file. As long as they are specified there, they cannot be set "
"using this form.<br><br>"
-msgstr "Eraro: Åœajnas kvazaÅ­ vi agordis la App-ID kaj la sekreton en via .htconfig.php dosiero. Kiam ili estas agordita tie, vi ne povas agordi Äin tra tiu ĉi formo.<br><br>"
+msgstr "Eraro: Åœajnas kvazaÅ­ vi agordis la App-ID kaj la sekreton en via .htconfig.php dosiero. Kiam ili estas agordita tie, vi ne povas agordi Äin en tiu ĉi formo.<br><br>"
-#: ../../addon/facebook/facebook.php:737
+#: ../../addon/facebook/facebook.php:757
msgid ""
"Error: the given API Key seems to be incorrect (the application access token"
" could not be retrieved)."
msgstr "Eraro: La API Ålosilo aspektas malÄusta (ne eblas ricevi la programa atingoĵetono)."
-#: ../../addon/facebook/facebook.php:739
+#: ../../addon/facebook/facebook.php:759
msgid "The given API Key seems to work correctly."
msgstr "La API Ålosilo Åajne Äuste funkcias."
-#: ../../addon/facebook/facebook.php:741
+#: ../../addon/facebook/facebook.php:761
msgid ""
"The correctness of the API Key could not be detected. Somthing strange's "
"going on."
msgstr "Ne povis kontroli la Äustecon de la API Ålosilo. Ia stranga afero okazas. "
-#: ../../addon/facebook/facebook.php:744
+#: ../../addon/facebook/facebook.php:764
msgid "App-ID / API-Key"
msgstr "Programo ID / API Åœlosilo"
-#: ../../addon/facebook/facebook.php:745
+#: ../../addon/facebook/facebook.php:765
msgid "Application secret"
msgstr "Programo sekreto"
-#: ../../addon/facebook/facebook.php:746
+#: ../../addon/facebook/facebook.php:766
#, php-format
msgid "Polling Interval in minutes (minimum %1$s minutes)"
msgstr "Intervalo de enketo en minutoj (minimume %1$s minutoj)"
-#: ../../addon/facebook/facebook.php:747
+#: ../../addon/facebook/facebook.php:767
msgid ""
"Synchronize comments (no comments on Facebook are missed, at the cost of "
"increased system load)"
msgstr "Sinkronigi komentojn (vi ricevas ĉiujn komentojn de Facebook, sed la Åargo de la sistemo iom kreskas)"
-#: ../../addon/facebook/facebook.php:751
+#: ../../addon/facebook/facebook.php:771
msgid "Real-Time Updates"
msgstr "Realtempaj Äœisdatigoj"
-#: ../../addon/facebook/facebook.php:755
+#: ../../addon/facebook/facebook.php:775
msgid "Real-Time Updates are activated."
msgstr "Realtempaj Äœisdatigoj estas Åaltita"
-#: ../../addon/facebook/facebook.php:756
+#: ../../addon/facebook/facebook.php:776
msgid "Deactivate Real-Time Updates"
msgstr "MalÅalti Realtempaj Äœisdatigoj"
-#: ../../addon/facebook/facebook.php:758
+#: ../../addon/facebook/facebook.php:778
msgid "Real-Time Updates not activated."
msgstr "Realtempaj Äœisdatigoj estas malÅaltita"
-#: ../../addon/facebook/facebook.php:758
+#: ../../addon/facebook/facebook.php:778
msgid "Activate Real-Time Updates"
msgstr "Åœalti Realtempaj Äœisdatigoj"
-#: ../../addon/facebook/facebook.php:777
+#: ../../addon/facebook/facebook.php:797 ../../addon/dav/layout.fnk.php:360
msgid "The new values have been saved."
msgstr "Konservis novajn valorojn."
-#: ../../addon/facebook/facebook.php:801
+#: ../../addon/facebook/facebook.php:821
msgid "Post to Facebook"
msgstr "AfiÅi al Facebook"
-#: ../../addon/facebook/facebook.php:899
+#: ../../addon/facebook/facebook.php:919
msgid ""
"Post to Facebook cancelled because of multi-network access permission "
"conflict."
msgstr "AfiÅado al Facebook nuligita ĉar okazis konflikto en la multretpermesoj."
-#: ../../addon/facebook/facebook.php:1119
+#: ../../addon/facebook/facebook.php:1139
msgid "View on Friendica"
msgstr "Vidi ĉe Friendica"
-#: ../../addon/facebook/facebook.php:1152
+#: ../../addon/facebook/facebook.php:1172
msgid "Facebook post failed. Queued for retry."
msgstr "Malsukcesis afiÅi ĉe Facebook. Enigita en vico."
-#: ../../addon/facebook/facebook.php:1192
+#: ../../addon/facebook/facebook.php:1212
msgid "Your Facebook connection became invalid. Please Re-authenticate."
msgstr "Via Facbook konekto iÄis nevalida. Bonvolu reaÅ­tentiÄi."
-#: ../../addon/facebook/facebook.php:1193
+#: ../../addon/facebook/facebook.php:1213
msgid "Facebook connection became invalid"
msgstr "Facebook konekto iÄis nevalida."
-#: ../../addon/facebook/facebook.php:1194
+#: ../../addon/facebook/facebook.php:1214
#, php-format
msgid ""
"Hi %1$s,\n"
@@ -4495,23 +4526,35 @@ msgid ""
"The connection between your accounts on %2$s and Facebook became invalid. This usually happens after you change your Facebook-password. To enable the connection again, you have to %3$sre-authenticate the Facebook-connector%4$s."
msgstr "Saluton %1$s,\n\nla kontekto inter viaj kontoj ĉe %2$s kaj Facebook malvalidiÄis. Tio kutime okazas post kiam via Åangas vian pasvorton ĉe Facebook. Por reaktivigi la konekto, vi bezonas %3$sreaÅ­tentiÄi la Facebook konektilon%4$s."
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:144
+#: ../../addon/snautofollow/snautofollow.php:32
+msgid "StatusNet AutoFollow settings updated."
+msgstr "Äœidatigis StatusNet AutoFollow agordojn."
+
+#: ../../addon/snautofollow/snautofollow.php:56
+msgid "StatusNet AutoFollow Settings"
+msgstr "StatusNet AutoFollow agordoj"
+
+#: ../../addon/snautofollow/snautofollow.php:58
+msgid "Automatically follow any StatusNet followers/mentioners"
+msgstr "Aŭtomate sekvu ĉiujn StatusNet sekvantojn/menciantojn."
+
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:184
msgid "Lifetime of the cache (in hours)"
msgstr "VivodaÅ­ro de kaÅmemoro (horoj)"
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:149
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:189
msgid "Cache Statistics"
msgstr "Statistikoj pri kaÅmemoro"
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:152
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:192
msgid "Number of items"
msgstr "Kvanto da eroj"
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:154
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:194
msgid "Size of the cache"
msgstr "Grando de la kaÅmemoro"
-#: ../../addon/privacy_image_cache/privacy_image_cache.php:156
+#: ../../addon/privacy_image_cache/privacy_image_cache.php:196
msgid "Delete the whole cache"
msgstr "ForviÅi la kaÅmemoron"
@@ -4627,21 +4670,45 @@ msgstr "Uzu /expr/ por provizi regulajn esprimojn."
msgid "NSFW Settings saved."
msgstr "NSFW agordoj konservitaj."
-#: ../../addon/nsfw/nsfw.php:120
+#: ../../addon/nsfw/nsfw.php:121
#, php-format
msgid "%s - Click to open/close"
msgstr "%s - Klaku por malfermi/fermi"
-#: ../../addon/page/page.php:48
+#: ../../addon/page/page.php:61 ../../addon/page/page.php:91
msgid "Forums"
msgstr "Forumoj"
-#: ../../addon/page/page.php:63 ../../addon/showmore/showmore.php:87
-#: ../../include/contact_widgets.php:188 ../../include/conversation.php:466
-#: ../../boot.php:513
+#: ../../addon/page/page.php:76 ../../addon/page/page.php:110
+#: ../../addon/showmore/showmore.php:87 ../../include/contact_widgets.php:188
+#: ../../include/conversation.php:476 ../../boot.php:529
msgid "show more"
msgstr "montri pli"
+#: ../../addon/page/page.php:129
+msgid "Forums:"
+msgstr "Forumoj:"
+
+#: ../../addon/page/page.php:163
+msgid "Page settings updated."
+msgstr "PaÄajn agordojn Äisdatigita."
+
+#: ../../addon/page/page.php:192
+msgid "Page Settings"
+msgstr "PaÄaj Agordoj"
+
+#: ../../addon/page/page.php:194
+msgid "How many forums to display on sidebar without paging"
+msgstr "Montri tiom da forumoj en la flanka strio sen paÄigo"
+
+#: ../../addon/page/page.php:197
+msgid "Randomise Page/Forum list"
+msgstr "Hazardigi la liston de PaÄoj/Forumoj"
+
+#: ../../addon/page/page.php:200
+msgid "Show pages/forums on profile page"
+msgstr "Montri paÄojn/forumojn sur la profilpaÄo"
+
#: ../../addon/planets/planets.php:150
msgid "Planets Settings"
msgstr "Agordo pri Planets"
@@ -4654,7 +4721,7 @@ msgstr "Åœalti la Planets kromprogamon"
#: ../../addon/communityhome/communityhome.php:34
#: ../../addon/communityhome/twillingham/communityhome.php:28
#: ../../addon/communityhome/twillingham/communityhome.php:34
-#: ../../include/nav.php:64 ../../boot.php:811
+#: ../../include/nav.php:64 ../../boot.php:849
msgid "Login"
msgstr "Ensaluti"
@@ -4682,11 +4749,208 @@ msgid "Latest likes"
msgstr "Ä´usaj Åatitaĵoj"
#: ../../addon/communityhome/communityhome.php:155
-#: ../../view/theme/diabook/theme.php:490 ../../include/text.php:1303
+#: ../../view/theme/diabook/theme.php:562 ../../include/text.php:1315
#: ../../include/conversation.php:45 ../../include/conversation.php:118
msgid "event"
msgstr "okazo"
+#: ../../addon/dav/common/wdcal_configuration.php:126
+msgid "U.S. Time Format (mm/dd/YYYY)"
+msgstr "Usona datformato (mm/dd/YYYY)"
+
+#: ../../addon/dav/common/wdcal_configuration.php:205
+msgid "German Time Format (dd.mm.YYYY)"
+msgstr "Germana datformato (dd.mm.YYYY)"
+
+#: ../../addon/dav/common/calendar.fnk.php:517
+#: ../../addon/dav/common/calendar.fnk.php:533
+#: ../../addon/dav/layout.fnk.php:200
+msgid "Error"
+msgstr "Eraro"
+
+#: ../../addon/dav/common/calendar.fnk.php:568
+#: ../../addon/dav/common/calendar.fnk.php:637
+#: ../../addon/dav/common/calendar.fnk.php:664
+#: ../../addon/dav/layout.fnk.php:231
+msgid "No access"
+msgstr "No access"
+
+#: ../../addon/dav/layout.fnk.php:119
+msgid "New event"
+msgstr "Nova okazo"
+
+#: ../../addon/dav/layout.fnk.php:123
+msgid "Today"
+msgstr "HodiaÅ­"
+
+#: ../../addon/dav/layout.fnk.php:132
+msgid "Day"
+msgstr "Tago"
+
+#: ../../addon/dav/layout.fnk.php:139
+msgid "Week"
+msgstr "Semajno"
+
+#: ../../addon/dav/layout.fnk.php:146
+msgid "Month"
+msgstr "Monato"
+
+#: ../../addon/dav/layout.fnk.php:151
+msgid "Reload"
+msgstr "ReÅargi"
+
+#: ../../addon/dav/layout.fnk.php:162
+msgid "Date"
+msgstr "Dato"
+
+#: ../../addon/dav/layout.fnk.php:224
+msgid "Not found"
+msgstr "Ne trovita"
+
+#: ../../addon/dav/layout.fnk.php:292 ../../addon/dav/layout.fnk.php:365
+msgid "Go back to the calendar"
+msgstr "Iri reen al la kalendaro"
+
+#: ../../addon/dav/layout.fnk.php:300
+msgid "Starts"
+msgstr "Komencas"
+
+#: ../../addon/dav/layout.fnk.php:305
+msgid "Ends"
+msgstr "Finas"
+
+#: ../../addon/dav/layout.fnk.php:312
+msgid "Description"
+msgstr "Priskribo"
+
+#: ../../addon/dav/layout.fnk.php:315
+msgid "Notification"
+msgstr "Atentigo"
+
+#: ../../addon/dav/layout.fnk.php:324
+msgid "Minutes"
+msgstr "Minutoj"
+
+#: ../../addon/dav/layout.fnk.php:327
+msgid "Hours"
+msgstr "Horoj"
+
+#: ../../addon/dav/layout.fnk.php:330
+msgid "Days"
+msgstr "Tagoj"
+
+#: ../../addon/dav/layout.fnk.php:331
+msgid "before"
+msgstr "antaÅ­"
+
+#: ../../addon/dav/layout.fnk.php:367
+msgid "Calendar Settings"
+msgstr "Kalendaraj Agordoj"
+
+#: ../../addon/dav/layout.fnk.php:373
+msgid "Date format"
+msgstr "Datformato"
+
+#: ../../addon/dav/layout.fnk.php:382
+msgid "Time zone"
+msgstr "Horzono"
+
+#: ../../addon/dav/layout.fnk.php:387
+msgid "Limitations"
+msgstr "Limigoj"
+
+#: ../../addon/dav/layout.fnk.php:391
+msgid "Warning"
+msgstr "Averto"
+
+#: ../../addon/dav/layout.fnk.php:395
+msgid "Synchronization (iPhone, Thunderbird Lightning, Android, ...)"
+msgstr "Sinkronigo (iPhone, Thunderbird Lightning, Android, ...)"
+
+#: ../../addon/dav/layout.fnk.php:402
+msgid "Synchronizing this calendar with the iPhone"
+msgstr "Sinkronigi tiun kalendaron kun la iPhone"
+
+#: ../../addon/dav/layout.fnk.php:413
+msgid "Synchronizing your Friendica-Contacts with the iPhone"
+msgstr "Sinkronigi viajn Friendica kontaktojn kun la iPhone"
+
+#: ../../addon/dav/dav_carddav_backend_friendica_community.inc.php:37
+msgid "Friendica-Contacts"
+msgstr "Friendica Kontaktoj"
+
+#: ../../addon/dav/dav_carddav_backend_friendica_community.inc.php:38
+msgid "Your Friendica-Contacts"
+msgstr "Viaj Friendica Kontaktoj"
+
+#: ../../addon/dav/main.php:244
+msgid "Calendar"
+msgstr "Kalendaro"
+
+#: ../../addon/dav/main.php:247
+msgid "Extended calendar with CalDAV-support"
+msgstr "Etendita kalendaro kun CalDAV subteno"
+
+#: ../../addon/dav/main.php:263
+msgid "The database tables have been installed."
+msgstr "La tabeloj estas instalita en la datumbazo"
+
+#: ../../addon/dav/main.php:264
+msgid "An error occurred during the installation."
+msgstr "Eraro okazis dum instalado"
+
+#: ../../addon/dav/main.php:280
+msgid "No system-wide settings yet."
+msgstr "AnkoraÅ­ ne disponablas tutsistemaj agordoj"
+
+#: ../../addon/dav/main.php:283
+msgid "Database status"
+msgstr "Stato de datumbazo"
+
+#: ../../addon/dav/main.php:286
+msgid "Installed"
+msgstr "Instalita"
+
+#: ../../addon/dav/main.php:289
+msgid "Upgrade needed"
+msgstr "Äœisdatigo bezonata"
+
+#: ../../addon/dav/main.php:289
+msgid "Upgrade"
+msgstr "Äœisdatigo"
+
+#: ../../addon/dav/main.php:292
+msgid "Not installed"
+msgstr "Ne instalita"
+
+#: ../../addon/dav/main.php:292
+msgid "Install"
+msgstr "Instali"
+
+#: ../../addon/dav/main.php:297
+msgid "Troubleshooting"
+msgstr "Problemsolvado"
+
+#: ../../addon/dav/main.php:298
+msgid "Manual creation of the database tables:"
+msgstr "Mana kreado de tabeloj en la datumbazo:"
+
+#: ../../addon/dav/main.php:299
+msgid "Show SQL-statements"
+msgstr "Montru SQL ordonojn"
+
+#: ../../addon/dav/calendar.friendica.fnk.php:151
+msgid "Private Calendar"
+msgstr "Privata kalendaro"
+
+#: ../../addon/dav/calendar.friendica.fnk.php:158
+msgid "Friendica Events: Mine"
+msgstr "Friendica Okazoj: Miaj"
+
+#: ../../addon/dav/calendar.friendica.fnk.php:161
+msgid "Friendica Events: Contacts"
+msgstr "Friendica Okazoj: De Kontaktoj"
+
#: ../../addon/uhremotestorage/uhremotestorage.php:84
#, php-format
msgid ""
@@ -4834,11 +5098,23 @@ msgstr "Drupal retejo uzas purajn URL adresojn"
msgid "Post to Drupal by default"
msgstr "DefaÅ­lte afiÅi ĉe Drupal"
-#: ../../addon/drpost/drpost.php:184 ../../addon/wppost/wppost.php:190
-#: ../../addon/blogger/blogger.php:172 ../../addon/posterous/posterous.php:192
+#: ../../addon/drpost/drpost.php:184 ../../addon/wppost/wppost.php:201
+#: ../../addon/blogger/blogger.php:172 ../../addon/posterous/posterous.php:189
msgid "Post from Friendica"
msgstr "AfiÅo de Friendica"
+#: ../../addon/startpage/startpage.php:83
+msgid "Startpage Settings"
+msgstr "StartpaÄaj Agordoj"
+
+#: ../../addon/startpage/startpage.php:85
+msgid "Home page to load after login - leave blank for profile wall"
+msgstr "HejmpaÄo Åargonta post la ensaluto - Lasu malplena por profilmuro."
+
+#: ../../addon/startpage/startpage.php:88
+msgid "Examples: &quot;network&quot; or &quot;notifications/system&quot;"
+msgstr "Ekzemple: &quot;network&quot; aÅ­ &quot;notifications/system&quot;"
+
#: ../../addon/geonames/geonames.php:143
msgid "Geonames settings updated."
msgstr "Äœidatigis la Geonames agordojn."
@@ -4851,6 +5127,24 @@ msgstr "Geonames Agordoj"
msgid "Enable Geonames Plugin"
msgstr "Åœalti la Geonames Kromprogramon"
+#: ../../addon/public_server/public_server.php:126
+#: ../../addon/testdrive/testdrive.php:94
+#, php-format
+msgid "Your account on %s will expire in a few days."
+msgstr "Via konto ĉe %s senvalidiÄos post kelkaj tagoj."
+
+#: ../../addon/public_server/public_server.php:127
+msgid "Your Friendica account is about to expire."
+msgstr "Via konto ĉe Friendica baldaÅ­ senvalidiÄos."
+
+#: ../../addon/public_server/public_server.php:128
+#, php-format
+msgid ""
+"Hi %1$s,\n"
+"\n"
+"Your account on %2$s will expire in less than five days. You may keep your account by logging in at least once every 30 days"
+msgstr "Saluton %1$s,\n\nVia konto ĉe %2$s senvalidiÄos post malpli ol kvin tagoj. Vi povas konservi vian konton se vi ensalutas almenaÅ­ ĉiujn 30 tagojn. "
+
#: ../../addon/js_upload/js_upload.php:43
msgid "Upload a file"
msgstr "AlÅuti dosieron"
@@ -4946,7 +5240,7 @@ msgstr "Pli da notoj kiuj aperas sub la kontaktinformoj. Vi eblas uzi BBCode ĉi
#: ../../addon/impressum/impressum.php:87
msgid "How to contact the operator via email. (will be displayed obfuscated)"
-msgstr "Kiel kontakti la funkciigiston de la retejo tra retpoÅto. (montriÄos vuale) "
+msgstr "Kiel kontakti la funkciigiston de la retejo per retpoÅto. (montriÄos vuale) "
#: ../../addon/impressum/impressum.php:88
msgid "Footer note"
@@ -4960,6 +5254,18 @@ msgstr "Teksto por la paÄpiedo. Vie eblas uzi BBCode ĉi tie."
msgid "Report Bug"
msgstr "Skribi cimraporton"
+#: ../../addon/notimeline/notimeline.php:32
+msgid "No Timeline settings updated."
+msgstr "No Timeline agordojn Äisdatigita."
+
+#: ../../addon/notimeline/notimeline.php:56
+msgid "No Timeline Settings"
+msgstr "No Timeline Agordoj"
+
+#: ../../addon/notimeline/notimeline.php:58
+msgid "Disable Archive selector on profile wall"
+msgstr "Malaktivigi la Arkivo elektilo sur la profilmuro"
+
#: ../../addon/blockem/blockem.php:51
msgid "\"Blockem\" Settings"
msgstr "\"Blockem\" Agordoj"
@@ -5037,6 +5343,30 @@ msgstr "DefaÅ­lta zoma faktoro"
msgid "The default zoom level. (1:world, 18:highest)"
msgstr "La defaÅ­lta zoma faktoro. (1:tutmonda, 18:plej proksima)"
+#: ../../addon/libertree/libertree.php:36
+msgid "Post to libertree"
+msgstr "AfiÅi al libertree"
+
+#: ../../addon/libertree/libertree.php:67
+msgid "libertree Post Settings"
+msgstr "Agordoj por AfiÅoj ĉe libertree"
+
+#: ../../addon/libertree/libertree.php:69
+msgid "Enable Libertree Post Plugin"
+msgstr "Aktivigi Kromprogramon por AfiÅoj ĉe libertree"
+
+#: ../../addon/libertree/libertree.php:74
+msgid "Libertree API token"
+msgstr "Libertree API ĵetono"
+
+#: ../../addon/libertree/libertree.php:79
+msgid "Libertree site URL"
+msgstr "URL adreso de libertree retejo:"
+
+#: ../../addon/libertree/libertree.php:84
+msgid "Post to Libertree by default"
+msgstr "DefaÅ­lte afiÅi ĉe Libertree"
+
#: ../../addon/mathjax/mathjax.php:37
msgid ""
"The MathJax addon renders mathematical formulae written using the LaTeX "
@@ -5110,16 +5440,11 @@ msgstr "Elektu la Äustan pritakson de via avataro por via retejo. Vidu README."
msgid "Gravatar settings updated."
msgstr "Gravatar agordoj Äisdatigitaj."
-#: ../../addon/testdrive/testdrive.php:85
-#, php-format
-msgid "Your account on %s will expire in a few days."
-msgstr "Via konto ĉe %s senvalidiÄos post kelkaj tagoj."
-
-#: ../../addon/testdrive/testdrive.php:86
+#: ../../addon/testdrive/testdrive.php:95
msgid "Your Friendica test account is about to expire."
msgstr "Via Friendica provkonto baldaÅ­ malaktiviÄos."
-#: ../../addon/testdrive/testdrive.php:87
+#: ../../addon/testdrive/testdrive.php:96
#, php-format
msgid ""
"Hi %1$s,\n"
@@ -5277,17 +5602,21 @@ msgid "Send public postings to StatusNet by default"
msgstr "DefaÅ­lte sendi publikajn afiÅojn al StatusNet"
#: ../../addon/statusnet/statusnet.php:345
-msgid "Send #tag links to StatusNet"
-msgstr "Sendu #marko ligilojn al StatusNet"
+msgid "Send linked #-tags and @-names to StatusNet"
+msgstr "Sendi ligitajn #-etikedojn kaj @-nomon al StatusNet"
#: ../../addon/statusnet/statusnet.php:350 ../../addon/twitter/twitter.php:206
msgid "Clear OAuth configuration"
msgstr "ForviÅi OAuth agordojn"
-#: ../../addon/statusnet/statusnet.php:545
+#: ../../addon/statusnet/statusnet.php:559
msgid "API URL"
msgstr "API URL adreso"
+#: ../../addon/infiniteimprobabilitydrive/infiniteimprobabilitydrive.php:19
+msgid "Infinite Improbability Drive"
+msgstr "Senfina Probableca Pelilo"
+
#: ../../addon/tumblr/tumblr.php:36
msgid "Post to Tumblr"
msgstr "AfiÅi al Tumblr"
@@ -5351,30 +5680,38 @@ msgstr "[Friendica:Atentigo] Komento pri konversacio #%d"
msgid "Post to Wordpress"
msgstr "AfiÅi al Wordpress"
-#: ../../addon/wppost/wppost.php:74
+#: ../../addon/wppost/wppost.php:76
msgid "WordPress Post Settings"
msgstr "Agordoj por WordPress afiÅojn"
-#: ../../addon/wppost/wppost.php:76
+#: ../../addon/wppost/wppost.php:78
msgid "Enable WordPress Post Plugin"
msgstr "Åœalti la Wordpress-afiÅo kromprogramon"
-#: ../../addon/wppost/wppost.php:81
+#: ../../addon/wppost/wppost.php:83
msgid "WordPress username"
msgstr "WordPress salutnomo"
-#: ../../addon/wppost/wppost.php:86
+#: ../../addon/wppost/wppost.php:88
msgid "WordPress password"
msgstr "WordPress pasvorto"
-#: ../../addon/wppost/wppost.php:91
+#: ../../addon/wppost/wppost.php:93
msgid "WordPress API URL"
msgstr "Wordpress API URL adreso"
-#: ../../addon/wppost/wppost.php:96
+#: ../../addon/wppost/wppost.php:98
msgid "Post to WordPress by default"
msgstr "DefaÅ­lte afiÅi al WordPress"
+#: ../../addon/wppost/wppost.php:103
+msgid "Provide a backlink to the Friendica post"
+msgstr "Provizi re-ligilon al la Friendica afiÅo"
+
+#: ../../addon/wppost/wppost.php:207
+msgid "Read the original post and comment stream on Friendica"
+msgstr "Legi la originalan afiÅon kaj komentfluo ĉe Friendica"
+
#: ../../addon/showmore/showmore.php:38
msgid "\"Show more\" Settings"
msgstr "\"Montri pli\" agordoj"
@@ -5486,14 +5823,14 @@ msgid "Send public postings to Twitter by default"
msgstr "DefaÅ­lte sendi publikajn afiÅojn al Twitter"
#: ../../addon/twitter/twitter.php:201
-msgid "Send #tag links to Twitter"
-msgstr "Sendu #marko ligilon al Twitter"
+msgid "Send linked #-tags and @-names to Twitter"
+msgstr "Sendi ligitajn #-etikedojn kaj @-nomon al Twitter"
-#: ../../addon/twitter/twitter.php:377
+#: ../../addon/twitter/twitter.php:389
msgid "Consumer key"
msgstr "Åœlosilo de Kliento"
-#: ../../addon/twitter/twitter.php:378
+#: ../../addon/twitter/twitter.php:390
msgid "Consumer secret"
msgstr "Sekreto de Kliento"
@@ -5606,157 +5943,155 @@ msgstr "Agordi la larÄo por la etoso"
msgid "Color scheme"
msgstr "Kolorskemo"
-#: ../../view/theme/diabook/theme.php:123 ../../include/nav.php:49
+#: ../../view/theme/diabook/theme.php:127 ../../include/nav.php:49
#: ../../include/nav.php:115
msgid "Your posts and conversations"
msgstr "Viaj afiÅoj kaj komunikadoj"
-#: ../../view/theme/diabook/theme.php:124 ../../include/nav.php:50
+#: ../../view/theme/diabook/theme.php:128 ../../include/nav.php:50
msgid "Your profile page"
msgstr "Via profilo"
-#: ../../view/theme/diabook/theme.php:125
+#: ../../view/theme/diabook/theme.php:129
msgid "Your contacts"
msgstr "Viaj kontaktoj"
-#: ../../view/theme/diabook/theme.php:126 ../../include/nav.php:51
+#: ../../view/theme/diabook/theme.php:130 ../../include/nav.php:51
msgid "Your photos"
msgstr "Viaj bildoj"
-#: ../../view/theme/diabook/theme.php:127 ../../include/nav.php:52
+#: ../../view/theme/diabook/theme.php:131 ../../include/nav.php:52
msgid "Your events"
msgstr "Viaj okazoj"
-#: ../../view/theme/diabook/theme.php:128 ../../include/nav.php:53
+#: ../../view/theme/diabook/theme.php:132 ../../include/nav.php:53
msgid "Personal notes"
msgstr "Personaj notoj"
-#: ../../view/theme/diabook/theme.php:128 ../../include/nav.php:53
+#: ../../view/theme/diabook/theme.php:132 ../../include/nav.php:53
msgid "Your personal photos"
msgstr "Viaj personaj bildoj"
-#: ../../view/theme/diabook/theme.php:130
-#: ../../view/theme/diabook/theme.php:571
-#: ../../view/theme/diabook/theme.php:675
+#: ../../view/theme/diabook/theme.php:134
+#: ../../view/theme/diabook/theme.php:643
+#: ../../view/theme/diabook/theme.php:747
#: ../../view/theme/diabook/config.php:201
msgid "Community Pages"
msgstr "Komunumaj paÄoj"
-#: ../../view/theme/diabook/theme.php:418
-#: ../../view/theme/diabook/theme.php:677
+#: ../../view/theme/diabook/theme.php:490
+#: ../../view/theme/diabook/theme.php:749
#: ../../view/theme/diabook/config.php:203
msgid "Community Profiles"
msgstr "Komunumaj Profiloj"
-#: ../../view/theme/diabook/theme.php:439
-#: ../../view/theme/diabook/theme.php:682
+#: ../../view/theme/diabook/theme.php:511
+#: ../../view/theme/diabook/theme.php:754
#: ../../view/theme/diabook/config.php:208
msgid "Last users"
msgstr "Ä´usaj uzantoj"
-#: ../../view/theme/diabook/theme.php:468
-#: ../../view/theme/diabook/theme.php:684
+#: ../../view/theme/diabook/theme.php:540
+#: ../../view/theme/diabook/theme.php:756
#: ../../view/theme/diabook/config.php:210
msgid "Last likes"
msgstr "Ä´usaj Åatitaj elementoj"
-#: ../../view/theme/diabook/theme.php:513
-#: ../../view/theme/diabook/theme.php:683
+#: ../../view/theme/diabook/theme.php:585
+#: ../../view/theme/diabook/theme.php:755
#: ../../view/theme/diabook/config.php:209
msgid "Last photos"
msgstr "Ä´usaj bildoj"
-#: ../../view/theme/diabook/theme.php:550
-#: ../../view/theme/diabook/theme.php:680
+#: ../../view/theme/diabook/theme.php:622
+#: ../../view/theme/diabook/theme.php:752
#: ../../view/theme/diabook/config.php:206
msgid "Find Friends"
msgstr "Trovi Amikojn"
-#: ../../view/theme/diabook/theme.php:551
+#: ../../view/theme/diabook/theme.php:623
msgid "Local Directory"
msgstr "Loka Katalogo"
-#: ../../view/theme/diabook/theme.php:553 ../../include/contact_widgets.php:35
+#: ../../view/theme/diabook/theme.php:625 ../../include/contact_widgets.php:35
msgid "Similar Interests"
msgstr "Similaj Interesoj"
-#: ../../view/theme/diabook/theme.php:555 ../../include/contact_widgets.php:37
+#: ../../view/theme/diabook/theme.php:627 ../../include/contact_widgets.php:37
msgid "Invite Friends"
msgstr "Inviti amikojn"
-#: ../../view/theme/diabook/theme.php:606
-#: ../../view/theme/diabook/theme.php:676
+#: ../../view/theme/diabook/theme.php:678
+#: ../../view/theme/diabook/theme.php:748
#: ../../view/theme/diabook/config.php:202
msgid "Earth Layers"
msgstr "Tertavoloj (Earth Layers)"
-#: ../../view/theme/diabook/theme.php:611
-#: ../../view/theme/diabook/config.php:198
-msgid "Set zoomfactor for Earth Layer"
-msgstr "Agordi zoman faktoron de Tertavolo"
+#: ../../view/theme/diabook/theme.php:683
+msgid "Set zoomfactor for Earth Layers"
+msgstr "Agordi zoman faktoron por Tertavoloj"
-#: ../../view/theme/diabook/theme.php:612
+#: ../../view/theme/diabook/theme.php:684
#: ../../view/theme/diabook/config.php:199
-msgid "Set longitude (X) for Earth Layer"
-msgstr "Agordi longitudon (X) de Tertavolo"
+msgid "Set longitude (X) for Earth Layers"
+msgstr "Agordi longitudon (X) por Tertavoloj"
-#: ../../view/theme/diabook/theme.php:613
+#: ../../view/theme/diabook/theme.php:685
#: ../../view/theme/diabook/config.php:200
-msgid "Set latitude (Y) for Earth Layer"
-msgstr "Agordi latitudon (Y) de Tertavolo"
+msgid "Set latitude (Y) for Earth Layers"
+msgstr "Agordi latitudon (Y) por Tertavoloj"
-#: ../../view/theme/diabook/theme.php:626
-#: ../../view/theme/diabook/theme.php:678
+#: ../../view/theme/diabook/theme.php:698
+#: ../../view/theme/diabook/theme.php:750
#: ../../view/theme/diabook/config.php:204
msgid "Help or @NewHere ?"
msgstr "Helpu aÅ­ @NewHere ?"
-#: ../../view/theme/diabook/theme.php:633
-#: ../../view/theme/diabook/theme.php:679
+#: ../../view/theme/diabook/theme.php:705
+#: ../../view/theme/diabook/theme.php:751
#: ../../view/theme/diabook/config.php:205
msgid "Connect Services"
msgstr "Konekti Servojn"
-#: ../../view/theme/diabook/theme.php:640
-#: ../../view/theme/diabook/theme.php:681
-#: ../../view/theme/diabook/config.php:207
+#: ../../view/theme/diabook/theme.php:712
+#: ../../view/theme/diabook/theme.php:753
msgid "Last Tweets"
msgstr "Ĵusaj Pepaĵoj"
-#: ../../view/theme/diabook/theme.php:643
+#: ../../view/theme/diabook/theme.php:715
#: ../../view/theme/diabook/config.php:197
msgid "Set twitter search term"
msgstr "Agordi Twitter serĉtekston"
-#: ../../view/theme/diabook/theme.php:663
-#: ../../view/theme/diabook/theme.php:664
-#: ../../view/theme/diabook/theme.php:665
-#: ../../view/theme/diabook/theme.php:666
-#: ../../view/theme/diabook/theme.php:667
-#: ../../view/theme/diabook/theme.php:668
-#: ../../view/theme/diabook/theme.php:669
-#: ../../view/theme/diabook/theme.php:670
-#: ../../view/theme/diabook/theme.php:671
-#: ../../view/theme/diabook/theme.php:672 ../../include/acl_selectors.php:288
+#: ../../view/theme/diabook/theme.php:735
+#: ../../view/theme/diabook/theme.php:736
+#: ../../view/theme/diabook/theme.php:737
+#: ../../view/theme/diabook/theme.php:738
+#: ../../view/theme/diabook/theme.php:739
+#: ../../view/theme/diabook/theme.php:740
+#: ../../view/theme/diabook/theme.php:741
+#: ../../view/theme/diabook/theme.php:742
+#: ../../view/theme/diabook/theme.php:743
+#: ../../view/theme/diabook/theme.php:744 ../../include/acl_selectors.php:288
msgid "don't show"
msgstr "kaÅi"
-#: ../../view/theme/diabook/theme.php:663
-#: ../../view/theme/diabook/theme.php:664
-#: ../../view/theme/diabook/theme.php:665
-#: ../../view/theme/diabook/theme.php:666
-#: ../../view/theme/diabook/theme.php:667
-#: ../../view/theme/diabook/theme.php:668
-#: ../../view/theme/diabook/theme.php:669
-#: ../../view/theme/diabook/theme.php:670
-#: ../../view/theme/diabook/theme.php:671
-#: ../../view/theme/diabook/theme.php:672 ../../include/acl_selectors.php:287
+#: ../../view/theme/diabook/theme.php:735
+#: ../../view/theme/diabook/theme.php:736
+#: ../../view/theme/diabook/theme.php:737
+#: ../../view/theme/diabook/theme.php:738
+#: ../../view/theme/diabook/theme.php:739
+#: ../../view/theme/diabook/theme.php:740
+#: ../../view/theme/diabook/theme.php:741
+#: ../../view/theme/diabook/theme.php:742
+#: ../../view/theme/diabook/theme.php:743
+#: ../../view/theme/diabook/theme.php:744 ../../include/acl_selectors.php:287
msgid "show"
msgstr "montri"
-#: ../../view/theme/diabook/theme.php:673
-msgid "Show/hide boxes at right-hand coloumn:"
-msgstr "Montri/kaÅi kestojn en la desktra kolumno:"
+#: ../../view/theme/diabook/theme.php:745
+msgid "Show/hide boxes at right-hand column:"
+msgstr "KaÅi/montri kestojn ĉe dekstra kolumno:"
#: ../../view/theme/diabook/config.php:194
#: ../../view/theme/dispy/config.php:74
@@ -5771,6 +6106,14 @@ msgstr "Agordi la distingivon por la meza kolumno"
msgid "Set color scheme"
msgstr "Agordi Kolorskemon"
+#: ../../view/theme/diabook/config.php:198
+msgid "Set zoomfactor for Earth Layer"
+msgstr "Agordi zoman faktoron de Tertavolo"
+
+#: ../../view/theme/diabook/config.php:207
+msgid "Last tweets"
+msgstr "Ĵusaj pepaĵoj"
+
#: ../../view/theme/quattro/config.php:55
msgid "Alignment"
msgstr "Äœisrandigo"
@@ -5787,7 +6130,7 @@ msgstr "Centren"
msgid "Set colour scheme"
msgstr "Agordi Kolorskemon"
-#: ../../include/profile_advanced.php:17 ../../boot.php:1100
+#: ../../include/profile_advanced.php:17 ../../boot.php:1138
msgid "Gender:"
msgstr "Sekso:"
@@ -5799,8 +6142,7 @@ msgstr "j F, Y"
msgid "j F"
msgstr "j F"
-#: ../../include/profile_advanced.php:30 ../../include/datetime.php:448
-#: ../../include/items.php:1413
+#: ../../include/profile_advanced.php:30
msgid "Birthday:"
msgstr "NaskiÄtago:"
@@ -5808,59 +6150,64 @@ msgstr "NaskiÄtago:"
msgid "Age:"
msgstr "AÄo:"
-#: ../../include/profile_advanced.php:37 ../../boot.php:1103
+#: ../../include/profile_advanced.php:37 ../../boot.php:1141
msgid "Status:"
msgstr "Stato:"
-#: ../../include/profile_advanced.php:45 ../../boot.php:1105
+#: ../../include/profile_advanced.php:43
+#, php-format
+msgid "for %1$d %2$s"
+msgstr "por %1$d %2$s"
+
+#: ../../include/profile_advanced.php:48 ../../boot.php:1143
msgid "Homepage:"
msgstr "HejmpaÄo:"
-#: ../../include/profile_advanced.php:47
+#: ../../include/profile_advanced.php:52
msgid "Tags:"
msgstr "Markoj:"
-#: ../../include/profile_advanced.php:51
+#: ../../include/profile_advanced.php:56
msgid "Religion:"
msgstr "Religio:"
-#: ../../include/profile_advanced.php:53
+#: ../../include/profile_advanced.php:58
msgid "About:"
msgstr "Pri:"
-#: ../../include/profile_advanced.php:55
+#: ../../include/profile_advanced.php:60
msgid "Hobbies/Interests:"
msgstr "Åœatokupoj/Interesoj:"
-#: ../../include/profile_advanced.php:57
+#: ../../include/profile_advanced.php:67
msgid "Contact information and Social Networks:"
msgstr "Kontaktinformoj kaj Interkonaj Retejoj:"
-#: ../../include/profile_advanced.php:59
+#: ../../include/profile_advanced.php:69
msgid "Musical interests:"
msgstr "Muzaikaj interesoj:"
-#: ../../include/profile_advanced.php:61
+#: ../../include/profile_advanced.php:71
msgid "Books, literature:"
msgstr "Libroj, literaturo:"
-#: ../../include/profile_advanced.php:63
+#: ../../include/profile_advanced.php:73
msgid "Television:"
msgstr "Televido:"
-#: ../../include/profile_advanced.php:65
+#: ../../include/profile_advanced.php:75
msgid "Film/dance/culture/entertainment:"
msgstr "Filmoj/dancoj/arto/amuzaĵoj:"
-#: ../../include/profile_advanced.php:67
+#: ../../include/profile_advanced.php:77
msgid "Love/Romance:"
msgstr "Amo/romanco:"
-#: ../../include/profile_advanced.php:69
+#: ../../include/profile_advanced.php:79
msgid "Work/employment:"
msgstr "Laboro:"
-#: ../../include/profile_advanced.php:71
+#: ../../include/profile_advanced.php:81
msgid "School/education:"
msgstr "Lernejo/eduko:"
@@ -5992,199 +6339,203 @@ msgstr "Alia"
msgid "Undecided"
msgstr "Nedecida"
-#: ../../include/profile_selectors.php:21
+#: ../../include/profile_selectors.php:23
msgid "Males"
msgstr "Viroj"
-#: ../../include/profile_selectors.php:21
+#: ../../include/profile_selectors.php:23
msgid "Females"
msgstr "Inoj"
-#: ../../include/profile_selectors.php:21
+#: ../../include/profile_selectors.php:23
msgid "Gay"
msgstr "Geja"
-#: ../../include/profile_selectors.php:21
+#: ../../include/profile_selectors.php:23
msgid "Lesbian"
msgstr "Lesba"
-#: ../../include/profile_selectors.php:21
+#: ../../include/profile_selectors.php:23
msgid "No Preference"
msgstr "Neniu Prefero"
-#: ../../include/profile_selectors.php:21
+#: ../../include/profile_selectors.php:23
msgid "Bisexual"
msgstr "AmbaÅ­seksema"
-#: ../../include/profile_selectors.php:21
+#: ../../include/profile_selectors.php:23
msgid "Autosexual"
msgstr "Memseksema"
-#: ../../include/profile_selectors.php:21
+#: ../../include/profile_selectors.php:23
msgid "Abstinent"
msgstr "Abstinema"
-#: ../../include/profile_selectors.php:21
+#: ../../include/profile_selectors.php:23
msgid "Virgin"
msgstr "Virgulino"
-#: ../../include/profile_selectors.php:21
+#: ../../include/profile_selectors.php:23
msgid "Deviant"
msgstr "Devia"
-#: ../../include/profile_selectors.php:21
+#: ../../include/profile_selectors.php:23
msgid "Fetish"
msgstr "Fetiĉo"
-#: ../../include/profile_selectors.php:21
+#: ../../include/profile_selectors.php:23
msgid "Oodles"
msgstr "Amasa"
-#: ../../include/profile_selectors.php:21
+#: ../../include/profile_selectors.php:23
msgid "Nonsexual"
msgstr "Neseksa"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Single"
msgstr "Sola"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Lonely"
msgstr "Soleca"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Available"
msgstr "Havebla"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Unavailable"
msgstr "Nehavebla"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Has crush"
msgstr "Sekrete enamiÄinta"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Infatuated"
msgstr "Blinda amo"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Dating"
msgstr "Rendevuanta"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Unfaithful"
msgstr "Malfidela"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Sex Addict"
msgstr "Seksmaniulo"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42 ../../include/user.php:278
msgid "Friends"
msgstr "Amikoj"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Friends/Benefits"
msgstr "Amikoj/AvantaÄoj"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Casual"
msgstr "Neformala"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Engaged"
msgstr "Fianĉiginta"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Married"
msgstr "EdziÄinta"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Imaginarily married"
msgstr "Image edziÄinta"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Partners"
msgstr "Geparuloj"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Cohabiting"
msgstr "KunloÄanta"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Common law"
msgstr "Registrita partnereco "
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Happy"
msgstr "Feliĉa"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Not looking"
msgstr "Ne interesiÄis"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Swinger"
msgstr "Swinger"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Betrayed"
msgstr "Trompita"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Separated"
msgstr "DisiÄinta"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Unstable"
msgstr "Malfirma"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Divorced"
msgstr "EksedziÄinta"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Imaginarily divorced"
msgstr "Image eksedziÄinta"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Widowed"
msgstr "Vidva"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Uncertain"
msgstr "Ne certa"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "It's complicated"
msgstr "Estas komplika"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Don't care"
msgstr "Egala"
-#: ../../include/profile_selectors.php:37
+#: ../../include/profile_selectors.php:42
msgid "Ask me"
msgstr "Demandu min"
-#: ../../include/event.php:17 ../../include/bb2diaspora.php:244
+#: ../../include/event.php:20 ../../include/bb2diaspora.php:341
msgid "Starts:"
msgstr "Ekas:"
-#: ../../include/event.php:27 ../../include/bb2diaspora.php:252
+#: ../../include/event.php:30 ../../include/bb2diaspora.php:349
msgid "Finishes:"
msgstr "Finas:"
-#: ../../include/delivery.php:452 ../../include/notifier.php:652
+#: ../../include/delivery.php:456 ../../include/notifier.php:678
msgid "(no subject)"
msgstr "(neniu temo)"
-#: ../../include/delivery.php:459 ../../include/enotify.php:23
-#: ../../include/notifier.php:659
+#: ../../include/delivery.php:463 ../../include/enotify.php:26
+#: ../../include/notifier.php:685
msgid "noreply"
msgstr "nerespondi"
+#: ../../include/Scrape.php:572
+msgid " on Last.fm"
+msgstr " ĉe Last.fm"
+
#: ../../include/text.php:243
msgid "prev"
msgstr "antaÅ­a"
@@ -6212,156 +6563,147 @@ msgid_plural "%d Contacts"
msgstr[0] "%d Kontakto"
msgstr[1] "%d Kontaktoj"
-#: ../../include/text.php:650 ../../include/nav.php:91
-msgid "Search"
-msgstr "Serĉi"
-
-#: ../../include/text.php:831
+#: ../../include/text.php:835
msgid "Monday"
msgstr "Lundo"
-#: ../../include/text.php:831
+#: ../../include/text.php:835
msgid "Tuesday"
msgstr "Mardo"
-#: ../../include/text.php:831
+#: ../../include/text.php:835
msgid "Wednesday"
msgstr "Merkredo"
-#: ../../include/text.php:831
+#: ../../include/text.php:835
msgid "Thursday"
msgstr "Ä´aÅ­do"
-#: ../../include/text.php:831
+#: ../../include/text.php:835
msgid "Friday"
msgstr "Vendredo"
-#: ../../include/text.php:831
+#: ../../include/text.php:835
msgid "Saturday"
msgstr "Sabato"
-#: ../../include/text.php:831
+#: ../../include/text.php:835
msgid "Sunday"
msgstr "Dimanĉo"
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "January"
msgstr "Januaro"
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "February"
msgstr "Februaro"
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "March"
msgstr "Marto"
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "April"
msgstr "Aprilo"
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "May"
msgstr "Majo"
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "June"
msgstr "Junio"
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "July"
msgstr "Julio"
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "August"
msgstr "AÅ­gusto"
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "September"
msgstr "Septembro"
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "October"
msgstr "Oktobro"
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "November"
msgstr "Novembro"
-#: ../../include/text.php:835
+#: ../../include/text.php:839
msgid "December"
msgstr "Decembro"
-#: ../../include/text.php:919
+#: ../../include/text.php:925
msgid "bytes"
msgstr "bajtoj"
-#: ../../include/text.php:934 ../../include/text.php:949
+#: ../../include/text.php:945 ../../include/text.php:960
msgid "remove"
msgstr "forviÅi"
-#: ../../include/text.php:934 ../../include/text.php:949
+#: ../../include/text.php:945 ../../include/text.php:960
msgid "[remove]"
msgstr "[forviÅi]"
-#: ../../include/text.php:937
+#: ../../include/text.php:948
msgid "Categories:"
msgstr "Kategorioj:"
-#: ../../include/text.php:952
+#: ../../include/text.php:963
msgid "Filed under:"
msgstr "Enarkivigita kiel:"
-#: ../../include/text.php:968 ../../include/text.php:980
+#: ../../include/text.php:979 ../../include/text.php:991
msgid "Click to open/close"
msgstr "Klaku por malfermi/fermi"
-#: ../../include/text.php:1085
+#: ../../include/text.php:1097 ../../include/user.php:236
msgid "default"
msgstr "defaÅ­lta"
-#: ../../include/text.php:1097
+#: ../../include/text.php:1109
msgid "Select an alternate language"
msgstr "Elekti alian lingvon"
-#: ../../include/text.php:1307
+#: ../../include/text.php:1319
msgid "activity"
msgstr "aktiveco"
-#: ../../include/text.php:1309
+#: ../../include/text.php:1321
msgid "comment"
msgstr "komento"
-#: ../../include/text.php:1310
+#: ../../include/text.php:1322
msgid "post"
msgstr "afiÅo"
-#: ../../include/text.php:1465
+#: ../../include/text.php:1477
msgid "Item filed"
msgstr "Enarkivigis elementon "
-#: ../../include/diaspora.php:582
+#: ../../include/diaspora.php:593
msgid "Sharing notification from Diaspora network"
msgstr "Antentigo pri kunhavigado de la Diaspora reto"
-#: ../../include/diaspora.php:1969
+#: ../../include/diaspora.php:2085
msgid "Attachments:"
msgstr "Kunsendaĵoj:"
-#: ../../include/diaspora.php:2152
-#, php-format
-msgid "[Relayed] Comment authored by %s from network %s"
-msgstr "[Plusendita] %s en la reto %s skribis komenton"
-
-#: ../../include/network.php:824
+#: ../../include/network.php:839
msgid "view full size"
msgstr "vidi plengrande"
-#: ../../include/oembed.php:132
+#: ../../include/oembed.php:135
msgid "Embedded content"
msgstr "Enigita enhavo"
-#: ../../include/oembed.php:141
+#: ../../include/oembed.php:144
msgid "Embedding disabled"
msgstr "MalÅaltita enigitado"
@@ -6372,31 +6714,35 @@ msgid ""
"not what you intended, please create another group with a different name."
msgstr "Revivigis malnovan grupon kun la sama nomo. Permesoj por estantaj elementoj <strong>eble</strong> estas validaj por la grupo kaj estontaj membroj. Se tiu ne estas kiun vi atendis, bonvolu krei alian grupon kun alia nomo."
-#: ../../include/group.php:168
+#: ../../include/group.php:176
+msgid "Default privacy group for new contacts"
+msgstr "DefaÅ­lta privateca grupo por novaj kontaktoj"
+
+#: ../../include/group.php:195
msgid "Everybody"
msgstr "Ĉiuj"
-#: ../../include/group.php:191
+#: ../../include/group.php:218
msgid "edit"
msgstr "redakti"
-#: ../../include/group.php:212
+#: ../../include/group.php:239
msgid "Groups"
msgstr "Grupoj"
-#: ../../include/group.php:213
+#: ../../include/group.php:240
msgid "Edit group"
msgstr "Redakti grupon"
-#: ../../include/group.php:214
+#: ../../include/group.php:241
msgid "Create a new group"
msgstr "Krei novan grupon"
-#: ../../include/group.php:215
+#: ../../include/group.php:242
msgid "Contacts not in any group"
msgstr "Kontaktoj en neniu grupo"
-#: ../../include/nav.php:46 ../../boot.php:810
+#: ../../include/nav.php:46 ../../boot.php:848
msgid "Logout"
msgstr "Elsaluti"
@@ -6404,7 +6750,7 @@ msgstr "Elsaluti"
msgid "End this session"
msgstr "Fini ĉi-tiun seancon"
-#: ../../include/nav.php:49 ../../boot.php:1478
+#: ../../include/nav.php:49 ../../boot.php:1538
msgid "Status"
msgstr "Stato"
@@ -6484,11 +6830,11 @@ msgstr "Administri"
msgid "Manage other pages"
msgstr "Administri aliajn paÄojn"
-#: ../../include/nav.php:138 ../../boot.php:1058
+#: ../../include/nav.php:138 ../../boot.php:1096
msgid "Profiles"
msgstr "Profiloj"
-#: ../../include/nav.php:138 ../../boot.php:1058
+#: ../../include/nav.php:138 ../../boot.php:1096
msgid "Manage/edit profiles"
msgstr "Administri/redakti profilojn"
@@ -6497,14 +6843,10 @@ msgid "Manage/edit friends and contacts"
msgstr "Administri/redakti amikojn kaj kontaktojn"
#: ../../include/nav.php:146
-msgid "Admin"
-msgstr "Administrado"
-
-#: ../../include/nav.php:146
msgid "Site setup and configuration"
msgstr "Agordoj pri la retejo"
-#: ../../include/nav.php:169
+#: ../../include/nav.php:170
msgid "Nothing new here"
msgstr "Estas neniu nova ĉi tie"
@@ -6567,17 +6909,17 @@ msgstr "Ĉio"
msgid "Categories"
msgstr "Kategorioj"
-#: ../../include/auth.php:29
+#: ../../include/auth.php:36
msgid "Logged out."
msgstr "Elsalutita."
-#: ../../include/auth.php:106
+#: ../../include/auth.php:115
msgid ""
"We encountered a problem while logging in with the OpenID you provided. "
"Please check the correct spelling of the ID."
msgstr "Okazis problemo ensalutinta kun via OpenID. Bonvolu kontroli la ID."
-#: ../../include/auth.php:106
+#: ../../include/auth.php:115
msgid "The error message was:"
msgstr "La erarmesaÄo estis:"
@@ -6649,20 +6991,30 @@ msgstr "sekundo"
msgid "seconds"
msgstr "sekundoj"
-#: ../../include/datetime.php:277
+#: ../../include/datetime.php:278
#, php-format
msgid "%1$d %2$s ago"
msgstr "antaÅ­ %1$d %2$s"
-#: ../../include/onepoll.php:406
+#: ../../include/datetime.php:450 ../../include/items.php:1460
+#, php-format
+msgid "%s's birthday"
+msgstr "NaskiÄtago de %s"
+
+#: ../../include/datetime.php:451 ../../include/items.php:1461
+#, php-format
+msgid "Happy Birthday %s"
+msgstr "Feliĉan NaskiÄtagon al %s"
+
+#: ../../include/onepoll.php:399
msgid "From: "
msgstr "De: "
-#: ../../include/bbcode.php:203 ../../include/bbcode.php:223
+#: ../../include/bbcode.php:216 ../../include/bbcode.php:236
msgid "$1 wrote:"
msgstr "$1 skribis:"
-#: ../../include/bbcode.php:238 ../../include/bbcode.php:307
+#: ../../include/bbcode.php:251 ../../include/bbcode.php:328
msgid "Image/photo"
msgstr "Bildo"
@@ -6692,197 +7044,297 @@ msgstr "Dankon,"
msgid "%s Administrator"
msgstr "%s Administranto"
-#: ../../include/enotify.php:35
+#: ../../include/enotify.php:38
#, php-format
msgid "%s <!item_type!>"
msgstr "%s <!item_type!>"
-#: ../../include/enotify.php:39
+#: ../../include/enotify.php:42
#, php-format
msgid "[Friendica:Notify] New mail received at %s"
msgstr "[Friendica:Atentigo] Ricevis novan retpoÅton ĉe %s"
-#: ../../include/enotify.php:41
+#: ../../include/enotify.php:44
#, php-format
-msgid "%s sent you a new private message at %s."
-msgstr "%s sendis novan mesaÄon al vi ĉe %s."
+msgid "%1$s sent you a new private message at %2$s."
+msgstr "%1$s sendis al vi novan privatan mesaÄon ĉe %2$s."
-#: ../../include/enotify.php:42
+#: ../../include/enotify.php:45
#, php-format
-msgid "%s sent you %s."
-msgstr "%s sendis al vi %s."
+msgid "%1$s sent you %2$s."
+msgstr "%1$s sendis al vi %2$s."
-#: ../../include/enotify.php:42
+#: ../../include/enotify.php:45
msgid "a private message"
msgstr "privatan mesaÄon"
-#: ../../include/enotify.php:43
+#: ../../include/enotify.php:46
#, php-format
msgid "Please visit %s to view and/or reply to your private messages."
msgstr "Bonvolu viziti %s por vidi aÅ­ respondi viajn privatajn mesaÄojn."
#: ../../include/enotify.php:73
#, php-format
-msgid "%s's"
-msgstr "de %s verkita"
+msgid "%1$s commented on [url=%2$s]a %3$s[/url]"
+msgstr "%1$s komentis pri [url=%2$s]%3$s[/url]"
-#: ../../include/enotify.php:77
-msgid "your"
-msgstr "via"
+#: ../../include/enotify.php:80
+#, php-format
+msgid "%1$s commented on [url=%2$s]%3$s's %4$s[/url]"
+msgstr "%1$s komentis pri [url=%2$s]%4$s de %3$s[/url]"
-#: ../../include/enotify.php:84
+#: ../../include/enotify.php:88
#, php-format
-msgid "[Friendica:Notify] Comment to conversation #%d by %s"
-msgstr "[Friendica:Atentigo] Komento pri konversacio #%d de %s"
+msgid "%1$s commented on [url=%2$s]your %3$s[/url]"
+msgstr "%1$s komentis pri [url=%2$s]via %3$s[/url]"
-#: ../../include/enotify.php:85
+#: ../../include/enotify.php:98
#, php-format
-msgid "%s commented on an item/conversation you have been following."
-msgstr "%s komentis pri elemento/konversacio kiun vi sekvas."
+msgid "[Friendica:Notify] Comment to conversation #%1$d by %2$s"
+msgstr "[Friendica:Atentigo] Komento pri konversacio #%1$d de %2$s"
-#: ../../include/enotify.php:86
+#: ../../include/enotify.php:99
#, php-format
-msgid "%s commented on %s."
-msgstr "%s komentis pri %s."
+msgid "%s commented on an item/conversation you have been following."
+msgstr "%s komentis pri elemento/konversacio kiun vi sekvas."
-#: ../../include/enotify.php:88 ../../include/enotify.php:101
-#: ../../include/enotify.php:112 ../../include/enotify.php:123
+#: ../../include/enotify.php:102 ../../include/enotify.php:117
+#: ../../include/enotify.php:130 ../../include/enotify.php:143
#, php-format
msgid "Please visit %s to view and/or reply to the conversation."
msgstr "Bonvolu viziti %s por vidi aÅ­ respondi la konversacion."
-#: ../../include/enotify.php:95
+#: ../../include/enotify.php:109
#, php-format
msgid "[Friendica:Notify] %s posted to your profile wall"
msgstr "[Friendica:Atentigo] %s afiÅis al via profilmuro"
-#: ../../include/enotify.php:97
+#: ../../include/enotify.php:111
#, php-format
-msgid "%s posted to your profile wall at %s"
-msgstr "%s skribis al via profila muro ĉe %s"
+msgid "%1$s posted to your profile wall at %2$s"
+msgstr "%1$s skribis al via profilmuro ĉe %2$s"
-#: ../../include/enotify.php:99
+#: ../../include/enotify.php:113
#, php-format
-msgid "%s posted to %s"
-msgstr "%s afiÅis al %s"
+msgid "%1$s posted to [url=%2s]your wall[/url]"
+msgstr "%1$s afiÅis al [url=%2s]via muro[/url]"
-#: ../../include/enotify.php:99
-msgid "your profile wall."
-msgstr "via profilmuro."
-
-#: ../../include/enotify.php:108
+#: ../../include/enotify.php:124
#, php-format
msgid "[Friendica:Notify] %s tagged you"
msgstr "[Friendica:Atentigo] %s markis vin"
-#: ../../include/enotify.php:109
+#: ../../include/enotify.php:125
#, php-format
-msgid "%s tagged you at %s"
-msgstr "%s markis vin kiel %s"
+msgid "%1$s tagged you at %2$s"
+msgstr "%1$s markis vin ĉe %2$s"
-#: ../../include/enotify.php:110
+#: ../../include/enotify.php:126
#, php-format
-msgid "%s %s."
-msgstr "%s %s."
+msgid "%1$s [url=%2$s]tagged you[/url]."
+msgstr "%1$s [url=%2$s]markis vin[/url]."
-#: ../../include/enotify.php:110
-msgid "tagged you"
-msgstr "markis vin"
-
-#: ../../include/enotify.php:119
+#: ../../include/enotify.php:137
#, php-format
msgid "[Friendica:Notify] %s tagged your post"
msgstr "[Friendica:Atentigo] %s markis vian afiÅon"
-#: ../../include/enotify.php:120
+#: ../../include/enotify.php:138
#, php-format
-msgid "%s tagged your post at %s"
-msgstr "%s markis vian afiÅon kiel %s"
+msgid "%1$s tagged your post at %2$s"
+msgstr "%1$s markis vian afiÅon ĉe %2$s"
-#: ../../include/enotify.php:121
+#: ../../include/enotify.php:139
#, php-format
-msgid "%s tagged %s"
-msgstr "%s markis %s"
-
-#: ../../include/enotify.php:121
-msgid "your post"
-msgstr "vian afiÅon"
+msgid "%1$s tagged [url=%2$s]your post[/url]"
+msgstr "%1$s markis [url=%2$s]vian afiÅon[/url]"
-#: ../../include/enotify.php:130
+#: ../../include/enotify.php:150
msgid "[Friendica:Notify] Introduction received"
msgstr "[Friendica:Atentigo] Ricevis prezenton"
-#: ../../include/enotify.php:131
+#: ../../include/enotify.php:151
#, php-format
-msgid "You've received an introduction from '%s' at %s"
-msgstr "Vi ricevis prezento de '%s' ĉe %s"
+msgid "You've received an introduction from '%1$s' at %2$s"
+msgstr "Vi ricevis prezenton de '%1$s' ĉe %2$s"
-#: ../../include/enotify.php:132
+#: ../../include/enotify.php:152
#, php-format
-msgid "You've received %s from %s."
-msgstr "Vi ricevis %s de %s."
+msgid "You've received [url=%1$s]an introduction[/url] from %2$s."
+msgstr "Vi ricevis [url=%1$s]prezenton[/url] de %2$s."
-#: ../../include/enotify.php:132
-msgid "an introduction"
-msgstr "prezenton"
-
-#: ../../include/enotify.php:133 ../../include/enotify.php:150
+#: ../../include/enotify.php:155 ../../include/enotify.php:173
#, php-format
msgid "You may visit their profile at %s"
msgstr "Vi povas vidi la profilon de li aÅ­ Åi ĉe %s"
-#: ../../include/enotify.php:135
+#: ../../include/enotify.php:157
#, php-format
msgid "Please visit %s to approve or reject the introduction."
msgstr "Bonvolu viziti %s por aprobi aÅ­ malaprobi la prezenton."
-#: ../../include/enotify.php:142
+#: ../../include/enotify.php:164
msgid "[Friendica:Notify] Friend suggestion received"
msgstr "[Friendica:Atentigo] Ricevis amikosugeston"
-#: ../../include/enotify.php:143
+#: ../../include/enotify.php:165
#, php-format
-msgid "You've received a friend suggestion from '%s' at %s"
-msgstr "'%s' ĉe %s rekomendis amikon al vi"
+msgid "You've received a friend suggestion from '%1$s' at %2$s"
+msgstr "Vi ricevis amikosugeston de '%1$s' ĉe %2$s"
-#: ../../include/enotify.php:144
+#: ../../include/enotify.php:166
#, php-format
-msgid "You've received %s for %s from %s."
-msgstr "Vi ricevis %s kun %s de %s."
-
-#: ../../include/enotify.php:145
-msgid "a friend suggestion"
-msgstr "sugeston por amikiÄi"
+msgid ""
+"You've received [url=%1$s]a friend suggestion[/url] for %2$s from %3$s."
+msgstr "Vi ricevis [url=%1$s]amikosugeston[/url] pri %2$s de %3$s."
-#: ../../include/enotify.php:148
+#: ../../include/enotify.php:171
msgid "Name:"
msgstr "Nomo:"
-#: ../../include/enotify.php:149
+#: ../../include/enotify.php:172
msgid "Photo:"
msgstr "Bildo:"
-#: ../../include/enotify.php:152
+#: ../../include/enotify.php:175
#, php-format
msgid "Please visit %s to approve or reject the suggestion."
msgstr "Bonvolu viziti %s por aprobi aÅ­ malaprobi la sugeston."
-#: ../../include/items.php:2724
+#: ../../include/follow.php:32
+msgid "Connect URL missing."
+msgstr "Ne ekzistas URL adreso por konekti."
+
+#: ../../include/follow.php:59
+msgid ""
+"This site is not configured to allow communications with other networks."
+msgstr "Tiu retpaÄo ne permesas komunikadon kun aliaj retoj."
+
+#: ../../include/follow.php:60 ../../include/follow.php:80
+msgid "No compatible communication protocols or feeds were discovered."
+msgstr "Ne malkovris kongruajn protokolojn por komunikado aÅ­ fluojn."
+
+#: ../../include/follow.php:78
+msgid "The profile address specified does not provide adequate information."
+msgstr "La specifita profiladreso ne enhavas sufiĉe da informoj."
+
+#: ../../include/follow.php:82
+msgid "An author or name was not found."
+msgstr "Ne trovis aÅ­toron aÅ­ nomon."
+
+#: ../../include/follow.php:84
+msgid "No browser URL could be matched to this address."
+msgstr "Neniu retuma URL adreso kongruas al la adreso."
+
+#: ../../include/follow.php:86
+msgid ""
+"Unable to match @-style Identity Address with a known protocol or email "
+"contact."
+msgstr "Ne eblas kongrui @-stilan identecon adreson al iu konata protokolo au retpoÅtadreso."
+
+#: ../../include/follow.php:87
+msgid "Use mailto: in front of address to force email check."
+msgstr "Uzu mailto: antaÅ­ la adreso por devigi la testadon per retpoÅto."
+
+#: ../../include/follow.php:93
+msgid ""
+"The profile address specified belongs to a network which has been disabled "
+"on this site."
+msgstr "Tiu profila adreso apartenas al retejo kiu estas maÅaltita je ĉi tiu retejo."
+
+#: ../../include/follow.php:103
+msgid ""
+"Limited profile. This person will be unable to receive direct/personal "
+"notifications from you."
+msgstr "Profilo limigata. Ĉi persono ne eblos ricevi rektajn/personajn atentigojn de vi. "
+
+#: ../../include/follow.php:205
+msgid "Unable to retrieve contact information."
+msgstr "Ne eblas ricevi kontaktinformojn."
+
+#: ../../include/follow.php:259
+msgid "following"
+msgstr "sekvanta"
+
+#: ../../include/items.php:2888
msgid "A new person is sharing with you at "
msgstr "Nova persono kunhavigas kun vi ĉe "
-#: ../../include/items.php:2724
+#: ../../include/items.php:2888
msgid "You have a new follower at "
msgstr "Vi havas novan sekvanton ĉe "
-#: ../../include/bb2diaspora.php:102 ../../include/bb2diaspora.php:112
-#: ../../include/bb2diaspora.php:113
-msgid "image/photo"
-msgstr "bildo"
+#: ../../include/items.php:3520
+msgid "Archives"
+msgstr "Arkivoj"
+
+#: ../../include/user.php:38
+msgid "An invitation is required."
+msgstr "Invio bezonata."
+
+#: ../../include/user.php:43
+msgid "Invitation could not be verified."
+msgstr "Ne povis kontroli la inviton."
+
+#: ../../include/user.php:51
+msgid "Invalid OpenID url"
+msgstr "Nevalida OpenID adreso"
+
+#: ../../include/user.php:66
+msgid "Please enter the required information."
+msgstr "Bonvolu entajpi la bezonatajn informojn."
+
+#: ../../include/user.php:80
+msgid "Please use a shorter name."
+msgstr "Bonvolu uzi pli mallongan nomon."
+
+#: ../../include/user.php:82
+msgid "Name too short."
+msgstr "Nomo estas tro mallonga."
+
+#: ../../include/user.php:97
+msgid "That doesn't appear to be your full (First Last) name."
+msgstr "Tio Åajne ne estas via plena (persona, familia) nomo."
+
+#: ../../include/user.php:102
+msgid "Your email domain is not among those allowed on this site."
+msgstr "Via retpoÅtodomajno ne estas permesita ĉi tie."
+
+#: ../../include/user.php:105
+msgid "Not a valid email address."
+msgstr "Nevalida retpoÅtadreso."
-#: ../../include/bb2diaspora.php:102
-msgid "link"
-msgstr "ligilo"
+#: ../../include/user.php:115
+msgid "Cannot use that email."
+msgstr "Neuzebla retpoÅtadreso."
+
+#: ../../include/user.php:121
+msgid ""
+"Your \"nickname\" can only contain \"a-z\", \"0-9\", \"-\", and \"_\", and "
+"must also begin with a letter."
+msgstr "Via kaÅnomo nur povas enhavi \"a-z\", \"0-9\", \"-\", kaj \"_\". Äœi ankaÅ­ devas komenci kun litero."
+
+#: ../../include/user.php:127 ../../include/user.php:225
+msgid "Nickname is already registered. Please choose another."
+msgstr "Tio kaÅnomo jam estas registrita. Bonvolu elekti alian."
+
+#: ../../include/user.php:137
+msgid ""
+"Nickname was once registered here and may not be re-used. Please choose "
+"another."
+msgstr "Tiu kaÅnomo iam estis registrita ĉi tie kaj ne ree uzeblas. Bonvolu elekti alian."
+
+#: ../../include/user.php:153
+msgid "SERIOUS ERROR: Generation of security keys failed."
+msgstr "GRAVA ERARO: La generacio de sekurecaj ĉifroÅlosiloj malsukcesis."
+
+#: ../../include/user.php:211
+msgid "An error occurred during registration. Please try again."
+msgstr "Eraro okazis dum registrado. Bonvolu provi denove."
+
+#: ../../include/user.php:246
+msgid "An error occurred creating your default profile. Please try again."
+msgstr "Eraro okazi dum kreado de via defaÅ­lta profilo. Bonvolu provi denove."
#: ../../include/security.php:21
msgid "Welcome "
@@ -6906,30 +7358,30 @@ msgstr "La sekuriga ĵetono de la formo estis malÄusta. Tio verÅajne okazis ĉ
msgid "stopped following"
msgstr "ne plu sekvas"
-#: ../../include/Contact.php:203 ../../include/conversation.php:817
+#: ../../include/Contact.php:218 ../../include/conversation.php:842
msgid "View Status"
msgstr "Vidi Staton"
-#: ../../include/Contact.php:204 ../../include/conversation.php:818
+#: ../../include/Contact.php:219 ../../include/conversation.php:843
msgid "View Profile"
msgstr "Vidi Profilon"
-#: ../../include/Contact.php:205 ../../include/conversation.php:819
+#: ../../include/Contact.php:220 ../../include/conversation.php:844
msgid "View Photos"
msgstr "Vidi Bildojn"
-#: ../../include/Contact.php:206 ../../include/Contact.php:219
-#: ../../include/conversation.php:820
+#: ../../include/Contact.php:221 ../../include/Contact.php:234
+#: ../../include/conversation.php:845
msgid "Network Posts"
msgstr "Enretaj AfiÅoj"
-#: ../../include/Contact.php:207 ../../include/Contact.php:219
-#: ../../include/conversation.php:821
+#: ../../include/Contact.php:222 ../../include/Contact.php:234
+#: ../../include/conversation.php:846
msgid "Edit Contact"
msgstr "Redakti Kontakton"
-#: ../../include/Contact.php:208 ../../include/Contact.php:219
-#: ../../include/conversation.php:822
+#: ../../include/Contact.php:223 ../../include/Contact.php:234
+#: ../../include/conversation.php:847
msgid "Send PM"
msgstr "Sendi PM"
@@ -6942,309 +7394,321 @@ msgstr "afiÅo/elemento"
msgid "%1$s marked %2$s's %3$s as favorite"
msgstr "%1$s markis la %3$s de %2$s kiel preferita."
-#: ../../include/conversation.php:317 ../../include/conversation.php:583
+#: ../../include/conversation.php:327 ../../include/conversation.php:608
msgid "Select"
msgstr "Elekti"
-#: ../../include/conversation.php:334 ../../include/conversation.php:676
-#: ../../include/conversation.php:677
+#: ../../include/conversation.php:344 ../../include/conversation.php:701
+#: ../../include/conversation.php:702
#, php-format
msgid "View %s's profile @ %s"
msgstr "Vidi la profilon de %s ĉe %s"
-#: ../../include/conversation.php:344 ../../include/conversation.php:688
+#: ../../include/conversation.php:354 ../../include/conversation.php:713
#, php-format
msgid "%s from %s"
msgstr "%s de %s"
-#: ../../include/conversation.php:359
+#: ../../include/conversation.php:369
msgid "View in context"
msgstr "Vidi kun kunteksto"
-#: ../../include/conversation.php:465
+#: ../../include/conversation.php:475
#, php-format
msgid "%d comment"
msgid_plural "%d comments"
msgstr[0] "%d komento"
msgstr[1] "%d komentoj"
-#: ../../include/conversation.php:529
+#: ../../include/conversation.php:554
msgid "like"
msgstr "Åati"
-#: ../../include/conversation.php:530
+#: ../../include/conversation.php:555
msgid "dislike"
msgstr "malÅati"
-#: ../../include/conversation.php:532
+#: ../../include/conversation.php:557
msgid "Share this"
msgstr "Kunhavigi ĉi tiun"
-#: ../../include/conversation.php:532
+#: ../../include/conversation.php:557
msgid "share"
msgstr "kunhavigi"
-#: ../../include/conversation.php:556
+#: ../../include/conversation.php:581
msgid "Bold"
msgstr "Grasa"
-#: ../../include/conversation.php:557
+#: ../../include/conversation.php:582
msgid "Italic"
msgstr "Kursiva"
-#: ../../include/conversation.php:558
+#: ../../include/conversation.php:583
msgid "Underline"
msgstr "Substreki"
-#: ../../include/conversation.php:559
+#: ../../include/conversation.php:584
msgid "Quote"
msgstr "Citaĵo"
-#: ../../include/conversation.php:560
+#: ../../include/conversation.php:585
msgid "Code"
msgstr "Kodo"
-#: ../../include/conversation.php:561
+#: ../../include/conversation.php:586
msgid "Image"
msgstr "Bildo"
-#: ../../include/conversation.php:562
+#: ../../include/conversation.php:587
msgid "Link"
msgstr "Ligilo"
-#: ../../include/conversation.php:563
+#: ../../include/conversation.php:588
msgid "Video"
msgstr "Video"
-#: ../../include/conversation.php:596
+#: ../../include/conversation.php:621
msgid "add star"
msgstr "aldoni stelon"
-#: ../../include/conversation.php:597
+#: ../../include/conversation.php:622
msgid "remove star"
msgstr "forpreni stelon"
-#: ../../include/conversation.php:598
+#: ../../include/conversation.php:623
msgid "toggle star status"
msgstr "Åalti/malÅalti steloÅtato"
-#: ../../include/conversation.php:601
+#: ../../include/conversation.php:626
msgid "starred"
msgstr "steligita"
-#: ../../include/conversation.php:602
+#: ../../include/conversation.php:627
msgid "add tag"
msgstr "aldoni markon"
-#: ../../include/conversation.php:606
+#: ../../include/conversation.php:631
msgid "save to folder"
msgstr "konservi en dosierujo"
-#: ../../include/conversation.php:678
+#: ../../include/conversation.php:703
msgid "to"
msgstr "al"
-#: ../../include/conversation.php:679
+#: ../../include/conversation.php:704
msgid "Wall-to-Wall"
msgstr "Muro-al-Muro"
-#: ../../include/conversation.php:680
+#: ../../include/conversation.php:705
msgid "via Wall-To-Wall:"
-msgstr "tra Muro-al-Muro:"
+msgstr "per Muro-al-Muro:"
-#: ../../include/conversation.php:725
+#: ../../include/conversation.php:750
msgid "Delete Selected Items"
msgstr "ForviÅi Elektitajn Elementojn"
-#: ../../include/conversation.php:876
+#: ../../include/conversation.php:905
#, php-format
msgid "%s likes this."
msgstr "%s Åatas tiun."
-#: ../../include/conversation.php:876
+#: ../../include/conversation.php:905
#, php-format
msgid "%s doesn't like this."
msgstr "%s malÅatas tiun."
-#: ../../include/conversation.php:880
+#: ../../include/conversation.php:909
#, php-format
msgid "<span %1$s>%2$d people</span> like this."
msgstr "<span %1$s>%2$d homoj</span> Åatas tiun."
-#: ../../include/conversation.php:882
+#: ../../include/conversation.php:911
#, php-format
msgid "<span %1$s>%2$d people</span> don't like this."
msgstr "<span %1$s>%2$d homoj</span>malÅatas tiun."
-#: ../../include/conversation.php:888
+#: ../../include/conversation.php:917
msgid "and"
msgstr "kaj"
-#: ../../include/conversation.php:891
+#: ../../include/conversation.php:920
#, php-format
msgid ", and %d other people"
msgstr ", kaj %d aliaj homoj."
-#: ../../include/conversation.php:892
+#: ../../include/conversation.php:921
#, php-format
msgid "%s like this."
msgstr "%s Åatas tiun."
-#: ../../include/conversation.php:892
+#: ../../include/conversation.php:921
#, php-format
msgid "%s don't like this."
msgstr "%s malÅatas tiun."
-#: ../../include/conversation.php:917
+#: ../../include/conversation.php:946
msgid "Visible to <strong>everybody</strong>"
msgstr "Videbla al <strong>ĉiuj</strong>"
-#: ../../include/conversation.php:919
+#: ../../include/conversation.php:948
msgid "Please enter a video link/URL:"
msgstr "Bonvolu entajpi ligilon/adreson de video:"
-#: ../../include/conversation.php:920
+#: ../../include/conversation.php:949
msgid "Please enter an audio link/URL:"
msgstr "Bonvolu entajpi ligilon/adreson de sono:"
-#: ../../include/conversation.php:921
+#: ../../include/conversation.php:950
msgid "Tag term:"
msgstr "Markfrazo:"
-#: ../../include/conversation.php:923
+#: ../../include/conversation.php:952
msgid "Where are you right now?"
msgstr "Kie vi estas nun?"
-#: ../../include/conversation.php:966
+#: ../../include/conversation.php:995
msgid "upload photo"
msgstr "alÅuti bildon"
-#: ../../include/conversation.php:968
+#: ../../include/conversation.php:997
msgid "attach file"
msgstr "kunsendi dosieron"
-#: ../../include/conversation.php:970
+#: ../../include/conversation.php:999
msgid "web link"
msgstr "TTT ligilo"
-#: ../../include/conversation.php:971
+#: ../../include/conversation.php:1000
msgid "Insert video link"
msgstr "Alglui ligilon de video"
-#: ../../include/conversation.php:972
+#: ../../include/conversation.php:1001
msgid "video link"
msgstr "video ligilo"
-#: ../../include/conversation.php:973
+#: ../../include/conversation.php:1002
msgid "Insert audio link"
msgstr "Alglui ligilon de sono"
-#: ../../include/conversation.php:974
+#: ../../include/conversation.php:1003
msgid "audio link"
msgstr "sono ligilo"
-#: ../../include/conversation.php:976
+#: ../../include/conversation.php:1005
msgid "set location"
msgstr "agordi lokon"
-#: ../../include/conversation.php:978
+#: ../../include/conversation.php:1007
msgid "clear location"
msgstr "forviÅi lokon"
-#: ../../include/conversation.php:985
+#: ../../include/conversation.php:1014
msgid "permissions"
msgstr "permesoj"
-#: ../../boot.php:511
+#: ../../include/plugin.php:388 ../../include/plugin.php:390
+msgid "Click here to upgrade."
+msgstr "Klaku ĉi tie por Äisdatigi."
+
+#: ../../include/plugin.php:396
+msgid "This action exceeds the limits set by your subscription plan."
+msgstr "Tia ago preterpasas la limojn de via abono."
+
+#: ../../include/plugin.php:401
+msgid "This action is not available under your subscription plan."
+msgstr "Tia ago ne estas permesita laÅ­ via abono."
+
+#: ../../boot.php:527
msgid "Delete this item?"
msgstr "ForviÅi ĉi tiun elementon?"
-#: ../../boot.php:514
+#: ../../boot.php:530
msgid "show fewer"
msgstr "montri malpli"
-#: ../../boot.php:687
+#: ../../boot.php:725
#, php-format
msgid "Update %s failed. See error logs."
msgstr "Malsukcesis Äisdatigi %s. Vidu la protokolojn."
-#: ../../boot.php:689
+#: ../../boot.php:727
#, php-format
msgid "Update Error at %s"
msgstr "Eraro dum Äisdatigo ĉe %s"
-#: ../../boot.php:789
+#: ../../boot.php:827
msgid "Create a New Account"
msgstr "Krei Novan Konton"
-#: ../../boot.php:813
+#: ../../boot.php:851
msgid "Nickname or Email address: "
msgstr "KaÅnomo aÅ­ retpoÅtadreso:"
-#: ../../boot.php:814
+#: ../../boot.php:852
msgid "Password: "
msgstr "Pasvorto:"
-#: ../../boot.php:817
+#: ../../boot.php:855
msgid "Or login using OpenID: "
msgstr "AÅ­ ensaluti per OpenID:"
-#: ../../boot.php:823
+#: ../../boot.php:861
msgid "Forgot your password?"
msgstr "Ĉu vi vorgesis vian pasvorton?"
-#: ../../boot.php:990
+#: ../../boot.php:1028
msgid "Edit profile"
msgstr "Redakti profilon"
-#: ../../boot.php:1050
+#: ../../boot.php:1088
msgid "Message"
msgstr "MesaÄo"
-#: ../../boot.php:1166 ../../boot.php:1242
+#: ../../boot.php:1204 ../../boot.php:1283
msgid "g A l F d"
msgstr "\\j\\e \\l\\a G\\a \\h\\o\\r\\o, l F d"
-#: ../../boot.php:1167 ../../boot.php:1243
+#: ../../boot.php:1205 ../../boot.php:1284
msgid "F d"
msgstr "F d"
-#: ../../boot.php:1212 ../../boot.php:1283
+#: ../../boot.php:1250 ../../boot.php:1324
msgid "[today]"
msgstr "[hodiaÅ­]"
-#: ../../boot.php:1224
+#: ../../boot.php:1262
msgid "Birthday Reminders"
msgstr "Memorigilo pri naskiÄtagoj"
-#: ../../boot.php:1225
+#: ../../boot.php:1263
msgid "Birthdays this week:"
msgstr "NaskiÄtagoj ĉi-semajne:"
-#: ../../boot.php:1276
+#: ../../boot.php:1317
msgid "[No description]"
msgstr "[Neniu priskribo]"
-#: ../../boot.php:1294
+#: ../../boot.php:1335
msgid "Event Reminders"
msgstr "Memorigilo pri Okazoj"
-#: ../../boot.php:1295
+#: ../../boot.php:1336
msgid "Events this week:"
msgstr "Okazoj ĉi-semajne:"
-#: ../../boot.php:1481
+#: ../../boot.php:1541
msgid "Status Messages and Posts"
msgstr "ÅœtatmesaÄoj kaj AfiÅoj"
-#: ../../boot.php:1487
+#: ../../boot.php:1547
msgid "Profile Details"
msgstr "Profildetaloj"
-#: ../../boot.php:1502
+#: ../../boot.php:1562
msgid "Events and Calendar"
msgstr "Okazoj kaj Kalendaro"
-#: ../../boot.php:1508
+#: ../../boot.php:1568
msgid "Only You Can See This"
msgstr "Nur Vi Povas Vidi Tiun"
diff --git a/view/eo/strings.php b/view/eo/strings.php
index ba2af413a..236022993 100644
--- a/view/eo/strings.php
+++ b/view/eo/strings.php
@@ -33,7 +33,7 @@ $a->strings["File upload failed."] = "AlÅutado malsukcesis.";
$a->strings["Friend suggestion sent."] = "Amikosugesto sendita.";
$a->strings["Suggest Friends"] = "Sugesti amikojn";
$a->strings["Suggest a friend for %s"] = "Sugesti amikon por %s";
-$a->strings["Event description and start time are required."] = "Okazo bezonas priskribon kaj startotempon.";
+$a->strings["Event title and start time are required."] = "Titolo kaj starttempo estas bezonataj por la okazo.";
$a->strings["l, F j"] = "l, F j";
$a->strings["Edit event"] = "Redakti okazon";
$a->strings["link to source"] = "ligilo al fonto";
@@ -43,13 +43,15 @@ $a->strings["Previous"] = "antaÅ­a";
$a->strings["Next"] = "sekva";
$a->strings["hour:minute"] = "horo:minuto";
$a->strings["Event details"] = "Detaloj de okazo";
-$a->strings["Format is %s %s. Starting date and Description are required."] = "Formato estas %s %s. Startotempo kaj priskribo estas bezonataj";
+$a->strings["Format is %s %s. Starting date and Title are required."] = "Format is %s %s. Titolo kaj starttempo estas bezonataj.";
$a->strings["Event Starts:"] = "Okazo startas:";
+$a->strings["Required"] = "Bezonata";
$a->strings["Finish date/time is not known or not relevant"] = "Fina dato/tempo ne estas konata aÅ­ ne bezonata";
$a->strings["Event Finishes:"] = "Okazo finas:";
$a->strings["Adjust for viewer timezone"] = "Agordi al horzono de la leganto";
$a->strings["Description:"] = "Priskribo";
$a->strings["Location:"] = "Loko:";
+$a->strings["Title:"] = "Titolo:";
$a->strings["Share this event"] = "Kunhavigi la okazon";
$a->strings["Cancel"] = "Nuligi";
$a->strings["Tag removed"] = "Marko forviÅita";
@@ -82,6 +84,8 @@ $a->strings["Image upload failed."] = "AlÅuto de bildo malsukcesis.";
$a->strings["Public access denied."] = "Publika atingo ne permesita.";
$a->strings["No photos selected"] = "Neniu bildoj elektita";
$a->strings["Access to this item is restricted."] = "Atingo al tio elemento estas limigita.";
+$a->strings["You have used %1$.2f Mbytes of %2$.2f Mbytes photo storage."] = "Vi uzas %1$.2f MB de %2$.2f MB bildkonservejo.";
+$a->strings["You have used %1$.2f Mbytes of photo storage."] = "Vi uzas %1$.2f MB de bildkonservejo.";
$a->strings["Upload Photos"] = "AlÅuti bildojn";
$a->strings["New album name: "] = "Nomo por nova albumo:";
$a->strings["or existing album name: "] = "aÅ­ nomo de estanta albumo:";
@@ -98,6 +102,8 @@ $a->strings["Private Message"] = "Privata mesaÄo";
$a->strings["View Full Size"] = "Vidi plengrande ";
$a->strings["Tags: "] = "Markoj:";
$a->strings["[Remove any tag]"] = "[ForviÅi iun markon]";
+$a->strings["Rotate CW (right)"] = "Turni horloÄdirekte (dekstren)";
+$a->strings["Rotate CCW (left)"] = "Turni kontraÅ­horloÄdirekte (maldekstren)";
$a->strings["New album name"] = "Nova nomo de albumo";
$a->strings["Caption"] = "Apudskribo";
$a->strings["Add a Tag"] = "Aldoni markon";
@@ -124,7 +130,7 @@ $a->strings["Installed plugins/addons/apps:"] = "Instalitaj kromprogramoj/progra
$a->strings["No installed plugins/addons/apps"] = "Neniom da instalitaj aldonaĵoj/programoj";
$a->strings["Item not found"] = "Elemento ne trovita";
$a->strings["Edit post"] = "Redakti afiÅon";
-$a->strings["Post to Email"] = "Sendi tra retpoÅto";
+$a->strings["Post to Email"] = "Sendi per retpoÅto";
$a->strings["Edit"] = "Redakti";
$a->strings["Upload photo"] = "AlÅuti bildon";
$a->strings["Attach file"] = "Kunligi dosieron";
@@ -166,6 +172,7 @@ $a->strings["Failed to update contact record."] = "Äœisdatigo de via kontaktriko
$a->strings["Your introduction has been sent."] = "Via prezento estas sendita.";
$a->strings["Please login to confirm introduction."] = "Bonvolu ensaluti por jesigi la prezenton.";
$a->strings["Incorrect identity currently logged in. Please login to <strong>this</strong> profile."] = "MalÄusta identaĵo ensalutata. Bonvolu ensaluti en <strong>tiun</strong> profilon.";
+$a->strings["Hide this contact"] = "KaÅi tiun kontakton";
$a->strings["Welcome home %s."] = "Bonvenon hejme, %s.";
$a->strings["Please confirm your introduction/connection request to %s."] = "Bonvolu konfirmi vian prezenton / kontaktpeton al %s.";
$a->strings["Confirm"] = "Konfirmi.";
@@ -185,18 +192,14 @@ $a->strings[" - please do not use this form. Instead, enter %s into your Diaspo
$a->strings["Your Identity Address:"] = "Via identeca adreso:";
$a->strings["Submit Request"] = "Sendi peton";
$a->strings["Friendica Social Communications Server - Setup"] = "Friendica Interkona Komunikada Servilo - Instalo";
-$a->strings["Database connection"] = "Datumbaza konekto";
$a->strings["Could not connect to database."] = "Ne eblas konekti la datumbazon.";
$a->strings["Could not create table."] = "Ne eblas krei tabelon.";
$a->strings["Your Friendica site database has been installed."] = "La datumbazo de vi Friendica retjo estas instalita.";
-$a->strings["IMPORTANT: You will need to [manually] setup a scheduled task for the poller."] = "GRAVA: Vi bezonas [mane] agordi planitan taskon por la Friendica poller.";
+$a->strings["You may need to import the file \"database.sql\" manually using phpmyadmin or mysql."] = "Vi bezonas mane importi la dosieron \"database.sql\" per phpmyadmin aÅ­ mysql.";
$a->strings["Please see the file \"INSTALL.txt\"."] = "Bonvolu legi la dosieron \"INSTALL.txt\".";
-$a->strings["Proceed to registration"] = "Pluigi al la registrilo";
-$a->strings["Proceed with Installation"] = "Pluigi la instalado";
-$a->strings["You may need to import the file \"database.sql\" manually using phpmyadmin or mysql."] = "Vi bezonas mane importi la dosieron \"database.sql\" tra phpmyadmin aÅ­ mysql.";
-$a->strings["Database import failed."] = "Importo de la datumbazo malsukcesis.";
$a->strings["System check"] = "Sistema kontrolo";
$a->strings["Check again"] = "Ree kontroli";
+$a->strings["Database connection"] = "Datumbaza konekto";
$a->strings["In order to install Friendica we need to know how to connect to your database."] = "Por instali Friendica, ni bezonas scii kiel konekti al via datumbazo.";
$a->strings["Please contact your hosting provider or site administrator if you have questions about these settings."] = "Bonvolu kontakti vian servilprovizanton aŭ administranton se vi havas demandoj pri ĉi tiaj agordoj.";
$a->strings["The database you specify below should already exist. If it does not, please create it before continuing."] = "La datumbazo nomata malsupren jam ekzistu. Se Äi ne ekzistas, bonvolu unue krei Äin antaÅ­ progresi.";
@@ -209,8 +212,9 @@ $a->strings["Your account email address must match this in order to use the web
$a->strings["Please select a default timezone for your website"] = "Bonvolu elekti defaÅ­ltan horzonon por via retejo.";
$a->strings["Site settings"] = "Retejaj agordoj";
$a->strings["Could not find a command line version of PHP in the web server PATH."] = "Komanda linia versio de PHP ne trovita en $PATH de la retservilo.";
+$a->strings["If you don't have a command line version of PHP installed on server, you will not be able to run background polling via cron. See <a href='http://friendica.com/node/27'>'Activating scheduled tasks'</a>"] = "Se vi ne havas komandlinian version de PHP sur la servilo, vi ne eblas plenumi fonan planitan enketon per cron. Bonvolu legi <a href='http://friendica.com/node/27'>'Activating scheduled tasks'</a>";
$a->strings["PHP executable path"] = "Vojo de la komanda linia versio de PHP";
-$a->strings["Enter full path to php executable"] = "Entajpu plenan vojon al la komanda linia versio de PHP";
+$a->strings["Enter full path to php executable. You can leave this blank to continue the installation."] = "Entajpu la plenan vojon al la php komandodosiero. Vi eblas lasi tion malplena por pluigi la instalado.";
$a->strings["Command line PHP"] = "komanda linia versio de PHP";
$a->strings["The command line version of PHP on your system does not have \"register_argc_argv\" enabled."] = "En via komanda linia versio de PHP je via sistemo, \"register_argc_argv\" ne estas aktivita.";
$a->strings["This is required for message delivery to work."] = "Tio estas bezonata por la livero de mesaÄoj.";
@@ -232,11 +236,15 @@ $a->strings["Error: mysqli PHP module required but not installed."] = "Eraro: La
$a->strings["Error: mb_string PHP module required but not installed."] = "Eraro: La modulo mb_string en PHP estas bezonata sed ne instalita.";
$a->strings["The web installer needs to be able to create a file called \".htconfig.php\ in the top folder of your web server and it is unable to do so."] = "La reta instalilo bezonas skribi dosieron nomata \".htconfig.php\" en la baza dosierujo de la retservilo, sed ne sukcesis.";
$a->strings["This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can."] = "Tio ĉi plej ofte estas agordo rilate al permesoj, ĉar la servilo eble ne povas skribi en via dosierujo, eĉ se vi mem povas skribi.";
-$a->strings["Please check with your site documentation or support people to see if this situation can be corrected."] = "Bonvolu kontroli la dokumentojn de via servilo aÅ­ teÄ¥nikiston por ekscii ĉu la situacio Äustigeblas.";
-$a->strings["If not, you may be required to perform a manual installation. Please see the file \"INSTALL.txt\" for instructions."] = "Se ne, vi eble bezonas instali mane. Bonvolu legi la dosieron \"INSTALL.txt\" por pluaj instruaĵoj.";
+$a->strings["At the end of this procedure, we will give you a text to save in a file named .htconfig.php in your Friendica top folder."] = "Post la fino de tiu proceduro, ni donos al vi tekston por konservi en dosiero .htconfig.php en via baza Friendica dosierujo.";
+$a->strings["You can alternatively skip this procedure and perform a manual installation. Please see the file \"INSTALL.txt\" for instructions."] = "Vi ankaÅ­ povas preterpasi tiun proceduron kaj fari permanan instaladon. Bonvolu legi la dosieron \"INSTALL.txt\" por trovi instrukciojn.";
$a->strings[".htconfig.php is writable"] = ".htconfig.php estas skribebla.";
+$a->strings["Url rewrite in .htaccess is not working. Check your server configuration."] = "Url rewrite en .htaccess ne funkcias. Kontrolu la agordojn de la servilo.";
+$a->strings["Url rewrite is working"] = "URL rewrite funkcias.";
$a->strings["The database configuration file \".htconfig.php\" could not be written. Please use the enclosed text to create a configuration file in your web server root."] = "Ne povis skribi la datumbaza agordoj en la dosiero \".htconfig.php\". Bonvolu uzi la inkluzivan tekston por krei agordan dosieron en la baza dosierujo de la retservilo.";
$a->strings["Errors encountered creating database tables."] = "Okazis eraroj dum la kreado de tabeloj en la datumbazo.";
+$a->strings["<h1>What next</h1>"] = "<h1>Kio sekvas nun?</h1>";
+$a->strings["IMPORTANT: You will need to [manually] setup a scheduled task for the poller."] = "GRAVA: Vi bezonas [mane] agordi planitan taskon por la Friendica poller.";
$a->strings["l F d, Y \\@ g:i A"] = "l F d, Y \\@ g:i A";
$a->strings["Time Conversion"] = "Konverto de tempo";
$a->strings["Friendika provides this service for sharing events with other networks and friends in unknown timezones."] = "Friendica provizas tiun servon por kunhavigi okazojn kun aliaj retoj kaj amikoj en aliaj horzonoj.";
@@ -328,6 +336,7 @@ $a->strings["Archive"] = "Enarkivigi";
$a->strings["Toggle Archive status"] = "Åœalti/malÅalti Enarkivigitan staton";
$a->strings["Repair"] = "Ripari";
$a->strings["Advanced Contact Settings"] = "Specialaj Kontaktagordoj";
+$a->strings["Communications lost with this contact!"] = "Mi perdis la kommunikadon kun tiu kontakto!";
$a->strings["Contact Editor"] = "Kontakta redaktilo.";
$a->strings["Profile Visibility"] = "Videbleco de profilo";
$a->strings["Please choose the profile you would like to display to %s when viewing your profile securely."] = "Bonvolu elekti la profilon kiu vi volas montri al %s aspektinde kiam sekure aspektante vian profilon.";
@@ -403,6 +412,8 @@ $a->strings[" Please use a shorter name."] = " Bonvolu uzi pli mallongan nomon."
$a->strings[" Name too short."] = " Nomo estas tro mallonga.";
$a->strings[" Not valid email."] = " RepoÅtadreso ne validas.";
$a->strings[" Cannot change to that email."] = " Ne povas ÅanÄi al tio retpoÅtadreso.";
+$a->strings["Private forum has no privacy permissions. Using default privacy group."] = "Privata forumo ne havas privatecajn agordojn. DefaÅ­lta privateca grupo estas uzata.";
+$a->strings["Private forum has no privacy permissions and no default privacy group."] = "Privata forumo havas nek privatecajn agordojn nek defaÅ­ltan privatecan grupon.";
$a->strings["Settings updated."] = "Agordoj Äisdatigita.";
$a->strings["Add application"] = "Aldoni programon";
$a->strings["Consumer Key"] = "Åœlosilo de kliento";
@@ -420,11 +431,11 @@ $a->strings["Built-in support for %s connectivity is %s"] = "Integrita subteno p
$a->strings["enabled"] = "Åaltita";
$a->strings["disabled"] = "malÅaltita";
$a->strings["StatusNet"] = "StatusNet";
+$a->strings["Email access is disabled on this site."] = "RetpoÅta atingo ne disponeblas ĉi tie.";
$a->strings["Connector Settings"] = "Konektiloagordoj";
$a->strings["Email/Mailbox Setup"] = "Agordoj pri RetpoÅto";
-$a->strings["If you wish to communicate with email contacts using this service (optional), please specify how to connect to your mailbox."] = "Se vi volas uzi ĉi tiun servon por komuniki tra retpoÅto (nedeviga), bonvolu specifi kiel konekti al vian retpoÅtkonton.";
+$a->strings["If you wish to communicate with email contacts using this service (optional), please specify how to connect to your mailbox."] = "Se vi volas uzi ĉi tiun servon por komuniki per retpoÅto (nedeviga), bonvolu specifi kiel konekti al vian retpoÅtkonton.";
$a->strings["Last successful email check:"] = "Plej ĵusa sukcesa kontrolo de poÅto:";
-$a->strings["Email access is disabled on this site."] = "RetpoÅta atingo ne disponeblas ĉi tie.";
$a->strings["IMAP server name:"] = "Nomo de IMAP servilo:";
$a->strings["IMAP port:"] = "Numero de IMAP pordo:";
$a->strings["Security:"] = "Sekureco:";
@@ -444,14 +455,16 @@ $a->strings["Minimum of 10 seconds, no maximum"] = "Minimume 10 sekundoj, sen ma
$a->strings["Number of items to display on the network page:"] = "Kvanto da elementoj kiuj estos montrata ĉe la reto paÄo.";
$a->strings["Maximum of 100 items"] = "Maksimume 100 eroj";
$a->strings["Don't show emoticons"] = "Ne montru ridetulojn";
-$a->strings["Normal Account"] = "Normala konto";
+$a->strings["Normal Account Page"] = "Normala KontopaÄo";
$a->strings["This account is a normal personal profile"] = "Tiu konto estas normala persona profilo";
-$a->strings["Soapbox Account"] = "Soapbox Konto";
+$a->strings["Soapbox Page"] = "Soapbox PaÄo";
$a->strings["Automatically approve all connection/friend requests as read-only fans"] = "Aŭtomate konfirmi ĉiujn kontaktpetojn kiel nurlegaj admirantoj";
-$a->strings["Community/Celebrity Account"] = "Komunuma/eminentula Konto";
+$a->strings["Community Forum/Celebrity Account"] = "Komunuma Forumo/Eminentula Konto";
$a->strings["Automatically approve all connection/friend requests as read-write fans"] = "Aŭtomate konfirmi ĉiujn kontaktpetojn kiel admirantoj kapable legi kaj skribi";
-$a->strings["Automatic Friend Account"] = "AÅ­tomata Amika Konto";
+$a->strings["Automatic Friend Page"] = "AÅ­tomata Amiko PaÄo";
$a->strings["Automatically approve all connection/friend requests as friends"] = "Aŭtomate konfirmi ĉiujn kontaktpetojn kiel amikoj";
+$a->strings["Private Forum [Experimental]"] = "Privata Forumo [eksperimenta]";
+$a->strings["Private forum - approved members only"] = "Privata forumo - nur por aprobitaj membroj";
$a->strings["OpenID:"] = "OpenID:";
$a->strings["(Optional) Allow this OpenID to login to this account."] = "(Nedeviga) Permesi atingon al la konton al ĉi tio OpenID.";
$a->strings["Publish your default profile in your local site directory?"] = "Publikigi vian defaÅ­ltan profilon en la loka reteja katalogo?";
@@ -473,6 +486,7 @@ $a->strings["Expire posts:"] = "Senvalidigi afiÅojn:";
$a->strings["Expire personal notes:"] = "Senvalidigi personajn notojn:";
$a->strings["Expire starred posts:"] = "Senvalidigi steligitajn afiÅojn:";
$a->strings["Expire photos:"] = "Senvalidigi bildojn:";
+$a->strings["Only expire posts by others:"] = "Nur senvalidigi afiÅojn de aliaj: ";
$a->strings["Account Settings"] = "Kontoagordoj";
$a->strings["Password Settings"] = "Agordoj pri Pasvorto";
$a->strings["New Password:"] = "Nova pasvorto:";
@@ -503,7 +517,8 @@ $a->strings["Someone writes a followup comment"] = "Iu skribas sekvan komenton";
$a->strings["You receive a private message"] = "Vi ricevas privatan mesaÄon.";
$a->strings["You receive a friend suggestion"] = "Vi ricevas amikosugeston";
$a->strings["You are tagged in a post"] = "Vi estas markita en afiÅon";
-$a->strings["Advanced Page Settings"] = "Specialaj agordoj pri paÄoj";
+$a->strings["Advanced Account/Page Type Settings"] = "Detalaj Agordoj pri Tipo de Konto/PaÄo.";
+$a->strings["Change the behaviour of this account for special situations"] = "Agordi la teniÄon de la konto en specialaj situacioj";
$a->strings["Manage Identities and/or Pages"] = "Administri identecojn kaj/aÅ­ paÄojn.";
$a->strings["Toggle between different identities or community/group pages which share your account details or which you have been granted \"manage\" permissions"] = "Åœalti inter aliaj identecojn aj komunumaj/grupaj paÄoj kiuj kunhavas viajn kontajn detalojn au por kiuj vi havas \"administranto\" permesojn.";
$a->strings["Select an identity to manage: "] = "Elektu identencon por administrado:";
@@ -557,7 +572,7 @@ $a->strings["Review the other settings, particularly the privacy settings. An un
$a->strings["Upload a profile photo if you have not done so already. Studies have shown that people with real photos of themselves are ten times more likely to make friends than people who do not."] = "EnÅuti profilbildon se vi ankoraÅ­ ne havas Äin. LaÅ­ studoj, homoj kun realaj biloj de si mem trovas novajn amikon duope pli probable ol homoj sen reala bildo.";
$a->strings["Authorise the Facebook Connector if you currently have a Facebook account and we will (optionally) import all your Facebook friends and conversations."] = "Rajtigu la Facebook Konektilon se vi nuntempe havas Facebook konton, kaj ni (nedeviga) enportu viajn Facebook amikojn kaj konversaciojn.";
$a->strings["<em>If</em> this is your own personal server, installing the Facebook addon may ease your transition to the free social web."] = "<em>Se</tm> ĉi tiu estas via propra TTT servilo, instali la Facebook kromprogramon eble plifaciligos la transpason al la libera interkona reto.";
-$a->strings["Enter your email access information on your Connector Settings page if you wish to import and interact with friends or mailing lists from your email INBOX"] = "Entajpu la akreditaĵojn por via retpoÅtkonto en la konektilagordoj se vi volas importi aÅ­ interagi kun amikoj aÅ­ dissendlistoj tra via retkesto.";
+$a->strings["Enter your email access information on your Connector Settings page if you wish to import and interact with friends or mailing lists from your email INBOX"] = "Entajpu la akreditaĵojn por via retpoÅtkonto en la konektilagordoj se vi volas importi aÅ­ interagi kun amikoj aÅ­ dissendlistoj pere de via retkesto.";
$a->strings["Edit your <strong>default</strong> profile to your liking. Review the settings for hiding your list of friends and hiding the profile from unknown visitors."] = "Redakti viajn <strong>defaÅ­ltan</strong> profilon kiel vi Åatas Äin. Kontrolu la agordojn por kaÅi vian kontaktliston aÅ­ kaÅi vian profilon al nekonataj vizitantoj.";
$a->strings["Set some public keywords for your default profile which describe your interests. We may be able to find other people with similar interests and suggest friendships."] = "Aldonu publikajn Ålosilvortojn al via defaÅ­lta profilo, kiuj priskribas viajn interesojn. Ni eble povas trovi aliajn uzantojn kun similaj interesoj kaj sugesti amikojn.";
$a->strings["Your Contacts page is your gateway to managing friendships and connecting with friends on other networks. Typically you enter their address or site URL in the <em>Add New Contact</em> dialog."] = "Via kontaktpaÄo estas via portalo por administri amikojn kaj konekti kun amikoj en aliaj retoj. Vi kutime entajpas iliajn adreson aÅ­ URL adreso en la <em>Aldonu Novan Kontakton</em> dialogon.";
@@ -586,22 +601,6 @@ $a->strings["Visible To"] = "Videbla Al";
$a->strings["All Contacts (with secure profile access)"] = "Ĉiuj Kontaktoj (kun sekura atingo al la profilo)";
$a->strings["No contacts."] = "Neniu kontaktojn.";
$a->strings["View Contacts"] = "Vidi Kontaktojn";
-$a->strings["An invitation is required."] = "Invio bezonata.";
-$a->strings["Invitation could not be verified."] = "Ne povis kontroli la inviton.";
-$a->strings["Invalid OpenID url"] = "Nevalida OpenID adreso";
-$a->strings["Please enter the required information."] = "Bonvolu entajpi la bezonatajn informojn.";
-$a->strings["Please use a shorter name."] = "Bonvolu uzi pli mallongan nomon.";
-$a->strings["Name too short."] = "Nomo estas tro mallonga.";
-$a->strings["That doesn't appear to be your full (First Last) name."] = "Tio Åajne ne estas via plena (persona, familia) nomo.";
-$a->strings["Your email domain is not among those allowed on this site."] = "Via retpoÅtodomajno ne estas permesita ĉi tie.";
-$a->strings["Not a valid email address."] = "Nevalida retpoÅtadreso.";
-$a->strings["Cannot use that email."] = "Neuzebla retpoÅtadreso.";
-$a->strings["Your \"nickname\" can only contain \"a-z\", \"0-9\", \"-\", and \"_\", and must also begin with a letter."] = "Via kaÅnomo nur povas enhavi \"a-z\", \"0-9\", \"-\", kaj \"_\". Äœi ankaÅ­ devas komenci kun litero.";
-$a->strings["Nickname is already registered. Please choose another."] = "Tio kaÅnomo jam estas registrita. Bonvolu elekti alian.";
-$a->strings["Nickname was once registered here and may not be re-used. Please choose another."] = "Tiu kaÅnomo iam estis registrita ĉi tie kaj ne ree uzeblas. Bonvolu elekti alian.";
-$a->strings["SERIOUS ERROR: Generation of security keys failed."] = "GRAVA ERARO: La generacio de sekurecaj ĉifroÅlosiloj malsukcesis.";
-$a->strings["An error occurred during registration. Please try again."] = "Eraro okazis dum registrado. Bonvolu provi denove.";
-$a->strings["An error occurred creating your default profile. Please try again."] = "Eraro okazi dum kreado de via defaÅ­lta profilo. Bonvolu provi denove.";
$a->strings["Registration details for %s"] = "Detaloj de la registrado por %s";
$a->strings["Registration successful. Please check your email for further instructions."] = "Registrado sukcesis. Bonvolu kontroli vian retpoÅton por pli da instruoj.";
$a->strings["Failed to send email message. Here is the message that failed."] = "Malsukcesis sendi retpoÅton. Jen la malsukcesa mesaÄo.";
@@ -609,7 +608,7 @@ $a->strings["Your registration can not be processed."] = "Mi ne povas prilabori
$a->strings["Registration request at %s"] = "Peto de registrado al %s";
$a->strings["Your registration is pending approval by the site owner."] = "Via registrado bezonas apropbon de la administranto.";
$a->strings["This site has exceeded the number of allowed daily account registrations. Please try again tomorrow."] = "La retejo transiras la maksimuman kvanton da ĉiutagaj kontaj registradoj. Bonvolu provi denove morgaŭ.";
-$a->strings["You may (optionally) fill in this form via OpenID by supplying your OpenID and clicking 'Register'."] = "Vi ankaÅ­ (nedeviga) povas plenigi la formularon tra OpenID se vi provizas vian OpenID adreson kaj klakas 'Registri'.";
+$a->strings["You may (optionally) fill in this form via OpenID by supplying your OpenID and clicking 'Register'."] = "Vi ankaÅ­ (nedeviga) povas plenigi la formularon per OpenID se vi provizas vian OpenID adreson kaj klakas 'Registri'.";
$a->strings["If you are not familiar with OpenID, please leave that field blank and fill in the rest of the items."] = "Se vi ne konas OpenID, bonvolu lasi tiun kampon malplena kaj entajpu la aliajn elementojn.";
$a->strings["Your OpenID (optional): "] = "Via OpenID (nedeviga):";
$a->strings["Include your profile in member directory?"] = "Aldoni vian profilon al la membrokatalogo?";
@@ -684,9 +683,15 @@ $a->strings["Users"] = "Uzantoj";
$a->strings["Plugins"] = "Kromprogramoj";
$a->strings["Themes"] = "Etosoj";
$a->strings["DB updates"] = "DB Äisdatigoj";
-$a->strings["Software Update"] = "Friendica Äœisdatigoj";
$a->strings["Logs"] = "Protokoloj";
+$a->strings["Admin"] = "Administrado";
+$a->strings["Plugin Features"] = "Kromprogramaj Trajtoj";
$a->strings["User registrations waiting for confirmation"] = "Uzantaj registradoj atendante konfirmon";
+$a->strings["Normal Account"] = "Normala konto";
+$a->strings["Soapbox Account"] = "Soapbox Konto";
+$a->strings["Community/Celebrity Account"] = "Komunuma/eminentula Konto";
+$a->strings["Automatic Friend Account"] = "AÅ­tomata Amika Konto";
+$a->strings["Message queues"] = "MesaÄvicoj";
$a->strings["Administration"] = "Administrado";
$a->strings["Summary"] = "Resumo";
$a->strings["Registered users"] = "Registrataj uzantoj";
@@ -825,30 +830,21 @@ $a->strings["{0} tagged %s's post with #%s"] = "{0} markis la afiÅon de %s kun
$a->strings["{0} mentioned you in a post"] = "{0} menciis vin en afiÅo";
$a->strings["Contacts who are not members of a group"] = "Kontaktoj kiuj ne estas en iu grupo";
$a->strings["OpenID protocol error. No ID returned."] = "Eraro en OpenID protokolo. Ne resendis identecon.";
-$a->strings["Account not found and OpenID registration is not permitted on this site."] = "Ne trovis kontoj, kaj registrado tra OpenID estas malpermesita ĉi tie.";
+$a->strings["Account not found and OpenID registration is not permitted on this site."] = "Ne trovis kontoj, kaj registrado per OpenID estas malpermesita ĉi tie.";
$a->strings["Login failed."] = "Ensalutado malsukcesis.";
-$a->strings["Connect URL missing."] = "Ne ekzistas URL adreso por konekti.";
-$a->strings["This site is not configured to allow communications with other networks."] = "Tiu retpaÄo ne permesas komunikadon kun aliaj retoj.";
-$a->strings["No compatible communication protocols or feeds were discovered."] = "Ne malkovris kongruajn protokolojn por komunikado aÅ­ fluojn.";
-$a->strings["The profile address specified does not provide adequate information."] = "La specifita profiladreso ne enhavas sufiĉe da informoj.";
-$a->strings["An author or name was not found."] = "Ne trovis aÅ­toron aÅ­ nomon.";
-$a->strings["No browser URL could be matched to this address."] = "Neniu retuma URL adreso kongruas al la adreso.";
-$a->strings["Unable to match @-style Identity Address with a known protocol or email contact."] = "Ne eblas kongrui @-stilan identecon adreson al iu konata protokolo au retpoÅtadreso.";
-$a->strings["Use mailto: in front of address to force email check."] = "Uzu mailto: antaÅ­ la adreso por devigi la testadon per retpoÅto.";
-$a->strings["The profile address specified belongs to a network which has been disabled on this site."] = "Tiu profila adreso apartenas al retejo kiu estas maÅaltita je ĉi tiu retejo.";
-$a->strings["Limited profile. This person will be unable to receive direct/personal notifications from you."] = "Profilo limigata. Ĉi persono ne eblos ricevi rektajn/personajn atentigojn de vi. ";
-$a->strings["Unable to retrieve contact information."] = "Ne eblas ricevi kontaktinformojn.";
-$a->strings["following"] = "sekvanta";
+$a->strings["Contact added"] = "Aldonis kontakton";
$a->strings["Common Friends"] = "Komunaj Amikoj";
$a->strings["No contacts in common."] = "Neniom da komunaj kontaktoj.";
$a->strings["Item has been removed."] = "Elemento estas forviÅita.";
$a->strings["Applications"] = "Programoj";
$a->strings["No installed applications."] = "Neniom da instalitaj programoj.";
-$a->strings["Search This Site"] = "Serĉi ĉi-tiun retejon";
+$a->strings["Search"] = "Serĉi";
$a->strings["Profile not found."] = "Profilo ne trovita.";
$a->strings["Profile Name is required."] = "Nomo de profilo estas bezonata.";
$a->strings["Marital Status"] = "Amrilata Stato";
$a->strings["Romantic Partner"] = "Kora Partnero";
+$a->strings["Likes"] = "Åœatoj";
+$a->strings["Dislikes"] = "MalÅatoj";
$a->strings["Work/Employment"] = "Laboro";
$a->strings["Religion"] = "Religio";
$a->strings["Political Views"] = "Politikaj Opinioj";
@@ -856,11 +852,13 @@ $a->strings["Gender"] = "Sekso";
$a->strings["Sexual Preference"] = "Seksa Prefero";
$a->strings["Homepage"] = "HejmpaÄo";
$a->strings["Interests"] = "Interesoj";
+$a->strings["Address"] = "Adreso";
$a->strings["Location"] = "Loko";
$a->strings["Profile updated."] = "Profilo Äisdatigita.";
$a->strings[" and "] = " kaj ";
$a->strings["public profile"] = "publika profilo";
$a->strings["%1\$s changed %2\$s to &ldquo;%3\$s&rdquo;"] = "%1\$s ÅanÄis %2\$s al &ldquo;%3\$s&rdquo;";
+$a->strings[" - Visit %1\$s's %2\$s"] = " - Vizitu la %2\$s de %1\$s";
$a->strings["%1\$s has an updated %2\$s, changing %3\$s."] = "%1\$s havas Äisdatigigan %2\$s, ÅanÄas %3\$s.";
$a->strings["Profile deleted."] = "Profilo forviÅita.";
$a->strings["Profile-"] = "Profilo-";
@@ -885,12 +883,16 @@ $a->strings["Region/State:"] = "Åœtato:";
$a->strings["<span class=\"heart\">&hearts;</span> Marital Status:"] = "<span class=\"heart\">&hearts;</span> Civita Stato:";
$a->strings["Who: (if applicable)"] = "Kiu (se aplikeble):";
$a->strings["Examples: cathy123, Cathy Williams, cathy@example.com"] = "Ekzemploj: cathy123, Cathy Williams, cathy@example.com";
+$a->strings["Since [date]:"] = "Ekde [dato]:";
$a->strings["Sexual Preference:"] = "Seksa Prefero:";
$a->strings["Homepage URL:"] = "Adreso de HejmpaÄo:";
+$a->strings["Hometown:"] = "Hejmurbo:";
$a->strings["Political Views:"] = "Politikaj Opinioj:";
$a->strings["Religious Views:"] = "Religiaj Opinioj:";
$a->strings["Public Keywords:"] = "Publikaj Ålosilvortoj:";
$a->strings["Private Keywords:"] = "Privataj Ålosilvortoj:";
+$a->strings["Likes:"] = "Åœatoj:";
+$a->strings["Dislikes:"] = "MalÅatoj:";
$a->strings["Example: fishing photography software"] = "Ekzemple: fiÅkapti fotografio programaro";
$a->strings["(Used for suggesting potential friends, can be seen by others)"] = "(Por sugesti amikoj. Videbla al aliaj.)";
$a->strings["(Used for searching profiles, never shown to others)"] = "(Por serĉi profilojn. Neniam videbla al aliaj.)";
@@ -926,7 +928,6 @@ $a->strings["No entries."] = "Neniom da afiÅoj.";
$a->strings["Friend Suggestions"] = "Amikosugestoj";
$a->strings["No suggestions available. If this is a new site, please try again in 24 hours."] = "Neniu sugestoj disponeblas. Se ĉi tiu estas nova retejo, bonvolu reprovi post 24 horoj.";
$a->strings["Ignore/Hide"] = "Ignori/KaÅi";
-$a->strings["%s [%s]"] = "%s [%s]";
$a->strings["Global Directory"] = "Tutmonda Katalogo";
$a->strings["Find on this site"] = "Trovi en ĉi retejo";
$a->strings["Site Directory"] = "Reteja Katalogo";
@@ -948,7 +949,7 @@ $a->strings["Send invitations"] = "Sendi invitojn";
$a->strings["Enter email addresses, one per line:"] = "Entajpu retpoÅtadresojn, po unu por ĉiu linio.";
$a->strings["You are cordially invited to join me and other close friends on Friendica - and help us to create a better social web."] = "Ni bonkore invitas vin aliÄi kun ni kaj aliaj bonaj amikoj ĉe Friendica. Helpu nin krei pli bonan interkonan reton.";
$a->strings["You will need to supply this invitation code: \$invite_code"] = "Vi bezonas ĉi-tiun invitkodon: \$invite_code";
-$a->strings["Once you have registered, please connect with me via my profile page at:"] = "Kiam vi registris, bonvolu konekti al mi tra mi profilo ĉe: ";
+$a->strings["Once you have registered, please connect with me via my profile page at:"] = "Kiam vi registris, bonvolu konekti al mi pere de mi profilo ĉe: ";
$a->strings["For more information about the Friendica project and why we feel it is important, please visit http://friendica.com"] = "Por pli da informoj pri Friendica, kaj kial ni pensas ke Äi estas grava, bonvolu viziti http://friendica.com";
$a->strings["This may occasionally happen if contact was requested by both persons and it has already been approved."] = "Tio ĉi okazis de tempo al tempo se ambaÅ­ personoj petas kontakton ka Äi jam estas aprobita.";
$a->strings["Response from remote site was not understood."] = "Ne komprenis la rispondon de la fora retejo.";
@@ -969,6 +970,10 @@ $a->strings["Unable to set your contact credentials on our system."] = "Ne sukce
$a->strings["Unable to update your contact profile details on our system"] = "Neeblas Äisdatigi viajn profildetalojn ĉe nia sistemo.";
$a->strings["Connection accepted at %s"] = "Konekto akceptita je %s";
$a->strings["%1\$s has joined %2\$s"] = "%1\$s aliÄis al %2\$s";
+$a->strings["Google+ Import Settings"] = "Google+ Importo";
+$a->strings["Enable Google+ Import"] = "Aktivigi Äœoogle+ Importon";
+$a->strings["Google Account ID"] = "Google Konto ID";
+$a->strings["Google+ Import Settings saved."] = "Konservis Agordojn por Google+ Importo.";
$a->strings["Facebook disabled"] = "Facebook malÅaltita";
$a->strings["Updating contacts"] = "Mi Äisdatigas la kontaktojn.";
$a->strings["Facebook API key is missing."] = "La API Ålosilo de Facebook ne estas konata ĉi tie.";
@@ -991,7 +996,7 @@ $a->strings["Problems with Facebook Real-Time Updates"] = "Problemoj kun Faceboo
$a->strings["Facebook"] = "Facebook";
$a->strings["Facebook Connector Settings"] = "Agordoj por la Facebook konektilo";
$a->strings["Facebook API Key"] = "Facebook API Ålosilo";
-$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.<br><br>"] = "Eraro: Åœajnas kvazaÅ­ vi agordis la App-ID kaj la sekreton en via .htconfig.php dosiero. Kiam ili estas agordita tie, vi ne povas agordi Äin tra tiu ĉi formo.<br><br>";
+$a->strings["Error: it appears that you have specified the App-ID and -Secret in your .htconfig.php file. As long as they are specified there, they cannot be set using this form.<br><br>"] = "Eraro: Åœajnas kvazaÅ­ vi agordis la App-ID kaj la sekreton en via .htconfig.php dosiero. Kiam ili estas agordita tie, vi ne povas agordi Äin en tiu ĉi formo.<br><br>";
$a->strings["Error: the given API Key seems to be incorrect (the application access token could not be retrieved)."] = "Eraro: La API Ålosilo aspektas malÄusta (ne eblas ricevi la programa atingoĵetono).";
$a->strings["The given API Key seems to work correctly."] = "La API Ålosilo Åajne Äuste funkcias.";
$a->strings["The correctness of the API Key could not be detected. Somthing strange's going on."] = "Ne povis kontroli la Äustecon de la API Ålosilo. Ia stranga afero okazas. ";
@@ -1012,6 +1017,9 @@ $a->strings["Facebook post failed. Queued for retry."] = "Malsukcesis afiÅi ĉe
$a->strings["Your Facebook connection became invalid. Please Re-authenticate."] = "Via Facbook konekto iÄis nevalida. Bonvolu reaÅ­tentiÄi.";
$a->strings["Facebook connection became invalid"] = "Facebook konekto iÄis nevalida.";
$a->strings["Hi %1\$s,\n\nThe connection between your accounts on %2\$s and Facebook became invalid. This usually happens after you change your Facebook-password. To enable the connection again, you have to %3\$sre-authenticate the Facebook-connector%4\$s."] = "Saluton %1\$s,\n\nla kontekto inter viaj kontoj ĉe %2\$s kaj Facebook malvalidiÄis. Tio kutime okazas post kiam via Åangas vian pasvorton ĉe Facebook. Por reaktivigi la konekto, vi bezonas %3\$sreaÅ­tentiÄi la Facebook konektilon%4\$s.";
+$a->strings["StatusNet AutoFollow settings updated."] = "Äœidatigis StatusNet AutoFollow agordojn.";
+$a->strings["StatusNet AutoFollow Settings"] = "StatusNet AutoFollow agordoj";
+$a->strings["Automatically follow any StatusNet followers/mentioners"] = "Aŭtomate sekvu ĉiujn StatusNet sekvantojn/menciantojn.";
$a->strings["Lifetime of the cache (in hours)"] = "VivodaÅ­ro de kaÅmemoro (horoj)";
$a->strings["Cache Statistics"] = "Statistikoj pri kaÅmemoro";
$a->strings["Number of items"] = "Kvanto da eroj";
@@ -1051,6 +1059,12 @@ $a->strings["NSFW Settings saved."] = "NSFW agordoj konservitaj.";
$a->strings["%s - Click to open/close"] = "%s - Klaku por malfermi/fermi";
$a->strings["Forums"] = "Forumoj";
$a->strings["show more"] = "montri pli";
+$a->strings["Forums:"] = "Forumoj:";
+$a->strings["Page settings updated."] = "PaÄajn agordojn Äisdatigita.";
+$a->strings["Page Settings"] = "PaÄaj Agordoj";
+$a->strings["How many forums to display on sidebar without paging"] = "Montri tiom da forumoj en la flanka strio sen paÄigo";
+$a->strings["Randomise Page/Forum list"] = "Hazardigi la liston de PaÄoj/Forumoj";
+$a->strings["Show pages/forums on profile page"] = "Montri paÄojn/forumojn sur la profilpaÄo";
$a->strings["Planets Settings"] = "Agordo pri Planets";
$a->strings["Enable Planets Plugin"] = "Åœalti la Planets kromprogamon";
$a->strings["Login"] = "Ensaluti";
@@ -1060,6 +1074,54 @@ $a->strings["Most active users"] = "Plej aktivaj uzantoj";
$a->strings["Latest photos"] = "Ä´usaj bildoj";
$a->strings["Latest likes"] = "Ä´usaj Åatitaĵoj";
$a->strings["event"] = "okazo";
+$a->strings["U.S. Time Format (mm/dd/YYYY)"] = "Usona datformato (mm/dd/YYYY)";
+$a->strings["German Time Format (dd.mm.YYYY)"] = "Germana datformato (dd.mm.YYYY)";
+$a->strings["Error"] = "Eraro";
+$a->strings["No access"] = "No access";
+$a->strings["New event"] = "Nova okazo";
+$a->strings["Today"] = "HodiaÅ­";
+$a->strings["Day"] = "Tago";
+$a->strings["Week"] = "Semajno";
+$a->strings["Month"] = "Monato";
+$a->strings["Reload"] = "ReÅargi";
+$a->strings["Date"] = "Dato";
+$a->strings["Not found"] = "Ne trovita";
+$a->strings["Go back to the calendar"] = "Iri reen al la kalendaro";
+$a->strings["Starts"] = "Komencas";
+$a->strings["Ends"] = "Finas";
+$a->strings["Description"] = "Priskribo";
+$a->strings["Notification"] = "Atentigo";
+$a->strings["Minutes"] = "Minutoj";
+$a->strings["Hours"] = "Horoj";
+$a->strings["Days"] = "Tagoj";
+$a->strings["before"] = "antaÅ­";
+$a->strings["Calendar Settings"] = "Kalendaraj Agordoj";
+$a->strings["Date format"] = "Datformato";
+$a->strings["Time zone"] = "Horzono";
+$a->strings["Limitations"] = "Limigoj";
+$a->strings["Warning"] = "Averto";
+$a->strings["Synchronization (iPhone, Thunderbird Lightning, Android, ...)"] = "Sinkronigo (iPhone, Thunderbird Lightning, Android, ...)";
+$a->strings["Synchronizing this calendar with the iPhone"] = "Sinkronigi tiun kalendaron kun la iPhone";
+$a->strings["Synchronizing your Friendica-Contacts with the iPhone"] = "Sinkronigi viajn Friendica kontaktojn kun la iPhone";
+$a->strings["Friendica-Contacts"] = "Friendica Kontaktoj";
+$a->strings["Your Friendica-Contacts"] = "Viaj Friendica Kontaktoj";
+$a->strings["Calendar"] = "Kalendaro";
+$a->strings["Extended calendar with CalDAV-support"] = "Etendita kalendaro kun CalDAV subteno";
+$a->strings["The database tables have been installed."] = "La tabeloj estas instalita en la datumbazo";
+$a->strings["An error occurred during the installation."] = "Eraro okazis dum instalado";
+$a->strings["No system-wide settings yet."] = "AnkoraÅ­ ne disponablas tutsistemaj agordoj";
+$a->strings["Database status"] = "Stato de datumbazo";
+$a->strings["Installed"] = "Instalita";
+$a->strings["Upgrade needed"] = "Äœisdatigo bezonata";
+$a->strings["Upgrade"] = "Äœisdatigo";
+$a->strings["Not installed"] = "Ne instalita";
+$a->strings["Install"] = "Instali";
+$a->strings["Troubleshooting"] = "Problemsolvado";
+$a->strings["Manual creation of the database tables:"] = "Mana kreado de tabeloj en la datumbazo:";
+$a->strings["Show SQL-statements"] = "Montru SQL ordonojn";
+$a->strings["Private Calendar"] = "Privata kalendaro";
+$a->strings["Friendica Events: Mine"] = "Friendica Okazoj: Miaj";
+$a->strings["Friendica Events: Contacts"] = "Friendica Okazoj: De Kontaktoj";
$a->strings["Allow to use your friendica id (%s) to connecto to external unhosted-enabled storage (like ownCloud). See <a href=\"http://www.w3.org/community/unhosted/wiki/RemoteStorage#WebFinger\">RemoteStorage WebFinger</a>"] = "Permesi vian identecon ĉe Friendica (%s) por konekti al eksteraj konservejoj subtenata de unhosted (ekz. OwnCloud). Vidu <a href=\"http://www.w3.org/community/unhosted/wiki/RemoteStorage#WebFinger\">RemoteStorage WebFinger</a>";
$a->strings["Template URL (with {category})"] = "URL adreso de Åablono (kun {category})";
$a->strings["OAuth end-point"] = "OAuth finpunkto";
@@ -1095,9 +1157,15 @@ $a->strings["Drupal site URL"] = "URL adreso de Drupal retejo";
$a->strings["Drupal site uses clean URLS"] = "Drupal retejo uzas purajn URL adresojn";
$a->strings["Post to Drupal by default"] = "DefaÅ­lte afiÅi ĉe Drupal";
$a->strings["Post from Friendica"] = "AfiÅo de Friendica";
+$a->strings["Startpage Settings"] = "StartpaÄaj Agordoj";
+$a->strings["Home page to load after login - leave blank for profile wall"] = "HejmpaÄo Åargonta post la ensaluto - Lasu malplena por profilmuro.";
+$a->strings["Examples: &quot;network&quot; or &quot;notifications/system&quot;"] = "Ekzemple: &quot;network&quot; aÅ­ &quot;notifications/system&quot;";
$a->strings["Geonames settings updated."] = "Äœidatigis la Geonames agordojn.";
$a->strings["Geonames Settings"] = "Geonames Agordoj";
$a->strings["Enable Geonames Plugin"] = "Åœalti la Geonames Kromprogramon";
+$a->strings["Your account on %s will expire in a few days."] = "Via konto ĉe %s senvalidiÄos post kelkaj tagoj.";
+$a->strings["Your Friendica account is about to expire."] = "Via konto ĉe Friendica baldaÅ­ senvalidiÄos.";
+$a->strings["Hi %1\$s,\n\nYour account on %2\$s will expire in less than five days. You may keep your account by logging in at least once every 30 days"] = "Saluton %1\$s,\n\nVia konto ĉe %2\$s senvalidiÄos post malpli ol kvin tagoj. Vi povas konservi vian konton se vi ensalutas almenaÅ­ ĉiujn 30 tagojn. ";
$a->strings["Upload a file"] = "AlÅuti dosieron";
$a->strings["Drop files here to upload"] = "Åœovmeti dosierojn ĉi tie por alÅuti ilin.";
$a->strings["Failed"] = "Malsukcesi";
@@ -1119,10 +1187,13 @@ $a->strings["Profile address of the operator."] = "La profilo de la funkciigisto
$a->strings["How to contact the operator via snail mail. You can use BBCode here."] = "Kiel poÅte kontakti la funkciigisto de la retejo. Vi eblas uzi BBCode ĉi tie.";
$a->strings["Notes"] = "Notoj";
$a->strings["Additional notes that are displayed beneath the contact information. You can use BBCode here."] = "Pli da notoj kiuj aperas sub la kontaktinformoj. Vi eblas uzi BBCode ĉi tie.";
-$a->strings["How to contact the operator via email. (will be displayed obfuscated)"] = "Kiel kontakti la funkciigiston de la retejo tra retpoÅto. (montriÄos vuale) ";
+$a->strings["How to contact the operator via email. (will be displayed obfuscated)"] = "Kiel kontakti la funkciigiston de la retejo per retpoÅto. (montriÄos vuale) ";
$a->strings["Footer note"] = "PaÄpiednoto";
$a->strings["Text for the footer. You can use BBCode here."] = "Teksto por la paÄpiedo. Vie eblas uzi BBCode ĉi tie.";
$a->strings["Report Bug"] = "Skribi cimraporton";
+$a->strings["No Timeline settings updated."] = "No Timeline agordojn Äisdatigita.";
+$a->strings["No Timeline Settings"] = "No Timeline Agordoj";
+$a->strings["Disable Archive selector on profile wall"] = "Malaktivigi la Arkivo elektilo sur la profilmuro";
$a->strings["\"Blockem\" Settings"] = "\"Blockem\" Agordoj";
$a->strings["Comma separated profile URLS to block"] = "Blokotaj URL adresoj, disigita per komo";
$a->strings["BLOCKEM Settings saved."] = "Konservis Agordojn de BLOCKEM.";
@@ -1141,6 +1212,12 @@ $a->strings["Tile Server URL"] = "Adreso de Kahelservilo";
$a->strings["A list of <a href=\"http://wiki.openstreetmap.org/wiki/TMS\" target=\"_blank\">public tile servers</a>"] = "Listo de <a href=\"http://wiki.openstreetmap.org/wiki/TMS\" target=\"_blank\">publikaj kahelserviloj</a>";
$a->strings["Default zoom"] = "DefaÅ­lta zoma faktoro";
$a->strings["The default zoom level. (1:world, 18:highest)"] = "La defaÅ­lta zoma faktoro. (1:tutmonda, 18:plej proksima)";
+$a->strings["Post to libertree"] = "AfiÅi al libertree";
+$a->strings["libertree Post Settings"] = "Agordoj por AfiÅoj ĉe libertree";
+$a->strings["Enable Libertree Post Plugin"] = "Aktivigi Kromprogramon por AfiÅoj ĉe libertree";
+$a->strings["Libertree API token"] = "Libertree API ĵetono";
+$a->strings["Libertree site URL"] = "URL adreso de libertree retejo:";
+$a->strings["Post to Libertree by default"] = "DefaÅ­lte afiÅi ĉe Libertree";
$a->strings["The MathJax addon renders mathematical formulae written using the LaTeX syntax surrounded by the usual $$ or an eqnarray block in the postings of your wall,network tab and private mail."] = "La Mathjax kromprogramo bildigas matematikajn formulojn skribitajn en la LaTeX sintakso, cirkaÅ­igita de la komuna $$ aÅ­ eqnarray bloko en afiÅoj ĉe via muro, Reto folio kaj privataj mesaÄoj.";
$a->strings["Use the MathJax renderer"] = "Ĉu uzi la Mathjax bildigilo";
$a->strings["MathJax Base URL"] = "Mathjax Baza URL Adreso";
@@ -1158,7 +1235,6 @@ $a->strings["Select default avatar image if none was found at Gravatar. See READ
$a->strings["Rating of images"] = "Pritakso de bildoj";
$a->strings["Select the appropriate avatar rating for your site. See README"] = "Elektu la Äustan pritakson de via avataro por via retejo. Vidu README.";
$a->strings["Gravatar settings updated."] = "Gravatar agordoj Äisdatigitaj.";
-$a->strings["Your account on %s will expire in a few days."] = "Via konto ĉe %s senvalidiÄos post kelkaj tagoj.";
$a->strings["Your Friendica test account is about to expire."] = "Via Friendica provkonto baldaÅ­ malaktiviÄos.";
$a->strings["Hi %1\$s,\n\nYour test account on %2\$s will expire in less than five days. We hope you enjoyed this test drive and use this opportunity to find a permanent Friendica website for your integrated social communications. A list of public sites is available at http://dir.friendica.com/siteinfo - and for more information on setting up your own Friendica server please see the Friendica project website at http://friendica.com."] = "Saluton %1\$s,\n\nVia testkonto ĉe %2\$s senvalidiÄos post malpli ol kvin tagoj. Vi esperas ke vi Äuis la teston kaj baldaÅ­ trovosÄustan Friendica retejon por via integrita sociala komunikado. Listo de publikaj retejoj troviÄas ĉe http://dir.friendica.com/siteinfo - kaj por pli da informoj pri kiel instali vian propran Friendica servilon, bonvolu viziti la retejon de la Friendica projekton ĉe http://friendica.com.";
$a->strings["\"pageheader\" Settings"] = "\"pageheader\" Agordoj";
@@ -1193,9 +1269,10 @@ $a->strings["If enabled all your <strong>public</strong> postings can be posted
$a->strings["<strong>Note</strong>: Due your privacy settings (<em>Hide your profile details from unknown viewers?</em>) the link potentially included in public postings relayed to StatusNet will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted."] = "<strong>Averto</strong>: LaÅ­ viaj privatecaj agordoj (<em>KaÅi viajn profilajn detalojn al nekonataj spektantoj?</em>), la ligilo en publikaj afiÅoj plusendata al StatusNet gvidas vizitontojn al malplena paÄo sciigante ilin ke atingo al via profilo estas lmitigita.";
$a->strings["Allow posting to StatusNet"] = "Permesi afiÅojn al StatusNet";
$a->strings["Send public postings to StatusNet by default"] = "DefaÅ­lte sendi publikajn afiÅojn al StatusNet";
-$a->strings["Send #tag links to StatusNet"] = "Sendu #marko ligilojn al StatusNet";
+$a->strings["Send linked #-tags and @-names to StatusNet"] = "Sendi ligitajn #-etikedojn kaj @-nomon al StatusNet";
$a->strings["Clear OAuth configuration"] = "ForviÅi OAuth agordojn";
$a->strings["API URL"] = "API URL adreso";
+$a->strings["Infinite Improbability Drive"] = "Senfina Probableca Pelilo";
$a->strings["Post to Tumblr"] = "AfiÅi al Tumblr";
$a->strings["Tumblr Post Settings"] = "Agordoj pri afiÅoj ĉe Tumblr";
$a->strings["Enable Tumblr Post Plugin"] = "Åœalti la kromprogramon por Tumblr afiÅoj";
@@ -1217,6 +1294,8 @@ $a->strings["WordPress username"] = "WordPress salutnomo";
$a->strings["WordPress password"] = "WordPress pasvorto";
$a->strings["WordPress API URL"] = "Wordpress API URL adreso";
$a->strings["Post to WordPress by default"] = "DefaÅ­lte afiÅi al WordPress";
+$a->strings["Provide a backlink to the Friendica post"] = "Provizi re-ligilon al la Friendica afiÅo";
+$a->strings["Read the original post and comment stream on Friendica"] = "Legi la originalan afiÅon kaj komentfluo ĉe Friendica";
$a->strings["\"Show more\" Settings"] = "\"Montri pli\" agordoj";
$a->strings["Enable Show More"] = "Åœalti \"montri pli\"";
$a->strings["Cutting posts after how much characters"] = "Limitigi afiÅojn al kiom da literoj";
@@ -1239,7 +1318,7 @@ $a->strings["If enabled all your <strong>public</strong> postings can be posted
$a->strings["<strong>Note</strong>: Due your privacy settings (<em>Hide your profile details from unknown viewers?</em>) the link potentially included in public postings relayed to Twitter will lead the visitor to a blank page informing the visitor that the access to your profile has been restricted."] = "<strong>Averto</strong>: LaÅ­ viaj privatecaj agordoj (<em>KaÅi viajn profilajn detalojn al nekonataj spektantoj?</em>), la ligilo en publikaj afiÅoj plusendata al Twitter gvidas vizitontojn al malplena paÄo sciigante ilin ke atingo al via profilo estas lmitigita.";
$a->strings["Allow posting to Twitter"] = "Permesi afiÅojn al Twitter";
$a->strings["Send public postings to Twitter by default"] = "DefaÅ­lte sendi publikajn afiÅojn al Twitter";
-$a->strings["Send #tag links to Twitter"] = "Sendu #marko ligilon al Twitter";
+$a->strings["Send linked #-tags and @-names to Twitter"] = "Sendi ligitajn #-etikedojn kaj @-nomon al Twitter";
$a->strings["Consumer key"] = "Åœlosilo de Kliento";
$a->strings["Consumer secret"] = "Sekreto de Kliento";
$a->strings["IRC Settings"] = "IRC Agordoj";
@@ -1285,19 +1364,21 @@ $a->strings["Local Directory"] = "Loka Katalogo";
$a->strings["Similar Interests"] = "Similaj Interesoj";
$a->strings["Invite Friends"] = "Inviti amikojn";
$a->strings["Earth Layers"] = "Tertavoloj (Earth Layers)";
-$a->strings["Set zoomfactor for Earth Layer"] = "Agordi zoman faktoron de Tertavolo";
-$a->strings["Set longitude (X) for Earth Layer"] = "Agordi longitudon (X) de Tertavolo";
-$a->strings["Set latitude (Y) for Earth Layer"] = "Agordi latitudon (Y) de Tertavolo";
+$a->strings["Set zoomfactor for Earth Layers"] = "Agordi zoman faktoron por Tertavoloj";
+$a->strings["Set longitude (X) for Earth Layers"] = "Agordi longitudon (X) por Tertavoloj";
+$a->strings["Set latitude (Y) for Earth Layers"] = "Agordi latitudon (Y) por Tertavoloj";
$a->strings["Help or @NewHere ?"] = "Helpu aÅ­ @NewHere ?";
$a->strings["Connect Services"] = "Konekti Servojn";
$a->strings["Last Tweets"] = "Ĵusaj Pepaĵoj";
$a->strings["Set twitter search term"] = "Agordi Twitter serĉtekston";
$a->strings["don't show"] = "kaÅi";
$a->strings["show"] = "montri";
-$a->strings["Show/hide boxes at right-hand coloumn:"] = "Montri/kaÅi kestojn en la desktra kolumno:";
+$a->strings["Show/hide boxes at right-hand column:"] = "KaÅi/montri kestojn ĉe dekstra kolumno:";
$a->strings["Set line-height for posts and comments"] = "Agordi la linigrandon por afiÅoj kaj komentoj";
$a->strings["Set resolution for middle column"] = "Agordi la distingivon por la meza kolumno";
$a->strings["Set color scheme"] = "Agordi Kolorskemon";
+$a->strings["Set zoomfactor for Earth Layer"] = "Agordi zoman faktoron de Tertavolo";
+$a->strings["Last tweets"] = "Ĵusaj pepaĵoj";
$a->strings["Alignment"] = "Äœisrandigo";
$a->strings["Left"] = "Maldekstren";
$a->strings["Center"] = "Centren";
@@ -1308,6 +1389,7 @@ $a->strings["j F"] = "j F";
$a->strings["Birthday:"] = "NaskiÄtago:";
$a->strings["Age:"] = "AÄo:";
$a->strings["Status:"] = "Stato:";
+$a->strings["for %1\$d %2\$s"] = "por %1\$d %2\$s";
$a->strings["Homepage:"] = "HejmpaÄo:";
$a->strings["Tags:"] = "Markoj:";
$a->strings["Religion:"] = "Religio:";
@@ -1401,6 +1483,7 @@ $a->strings["Starts:"] = "Ekas:";
$a->strings["Finishes:"] = "Finas:";
$a->strings["(no subject)"] = "(neniu temo)";
$a->strings["noreply"] = "nerespondi";
+$a->strings[" on Last.fm"] = " ĉe Last.fm";
$a->strings["prev"] = "antaÅ­a";
$a->strings["first"] = "unua";
$a->strings["last"] = "lasta";
@@ -1410,7 +1493,6 @@ $a->strings["%d Contact"] = array(
0 => "%d Kontakto",
1 => "%d Kontaktoj",
);
-$a->strings["Search"] = "Serĉi";
$a->strings["Monday"] = "Lundo";
$a->strings["Tuesday"] = "Mardo";
$a->strings["Wednesday"] = "Merkredo";
@@ -1444,11 +1526,11 @@ $a->strings["post"] = "afiÅo";
$a->strings["Item filed"] = "Enarkivigis elementon ";
$a->strings["Sharing notification from Diaspora network"] = "Antentigo pri kunhavigado de la Diaspora reto";
$a->strings["Attachments:"] = "Kunsendaĵoj:";
-$a->strings["[Relayed] Comment authored by %s from network %s"] = "[Plusendita] %s en la reto %s skribis komenton";
$a->strings["view full size"] = "vidi plengrande";
$a->strings["Embedded content"] = "Enigita enhavo";
$a->strings["Embedding disabled"] = "MalÅaltita enigitado";
$a->strings["A deleted group with this name was revived. Existing item permissions <strong>may</strong> apply to this group and any future members. If this is not what you intended, please create another group with a different name."] = "Revivigis malnovan grupon kun la sama nomo. Permesoj por estantaj elementoj <strong>eble</strong> estas validaj por la grupo kaj estontaj membroj. Se tiu ne estas kiun vi atendis, bonvolu krei alian grupon kun alia nomo.";
+$a->strings["Default privacy group for new contacts"] = "DefaÅ­lta privateca grupo por novaj kontaktoj";
$a->strings["Everybody"] = "Ĉiuj";
$a->strings["edit"] = "redakti";
$a->strings["Groups"] = "Grupoj";
@@ -1480,7 +1562,6 @@ $a->strings["Manage other pages"] = "Administri aliajn paÄojn";
$a->strings["Profiles"] = "Profiloj";
$a->strings["Manage/edit profiles"] = "Administri/redakti profilojn";
$a->strings["Manage/edit friends and contacts"] = "Administri/redakti amikojn kaj kontaktojn";
-$a->strings["Admin"] = "Administrado";
$a->strings["Site setup and configuration"] = "Agordoj pri la retejo";
$a->strings["Nothing new here"] = "Estas neniu nova ĉi tie";
$a->strings["Add New Contact"] = "Aldonu Novan Kontakton";
@@ -1521,6 +1602,8 @@ $a->strings["minutes"] = "minutoj";
$a->strings["second"] = "sekundo";
$a->strings["seconds"] = "sekundoj";
$a->strings["%1\$d %2\$s ago"] = "antaÅ­ %1\$d %2\$s";
+$a->strings["%s's birthday"] = "NaskiÄtago de %s";
+$a->strings["Happy Birthday %s"] = "Feliĉan NaskiÄtagon al %s";
$a->strings["From: "] = "De: ";
$a->strings["$1 wrote:"] = "$1 skribis:";
$a->strings["Image/photo"] = "Bildo";
@@ -1532,45 +1615,67 @@ $a->strings["Thank You,"] = "Dankon,";
$a->strings["%s Administrator"] = "%s Administranto";
$a->strings["%s <!item_type!>"] = "%s <!item_type!>";
$a->strings["[Friendica:Notify] New mail received at %s"] = "[Friendica:Atentigo] Ricevis novan retpoÅton ĉe %s";
-$a->strings["%s sent you a new private message at %s."] = "%s sendis novan mesaÄon al vi ĉe %s.";
-$a->strings["%s sent you %s."] = "%s sendis al vi %s.";
+$a->strings["%1\$s sent you a new private message at %2\$s."] = "%1\$s sendis al vi novan privatan mesaÄon ĉe %2\$s.";
+$a->strings["%1\$s sent you %2\$s."] = "%1\$s sendis al vi %2\$s.";
$a->strings["a private message"] = "privatan mesaÄon";
$a->strings["Please visit %s to view and/or reply to your private messages."] = "Bonvolu viziti %s por vidi aÅ­ respondi viajn privatajn mesaÄojn.";
-$a->strings["%s's"] = "de %s verkita";
-$a->strings["your"] = "via";
-$a->strings["[Friendica:Notify] Comment to conversation #%d by %s"] = "[Friendica:Atentigo] Komento pri konversacio #%d de %s";
+$a->strings["%1\$s commented on [url=%2\$s]a %3\$s[/url]"] = "%1\$s komentis pri [url=%2\$s]%3\$s[/url]";
+$a->strings["%1\$s commented on [url=%2\$s]%3\$s's %4\$s[/url]"] = "%1\$s komentis pri [url=%2\$s]%4\$s de %3\$s[/url]";
+$a->strings["%1\$s commented on [url=%2\$s]your %3\$s[/url]"] = "%1\$s komentis pri [url=%2\$s]via %3\$s[/url]";
+$a->strings["[Friendica:Notify] Comment to conversation #%1\$d by %2\$s"] = "[Friendica:Atentigo] Komento pri konversacio #%1\$d de %2\$s";
$a->strings["%s commented on an item/conversation you have been following."] = "%s komentis pri elemento/konversacio kiun vi sekvas.";
-$a->strings["%s commented on %s."] = "%s komentis pri %s.";
$a->strings["Please visit %s to view and/or reply to the conversation."] = "Bonvolu viziti %s por vidi aÅ­ respondi la konversacion.";
$a->strings["[Friendica:Notify] %s posted to your profile wall"] = "[Friendica:Atentigo] %s afiÅis al via profilmuro";
-$a->strings["%s posted to your profile wall at %s"] = "%s skribis al via profila muro ĉe %s";
-$a->strings["%s posted to %s"] = "%s afiÅis al %s";
-$a->strings["your profile wall."] = "via profilmuro.";
+$a->strings["%1\$s posted to your profile wall at %2\$s"] = "%1\$s skribis al via profilmuro ĉe %2\$s";
+$a->strings["%1\$s posted to [url=%2s]your wall[/url]"] = "%1\$s afiÅis al [url=%2s]via muro[/url]";
$a->strings["[Friendica:Notify] %s tagged you"] = "[Friendica:Atentigo] %s markis vin";
-$a->strings["%s tagged you at %s"] = "%s markis vin kiel %s";
-$a->strings["%s %s."] = "%s %s.";
-$a->strings["tagged you"] = "markis vin";
+$a->strings["%1\$s tagged you at %2\$s"] = "%1\$s markis vin ĉe %2\$s";
+$a->strings["%1\$s [url=%2\$s]tagged you[/url]."] = "%1\$s [url=%2\$s]markis vin[/url].";
$a->strings["[Friendica:Notify] %s tagged your post"] = "[Friendica:Atentigo] %s markis vian afiÅon";
-$a->strings["%s tagged your post at %s"] = "%s markis vian afiÅon kiel %s";
-$a->strings["%s tagged %s"] = "%s markis %s";
-$a->strings["your post"] = "vian afiÅon";
+$a->strings["%1\$s tagged your post at %2\$s"] = "%1\$s markis vian afiÅon ĉe %2\$s";
+$a->strings["%1\$s tagged [url=%2\$s]your post[/url]"] = "%1\$s markis [url=%2\$s]vian afiÅon[/url]";
$a->strings["[Friendica:Notify] Introduction received"] = "[Friendica:Atentigo] Ricevis prezenton";
-$a->strings["You've received an introduction from '%s' at %s"] = "Vi ricevis prezento de '%s' ĉe %s";
-$a->strings["You've received %s from %s."] = "Vi ricevis %s de %s.";
-$a->strings["an introduction"] = "prezenton";
+$a->strings["You've received an introduction from '%1\$s' at %2\$s"] = "Vi ricevis prezenton de '%1\$s' ĉe %2\$s";
+$a->strings["You've received [url=%1\$s]an introduction[/url] from %2\$s."] = "Vi ricevis [url=%1\$s]prezenton[/url] de %2\$s.";
$a->strings["You may visit their profile at %s"] = "Vi povas vidi la profilon de li aÅ­ Åi ĉe %s";
$a->strings["Please visit %s to approve or reject the introduction."] = "Bonvolu viziti %s por aprobi aÅ­ malaprobi la prezenton.";
$a->strings["[Friendica:Notify] Friend suggestion received"] = "[Friendica:Atentigo] Ricevis amikosugeston";
-$a->strings["You've received a friend suggestion from '%s' at %s"] = "'%s' ĉe %s rekomendis amikon al vi";
-$a->strings["You've received %s for %s from %s."] = "Vi ricevis %s kun %s de %s.";
-$a->strings["a friend suggestion"] = "sugeston por amikiÄi";
+$a->strings["You've received a friend suggestion from '%1\$s' at %2\$s"] = "Vi ricevis amikosugeston de '%1\$s' ĉe %2\$s";
+$a->strings["You've received [url=%1\$s]a friend suggestion[/url] for %2\$s from %3\$s."] = "Vi ricevis [url=%1\$s]amikosugeston[/url] pri %2\$s de %3\$s.";
$a->strings["Name:"] = "Nomo:";
$a->strings["Photo:"] = "Bildo:";
$a->strings["Please visit %s to approve or reject the suggestion."] = "Bonvolu viziti %s por aprobi aÅ­ malaprobi la sugeston.";
+$a->strings["Connect URL missing."] = "Ne ekzistas URL adreso por konekti.";
+$a->strings["This site is not configured to allow communications with other networks."] = "Tiu retpaÄo ne permesas komunikadon kun aliaj retoj.";
+$a->strings["No compatible communication protocols or feeds were discovered."] = "Ne malkovris kongruajn protokolojn por komunikado aÅ­ fluojn.";
+$a->strings["The profile address specified does not provide adequate information."] = "La specifita profiladreso ne enhavas sufiĉe da informoj.";
+$a->strings["An author or name was not found."] = "Ne trovis aÅ­toron aÅ­ nomon.";
+$a->strings["No browser URL could be matched to this address."] = "Neniu retuma URL adreso kongruas al la adreso.";
+$a->strings["Unable to match @-style Identity Address with a known protocol or email contact."] = "Ne eblas kongrui @-stilan identecon adreson al iu konata protokolo au retpoÅtadreso.";
+$a->strings["Use mailto: in front of address to force email check."] = "Uzu mailto: antaÅ­ la adreso por devigi la testadon per retpoÅto.";
+$a->strings["The profile address specified belongs to a network which has been disabled on this site."] = "Tiu profila adreso apartenas al retejo kiu estas maÅaltita je ĉi tiu retejo.";
+$a->strings["Limited profile. This person will be unable to receive direct/personal notifications from you."] = "Profilo limigata. Ĉi persono ne eblos ricevi rektajn/personajn atentigojn de vi. ";
+$a->strings["Unable to retrieve contact information."] = "Ne eblas ricevi kontaktinformojn.";
+$a->strings["following"] = "sekvanta";
$a->strings["A new person is sharing with you at "] = "Nova persono kunhavigas kun vi ĉe ";
$a->strings["You have a new follower at "] = "Vi havas novan sekvanton ĉe ";
-$a->strings["image/photo"] = "bildo";
-$a->strings["link"] = "ligilo";
+$a->strings["Archives"] = "Arkivoj";
+$a->strings["An invitation is required."] = "Invio bezonata.";
+$a->strings["Invitation could not be verified."] = "Ne povis kontroli la inviton.";
+$a->strings["Invalid OpenID url"] = "Nevalida OpenID adreso";
+$a->strings["Please enter the required information."] = "Bonvolu entajpi la bezonatajn informojn.";
+$a->strings["Please use a shorter name."] = "Bonvolu uzi pli mallongan nomon.";
+$a->strings["Name too short."] = "Nomo estas tro mallonga.";
+$a->strings["That doesn't appear to be your full (First Last) name."] = "Tio Åajne ne estas via plena (persona, familia) nomo.";
+$a->strings["Your email domain is not among those allowed on this site."] = "Via retpoÅtodomajno ne estas permesita ĉi tie.";
+$a->strings["Not a valid email address."] = "Nevalida retpoÅtadreso.";
+$a->strings["Cannot use that email."] = "Neuzebla retpoÅtadreso.";
+$a->strings["Your \"nickname\" can only contain \"a-z\", \"0-9\", \"-\", and \"_\", and must also begin with a letter."] = "Via kaÅnomo nur povas enhavi \"a-z\", \"0-9\", \"-\", kaj \"_\". Äœi ankaÅ­ devas komenci kun litero.";
+$a->strings["Nickname is already registered. Please choose another."] = "Tio kaÅnomo jam estas registrita. Bonvolu elekti alian.";
+$a->strings["Nickname was once registered here and may not be re-used. Please choose another."] = "Tiu kaÅnomo iam estis registrita ĉi tie kaj ne ree uzeblas. Bonvolu elekti alian.";
+$a->strings["SERIOUS ERROR: Generation of security keys failed."] = "GRAVA ERARO: La generacio de sekurecaj ĉifroÅlosiloj malsukcesis.";
+$a->strings["An error occurred during registration. Please try again."] = "Eraro okazis dum registrado. Bonvolu provi denove.";
+$a->strings["An error occurred creating your default profile. Please try again."] = "Eraro okazi dum kreado de via defaÅ­lta profilo. Bonvolu provi denove.";
$a->strings["Welcome "] = "Bonvenon ";
$a->strings["Please upload a profile photo."] = "Bonvolu alÅuti profilbildon.";
$a->strings["Welcome back "] = "Bonvenon ";
@@ -1612,7 +1717,7 @@ $a->strings["add tag"] = "aldoni markon";
$a->strings["save to folder"] = "konservi en dosierujo";
$a->strings["to"] = "al";
$a->strings["Wall-to-Wall"] = "Muro-al-Muro";
-$a->strings["via Wall-To-Wall:"] = "tra Muro-al-Muro:";
+$a->strings["via Wall-To-Wall:"] = "per Muro-al-Muro:";
$a->strings["Delete Selected Items"] = "ForviÅi Elektitajn Elementojn";
$a->strings["%s likes this."] = "%s Åatas tiun.";
$a->strings["%s doesn't like this."] = "%s malÅatas tiun.";
@@ -1637,6 +1742,9 @@ $a->strings["audio link"] = "sono ligilo";
$a->strings["set location"] = "agordi lokon";
$a->strings["clear location"] = "forviÅi lokon";
$a->strings["permissions"] = "permesoj";
+$a->strings["Click here to upgrade."] = "Klaku ĉi tie por Äisdatigi.";
+$a->strings["This action exceeds the limits set by your subscription plan."] = "Tia ago preterpasas la limojn de via abono.";
+$a->strings["This action is not available under your subscription plan."] = "Tia ago ne estas permesita laÅ­ via abono.";
$a->strings["Delete this item?"] = "ForviÅi ĉi tiun elementon?";
$a->strings["show fewer"] = "montri malpli";
$a->strings["Update %s failed. See error logs."] = "Malsukcesis Äisdatigi %s. Vidu la protokolojn.";
diff --git a/view/event_form.tpl b/view/event_form.tpl
index 7d5f8cf4a..536c52b0f 100644
--- a/view/event_form.tpl
+++ b/view/event_form.tpl
@@ -26,6 +26,10 @@ $f_dsel $f_tsel
<div id="event-adjust-break"></div>
+<div id="event-summary-text">$t_text</div>
+<input type="text" id="event-summary" name="summary" value="$t_orig" />
+
+
<div id="event-desc-text">$d_text</div>
<textarea id="event-desc-textarea" name="desc">$d_orig</textarea>
diff --git a/view/photos_upload.tpl b/view/photos_upload.tpl
index 318a92427..706b3398d 100644
--- a/view/photos_upload.tpl
+++ b/view/photos_upload.tpl
@@ -1,4 +1,7 @@
<h3>$pagename</h3>
+
+<div id="photos-usage-message">$usage</div>
+
<form action="photos/$nickname" enctype="multipart/form-data" method="post" name="photos-upload-form" id="photos-upload-form" >
<div id="photos-upload-new-wrapper" >
<div id="photos-upload-newalbum-div">
diff --git a/view/profile_advanced.tpl b/view/profile_advanced.tpl
index 0b8f31f43..b02b7f27d 100644
--- a/view/profile_advanced.tpl
+++ b/view/profile_advanced.tpl
@@ -89,6 +89,19 @@
</dl>
{{ endif }}
+{{ if $profile.likes }}
+<dl id="aprofile-likes" class="aprofile">
+ <dt>$profile.likes.0</dt>
+ <dd>$profile.likes.1</dd>
+</dl>
+{{ endif }}
+
+{{ if $profile.dislikes }}
+<dl id="aprofile-dislikes" class="aprofile">
+ <dt>$profile.dislikes.0</dt>
+ <dd>$profile.dislikes.1</dd>
+</dl>
+{{ endif }}
{{ if $profile.contact }}
<dl id="aprofile-contact" class="aprofile">
diff --git a/view/profile_edit.tpl b/view/profile_edit.tpl
index ad34b9956..64cd47324 100644
--- a/view/profile_edit.tpl
+++ b/view/profile_edit.tpl
@@ -187,6 +187,30 @@ $lbl_hobbies
</div>
+<div id="likes-jot-wrapper" >
+<p id="likes-jot-desc" >
+$lbl_likes
+</p>
+
+<textarea rows="10" cols="72" id="likes-jot-text" name="likes" >$likes</textarea>
+
+</div>
+<div id="likes-jot-end"></div>
+</div>
+
+
+<div id="dislikes-jot-wrapper" >
+<p id="dislikes-jot-desc" >
+$lbl_dislikes
+</p>
+
+<textarea rows="10" cols="72" id="dislikes-jot-text" name="dislikes" >$dislikes</textarea>
+
+</div>
+<div id="dislikes-jot-end"></div>
+</div>
+
+
<div id="contact-jot-wrapper" >
<p id="contact-jot-desc" >
$lbl_social
diff --git a/view/theme/darkzero-NS/style.css b/view/theme/darkzero-NS/style.css
index 9c15329da..5d1bb6310 100644
--- a/view/theme/darkzero-NS/style.css
+++ b/view/theme/darkzero-NS/style.css
@@ -113,7 +113,7 @@ input#acl-search {
.notify-seen {
- background:#666;
+ background:#111;
}
#nav-notifications-menu {
@@ -157,4 +157,27 @@ blockquote {
#datebrowse-sidebar select {
color:#99CCFF !important;
-} \ No newline at end of file
+}
+
+.settings-widget .selected {
+background: #666;
+}
+
+#adminpage table tr:hover {
+ color: #eec;
+ background-color: #666;
+}
+
+input#prvmail-subject {
+background: #222 !important;
+}
+
+/* Events */
+
+.fc-state-highlight {
+background: #666 !important;
+}
+
+.fc-state-disabled, .fc-state-disabled .fc-button-inner {
+color: #000 !important;
+}
diff --git a/view/theme/darkzero/style.css b/view/theme/darkzero/style.css
index 8a6099ee8..55644e462 100644
--- a/view/theme/darkzero/style.css
+++ b/view/theme/darkzero/style.css
@@ -111,9 +111,8 @@ input#acl-search {
}
-
.notify-seen {
- background:#666;
+ background:#111;
}
#nav-notifications-menu {
@@ -138,7 +137,7 @@ blockquote {
color:#eec !important;
}
-.group-selected, .nets-selected, .fileas-selected, .categories-selected {
+.group-selected, .nets-selected, .fileas-selected, .categories-selected{
background:#2e2f2e;
}
@@ -146,11 +145,33 @@ blockquote {
background:#444;
}
-/* This seems okay to me...we might not need a new iconset, lets see how people react */
.editicon {
background-color: #333;
}
#datebrowse-sidebar select {
color:#99CCFF !important;
-} \ No newline at end of file
+}
+
+.settings-widget .selected {
+background: #666;
+}
+
+#adminpage table tr:hover {
+ color: #eec;
+ background-color: #666;
+}
+
+input#prvmail-subject {
+background: #222 !important;
+}
+
+/* Events */
+
+.fc-state-highlight {
+background: #666 !important;
+}
+
+.fc-state-disabled, .fc-state-disabled .fc-button-inner {
+color: #000 !important;
+}
diff --git a/view/theme/diabook/diabook-aerith/style-wide.css b/view/theme/diabook/diabook-aerith/style-wide.css
index 43c0974b1..98c645024 100644
--- a/view/theme/diabook/diabook-aerith/style-wide.css
+++ b/view/theme/diabook/diabook-aerith/style-wide.css
@@ -2822,6 +2822,35 @@ float: left;
/* = Directory = */
/* ============= */
/* contacts menu */
+section .directory-item dl {
+height: auto;
+overflow: auto;
+}
+
+section .directory-item dt {
+float: left;
+margin-left: 0px;
+text-align: right;
+color: #999;
+}
+
+section .directory-item dd {
+float: left;
+margin-left: 5px;
+}
+
+.directory-profile-wrapper {
+float: left;
+max-height: 178px;
+overflow: hidden;
+width: 635px;
+}
+
+.directory-copy-wrapper {
+float:left;
+overflow: hidden;
+}
+
.contact-photo-wrapper {
position: relative;
}
@@ -2862,13 +2891,20 @@ float: left;
}
.directory-item {
float: left;
- width: 200px;
+ width: 800px;
height: 200px;
}
.directory-item .contact-photo {
width: 175px;
height: 175px;
}
+
+section .directory-photo-wrapper {
+float: left;
+height: 200px;
+width: 165px;
+}
+
.directory-item .contact-photo img {
width: 175px;
height: 175px;
diff --git a/view/theme/diabook/diabook-aerith/style.css b/view/theme/diabook/diabook-aerith/style.css
index b512c8bfe..630b331e9 100644
--- a/view/theme/diabook/diabook-aerith/style.css
+++ b/view/theme/diabook/diabook-aerith/style.css
@@ -2808,6 +2808,30 @@ float: left;
/* ============= */
/* = Directory = */
/* ============= */
+section .directory-item dl {
+ height: auto;
+ overflow: auto;
+}
+section .directory-item dt {
+ float: left;
+ margin-left: 0px;
+ text-align: right;
+ color: #999;
+}
+section .directory-item dd {
+ float: left;
+ margin-left: 5px;
+}
+.directory-profile-wrapper {
+ float: left;
+ max-height: 178px;
+ overflow: hidden;
+ width: 635px;
+}
+.directory-copy-wrapper {
+ float: left;
+ overflow: hidden;
+}
/* contacts menu */
.contact-photo-wrapper {
position: relative;
@@ -2849,7 +2873,7 @@ float: left;
}
.directory-item {
float: left;
- width: 200px;
+ width: 800px;
height: 200px;
}
.directory-item .contact-photo {
@@ -2860,17 +2884,42 @@ float: left;
width: 175px;
height: 175px;
}
+
+section .directory-photo-wrapper {
+ float: left;
+ height: 200px;
+ width: 165px;
+}
.contact-name {
- text-align: left;
font-weight: bold;
- font-size: 12px;
+ font-size: 18px;
+ margin-bottom: -3px;
+ text-align: left;
}
.contact-details {
color: #999999;
}
+.page-type {
+ font-size: 10px;
+ font-style: italic;
+}
+.directory-detailscolumn-wrapper {
+ float: left;
+ width: 305px;
+ margin-right: 10px;
+}
+.directory-profile-wrapper dl {
+ margin-top: 3px;
+ margin-bottom: 3px;
+}
+.directory-profile-title {
+ font-weight: bold;
+ margin-bottom: 3px;
+ font-size: 14px;
+}
#side-bar-photos-albums{
margin-top: 15px;
- }
+}
.photo-top-photo, .photo-album-photo {
-webkit-border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
diff --git a/view/theme/diabook/diabook-blue/style-wide.css b/view/theme/diabook/diabook-blue/style-wide.css
index 103047f32..fe1e8f662 100644
--- a/view/theme/diabook/diabook-blue/style-wide.css
+++ b/view/theme/diabook/diabook-blue/style-wide.css
@@ -2778,6 +2778,35 @@ float: left;
/* = Directory = */
/* ============= */
/* contacts menu */
+section .directory-item dl {
+height: auto;
+overflow: auto;
+}
+
+section .directory-item dt {
+float: left;
+margin-left: 0px;
+text-align: right;
+color: #999;
+}
+
+section .directory-item dd {
+float: left;
+margin-left: 5px;
+}
+
+.directory-profile-wrapper {
+float: left;
+max-height: 178px;
+overflow: hidden;
+width: 635px;
+}
+
+.directory-copy-wrapper {
+float:left;
+overflow: hidden;
+}
+
.contact-photo-wrapper {
position: relative;
}
@@ -2818,7 +2847,7 @@ float: left;
}
.directory-item {
float: left;
- width: 200px;
+ width: 800px;
height: 200px;
}
.directory-item .contact-photo {
@@ -2829,14 +2858,47 @@ float: left;
width: 175px;
height: 175px;
}
+
+section .directory-photo-wrapper {
+float: left;
+height: 200px;
+width: 165px;
+}
+
.contact-name {
text-align: left;
font-weight: bold;
- font-size: 12px;
+ font-size: 18px;
+ margin-bottom: -3px;
}
.contact-details {
color: #999999;
}
+
+
+.page-type {
+font-size: 10px;
+font-style: italic;
+}
+
+.directory-detailscolumn-wrapper {
+float: left;
+width: 305px;
+margin-right: 10px;
+}
+
+.directory-profile-wrapper d1 {
+margin-top: 3px;
+margin-bottom: 3px;
+}
+
+.directory-profile-title {
+font-weight: bold;
+margin-bottom: 3px
+font-size: 14px;
+}
+
+
#side-bar-photos-albums{
margin-top: 15px;
}
diff --git a/view/theme/diabook/diabook-blue/style.css b/view/theme/diabook/diabook-blue/style.css
index e7f3fd0bc..952f90775 100644
--- a/view/theme/diabook/diabook-blue/style.css
+++ b/view/theme/diabook/diabook-blue/style.css
@@ -2766,6 +2766,30 @@ float: left;
/* ============= */
/* = Directory = */
/* ============= */
+section .directory-item dl {
+ height: auto;
+ overflow: auto;
+}
+section .directory-item dt {
+ float: left;
+ margin-left: 0px;
+ text-align: right;
+ color: #999;
+}
+section .directory-item dd {
+ float: left;
+ margin-left: 5px;
+}
+.directory-profile-wrapper {
+ float: left;
+ max-height: 178px;
+ overflow: hidden;
+ width: 635px;
+}
+.directory-copy-wrapper {
+ float: left;
+ overflow: hidden;
+}
/* contacts menu */
.contact-photo-wrapper {
position: relative;
@@ -2807,7 +2831,7 @@ float: left;
}
.directory-item {
float: left;
- width: 200px;
+ width: 800px;
height: 200px;
}
.directory-item .contact-photo {
@@ -2818,17 +2842,42 @@ float: left;
width: 175px;
height: 175px;
}
+
+section .directory-photo-wrapper {
+ float: left;
+ height: 200px;
+ width: 165px;
+}
.contact-name {
- text-align: left;
font-weight: bold;
- font-size: 12px;
+ font-size: 18px;
+ margin-bottom: -3px;
+ text-align: left;
}
.contact-details {
color: #999999;
}
+.page-type {
+ font-size: 10px;
+ font-style: italic;
+}
+.directory-detailscolumn-wrapper {
+ float: left;
+ width: 305px;
+ margin-right: 10px;
+}
+.directory-profile-wrapper dl {
+ margin-top: 3px;
+ margin-bottom: 3px;
+}
+.directory-profile-title {
+ font-weight: bold;
+ margin-bottom: 3px;
+ font-size: 14px;
+}
#side-bar-photos-albums{
margin-top: 15px;
- }
+}
.photo-top-photo, .photo-album-photo {
-webkit-border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
diff --git a/view/theme/diabook/diabook-dark/style.css b/view/theme/diabook/diabook-dark/style.css
index 189bd30bf..5ef9398ec 100644
--- a/view/theme/diabook/diabook-dark/style.css
+++ b/view/theme/diabook/diabook-dark/style.css
@@ -2780,6 +2780,30 @@ float: left;
/* ============= */
/* = Directory = */
/* ============= */
+section .directory-item dl {
+ height: auto;
+ overflow: auto;
+}
+section .directory-item dt {
+ float: left;
+ margin-left: 0px;
+ text-align: right;
+ color: #999;
+}
+section .directory-item dd {
+ float: left;
+ margin-left: 5px;
+}
+.directory-profile-wrapper {
+ float: left;
+ max-height: 178px;
+ overflow: hidden;
+ width: 635px;
+}
+.directory-copy-wrapper {
+ float: left;
+ overflow: hidden;
+}
/* contacts menu */
.contact-photo-wrapper {
position: relative;
@@ -2821,7 +2845,7 @@ float: left;
}
.directory-item {
float: left;
- width: 200px;
+ width: 800px;
height: 200px;
}
.directory-item .contact-photo {
@@ -2832,17 +2856,42 @@ float: left;
width: 175px;
height: 175px;
}
+
+section .directory-photo-wrapper {
+ float: left;
+ height: 200px;
+ width: 165px;
+}
.contact-name {
- text-align: left;
font-weight: bold;
- font-size: 12px;
+ font-size: 18px;
+ margin-bottom: -3px;
+ text-align: left;
}
.contact-details {
color: #999999;
}
+.page-type {
+ font-size: 10px;
+ font-style: italic;
+}
+.directory-detailscolumn-wrapper {
+ float: left;
+ width: 305px;
+ margin-right: 10px;
+}
+.directory-profile-wrapper dl {
+ margin-top: 3px;
+ margin-bottom: 3px;
+}
+.directory-profile-title {
+ font-weight: bold;
+ margin-bottom: 3px;
+ font-size: 14px;
+}
#side-bar-photos-albums{
margin-top: 15px;
- }
+}
.photo-top-photo, .photo-album-photo {
-webkit-border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
diff --git a/view/theme/diabook/diabook-green/style-wide.css b/view/theme/diabook/diabook-green/style-wide.css
index 0a9c5e35c..107bec8bb 100644
--- a/view/theme/diabook/diabook-green/style-wide.css
+++ b/view/theme/diabook/diabook-green/style-wide.css
@@ -2799,6 +2799,35 @@ float: left;
/* = Directory = */
/* ============= */
/* contacts menu */
+section .directory-item dl {
+height: auto;
+overflow: auto;
+}
+
+section .directory-item dt {
+float: left;
+margin-left: 0px;
+text-align: right;
+color: #999;
+}
+
+section .directory-item dd {
+float: left;
+margin-left: 5px;
+}
+
+.directory-profile-wrapper {
+float: left;
+max-height: 178px;
+overflow: hidden;
+width: 635px;
+}
+
+.directory-copy-wrapper {
+float:left;
+overflow: hidden;
+}
+
.contact-photo-wrapper {
position: relative;
}
@@ -2839,13 +2868,20 @@ float: left;
}
.directory-item {
float: left;
- width: 200px;
+ width: 800px;
height: 200px;
}
.directory-item .contact-photo {
width: 175px;
height: 175px;
}
+
+section .directory-photo-wrapper {
+float: left;
+height: 200px;
+width: 165px;
+}
+
.directory-item .contact-photo img {
width: 175px;
height: 175px;
diff --git a/view/theme/diabook/diabook-green/style.css b/view/theme/diabook/diabook-green/style.css
index 762310e4d..e1993764e 100644
--- a/view/theme/diabook/diabook-green/style.css
+++ b/view/theme/diabook/diabook-green/style.css
@@ -2795,6 +2795,30 @@ float: left;
/* ============= */
/* = Directory = */
/* ============= */
+section .directory-item dl {
+ height: auto;
+ overflow: auto;
+}
+section .directory-item dt {
+ float: left;
+ margin-left: 0px;
+ text-align: right;
+ color: #999;
+}
+section .directory-item dd {
+ float: left;
+ margin-left: 5px;
+}
+.directory-profile-wrapper {
+ float: left;
+ max-height: 178px;
+ overflow: hidden;
+ width: 635px;
+}
+.directory-copy-wrapper {
+ float: left;
+ overflow: hidden;
+}
/* contacts menu */
.contact-photo-wrapper {
position: relative;
@@ -2836,7 +2860,7 @@ float: left;
}
.directory-item {
float: left;
- width: 200px;
+ width: 800px;
height: 200px;
}
.directory-item .contact-photo {
@@ -2847,17 +2871,42 @@ float: left;
width: 175px;
height: 175px;
}
+
+section .directory-photo-wrapper {
+ float: left;
+ height: 200px;
+ width: 165px;
+}
.contact-name {
- text-align: left;
font-weight: bold;
- font-size: 12px;
+ font-size: 18px;
+ margin-bottom: -3px;
+ text-align: left;
}
.contact-details {
color: #999999;
}
+.page-type {
+ font-size: 10px;
+ font-style: italic;
+}
+.directory-detailscolumn-wrapper {
+ float: left;
+ width: 305px;
+ margin-right: 10px;
+}
+.directory-profile-wrapper dl {
+ margin-top: 3px;
+ margin-bottom: 3px;
+}
+.directory-profile-title {
+ font-weight: bold;
+ margin-bottom: 3px;
+ font-size: 14px;
+}
#side-bar-photos-albums{
margin-top: 15px;
- }
+}
.photo-top-photo, .photo-album-photo {
-webkit-border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
diff --git a/view/theme/diabook/diabook-pink/style-wide.css b/view/theme/diabook/diabook-pink/style-wide.css
index e85c58850..df25c4d17 100644
--- a/view/theme/diabook/diabook-pink/style-wide.css
+++ b/view/theme/diabook/diabook-pink/style-wide.css
@@ -2799,6 +2799,36 @@ float: left;
/* = Directory = */
/* ============= */
/* contacts menu */
+
+section .directory-item dl {
+height: auto;
+overflow: auto;
+}
+
+section .directory-item dt {
+float: left;
+margin-left: 0px;
+text-align: right;
+color: #999;
+}
+
+section .directory-item dd {
+float: left;
+margin-left: 5px;
+}
+
+.directory-profile-wrapper {
+float: left;
+max-height: 178px;
+overflow: hidden;
+width: 635px;
+}
+
+.directory-copy-wrapper {
+float:left;
+overflow: hidden;
+}
+
.contact-photo-wrapper {
position: relative;
}
@@ -2839,7 +2869,7 @@ float: left;
}
.directory-item {
float: left;
- width: 200px;
+ width: 800px;
height: 200px;
}
.directory-item .contact-photo {
@@ -2850,14 +2880,46 @@ float: left;
width: 175px;
height: 175px;
}
+
+section .directory-photo-wrapper {
+float: left;
+height: 200px;
+width: 165px;
+}
+
.contact-name {
text-align: left;
font-weight: bold;
- font-size: 12px;
+ font-size: 18px;
+ margin-bottom: -3px;
}
.contact-details {
color: #999999;
}
+
+.page-type {
+font-size: 10px;
+font-style: italic;
+}
+
+.directory-detailscolumn-wrapper {
+float: left;
+width: 305px;
+margin-right: 10px;
+}
+
+.directory-profile-wrapper d1 {
+margin-top: 3px;
+margin-bottom: 3px;
+}
+
+.directory-profile-title {
+font-weight: bold;
+margin-bottom: 3px
+font-size: 14px;
+}
+
+
#side-bar-photos-albums{
margin-top: 15px;
}
diff --git a/view/theme/diabook/diabook-pink/style.css b/view/theme/diabook/diabook-pink/style.css
index 248e3ead0..e9bcd53d0 100644
--- a/view/theme/diabook/diabook-pink/style.css
+++ b/view/theme/diabook/diabook-pink/style.css
@@ -2795,6 +2795,30 @@ float: left;
/* ============= */
/* = Directory = */
/* ============= */
+section .directory-item dl {
+ height: auto;
+ overflow: auto;
+}
+section .directory-item dt {
+ float: left;
+ margin-left: 0px;
+ text-align: right;
+ color: #999;
+}
+section .directory-item dd {
+ float: left;
+ margin-left: 5px;
+}
+.directory-profile-wrapper {
+ float: left;
+ max-height: 178px;
+ overflow: hidden;
+ width: 635px;
+}
+.directory-copy-wrapper {
+ float: left;
+ overflow: hidden;
+}
/* contacts menu */
.contact-photo-wrapper {
position: relative;
@@ -2836,7 +2860,7 @@ float: left;
}
.directory-item {
float: left;
- width: 200px;
+ width: 800px;
height: 200px;
}
.directory-item .contact-photo {
@@ -2847,17 +2871,42 @@ float: left;
width: 175px;
height: 175px;
}
+
+section .directory-photo-wrapper {
+ float: left;
+ height: 200px;
+ width: 165px;
+}
.contact-name {
- text-align: left;
font-weight: bold;
- font-size: 12px;
+ font-size: 18px;
+ margin-bottom: -3px;
+ text-align: left;
}
.contact-details {
color: #999999;
}
+.page-type {
+ font-size: 10px;
+ font-style: italic;
+}
+.directory-detailscolumn-wrapper {
+ float: left;
+ width: 305px;
+ margin-right: 10px;
+}
+.directory-profile-wrapper dl {
+ margin-top: 3px;
+ margin-bottom: 3px;
+}
+.directory-profile-title {
+ font-weight: bold;
+ margin-bottom: 3px;
+ font-size: 14px;
+}
#side-bar-photos-albums{
margin-top: 15px;
- }
+}
.photo-top-photo, .photo-album-photo {
-webkit-border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
diff --git a/view/theme/diabook/diabook-red/style-wide.css b/view/theme/diabook/diabook-red/style-wide.css
index b068a2f5d..b05156dc6 100644
--- a/view/theme/diabook/diabook-red/style-wide.css
+++ b/view/theme/diabook/diabook-red/style-wide.css
@@ -2805,6 +2805,35 @@ float: left;
/* = Directory = */
/* ============= */
/* contacts menu */
+section .directory-item dl {
+height: auto;
+overflow: auto;
+}
+
+section .directory-item dt {
+float: left;
+margin-left: 0px;
+text-align: right;
+color: #999;
+}
+
+section .directory-item dd {
+float: left;
+margin-left: 5px;
+}
+
+.directory-profile-wrapper {
+float: left;
+max-height: 178px;
+overflow: hidden;
+width: 635px;
+}
+
+.directory-copy-wrapper {
+float:left;
+overflow: hidden;
+}
+
.contact-photo-wrapper {
position: relative;
}
@@ -2845,13 +2874,20 @@ float: left;
}
.directory-item {
float: left;
- width: 200px;
+ width: 800px;
height: 200px;
}
.directory-item .contact-photo {
width: 175px;
height: 175px;
}
+
+section .directory-photo-wrapper {
+float: left;
+height: 200px;
+width: 165px;
+}
+
.directory-item .contact-photo img {
width: 175px;
height: 175px;
diff --git a/view/theme/diabook/diabook-red/style.css b/view/theme/diabook/diabook-red/style.css
index 37e26b8b9..72592168b 100644
--- a/view/theme/diabook/diabook-red/style.css
+++ b/view/theme/diabook/diabook-red/style.css
@@ -2793,6 +2793,30 @@ float: left;
/* ============= */
/* = Directory = */
/* ============= */
+section .directory-item dl {
+ height: auto;
+ overflow: auto;
+}
+section .directory-item dt {
+ float: left;
+ margin-left: 0px;
+ text-align: right;
+ color: #999;
+}
+section .directory-item dd {
+ float: left;
+ margin-left: 5px;
+}
+.directory-profile-wrapper {
+ float: left;
+ max-height: 178px;
+ overflow: hidden;
+ width: 635px;
+}
+.directory-copy-wrapper {
+ float: left;
+ overflow: hidden;
+}
/* contacts menu */
.contact-photo-wrapper {
position: relative;
@@ -2834,7 +2858,7 @@ float: left;
}
.directory-item {
float: left;
- width: 200px;
+ width: 800px;
height: 200px;
}
.directory-item .contact-photo {
@@ -2845,17 +2869,42 @@ float: left;
width: 175px;
height: 175px;
}
+
+section .directory-photo-wrapper {
+ float: left;
+ height: 200px;
+ width: 165px;
+}
.contact-name {
- text-align: left;
font-weight: bold;
- font-size: 12px;
+ font-size: 18px;
+ margin-bottom: -3px;
+ text-align: left;
}
.contact-details {
color: #999999;
}
+.page-type {
+ font-size: 10px;
+ font-style: italic;
+}
+.directory-detailscolumn-wrapper {
+ float: left;
+ width: 305px;
+ margin-right: 10px;
+}
+.directory-profile-wrapper dl {
+ margin-top: 3px;
+ margin-bottom: 3px;
+}
+.directory-profile-title {
+ font-weight: bold;
+ margin-bottom: 3px;
+ font-size: 14px;
+}
#side-bar-photos-albums{
margin-top: 15px;
- }
+}
.photo-top-photo, .photo-album-photo {
-webkit-border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
diff --git a/view/theme/diabook/directory_item.tpl b/view/theme/diabook/directory_item.tpl
index bc2af16c2..70d197955 100644
--- a/view/theme/diabook/directory_item.tpl
+++ b/view/theme/diabook/directory_item.tpl
@@ -3,9 +3,40 @@
<div class="directory-photo-wrapper" id="directory-photo-wrapper-$id" >
<div class="directory-photo" id="directory-photo-$id" >
<a href="$profile-link" class="directory-profile-link" id="directory-profile-link-$id" >
- <img class="directory-photo-img" src="$photo" alt="$alt-text" title="$alt-text" />
+ <img class="directory-photo-img photo" src="$photo" alt="$alt-text" title="$alt-text" />
</a>
</div>
</div>
- <div class="contact-name" id="directory-name-$id">$name</div>
+ <div class="directory-profile-wrapper" id="directory-profile-wrapper-$id" >
+ <div class="contact-name" id="directory-name-$id">$name</div>
+ <div class="page-type">$page-type</div>
+ {{ if $pdesc }}<div class="directory-profile-title">$profile.pdesc</div>{{ endif }}
+ <div class="directory-detailcolumns-wrapper" id="directory-detailcolumns-wrapper-$id">
+ <div class="directory-detailscolumn-wrapper" id="directory-detailscolumn1-wrapper-$id">
+ {{ if $location }}
+ <dl class="location"><dt class="location-label">$location</dt>
+ <dd class="adr">
+ {{ if $profile.address }}<div class="street-address">$profile.address</div>{{ endif }}
+ <span class="city-state-zip">
+ <span class="locality">$profile.locality</span>{{ if $profile.locality }}, {{ endif }}
+ <span class="region">$profile.region</span>
+ <span class="postal-code">$profile.postal-code</span>
+ </span>
+ {{ if $profile.country-name }}<span class="country-name">$profile.country-name</span>{{ endif }}
+ </dd>
+ </dl>
+ {{ endif }}
+
+ {{ if $gender }}<dl class="mf"><dt class="gender-label">$gender</dt> <dd class="x-gender">$profile.gender</dd></dl>{{ endif }}
+ </div>
+ <div class="directory-detailscolumn-wrapper" id="directory-detailscolumn2-wrapper-$id">
+ {{ if $marital }}<dl class="marital"><dt class="marital-label"><span class="heart">&hearts;</span>$marital</dt><dd class="marital-text">$profile.marital</dd></dl>{{ endif }}
+
+ {{ if $homepage }}<dl class="homepage"><dt class="homepage-label">$homepage</dt><dd class="homepage-url"><a href="$profile.homepage" target="external-link">$profile.homepage</a></dd></dl>{{ endif }}
+ </div>
+ </div>
+ <div class="directory-copy-wrapper" id="directory-copy-wrapper-$id" >
+ {{ if $about }}<dl class="directory-copy"><dt class="directory-copy-label">$about</dt><dd class="directory-copy-data">$profile.about</dd></dl>{{ endif }}
+ </div>
+ </div>
</div>
diff --git a/view/theme/diabook/jot.tpl b/view/theme/diabook/jot.tpl
index 79151aeed..1d94cb6d3 100644
--- a/view/theme/diabook/jot.tpl
+++ b/view/theme/diabook/jot.tpl
@@ -70,7 +70,7 @@
<div style="display: none;">
<div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
$acl
- <hr style="clear:both"/>
+ <hr style="clear:both;"/>
<div id="profile-jot-email-label">$emailcc</div><input type="text" name="emailcc" id="profile-jot-email" title="$emtitle" />
<div id="profile-jot-email-end"></div>
$jotnets
diff --git a/view/theme/diabook/style.css b/view/theme/diabook/style.css
index 736817c7b..68bfd5d3a 100644
--- a/view/theme/diabook/style.css
+++ b/view/theme/diabook/style.css
@@ -2732,6 +2732,30 @@ float: left;
/* ============= */
/* = Directory = */
/* ============= */
+section .directory-item dl {
+ height: auto;
+ overflow: auto;
+}
+section .directory-item dt {
+ float: left;
+ margin-left: 0px;
+ text-align: right;
+ color: #999;
+}
+section .directory-item dd {
+ float: left;
+ margin-left: 5px;
+}
+.directory-profile-wrapper {
+ float: left;
+ max-height: 178px;
+ overflow: hidden;
+ width: 635px;
+}
+.directory-copy-wrapper {
+ float: left;
+ overflow: hidden;
+}
/* contacts menu */
.contact-photo-wrapper {
position: relative;
@@ -2773,7 +2797,7 @@ float: left;
}
.directory-item {
float: left;
- width: 200px;
+ width: 800px;
height: 200px;
}
.directory-item .contact-photo {
@@ -2784,14 +2808,38 @@ float: left;
width: 175px;
height: 175px;
}
+section .directory-photo-wrapper {
+ float: left;
+ height: 200px;
+ width: 165px;
+}
.contact-name {
- text-align: left;
+ font-size: 18px;
font-weight: bold;
- font-size: 12px;
+ margin-bottom: -3px;
+ text-align: left;
}
.contact-details {
color: #999999;
}
+.page-type {
+ font-size: 10px;
+ font-style: italic;
+}
+.directory-detailscolumn-wrapper {
+ float: left;
+ width: 305px;
+ margin-right: 10px;
+}
+.directory-profile-wrapper dl {
+ margin-top: 3px;
+ margin-bottom: 3px;
+}
+.directory-profile-title {
+ font-weight: bold;
+ margin-bottom: 3px;
+ font-size: 14px;
+}
#side-bar-photos-albums li{
list-style-type: disc;
}
diff --git a/view/theme/diabook/theme.php b/view/theme/diabook/theme.php
index 83079782e..53048df6c 100644
--- a/view/theme/diabook/theme.php
+++ b/view/theme/diabook/theme.php
@@ -528,7 +528,7 @@ if ($color=="dark") $color_path = "/diabook-dark/";
$entry = replace_macros($tpl,array(
'$id' => $rr['id'],
'$profile-link' => $profile_link,
- '$photo' => $rr[$photo],
+ '$photo' => $a->get_cached_avatar_image($rr[$photo]),
'$alt-text' => $rr['name'],
));
$aside['$lastusers_items'][] = $entry;
diff --git a/view/theme/dispy/conversation.tpl b/view/theme/dispy/conversation.tpl
index ca1b560a6..4a93dacf3 100644
--- a/view/theme/dispy/conversation.tpl
+++ b/view/theme/dispy/conversation.tpl
@@ -19,8 +19,9 @@
<div id="conversation-end"></div>
{{ if $dropping }}
-<div class="delete-checked">
-<a href="#" onclick="deleteCheckedItems();return false;"><span class="icon delete"></span><span class="s22 text" onmouseover="imgbright(this);" onmouseout="imgdull(this);">$dropping</span></a>
+<div id="item-delete-selected" class="fakelink" onclick="deleteCheckedItems(); return false;">
+ <div id="item-delete-selected-icon" class="icon drophide" title="$dropping" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></div>
+ <div id="item-delete-selected-desc" >$dropping</div>
</div>
<div id="item-delete-selected-end"></div>
{{ endif }}
diff --git a/view/theme/dispy/dark/style.css b/view/theme/dispy/dark/style.css
index 327b053ab..8ab192368 100644
--- a/view/theme/dispy/dark/style.css
+++ b/view/theme/dispy/dark/style.css
@@ -59,7 +59,7 @@ h6{font-size:xx-small;}
.button{color:#eeeecc;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;padding:5px;cursor:pointer;}.button a{color:#eeeecc;font-weight:bold;}
#profile-listing-desc a{color:#eeeecc;font-weight:bold;}
[class$="-desc"],[id$="-desc"]{color:#eeeecc;background:#2e2f2e;border:2px outset #d4d580;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;margin:3px 10px 7px 0;padding:5px;font-weight:bold;font-size:smaller;}
-#item-delete-selected-desc{float:left;margin-right:5px;}#item-delete-selected-desc:hover{text-decoration:underline;}
+#item-delete-selected-desc{float:left;font-size:x-small;margin-right:5px;}#item-delete-selected-desc:hover{text-decoration:underline;}
.intro-approve-as-friend-desc{margin-top:10px;}
.intro-desc{margin-bottom:20px;font-weight:bold;}
#group-edit-desc{margin:10px 0px;}
@@ -214,7 +214,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm
.wall-item-subtools1{width:30px;height:30px;list-style:none outside none;margin:18px 0 30px -20px;padding:0;}
.wall-item-subtools2{width:25px;height:25px;list-style:none outside none;margin:-78px 0 0 5px;padding:0;}
.wall-item-title{font-size:1.2em;font-weight:bold;margin-bottom:1.4em;}
-.wall-item-body{margin:15px 10px 10px 0px;text-align:left;overflow-x:auto;}
+.wall-item-body{margin:1em;text-align:left;overflow-x:auto;}
.wall-item-lock-wrapper{float:right;width:22px;height:22px;margin:0 -5px 0 0;opacity:1;}
.wall-item-dislike,.wall-item-like{clear:left;font-size:0.8em;color:#888b85;margin:5px 0 5px 10.2em;-webkit-transition:all 0.75s ease-in-out;-moz-transition:all 0.75s ease-in-out;-o-transition:all 0.75s ease-in-out;-ms-transition:all 0.75s ease-in-out;transition:all 0.75s ease-in-out;opacity:0.5;}.wall-item-dislike:hover,.wall-item-like:hover{opacity:1;}
.wall-item-author,.wall-item-actions-author,.wall-item-ago{color:#eeeecc;line-height:1;display:inline-block;font-size:x-small;margin:0.5em auto;font-weight:bold;}
@@ -226,7 +226,6 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm
.wallwall .wall-item-photo-end{clear:both;}
.wall-item-arrowphoto-wrapper{position:absolute;left:35px;top:80px;z-index:10002;}
.wall-item-photo-menu{min-width:92px;font-size:0.75em;border:2px solid #555753;border-top:0px;background:#555753;position:absolute;left:-2px;top:101px;display:none;z-index:10003;-o-border-radius:0 5px 5px 5px;-webkit-border-radius:0 5px 5px 5px;-moz-border-radius:0 5px 5px 5px;-ms-border-radius:0 5px 5px 5px;border-radius:0 5px 5px 5px;}.wall-item-photo-menu li a{white-space:nowrap;display:block;padding:5px 6px;color:#eeeeee;}.wall-item-photo-menu li a:hover{color:#555753;background:#eeeeee;}
-#item-delete-selected{overflow:auto;width:100%;}
#connect-services-header,#extra-help-header{margin:1.5em 0 0 0;}
#connect-services,#extra-help{margin:0px;padding:0px;list-style:none;list-style-position:inside;margin:1em 0 0 0;}#connect-services li,#extra-help li{display:inline;}
.ccollapse-wrapper{font-size:0.9em;margin-left:5em;}
@@ -390,9 +389,8 @@ div[id$="wrapper"]{height:100%;}div[id$="wrapper"] br{clear:left;}
.filesavetags:hover,.categorytags:hover{margin:20px 0;opacity:1.0 !important;}
.item-select{opacity:0.1;margin:5px 0 0 6px !important;}.item-select:hover{opacity:1;}
.checkeditem{opacity:1;}
-#item-delete-selected{margin-top:30px;}
-.delete-checked{position:absolute;left:35px;margin-top:20px;}
-#item-delete-selected-icon{float:left;margin-right:5px;}
+#item-delete-selected{margin:3em 5px;position:relative;left:4em;width:15em;overflow:auto;}
+#item-delete-selected-icon{float:left;margin:11px 5px;}
.fc-state-highlight{background:#eeeecc;color:#2e2f2e;}
.directory-item{float:left;margin:0 5px 4px 0;padding:3px;width:180px;height:250px;position:relative;}
#group-sidebar{margin-bottom:10px;}
diff --git a/view/theme/dispy/dark/style.less b/view/theme/dispy/dark/style.less
index e3966683b..60b49865e 100644
--- a/view/theme/dispy/dark/style.less
+++ b/view/theme/dispy/dark/style.less
@@ -325,6 +325,7 @@ h6 {
}
#item-delete-selected-desc {
float: left;
+ font-size: x-small;
margin-right: 5px;
&:hover {
text-decoration: underline;
@@ -1428,7 +1429,7 @@ nav #nav-notifications-linkmenu {
margin-bottom: 1.4em;
}
.wall-item-body {
- margin: 15px 10px 10px 0px;
+ margin: 1em;
text-align: left;
overflow-x: auto;
}
@@ -1533,10 +1534,6 @@ nav #nav-notifications-linkmenu {
}
}
}
-#item-delete-selected {
- overflow: auto;
- width: 100%;
-}
#connect-services-header,
#extra-help-header {
margin: 1.5em 0 0 0;
@@ -2369,18 +2366,15 @@ div {
opacity: 1;
}
#item-delete-selected {
- margin-top: 30px;
-}
-/* was tired of having no way of moving it around, so
-* here's a little 'hook' to do so */
-.delete-checked {
- position: absolute;
- left: 35px;
- margin-top: 20px;
+ margin: 3em 5px;
+ position: relative;
+ left: 4em;
+ width: 15em;
+ overflow: auto;
}
#item-delete-selected-icon {
float: left;
- margin-right: 5px;
+ margin: 11px 5px;
}
.fc-state-highlight {
background: @main_colour;
diff --git a/view/theme/dispy/jot.tpl b/view/theme/dispy/jot.tpl
index c6b339457..563d58ce4 100644
--- a/view/theme/dispy/jot.tpl
+++ b/view/theme/dispy/jot.tpl
@@ -19,31 +19,32 @@
<div id="jot-tools" class="jothidden" style="display:none">
<div id="profile-jot-submit-wrapper" class="jothidden">
- <div id="profile-upload-wrapper" style="display: $visitor;">
- <div id="wall-image-upload-div"><a class="icon camera" href="#" onclick="return false;" id="wall-image-upload" title="$upload"></a></div>
- </div>
- <div id="profile-attach-wrapper" style="display: $visitor;">
- <div id="wall-file-upload-div"><a class="icon attach" href="#" onclick="return false;" id="wall-file-upload" title="$attach"></a></div>
- </div>
- <div id="profile-link-wrapper" style="display: $visitor;" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);">
- <a class="icon link" id="profile-link" ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;" title="$weblink"></a>
- </div>
- <div id="profile-video-wrapper" style="display: $visitor;">
- <a class="icon video" id="profile-video" onclick="jotVideoURL();return false;" title="$video"></a>
- </div>
- <div id="profile-audio-wrapper" style="display: $visitor;">
- <a class="icon audio" id="profile-audio" onclick="jotAudioURL();return false;" title="$audio"></a>
- </div>
- <div id="profile-location-wrapper" style="display: $visitor;">
- <a class="icon globe" id="profile-location" onclick="jotGetLocation();return false;" title="$setloc"></a>
- </div>
- <div id="profile-nolocation-wrapper" style="display: none;">
- <a class="icon noglobe" id="profile-nolocation" onclick="jotClearLocation();return false;" title="$noloc"></a>
- </div>
+ <div id="profile-upload-wrapper" style="display: $visitor;">
+ <div id="wall-image-upload-div"><a href="#" onclick="return false;" id="wall-image-upload" class="icon camera" title="$upload"></a></div>
+ </div>
+ <div id="profile-attach-wrapper" style="display: $visitor;">
+ <div id="wall-file-upload-div"><a href="#" onclick="return false;" id="wall-file-upload" class="icon attach" title="$attach"></a></div>
+ </div>
- <div id="profile-jot-plugin-wrapper">
- $jotplugins
- </div>
+ <div id="profile-link-wrapper" style="display: $visitor;" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);">
+ <a id="profile-link" class="icon link" ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;" title="$weblink"></a>
+ </div>
+ <div id="profile-video-wrapper" style="display: $visitor;">
+ <a id="profile-video" class="icon video" onclick="jotVideoURL();return false;" title="$video"></a>
+ </div>
+ <div id="profile-audio-wrapper" style="display: $visitor;">
+ <a id="profile-audio" class="icon audio" onclick="jotAudioURL();return false;" title="$audio"></a>
+ </div>
+ <div id="profile-location-wrapper" style="display: $visitor;">
+ <a id="profile-location" class="icon globe" onclick="jotGetLocation();return false;" title="$setloc"></a>
+ </div>
+ <div id="profile-nolocation-wrapper" style="display: none;">
+ <a id="profile-nolocation" class="icon noglobe" onclick="jotClearLocation();return false;" title="$noloc"></a>
+ </div>
+
+ <div id="profile-jot-plugin-wrapper">
+ $jotplugins
+ </div>
<a class="icon-text-preview pointer"></a><a id="jot-preview-link" class="pointer" onclick="preview_post(); return false;" title="$preview">$preview</a>
<input type="submit" id="profile-jot-submit" name="submit" value="$share" />
@@ -57,16 +58,16 @@
</div> <!-- /#jot-tools -->
<div id="jot-preview-content" style="display:none;"></div>
+
<div style="display: none;">
<div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
$acl
<hr style="clear:both" />
- <div id="profile-jot-email-label">$emailcc</div>
- <input type="text" name="emailcc" id="profile-jot-email" title="$emtitle" />
+ <div id="profile-jot-email-label">$emailcc</div><input type="text" name="emailcc" id="profile-jot-email" title="$emtitle" />
<div id="profile-jot-email-end"></div>
$jotnets
</div>
</div>
</form>
-{{ if $content }}<script>initEditor();</script>{{ endif }}
+ {{ if $content }}<script>initEditor();</script>{{ endif }}
diff --git a/view/theme/dispy/light/style.css b/view/theme/dispy/light/style.css
index 194609428..de2717f0c 100644
--- a/view/theme/dispy/light/style.css
+++ b/view/theme/dispy/light/style.css
@@ -59,7 +59,7 @@ h6{font-size:xx-small;}
.button{color:#111111;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;padding:5px;cursor:pointer;}.button a{color:#111111;font-weight:bold;}
#profile-listing-desc a{color:#eeeeec;font-weight:bold;}
[class$="-desc"],[id$="-desc"]{color:#eeeeec;background:#2e3436;border:2px outset #111111;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;margin:3px 10px 7px 0;padding:5px;font-weight:bold;font-size:smaller;}
-#item-delete-selected-desc{float:left;margin-right:5px;}#item-delete-selected-desc:hover{text-decoration:underline;}
+#item-delete-selected-desc{float:left;font-size:x-small;margin-right:5px;}#item-delete-selected-desc:hover{text-decoration:underline;}
.intro-approve-as-friend-desc{margin-top:10px;}
.intro-desc{margin-bottom:20px;font-weight:bold;}
#group-edit-desc{margin:10px 0px;}
@@ -214,7 +214,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm
.wall-item-subtools1{width:30px;height:30px;list-style:none outside none;margin:18px 0 30px -20px;padding:0;}
.wall-item-subtools2{width:25px;height:25px;list-style:none outside none;margin:-78px 0 0 5px;padding:0;}
.wall-item-title{font-size:1.2em;font-weight:bold;margin-bottom:1.4em;}
-.wall-item-body{margin:15px 10px 10px 0px;text-align:left;overflow-x:auto;}
+.wall-item-body{margin:1em;text-align:left;overflow-x:auto;}
.wall-item-lock-wrapper{float:right;width:22px;height:22px;margin:0 -5px 0 0;opacity:1;}
.wall-item-dislike,.wall-item-like{clear:left;font-size:0.8em;color:#111111;margin:5px 0 5px 10.2em;-webkit-transition:all 0.75s ease-in-out;-moz-transition:all 0.75s ease-in-out;-o-transition:all 0.75s ease-in-out;-ms-transition:all 0.75s ease-in-out;transition:all 0.75s ease-in-out;opacity:0.5;}.wall-item-dislike:hover,.wall-item-like:hover{opacity:1;}
.wall-item-author,.wall-item-actions-author,.wall-item-ago{color:#111111;line-height:1;display:inline-block;font-size:x-small;margin:0.5em auto;font-weight:bold;}
@@ -226,7 +226,6 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm
.wallwall .wall-item-photo-end{clear:both;}
.wall-item-arrowphoto-wrapper{position:absolute;left:35px;top:80px;z-index:10002;}
.wall-item-photo-menu{min-width:92px;font-size:0.75em;border:2px solid #555753;border-top:0px;background:#555753;position:absolute;left:-2px;top:101px;display:none;z-index:10003;-o-border-radius:0 5px 5px 5px;-webkit-border-radius:0 5px 5px 5px;-moz-border-radius:0 5px 5px 5px;-ms-border-radius:0 5px 5px 5px;border-radius:0 5px 5px 5px;}.wall-item-photo-menu li a{white-space:nowrap;display:block;padding:5px 6px;color:#eeeeec;}.wall-item-photo-menu li a:hover{color:#555753;background:#eeeeec;}
-#item-delete-selected{overflow:auto;width:100%;}
#connect-services-header,#extra-help-header{margin:1.5em 0 0 0;}
#connect-services,#extra-help{margin:0px;padding:0px;list-style:none;list-style-position:inside;margin:1em 0 0 0;}#connect-services li,#extra-help li{display:inline;}
.ccollapse-wrapper{font-size:0.9em;margin-left:5em;}
@@ -390,9 +389,8 @@ div[id$="wrapper"]{height:100%;}div[id$="wrapper"] br{clear:left;}
.filesavetags:hover,.categorytags:hover{margin:20px 0;opacity:1.0 !important;}
.item-select{opacity:0.1;margin:5px 0 0 6px !important;}.item-select:hover{opacity:1;}
.checkeditem{opacity:1;}
-#item-delete-selected{margin-top:30px;}
-.delete-checked{position:absolute;left:35px;margin-top:20px;}
-#item-delete-selected-icon{float:left;margin-right:5px;}
+#item-delete-selected{margin:3em 5px;position:relative;left:4em;width:15em;overflow:auto;}
+#item-delete-selected-icon{float:left;margin:11px 5px;}
.fc-state-highlight{background:#eeeeec;color:#111111;}
.directory-item{float:left;margin:0 5px 4px 0;padding:3px;width:180px;height:250px;position:relative;}
#group-sidebar{margin-bottom:10px;}
diff --git a/view/theme/dispy/light/style.less b/view/theme/dispy/light/style.less
index b0fab994c..e18f9a01b 100644
--- a/view/theme/dispy/light/style.less
+++ b/view/theme/dispy/light/style.less
@@ -326,6 +326,7 @@ h6 {
}
#item-delete-selected-desc {
float: left;
+ font-size: x-small;
margin-right: 5px;
&:hover {
text-decoration: underline;
@@ -1429,7 +1430,7 @@ nav #nav-notifications-linkmenu {
margin-bottom: 1.4em;
}
.wall-item-body {
- margin: 15px 10px 10px 0px;
+ margin: 1em;
text-align: left;
overflow-x: auto;
}
@@ -1534,10 +1535,6 @@ nav #nav-notifications-linkmenu {
}
}
}
-#item-delete-selected {
- overflow: auto;
- width: 100%;
-}
#connect-services-header,
#extra-help-header {
margin: 1.5em 0 0 0;
@@ -2370,18 +2367,15 @@ div {
opacity: 1;
}
#item-delete-selected {
- margin-top: 30px;
-}
-/* was tired of having no way of moving it around, so
-* here's a little 'hook' to do so */
-.delete-checked {
- position: absolute;
- left: 35px;
- margin-top: 20px;
+ margin: 3em 5px;
+ position: relative;
+ left: 4em;
+ width: 15em;
+ overflow: auto;
}
#item-delete-selected-icon {
float: left;
- margin-right: 5px;
+ margin: 11px 5px;
}
.fc-state-highlight {
background: @bg_colour;
diff --git a/view/theme/dispy/wall_item.tpl b/view/theme/dispy/wall_item.tpl
index 115f05ad7..8ffae0403 100644
--- a/view/theme/dispy/wall_item.tpl
+++ b/view/theme/dispy/wall_item.tpl
@@ -78,9 +78,9 @@
</div>
</div>
<div class="wall-item-wrapper-end"></div>
- <div class="wall-item-like" id="wall-item-like-$item.id">$item.like</div>
- <div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div>
- <div class="wall-item-comment-wrapper">
+ <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div>
+ <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div>
+ <div class="wall-item-comment-wrapper" >
$item.comment
</div>
diff --git a/view/theme/dispy/wallwall_item.tpl b/view/theme/dispy/wallwall_item.tpl
index da5fa13b3..84da598cd 100644
--- a/view/theme/dispy/wallwall_item.tpl
+++ b/view/theme/dispy/wallwall_item.tpl
@@ -64,7 +64,7 @@ class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick
{{ if $item.edpost }}
<li><a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a></li>
{{ endif }}
-
+
<li class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" >
{{ if $item.drop.dropping }}<a href="item/drop/$item.id" onclick="return confirmDelete();" class="icon drophide" title="$item.drop.delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>{{ endif }}
{{ if $item.drop.dropping }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }}
@@ -86,8 +86,8 @@ class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick
</div>
</div>
<div class="wall-item-wrapper-end"></div>
- <div class="wall-item-like" id="wall-item-like-$item.id">$item.like</div>
- <div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div>
+ <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div>
+ <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div>
<div class="wall-item-comment-separator"></div>
<div class="wall-item-comment-wrapper">
$item.comment
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css
index be755d411..1be81d738 100644
--- a/view/theme/duepuntozero/style.css
+++ b/view/theme/duepuntozero/style.css
@@ -560,7 +560,12 @@ input#dfrn-url {
clear: both;
margin-bottom: 30px;
}
-
+.aprofile dt {
+ font-weight: bold;
+}
+#page-profile .title {
+ font-weight: bold;
+}
#profile-vcard-break {
clear: both;
}
@@ -935,6 +940,10 @@ input#dfrn-url {
background: #EEEEEE;
}
+.wall-item-like.comment, .wall-item-dislike.comment {
+ margin-left: 50px;
+}
+
.wall-item-info {
display: block;
float: left;
@@ -1640,6 +1649,9 @@ input#dfrn-url {
display:block!important;
}
+#photos-usage-message {
+ margin-bottom: 15px;
+}
#acl-wrapper {
@@ -2414,9 +2426,40 @@ aside input[type='text'] {
font-size: 20px;
}
+#event-summary-text {
+ margin-top: 15px;
+}
+
+#event-share-checkbox {
+ float: left;
+ margin-top: 10px;
+}
+
+#event-share-text {
+ float: left;
+ margin-top: 10px;
+ margin-left: 5px;
+}
+
+#event-share-break {
+ clear: both;
+ margin-bottom: 10px;
+}
+
+#event-summary {
+ width: 400px;
+}
+
.vevent {
border: 1px solid #CCCCCC;
}
+
+.vevent .event-summary {
+ margin-left: 10px;
+ margin-right: 10px;
+ font-weight: bold;
+}
+
.vevent .event-description, .vevent .event-location {
margin-left: 10px;
margin-right: 10px;
diff --git a/view/theme/facepark/screenshot.jpg b/view/theme/facepark/screenshot.jpg
new file mode 100644
index 000000000..37adcc54f
--- /dev/null
+++ b/view/theme/facepark/screenshot.jpg
Binary files differ
diff --git a/view/theme/quattro/Makefile b/view/theme/quattro/Makefile
new file mode 100644
index 000000000..5df58c821
--- /dev/null
+++ b/view/theme/quattro/Makefile
@@ -0,0 +1,5 @@
+all:
+ cd dark; make; cd ..
+ cd green; make; cd ..
+
+
diff --git a/view/theme/quattro/dark/style.css b/view/theme/quattro/dark/style.css
index 803a2c2f7..35595c8bc 100644
--- a/view/theme/quattro/dark/style.css
+++ b/view/theme/quattro/dark/style.css
@@ -10,10 +10,72 @@
overflow: hidden;
text-indent: -9999px;
padding: 1px;
+ min-width: 22px;
+ height: 22px;
}
.icon.text {
text-indent: 0px;
}
+.icon.notify {
+ background-image: url("../../../images/icons/22/notify_off.png");
+}
+.icon.gear {
+ background-image: url("../../../images/icons/22/gear.png");
+}
+.icon.like {
+ background-image: url("icons/like.png");
+}
+.icon.dislike {
+ background-image: url("icons/dislike.png");
+}
+.icon.add {
+ background-image: url("../../../images/icons/22/add.png");
+}
+.icon.delete {
+ background-image: url("../../../images/icons/22/delete.png");
+}
+.icon.edit {
+ background-image: url("../../../images/icons/22/edit.png");
+}
+.icon.star {
+ background-image: url("../../../images/icons/22/star.png");
+}
+.icon.menu {
+ background-image: url("../../../images/icons/22/menu.png");
+}
+.icon.link {
+ background-image: url("../../../images/icons/22/link.png");
+}
+.icon.lock {
+ background-image: url("../../../images/icons/22/lock.png");
+}
+.icon.unlock {
+ background-image: url("../../../images/icons/22/unlock.png");
+}
+.icon.plugin {
+ background-image: url("../../../images/icons/22/plugin.png");
+}
+.icon.type-unkn {
+ background-image: url("../../../images/icons/22/zip.png");
+}
+.icon.type-audio {
+ background-image: url("../../../images/icons/22/audio.png");
+}
+.icon.type-video {
+ background-image: url("../../../images/icons/22/video.png");
+}
+.icon.type-image {
+ background-image: url("../../../images/icons/22/image.png");
+}
+.icon.type-text {
+ background-image: url("../../../images/icons/22/text.png");
+}
+.icon.language {
+ background-image: url("icons/language.png");
+}
+.icon.text {
+ padding: 10px 0px 0px 25px;
+}
.icon.s10 {
min-width: 10px;
height: 10px;
@@ -24,6 +86,12 @@
.icon.s10.gear {
background-image: url("../../../images/icons/10/gear.png");
}
+.icon.s10.like {
+ background-image: url("icons/like.png");
+}
+.icon.s10.dislike {
+ background-image: url("icons/dislike.png");
+}
.icon.s10.add {
background-image: url("../../../images/icons/10/add.png");
}
@@ -82,6 +150,12 @@
.icon.s16.gear {
background-image: url("../../../images/icons/16/gear.png");
}
+.icon.s16.like {
+ background-image: url("icons/like.png");
+}
+.icon.s16.dislike {
+ background-image: url("icons/dislike.png");
+}
.icon.s16.add {
background-image: url("../../../images/icons/16/add.png");
}
@@ -140,6 +214,12 @@
.icon.s22.gear {
background-image: url("../../../images/icons/22/gear.png");
}
+.icon.s22.like {
+ background-image: url("icons/like.png");
+}
+.icon.s22.dislike {
+ background-image: url("icons/dislike.png");
+}
.icon.s22.add {
background-image: url("../../../images/icons/22/add.png");
}
@@ -198,6 +278,12 @@
.icon.s48.gear {
background-image: url("../../../images/icons/48/gear.png");
}
+.icon.s48.like {
+ background-image: url("icons/like.png");
+}
+.icon.s48.dislike {
+ background-image: url("icons/dislike.png");
+}
.icon.s48.add {
background-image: url("../../../images/icons/48/add.png");
}
@@ -267,7 +353,8 @@ body {
h4 {
font-size: 1.1em;
}
-a, a:link {
+a,
+a:link {
color: #005c94;
text-decoration: none;
}
@@ -336,6 +423,9 @@ code {
.tool .action {
float: right;
}
+.tool > img {
+ float: left;
+}
/* popup notifications */
#jGrowl.top-right {
top: 30px;
@@ -489,7 +579,8 @@ nav #nav-site-linkmenu .menu-popup {
right: 0px;
left: auto;
}
-nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-linkmenu.selected .icon.s22.notify {
+nav #nav-notifications-linkmenu.on .icon.s22.notify,
+nav #nav-notifications-linkmenu.selected .icon.s22.notify {
background-image: url("../../../images/icons/22/notify_on.png");
}
nav #nav-apps-link.selected {
@@ -599,6 +690,9 @@ aside {
padding: 0px 10px 0px 20px;
border-right: 1px solid #bdcdd4;
}
+aside .profile-edit-side-div {
+ display: none;
+}
aside .vcard .fn {
font-size: 16px;
font-weight: bold;
@@ -678,11 +772,15 @@ aside #profiles-menu {
height: 48px;
}
/* group member */
-#contact-edit-drop-link, .mail-list-delete-wrapper, .group-delete-wrapper {
+#contact-edit-drop-link,
+.mail-list-delete-wrapper,
+.group-delete-wrapper {
float: right;
margin-right: 50px;
}
-#contact-edit-drop-link .drophide, .mail-list-delete-wrapper .drophide, .group-delete-wrapper .drophide {
+#contact-edit-drop-link .drophide,
+.mail-list-delete-wrapper .drophide,
+.group-delete-wrapper .drophide {
background-image: url('../../../images/icons/22/delete.png');
display: block;
width: 22px;
@@ -691,7 +789,9 @@ aside #profiles-menu {
position: relative;
top: -50px;
}
-#contact-edit-drop-link .drop, .mail-list-delete-wrapper .drop, .group-delete-wrapper .drop {
+#contact-edit-drop-link .drop,
+.mail-list-delete-wrapper .drop,
+.group-delete-wrapper .drop {
background-image: url('../../../images/icons/22/delete.png');
display: block;
width: 22px;
@@ -821,7 +921,8 @@ section {
display: table;
width: 750px;
}
-.wall-item-container .wall-item-item, .wall-item-container .wall-item-bottom {
+.wall-item-container .wall-item-item,
+.wall-item-container .wall-item-bottom {
display: table-row;
}
.wall-item-container .wall-item-bottom {
@@ -859,11 +960,13 @@ section {
.wall-item-container .wall-item-content img {
max-width: 710px;
}
-.wall-item-container .wall-item-links, .wall-item-container .wall-item-actions {
+.wall-item-container .wall-item-links,
+.wall-item-container .wall-item-actions {
display: table-cell;
vertical-align: middle;
}
-.wall-item-container .wall-item-links .icon, .wall-item-container .wall-item-actions .icon {
+.wall-item-container .wall-item-links .icon,
+.wall-item-container .wall-item-actions .icon {
opacity: 0.5;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
@@ -871,7 +974,8 @@ section {
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
-.wall-item-container .wall-item-links .icon:hover, .wall-item-container .wall-item-actions .icon:hover {
+.wall-item-container .wall-item-links .icon:hover,
+.wall-item-container .wall-item-actions .icon:hover {
opacity: 1;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
@@ -1015,9 +1119,6 @@ section {
opacity: 0.5;
}
.wwto {
- position: absolute !important;
- width: 25px;
- height: 25px;
background: #FFFFFF;
border: 2px solid #364e59;
height: 25px;
@@ -1248,7 +1349,9 @@ section {
height: 18px;
}*/
/** acl **/
-#photo-edit-perms-select, #photos-upload-permissions-wrapper, #profile-jot-acl-wrapper {
+#photo-edit-perms-select,
+#photos-upload-permissions-wrapper,
+#profile-jot-acl-wrapper {
display: block!important;
}
#acl-wrapper {
@@ -1407,10 +1510,12 @@ ul.tabs li .active {
float: left;
width: 200px;
}
-.field input, .field textarea {
+.field input,
+.field textarea {
width: 400px;
}
-.field input[type="checkbox"], .field input[type="radio"] {
+.field input[type="checkbox"],
+.field input[type="radio"] {
width: auto;
}
.field textarea {
@@ -1537,10 +1642,126 @@ ul.tabs li .active {
width: 50px;
float: left;
}
-/* photo */
-.lframe {
+/* photo albums */
+#photo-edit-link-wrap {
+ margin-bottom: 10px;
+}
+#album-edit-link {
+ border-right: 1px solid #364e59;
+ float: left;
+ padding-right: 5px;
+ margin-right: 5px;
+}
+#photo-edit-link,
+#album-edit-link a {
+ background: url("../../../images/icons/16/edit.png") no-repeat left center;
+ padding-left: 18px;
+}
+#photo-toprofile-link {
+ background: url("../../../images/icons/16/user.png") no-repeat left center;
+ padding-left: 18px;
+}
+.photos-upload-link a,
+#photo-top-upload-link {
+ background: url("../../../images/icons/16/add.png") no-repeat left center;
+ padding-left: 18px;
+}
+.photo-top-image-wrapper,
+.photo-album-image-wrapper {
float: left;
margin: 0px 10px 10px 0px;
+ width: 150px;
+ height: 150px;
+ position: relative;
+ overflow: hidden;
+}
+.photo-top-image-wrapper img,
+.photo-album-image-wrapper img {
+ width: 150px;
+}
+.photo-top-image-wrapper .photo-top-album-name,
+.photo-album-image-wrapper .photo-top-album-name,
+.photo-top-image-wrapper .caption,
+.photo-album-image-wrapper .caption {
+ position: absolute;
+ color: #2d2d2d;
+ background-color: #ffffff;
+ width: 100%;
+ -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
+ -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
+ box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
+ -webkit-transition: all 0.5s ease-in-out;
+ -moz-transition: all 0.5s ease-in-out;
+ -o-transition: all 0.5s ease-in-out;
+ -ms-transition: all 0.5s ease-in-out;
+ transition: all 0.5s ease-in-out;
+ bottom: -150px;
+}
+.photo-top-image-wrapper:hover .photo-top-album-name,
+.photo-album-image-wrapper:hover .photo-top-album-name,
+.photo-top-image-wrapper:hover .caption,
+.photo-album-image-wrapper:hover .caption {
+ bottom: 0px;
+ -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7);
+ -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7);
+ box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7);
+ -webkit-transition: all 0.5s ease-in-out;
+ -moz-transition: all 0.5s ease-in-out;
+ -o-transition: all 0.5s ease-in-out;
+ -ms-transition: all 0.5s ease-in-out;
+ transition: all 0.5s ease-in-out;
+}
+#photo-photo {
+ display: block;
+ width: 660px;
+ padding: 50px;
+ margin-bottom: 0px;
+ text-align: center;
+ background-color: #999999;
+}
+#photo-photo img {
+ max-width: 560px;
+}
+#photo-album-title {
+ background: url("../../../images/icons/22/image.png") no-repeat top left;
+ padding-left: 23px;
+ min-height: 22px;
+}
+#photo-album-title a {
+ display: block;
+ padding-top: 5px;
+}
+#photo-caption {
+ display: block;
+ width: 660px;
+ min-height: 55px;
+ background-color: #cccccc;
+ padding: 0 50px 0 50px;
+}
+#photo-next-link > a > div {
+ background: url("icons/next.png") no-repeat center center;
+ float: right;
+ width: 50px;
+ height: 50px;
+}
+#photo-prev-link > a > div {
+ background: url("icons/prev.png") no-repeat center center;
+ float: left;
+ width: 50px;
+ height: 50px;
+}
+#photo-like-div {
+ display: block;
+ width: 660px;
+ height: 30px;
+ background-color: #cccccc;
+ padding: 0 50px 0 50px;
+}
+#photo-like-div .icon {
+ float: left;
+}
+#photo-like-div .like-rotator {
+ float: right;
}
/* profile match wrapper */
.profile-match-wrapper {
@@ -1641,13 +1862,15 @@ ul.tabs li .active {
transition: all 0.2s ease-in-out;
}
/* theme screenshot */
-.screenshot, #theme-preview {
+.screenshot,
+#theme-preview {
position: absolute;
width: 202px;
left: 70%;
top: 50px;
}
-.screenshot img, #theme-preview img {
+.screenshot img,
+#theme-preview img {
width: 200px;
height: 150px;
}
diff --git a/view/theme/quattro/green/style.css b/view/theme/quattro/green/style.css
index ecf4ff986..57fa38aa1 100644
--- a/view/theme/quattro/green/style.css
+++ b/view/theme/quattro/green/style.css
@@ -10,10 +10,72 @@
overflow: hidden;
text-indent: -9999px;
padding: 1px;
+ min-width: 22px;
+ height: 22px;
}
.icon.text {
text-indent: 0px;
}
+.icon.notify {
+ background-image: url("../../../images/icons/22/notify_off.png");
+}
+.icon.gear {
+ background-image: url("../../../images/icons/22/gear.png");
+}
+.icon.like {
+ background-image: url("icons/like.png");
+}
+.icon.dislike {
+ background-image: url("icons/dislike.png");
+}
+.icon.add {
+ background-image: url("../../../images/icons/22/add.png");
+}
+.icon.delete {
+ background-image: url("../../../images/icons/22/delete.png");
+}
+.icon.edit {
+ background-image: url("../../../images/icons/22/edit.png");
+}
+.icon.star {
+ background-image: url("../../../images/icons/22/star.png");
+}
+.icon.menu {
+ background-image: url("../../../images/icons/22/menu.png");
+}
+.icon.link {
+ background-image: url("../../../images/icons/22/link.png");
+}
+.icon.lock {
+ background-image: url("../../../images/icons/22/lock.png");
+}
+.icon.unlock {
+ background-image: url("../../../images/icons/22/unlock.png");
+}
+.icon.plugin {
+ background-image: url("../../../images/icons/22/plugin.png");
+}
+.icon.type-unkn {
+ background-image: url("../../../images/icons/22/zip.png");
+}
+.icon.type-audio {
+ background-image: url("../../../images/icons/22/audio.png");
+}
+.icon.type-video {
+ background-image: url("../../../images/icons/22/video.png");
+}
+.icon.type-image {
+ background-image: url("../../../images/icons/22/image.png");
+}
+.icon.type-text {
+ background-image: url("../../../images/icons/22/text.png");
+}
+.icon.language {
+ background-image: url("icons/language.png");
+}
+.icon.text {
+ padding: 10px 0px 0px 25px;
+}
.icon.s10 {
min-width: 10px;
height: 10px;
@@ -24,6 +86,12 @@
.icon.s10.gear {
background-image: url("../../../images/icons/10/gear.png");
}
+.icon.s10.like {
+ background-image: url("icons/like.png");
+}
+.icon.s10.dislike {
+ background-image: url("icons/dislike.png");
+}
.icon.s10.add {
background-image: url("../../../images/icons/10/add.png");
}
@@ -82,6 +150,12 @@
.icon.s16.gear {
background-image: url("../../../images/icons/16/gear.png");
}
+.icon.s16.like {
+ background-image: url("icons/like.png");
+}
+.icon.s16.dislike {
+ background-image: url("icons/dislike.png");
+}
.icon.s16.add {
background-image: url("../../../images/icons/16/add.png");
}
@@ -140,6 +214,12 @@
.icon.s22.gear {
background-image: url("../../../images/icons/22/gear.png");
}
+.icon.s22.like {
+ background-image: url("icons/like.png");
+}
+.icon.s22.dislike {
+ background-image: url("icons/dislike.png");
+}
.icon.s22.add {
background-image: url("../../../images/icons/22/add.png");
}
@@ -198,6 +278,12 @@
.icon.s48.gear {
background-image: url("../../../images/icons/48/gear.png");
}
+.icon.s48.like {
+ background-image: url("icons/like.png");
+}
+.icon.s48.dislike {
+ background-image: url("icons/dislike.png");
+}
.icon.s48.add {
background-image: url("../../../images/icons/48/add.png");
}
@@ -267,7 +353,8 @@ body {
h4 {
font-size: 1.1em;
}
-a, a:link {
+a,
+a:link {
color: #009100;
text-decoration: none;
}
@@ -336,6 +423,9 @@ code {
.tool .action {
float: right;
}
+.tool > img {
+ float: left;
+}
/* popup notifications */
#jGrowl.top-right {
top: 30px;
@@ -489,7 +579,8 @@ nav #nav-site-linkmenu .menu-popup {
right: 0px;
left: auto;
}
-nav #nav-notifications-linkmenu.on .icon.s22.notify, nav #nav-notifications-linkmenu.selected .icon.s22.notify {
+nav #nav-notifications-linkmenu.on .icon.s22.notify,
+nav #nav-notifications-linkmenu.selected .icon.s22.notify {
background-image: url("../../../images/icons/22/notify_on.png");
}
nav #nav-apps-link.selected {
@@ -599,6 +690,9 @@ aside {
padding: 0px 10px 0px 20px;
border-right: 1px solid #bdcdd4;
}
+aside .profile-edit-side-div {
+ display: none;
+}
aside .vcard .fn {
font-size: 16px;
font-weight: bold;
@@ -678,11 +772,15 @@ aside #profiles-menu {
height: 48px;
}
/* group member */
-#contact-edit-drop-link, .mail-list-delete-wrapper, .group-delete-wrapper {
+#contact-edit-drop-link,
+.mail-list-delete-wrapper,
+.group-delete-wrapper {
float: right;
margin-right: 50px;
}
-#contact-edit-drop-link .drophide, .mail-list-delete-wrapper .drophide, .group-delete-wrapper .drophide {
+#contact-edit-drop-link .drophide,
+.mail-list-delete-wrapper .drophide,
+.group-delete-wrapper .drophide {
background-image: url('../../../images/icons/22/delete.png');
display: block;
width: 22px;
@@ -691,7 +789,9 @@ aside #profiles-menu {
position: relative;
top: -50px;
}
-#contact-edit-drop-link .drop, .mail-list-delete-wrapper .drop, .group-delete-wrapper .drop {
+#contact-edit-drop-link .drop,
+.mail-list-delete-wrapper .drop,
+.group-delete-wrapper .drop {
background-image: url('../../../images/icons/22/delete.png');
display: block;
width: 22px;
@@ -821,7 +921,8 @@ section {
display: table;
width: 750px;
}
-.wall-item-container .wall-item-item, .wall-item-container .wall-item-bottom {
+.wall-item-container .wall-item-item,
+.wall-item-container .wall-item-bottom {
display: table-row;
}
.wall-item-container .wall-item-bottom {
@@ -859,11 +960,13 @@ section {
.wall-item-container .wall-item-content img {
max-width: 710px;
}
-.wall-item-container .wall-item-links, .wall-item-container .wall-item-actions {
+.wall-item-container .wall-item-links,
+.wall-item-container .wall-item-actions {
display: table-cell;
vertical-align: middle;
}
-.wall-item-container .wall-item-links .icon, .wall-item-container .wall-item-actions .icon {
+.wall-item-container .wall-item-links .icon,
+.wall-item-container .wall-item-actions .icon {
opacity: 0.5;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
@@ -871,7 +974,8 @@ section {
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
-.wall-item-container .wall-item-links .icon:hover, .wall-item-container .wall-item-actions .icon:hover {
+.wall-item-container .wall-item-links .icon:hover,
+.wall-item-container .wall-item-actions .icon:hover {
opacity: 1;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
@@ -1015,9 +1119,6 @@ section {
opacity: 0.5;
}
.wwto {
- position: absolute !important;
- width: 25px;
- height: 25px;
background: #FFFFFF;
border: 2px solid #364e59;
height: 25px;
@@ -1248,7 +1349,9 @@ section {
height: 18px;
}*/
/** acl **/
-#photo-edit-perms-select, #photos-upload-permissions-wrapper, #profile-jot-acl-wrapper {
+#photo-edit-perms-select,
+#photos-upload-permissions-wrapper,
+#profile-jot-acl-wrapper {
display: block!important;
}
#acl-wrapper {
@@ -1407,10 +1510,12 @@ ul.tabs li .active {
float: left;
width: 200px;
}
-.field input, .field textarea {
+.field input,
+.field textarea {
width: 400px;
}
-.field input[type="checkbox"], .field input[type="radio"] {
+.field input[type="checkbox"],
+.field input[type="radio"] {
width: auto;
}
.field textarea {
@@ -1537,10 +1642,126 @@ ul.tabs li .active {
width: 50px;
float: left;
}
-/* photo */
-.lframe {
+/* photo albums */
+#photo-edit-link-wrap {
+ margin-bottom: 10px;
+}
+#album-edit-link {
+ border-right: 1px solid #364e59;
+ float: left;
+ padding-right: 5px;
+ margin-right: 5px;
+}
+#photo-edit-link,
+#album-edit-link a {
+ background: url("../../../images/icons/16/edit.png") no-repeat left center;
+ padding-left: 18px;
+}
+#photo-toprofile-link {
+ background: url("../../../images/icons/16/user.png") no-repeat left center;
+ padding-left: 18px;
+}
+.photos-upload-link a,
+#photo-top-upload-link {
+ background: url("../../../images/icons/16/add.png") no-repeat left center;
+ padding-left: 18px;
+}
+.photo-top-image-wrapper,
+.photo-album-image-wrapper {
float: left;
margin: 0px 10px 10px 0px;
+ width: 150px;
+ height: 150px;
+ position: relative;
+ overflow: hidden;
+}
+.photo-top-image-wrapper img,
+.photo-album-image-wrapper img {
+ width: 150px;
+}
+.photo-top-image-wrapper .photo-top-album-name,
+.photo-album-image-wrapper .photo-top-album-name,
+.photo-top-image-wrapper .caption,
+.photo-album-image-wrapper .caption {
+ position: absolute;
+ color: #2d2d2d;
+ background-color: #ffffff;
+ width: 100%;
+ -webkit-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
+ -moz-box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
+ box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.7);
+ -webkit-transition: all 0.5s ease-in-out;
+ -moz-transition: all 0.5s ease-in-out;
+ -o-transition: all 0.5s ease-in-out;
+ -ms-transition: all 0.5s ease-in-out;
+ transition: all 0.5s ease-in-out;
+ bottom: -150px;
+}
+.photo-top-image-wrapper:hover .photo-top-album-name,
+.photo-album-image-wrapper:hover .photo-top-album-name,
+.photo-top-image-wrapper:hover .caption,
+.photo-album-image-wrapper:hover .caption {
+ bottom: 0px;
+ -webkit-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7);
+ -moz-box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7);
+ box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7);
+ -webkit-transition: all 0.5s ease-in-out;
+ -moz-transition: all 0.5s ease-in-out;
+ -o-transition: all 0.5s ease-in-out;
+ -ms-transition: all 0.5s ease-in-out;
+ transition: all 0.5s ease-in-out;
+}
+#photo-photo {
+ display: block;
+ width: 660px;
+ padding: 50px;
+ margin-bottom: 0px;
+ text-align: center;
+ background-color: #999999;
+}
+#photo-photo img {
+ max-width: 560px;
+}
+#photo-album-title {
+ background: url("../../../images/icons/22/image.png") no-repeat top left;
+ padding-left: 23px;
+ min-height: 22px;
+}
+#photo-album-title a {
+ display: block;
+ padding-top: 5px;
+}
+#photo-caption {
+ display: block;
+ width: 660px;
+ min-height: 55px;
+ background-color: #cccccc;
+ padding: 0 50px 0 50px;
+}
+#photo-next-link > a > div {
+ background: url("icons/next.png") no-repeat center center;
+ float: right;
+ width: 50px;
+ height: 50px;
+}
+#photo-prev-link > a > div {
+ background: url("icons/prev.png") no-repeat center center;
+ float: left;
+ width: 50px;
+ height: 50px;
+}
+#photo-like-div {
+ display: block;
+ width: 660px;
+ height: 30px;
+ background-color: #cccccc;
+ padding: 0 50px 0 50px;
+}
+#photo-like-div .icon {
+ float: left;
+}
+#photo-like-div .like-rotator {
+ float: right;
}
/* profile match wrapper */
.profile-match-wrapper {
@@ -1641,13 +1862,15 @@ ul.tabs li .active {
transition: all 0.2s ease-in-out;
}
/* theme screenshot */
-.screenshot, #theme-preview {
+.screenshot,
+#theme-preview {
position: absolute;
width: 202px;
left: 70%;
top: 50px;
}
-.screenshot img, #theme-preview img {
+.screenshot img,
+#theme-preview img {
width: 200px;
height: 150px;
}
diff --git a/view/theme/quattro/icons.less b/view/theme/quattro/icons.less
index ae7459dfc..f9be4cc72 100644
--- a/view/theme/quattro/icons.less
+++ b/view/theme/quattro/icons.less
@@ -5,6 +5,9 @@
&.notify { background-image: url("../../../images/icons/@{size}/notify_off.png"); }
&.gear { background-image: url("../../../images/icons/@{size}/gear.png"); }
+ &.like { background-image: url("icons/like.png"); }
+ &.dislike { background-image: url("icons/dislike.png"); }
+
&.add { background-image: url("../../../images/icons/@{size}/add.png"); }
&.delete { background-image: url("../../../images/icons/@{size}/delete.png"); }
&.edit { background-image: url("../../../images/icons/@{size}/edit.png"); }
@@ -40,6 +43,10 @@
text-indent: 0px;
}
+ min-width:22px; height: 22px;
+ .icons(22);
+ &.text { padding: 10px 0px 0px 25px; }
+
&.s10 {
min-width:10px; height: 10px;
.icons(10);
diff --git a/view/theme/quattro/icons/addon_off.png b/view/theme/quattro/icons/addon_off.png
index 40b53259a..0fcce4d5a 100644
--- a/view/theme/quattro/icons/addon_off.png
+++ b/view/theme/quattro/icons/addon_off.png
Binary files differ
diff --git a/view/theme/quattro/icons/addon_on.png b/view/theme/quattro/icons/addon_on.png
index 3d9490f15..79ce07f0e 100644
--- a/view/theme/quattro/icons/addon_on.png
+++ b/view/theme/quattro/icons/addon_on.png
Binary files differ
diff --git a/view/theme/quattro/icons/dislike.png b/view/theme/quattro/icons/dislike.png
new file mode 100644
index 000000000..23de426c5
--- /dev/null
+++ b/view/theme/quattro/icons/dislike.png
Binary files differ
diff --git a/view/theme/quattro/icons/like.png b/view/theme/quattro/icons/like.png
new file mode 100644
index 000000000..b65edccc0
--- /dev/null
+++ b/view/theme/quattro/icons/like.png
Binary files differ
diff --git a/view/theme/quattro/icons/next.png b/view/theme/quattro/icons/next.png
new file mode 100644
index 000000000..7b5e25b90
--- /dev/null
+++ b/view/theme/quattro/icons/next.png
Binary files differ
diff --git a/view/theme/quattro/icons/prev.png b/view/theme/quattro/icons/prev.png
new file mode 100644
index 000000000..55c1464ba
--- /dev/null
+++ b/view/theme/quattro/icons/prev.png
Binary files differ
diff --git a/view/theme/quattro/photo_view.tpl b/view/theme/quattro/photo_view.tpl
new file mode 100644
index 000000000..3b7a66271
--- /dev/null
+++ b/view/theme/quattro/photo_view.tpl
@@ -0,0 +1,37 @@
+<div id="live-display"></div>
+<h3 id="photo-album-title"><a href="$album.0">$album.1</a></h3>
+
+<div id="photo-edit-link-wrap">
+{{ if $tools }}
+<a id="photo-edit-link" href="$tools.edit.0">$tools.edit.1</a>
+|
+<a id="photo-toprofile-link" href="$tools.profile.0">$tools.profile.1</a>
+{{ endif }}
+{{ if $lock }} | <img src="images/lock_icon.gif" class="lockview" alt="$lock" onclick="lockview(event,'photo/$id');" /> {{ endif }}
+</div>
+
+<div id="photo-photo"><a href="$photo.href" title="$photo.title"><img src="$photo.src" /></a></div>
+{{ if $prevlink }}<div id="photo-prev-link"><a href="$prevlink.0">$prevlink.1</a></div>{{ endif }}
+{{ if $nextlink }}<div id="photo-next-link"><a href="$nextlink.0">$nextlink.1</a></div>{{ endif }}
+<div id="photo-caption">$desc</div>
+{{ if $tags }}
+<div id="in-this-photo-text">$tags.0</div>
+<div id="in-this-photo">$tags.1</div>
+{{ endif }}
+{{ if $tags.2 }}<div id="tag-remove"><a href="$tags.2">$tags.3</a></div>{{ endif }}
+
+{{ if $edit }}$edit{{ endif }}
+
+{{ if $likebuttons }}
+<div id="photo-like-div">
+ $likebuttons
+ $like
+ $dislike
+</div>
+{{ endif }}
+<div class="wall-item-comment-wrapper">
+ $comments
+</div>
+
+$paginate
+
diff --git a/view/theme/quattro/quattro.less b/view/theme/quattro/quattro.less
index 9099f0be1..0dac79bf9 100644
--- a/view/theme/quattro/quattro.less
+++ b/view/theme/quattro/quattro.less
@@ -27,13 +27,17 @@ h4 { font-size: 1.1em }
.opaque(@v: 0.5){
opacity: @v;
- -webkit-transition: all 0.2s ease-in-out;
- -moz-transition: all 0.2s ease-in-out;
- -o-transition: all 0.2s ease-in-out;
- -ms-transition: all 0.2s ease-in-out;
- transition: all 0.2s ease-in-out;
+ .transition();
}
+.transition(@d: 0.2s){
+ -webkit-transition: all @d ease-in-out;
+ -moz-transition: all @d ease-in-out;
+ -o-transition: all @d ease-in-out;
+ -ms-transition: all @d ease-in-out;
+ transition: all @d ease-in-out;
+}
+
a, a:link { color: @Link; text-decoration: none; }
a:visited { color: @LinkVisited; text-decoration: none; }
@@ -81,6 +85,7 @@ code {
height: auto; overflow: auto;
.label { float: left;}
.action { float: right; }
+ > img { float: left; }
}
@@ -282,6 +287,8 @@ aside {
padding:0px 10px 0px 20px;
border-right: 1px solid @AsideBorder;
+ .profile-edit-side-div { display: none; }
+
.vcard {
.fn { font-size: 16px; font-weight: bold; margin-bottom: 5px; }
.title { margin-bottom: 5px; }
@@ -1068,12 +1075,102 @@ ul.tabs {
width: 50px; float: left;
}
-/* photo */
-.lframe {
+/* photo albums */
+@photosize: 150px;
+
+#photo-edit-link-wrap { margin-bottom: 10px; }
+
+#album-edit-link {
+ border-right: 1px solid @MenuBorder;
+ float: left;
+ padding-right: 5px;
+ margin-right: 5px;
+}
+#photo-edit-link,
+#album-edit-link a {
+ background: url("../../../images/icons/16/edit.png") no-repeat left center;
+ padding-left: 18px;
+}
+#photo-toprofile-link {
+ background: url("../../../images/icons/16/user.png") no-repeat left center;
+ padding-left: 18px;
+}
+
+.photos-upload-link a,
+#photo-top-upload-link {
+ background: url("../../../images/icons/16/add.png") no-repeat left center;
+ padding-left: 18px;
+}
+
+
+.photo-top-image-wrapper,
+.photo-album-image-wrapper {
float: left;
margin: 0px 10px 10px 0px;
+ width:@photosize; height: @photosize;
+ position: relative;
+ overflow: hidden;
+
+ img { width: @photosize; }
+
+ .photo-top-album-name,
+ .caption{
+ position: absolute;
+ color: @Menu;
+ background-color: @MenuBg;
+
+ width: 100%;
+ .shadow(0px, 5px);
+ .transition(0.5s);
+ bottom: -@photosize;
+ }
+
+ &:hover .photo-top-album-name,
+ &:hover .caption {
+ bottom: 0px;
+ .shadow(0px, 0px);
+ .transition(0.5s);
+ }
+}
+
+#photo-photo {
+ display: block; width: 660px;
+ padding: 50px; margin-bottom: 0px;
+ text-align: center;
+ background-color: @Grey3;
+ img { max-width: 560px; }
+}
+#photo-album-title {
+ background: url("../../../images/icons/22/image.png") no-repeat top left;
+ padding-left: 23px;
+ min-height: 22px;
+ a { display: block; padding-top: 5px; }
}
+#photo-caption {
+ display: block; width: 660px;
+ min-height: 55px;
+ background-color: @Grey2;
+ padding:0 50px 0 50px;
+}
+#photo-next-link > a > div {
+ background: url("icons/next.png") no-repeat center center;
+ float: right;
+ width: 50px; height: 50px;
+}
+#photo-prev-link > a > div {
+ background: url("icons/prev.png") no-repeat center center;
+ float: left;
+ width: 50px; height: 50px;
+}
+#photo-like-div {
+ display: block; width: 660px;
+ height: 30px;
+ background-color: @Grey2;
+ padding:0 50px 0 50px;
+ .icon {float: left;}
+ .like-rotator {float: right;}
+}
/* profile match wrapper */
.profile-match-wrapper {
float: left;
diff --git a/view/theme/slackr/birthdays_reminder.tpl b/view/theme/slackr/birthdays_reminder.tpl
index 8b1378917..1dc65295a 100644
--- a/view/theme/slackr/birthdays_reminder.tpl
+++ b/view/theme/slackr/birthdays_reminder.tpl
@@ -1 +1,8 @@
+{{ if $classtoday }}
+<script>
+ $(document).ready(function() $lbr
+ $('#events-reminder').addClass($.trim('$classtoday'));
+ $rbr);
+</script>
+{{ endif }}
diff --git a/view/theme/slackr/style.css b/view/theme/slackr/style.css
index ea10cc377..73b436fc6 100644
--- a/view/theme/slackr/style.css
+++ b/view/theme/slackr/style.css
@@ -12,6 +12,10 @@
.wall-item-tools {
background: none;
}
+.wall-item-body a:hover {
+ color: #ff6600;
+}
+
.widget {
/* box-shadow: 4px 4px 3px 0 #444444; */
@@ -67,6 +71,8 @@ nav #site-location {
opacity: 1.0;
filter:alpha(opacity=100);
box-shadow: 4px 4px 3px 0 #444444;
+ margin-left: 0px;
+ margin-top: 0px;
}
#events-reminder:hover {
@@ -108,6 +114,8 @@ nav #site-location {
#posted-date-selector {
margin-left: 30px !important;
margin-top: 5px !important;
+ margin-right: 0px !important;
+ margin-bottom: 0px !important;
}
@@ -115,6 +123,9 @@ nav #site-location {
box-shadow: 4px 4px 3px 0 #444444;
margin-left: 25px !important;
margin-top: 0px !important;
+ margin-right: 5px !important;
+ margin-bottom: 5px !important;
+
}
.contact-entry-photo img, .profile-match-photo img, #photo-photo img, .directory-photo-img, .photo-album-photo, .photo-top-photo, .profile-jot-text, .group-selected, .nets-selected, .fileas-selected, #profile-jot-submit, .categories-selected {
diff --git a/view/theme/testbubble/style.css b/view/theme/testbubble/style.css
index 1e63c7ef6..58f31971b 100644
--- a/view/theme/testbubble/style.css
+++ b/view/theme/testbubble/style.css
@@ -3280,3 +3280,9 @@ ul.menu-popup {
.notify-seen {
background: #000;
}
+
+
+/* Pages profile widget */
+#page-profile div#profile-page-list{
+margin-left: 45px;
+} \ No newline at end of file
diff --git a/view/wall_item.tpl b/view/wall_item.tpl
index a6a96d879..dae33b3f7 100644
--- a/view/wall_item.tpl
+++ b/view/wall_item.tpl
@@ -69,8 +69,8 @@
</div>
</div>
<div class="wall-item-wrapper-end"></div>
- <div class="wall-item-like" id="wall-item-like-$item.id">$item.like</div>
- <div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div>
+ <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div>
+ <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div>
<div class="wall-item-comment-wrapper" >
$item.comment
</div>
diff --git a/view/wallwall_item.tpl b/view/wallwall_item.tpl
index 9cbfc991e..a48acfec5 100644
--- a/view/wallwall_item.tpl
+++ b/view/wallwall_item.tpl
@@ -74,8 +74,8 @@
</div>
</div>
<div class="wall-item-wrapper-end"></div>
- <div class="wall-item-like" id="wall-item-like-$item.id">$item.like</div>
- <div class="wall-item-dislike" id="wall-item-dislike-$item.id">$item.dislike</div>
+ <div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div>
+ <div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div>
<div class="wall-item-comment-separator"></div>
<div class="wall-item-comment-wrapper">
$item.comment
diff --git a/view/xrd_host.tpl b/view/xrd_host.tpl
index dbb20256f..94e3c2146 100644
--- a/view/xrd_host.tpl
+++ b/view/xrd_host.tpl
@@ -10,17 +10,6 @@
<Link rel="http://oexchange.org/spec/0.8/rel/resident-target" type="application/xrd+xml"
href="$domain/oexchange/xrd" />
- <Link rel="http://purl.org/zot/1.0/post"
- href="$zot_post" />
-
- <Property xmlns:zot="http://purl.og/zot/1.0"
- type="http://purl.org/zot/1.0/version"
- zot:version="1" />
-
- <Property xmlns:zot="http://purl.og/zot/1.0"
- type="http://purl.org/zot/1.0/accept"
- zot:accept="application/atom+xml" />
-
<Property xmlns:mk="http://salmon-protocol.org/ns/magic-key"
type="http://salmon-protocol.org/ns/magic-key"
mk:key_id="1">$bigkey</Property>
diff --git a/view/xrd_person.tpl b/view/xrd_person.tpl
index a4b921fe1..d79203465 100644
--- a/view/xrd_person.tpl
+++ b/view/xrd_person.tpl
@@ -5,17 +5,6 @@
<Alias>$accturi</Alias>
<Alias>$profile_url</Alias>
- <Link rel="http://purl.org/zot/1.0/post/$nick"
- href="$zot_post" />
-
- <Property xmlns:zot="http://purl.og/zot/1.0"
- type="http://purl.org/zot/1.0/version"
- zot:version="1" />
-
- <Property xmlns:zot="http://purl.og/zot/1.0"
- type="http://purl.org/zot/1.0/accept"
- zot:accept="application/atom+xml" />
-
<Link rel="http://purl.org/macgirvin/dfrn/1.0"
href="$profile_url" />
<Link rel="http://schemas.google.com/g/2010#updates-from"