replace macros

implement new replaceMacros function
This commit is contained in:
Adam Magness 2018-10-31 10:35:50 -04:00
commit 91facd2d0a
91 changed files with 335 additions and 249 deletions

View file

@ -8,6 +8,7 @@ use Friendica\Content\Nav;
use Friendica\Content\Pager;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\Renderer;
use Friendica\Core\System;
use Friendica\Database\DBA;
use Friendica\Model\Contact;
@ -52,7 +53,7 @@ function videos_init(App $a)
$tpl = get_markup_template("vcard-widget.tpl");
$vcard_widget = replace_macros($tpl, [
$vcard_widget = Renderer::replaceMacros($tpl, [
'$name' => $profile['name'],
'$photo' => $profile['photo'],
'$addr' => defaults($profile, 'addr', ''),
@ -103,7 +104,7 @@ function videos_init(App $a)
$a->page['aside'] .= $vcard_widget;
$tpl = get_markup_template("videos_head.tpl");
$a->page['htmlhead'] .= replace_macros($tpl,[
$a->page['htmlhead'] .= Renderer::replaceMacros($tpl,[
'$baseurl' => System::baseUrl(),
]);
}
@ -128,7 +129,7 @@ function videos_post(App $a)
$drop_url = $a->query_string;
$a->page['content'] = replace_macros(get_markup_template('confirm.tpl'), [
$a->page['content'] = Renderer::replaceMacros(get_markup_template('confirm.tpl'), [
'$method' => 'post',
'$message' => L10n::t('Do you really want to delete this video?'),
'$extra_inputs' => [
@ -382,7 +383,7 @@ function videos_content(App $a)
}
$tpl = get_markup_template('videos_recent.tpl');
$o .= replace_macros($tpl, [
$o .= Renderer::replaceMacros($tpl, [
'$title' => L10n::t('Recent Videos'),
'$can_post' => $can_post,
'$upload' => [L10n::t('Upload New Videos'), System::baseUrl() . '/videos/' . $a->data['user']['nickname'] . '/upload'],