From 4b240c9109a2cbe67e8db53b30732e9288d38cbb Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 23 Dec 2012 03:26:29 +0100 Subject: [PATCH 01/20] vier: Changed color of sidebar links, made the content centered. --- view/theme/vier/style.css | 70 +++++++++++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 18 deletions(-) diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 640062bcf8..876019020f 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -33,8 +33,8 @@ .admin.link { list-style-position: inside; font-size: 1em; - padding-left: 5px; - margin: 5px; +/* padding-left: 5px; + margin: 5px; */ } #adminpage dl { @@ -265,10 +265,12 @@ blockquote.shared_content { body { font-family: 'Lato', "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; - background-color: #ffffff; + /* background-color: #ffffff; */ + background-color: #ddd; color: #2d2d2d; margin: 37px 0px 0px 0px; display: table; + width: 100% } h4 { font-size: 1.1em; @@ -368,9 +370,12 @@ code { .tool a { /* color: #000; */ } -.tool a:hover { - text-decoration: underline; +.tool a:hover, .widget a:hover, #nets-sidear a:hover, #hide-forum-list:hover, .admin.link a:hover, aside h4 a:hover { + /* text-decoration: underline; */ + text-decoration: none; + color: black; } + .groupsideedit, .savedsearchdrop { float: right; opacity: 0.3; @@ -379,20 +384,50 @@ code { opacity: 1; } +.sidebar-group-li:hover, #sidebar-new-group:hover, #hide-forum-list:hover, +#sidebar-ungrouped:hover, .side-link:hover, .nets-ul li:hover, #forum-list div:hover, +.nets-all:hover, .saved-search-li:hover, li.tool:hover, .admin.link:hover, aside h4 a:hover, #message-new:hover { + /* background-color: #ddd; */ + background-color: #e5e5e5; +} + + .sidebar-group-element { /* color: #000; */ } -#sidebar-new-group, #posted-date-selector, #hide-forum-list, #forum-list, #sidebar-ungrouped, -.side-link, #peoplefind-desc, #connect-desc, #follow-sidebar form, #peoplefind-sidebar form, -#netsearch-box form { +.group-selected, .nets-selected, .fileas-selected { + font-weight: bold; +} + +#sidebar-new-group, #hide-forum-list, #forum-list, #sidebar-ungrouped, +.side-link, #peoplefind-desc, #connect-desc, .nets-all, .admin.link, #message-new { + padding-left: 10px; + padding-top: 3px; + padding-bottom: 3px; + padding-right: 5px; + display: block; +} + +a.nets-link, .side-link a, a.sidebar-group-element, #sidebar-new-group a, a.savedsearchterm, a.fileas-link, aside h4 a { + display: block; + color: black; +} + +#follow-sidebar form, #peoplefind-sidebar form, #netsearch-box form, #posted-date-selector { margin-left: 10px; + margin-top: 3px; + margin-bottom: 3px; } #sidebar-ungrouped, .side-link { padding-top: 5px; } +#forum-list a, .tool a, .admin.link a { + color: black; +} + #forum-list { margin-top: 2px; } @@ -747,8 +782,9 @@ aside { vertical-align: top; width: 185px; padding: 10px 10px 10px 20px; - border-right: 1px solid #D2D2D2; - background-color: #ECECF2; + /* border-right: 1px solid #D2D2D2; */ + /* background-color: #ECECF2; */ + background-color: #F2F2F2; font-size: 14px; /* background: #F1F1F1; */ } @@ -829,9 +865,6 @@ aside h4 { .nets-ul { margin-top: 0px; } -.nets-all { - margin-left: 10px; -} #contact-block { overflow: auto; @@ -927,12 +960,12 @@ aside h4 { margin-bottom: 0px; } .widget ul li { - padding-left: 5px; + padding-left: 10px; /* min-height: 20px; */ list-style: none; - padding-top: 0px; - padding-bottom: 0px; - margin: 5px; + padding-top: 3px; + padding-bottom: 3px; + margin: 0px; } .widget .tool.selected { background: url('../../../images/selected.png') no-repeat left center; @@ -947,7 +980,8 @@ section { display: table-cell; vertical-align: top; width: 760px; - padding: 10px 0px 10px 10px; + padding: 10px 10px 10px 10px; + background-color: white; } /* wall item */ .tread-wrapper { From 2e83034fc3d95074749052ba59a59823b097338d Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 23 Dec 2012 10:31:46 +0100 Subject: [PATCH 02/20] Vier: Background color of popup menus changed --- view/theme/vier/style.css | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 876019020f..86b290eb79 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -697,7 +697,8 @@ ul.menu-popup a { text-decoration: none; } ul.menu-popup a:hover { - background-color: #bdcdd4; + /* background-color: #bdcdd4; */ + background-color: #e5e5e5; } ul.menu-popup .menu-sep { border-top: 1px solid #9eabb0; @@ -801,6 +802,12 @@ aside .vcard dl { height: auto; overflow: auto; } + +aside select { + background-color: white; + width: 165px; +} + aside .vcard dt { float: left; margin-left: 0px; From ed4eaed7e0a77d402761d4f17f68ef7ccb3ae97e Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 23 Dec 2012 10:47:12 +0100 Subject: [PATCH 03/20] Vier: Content is now aligned left - like before. --- view/theme/vier/style.css | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 86b290eb79..48926dd620 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -266,11 +266,12 @@ body { font-family: 'Lato', "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; /* background-color: #ffffff; */ - background-color: #ddd; + /* background-color: #ddd; */ + background-color: #F2F2F2; color: #2d2d2d; margin: 37px 0px 0px 0px; display: table; - width: 100% + /* width: 100% */ } h4 { font-size: 1.1em; @@ -777,6 +778,11 @@ ul.menu-popup .empty { padding: 7px 7px 0px 0px; } +right_aside { + width: 0px; + display: block; +} + /* aside */ aside { display: table-cell; @@ -986,7 +992,8 @@ aside h4 { section { display: table-cell; vertical-align: top; - width: 760px; + width: 766px; + max-width: 766px; padding: 10px 10px 10px 10px; background-color: white; } From 3a32372ffabc0783698c17eb4c62ab9126925bae Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sun, 23 Dec 2012 10:58:04 +0100 Subject: [PATCH 04/20] vier: Problems with firefox on small displays fixed --- view/theme/vier/style.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 48926dd620..5b2b6df928 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -531,9 +531,10 @@ nav ul li .menu-popup { left: 0px; right: auto; } + nav #search-box #search-text { - /* background-image: url('icons/lupe.png'); */ - background-repeat:no-repeat; + /*background-image: url('icons/lupe.png'); + background-repeat:no-repeat; */ padding-left:0px; border-top-left-radius: 15px; border-top-right-radius: 15px; @@ -542,6 +543,8 @@ nav #search-box #search-text { position: relative; height: 17px; margin: 4px 0px 4px 4px; + width: 150px; + max-width: 150px; } nav .nav-menu-icon { From 53a4cf5339b3add212e334b2614211d9f92ca8e1 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Sun, 23 Dec 2012 06:16:35 -0700 Subject: [PATCH 05/20] only use Smarty if the view/smarty3/ directory is writable; location bug fix --- boot.php | 15 +++++++++++++++ include/conversation.php | 2 +- view/theme/cleanzero/theme.php | 2 +- view/theme/comix-plain/theme.php | 2 +- view/theme/comix/theme.php | 2 +- view/theme/darkbubble/theme.php | 2 +- view/theme/darkzero/theme.php | 2 +- view/theme/diabook/theme.php | 2 +- view/theme/dispy/theme.php | 2 +- view/theme/duepuntozero/theme.php | 2 +- view/theme/facepark/theme.php | 2 +- view/theme/frost-mobile/theme.php | 2 +- view/theme/frost/theme.php | 2 +- view/theme/greenzero/theme.php | 2 +- view/theme/purplezero/theme.php | 2 +- view/theme/quattro/theme.php | 2 +- view/theme/slackr/theme.php | 2 +- view/theme/smoothly/theme.php | 2 +- view/theme/testbubble/theme.php | 2 +- view/theme/vier/theme.php | 2 +- 20 files changed, 34 insertions(+), 19 deletions(-) diff --git a/boot.php b/boot.php index e8561a6150..08caf1a450 100644 --- a/boot.php +++ b/boot.php @@ -1946,3 +1946,18 @@ function clear_cache($basepath = "", $path = "") { closedir($dh); } } + +function set_template_engine(&$a, $engine = 'internal') { + + $a->theme['template_engine'] = 'internal'; + + if(is_writable('view/smarty3/')) { + switch($engine) { + case 'smarty3': + $a->theme['template_engine'] = 'smarty3'; + break; + default: + break; + } + } +} diff --git a/include/conversation.php b/include/conversation.php index 9cc6a83427..a5a6a992ff 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -920,7 +920,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) { $o = ''; - $geotag = (($x['allow_location']) ? get_markup_template('jot_geotag.tpl') : ''); + $geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : ''); /* $plaintext = false; if( local_user() && (intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled(local_user(),'richtext')) ) diff --git a/view/theme/cleanzero/theme.php b/view/theme/cleanzero/theme.php index c7c0b2d640..356a1b71cb 100644 --- a/view/theme/cleanzero/theme.php +++ b/view/theme/cleanzero/theme.php @@ -8,7 +8,7 @@ $a->theme_info = array( 'extends' => 'duepuntozero', ); -$a->theme['template_engine'] = 'smarty3'; +set_template_engine($a, 'smarty3'); function cleanzero_init(&$a) { $a->page['htmlhead'] .= <<< EOT diff --git a/view/theme/comix-plain/theme.php b/view/theme/comix-plain/theme.php index a85d535a72..4e5fd0d0e9 100644 --- a/view/theme/comix-plain/theme.php +++ b/view/theme/comix-plain/theme.php @@ -11,7 +11,7 @@ $a->theme_info = array( 'extends' => 'duepuntozero', ); -$a->theme['template_engine'] = 'smarty3'; +set_template_engine($a, 'smarty3'); $a->page['htmlhead'] .= <<< EOT -{{include file="field_select.tpl" field=$color}} +{{include file="file:{{$field_select}}" field=$color}} -{{include file="field_select.tpl" field=$align}} +{{include file="file:{{$field_select}}" field=$align}}
@@ -29,4 +29,4 @@ \ No newline at end of file + diff --git a/view/theme/quattro/theme_settings.tpl b/view/theme/quattro/theme_settings.tpl index 47105d7aa4..db70f07e76 100644 --- a/view/theme/quattro/theme_settings.tpl +++ b/view/theme/quattro/theme_settings.tpl @@ -1,8 +1,8 @@ -{{inc field_select.tpl with $field=$color}}{{endinc}} +{{inc $field_select with $field=$color}}{{endinc}} -{{inc field_select.tpl with $field=$align}}{{endinc}} +{{inc $field_select with $field=$align}}{{endinc}}
@@ -29,4 +29,4 @@ \ No newline at end of file + From f74a443c1bfc3e4133b8837d39741b7a4f494d6c Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Mon, 24 Dec 2012 07:59:46 -0700 Subject: [PATCH 14/20] add write access to view/smarty3/ as a requirement for the installer --- mod/install.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mod/install.php b/mod/install.php index ab6d7d204f..1eb96cf989 100755 --- a/mod/install.php +++ b/mod/install.php @@ -177,6 +177,8 @@ function install_content(&$a) { check_htconfig($checks); + check_smarty3($checks); + check_keys($checks); if(x($_POST,'phpath')) @@ -441,6 +443,22 @@ function check_htconfig(&$checks) { } +function check_smarty3(&$checks) { + $status = true; + $help = ""; + if( !is_writable('view/smarty3') ) { + + $status=false; + $help = t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') .EOL; + $help .= t('In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder.').EOL; + $help .= t('Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder.').EOL; + $help .= t('Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files (.tpl) that it contains.').EOL; + } + + check_add($checks, t('view/smarty3 is writable'), $status, true, $help); + +} + function check_htaccess(&$checks) { $a = get_app(); $status = true; From ce445a385fe5c5f7264ff950060276cfdd03a9ad Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Mon, 24 Dec 2012 08:44:26 -0700 Subject: [PATCH 15/20] fix a few more templates for correction conversion to Smarty3 templates --- mod/fbrowser.php | 2 ++ view/filebrowser.tpl | 2 +- view/notifications_network_item.tpl | 4 ++-- view/theme/frost/filebrowser.tpl | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/mod/fbrowser.php b/mod/fbrowser.php index 92c6bd3b4b..075846e506 100644 --- a/mod/fbrowser.php +++ b/mod/fbrowser.php @@ -78,6 +78,7 @@ function fbrowser_content($a){ '$path' => $path, '$folders' => $albums, '$files' =>$files, + '$cancel' => t('Cancel'), )); @@ -112,6 +113,7 @@ function fbrowser_content($a){ '$path' => array( array($a->get_baseurl()."/fbrowser/image/", t("Files")) ), '$folders' => false, '$files' =>$files, + '$cancel' => t('Cancel'), )); } diff --git a/view/filebrowser.tpl b/view/filebrowser.tpl index 1e97237f47..7db31d716f 100644 --- a/view/filebrowser.tpl +++ b/view/filebrowser.tpl @@ -77,7 +77,7 @@
- +
diff --git a/view/notifications_network_item.tpl b/view/notifications_network_item.tpl index bd86548fce..261ab36432 100644 --- a/view/notifications_network_item.tpl +++ b/view/notifications_network_item.tpl @@ -1,3 +1,3 @@ \ No newline at end of file + $item_text $item_when + diff --git a/view/theme/frost/filebrowser.tpl b/view/theme/frost/filebrowser.tpl index e9eafde1e6..9fe3c04ffe 100644 --- a/view/theme/frost/filebrowser.tpl +++ b/view/theme/frost/filebrowser.tpl @@ -77,7 +77,7 @@
- +
From f0f8d0f6870f9f46c8e54caeeadb7e49d89b92d7 Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Mon, 24 Dec 2012 12:52:49 -0700 Subject: [PATCH 16/20] delete cookie on browser close after logout --- include/auth.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/auth.php b/include/auth.php index b534d4a4d3..4c695cc1e3 100644 --- a/include/auth.php +++ b/include/auth.php @@ -5,6 +5,8 @@ require_once('include/security.php'); require_once('include/datetime.php'); function nuke_session() { + new_cookie(0); // make sure cookie is deleted on browser close, as a security measure + unset($_SESSION['authenticated']); unset($_SESSION['uid']); unset($_SESSION['visitor_id']); @@ -187,18 +189,10 @@ else { // (i.e. expire when the browser is closed), even when there's a time expiration // on the cookie if($_POST['remember']) { - $old_sid = session_id(); - session_set_cookie_params('31449600'); // one year - session_regenerate_id(false); - - q("UPDATE session SET sid = '%s' WHERE sid = '%s'", dbesc(session_id()), dbesc($old_sid)); + new_cookie(31449600); // one year } else { - $old_sid = session_id(); - session_set_cookie_params('0'); - session_regenerate_id(false); - - q("UPDATE session SET sid = '%s' WHERE sid = '%s'", dbesc(session_id()), dbesc($old_sid)); + new_cookie(0); // 0 means delete on browser exit } // if we haven't failed up this point, log them in. @@ -208,4 +202,10 @@ else { } } +function new_cookie($time) { + $old_sid = session_id(); + session_set_cookie_params("$time"); + session_regenerate_id(false); + q("UPDATE session SET sid = '%s' WHERE sid = '%s'", dbesc(session_id()), dbesc($old_sid)); +} From 11c06e21b7a656c4aeae0d5c157e1db97d6db02e Mon Sep 17 00:00:00 2001 From: Zach Prezkuta Date: Tue, 25 Dec 2012 11:48:02 -0700 Subject: [PATCH 17/20] simplify by making Smarty include directives behave like Friendica native ones --- boot.php | 19 +---- include/friendica_smarty.php | 20 +++-- include/text.php | 16 +--- mod/admin.php | 29 +------ mod/contacts.php | 15 +--- mod/filer.php | 9 +- mod/group.php | 8 +- mod/install.php | 35 ++++---- mod/message.php | 8 +- mod/nogroup.php | 8 +- mod/notifications.php | 49 ++--------- mod/notify.php | 7 +- mod/photos.php | 8 +- mod/poco.php | 8 +- mod/settings.php | 65 ++------------ mod/uimport.php | 8 +- mod/viewcontacts.php | 8 +- view/admin_logs.tpl | 6 +- view/admin_remoteupdate.tpl | 8 +- view/admin_site.tpl | 84 +++++++++---------- view/api_friends_xml.tpl | 2 +- view/api_timeline_xml.tpl | 2 +- view/contact_edit.tpl | 2 +- view/contacts-template.tpl | 2 +- view/field.tpl | 2 +- view/filer_dialog.tpl | 2 +- view/group_edit.tpl | 4 +- view/install_db.tpl | 8 +- view/install_settings.tpl | 2 +- view/intros.tpl | 4 +- view/login.tpl | 8 +- view/mail_display.tpl | 4 +- view/nogroup-template.tpl | 2 +- view/notifications.tpl | 2 +- view/pagetypes.tpl | 10 +-- view/photos_recent.tpl | 2 +- view/poco_xml.tpl | 2 +- view/profile_vcard.tpl | 2 +- view/settings.tpl | 52 ++++++------ view/settings_connectors.tpl | 20 ++--- view/settings_display.tpl | 10 +-- view/settings_features.tpl | 2 +- view/settings_oauth_edit.tpl | 10 +-- view/suggestions.tpl | 2 +- view/theme/cleanzero/config.php | 9 +- view/theme/cleanzero/theme_settings.tpl | 8 +- view/theme/diabook/communityhome.tpl | 28 +++---- view/theme/diabook/config.php | 10 +-- view/theme/diabook/login.tpl | 6 +- view/theme/diabook/mail_display.tpl | 4 +- view/theme/diabook/profile_vcard.tpl | 2 +- view/theme/diabook/theme.php | 21 ++--- view/theme/diabook/theme_settings.tpl | 36 ++++---- view/theme/dispy/config.php | 8 +- view/theme/dispy/profile_vcard.tpl | 2 +- view/theme/duepuntozero/profile_vcard.tpl | 2 +- view/theme/facepark/profile_vcard.tpl | 2 +- view/theme/frost-mobile/admin_site.tpl | 68 +++++++-------- view/theme/frost-mobile/contacts-template.tpl | 2 +- view/theme/frost-mobile/login.tpl | 8 +- view/theme/frost-mobile/profile_vcard.tpl | 2 +- view/theme/frost-mobile/settings.tpl | 50 +++++------ view/theme/frost/admin_site.tpl | 81 ++++++++++-------- view/theme/frost/contacts-template.tpl | 2 +- view/theme/frost/login.tpl | 8 +- view/theme/frost/profile_vcard.tpl | 2 +- view/theme/quattro/config.php | 8 +- view/theme/quattro/mail_display.tpl | 4 +- view/theme/quattro/profile_vcard.tpl | 2 +- view/theme/smoothly/login.tpl | 6 +- view/theme/testbubble/profile_vcard.tpl | 2 +- view/uimport.tpl | 2 +- view/viewcontact_template.tpl | 2 +- 73 files changed, 376 insertions(+), 587 deletions(-) diff --git a/boot.php b/boot.php index d8bc174b4a..640fef5413 100644 --- a/boot.php +++ b/boot.php @@ -969,16 +969,7 @@ if(! function_exists('login')) { $a->module = 'login'; } - - $includes = array( - '$field_input' => 'field_input.tpl', - '$field_password' => 'field_password.tpl', - '$field_openid' => 'field_openid.tpl', - '$field_checkbox' => 'field_checkbox.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($tpl,$includes + array( + $o .= replace_macros($tpl, array( '$dest_url' => $dest_url, '$logout' => t('Logout'), @@ -997,6 +988,7 @@ if(! function_exists('login')) { '$lostpass' => t('Forgot your password?'), '$lostlink' => t('Password Reset'), + )); call_hooks('login_hook',$o); @@ -1348,15 +1340,10 @@ if(! function_exists('profile_sidebar')) { $tpl = get_markup_template('profile_vcard.tpl'); - $includes = array( - '$diaspora_vcard' => 'diaspora_vcard.tpl' - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - if($a->theme['template_engine'] === 'internal') $location = template_escape($location); - $o .= replace_macros($tpl, $includes + array( + $o .= replace_macros($tpl, array( '$profile' => $profile, '$connect' => $connect, '$wallmessage' => $wallmessage, diff --git a/include/friendica_smarty.php b/include/friendica_smarty.php index 2a294e9e24..9ad14ad8a4 100644 --- a/include/friendica_smarty.php +++ b/include/friendica_smarty.php @@ -5,20 +5,24 @@ require_once("library/Smarty/libs/Smarty.class.php"); class FriendicaSmarty extends Smarty { public $filename; - public $root; function __construct() { parent::__construct(); $a = get_app(); + $theme = current_theme(); - //$this->root = $_SERVER['DOCUMENT_ROOT'] . '/'; - $this->root = ''; + // setTemplateDir can be set to an array, which Smarty will parse in order. + // The order is thus very important here + $template_dirs = array('theme' => "view/theme/$theme/smarty3/"); + if( x($a->theme_info,"extends") ) + $template_dirs = $template_dirs + array('extends' => "view/theme/".$a->theme_info["extends"]."/smarty3/"); + $template_dirs = $template_dirs + array('base' => 'view/smarty3/'); + $this->setTemplateDir($template_dirs); - $this->setTemplateDir($this->root . 'view/smarty3/'); - $this->setCompileDir($this->root . 'view/smarty3/compiled/'); - $this->setConfigDir($this->root . 'view/smarty3/config/'); - $this->setCacheDir($this->root . 'view/smarty3/cache/'); + $this->setCompileDir('view/smarty3/compiled/'); + $this->setConfigDir('view/smarty3/config/'); + $this->setCacheDir('view/smarty3/cache/'); $this->left_delimiter = $a->smarty3_ldelim; $this->right_delimiter = $a->smarty3_rdelim; @@ -28,7 +32,7 @@ class FriendicaSmarty extends Smarty { if($template) { return $this->fetch('string:' . $template); } - return $this->fetch('file:' . $this->root . $this->filename); + return $this->fetch('file:' . $this->filename); } } diff --git a/include/text.php b/include/text.php index 0591390a84..58f69449f4 100644 --- a/include/text.php +++ b/include/text.php @@ -477,6 +477,7 @@ function get_markup_template($s, $root = '') { // $tt = microtime() - $ts; // $a->page['debug'] .= "$tt
\n"; // return $file_contents; +// logger($template_file); return file_get_contents($template_file); } }} @@ -499,21 +500,6 @@ function get_template_file($a, $filename, $root = '') { return $template_file; }} -if(! function_exists("set_template_includes")) { -function set_template_includes($engine, $includes) { - if($engine === 'smarty3') { - $a = get_app(); - foreach($includes as $name=>$path) { -// $sm_includes[$name] = $_SERVER['DOCUMENT_ROOT'] . '/' . get_template_file($a, 'smarty3/' . $path); - $sm_includes[$name] = get_template_file($a, 'smarty3/' . $path); - } - return $sm_includes; - } - else { - return $includes; - } -}} - diff --git a/mod/admin.php b/mod/admin.php index c951dd8b9c..0381fcf4cc 100644 --- a/mod/admin.php +++ b/mod/admin.php @@ -455,16 +455,7 @@ function admin_page_site(&$a) { ); $t = get_markup_template("admin_site.tpl"); - - $includes = array( - '$field_checkbox' => 'field_checkbox.tpl', - '$field_input' => 'field_input.tpl', - '$field_select' => 'field_select.tpl', - '$field_textarea' => 'field_textarea.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - return replace_macros($t, $includes + array( + return replace_macros($t, array( '$title' => t('Administration'), '$page' => t('Site'), '$submit' => t('Submit'), @@ -1144,14 +1135,7 @@ readable."); } } - $includes = array( - '$field_checkbox' => 'field_checkbox.tpl', - '$field_input' => 'field_input.tpl', - '$field_select' => 'field_select.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - return replace_macros($t, $includes + array( + return replace_macros($t, array( '$title' => t('Administration'), '$page' => t('Logs'), '$submit' => t('Submit'), @@ -1210,14 +1194,7 @@ function admin_page_remoteupdate(&$a) { } $tpl = get_markup_template("admin_remoteupdate.tpl"); - - $includes = array( - '$field_input' => 'field_input.tpl', - '$field_password' => 'field_password.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - return replace_macros($tpl, $includes + array( + return replace_macros($tpl, array( '$baseurl' => $a->get_baseurl(true), '$submit' => t("Update now"), '$close' => t("Close"), diff --git a/mod/contacts.php b/mod/contacts.php index 1a57afbf5a..6e62ec8ef5 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -346,12 +346,7 @@ function contacts_content(&$a) { $lost_contact = (($contact['archive'] && $contact['term-date'] != '0000-00-00 00:00:00' && $contact['term-date'] < datetime_convert('','','now')) ? t('Communications lost with this contact!') : ''); - $includes = array( - '$field_checkbox' => 'field_checkbox.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($tpl,$includes + array( + $o .= replace_macros($tpl, array( '$header' => t('Contact Editor'), '$tab_str' => $tab_str, '$submit' => t('Submit'), @@ -576,13 +571,7 @@ function contacts_content(&$a) { } $tpl = get_markup_template("contacts-template.tpl"); - - $includes = array( - '$contact_template' => 'contact_template.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($tpl,$includes + array( + $o .= replace_macros($tpl, array( '$header' => t('Contacts') . (($nets) ? ' - ' . network_to_name($nets) : ''), '$tabs' => $t, '$total' => $total, diff --git a/mod/filer.php b/mod/filer.php index c811ba6e2f..4e79f337dc 100644 --- a/mod/filer.php +++ b/mod/filer.php @@ -24,14 +24,9 @@ function filer_content(&$a) { $filetags = get_pconfig(local_user(),'system','filetags'); $filetags = file_tag_file_to_list($filetags,'file'); $filetags = explode(",", $filetags); + $tpl = get_markup_template("filer_dialog.tpl"); - - $includes = array( - '$field_combobox' => 'field_combobox.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o = replace_macros($tpl,$includes + array( + $o = replace_macros($tpl, array( '$field' => array('term', t("Save to Folder:"), '', '', $filetags, t('- select -')), '$submit' => t('Save'), )); diff --git a/mod/group.php b/mod/group.php index f5a37819ed..13a899ed96 100644 --- a/mod/group.php +++ b/mod/group.php @@ -83,13 +83,7 @@ function group_content(&$a) { $tpl = get_markup_template('group_edit.tpl'); - $includes = array( - '$field_input' => 'field_input.tpl', - '$groupeditortpl' => 'groupeditor.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $context = $includes + array( + $context = array( '$submit' => t('Submit'), ); diff --git a/mod/install.php b/mod/install.php index ab6d7d204f..d4e04c1a9d 100755 --- a/mod/install.php +++ b/mod/install.php @@ -177,6 +177,8 @@ function install_content(&$a) { check_htconfig($checks); + check_smarty3($checks); + check_keys($checks); if(x($_POST,'phpath')) @@ -220,14 +222,7 @@ function install_content(&$a) { $tpl = get_markup_template('install_db.tpl'); - - $includes = array( - '$field_input' => 'field_input.tpl', - '$field_password' => 'field_password.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($tpl,$includes + array( + $o .= replace_macros($tpl, array( '$title' => $install_title, '$pass' => t('Database connection'), '$info_01' => t('In order to install Friendica we need to know how to connect to your database.'), @@ -267,13 +262,7 @@ function install_content(&$a) { $timezone = ((x($_POST,'timezone')) ? ($_POST['timezone']) : 'America/Los_Angeles'); $tpl = get_markup_template('install_settings.tpl'); - - $includes = array( - '$field_input' => 'field_input.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($tpl, $includes + array( + $o .= replace_macros($tpl, array( '$title' => $install_title, '$pass' => t('Site settings'), @@ -441,6 +430,22 @@ function check_htconfig(&$checks) { } +function check_smarty3(&$checks) { + $status = true; + $help = ""; + if( !is_writable('view/smarty3') ) { + + $status=false; + $help = t('Friendica uses the Smarty3 template engine to render its web views. Smarty3 compiles templates to PHP to speed up rendering.') .EOL; + $help .= t('In order to store these compiled templates, the web server needs to have write access to the directory view/smarty3/ under the Friendica top level folder.').EOL; + $help .= t('Please ensure that the user that your web server runs as (e.g. www-data) has write access to this folder.').EOL; + $help .= t('Note: as a security measure, you should give the web server write access to view/smarty3/ only--not the template files (.tpl) that it contains.').EOL; + } + + check_add($checks, t('view/smarty3 is writable'), $status, true, $help); + +} + function check_htaccess(&$checks) { $a = get_app(); $status = true; diff --git a/mod/message.php b/mod/message.php index 7ca3fba70a..26275ceab7 100644 --- a/mod/message.php +++ b/mod/message.php @@ -497,12 +497,6 @@ function message_content(&$a) { $tpl = get_markup_template('mail_display.tpl'); - $includes = array( - '$mail_conv' => 'mail_conv.tpl', - '$prv_message' => 'prv_message.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - if($a->theme['template_engine'] === 'internal') { $subjtxt_e = template_escape($message['title']); } @@ -510,7 +504,7 @@ function message_content(&$a) { $subjtxt_e = $message['title']; } - $o = replace_macros($tpl, $includes + array( + $o = replace_macros($tpl, array( '$thread_id' => $a->argv[1], '$thread_subject' => $message['title'], '$thread_seen' => $seen, diff --git a/mod/nogroup.php b/mod/nogroup.php index 885ba62c63..24d99a59b6 100644 --- a/mod/nogroup.php +++ b/mod/nogroup.php @@ -55,13 +55,7 @@ function nogroup_content(&$a) { } $tpl = get_markup_template("nogroup-template.tpl"); - - $includes = array( - '$contact_template' => 'contact_template.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($tpl,$includes + array( + $o .= replace_macros($tpl, array( '$header' => t('Contacts who are not members of a group'), '$contacts' => $contacts, '$paginate' => paginate($a), diff --git a/mod/notifications.php b/mod/notifications.php index 03a39a268e..128317eb47 100644 --- a/mod/notifications.php +++ b/mod/notifications.php @@ -145,12 +145,7 @@ function notifications_content(&$a) { $return_addr = bin2hex($a->user['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : '')); - $includes = array( - '$field_checkbox' => 'field_checkbox.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $notif_content .= replace_macros($sugg,$includes + array( + $notif_content .= replace_macros($sugg, array( '$str_notifytype' => t('Notification type: '), '$notify_type' => t('Friend Suggestion'), '$intro_id' => $rr['intro_id'], @@ -196,12 +191,7 @@ function notifications_content(&$a) { )); } - $includes = array( - '$field_checkbox' => 'field_checkbox.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $notif_content .= replace_macros($tpl,$includes + array( + $notif_content .= replace_macros($tpl, array( '$str_notifytype' => t('Notification type: '), '$notify_type' => (($rr['network'] !== NETWORK_OSTATUS) ? t('Friend/Connect Request') : t('New Follower')), '$dfrn_text' => $dfrn_text, @@ -226,12 +216,7 @@ function notifications_content(&$a) { else info( t('No introductions.') . EOL); - $includes = array( - '$common_tabs' => 'common_tabs.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($notif_tpl,$includes + array( + $o .= replace_macros($notif_tpl, array( '$notif_header' => t('Notifications'), '$tabs_data' => $tabs, '$notif_content' => $notif_content, @@ -317,12 +302,7 @@ function notifications_content(&$a) { $notif_content = t('No more network notifications.'); } - $includes = array( - '$common_tabs' => 'common_tabs.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($notif_tpl,$includes + array( + $o .= replace_macros($notif_tpl, array( '$notif_header' => t('Network Notifications'), '$tabs_data' => $tabs, '$notif_content' => $notif_content, @@ -352,12 +332,7 @@ function notifications_content(&$a) { $notif_content .= t('No more system notifications.'); } - $includes = array( - '$common_tabs' => 'common_tabs.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($notif_tpl,$includes + array( + $o .= replace_macros($notif_tpl, array( '$notif_header' => t('System Notifications'), '$tabs_data' => $tabs, '$notif_content' => $notif_content, @@ -452,12 +427,7 @@ function notifications_content(&$a) { $notif_content = t('No more personal notifications.'); } - $includes = array( - '$common_tabs' => 'common_tabs.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($notif_tpl,$includes + array( + $o .= replace_macros($notif_tpl, array( '$notif_header' => t('Personal Notifications'), '$tabs_data' => $tabs, '$notif_content' => $notif_content, @@ -538,12 +508,7 @@ function notifications_content(&$a) { $notif_content = t('No more home notifications.'); } - $includes = array( - '$common_tabs' => 'common_tabs.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($notif_tpl,$includes + array( + $o .= replace_macros($notif_tpl, array( '$notif_header' => t('Home Notifications'), '$tabs_data' => $tabs, '$notif_content' => $notif_content, diff --git a/mod/notify.php b/mod/notify.php index 3abc1185cf..6ff437a38c 100644 --- a/mod/notify.php +++ b/mod/notify.php @@ -61,12 +61,7 @@ function notify_content(&$a) { $notif_content .= t('No more system notifications.'); } - $includes = array( - '$common_tabs' => 'common_tabs.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($notif_tpl,$includes + array( + $o .= replace_macros($notif_tpl, array( '$notif_header' => t('System Notifications'), '$tabs_data' => '', // $tabs, '$notif_content' => $notif_content, diff --git a/mod/photos.php b/mod/photos.php index 8ac4d85903..7035c66904 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1679,13 +1679,7 @@ function photos_content(&$a) { } $tpl = get_markup_template('photos_recent.tpl'); - - $includes = array( - '$photo_top' => 'photo_top.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($tpl,$includes + array( + $o .= replace_macros($tpl, array( '$title' => t('Recent Photos'), '$can_post' => $can_post, '$upload' => array(t('Upload New Photos'), $a->get_baseurl().'/photos/'.$a->data['user']['nickname'].'/upload'), diff --git a/mod/poco.php b/mod/poco.php index abe2c8e35d..ae5f0cef4e 100644 --- a/mod/poco.php +++ b/mod/poco.php @@ -147,13 +147,7 @@ function poco_init(&$a) { if($format === 'xml') { header('Content-type: text/xml'); - - $includes = array( - '$poco_entry_xml' => 'poco_entry_xml.tpl' - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - echo replace_macros(get_markup_template('poco_xml.tpl'),array_xmlify($includes + array('$response' => $ret))); + echo replace_macros(get_markup_template('poco_xml.tpl'),array_xmlify(array('$response' => $ret))); http_status_exit(500); } if($format === 'json') { diff --git a/mod/settings.php b/mod/settings.php index 09a45f832a..dbdd40bc36 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -554,13 +554,7 @@ function settings_content(&$a) { if(($a->argc > 2) && ($a->argv[2] === 'add')) { $tpl = get_markup_template("settings_oauth_edit.tpl"); - - $includes = array( - '$field_input' => 'field_input.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($tpl, $includes + array( + $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("settings_oauth"), '$title' => t('Add application'), '$submit' => t('Submit'), @@ -586,13 +580,7 @@ function settings_content(&$a) { $app = $r[0]; $tpl = get_markup_template("settings_oauth_edit.tpl"); - - $includes = array( - '$field_input' => 'field_input.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($tpl, $includes + array( + $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("settings_oauth"), '$title' => t('Add application'), '$submit' => t('Update'), @@ -675,13 +663,7 @@ function settings_content(&$a) { $tpl = get_markup_template("settings_features.tpl"); - - $includes = array( - '$field_yesno' => 'field_yesno.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($tpl, $includes + array( + $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("settings_features"), '$title' => t('Additional Features'), '$features' => $arr, @@ -733,16 +715,7 @@ function settings_content(&$a) { } - $includes = array( - '$field_checkbox' => 'field_checkbox.tpl', - '$field_input' => 'field_input.tpl', - '$field_select' => 'field_select.tpl', - '$field_custom' => 'field_custom.tpl', - '$field_password' => 'field_password.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($tpl, $includes + array( + $o .= replace_macros($tpl, array( '$form_security_token' => get_form_security_token("settings_connectors"), '$title' => t('Connector Settings'), @@ -832,15 +805,7 @@ function settings_content(&$a) { } $tpl = get_markup_template("settings_display.tpl"); - - $includes = array( - '$field_themeselect' => 'field_themeselect.tpl', - '$field_checkbox' => 'field_checkbox.tpl', - '$field_input' => 'field_input.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o = replace_macros($tpl, $includes + array( + $o = replace_macros($tpl, array( '$ptitle' => t('Display Settings'), '$form_security_token' => get_form_security_token("settings_display"), '$submit' => t('Submit'), @@ -926,13 +891,7 @@ function settings_content(&$a) { $pageset_tpl = get_markup_template('pagetypes.tpl'); - - $includes = array( - '$field_radio' => 'field_radio.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $pagetype = replace_macros($pageset_tpl,$includes + array( + $pagetype = replace_macros($pageset_tpl, array( '$page_normal' => array('page-flags', t('Normal Account Page'), PAGE_NORMAL, t('This account is a normal personal profile'), ($a->user['page-flags'] == PAGE_NORMAL)), @@ -1053,17 +1012,7 @@ function settings_content(&$a) { require_once('include/group.php'); $group_select = mini_group_select(local_user(),$a->user['def_gid']); - $includes = array( - '$field_password' => 'field_password.tpl', - '$field_input' => 'field_input.tpl', - '$field_custom' => 'field_custom.tpl', - '$field_checkbox' => 'field_checkbox.tpl', - '$field_yesno' => 'field_yesno.tpl', - '$field_intcheckbox' => 'field_intcheckbox.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($stpl,$includes + array( + $o .= replace_macros($stpl, array( '$ptitle' => t('Account Settings'), '$submit' => t('Submit'), diff --git a/mod/uimport.php b/mod/uimport.php index d28198f69a..6cca08cdaf 100644 --- a/mod/uimport.php +++ b/mod/uimport.php @@ -60,13 +60,7 @@ function uimport_content(&$a) { $tpl = get_markup_template("uimport.tpl"); - - $includes = array( - '$field_custom' => 'field_custom.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - return replace_macros($tpl, $includes + array( + return replace_macros($tpl, array( '$regbutt' => t('Import'), '$import' => array( 'title' => t("Move account"), diff --git a/mod/viewcontacts.php b/mod/viewcontacts.php index f54a76be4c..8e261e7115 100644 --- a/mod/viewcontacts.php +++ b/mod/viewcontacts.php @@ -72,13 +72,7 @@ function viewcontacts_content(&$a) { $tpl = get_markup_template("viewcontact_template.tpl"); - - $includes = array( - '$contact_template' => 'contact_template.tpl', - ); - $includes = set_template_includes($a->theme['template_engine'], $includes); - - $o .= replace_macros($tpl, $includes + array( + $o .= replace_macros($tpl, array( '$title' => t('View Contacts'), '$contacts' => $contacts, '$paginate' => paginate($a), diff --git a/view/admin_logs.tpl b/view/admin_logs.tpl index db1b00c112..b777cf4201 100644 --- a/view/admin_logs.tpl +++ b/view/admin_logs.tpl @@ -4,9 +4,9 @@
- {{ inc $field_checkbox with $field=$debugging }}{{ endinc }} - {{ inc $field_input with $field=$logfile }}{{ endinc }} - {{ inc $field_select with $field=$loglevel }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$debugging }}{{ endinc }} + {{ inc field_input.tpl with $field=$logfile }}{{ endinc }} + {{ inc field_select.tpl with $field=$loglevel }}{{ endinc }}
diff --git a/view/admin_remoteupdate.tpl b/view/admin_remoteupdate.tpl index 844cbad272..874c6e6267 100644 --- a/view/admin_remoteupdate.tpl +++ b/view/admin_remoteupdate.tpl @@ -84,10 +84,10 @@

Your friendica installation is not writable by web server.

{{ if $canftp }}

You can try to update via FTP

- {{ inc $field_input with $field=$ftphost }}{{ endinc }} - {{ inc $field_input with $field=$ftppath }}{{ endinc }} - {{ inc $field_input with $field=$ftpuser }}{{ endinc }} - {{ inc $field_password with $field=$ftppwd }}{{ endinc }} + {{ inc field_input.tpl with $field=$ftphost }}{{ endinc }} + {{ inc field_input.tpl with $field=$ftppath }}{{ endinc }} + {{ inc field_input.tpl with $field=$ftpuser }}{{ endinc }} + {{ inc field_password.tpl with $field=$ftppwd }}{{ endinc }}
{{ endif }} {{ endif }} diff --git a/view/admin_site.tpl b/view/admin_site.tpl index 24cd12b0cb..38d1fb8d04 100644 --- a/view/admin_site.tpl +++ b/view/admin_site.tpl @@ -41,65 +41,65 @@ - {{ inc $field_input with $field=$sitename }}{{ endinc }} - {{ inc $field_textarea with $field=$banner }}{{ endinc }} - {{ inc $field_select with $field=$language }}{{ endinc }} - {{ inc $field_select with $field=$theme }}{{ endinc }} - {{ inc $field_select with $field=$theme_mobile }}{{ endinc }} - {{ inc $field_select with $field=$ssl_policy }}{{ endinc }} - {{ inc $field_checkbox with $field=$new_share }}{{ endinc }} + {{ inc field_input.tpl with $field=$sitename }}{{ endinc }} + {{ inc field_textarea.tpl with $field=$banner }}{{ endinc }} + {{ inc field_select.tpl with $field=$language }}{{ endinc }} + {{ inc field_select.tpl with $field=$theme }}{{ endinc }} + {{ inc field_select.tpl with $field=$theme_mobile }}{{ endinc }} + {{ inc field_select.tpl with $field=$ssl_policy }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$new_share }}{{ endinc }}

$registration

- {{ inc $field_input with $field=$register_text }}{{ endinc }} - {{ inc $field_select with $field=$register_policy }}{{ endinc }} - {{ inc $field_input with $field=$daily_registrations }}{{ endinc }} - {{ inc $field_checkbox with $field=$no_multi_reg }}{{ endinc }} - {{ inc $field_checkbox with $field=$no_openid }}{{ endinc }} - {{ inc $field_checkbox with $field=$no_regfullname }}{{ endinc }} + {{ inc field_input.tpl with $field=$register_text }}{{ endinc }} + {{ inc field_select.tpl with $field=$register_policy }}{{ endinc }} + {{ inc field_input.tpl with $field=$daily_registrations }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$no_multi_reg }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$no_openid }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$no_regfullname }}{{ endinc }}

$upload

- {{ inc $field_input with $field=$maximagesize }}{{ endinc }} - {{ inc $field_input with $field=$maximagelength }}{{ endinc }} - {{ inc $field_input with $field=$jpegimagequality }}{{ endinc }} + {{ inc field_input.tpl with $field=$maximagesize }}{{ endinc }} + {{ inc field_input.tpl with $field=$maximagelength }}{{ endinc }} + {{ inc field_input.tpl with $field=$jpegimagequality }}{{ endinc }}

$corporate

- {{ inc $field_input with $field=$allowed_sites }}{{ endinc }} - {{ inc $field_input with $field=$allowed_email }}{{ endinc }} - {{ inc $field_checkbox with $field=$block_public }}{{ endinc }} - {{ inc $field_checkbox with $field=$force_publish }}{{ endinc }} - {{ inc $field_checkbox with $field=$no_community_page }}{{ endinc }} - {{ inc $field_checkbox with $field=$ostatus_disabled }}{{ endinc }} - {{ inc $field_checkbox with $field=$diaspora_enabled }}{{ endinc }} - {{ inc $field_checkbox with $field=$dfrn_only }}{{ endinc }} - {{ inc $field_input with $field=$global_directory }}{{ endinc }} - {{ inc $field_checkbox with $field=$thread_allow }}{{ endinc }} - {{ inc $field_checkbox with $field=$newuser_private }}{{ endinc }} + {{ inc field_input.tpl with $field=$allowed_sites }}{{ endinc }} + {{ inc field_input.tpl with $field=$allowed_email }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$block_public }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$force_publish }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$no_community_page }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$ostatus_disabled }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$diaspora_enabled }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$dfrn_only }}{{ endinc }} + {{ inc field_input.tpl with $field=$global_directory }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$thread_allow }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$newuser_private }}{{ endinc }}

$advanced

- {{ inc $field_checkbox with $field=$no_utf }}{{ endinc }} - {{ inc $field_checkbox with $field=$verifyssl }}{{ endinc }} - {{ inc $field_input with $field=$proxy }}{{ endinc }} - {{ inc $field_input with $field=$proxyuser }}{{ endinc }} - {{ inc $field_input with $field=$timeout }}{{ endinc }} - {{ inc $field_input with $field=$delivery_interval }}{{ endinc }} - {{ inc $field_input with $field=$poll_interval }}{{ endinc }} - {{ inc $field_input with $field=$maxloadavg }}{{ endinc }} - {{ inc $field_input with $field=$abandon_days }}{{ endinc }} - {{ inc $field_input with $field=$lockpath }}{{ endinc }} - {{ inc $field_input with $field=$temppath }}{{ endinc }} - {{ inc $field_input with $field=$basepath }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$no_utf }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$verifyssl }}{{ endinc }} + {{ inc field_input.tpl with $field=$proxy }}{{ endinc }} + {{ inc field_input.tpl with $field=$proxyuser }}{{ endinc }} + {{ inc field_input.tpl with $field=$timeout }}{{ endinc }} + {{ inc field_input.tpl with $field=$delivery_interval }}{{ endinc }} + {{ inc field_input.tpl with $field=$poll_interval }}{{ endinc }} + {{ inc field_input.tpl with $field=$maxloadavg }}{{ endinc }} + {{ inc field_input.tpl with $field=$abandon_days }}{{ endinc }} + {{ inc field_input.tpl with $field=$lockpath }}{{ endinc }} + {{ inc field_input.tpl with $field=$temppath }}{{ endinc }} + {{ inc field_input.tpl with $field=$basepath }}{{ endinc }}

$performance

- {{ inc $field_checkbox with $field=$use_fulltext_engine }}{{ endinc }} - {{ inc $field_input with $field=$itemcache }}{{ endinc }} - {{ inc $field_input with $field=$itemcache_duration }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$use_fulltext_engine }}{{ endinc }} + {{ inc field_input.tpl with $field=$itemcache }}{{ endinc }} + {{ inc field_input.tpl with $field=$itemcache_duration }}{{ endinc }}
diff --git a/view/api_friends_xml.tpl b/view/api_friends_xml.tpl index 1cabd295da..9bdf53222d 100644 --- a/view/api_friends_xml.tpl +++ b/view/api_friends_xml.tpl @@ -2,6 +2,6 @@ {{for $users as $u }} - {{inc $api_user_xml with $user=$u }}{{endinc}} + {{inc api_user_xml.tpl with $user=$u }}{{endinc}} {{endfor}} diff --git a/view/api_timeline_xml.tpl b/view/api_timeline_xml.tpl index df55d807ad..4a32b411b5 100644 --- a/view/api_timeline_xml.tpl +++ b/view/api_timeline_xml.tpl @@ -10,7 +10,7 @@ $status.in_reply_to_screen_name $status.geo $status.favorited -{{ inc $api_user_xml with $user=$status.user }}{{ endinc }} $status.statusnet_html +{{ inc api_user_xml.tpl with $user=$status.user }}{{ endinc }} $status.statusnet_html $status.statusnet_conversation_id $status.url $status.coordinates diff --git a/view/contact_edit.tpl b/view/contact_edit.tpl index a11e252b4a..c68ca7f1db 100644 --- a/view/contact_edit.tpl +++ b/view/contact_edit.tpl @@ -65,7 +65,7 @@ {{ endif }}
- {{inc $field_checkbox with $field=$hidden }}{{endinc}} + {{inc field_checkbox.tpl with $field=$hidden }}{{endinc}}

$lbl_info1

diff --git a/view/contacts-template.tpl b/view/contacts-template.tpl index efd426bba3..69e3202c37 100644 --- a/view/contacts-template.tpl +++ b/view/contacts-template.tpl @@ -15,7 +15,7 @@ $tabs {{ for $contacts as $c }} - {{ inc $contact_template with $contact=$c }}{{ endinc }} + {{ inc contact_template.tpl with $contact=$c }}{{ endinc }} {{ endfor }}
diff --git a/view/field.tpl b/view/field.tpl index 6119ccf22b..35f5afd39c 100644 --- a/view/field.tpl +++ b/view/field.tpl @@ -1,4 +1,4 @@ {{ if $field.0==select }} - {{ inc $field_select }}{{ endinc }} + {{ inc field_select.tpl }}{{ endinc }} {{ endif }} diff --git a/view/filer_dialog.tpl b/view/filer_dialog.tpl index f7a253ba50..ae837d6b74 100644 --- a/view/filer_dialog.tpl +++ b/view/filer_dialog.tpl @@ -1,4 +1,4 @@ -{{ inc $field_combobox }}{{ endinc }} +{{ inc field_combobox.tpl }}{{ endinc }}
diff --git a/view/group_edit.tpl b/view/group_edit.tpl index d60a1b0f97..35d2981118 100644 --- a/view/group_edit.tpl +++ b/view/group_edit.tpl @@ -5,7 +5,7 @@ - {{ inc $field_input with $field=$gname }}{{ endinc }} + {{ inc field_input.tpl with $field=$gname }}{{ endinc }} {{ if $drop }}$drop{{ endif }}
@@ -17,7 +17,7 @@ {{ if $groupedit_info }}
- {{ inc $groupeditortpl with $groupeditor=$groupedit_info }}{{ endinc }} + {{ inc groupeditor.tpl with $groupeditor=$groupedit_info }}{{ endinc }}
{{ endif }} {{ if $desc }}
$desc
{{ endif }} diff --git a/view/install_db.tpl b/view/install_db.tpl index bf17256ebf..1302b5a708 100644 --- a/view/install_db.tpl +++ b/view/install_db.tpl @@ -18,10 +18,10 @@ $info_03 -{{ inc $field_input with $field=$dbhost }}{{endinc}} -{{ inc $field_input with $field=$dbuser }}{{endinc}} -{{ inc $field_password with $field=$dbpass }}{{endinc}} -{{ inc $field_input with $field=$dbdata }}{{endinc}} +{{ inc field_input.tpl with $field=$dbhost }}{{endinc}} +{{ inc field_input.tpl with $field=$dbuser }}{{endinc}} +{{ inc field_password.tpl with $field=$dbpass }}{{endinc}} +{{ inc field_input.tpl with $field=$dbdata }}{{endinc}} diff --git a/view/install_settings.tpl b/view/install_settings.tpl index 453e2e5cc3..05b87f904e 100644 --- a/view/install_settings.tpl +++ b/view/install_settings.tpl @@ -16,7 +16,7 @@ -{{ inc $field_input with $field=$adminmail }}{{endinc}} +{{ inc field_input.tpl with $field=$adminmail }}{{endinc}} $timezone diff --git a/view/intros.tpl b/view/intros.tpl index 2dd684079d..e7fd53ca4f 100644 --- a/view/intros.tpl +++ b/view/intros.tpl @@ -14,8 +14,8 @@
-{{inc $field_checkbox with $field=$hidden }}{{endinc}} -{{inc $field_checkbox with $field=$activity }}{{endinc}} +{{inc field_checkbox.tpl with $field=$hidden }}{{endinc}} +{{inc field_checkbox.tpl with $field=$activity }}{{endinc}} diff --git a/view/login.tpl b/view/login.tpl index 21ed66a66b..297b36c9ac 100644 --- a/view/login.tpl +++ b/view/login.tpl @@ -3,17 +3,17 @@
- {{ inc $field_input with $field=$lname }}{{ endinc }} - {{ inc $field_password with $field=$lpassword }}{{ endinc }} + {{ inc field_input.tpl with $field=$lname }}{{ endinc }} + {{ inc field_password.tpl with $field=$lpassword }}{{ endinc }}
{{ if $openid }}
- {{ inc $field_openid with $field=$lopenid }}{{ endinc }} + {{ inc field_openid.tpl with $field=$lopenid }}{{ endinc }}
{{ endif }} - {{ inc $field_checkbox with $field=$lremember }}{{ endinc }} + {{ inc field_checkbox.tpl with $field=$lremember }}{{ endinc }}