get markup template

implement getMarkupTemplate function
This commit is contained in:
Adam Magness 2018-10-31 10:44:06 -04:00
parent 91facd2d0a
commit 35abc4bb64
89 changed files with 243 additions and 243 deletions

View file

@ -160,7 +160,7 @@ In your code, like in the function addon_name_content(), load the template file
```php ```php
# load template file. first argument is the template name, # load template file. first argument is the template name,
# second is the addon path relative to friendica top folder # second is the addon path relative to friendica top folder
$tpl = get_markup_template('mytemplate.tpl', 'addon/addon_name/'); $tpl = Renderer::getMarkupTemplate('mytemplate.tpl', 'addon/addon_name/');
# apply template. first argument is the loaded template, # apply template. first argument is the loaded template,
# second an array of 'name' => 'values' to pass to template # second an array of 'name' => 'values' to pass to template

View file

@ -22,7 +22,7 @@ directory.
To render a template use the function *getMarkupTemplate* to load the template and *replaceMacros* to replace the macros/variables in the just loaded template file. To render a template use the function *getMarkupTemplate* to load the template and *replaceMacros* to replace the macros/variables in the just loaded template file.
$tpl = get_markup_template('install_settings.tpl'); $tpl = Renderer::getMarkupTemplate('install_settings.tpl');
$o .= Renderer::replaceMacros($tpl, array( ... )); $o .= Renderer::replaceMacros($tpl, array( ... ));
the array consists of an association of an identifier and the value for that identifier, i.e. the array consists of an association of an identifier and the value for that identifier, i.e.

View file

@ -554,7 +554,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
$threads = []; $threads = [];
$threadsid = -1; $threadsid = -1;
$page_template = get_markup_template("conversation.tpl"); $page_template = Renderer::getMarkupTemplate("conversation.tpl");
if (!empty($items)) { if (!empty($items)) {
if (in_array($mode, ['community', 'contacts'])) { if (in_array($mode, ['community', 'contacts'])) {
@ -713,7 +713,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
} }
} else { } else {
// Normal View // Normal View
$page_template = get_markup_template("threaded_conversation.tpl"); $page_template = Renderer::getMarkupTemplate("threaded_conversation.tpl");
$conv = new Thread($mode, $preview, $writable); $conv = new Thread($mode, $preview, $writable);
@ -1063,7 +1063,7 @@ function format_like($cnt, array $arr, $type, $id) {
} }
$phrase .= EOL ; $phrase .= EOL ;
$o .= Renderer::replaceMacros(get_markup_template('voting_fakelink.tpl'), [ $o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('voting_fakelink.tpl'), [
'$phrase' => $phrase, '$phrase' => $phrase,
'$type' => $type, '$type' => $type,
'$id' => $id '$id' => $id
@ -1077,9 +1077,9 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
{ {
$o = ''; $o = '';
$geotag = x($x, 'allow_location') ? Renderer::replaceMacros(get_markup_template('jot_geotag.tpl'), []) : ''; $geotag = x($x, 'allow_location') ? Renderer::replaceMacros(Renderer::getMarkupTemplate('jot_geotag.tpl'), []) : '';
$tpl = get_markup_template('jot-header.tpl'); $tpl = Renderer::getMarkupTemplate('jot-header.tpl');
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [ $a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$newpost' => 'true', '$newpost' => 'true',
'$baseurl' => System::baseUrl(true), '$baseurl' => System::baseUrl(true),
@ -1119,7 +1119,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
} }
// $tpl = Renderer::replaceMacros($tpl,array('$jotplugins' => $jotplugins)); // $tpl = Renderer::replaceMacros($tpl,array('$jotplugins' => $jotplugins));
$tpl = get_markup_template("jot.tpl"); $tpl = Renderer::getMarkupTemplate("jot.tpl");
$o .= Renderer::replaceMacros($tpl,[ $o .= Renderer::replaceMacros($tpl,[
'$new_post' => L10n::t('New Post'), '$new_post' => L10n::t('New Post'),

View file

@ -590,7 +590,7 @@ function notification($params)
$content_allowed = ((!Config::get('system', 'enotify_no_content')) || ($params['type'] == SYSTEM_EMAIL)); $content_allowed = ((!Config::get('system', 'enotify_no_content')) || ($params['type'] == SYSTEM_EMAIL));
// load the template for private message notifications // load the template for private message notifications
$tpl = get_markup_template('email_notify_html.tpl'); $tpl = Renderer::getMarkupTemplate('email_notify_html.tpl');
$email_html_body = Renderer::replaceMacros($tpl, [ $email_html_body = Renderer::replaceMacros($tpl, [
'$banner' => $datarray['banner'], '$banner' => $datarray['banner'],
'$product' => $datarray['product'], '$product' => $datarray['product'],
@ -611,7 +611,7 @@ function notification($params)
]); ]);
// load the template for private message notifications // load the template for private message notifications
$tpl = get_markup_template('email_notify_text.tpl'); $tpl = Renderer::getMarkupTemplate('email_notify_text.tpl');
$email_text_body = Renderer::replaceMacros($tpl, [ $email_text_body = Renderer::replaceMacros($tpl, [
'$banner' => $datarray['banner'], '$banner' => $datarray['banner'],
'$product' => $datarray['product'], '$product' => $datarray['product'],

View file

@ -391,7 +391,7 @@ function drop_item($id)
} }
} }
return Renderer::replaceMacros(get_markup_template('confirm.tpl'), [ return Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [
'$method' => 'get', '$method' => 'get',
'$message' => L10n::t('Do you really want to delete this item?'), '$message' => L10n::t('Do you really want to delete this item?'),
'$extra_inputs' => $inputs, '$extra_inputs' => $inputs,
@ -482,7 +482,7 @@ function posted_date_widget($url, $uid, $wall)
$cutoff_year = intval(DateTimeFormat::localNow('Y')) - $visible_years; $cutoff_year = intval(DateTimeFormat::localNow('Y')) - $visible_years;
$cutoff = ((array_key_exists($cutoff_year, $ret))? true : false); $cutoff = ((array_key_exists($cutoff_year, $ret))? true : false);
$o = Renderer::replaceMacros(get_markup_template('posted_date_widget.tpl'),[ $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('posted_date_widget.tpl'),[
'$title' => L10n::t('Archives'), '$title' => L10n::t('Archives'),
'$size' => $visible_years, '$size' => $visible_years,
'$cutoff_year' => $cutoff_year, '$cutoff_year' => $cutoff_year,

View file

@ -266,7 +266,7 @@ function unxmlify($s) {
* @return string html for loader * @return string html for loader
*/ */
function scroll_loader() { function scroll_loader() {
$tpl = get_markup_template("scroll_loader.tpl"); $tpl = Renderer::getMarkupTemplate("scroll_loader.tpl");
return Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [
'wait' => L10n::t('Loading more entries...'), 'wait' => L10n::t('Loading more entries...'),
'end' => L10n::t('The end') 'end' => L10n::t('The end')
@ -513,7 +513,7 @@ function contact_block() {
} }
} }
$tpl = get_markup_template('contact_block.tpl'); $tpl = Renderer::getMarkupTemplate('contact_block.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$contacts' => $contacts, '$contacts' => $contacts,
'$nickname' => $a->profile['nickname'], '$nickname' => $a->profile['nickname'],
@ -571,7 +571,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
$url = ''; $url = '';
} }
return Renderer::replaceMacros(get_markup_template(($textmode)?'micropro_txt.tpl':'micropro_img.tpl'),[ return Renderer::replaceMacros(Renderer::getMarkupTemplate(($textmode)?'micropro_txt.tpl':'micropro_img.tpl'),[
'$click' => defaults($contact, 'click', ''), '$click' => defaults($contact, 'click', ''),
'$class' => $class, '$class' => $class,
'$url' => $url, '$url' => $url,
@ -626,7 +626,7 @@ function search($s, $id = 'search-box', $url = 'search', $save = false, $aside =
} }
} }
return Renderer::replaceMacros(get_markup_template('searchbox.tpl'), $values); return Renderer::replaceMacros(Renderer::getMarkupTemplate('searchbox.tpl'), $values);
} }
/** /**
@ -904,14 +904,14 @@ function prepare_body(array &$item, $attach = false, $is_preview = false)
if (strpos($mime, 'video') !== false) { if (strpos($mime, 'video') !== false) {
if (!$vhead) { if (!$vhead) {
$vhead = true; $vhead = true;
$a->page['htmlhead'] .= Renderer::replaceMacros(get_markup_template('videos_head.tpl'), [ $a->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('videos_head.tpl'), [
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),
]); ]);
} }
$url_parts = explode('/', $the_url); $url_parts = explode('/', $the_url);
$id = end($url_parts); $id = end($url_parts);
$as .= Renderer::replaceMacros(get_markup_template('video_top.tpl'), [ $as .= Renderer::replaceMacros(Renderer::getMarkupTemplate('video_top.tpl'), [
'$video' => [ '$video' => [
'id' => $id, 'id' => $id,
'title' => L10n::t('View Video'), 'title' => L10n::t('View Video'),
@ -1006,7 +1006,7 @@ function prepare_body(array &$item, $attach = false, $is_preview = false)
function apply_content_filter($html, array $reasons) function apply_content_filter($html, array $reasons)
{ {
if (count($reasons)) { if (count($reasons)) {
$tpl = get_markup_template('wall/content_filter.tpl'); $tpl = Renderer::getMarkupTemplate('wall/content_filter.tpl');
$html = Renderer::replaceMacros($tpl, [ $html = Renderer::replaceMacros($tpl, [
'$reasons' => $reasons, '$reasons' => $reasons,
'$rnd' => random_string(8), '$rnd' => random_string(8),

View file

@ -175,7 +175,7 @@ function admin_content(App $a)
// apc_delete($toDelete); // apc_delete($toDelete);
//} //}
// Header stuff // Header stuff
$a->page['htmlhead'] .= Renderer::replaceMacros(get_markup_template('admin/settings_head.tpl'), []); $a->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('admin/settings_head.tpl'), []);
/* /*
* Side bar links * Side bar links
@ -226,7 +226,7 @@ function admin_content(App $a)
$addons_admin[] = $addon; $addons_admin[] = $addon;
} }
$t = get_markup_template('admin/aside.tpl'); $t = Renderer::getMarkupTemplate('admin/aside.tpl');
$a->page['aside'] .= Renderer::replaceMacros($t, [ $a->page['aside'] .= Renderer::replaceMacros($t, [
'$admin' => $aside_tools, '$admin' => $aside_tools,
'$subpages' => $aside_sub, '$subpages' => $aside_sub,
@ -314,7 +314,7 @@ function admin_content(App $a)
function admin_page_tos(App $a) function admin_page_tos(App $a)
{ {
$tos = new Tos(); $tos = new Tos();
$t = get_markup_template('admin/tos.tpl'); $t = Renderer::getMarkupTemplate('admin/tos.tpl');
return Renderer::replaceMacros($t, [ return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
'$page' => L10n::t('Terms of Service'), '$page' => L10n::t('Terms of Service'),
@ -376,7 +376,7 @@ function admin_page_blocklist(App $a)
]; ];
} }
} }
$t = get_markup_template('admin/blocklist.tpl'); $t = Renderer::getMarkupTemplate('admin/blocklist.tpl');
return Renderer::replaceMacros($t, [ return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
'$page' => L10n::t('Server Blocklist'), '$page' => L10n::t('Server Blocklist'),
@ -491,7 +491,7 @@ function admin_page_contactblock(App $a)
$contacts = DBA::toArray($statement); $contacts = DBA::toArray($statement);
$t = get_markup_template('admin/contactblock.tpl'); $t = Renderer::getMarkupTemplate('admin/contactblock.tpl');
$o = Renderer::replaceMacros($t, [ $o = Renderer::replaceMacros($t, [
// strings // // strings //
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
@ -533,7 +533,7 @@ function admin_page_contactblock(App $a)
*/ */
function admin_page_deleteitem(App $a) function admin_page_deleteitem(App $a)
{ {
$t = get_markup_template('admin/deleteitem.tpl'); $t = Renderer::getMarkupTemplate('admin/deleteitem.tpl');
return Renderer::replaceMacros($t, [ return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
@ -726,7 +726,7 @@ function admin_page_federation(App $a)
$hint = L10n::t('The <em>Auto Discovered Contact Directory</em> feature is not enabled, it will improve the data displayed here.'); $hint = L10n::t('The <em>Auto Discovered Contact Directory</em> feature is not enabled, it will improve the data displayed here.');
// load the template, replace the macros and return the page content // load the template, replace the macros and return the page content
$t = get_markup_template('admin/federation.tpl'); $t = Renderer::getMarkupTemplate('admin/federation.tpl');
return Renderer::replaceMacros($t, [ return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
'$page' => L10n::t('Federation Statistics'), '$page' => L10n::t('Federation Statistics'),
@ -769,7 +769,7 @@ function admin_page_queue(App $a)
} }
DBA::close($entries); DBA::close($entries);
$t = get_markup_template('admin/queue.tpl'); $t = Renderer::getMarkupTemplate('admin/queue.tpl');
return Renderer::replaceMacros($t, [ return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
'$page' => L10n::t('Inspect Queue'), '$page' => L10n::t('Inspect Queue'),
@ -820,7 +820,7 @@ function admin_page_workerqueue(App $a, $deferred)
} }
DBA::close($entries); DBA::close($entries);
$t = get_markup_template('admin/workerqueue.tpl'); $t = Renderer::getMarkupTemplate('admin/workerqueue.tpl');
return Renderer::replaceMacros($t, [ return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
'$page' => $sub_title, '$page' => $sub_title,
@ -938,7 +938,7 @@ function admin_page_summary(App $a)
'memory_limit' => ini_get('memory_limit')], 'memory_limit' => ini_get('memory_limit')],
'mysql' => ['max_allowed_packet' => $max_allowed_packet]]; 'mysql' => ['max_allowed_packet' => $max_allowed_packet]];
$t = get_markup_template('admin/summary.tpl'); $t = Renderer::getMarkupTemplate('admin/summary.tpl');
return Renderer::replaceMacros($t, [ return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
'$page' => L10n::t('Summary'), '$page' => L10n::t('Summary'),
@ -1449,7 +1449,7 @@ function admin_page_site(App $a)
$optimize_max_tablesize = -1; $optimize_max_tablesize = -1;
} }
$t = get_markup_template('admin/site.tpl'); $t = Renderer::getMarkupTemplate('admin/site.tpl');
return Renderer::replaceMacros($t, [ return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
'$page' => L10n::t('Site'), '$page' => L10n::t('Site'),
@ -1643,13 +1643,13 @@ function admin_page_dbsync(App $a)
} }
if (!count($failed)) { if (!count($failed)) {
$o = Renderer::replaceMacros(get_markup_template('structure_check.tpl'), [ $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('structure_check.tpl'), [
'$base' => System::baseUrl(true), '$base' => System::baseUrl(true),
'$banner' => L10n::t('No failed updates.'), '$banner' => L10n::t('No failed updates.'),
'$check' => L10n::t('Check database structure'), '$check' => L10n::t('Check database structure'),
]); ]);
} else { } else {
$o = Renderer::replaceMacros(get_markup_template('failed_updates.tpl'), [ $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('failed_updates.tpl'), [
'$base' => System::baseUrl(true), '$base' => System::baseUrl(true),
'$banner' => L10n::t('Failed Updates'), '$banner' => L10n::t('Failed Updates'),
'$desc' => L10n::t('This does not include updates prior to 1139, which did not return a status.'), '$desc' => L10n::t('This does not include updates prior to 1139, which did not return a status.'),
@ -1910,7 +1910,7 @@ function admin_page_users(App $a)
$th_users = array_map(null, [L10n::t('Name'), L10n::t('Email'), L10n::t('Register date'), L10n::t('Last login'), L10n::t('Last item'), L10n::t('Type')], $valid_orders); $th_users = array_map(null, [L10n::t('Name'), L10n::t('Email'), L10n::t('Register date'), L10n::t('Last login'), L10n::t('Last item'), L10n::t('Type')], $valid_orders);
$t = get_markup_template('admin/users.tpl'); $t = Renderer::getMarkupTemplate('admin/users.tpl');
$o = Renderer::replaceMacros($t, [ $o = Renderer::replaceMacros($t, [
// strings // // strings //
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
@ -2026,7 +2026,7 @@ function admin_page_addons(App $a, array $addons_admin)
$func($a, $admin_form); $func($a, $admin_form);
} }
$t = get_markup_template('admin/addon_details.tpl'); $t = Renderer::getMarkupTemplate('admin/addon_details.tpl');
return Renderer::replaceMacros($t, [ return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
@ -2087,7 +2087,7 @@ function admin_page_addons(App $a, array $addons_admin)
} }
} }
$t = get_markup_template('admin/addons.tpl'); $t = Renderer::getMarkupTemplate('admin/addons.tpl');
return Renderer::replaceMacros($t, [ return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
'$page' => L10n::t('Addons'), '$page' => L10n::t('Addons'),
@ -2297,7 +2297,7 @@ function admin_page_themes(App $a)
$screenshot = null; $screenshot = null;
} }
$t = get_markup_template('admin/addon_details.tpl'); $t = Renderer::getMarkupTemplate('admin/addon_details.tpl');
return Renderer::replaceMacros($t, [ return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
'$page' => L10n::t('Themes'), '$page' => L10n::t('Themes'),
@ -2341,7 +2341,7 @@ function admin_page_themes(App $a)
$addons[] = [$th['name'], (($th['allowed']) ? "on" : "off"), Theme::getInfo($th['name'])]; $addons[] = [$th['name'], (($th['allowed']) ? "on" : "off"), Theme::getInfo($th['name'])];
} }
$t = get_markup_template('admin/addons.tpl'); $t = Renderer::getMarkupTemplate('admin/addons.tpl');
return Renderer::replaceMacros($t, [ return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
'$page' => L10n::t('Themes'), '$page' => L10n::t('Themes'),
@ -2415,7 +2415,7 @@ function admin_page_logs(App $a)
$phplogenabled = L10n::t('PHP log currently disabled.'); $phplogenabled = L10n::t('PHP log currently disabled.');
} }
$t = get_markup_template('admin/logs.tpl'); $t = Renderer::getMarkupTemplate('admin/logs.tpl');
return Renderer::replaceMacros($t, [ return Renderer::replaceMacros($t, [
'$title' => L10n::t('Administration'), '$title' => L10n::t('Administration'),
@ -2456,7 +2456,7 @@ function admin_page_logs(App $a)
*/ */
function admin_page_viewlogs(App $a) function admin_page_viewlogs(App $a)
{ {
$t = get_markup_template('admin/viewlogs.tpl'); $t = Renderer::getMarkupTemplate('admin/viewlogs.tpl');
$f = Config::get('system', 'logfile'); $f = Config::get('system', 'logfile');
$data = ''; $data = '';
@ -2562,7 +2562,7 @@ function admin_page_features(App $a)
} }
} }
$tpl = get_markup_template('admin/settings_features.tpl'); $tpl = Renderer::getMarkupTemplate('admin/settings_features.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$form_security_token' => BaseModule::getFormSecurityToken("admin_manage_features"), '$form_security_token' => BaseModule::getFormSecurityToken("admin_manage_features"),
'$title' => L10n::t('Manage Additional Features'), '$title' => L10n::t('Manage Additional Features'),

View file

@ -99,7 +99,7 @@ function allfriends_content(App $a)
$tab_str = Module\Contact::getTabsHTML($a, $contact, 4); $tab_str = Module\Contact::getTabsHTML($a, $contact, 4);
$tpl = get_markup_template('viewcontact_template.tpl'); $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
//'$title' => L10n::t('Friends of %s', htmlentities($c[0]['name'])), //'$title' => L10n::t('Friends of %s', htmlentities($c[0]['name'])),

View file

@ -82,7 +82,7 @@ function api_content(App $a)
killme(); killme();
} }
$tpl = get_markup_template("oauth_authorize_done.tpl"); $tpl = Renderer::getMarkupTemplate("oauth_authorize_done.tpl");
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$title' => L10n::t('Authorize application connection'), '$title' => L10n::t('Authorize application connection'),
'$info' => L10n::t('Return to your app and insert this Securty Code:'), '$info' => L10n::t('Return to your app and insert this Securty Code:'),
@ -104,7 +104,7 @@ function api_content(App $a)
return "Invalid request. Unknown token."; return "Invalid request. Unknown token.";
} }
$tpl = get_markup_template('oauth_authorize.tpl'); $tpl = Renderer::getMarkupTemplate('oauth_authorize.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$title' => L10n::t('Authorize application connection'), '$title' => L10n::t('Authorize application connection'),
'$app' => $app, '$app' => $app,

View file

@ -25,7 +25,7 @@ function apps_content()
notice(L10n::t('No installed applications.') . EOL); notice(L10n::t('No installed applications.') . EOL);
} }
$tpl = get_markup_template('apps.tpl'); $tpl = Renderer::getMarkupTemplate('apps.tpl');
return Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [
'$title' => $title, '$title' => $title,
'$apps' => $apps, '$apps' => $apps,

View file

@ -140,7 +140,7 @@ function babel_content()
} }
} }
$tpl = get_markup_template('babel.tpl'); $tpl = Renderer::getMarkupTemplate('babel.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$text' => ['text', L10n::t('Source text'), htmlentities(defaults($_REQUEST, 'text', '')), ''], '$text' => ['text', L10n::t('Source text'), htmlentities(defaults($_REQUEST, 'text', '')), ''],
'$type_bbcode' => ['type', L10n::t('BBCode'), 'bbcode', '', defaults($_REQUEST, 'type', 'bbcode') == 'bbcode'], '$type_bbcode' => ['type', L10n::t('BBCode'), 'bbcode', '', defaults($_REQUEST, 'type', 'bbcode') == 'bbcode'],

View file

@ -60,7 +60,7 @@ function cal_init(App $a)
$account_type = Contact::getAccountType($profile); $account_type = Contact::getAccountType($profile);
$tpl = get_markup_template("vcard-widget.tpl"); $tpl = Renderer::getMarkupTemplate("vcard-widget.tpl");
$vcard_widget = Renderer::replaceMacros($tpl, [ $vcard_widget = Renderer::replaceMacros($tpl, [
'$name' => $profile['name'], '$name' => $profile['name'],
@ -89,7 +89,7 @@ function cal_content(App $a)
// get the translation strings for the callendar // get the translation strings for the callendar
$i18n = Event::getStrings(); $i18n = Event::getStrings();
$htpl = get_markup_template('event_head.tpl'); $htpl = Renderer::getMarkupTemplate('event_head.tpl');
$a->page['htmlhead'] .= Renderer::replaceMacros($htpl, [ $a->page['htmlhead'] .= Renderer::replaceMacros($htpl, [
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),
'$module_url' => '/cal/' . $a->data['user']['nickname'], '$module_url' => '/cal/' . $a->data['user']['nickname'],
@ -249,12 +249,12 @@ function cal_content(App $a)
// links: array('href', 'text', 'extra css classes', 'title') // links: array('href', 'text', 'extra css classes', 'title')
if (x($_GET, 'id')) { if (x($_GET, 'id')) {
$tpl = get_markup_template("event.tpl"); $tpl = Renderer::getMarkupTemplate("event.tpl");
} else { } else {
// if (Config::get('experimentals','new_calendar')==1){ // if (Config::get('experimentals','new_calendar')==1){
$tpl = get_markup_template("events_js.tpl"); $tpl = Renderer::getMarkupTemplate("events_js.tpl");
// } else { // } else {
// $tpl = get_markup_template("events.tpl"); // $tpl = Renderer::getMarkupTemplate("events.tpl");
// } // }
} }

View file

@ -49,7 +49,7 @@ function common_content(App $a)
$contact = DBA::selectFirst('contact', ['name', 'url', 'photo', 'uid', 'id'], ['self' => true, 'uid' => $uid]); $contact = DBA::selectFirst('contact', ['name', 'url', 'photo', 'uid', 'id'], ['self' => true, 'uid' => $uid]);
if (DBA::isResult($contact)) { if (DBA::isResult($contact)) {
$vcard_widget = Renderer::replaceMacros(get_markup_template("vcard-widget.tpl"), [ $vcard_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate("vcard-widget.tpl"), [
'$name' => htmlentities($contact['name']), '$name' => htmlentities($contact['name']),
'$photo' => $contact['photo'], '$photo' => $contact['photo'],
'url' => 'contact/' . $cid 'url' => 'contact/' . $cid
@ -143,7 +143,7 @@ function common_content(App $a)
$title = L10n::t('Common Friends'); $title = L10n::t('Common Friends');
} }
$tpl = get_markup_template('viewcontact_template.tpl'); $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$title' => $title, '$title' => $title,

View file

@ -120,7 +120,7 @@ function community_content(App $a, $update = 0)
]; ];
} }
$tab_tpl = get_markup_template('common_tabs.tpl'); $tab_tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
$o .= Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs]); $o .= Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs]);
Nav::setSelected('community'); Nav::setSelected('community');
@ -199,7 +199,7 @@ function community_content(App $a, $update = 0)
$o .= $pager->renderMinimal(count($r)); $o .= $pager->renderMinimal(count($r));
} }
$t = get_markup_template("community.tpl"); $t = Renderer::getMarkupTemplate("community.tpl");
return Renderer::replaceMacros($t, [ return Renderer::replaceMacros($t, [
'$content' => $o, '$content' => $o,
'$header' => '', '$header' => '',

View file

@ -14,7 +14,7 @@ function credits_content()
/* fill the page with credits */ /* fill the page with credits */
$credits_string = file_get_contents('util/credits.txt'); $credits_string = file_get_contents('util/credits.txt');
$names = explode("\n", htmlspecialchars($credits_string)); $names = explode("\n", htmlspecialchars($credits_string));
$tpl = get_markup_template('credits.tpl'); $tpl = Renderer::getMarkupTemplate('credits.tpl');
return Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [
'$title' => L10n::t('Credits'), '$title' => L10n::t('Credits'),
'$thanks' => L10n::t('Friendica is a community project, that would not be possible without the help of many people. Here is a list of those who have contributed to the code or the translation of Friendica. Thank you all!'), '$thanks' => L10n::t('Friendica is a community project, that would not be possible without the help of many people. Here is a list of those who have contributed to the code or the translation of Friendica. Thank you all!'),

View file

@ -137,7 +137,7 @@ function crepair_content(App $a)
$tab_str = Module\Contact::getTabsHTML($a, $contact, 5); $tab_str = Module\Contact::getTabsHTML($a, $contact, 5);
$tpl = get_markup_template('crepair.tpl'); $tpl = Renderer::getMarkupTemplate('crepair.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$tab_str' => $tab_str, '$tab_str' => $tab_str,
'$warning' => $warning, '$warning' => $warning,

View file

@ -164,7 +164,7 @@ function delegate_content(App $a)
$parent_password = ['parent_password', L10n::t('Parent Password:'), '', L10n::t('Please enter the password of the parent account to legitimize your request.')]; $parent_password = ['parent_password', L10n::t('Parent Password:'), '', L10n::t('Please enter the password of the parent account to legitimize your request.')];
} }
$o = Renderer::replaceMacros(get_markup_template('delegate.tpl'), [ $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('delegate.tpl'), [
'$form_security_token' => BaseModule::getFormSecurityToken('delegate'), '$form_security_token' => BaseModule::getFormSecurityToken('delegate'),
'$parent_header' => L10n::t('Parent User'), '$parent_header' => L10n::t('Parent User'),
'$parent_user' => $parent_user, '$parent_user' => $parent_user,

View file

@ -515,7 +515,7 @@ function dfrn_request_content(App $a)
return; // NOTREACHED return; // NOTREACHED
} }
$tpl = get_markup_template("dfrn_req_confirm.tpl"); $tpl = Renderer::getMarkupTemplate("dfrn_req_confirm.tpl");
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$dfrn_url' => $dfrn_url, '$dfrn_url' => $dfrn_url,
'$aes_allow' => (($aes_allow) ? '<input type="hidden" name="aes_allow" value="1" />' : "" ), '$aes_allow' => (($aes_allow) ? '<input type="hidden" name="aes_allow" value="1" />' : "" ),
@ -628,9 +628,9 @@ function dfrn_request_content(App $a)
* it doesn't matter if they know you or not. * it doesn't matter if they know you or not.
*/ */
if ($a->profile['page-flags'] == Contact::PAGE_NORMAL) { if ($a->profile['page-flags'] == Contact::PAGE_NORMAL) {
$tpl = get_markup_template('dfrn_request.tpl'); $tpl = Renderer::getMarkupTemplate('dfrn_request.tpl');
} else { } else {
$tpl = get_markup_template('auto_request.tpl'); $tpl = Renderer::getMarkupTemplate('auto_request.tpl');
} }
$page_desc = L10n::t("Please enter your 'Identity Address' from one of the following supported communications networks:"); $page_desc = L10n::t("Please enter your 'Identity Address' from one of the following supported communications networks:");

View file

@ -202,7 +202,7 @@ function directory_content(App $a)
} }
DBA::close($r); DBA::close($r);
$tpl = get_markup_template('directory_header.tpl'); $tpl = Renderer::getMarkupTemplate('directory_header.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$search' => $search, '$search' => $search,

View file

@ -250,7 +250,7 @@ function dirfind_content(App $a, $prefix = "") {
$entries[] = $entry; $entries[] = $entry;
} }
$tpl = get_markup_template('viewcontact_template.tpl'); $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl');
$o .= Renderer::replaceMacros($tpl,[ $o .= Renderer::replaceMacros($tpl,[
'title' => $header, 'title' => $header,
'$contacts' => $entries, '$contacts' => $entries,

View file

@ -264,7 +264,7 @@ function display_content(App $a, $update = false, $update_uid = 0)
$conversation = ''; $conversation = '';
} }
$a->page['htmlhead'] .= Renderer::replaceMacros(get_markup_template('display-head.tpl'), $a->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('display-head.tpl'),
['$alternate' => $alternate, ['$alternate' => $alternate,
'$conversation' => $conversation]); '$conversation' => $conversation]);

View file

@ -41,11 +41,11 @@ function editpost_content(App $a)
$geotag = ''; $geotag = '';
$o .= Renderer::replaceMacros(get_markup_template("section_title.tpl"), [ $o .= Renderer::replaceMacros(Renderer::getMarkupTemplate("section_title.tpl"), [
'$title' => L10n::t('Edit post') '$title' => L10n::t('Edit post')
]); ]);
$tpl = get_markup_template('jot-header.tpl'); $tpl = Renderer::getMarkupTemplate('jot-header.tpl');
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [ $a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),
'$ispublic' => '&nbsp;', // L10n::t('Visible to <strong>everybody</strong>'), '$ispublic' => '&nbsp;', // L10n::t('Visible to <strong>everybody</strong>'),
@ -53,7 +53,7 @@ function editpost_content(App $a)
'$nickname' => $a->user['nickname'] '$nickname' => $a->user['nickname']
]); ]);
$tpl = get_markup_template("jot.tpl"); $tpl = Renderer::getMarkupTemplate("jot.tpl");
if (strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])) { if (strlen($item['allow_cid']) || strlen($item['allow_gid']) || strlen($item['deny_cid']) || strlen($item['deny_gid'])) {
$lockstate = 'lock'; $lockstate = 'lock';

View file

@ -226,7 +226,7 @@ function events_content(App $a)
// get the translation strings for the callendar // get the translation strings for the callendar
$i18n = Event::getStrings(); $i18n = Event::getStrings();
$htpl = get_markup_template('event_head.tpl'); $htpl = Renderer::getMarkupTemplate('event_head.tpl');
$a->page['htmlhead'] .= Renderer::replaceMacros($htpl, [ $a->page['htmlhead'] .= Renderer::replaceMacros($htpl, [
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),
'$module_url' => '/events', '$module_url' => '/events',
@ -368,9 +368,9 @@ function events_content(App $a)
} }
if (!empty($_GET['id'])) { if (!empty($_GET['id'])) {
$tpl = get_markup_template("event.tpl"); $tpl = Renderer::getMarkupTemplate("event.tpl");
} else { } else {
$tpl = get_markup_template("events_js.tpl"); $tpl = Renderer::getMarkupTemplate("events_js.tpl");
} }
// Get rid of dashes in key names, Smarty3 can't handle them // Get rid of dashes in key names, Smarty3 can't handle them
@ -498,7 +498,7 @@ function events_content(App $a)
$uri = ''; $uri = '';
} }
$tpl = get_markup_template('event_form.tpl'); $tpl = Renderer::getMarkupTemplate('event_form.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$post' => System::baseUrl() . '/events', '$post' => System::baseUrl() . '/events',

View file

@ -94,7 +94,7 @@ function fbrowser_content(App $a)
} }
$files = array_map("_map_files1", $r); $files = array_map("_map_files1", $r);
$tpl = get_markup_template($template_file); $tpl = Renderer::getMarkupTemplate($template_file);
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$type' => 'image', '$type' => 'image',
@ -126,7 +126,7 @@ function fbrowser_content(App $a)
$files = array_map("_map_files2", $files); $files = array_map("_map_files2", $files);
$tpl = get_markup_template($template_file); $tpl = Renderer::getMarkupTemplate($template_file);
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$type' => 'file', '$type' => 'file',
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),

View file

@ -44,7 +44,7 @@ function feedtest_content(App $a)
]; ];
} }
$tpl = get_markup_template('feedtest.tpl'); $tpl = Renderer::getMarkupTemplate('feedtest.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$url' => ['url', L10n::t('Source URL'), defaults($_REQUEST, 'url', ''), ''], '$url' => ['url', L10n::t('Source URL'), defaults($_REQUEST, 'url', ''), ''],
'$result' => $result '$result' => $result

View file

@ -31,7 +31,7 @@ function filer_content(App $a)
$filetags = FileTag::fileToList($filetags, 'file'); $filetags = FileTag::fileToList($filetags, 'file');
$filetags = explode(",", $filetags); $filetags = explode(",", $filetags);
$tpl = get_markup_template("filer_dialog.tpl"); $tpl = Renderer::getMarkupTemplate("filer_dialog.tpl");
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$field' => ['term', L10n::t("Save to Folder:"), '', '', $filetags, L10n::t('- select -')], '$field' => ['term', L10n::t("Save to Folder:"), '', '', $filetags, L10n::t('- select -')],
'$submit' => L10n::t('Save'), '$submit' => L10n::t('Save'),

View file

@ -109,10 +109,10 @@ function follow_content(App $a)
if (($ret['network'] === Protocol::DFRN) && !DBA::isResult($r)) { if (($ret['network'] === Protocol::DFRN) && !DBA::isResult($r)) {
$request = $ret['request']; $request = $ret['request'];
$tpl = get_markup_template('dfrn_request.tpl'); $tpl = Renderer::getMarkupTemplate('dfrn_request.tpl');
} else { } else {
$request = System::baseUrl() . '/follow'; $request = System::baseUrl() . '/follow';
$tpl = get_markup_template('auto_request.tpl'); $tpl = Renderer::getMarkupTemplate('auto_request.tpl');
} }
$r = q("SELECT `url` FROM `contact` WHERE `uid` = %d AND `self` LIMIT 1", intval($uid)); $r = q("SELECT `url` FROM `contact` WHERE `uid` = %d AND `self` LIMIT 1", intval($uid));
@ -188,7 +188,7 @@ function follow_content(App $a)
} }
if ($gcontact_id <> 0) { if ($gcontact_id <> 0) {
$o .= Renderer::replaceMacros(get_markup_template('section_title.tpl'), $o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'),
['$title' => L10n::t('Status Messages and Posts')] ['$title' => L10n::t('Status Messages and Posts')]
); );

View file

@ -98,7 +98,7 @@ function group_content(App $a) {
$switchtotext = Config::get('system', 'groupedit_image_limit', 400); $switchtotext = Config::get('system', 'groupedit_image_limit', 400);
} }
$tpl = get_markup_template('group_edit.tpl'); $tpl = Renderer::getMarkupTemplate('group_edit.tpl');
$context = [ $context = [
'$submit' => L10n::t('Save Group'), '$submit' => L10n::t('Save Group'),
@ -215,7 +215,7 @@ function group_content(App $a) {
} }
} }
$drop_tpl = get_markup_template('group_drop.tpl'); $drop_tpl = Renderer::getMarkupTemplate('group_drop.tpl');
$drop_txt = Renderer::replaceMacros($drop_tpl, [ $drop_txt = Renderer::replaceMacros($drop_tpl, [
'$id' => $group['id'], '$id' => $group['id'],
'$delete' => L10n::t('Delete Group'), '$delete' => L10n::t('Delete Group'),
@ -307,7 +307,7 @@ function group_content(App $a) {
$context['$shortmode'] = (($switchtotext && ($total > $switchtotext)) ? true : false); $context['$shortmode'] = (($switchtotext && ($total > $switchtotext)) ? true : false);
if ($change) { if ($change) {
$tpl = get_markup_template('groupeditor.tpl'); $tpl = Renderer::getMarkupTemplate('groupeditor.tpl');
echo Renderer::replaceMacros($tpl, $context); echo Renderer::replaceMacros($tpl, $context);
killme(); killme();
} }

View file

@ -61,7 +61,7 @@ function help_content(App $a)
if (!strlen($text)) { if (!strlen($text)) {
header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . L10n::t('Not Found')); header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . L10n::t('Not Found'));
$tpl = get_markup_template("404.tpl"); $tpl = Renderer::getMarkupTemplate("404.tpl");
return Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [
'$message' => L10n::t('Page not found.') '$message' => L10n::t('Page not found.')
]); ]);

View file

@ -54,7 +54,7 @@ function home_content(App $a) {
Addon::callHooks("home_content",$content); Addon::callHooks("home_content",$content);
$tpl = get_markup_template('home.tpl'); $tpl = Renderer::getMarkupTemplate('home.tpl');
return Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [
'$defaultheader' => $defaultheader, '$defaultheader' => $defaultheader,
'$customhome' => $customhome, '$customhome' => $customhome,

View file

@ -22,7 +22,7 @@ function hostxrd_init(App $a)
Config::set('system','site_pubkey', $res['pubkey']); Config::set('system','site_pubkey', $res['pubkey']);
} }
$tpl = get_markup_template('xrd_host.tpl'); $tpl = Renderer::getMarkupTemplate('xrd_host.tpl');
echo Renderer::replaceMacros($tpl, [ echo Renderer::replaceMacros($tpl, [
'$zhost' => $a->getHostName(), '$zhost' => $a->getHostName(),
'$zroot' => System::baseUrl(), '$zroot' => System::baseUrl(),

View file

@ -111,7 +111,7 @@ function hovercard_content()
'actions' => $actions, 'actions' => $actions,
]; ];
if ($datatype == 'html') { if ($datatype == 'html') {
$tpl = get_markup_template('hovercard.tpl'); $tpl = Renderer::getMarkupTemplate('hovercard.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$profile' => $profile, '$profile' => $profile,
]); ]);
@ -134,7 +134,7 @@ function get_template_content($template, $root = '')
{ {
// We load the whole template system to get the filename. // We load the whole template system to get the filename.
// Maybe we can do it a little bit smarter if I get time. // Maybe we can do it a little bit smarter if I get time.
$t = get_markup_template($template, $root); $t = Renderer::getMarkupTemplate($template, $root);
$filename = $t->filename; $filename = $t->filename;
// Get the content of the template file // Get the content of the template file

View file

@ -111,7 +111,7 @@ function invite_content(App $a) {
return; return;
} }
$tpl = get_markup_template('invite.tpl'); $tpl = Renderer::getMarkupTemplate('invite.tpl');
$invonly = false; $invonly = false;
if (Config::get('system', 'invitation_only')) { if (Config::get('system', 'invitation_only')) {

View file

@ -116,7 +116,7 @@ function lostpass_content(App $a)
function lostpass_form() function lostpass_form()
{ {
$tpl = get_markup_template('lostpass.tpl'); $tpl = Renderer::getMarkupTemplate('lostpass.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$title' => L10n::t('Forgot your Password?'), '$title' => L10n::t('Forgot your Password?'),
'$desc' => L10n::t('Enter your email address and submit to have your password reset. Then check your email for further instructions.'), '$desc' => L10n::t('Enter your email address and submit to have your password reset. Then check your email for further instructions.'),
@ -135,7 +135,7 @@ function lostpass_generate_password($user)
$new_password = User::generateNewPassword(); $new_password = User::generateNewPassword();
$result = User::updatePassword($user['uid'], $new_password); $result = User::updatePassword($user['uid'], $new_password);
if (DBA::isResult($result)) { if (DBA::isResult($result)) {
$tpl = get_markup_template('pwdreset.tpl'); $tpl = Renderer::getMarkupTemplate('pwdreset.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$lbl1' => L10n::t('Password Reset'), '$lbl1' => L10n::t('Password Reset'),
'$lbl2' => L10n::t('Your password has been reset as requested.'), '$lbl2' => L10n::t('Your password has been reset as requested.'),

View file

@ -21,7 +21,7 @@ function maintenance_content(App $a)
header('Status: 503 Service Temporarily Unavailable'); header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 600'); header('Retry-After: 600');
return Renderer::replaceMacros(get_markup_template('maintenance.tpl'), [ return Renderer::replaceMacros(Renderer::getMarkupTemplate('maintenance.tpl'), [
'$sysdown' => L10n::t('System down for maintenance'), '$sysdown' => L10n::t('System down for maintenance'),
'$reason' => $reason '$reason' => $reason
]); ]);

View file

@ -177,7 +177,7 @@ function manage_content(App $a) {
$identities[$key]['notifications'] = $notifications; $identities[$key]['notifications'] = $notifications;
} }
$o = Renderer::replaceMacros(get_markup_template('manage.tpl'), [ $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('manage.tpl'), [
'$title' => L10n::t('Manage Identities and/or Pages'), '$title' => L10n::t('Manage Identities and/or Pages'),
'$desc' => L10n::t('Toggle between different identities or community/group pages which share your account details or which you have been granted "manage" permissions'), '$desc' => L10n::t('Toggle between different identities or community/group pages which share your account details or which you have been granted "manage" permissions'),
'$choose' => L10n::t('Select an identity to manage: '), '$choose' => L10n::t('Select an identity to manage: '),

View file

@ -7,7 +7,7 @@ use Friendica\Core\Renderer;
function manifest_content(App $a) { function manifest_content(App $a) {
$tpl = get_markup_template('manifest.tpl'); $tpl = Renderer::getMarkupTemplate('manifest.tpl');
header('Content-type: application/manifest+json'); header('Content-type: application/manifest+json');

View file

@ -113,7 +113,7 @@ function match_content(App $a)
} }
} }
$tpl = get_markup_template('viewcontact_template.tpl'); $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$title' => L10n::t('Profile Match'), '$title' => L10n::t('Profile Match'),

View file

@ -37,14 +37,14 @@ function message_init(App $a)
'accesskey' => 'm', 'accesskey' => 'm',
]; ];
$tpl = get_markup_template('message_side.tpl'); $tpl = Renderer::getMarkupTemplate('message_side.tpl');
$a->page['aside'] = Renderer::replaceMacros($tpl, [ $a->page['aside'] = Renderer::replaceMacros($tpl, [
'$tabs' => $tabs, '$tabs' => $tabs,
'$new' => $new, '$new' => $new,
]); ]);
$base = System::baseUrl(); $base = System::baseUrl();
$head_tpl = get_markup_template('message-head.tpl'); $head_tpl = Renderer::getMarkupTemplate('message-head.tpl');
$a->page['htmlhead'] .= Renderer::replaceMacros($head_tpl, [ $a->page['htmlhead'] .= Renderer::replaceMacros($head_tpl, [
'$baseurl' => System::baseUrl(true), '$baseurl' => System::baseUrl(true),
'$base' => $base '$base' => $base
@ -105,7 +105,7 @@ function message_content(App $a)
$myprofile = System::baseUrl() . '/profile/' . $a->user['nickname']; $myprofile = System::baseUrl() . '/profile/' . $a->user['nickname'];
$tpl = get_markup_template('mail_head.tpl'); $tpl = Renderer::getMarkupTemplate('mail_head.tpl');
if ($a->argc > 1 && $a->argv[1] == 'new') { if ($a->argc > 1 && $a->argv[1] == 'new') {
$button = [ $button = [
'label' => L10n::t('Discard'), 'label' => L10n::t('Discard'),
@ -144,7 +144,7 @@ function message_content(App $a)
} }
//$a->page['aside'] = ''; //$a->page['aside'] = '';
return Renderer::replaceMacros(get_markup_template('confirm.tpl'), [ return Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [
'$method' => 'get', '$method' => 'get',
'$message' => L10n::t('Do you really want to delete this message?'), '$message' => L10n::t('Do you really want to delete this message?'),
'$extra_inputs' => $inputs, '$extra_inputs' => $inputs,
@ -199,7 +199,7 @@ function message_content(App $a)
if (($a->argc > 1) && ($a->argv[1] === 'new')) { if (($a->argc > 1) && ($a->argv[1] === 'new')) {
$o .= $header; $o .= $header;
$tpl = get_markup_template('msg-header.tpl'); $tpl = Renderer::getMarkupTemplate('msg-header.tpl');
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [ $a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$baseurl' => System::baseUrl(true), '$baseurl' => System::baseUrl(true),
'$nickname' => $a->user['nickname'], '$nickname' => $a->user['nickname'],
@ -244,7 +244,7 @@ function message_content(App $a)
// the ugly select box // the ugly select box
$select = ACL::getMessageContactSelectHTML('messageto', 'message-to-select', $preselect, 4, 10); $select = ACL::getMessageContactSelectHTML('messageto', 'message-to-select', $preselect, 4, 10);
$tpl = get_markup_template('prv_message.tpl'); $tpl = Renderer::getMarkupTemplate('prv_message.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$header' => L10n::t('Send Private Message'), '$header' => L10n::t('Send Private Message'),
'$to' => L10n::t('To:'), '$to' => L10n::t('To:'),
@ -339,7 +339,7 @@ function message_content(App $a)
intval(local_user()) intval(local_user())
); );
$tpl = get_markup_template('msg-header.tpl'); $tpl = Renderer::getMarkupTemplate('msg-header.tpl');
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [ $a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$baseurl' => System::baseUrl(true), '$baseurl' => System::baseUrl(true),
'$nickname' => $a->user['nickname'], '$nickname' => $a->user['nickname'],
@ -399,7 +399,7 @@ function message_content(App $a)
$select = $message['name'] . '<input type="hidden" name="messageto" value="' . $contact_id . '" />'; $select = $message['name'] . '<input type="hidden" name="messageto" value="' . $contact_id . '" />';
$parent = '<input type="hidden" name="replyto" value="' . $message['parent-uri'] . '" />'; $parent = '<input type="hidden" name="replyto" value="' . $message['parent-uri'] . '" />';
$tpl = get_markup_template('mail_display.tpl'); $tpl = Renderer::getMarkupTemplate('mail_display.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$thread_id' => $a->argv[1], '$thread_id' => $a->argv[1],
'$thread_subject' => $message['title'], '$thread_subject' => $message['title'],
@ -454,7 +454,7 @@ function render_messages(array $msg, $t)
{ {
$a = get_app(); $a = get_app();
$tpl = get_markup_template($t); $tpl = Renderer::getMarkupTemplate($t);
$rslt = ''; $rslt = '';
$myprofile = System::baseUrl() . '/profile/' . $a->user['nickname']; $myprofile = System::baseUrl() . '/profile/' . $a->user['nickname'];

View file

@ -201,7 +201,7 @@ function saved_searches($search)
]; ];
} }
$tpl = get_markup_template('saved_searches_aside.tpl'); $tpl = Renderer::getMarkupTemplate('saved_searches_aside.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$title' => L10n::t('Saved Searches'), '$title' => L10n::t('Saved Searches'),
'$add' => L10n::t('add'), '$add' => L10n::t('add'),
@ -654,7 +654,7 @@ function networkThreadedView(App $a, $update, $parent)
info(L10n::t('Group is empty')); info(L10n::t('Group is empty'));
} }
$o = Renderer::replaceMacros(get_markup_template('section_title.tpl'), [ $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'), [
'$title' => L10n::t('Group: %s', $group['name']) '$title' => L10n::t('Group: %s', $group['name'])
]) . $o; ]) . $o;
} elseif ($cid) { } elseif ($cid) {
@ -675,7 +675,7 @@ function networkThreadedView(App $a, $update, $parent)
$entries[0]['account_type'] = Contact::getAccountType($contact); $entries[0]['account_type'] = Contact::getAccountType($contact);
$o = Renderer::replaceMacros(get_markup_template('viewcontact_template.tpl'), [ $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('viewcontact_template.tpl'), [
'contacts' => $entries, 'contacts' => $entries,
'id' => 'network', 'id' => 'network',
]) . $o; ]) . $o;
@ -1033,7 +1033,7 @@ function network_tabs(App $a)
$arr = ['tabs' => $tabs]; $arr = ['tabs' => $tabs];
Addon::callHooks('network_tabs', $arr); Addon::callHooks('network_tabs', $arr);
$tpl = get_markup_template('common_tabs.tpl'); $tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
return Renderer::replaceMacros($tpl, ['$tabs' => $arr['tabs']]); return Renderer::replaceMacros($tpl, ['$tabs' => $arr['tabs']]);
@ -1059,7 +1059,7 @@ function network_infinite_scroll_head(App $a, &$htmlhead)
if (PConfig::get(local_user(), 'system', 'infinite_scroll') if (PConfig::get(local_user(), 'system', 'infinite_scroll')
&& defaults($_GET, 'mode', '') != 'minimal' && defaults($_GET, 'mode', '') != 'minimal'
) { ) {
$tpl = get_markup_template('infinite_scroll_head.tpl'); $tpl = Renderer::getMarkupTemplate('infinite_scroll_head.tpl');
$htmlhead .= Renderer::replaceMacros($tpl, [ $htmlhead .= Renderer::replaceMacros($tpl, [
'$pageno' => $pager->getPage(), '$pageno' => $pager->getPage(),
'$reload_uri' => $pager->getBaseQueryString() '$reload_uri' => $pager->getBaseQueryString()

View file

@ -133,7 +133,7 @@ function notifications_content(App $a)
System::jsonExit($notifs); System::jsonExit($notifs);
} }
$notif_tpl = get_markup_template('notifications.tpl'); $notif_tpl = Renderer::getMarkupTemplate('notifications.tpl');
$notif_show_lnk = [ $notif_show_lnk = [
'href' => ($show ? 'notifications/' . $notifs['ident'] : 'notifications/' . $notifs['ident'] . '?show=all' ), 'href' => ($show ? 'notifications/' . $notifs['ident'] : 'notifications/' . $notifs['ident'] . '?show=all' ),
@ -142,8 +142,8 @@ function notifications_content(App $a)
// Process the data for template creation // Process the data for template creation
if (defaults($notifs, 'ident', '') === 'introductions') { if (defaults($notifs, 'ident', '') === 'introductions') {
$sugg = get_markup_template('suggestions.tpl'); $sugg = Renderer::getMarkupTemplate('suggestions.tpl');
$tpl = get_markup_template('intros.tpl'); $tpl = Renderer::getMarkupTemplate('intros.tpl');
// The link to switch between ignored and normal connection requests // The link to switch between ignored and normal connection requests
$notif_show_lnk = [ $notif_show_lnk = [
@ -209,7 +209,7 @@ function notifications_content(App $a)
$helptext3 = L10n::t('Accepting %s as a sharer allows them to subscribe to your posts, but you will not receive updates from them in your news feed.', $notif['name']); $helptext3 = L10n::t('Accepting %s as a sharer allows them to subscribe to your posts, but you will not receive updates from them in your news feed.', $notif['name']);
} }
$dfrn_tpl = get_markup_template('netfriend.tpl'); $dfrn_tpl = Renderer::getMarkupTemplate('netfriend.tpl');
$dfrn_text = Renderer::replaceMacros($dfrn_tpl, [ $dfrn_text = Renderer::replaceMacros($dfrn_tpl, [
'$intro_id' => $notif['intro_id'], '$intro_id' => $notif['intro_id'],
'$friend_selected' => $friend_selected, '$friend_selected' => $friend_selected,
@ -294,7 +294,7 @@ function notifications_content(App $a)
'notify' => 'notify.tpl', 'notify' => 'notify.tpl',
]; ];
$tpl_notif = get_markup_template($notification_templates[$notif['label']]); $tpl_notif = Renderer::getMarkupTemplate($notification_templates[$notif['label']]);
$notif_content[] = Renderer::replaceMacros($tpl_notif, [ $notif_content[] = Renderer::replaceMacros($tpl_notif, [
'$item_label' => $notif['label'], '$item_label' => $notif['label'],

View file

@ -60,9 +60,9 @@ function notify_content(App $a)
$nm = new NotificationsManager(); $nm = new NotificationsManager();
$notif_tpl = get_markup_template('notifications.tpl'); $notif_tpl = Renderer::getMarkupTemplate('notifications.tpl');
$not_tpl = get_markup_template('notify.tpl'); $not_tpl = Renderer::getMarkupTemplate('notify.tpl');
$r = $nm->getAll(['seen'=>0]); $r = $nm->getAll(['seen'=>0]);
if (DBA::isResult($r) > 0) { if (DBA::isResult($r) > 0) {

View file

@ -12,7 +12,7 @@ use Friendica\Util\Network;
function oexchange_init(App $a) { function oexchange_init(App $a) {
if (($a->argc > 1) && ($a->argv[1] === 'xrd')) { if (($a->argc > 1) && ($a->argv[1] === 'xrd')) {
$tpl = get_markup_template('oexchange_xrd.tpl'); $tpl = Renderer::getMarkupTemplate('oexchange_xrd.tpl');
$o = Renderer::replaceMacros($tpl, ['$base' => System::baseUrl()]); $o = Renderer::replaceMacros($tpl, ['$base' => System::baseUrl()]);
echo $o; echo $o;

View file

@ -6,7 +6,7 @@ use Friendica\Core\System;
function opensearch_content(App $a) { function opensearch_content(App $a) {
$tpl = get_markup_template('opensearch.tpl'); $tpl = Renderer::getMarkupTemplate('opensearch.tpl');
header("Content-type: application/opensearchdescription+xml"); header("Content-type: application/opensearchdescription+xml");

View file

@ -63,7 +63,7 @@ function photos_init(App $a) {
$account_type = Contact::getAccountType($profile); $account_type = Contact::getAccountType($profile);
$tpl = get_markup_template("vcard-widget.tpl"); $tpl = Renderer::getMarkupTemplate("vcard-widget.tpl");
$vcard_widget = Renderer::replaceMacros($tpl, [ $vcard_widget = Renderer::replaceMacros($tpl, [
'$name' => $profile['name'], '$name' => $profile['name'],
@ -110,7 +110,7 @@ function photos_init(App $a) {
} }
if ($ret['success']) { if ($ret['success']) {
$photo_albums_widget = Renderer::replaceMacros(get_markup_template('photo_albums.tpl'), [ $photo_albums_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate('photo_albums.tpl'), [
'$nick' => $a->data['user']['nickname'], '$nick' => $a->data['user']['nickname'],
'$title' => L10n::t('Photo Albums'), '$title' => L10n::t('Photo Albums'),
'$recent' => L10n::t('Recent Photos'), '$recent' => L10n::t('Recent Photos'),
@ -131,7 +131,7 @@ function photos_init(App $a) {
$a->page['aside'] .= $photo_albums_widget; $a->page['aside'] .= $photo_albums_widget;
} }
$tpl = get_markup_template("photos_head.tpl"); $tpl = Renderer::getMarkupTemplate("photos_head.tpl");
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl,[ $a->page['htmlhead'] .= Renderer::replaceMacros($tpl,[
'$ispublic' => L10n::t('everybody') '$ispublic' => L10n::t('everybody')
@ -247,7 +247,7 @@ function photos_post(App $a)
['name' => 'albumname', 'value' => $_POST['albumname']], ['name' => 'albumname', 'value' => $_POST['albumname']],
]; ];
$a->page['content'] = Renderer::replaceMacros(get_markup_template('confirm.tpl'), [ $a->page['content'] = Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [
'$method' => 'post', '$method' => 'post',
'$message' => L10n::t('Do you really want to delete this photo album and all its photos?'), '$message' => L10n::t('Do you really want to delete this photo album and all its photos?'),
'$extra_inputs' => $extra_inputs, '$extra_inputs' => $extra_inputs,
@ -319,7 +319,7 @@ function photos_post(App $a)
if (!empty($_REQUEST['confirm'])) { if (!empty($_REQUEST['confirm'])) {
$drop_url = $a->query_string; $drop_url = $a->query_string;
$a->page['content'] = Renderer::replaceMacros(get_markup_template('confirm.tpl'), [ $a->page['content'] = Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [
'$method' => 'post', '$method' => 'post',
'$message' => L10n::t('Do you really want to delete this photo?'), '$message' => L10n::t('Do you really want to delete this photo?'),
'$extra_inputs' => [], '$extra_inputs' => [],
@ -1085,14 +1085,14 @@ function photos_content(App $a)
Addon::callHooks('photo_upload_form',$ret); Addon::callHooks('photo_upload_form',$ret);
$default_upload_box = Renderer::replaceMacros(get_markup_template('photos_default_uploader_box.tpl'), []); $default_upload_box = Renderer::replaceMacros(Renderer::getMarkupTemplate('photos_default_uploader_box.tpl'), []);
$default_upload_submit = Renderer::replaceMacros(get_markup_template('photos_default_uploader_submit.tpl'), [ $default_upload_submit = Renderer::replaceMacros(Renderer::getMarkupTemplate('photos_default_uploader_submit.tpl'), [
'$submit' => L10n::t('Submit'), '$submit' => L10n::t('Submit'),
]); ]);
$usage_message = ''; $usage_message = '';
$tpl = get_markup_template('photos_upload.tpl'); $tpl = Renderer::getMarkupTemplate('photos_upload.tpl');
$aclselect_e = ($visitor ? '' : ACL::getFullSelectorHTML($a->user)); $aclselect_e = ($visitor ? '' : ACL::getFullSelectorHTML($a->user));
@ -1166,7 +1166,7 @@ function photos_content(App $a)
if ($cmd === 'edit') { if ($cmd === 'edit') {
if (($album !== L10n::t('Profile Photos')) && ($album !== 'Contact Photos') && ($album !== L10n::t('Contact Photos'))) { if (($album !== L10n::t('Profile Photos')) && ($album !== 'Contact Photos') && ($album !== L10n::t('Contact Photos'))) {
if ($can_post) { if ($can_post) {
$edit_tpl = get_markup_template('album_edit.tpl'); $edit_tpl = Renderer::getMarkupTemplate('album_edit.tpl');
$album_e = $album; $album_e = $album;
@ -1220,7 +1220,7 @@ function photos_content(App $a)
} }
} }
$tpl = get_markup_template('photo_album.tpl'); $tpl = Renderer::getMarkupTemplate('photo_album.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$photos' => $photos, '$photos' => $photos,
'$album' => $album, '$album' => $album,
@ -1342,7 +1342,7 @@ function photos_content(App $a)
} }
if ($cmd === 'edit') { if ($cmd === 'edit') {
$tpl = get_markup_template('photo_edit_head.tpl'); $tpl = Renderer::getMarkupTemplate('photo_edit_head.tpl');
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl,[ $a->page['htmlhead'] .= Renderer::replaceMacros($tpl,[
'$prevlink' => $prevlink, '$prevlink' => $prevlink,
'$nextlink' => $nextlink '$nextlink' => $nextlink
@ -1429,7 +1429,7 @@ function photos_content(App $a)
$edit = Null; $edit = Null;
if ($cmd === 'edit' && $can_post) { if ($cmd === 'edit' && $can_post) {
$edit_tpl = get_markup_template('photo_edit.tpl'); $edit_tpl = Renderer::getMarkupTemplate('photo_edit.tpl');
$album_e = $ph[0]['album']; $album_e = $ph[0]['album'];
$caption_e = $ph[0]['desc']; $caption_e = $ph[0]['desc'];
@ -1468,12 +1468,12 @@ function photos_content(App $a)
$responses = ''; $responses = '';
if (count($linked_items)) { if (count($linked_items)) {
$cmnt_tpl = get_markup_template('comment_item.tpl'); $cmnt_tpl = Renderer::getMarkupTemplate('comment_item.tpl');
$tpl = get_markup_template('photo_item.tpl'); $tpl = Renderer::getMarkupTemplate('photo_item.tpl');
$return_path = $a->cmd; $return_path = $a->cmd;
if ($can_post || Security::canWriteToUserWall($owner_uid)) { if ($can_post || Security::canWriteToUserWall($owner_uid)) {
$like_tpl = get_markup_template('like_noshare.tpl'); $like_tpl = Renderer::getMarkupTemplate('like_noshare.tpl');
$likebuttons = Renderer::replaceMacros($like_tpl, [ $likebuttons = Renderer::replaceMacros($like_tpl, [
'$id' => $link_item['id'], '$id' => $link_item['id'],
'$likethis' => L10n::t("I like this \x28toggle\x29"), '$likethis' => L10n::t("I like this \x28toggle\x29"),
@ -1612,7 +1612,7 @@ function photos_content(App $a)
$paginate = $pager->renderFull($total); $paginate = $pager->renderFull($total);
} }
$photo_tpl = get_markup_template('photo_view.tpl'); $photo_tpl = Renderer::getMarkupTemplate('photo_view.tpl');
$o .= Renderer::replaceMacros($photo_tpl, [ $o .= Renderer::replaceMacros($photo_tpl, [
'$id' => $ph[0]['id'], '$id' => $ph[0]['id'],
'$album' => [$album_link, $ph[0]['album']], '$album' => [$album_link, $ph[0]['album']],
@ -1704,7 +1704,7 @@ function photos_content(App $a)
} }
} }
$tpl = get_markup_template('photos_recent.tpl'); $tpl = Renderer::getMarkupTemplate('photos_recent.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$title' => L10n::t('Recent Photos'), '$title' => L10n::t('Recent Photos'),
'$can_post' => $can_post, '$can_post' => $can_post,

View file

@ -375,7 +375,7 @@ function poco_init(App $a) {
if ($format === 'xml') { if ($format === 'xml') {
header('Content-type: text/xml'); header('Content-type: text/xml');
echo Renderer::replaceMacros(get_markup_template('poco_xml.tpl'), array_xmlify(['$response' => $ret])); echo Renderer::replaceMacros(Renderer::getMarkupTemplate('poco_xml.tpl'), array_xmlify(['$response' => $ret]));
killme(); killme();
} }
if ($format === 'json') { if ($format === 'json') {

View file

@ -160,7 +160,7 @@ function poke_content(App $a)
$base = System::baseUrl(); $base = System::baseUrl();
$head_tpl = get_markup_template('poke_head.tpl'); $head_tpl = Renderer::getMarkupTemplate('poke_head.tpl');
$a->page['htmlhead'] .= Renderer::replaceMacros($head_tpl,[ $a->page['htmlhead'] .= Renderer::replaceMacros($head_tpl,[
'$baseurl' => System::baseUrl(true), '$baseurl' => System::baseUrl(true),
'$base' => $base '$base' => $base
@ -179,7 +179,7 @@ function poke_content(App $a)
} }
} }
$tpl = get_markup_template('poke_content.tpl'); $tpl = Renderer::getMarkupTemplate('poke_content.tpl');
$o = Renderer::replaceMacros($tpl,[ $o = Renderer::replaceMacros($tpl,[
'$title' => L10n::t('Poke/Prod'), '$title' => L10n::t('Poke/Prod'),

View file

@ -239,7 +239,7 @@ function profile_photo_content(App $a)
); );
if (empty($imagecrop)) { if (empty($imagecrop)) {
$tpl = get_markup_template('profile_photo.tpl'); $tpl = Renderer::getMarkupTemplate('profile_photo.tpl');
$o = Renderer::replaceMacros($tpl, $o = Renderer::replaceMacros($tpl,
[ [
@ -257,7 +257,7 @@ function profile_photo_content(App $a)
return $o; return $o;
} else { } else {
$filename = $imagecrop['hash'] . '-' . $imagecrop['resolution'] . '.' . $imagecrop['ext']; $filename = $imagecrop['hash'] . '-' . $imagecrop['resolution'] . '.' . $imagecrop['ext'];
$tpl = get_markup_template("cropbody.tpl"); $tpl = Renderer::getMarkupTemplate("cropbody.tpl");
$o = Renderer::replaceMacros($tpl, $o = Renderer::replaceMacros($tpl,
[ [
'$filename' => $filename, '$filename' => $filename,
@ -319,7 +319,7 @@ function profile_photo_crop_ui_head(App $a, Image $image)
} }
} }
$a->page['htmlhead'] .= Renderer::replaceMacros(get_markup_template("crophead.tpl"), []); $a->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate("crophead.tpl"), []);
$imagecrop = [ $imagecrop = [
'hash' => $hash, 'hash' => $hash,

View file

@ -527,11 +527,11 @@ function profiles_content(App $a) {
return; return;
} }
$a->page['htmlhead'] .= Renderer::replaceMacros(get_markup_template('profed_head.tpl'), [ $a->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('profed_head.tpl'), [
'$baseurl' => System::baseUrl(true), '$baseurl' => System::baseUrl(true),
]); ]);
$opt_tpl = get_markup_template("profile-hide-friends.tpl"); $opt_tpl = Renderer::getMarkupTemplate("profile-hide-friends.tpl");
$hide_friends = Renderer::replaceMacros($opt_tpl,[ $hide_friends = Renderer::replaceMacros($opt_tpl,[
'$yesno' => [ '$yesno' => [
'hide-friends', //Name 'hide-friends', //Name
@ -553,7 +553,7 @@ function profiles_content(App $a) {
$detailled_profile = (PConfig::get(local_user(), 'system', 'detailled_profile') AND $personal_account); $detailled_profile = (PConfig::get(local_user(), 'system', 'detailled_profile') AND $personal_account);
$is_default = (($r[0]['is-default']) ? 1 : 0); $is_default = (($r[0]['is-default']) ? 1 : 0);
$tpl = get_markup_template("profile_edit.tpl"); $tpl = Renderer::getMarkupTemplate("profile_edit.tpl");
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$personal_account' => $personal_account, '$personal_account' => $personal_account,
'$detailled_profile' => $detailled_profile, '$detailled_profile' => $detailled_profile,
@ -664,7 +664,7 @@ function profiles_content(App $a) {
if (DBA::isResult($r)) { if (DBA::isResult($r)) {
$tpl = get_markup_template('profile_entry.tpl'); $tpl = Renderer::getMarkupTemplate('profile_entry.tpl');
$profiles = ''; $profiles = '';
foreach ($r as $rr) { foreach ($r as $rr) {
@ -678,7 +678,7 @@ function profiles_content(App $a) {
]); ]);
} }
$tpl_header = get_markup_template('profile_listing_header.tpl'); $tpl_header = Renderer::getMarkupTemplate('profile_listing_header.tpl');
$o .= Renderer::replaceMacros($tpl_header,[ $o .= Renderer::replaceMacros($tpl_header,[
'$header' => L10n::t('Edit/Manage Profiles'), '$header' => L10n::t('Edit/Manage Profiles'),
'$chg_photo' => L10n::t('Change profile photo'), '$chg_photo' => L10n::t('Change profile photo'),

View file

@ -229,7 +229,7 @@ function register_content(App $a)
if (Config::get('system', 'publish_all')) { if (Config::get('system', 'publish_all')) {
$profile_publish = '<input type="hidden" name="profile_publish_reg" value="1" />'; $profile_publish = '<input type="hidden" name="profile_publish_reg" value="1" />';
} else { } else {
$publish_tpl = get_markup_template("profile_publish.tpl"); $publish_tpl = Renderer::getMarkupTemplate("profile_publish.tpl");
$profile_publish = Renderer::replaceMacros($publish_tpl, [ $profile_publish = Renderer::replaceMacros($publish_tpl, [
'$instance' => 'reg', '$instance' => 'reg',
'$pubdesc' => L10n::t('Include your profile in member directory?'), '$pubdesc' => L10n::t('Include your profile in member directory?'),
@ -245,7 +245,7 @@ function register_content(App $a)
$license = ''; $license = '';
$tpl = get_markup_template("register.tpl"); $tpl = Renderer::getMarkupTemplate("register.tpl");
$arr = ['template' => $tpl]; $arr = ['template' => $tpl];

View file

@ -75,7 +75,7 @@ function removeme_content(App $a)
$_SESSION['remove_account_verify'] = $hash; $_SESSION['remove_account_verify'] = $hash;
$tpl = get_markup_template('removeme.tpl'); $tpl = Renderer::getMarkupTemplate('removeme.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$basedir' => $a->getBaseURL(), '$basedir' => $a->getBaseURL(),
'$hash' => $hash, '$hash' => $hash,

View file

@ -44,7 +44,7 @@ function search_saved_searches() {
} }
$tpl = get_markup_template("saved_searches_aside.tpl"); $tpl = Renderer::getMarkupTemplate("saved_searches_aside.tpl");
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$title' => L10n::t('Saved Searches'), '$title' => L10n::t('Saved Searches'),
@ -159,7 +159,7 @@ function search_content(App $a) {
} }
// contruct a wrapper for the search header // contruct a wrapper for the search header
$o = Renderer::replaceMacros(get_markup_template("content_wrapper.tpl"),[ $o = Renderer::replaceMacros(Renderer::getMarkupTemplate("content_wrapper.tpl"),[
'name' => "search-header", 'name' => "search-header",
'$title' => L10n::t("Search"), '$title' => L10n::t("Search"),
'$title_size' => 3, '$title_size' => 3,
@ -252,7 +252,7 @@ function search_content(App $a) {
$title = L10n::t('Results for: %s', $search); $title = L10n::t('Results for: %s', $search);
} }
$o .= Renderer::replaceMacros(get_markup_template("section_title.tpl"),[ $o .= Renderer::replaceMacros(Renderer::getMarkupTemplate("section_title.tpl"),[
'$title' => $title '$title' => $title
]); ]);

View file

@ -50,7 +50,7 @@ function settings_init(App $a)
// These lines provide the javascript needed by the acl selector // These lines provide the javascript needed by the acl selector
$tpl = get_markup_template('settings/head.tpl'); $tpl = Renderer::getMarkupTemplate('settings/head.tpl');
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [ $a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$ispublic' => L10n::t('everybody') '$ispublic' => L10n::t('everybody')
]); ]);
@ -130,7 +130,7 @@ function settings_init(App $a)
]; ];
$tabtpl = get_markup_template("generic_links_widget.tpl"); $tabtpl = Renderer::getMarkupTemplate("generic_links_widget.tpl");
$a->page['aside'] = Renderer::replaceMacros($tabtpl, [ $a->page['aside'] = Renderer::replaceMacros($tabtpl, [
'$title' => L10n::t('Settings'), '$title' => L10n::t('Settings'),
'$class' => 'settings-widget', '$class' => 'settings-widget',
@ -672,7 +672,7 @@ function settings_content(App $a)
if (($a->argc > 1) && ($a->argv[1] === 'oauth')) { if (($a->argc > 1) && ($a->argv[1] === 'oauth')) {
if (($a->argc > 2) && ($a->argv[2] === 'add')) { if (($a->argc > 2) && ($a->argv[2] === 'add')) {
$tpl = get_markup_template('settings/oauth_edit.tpl'); $tpl = Renderer::getMarkupTemplate('settings/oauth_edit.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$form_security_token' => BaseModule::getFormSecurityToken("settings_oauth"), '$form_security_token' => BaseModule::getFormSecurityToken("settings_oauth"),
'$title' => L10n::t('Add application'), '$title' => L10n::t('Add application'),
@ -698,7 +698,7 @@ function settings_content(App $a)
} }
$app = $r[0]; $app = $r[0];
$tpl = get_markup_template('settings/oauth_edit.tpl'); $tpl = Renderer::getMarkupTemplate('settings/oauth_edit.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$form_security_token' => BaseModule::getFormSecurityToken("settings_oauth"), '$form_security_token' => BaseModule::getFormSecurityToken("settings_oauth"),
'$title' => L10n::t('Add application'), '$title' => L10n::t('Add application'),
@ -730,7 +730,7 @@ function settings_content(App $a)
local_user()); local_user());
$tpl = get_markup_template('settings/oauth.tpl'); $tpl = Renderer::getMarkupTemplate('settings/oauth.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$form_security_token' => BaseModule::getFormSecurityToken("settings_oauth"), '$form_security_token' => BaseModule::getFormSecurityToken("settings_oauth"),
'$baseurl' => $a->getBaseURL(true), '$baseurl' => $a->getBaseURL(true),
@ -757,7 +757,7 @@ function settings_content(App $a)
Addon::callHooks('addon_settings', $settings_addons); Addon::callHooks('addon_settings', $settings_addons);
$tpl = get_markup_template('settings/addons.tpl'); $tpl = Renderer::getMarkupTemplate('settings/addons.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$form_security_token' => BaseModule::getFormSecurityToken("settings_addon"), '$form_security_token' => BaseModule::getFormSecurityToken("settings_addon"),
'$title' => L10n::t('Addon Settings'), '$title' => L10n::t('Addon Settings'),
@ -778,7 +778,7 @@ function settings_content(App $a)
} }
} }
$tpl = get_markup_template('settings/features.tpl'); $tpl = Renderer::getMarkupTemplate('settings/features.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$form_security_token' => BaseModule::getFormSecurityToken("settings_features"), '$form_security_token' => BaseModule::getFormSecurityToken("settings_features"),
'$title' => L10n::t('Additional Features'), '$title' => L10n::t('Additional Features'),
@ -834,7 +834,7 @@ function settings_content(App $a)
$mail_chk = ((DBA::isResult($r)) ? $r[0]['last_check'] : DBA::NULL_DATETIME); $mail_chk = ((DBA::isResult($r)) ? $r[0]['last_check'] : DBA::NULL_DATETIME);
$tpl = get_markup_template('settings/connectors.tpl'); $tpl = Renderer::getMarkupTemplate('settings/connectors.tpl');
$mail_disabled_message = (($mail_disabled) ? L10n::t('Email access is disabled on this site.') : ''); $mail_disabled_message = (($mail_disabled) ? L10n::t('Email access is disabled on this site.') : '');
@ -956,7 +956,7 @@ function settings_content(App $a)
$theme_config = theme_content($a); $theme_config = theme_content($a);
} }
$tpl = get_markup_template('settings/display.tpl'); $tpl = Renderer::getMarkupTemplate('settings/display.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$ptitle' => L10n::t('Display Settings'), '$ptitle' => L10n::t('Display Settings'),
'$form_security_token' => BaseModule::getFormSecurityToken("settings_display"), '$form_security_token' => BaseModule::getFormSecurityToken("settings_display"),
@ -1032,7 +1032,7 @@ function settings_content(App $a)
($a->user['account-type'] != Contact::ACCOUNT_TYPE_COMMUNITY)) ($a->user['account-type'] != Contact::ACCOUNT_TYPE_COMMUNITY))
$a->user['account-type'] = Contact::ACCOUNT_TYPE_COMMUNITY; $a->user['account-type'] = Contact::ACCOUNT_TYPE_COMMUNITY;
$pageset_tpl = get_markup_template('settings/pagetypes.tpl'); $pageset_tpl = Renderer::getMarkupTemplate('settings/pagetypes.tpl');
$pagetype = Renderer::replaceMacros($pageset_tpl, [ $pagetype = Renderer::replaceMacros($pageset_tpl, [
'$account_types' => L10n::t("Account Types"), '$account_types' => L10n::t("Account Types"),
@ -1091,7 +1091,7 @@ function settings_content(App $a)
$openid_field = ['openid_url', L10n::t('OpenID:'), $openid, L10n::t("\x28Optional\x29 Allow this OpenID to login to this account."), "", "", "url"]; $openid_field = ['openid_url', L10n::t('OpenID:'), $openid, L10n::t("\x28Optional\x29 Allow this OpenID to login to this account."), "", "", "url"];
} }
$opt_tpl = get_markup_template("field_yesno.tpl"); $opt_tpl = Renderer::getMarkupTemplate("field_yesno.tpl");
if (Config::get('system', 'publish_all')) { if (Config::get('system', 'publish_all')) {
$profile_in_dir = '<input type="hidden" name="profile_in_directory" value="1" />'; $profile_in_dir = '<input type="hidden" name="profile_in_directory" value="1" />';
} else { } else {
@ -1136,14 +1136,14 @@ function settings_content(App $a)
info(L10n::t('Profile is <strong>not published</strong>.') . EOL); info(L10n::t('Profile is <strong>not published</strong>.') . EOL);
} }
$tpl_addr = get_markup_template('settings/nick_set.tpl'); $tpl_addr = Renderer::getMarkupTemplate('settings/nick_set.tpl');
$prof_addr = Renderer::replaceMacros($tpl_addr,[ $prof_addr = Renderer::replaceMacros($tpl_addr,[
'$desc' => L10n::t("Your Identity Address is <strong>'%s'</strong> or '%s'.", $nickname . '@' . $a->getHostName() . $a->getURLPath(), System::baseUrl() . '/profile/' . $nickname), '$desc' => L10n::t("Your Identity Address is <strong>'%s'</strong> or '%s'.", $nickname . '@' . $a->getHostName() . $a->getURLPath(), System::baseUrl() . '/profile/' . $nickname),
'$basepath' => $a->getHostName() '$basepath' => $a->getHostName()
]); ]);
$stpl = get_markup_template('settings/settings.tpl'); $stpl = Renderer::getMarkupTemplate('settings/settings.tpl');
$expire_arr = [ $expire_arr = [
'days' => ['expire', L10n::t("Automatically expire posts after this many days:"), $expire, L10n::t('If empty, posts will not expire. Expired posts will be deleted')], 'days' => ['expire', L10n::t("Automatically expire posts after this many days:"), $expire, L10n::t('If empty, posts will not expire. Expired posts will be deleted')],

View file

@ -34,7 +34,7 @@ function suggest_init(App $a)
} }
} }
$a->page['content'] = Renderer::replaceMacros(get_markup_template('confirm.tpl'), [ $a->page['content'] = Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [
'$method' => 'get', '$method' => 'get',
'$message' => L10n::t('Do you really want to delete this suggestion?'), '$message' => L10n::t('Do you really want to delete this suggestion?'),
'$extra_inputs' => $inputs, '$extra_inputs' => $inputs,
@ -112,7 +112,7 @@ function suggest_content(App $a)
$entries[] = $entry; $entries[] = $entry;
} }
$tpl = get_markup_template('viewcontact_template.tpl'); $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl');
$o .= Renderer::replaceMacros($tpl,[ $o .= Renderer::replaceMacros($tpl,[
'$title' => L10n::t('Friend Suggestions'), '$title' => L10n::t('Friend Suggestions'),

View file

@ -47,7 +47,7 @@ function uexport_content(App $a) {
]; ];
Addon::callHooks('uexport_options', $options); Addon::callHooks('uexport_options', $options);
$tpl = get_markup_template("uexport.tpl"); $tpl = Renderer::getMarkupTemplate("uexport.tpl");
return Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),
'$title' => L10n::t('Export personal data'), '$title' => L10n::t('Export personal data'),

View file

@ -49,7 +49,7 @@ function uimport_content(App $a)
unset($_SESSION['mobile-theme']); unset($_SESSION['mobile-theme']);
} }
$tpl = get_markup_template("uimport.tpl"); $tpl = Renderer::getMarkupTemplate("uimport.tpl");
return Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [
'$regbutt' => L10n::t('Import'), '$regbutt' => L10n::t('Import'),
'$import' => [ '$import' => [

View file

@ -100,7 +100,7 @@ function unfollow_content(App $a)
} }
$request = System::baseUrl() . '/unfollow'; $request = System::baseUrl() . '/unfollow';
$tpl = get_markup_template('auto_request.tpl'); $tpl = Renderer::getMarkupTemplate('auto_request.tpl');
$self = DBA::selectFirst('contact', ['url'], ['uid' => $uid, 'self' => true]); $self = DBA::selectFirst('contact', ['url'], ['uid' => $uid, 'self' => true]);
@ -145,7 +145,7 @@ function unfollow_content(App $a)
$a->page['aside'] = ''; $a->page['aside'] = '';
Profile::load($a, '', 0, Contact::getDetailsByURL($contact['url'])); Profile::load($a, '', 0, Contact::getDetailsByURL($contact['url']));
$o .= Renderer::replaceMacros(get_markup_template('section_title.tpl'), ['$title' => L10n::t('Status Messages and Posts')]); $o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('section_title.tpl'), ['$title' => L10n::t('Status Messages and Posts')]);
// Show last public posts // Show last public posts
$o .= Contact::getPostsFromUrl($contact['url']); $o .= Contact::getPostsFromUrl($contact['url']);

View file

@ -51,7 +51,7 @@ function videos_init(App $a)
$account_type = Contact::getAccountType($profile); $account_type = Contact::getAccountType($profile);
$tpl = get_markup_template("vcard-widget.tpl"); $tpl = Renderer::getMarkupTemplate("vcard-widget.tpl");
$vcard_widget = Renderer::replaceMacros($tpl, [ $vcard_widget = Renderer::replaceMacros($tpl, [
'$name' => $profile['name'], '$name' => $profile['name'],
@ -103,7 +103,7 @@ function videos_init(App $a)
$a->page['aside'] .= $vcard_widget; $a->page['aside'] .= $vcard_widget;
$tpl = get_markup_template("videos_head.tpl"); $tpl = Renderer::getMarkupTemplate("videos_head.tpl");
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl,[ $a->page['htmlhead'] .= Renderer::replaceMacros($tpl,[
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),
]); ]);
@ -129,7 +129,7 @@ function videos_post(App $a)
$drop_url = $a->query_string; $drop_url = $a->query_string;
$a->page['content'] = Renderer::replaceMacros(get_markup_template('confirm.tpl'), [ $a->page['content'] = Renderer::replaceMacros(Renderer::getMarkupTemplate('confirm.tpl'), [
'$method' => 'post', '$method' => 'post',
'$message' => L10n::t('Do you really want to delete this video?'), '$message' => L10n::t('Do you really want to delete this video?'),
'$extra_inputs' => [ '$extra_inputs' => [
@ -382,7 +382,7 @@ function videos_content(App $a)
} }
} }
$tpl = get_markup_template('videos_recent.tpl'); $tpl = Renderer::getMarkupTemplate('videos_recent.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$title' => L10n::t('Recent Videos'), '$title' => L10n::t('Recent Videos'),
'$can_post' => $can_post, '$can_post' => $can_post,

View file

@ -125,7 +125,7 @@ function viewcontacts_content(App $a)
} }
$tpl = get_markup_template("viewcontact_template.tpl"); $tpl = Renderer::getMarkupTemplate("viewcontact_template.tpl");
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$title' => L10n::t('Contacts'), '$title' => L10n::t('Contacts'),
'$contacts' => $contacts, '$contacts' => $contacts,

View file

@ -115,14 +115,14 @@ function wallmessage_content(App $a) {
return; return;
} }
$tpl = get_markup_template('wallmsg-header.tpl'); $tpl = Renderer::getMarkupTemplate('wallmsg-header.tpl');
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [ $a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$baseurl' => System::baseUrl(true), '$baseurl' => System::baseUrl(true),
'$nickname' => $user['nickname'], '$nickname' => $user['nickname'],
'$linkurl' => L10n::t('Please enter a link URL:') '$linkurl' => L10n::t('Please enter a link URL:')
]); ]);
$tpl = get_markup_template('wallmessage.tpl'); $tpl = Renderer::getMarkupTemplate('wallmessage.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$header' => L10n::t('Send Private Message'), '$header' => L10n::t('Send Private Message'),
'$subheader' => L10n::t('If you wish for %s to respond, please check that the privacy settings on your site allow private mail from unknown senders.', $user['username']), '$subheader' => L10n::t('If you wish for %s to respond, please check that the privacy settings on your site allow private mail from unknown senders.', $user['username']),

View file

@ -106,7 +106,7 @@ function xrd_xml($a, $uri, $alias, $profile_url, $r)
header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Origin: *');
header("Content-type: text/xml"); header("Content-type: text/xml");
$tpl = get_markup_template('xrd_person.tpl'); $tpl = Renderer::getMarkupTemplate('xrd_person.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$nick' => $r['nickname'], '$nick' => $r['nickname'],

View file

@ -772,7 +772,7 @@ class App
Core\Addon::callHooks('head', $this->page['htmlhead']); Core\Addon::callHooks('head', $this->page['htmlhead']);
$tpl = get_markup_template('head.tpl'); $tpl = Core\Renderer::getMarkupTemplate('head.tpl');
/* put the head template at the beginning of page['htmlhead'] /* put the head template at the beginning of page['htmlhead']
* since the code added by the modules frequently depends on it * since the code added by the modules frequently depends on it
* being first * being first
@ -823,7 +823,7 @@ class App
} else { } else {
$link = 'toggle_mobile?off=1&address=' . curPageURL(); $link = 'toggle_mobile?off=1&address=' . curPageURL();
} }
$this->page['footer'] .= Core\Renderer::replaceMacros(get_markup_template("toggle_mobile_footer.tpl"), [ $this->page['footer'] .= Core\Renderer::replaceMacros(Core\Renderer::getMarkupTemplate("toggle_mobile_footer.tpl"), [
'$toggle_link' => $link, '$toggle_link' => $link,
'$toggle_text' => Core\L10n::t('toggle mobile') '$toggle_text' => Core\L10n::t('toggle mobile')
]); ]);
@ -831,7 +831,7 @@ class App
Core\Addon::callHooks('footer', $this->page['footer']); Core\Addon::callHooks('footer', $this->page['footer']);
$tpl = get_markup_template('footer.tpl'); $tpl = Core\Renderer::getMarkupTemplate('footer.tpl');
$this->page['footer'] = Core\Renderer::replaceMacros($tpl, [ $this->page['footer'] = Core\Renderer::replaceMacros($tpl, [
'$baseurl' => $this->getBaseURL(), '$baseurl' => $this->getBaseURL(),
'$footerScripts' => $this->footerScripts, '$footerScripts' => $this->footerScripts,
@ -1792,7 +1792,7 @@ class App
Core\Logger::log('index.php: page not found: ' . $_SERVER['REQUEST_URI'] . ' ADDRESS: ' . $_SERVER['REMOTE_ADDR'] . ' QUERY: ' . $_SERVER['QUERY_STRING'], Core\Logger::DEBUG); Core\Logger::log('index.php: page not found: ' . $_SERVER['REQUEST_URI'] . ' ADDRESS: ' . $_SERVER['REMOTE_ADDR'] . ' QUERY: ' . $_SERVER['QUERY_STRING'], Core\Logger::DEBUG);
header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . Core\L10n::t('Not Found')); header($_SERVER["SERVER_PROTOCOL"] . ' 404 ' . Core\L10n::t('Not Found'));
$tpl = get_markup_template("404.tpl"); $tpl = Core\Renderer::getMarkupTemplate("404.tpl");
$this->page['content'] = Core\Renderer::replaceMacros($tpl, [ $this->page['content'] = Core\Renderer::replaceMacros($tpl, [
'$message' => Core\L10n::t('Page not found.') '$message' => Core\L10n::t('Page not found.')
]); ]);
@ -1881,7 +1881,7 @@ class App
// Add the navigation (menu) template // Add the navigation (menu) template
if ($this->module != 'install' && $this->module != 'maintenance') { if ($this->module != 'install' && $this->module != 'maintenance') {
$this->page['htmlhead'] .= Core\Renderer::replaceMacros(get_markup_template('nav_head.tpl'), []); $this->page['htmlhead'] .= Core\Renderer::replaceMacros(Core\Renderer::getMarkupTemplate('nav_head.tpl'), []);
$this->page['nav'] = Content\Nav::build($this); $this->page['nav'] = Content\Nav::build($this);
} }

View file

@ -123,7 +123,7 @@ class ForumManager
$entries[] = $entry; $entries[] = $entry;
} }
$tpl = get_markup_template('widget_forumlist.tpl'); $tpl = Renderer::getMarkupTemplate('widget_forumlist.tpl');
$o .= Renderer::replaceMacros( $o .= Renderer::replaceMacros(
$tpl, $tpl,

View file

@ -62,7 +62,7 @@ class Nav
$nav_info = self::getInfo($a); $nav_info = self::getInfo($a);
$tpl = get_markup_template('nav.tpl'); $tpl = Renderer::getMarkupTemplate('nav.tpl');
$nav .= Renderer::replaceMacros($tpl, [ $nav .= Renderer::replaceMacros($tpl, [
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),

View file

@ -179,7 +179,7 @@ class OEmbed
$th = 120; $th = 120;
$tw = $th * $tr; $tw = $th * $tr;
$tpl = get_markup_template('oembed_video.tpl'); $tpl = Renderer::getMarkupTemplate('oembed_video.tpl');
$ret .= Renderer::replaceMacros($tpl, [ $ret .= Renderer::replaceMacros($tpl, [
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),
'$embedurl' => $oembed->embed_url, '$embedurl' => $oembed->embed_url,

View file

@ -173,7 +173,7 @@ class Pager
] ]
]; ];
$tpl = get_markup_template('paginate.tpl'); $tpl = Renderer::getMarkupTemplate('paginate.tpl');
return Renderer::replaceMacros($tpl, ['pager' => $data]); return Renderer::replaceMacros($tpl, ['pager' => $data]);
} }
@ -277,7 +277,7 @@ class Pager
]; ];
} }
$tpl = get_markup_template('paginate.tpl'); $tpl = Renderer::getMarkupTemplate('paginate.tpl');
return Renderer::replaceMacros($tpl, ['pager' => $data]); return Renderer::replaceMacros($tpl, ['pager' => $data]);
} }
} }

View file

@ -987,7 +987,7 @@ class BBCode extends BaseObject
} else { } else {
$text = ($is_quote_share? "\n" : ''); $text = ($is_quote_share? "\n" : '');
$tpl = get_markup_template('shared_content.tpl'); $tpl = Renderer::getMarkupTemplate('shared_content.tpl');
$text .= Renderer::replaceMacros($tpl, [ $text .= Renderer::replaceMacros($tpl, [
'$profile' => $attributes['profile'], '$profile' => $attributes['profile'],
'$avatar' => $attributes['avatar'], '$avatar' => $attributes['avatar'],

View file

@ -31,7 +31,7 @@ class Widget
*/ */
public static function follow($value = "") public static function follow($value = "")
{ {
return Renderer::replaceMacros(get_markup_template('follow.tpl'), array( return Renderer::replaceMacros(Renderer::getMarkupTemplate('follow.tpl'), array(
'$connect' => L10n::t('Add New Contact'), '$connect' => L10n::t('Add New Contact'),
'$desc' => L10n::t('Enter address or web location'), '$desc' => L10n::t('Enter address or web location'),
'$hint' => L10n::t('Example: bob@example.com, http://example.com/barbara'), '$hint' => L10n::t('Example: bob@example.com, http://example.com/barbara'),
@ -74,7 +74,7 @@ class Widget
$aside = []; $aside = [];
$aside['$nv'] = $nv; $aside['$nv'] = $nv;
return Renderer::replaceMacros(get_markup_template('peoplefind.tpl'), $aside); return Renderer::replaceMacros(Renderer::getMarkupTemplate('peoplefind.tpl'), $aside);
} }
/** /**
@ -152,7 +152,7 @@ class Widget
return ''; return '';
} }
return Renderer::replaceMacros(get_markup_template('nets.tpl'), array( return Renderer::replaceMacros(Renderer::getMarkupTemplate('nets.tpl'), array(
'$title' => L10n::t('Networks'), '$title' => L10n::t('Networks'),
'$desc' => '', '$desc' => '',
'$sel_all' => (($selected == '') ? 'selected' : ''), '$sel_all' => (($selected == '') ? 'selected' : ''),
@ -194,7 +194,7 @@ class Widget
} }
} }
return Renderer::replaceMacros(get_markup_template('fileas_widget.tpl'), array( return Renderer::replaceMacros(Renderer::getMarkupTemplate('fileas_widget.tpl'), array(
'$title' => L10n::t('Saved Folders'), '$title' => L10n::t('Saved Folders'),
'$desc' => '', '$desc' => '',
'$sel_all' => (($selected == '') ? 'selected' : ''), '$sel_all' => (($selected == '') ? 'selected' : ''),
@ -234,7 +234,7 @@ class Widget
} }
} }
return Renderer::replaceMacros(get_markup_template('categories_widget.tpl'), array( return Renderer::replaceMacros(Renderer::getMarkupTemplate('categories_widget.tpl'), array(
'$title' => L10n::t('Categories'), '$title' => L10n::t('Categories'),
'$desc' => '', '$desc' => '',
'$sel_all' => (($selected == '') ? 'selected' : ''), '$sel_all' => (($selected == '') ? 'selected' : ''),
@ -301,7 +301,7 @@ class Widget
$r = GContact::commonFriendsZcid($profile_uid, $zcid, 0, 5, true); $r = GContact::commonFriendsZcid($profile_uid, $zcid, 0, 5, true);
} }
return Renderer::replaceMacros(get_markup_template('remote_friends_common.tpl'), array( return Renderer::replaceMacros(Renderer::getMarkupTemplate('remote_friends_common.tpl'), array(
'$desc' => L10n::tt("%d contact in common", "%d contacts in common", $t), '$desc' => L10n::tt("%d contact in common", "%d contacts in common", $t),
'$base' => System::baseUrl(), '$base' => System::baseUrl(),
'$uid' => $profile_uid, '$uid' => $profile_uid,

View file

@ -61,7 +61,7 @@ class CalendarExport
// of the profile page it should be the personal /events page. So we can use $a->user. // of the profile page it should be the personal /events page. So we can use $a->user.
$user = defaults($a->data['user'], 'nickname', $a->user['nickname']); $user = defaults($a->data['user'], 'nickname', $a->user['nickname']);
$tpl = get_markup_template("events_aside.tpl"); $tpl = Renderer::getMarkupTemplate("events_aside.tpl");
$return = Renderer::replaceMacros($tpl, [ $return = Renderer::replaceMacros($tpl, [
'$etitle' => L10n::t("Export"), '$etitle' => L10n::t("Export"),
'$export_ical' => L10n::t("Export calendar as ical"), '$export_ical' => L10n::t("Export calendar as ical"),

View file

@ -50,7 +50,7 @@ class TagCloud
$tags[] = $tag; $tags[] = $tag;
} }
$tpl = get_markup_template('tagblock_widget.tpl'); $tpl = Renderer::getMarkupTemplate('tagblock_widget.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$title' => L10n::t('Tags'), '$title' => L10n::t('Tags'),
'$tags' => $tags '$tags' => $tags

View file

@ -292,7 +292,7 @@ class ACL extends BaseObject
} }
} }
$tpl = get_markup_template('acl_selector.tpl'); $tpl = Renderer::getMarkupTemplate('acl_selector.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$showall' => L10n::t('Visible to everybody'), '$showall' => L10n::t('Visible to everybody'),
'$show' => L10n::t('show'), '$show' => L10n::t('show'),

View file

@ -140,7 +140,7 @@ class Installer
*/ */
public function createConfig($phppath, $urlpath, $dbhost, $dbuser, $dbpass, $dbdata, $timezone, $language, $adminmail, $basepath) public function createConfig($phppath, $urlpath, $dbhost, $dbuser, $dbpass, $dbdata, $timezone, $language, $adminmail, $basepath)
{ {
$tpl = get_markup_template('local.ini.tpl'); $tpl = Renderer::getMarkupTemplate('local.ini.tpl');
$txt = Renderer::replaceMacros($tpl, [ $txt = Renderer::replaceMacros($tpl, [
'$phpath' => $phppath, '$phpath' => $phppath,
'$dbhost' => $dbhost, '$dbhost' => $dbhost,
@ -238,7 +238,7 @@ class Installer
$help .= L10n::t('Could not find a command line version of PHP in the web server PATH.') . EOL; $help .= L10n::t('Could not find a command line version of PHP in the web server PATH.') . EOL;
$help .= L10n::t("If you don't have a command line version of PHP installed on your server, you will not be able to run the background processing. See <a href='https://github.com/friendica/friendica/blob/master/doc/Install.md#set-up-the-worker'>'Setup the worker'</a>") . EOL; $help .= L10n::t("If you don't have a command line version of PHP installed on your server, you will not be able to run the background processing. See <a href='https://github.com/friendica/friendica/blob/master/doc/Install.md#set-up-the-worker'>'Setup the worker'</a>") . EOL;
$help .= EOL . EOL; $help .= EOL . EOL;
$tpl = get_markup_template('field_input.tpl'); $tpl = Renderer::getMarkupTemplate('field_input.tpl');
$help .= Renderer::replaceMacros($tpl, [ $help .= Renderer::replaceMacros($tpl, [
'$field' => ['phpath', L10n::t('PHP executable path'), $phppath, L10n::t('Enter full path to php executable. You can leave this blank to continue the installation.')], '$field' => ['phpath', L10n::t('PHP executable path'), $phppath, L10n::t('Enter full path to php executable. You can leave this blank to continue the installation.')],
]); ]);

View file

@ -140,7 +140,7 @@ class System extends BaseObject
header($_SERVER["SERVER_PROTOCOL"] . ' ' . $val . ' ' . $err); header($_SERVER["SERVER_PROTOCOL"] . ' ' . $val . ' ' . $err);
if (isset($description["title"])) { if (isset($description["title"])) {
$tpl = get_markup_template('http_status.tpl'); $tpl = Renderer::getMarkupTemplate('http_status.tpl');
echo Renderer::replaceMacros($tpl, ['$title' => $description["title"], echo Renderer::replaceMacros($tpl, ['$title' => $description["title"],
'$description' => defaults($description, 'description', '')]); '$description' => defaults($description, 'description', '')]);
} }

View file

@ -899,7 +899,7 @@ class Event extends BaseObject
// Construct the profile link (magic-auth). // Construct the profile link (magic-auth).
$profile_link = Contact::magicLinkById($item['author-id']); $profile_link = Contact::magicLinkById($item['author-id']);
$tpl = get_markup_template('event_stream_item.tpl'); $tpl = Renderer::getMarkupTemplate('event_stream_item.tpl');
$return = Renderer::replaceMacros($tpl, [ $return = Renderer::replaceMacros($tpl, [
'$id' => $item['event-id'], '$id' => $item['event-id'],
'$title' => prepare_text($item['event-summary']), '$title' => prepare_text($item['event-summary']),

View file

@ -333,7 +333,7 @@ class Group extends BaseObject
$label = L10n::t('Default privacy group for new contacts'); $label = L10n::t('Default privacy group for new contacts');
} }
$o = Renderer::replaceMacros(get_markup_template('group_selection.tpl'), [ $o = Renderer::replaceMacros(Renderer::getMarkupTemplate('group_selection.tpl'), [
'$label' => $label, '$label' => $label,
'$groups' => $display_groups '$groups' => $display_groups
]); ]);
@ -400,7 +400,7 @@ class Group extends BaseObject
]; ];
} }
$tpl = get_markup_template('group_side.tpl'); $tpl = Renderer::getMarkupTemplate('group_side.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$add' => L10n::t('add'), '$add' => L10n::t('add'),
'$title' => L10n::t('Groups'), '$title' => L10n::t('Groups'),

View file

@ -173,7 +173,7 @@ class Profile
if (local_user() && local_user() == $a->profile['uid'] && $profiledata) { if (local_user() && local_user() == $a->profile['uid'] && $profiledata) {
$a->page['aside'] .= Renderer::replaceMacros( $a->page['aside'] .= Renderer::replaceMacros(
get_markup_template('profile_edlink.tpl'), Renderer::getMarkupTemplate('profile_edlink.tpl'),
[ [
'$editprofile' => L10n::t('Edit profile'), '$editprofile' => L10n::t('Edit profile'),
'$profid' => $a->profile['id'] '$profid' => $a->profile['id']
@ -517,7 +517,7 @@ class Profile
$p['url'] = Contact::magicLink(defaults($p, 'url', $profile_url)); $p['url'] = Contact::magicLink(defaults($p, 'url', $profile_url));
$tpl = get_markup_template('profile_vcard.tpl'); $tpl = Renderer::getMarkupTemplate('profile_vcard.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$profile' => $p, '$profile' => $p,
'$xmpp' => $xmpp, '$xmpp' => $xmpp,
@ -622,7 +622,7 @@ class Profile
} }
} }
} }
$tpl = get_markup_template('birthdays_reminder.tpl'); $tpl = Renderer::getMarkupTemplate('birthdays_reminder.tpl');
return Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),
'$classtoday' => $classtoday, '$classtoday' => $classtoday,
@ -711,7 +711,7 @@ class Profile
DBA::close($s); DBA::close($s);
$classtoday = (($istoday) ? 'event-today' : ''); $classtoday = (($istoday) ? 'event-today' : '');
} }
$tpl = get_markup_template('events_reminder.tpl'); $tpl = Renderer::getMarkupTemplate('events_reminder.tpl');
return Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),
'$classtoday' => $classtoday, '$classtoday' => $classtoday,
@ -728,12 +728,12 @@ class Profile
$uid = $a->profile['uid']; $uid = $a->profile['uid'];
$o .= Renderer::replaceMacros( $o .= Renderer::replaceMacros(
get_markup_template('section_title.tpl'), Renderer::getMarkupTemplate('section_title.tpl'),
['$title' => L10n::t('Profile')] ['$title' => L10n::t('Profile')]
); );
if ($a->profile['name']) { if ($a->profile['name']) {
$tpl = get_markup_template('profile_advanced.tpl'); $tpl = Renderer::getMarkupTemplate('profile_advanced.tpl');
$profile = []; $profile = [];
@ -978,7 +978,7 @@ class Profile
$arr = ['is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => $tab, 'tabs' => $tabs]; $arr = ['is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => $tab, 'tabs' => $tabs];
Addon::callHooks('profile_tabs', $arr); Addon::callHooks('profile_tabs', $arr);
$tpl = get_markup_template('common_tabs.tpl'); $tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
return Renderer::replaceMacros($tpl, ['$tabs' => $arr['tabs']]); return Renderer::replaceMacros($tpl, ['$tabs' => $arr['tabs']]);
} }

View file

@ -83,7 +83,7 @@ class Contact extends BaseModule
} }
/// @TODO Add nice spaces /// @TODO Add nice spaces
$vcard_widget = Renderer::replaceMacros(get_markup_template('vcard-widget.tpl'), [ $vcard_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate('vcard-widget.tpl'), [
'$name' => htmlentities($contact['name']), '$name' => htmlentities($contact['name']),
'$photo' => $contact['photo'], '$photo' => $contact['photo'],
'$url' => Model\Contact::MagicLink($contact['url']), '$url' => Model\Contact::MagicLink($contact['url']),
@ -114,7 +114,7 @@ class Contact extends BaseModule
$groups_widget = null; $groups_widget = null;
} }
$a->page['aside'] .= Renderer::replaceMacros(get_markup_template('contacts-widget-sidebar.tpl'), [ $a->page['aside'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('contacts-widget-sidebar.tpl'), [
'$vcard_widget' => $vcard_widget, '$vcard_widget' => $vcard_widget,
'$findpeople_widget' => $findpeople_widget, '$findpeople_widget' => $findpeople_widget,
'$follow_widget' => $follow_widget, '$follow_widget' => $follow_widget,
@ -123,7 +123,7 @@ class Contact extends BaseModule
]); ]);
$base = $a->getBaseURL(); $base = $a->getBaseURL();
$tpl = get_markup_template('contacts-head.tpl'); $tpl = Renderer::getMarkupTemplate('contacts-head.tpl');
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [ $a->page['htmlhead'] .= Renderer::replaceMacros($tpl, [
'$baseurl' => System::baseUrl(true), '$baseurl' => System::baseUrl(true),
'$base' => $base '$base' => $base
@ -439,7 +439,7 @@ class Contact extends BaseModule
$a->page['aside'] = ''; $a->page['aside'] = '';
return Renderer::replaceMacros(get_markup_template('contact_drop_confirm.tpl'), [ return Renderer::replaceMacros(Renderer::getMarkupTemplate('contact_drop_confirm.tpl'), [
'$header' => L10n::t('Drop contact'), '$header' => L10n::t('Drop contact'),
'$contact' => self::getContactTemplateVars($orig_record), '$contact' => self::getContactTemplateVars($orig_record),
'$method' => 'get', '$method' => 'get',
@ -476,7 +476,7 @@ class Contact extends BaseModule
$contact_id = $a->data['contact']['id']; $contact_id = $a->data['contact']['id'];
$contact = $a->data['contact']; $contact = $a->data['contact'];
$a->page['htmlhead'] .= Renderer::replaceMacros(get_markup_template('contact_head.tpl'), [ $a->page['htmlhead'] .= Renderer::replaceMacros(Renderer::getMarkupTemplate('contact_head.tpl'), [
'$baseurl' => $a->getBaseURL(true), '$baseurl' => $a->getBaseURL(true),
]); ]);
@ -592,7 +592,7 @@ class Contact extends BaseModule
$contact_settings_label = null; $contact_settings_label = null;
} }
$tpl = get_markup_template('contact_edit.tpl'); $tpl = Renderer::getMarkupTemplate('contact_edit.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$header' => L10n::t('Contact'), '$header' => L10n::t('Contact'),
'$tab_str' => $tab_str, '$tab_str' => $tab_str,
@ -756,7 +756,7 @@ class Contact extends BaseModule
], ],
]; ];
$tab_tpl = get_markup_template('common_tabs.tpl'); $tab_tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
$t = Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs]); $t = Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs]);
$total = 0; $total = 0;
@ -801,7 +801,7 @@ class Contact extends BaseModule
} }
} }
$tpl = get_markup_template('contacts-template.tpl'); $tpl = Renderer::getMarkupTemplate('contacts-template.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),
'$header' => L10n::t('Contacts') . (($nets) ? ' - ' . ContactSelector::networkToName($nets) : ''), '$header' => L10n::t('Contacts') . (($nets) ? ' - ' . ContactSelector::networkToName($nets) : ''),
@ -904,7 +904,7 @@ class Contact extends BaseModule
]; ];
} }
$tab_tpl = get_markup_template('common_tabs.tpl'); $tab_tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
$tab_str = Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs]); $tab_str = Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs]);
return $tab_str; return $tab_str;

View file

@ -124,7 +124,7 @@ class Install extends BaseModule
$status = self::$installer->checkEnvironment($a->getBaseURL(), $phppath); $status = self::$installer->checkEnvironment($a->getBaseURL(), $phppath);
$tpl = get_markup_template('install_checks.tpl'); $tpl = Renderer::getMarkupTemplate('install_checks.tpl');
$output .= Renderer::replaceMacros($tpl, [ $output .= Renderer::replaceMacros($tpl, [
'$title' => $install_title, '$title' => $install_title,
'$pass' => L10n::t('System check'), '$pass' => L10n::t('System check'),
@ -146,7 +146,7 @@ class Install extends BaseModule
$phpath = notags(trim(defaults($_POST, 'phpath' , '' ))); $phpath = notags(trim(defaults($_POST, 'phpath' , '' )));
$adminmail = notags(trim(defaults($_POST, 'adminmail', '' ))); $adminmail = notags(trim(defaults($_POST, 'adminmail', '' )));
$tpl = get_markup_template('install_db.tpl'); $tpl = Renderer::getMarkupTemplate('install_db.tpl');
$output .= Renderer::replaceMacros($tpl, [ $output .= Renderer::replaceMacros($tpl, [
'$title' => $install_title, '$title' => $install_title,
'$pass' => L10n::t('Database connection'), '$pass' => L10n::t('Database connection'),
@ -202,7 +202,7 @@ class Install extends BaseModule
/* Installed langs */ /* Installed langs */
$lang_choices = L10n::getAvailableLanguages(); $lang_choices = L10n::getAvailableLanguages();
$tpl = get_markup_template('install_settings.tpl'); $tpl = Renderer::getMarkupTemplate('install_settings.tpl');
$output .= Renderer::replaceMacros($tpl, [ $output .= Renderer::replaceMacros($tpl, [
'$title' => $install_title, '$title' => $install_title,
'$checks' => self::$installer->getChecks(), '$checks' => self::$installer->getChecks(),
@ -233,7 +233,7 @@ class Install extends BaseModule
$db_return_text .= $txt; $db_return_text .= $txt;
} }
$tpl = get_markup_template('install_finished.tpl'); $tpl = Renderer::getMarkupTemplate('install_finished.tpl');
$output .= Renderer::replaceMacros($tpl, [ $output .= Renderer::replaceMacros($tpl, [
'$title' => $install_title, '$title' => $install_title,
'$checks' => self::$installer->getChecks(), '$checks' => self::$installer->getChecks(),

View file

@ -28,7 +28,7 @@ class Itemsource extends \Friendica\BaseModule
$source = htmlspecialchars($conversation['source']); $source = htmlspecialchars($conversation['source']);
} }
$tpl = get_markup_template('debug/itemsource.tpl'); $tpl = Renderer::getMarkupTemplate('debug/itemsource.tpl');
$o = Renderer::replaceMacros($tpl, [ $o = Renderer::replaceMacros($tpl, [
'$guid' => ['guid', L10n::t('Item Guid'), htmlentities(defaults($_REQUEST, 'guid', '')), ''], '$guid' => ['guid', L10n::t('Item Guid'), htmlentities(defaults($_REQUEST, 'guid', '')), ''],
'$source' => $source, '$source' => $source,

View file

@ -300,16 +300,16 @@ class Login extends BaseModule
} }
if (local_user()) { if (local_user()) {
$tpl = get_markup_template('logout.tpl'); $tpl = Renderer::getMarkupTemplate('logout.tpl');
} else { } else {
$a->page['htmlhead'] .= Renderer::replaceMacros( $a->page['htmlhead'] .= Renderer::replaceMacros(
get_markup_template('login_head.tpl'), Renderer::getMarkupTemplate('login_head.tpl'),
[ [
'$baseurl' => $a->getBaseURL(true) '$baseurl' => $a->getBaseURL(true)
] ]
); );
$tpl = get_markup_template('login.tpl'); $tpl = Renderer::getMarkupTemplate('login.tpl');
$_SESSION['return_path'] = $return_path; $_SESSION['return_path'] = $return_path;
} }

View file

@ -65,7 +65,7 @@ class Tos extends BaseModule
* @return string * @return string
**/ **/
public static function content() { public static function content() {
$tpl = get_markup_template('tos.tpl'); $tpl = Renderer::getMarkupTemplate('tos.tpl');
if (Config::get('system', 'tosdisplay')) { if (Config::get('system', 'tosdisplay')) {
return Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [
'$title' => L10n::t('Terms of Service'), '$title' => L10n::t('Terms of Service'),

View file

@ -786,7 +786,7 @@ class Post extends BaseObject
$uid = $parent_uid; $uid = $parent_uid;
} }
$template = get_markup_template($this->getCommentBoxTemplate()); $template = Renderer::getMarkupTemplate($this->getCommentBoxTemplate());
$comment_box = Renderer::replaceMacros($template, [ $comment_box = Renderer::replaceMacros($template, [
'$return_path' => $a->query_string, '$return_path' => $a->query_string,
'$threaded' => $this->isThreaded(), '$threaded' => $this->isThreaded(),

View file

@ -115,7 +115,7 @@ class Temporal
$options = str_replace('<select id="timezone_select" name="timezone">', '', $options); $options = str_replace('<select id="timezone_select" name="timezone">', '', $options);
$options = str_replace('</select>', '', $options); $options = str_replace('</select>', '', $options);
$tpl = get_markup_template('field_select_raw.tpl'); $tpl = Renderer::getMarkupTemplate('field_select_raw.tpl');
return Renderer::replaceMacros($tpl, [ return Renderer::replaceMacros($tpl, [
'$field' => [$name, $label, $current, $help, $options], '$field' => [$name, $label, $current, $help, $options],
]); ]);
@ -141,7 +141,7 @@ class Temporal
$age = (intval($value) ? self::getAgeByTimezone($value, $a->user["timezone"], $a->user["timezone"]) : ""); $age = (intval($value) ? self::getAgeByTimezone($value, $a->user["timezone"], $a->user["timezone"]) : "");
$tpl = get_markup_template("field_input.tpl"); $tpl = Renderer::getMarkupTemplate("field_input.tpl");
$o = Renderer::replaceMacros($tpl, $o = Renderer::replaceMacros($tpl,
[ [
'$field' => [ '$field' => [
@ -247,7 +247,7 @@ class Temporal
$readable_format = str_replace(['Y', 'm', 'd', 'H', 'i'], ['yyyy', 'mm', 'dd', 'HH', 'MM'], $dateformat); $readable_format = str_replace(['Y', 'm', 'd', 'H', 'i'], ['yyyy', 'mm', 'dd', 'HH', 'MM'], $dateformat);
$tpl = get_markup_template('field_datetime.tpl'); $tpl = Renderer::getMarkupTemplate('field_datetime.tpl');
$o .= Renderer::replaceMacros($tpl, [ $o .= Renderer::replaceMacros($tpl, [
'$field' => [ '$field' => [
$id, $id,

View file

@ -67,7 +67,7 @@ function clean_form(App $a, &$colorset, $user)
$color = Config::get('duepuntozero', 'colorset'); $color = Config::get('duepuntozero', 'colorset');
} }
$t = get_markup_template("theme_settings.tpl"); $t = Renderer::getMarkupTemplate("theme_settings.tpl");
$o = Renderer::replaceMacros($t, [ $o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Submit'), '$submit' => L10n::t('Submit'),
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),

View file

@ -114,7 +114,7 @@ function frio_form($arr)
$background_image_help = '<strong>' . L10n::t('Note') . ': </strong>' . L10n::t('Check image permissions if all users are allowed to see the image'); $background_image_help = '<strong>' . L10n::t('Note') . ': </strong>' . L10n::t('Check image permissions if all users are allowed to see the image');
$t = get_markup_template('theme_settings.tpl'); $t = Renderer::getMarkupTemplate('theme_settings.tpl');
$ctx = [ $ctx = [
'$submit' => L10n::t('Submit'), '$submit' => L10n::t('Submit'),
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),

View file

@ -69,7 +69,7 @@ function quattro_form(App $a, $align, $color, $tfs, $pfs) {
$pfs = "12"; $pfs = "12";
} }
$t = get_markup_template("theme_settings.tpl" ); $t = Renderer::getMarkupTemplate("theme_settings.tpl" );
$o = Renderer::replaceMacros($t, [ $o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Submit'), '$submit' => L10n::t('Submit'),
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),

View file

@ -111,7 +111,7 @@ if (! function_exists('_js_in_foot')) {
$ssl_state = null; $ssl_state = null;
$baseurl = System::baseUrl($ssl_state); $baseurl = System::baseUrl($ssl_state);
$bottom['$baseurl'] = $baseurl; $bottom['$baseurl'] = $baseurl;
$tpl = get_markup_template('bottom.tpl'); $tpl = Renderer::getMarkupTemplate('bottom.tpl');
return $a->page['bottom'] = Renderer::replaceMacros($tpl, $bottom); return $a->page['bottom'] = Renderer::replaceMacros($tpl, $bottom);
} }

View file

@ -71,7 +71,7 @@ function theme_admin(App $a) {
if ($helperlist == "") if ($helperlist == "")
$helperlist = "https://forum.friendi.ca/profile/helpers"; $helperlist = "https://forum.friendi.ca/profile/helpers";
$t = get_markup_template("theme_admin_settings.tpl"); $t = Renderer::getMarkupTemplate("theme_admin_settings.tpl");
$o = Renderer::replaceMacros($t, [ $o = Renderer::replaceMacros($t, [
'$helperlist' => ['vier_helperlist', L10n::t('Comma separated list of helper forums'), $helperlist, '', ''], '$helperlist' => ['vier_helperlist', L10n::t('Comma separated list of helper forums'), $helperlist, '', ''],
]); ]);
@ -115,7 +115,7 @@ function vier_form(App $a, $style, $show_pages, $show_profiles, $show_helpers, $
$show_or_not = ['0' => L10n::t("don't show"), '1' => L10n::t("show"),]; $show_or_not = ['0' => L10n::t("don't show"), '1' => L10n::t("show"),];
$t = get_markup_template("theme_settings.tpl"); $t = Renderer::getMarkupTemplate("theme_settings.tpl");
$o = Renderer::replaceMacros($t, [ $o = Renderer::replaceMacros($t, [
'$submit' => L10n::t('Submit'), '$submit' => L10n::t('Submit'),
'$baseurl' => System::baseUrl(), '$baseurl' => System::baseUrl(),

View file

@ -145,7 +145,7 @@ function vier_community_info()
if ($show_profiles) { if ($show_profiles) {
$r = GContact::suggestionQuery(local_user(), 0, 9); $r = GContact::suggestionQuery(local_user(), 0, 9);
$tpl = get_markup_template('ch_directory_item.tpl'); $tpl = Renderer::getMarkupTemplate('ch_directory_item.tpl');
if (DBA::isResult($r)) { if (DBA::isResult($r)) {
$aside['$comunity_profiles_title'] = L10n::t('Community Profiles'); $aside['$comunity_profiles_title'] = L10n::t('Community Profiles');
$aside['$comunity_profiles_items'] = []; $aside['$comunity_profiles_items'] = [];
@ -167,7 +167,7 @@ function vier_community_info()
$publish = (Config::get('system', 'publish_all') ? '' : " AND `publish` = 1 "); $publish = (Config::get('system', 'publish_all') ? '' : " AND `publish` = 1 ");
$order = " ORDER BY `register_date` DESC "; $order = " ORDER BY `register_date` DESC ";
$tpl = get_markup_template('ch_directory_item.tpl'); $tpl = Renderer::getMarkupTemplate('ch_directory_item.tpl');
$r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname` $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`
FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`
@ -244,7 +244,7 @@ function vier_community_info()
} }
$tpl = get_markup_template('widget_forumlist_right.tpl'); $tpl = Renderer::getMarkupTemplate('widget_forumlist_right.tpl');
$page = Renderer::replaceMacros( $page = Renderer::replaceMacros(
$tpl, $tpl,
@ -289,7 +289,7 @@ function vier_community_info()
$r[] = ["url" => "help/Quick-Start-guide", "name" => L10n::t("Quick Start")]; $r[] = ["url" => "help/Quick-Start-guide", "name" => L10n::t("Quick Start")];
$tpl = get_markup_template('ch_helpers.tpl'); $tpl = Renderer::getMarkupTemplate('ch_helpers.tpl');
if ($r) { if ($r) {
$helpers = []; $helpers = [];
@ -380,7 +380,7 @@ function vier_community_info()
$r[] = ["photo" => "images/mail.png", "name" => "E-Mail"]; $r[] = ["photo" => "images/mail.png", "name" => "E-Mail"];
} }
$tpl = get_markup_template('ch_connectors.tpl'); $tpl = Renderer::getMarkupTemplate('ch_connectors.tpl');
if (DBA::isResult($r)) { if (DBA::isResult($r)) {
$con_services = []; $con_services = [];
@ -400,6 +400,6 @@ function vier_community_info()
//end connectable services //end connectable services
//print right_aside //print right_aside
$tpl = get_markup_template('communityhome.tpl'); $tpl = Renderer::getMarkupTemplate('communityhome.tpl');
$a->page['right_aside'] = Renderer::replaceMacros($tpl, $aside); $a->page['right_aside'] = Renderer::replaceMacros($tpl, $aside);
} }