1
1
Fork 0

get markup template

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

View file

@ -554,7 +554,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
$threads = [];
$threadsid = -1;
$page_template = get_markup_template("conversation.tpl");
$page_template = Renderer::getMarkupTemplate("conversation.tpl");
if (!empty($items)) {
if (in_array($mode, ['community', 'contacts'])) {
@ -713,7 +713,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
}
} else {
// Normal View
$page_template = get_markup_template("threaded_conversation.tpl");
$page_template = Renderer::getMarkupTemplate("threaded_conversation.tpl");
$conv = new Thread($mode, $preview, $writable);
@ -1063,7 +1063,7 @@ function format_like($cnt, array $arr, $type, $id) {
}
$phrase .= EOL ;
$o .= Renderer::replaceMacros(get_markup_template('voting_fakelink.tpl'), [
$o .= Renderer::replaceMacros(Renderer::getMarkupTemplate('voting_fakelink.tpl'), [
'$phrase' => $phrase,
'$type' => $type,
'$id' => $id
@ -1077,9 +1077,9 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
{
$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, [
'$newpost' => '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 = get_markup_template("jot.tpl");
$tpl = Renderer::getMarkupTemplate("jot.tpl");
$o .= Renderer::replaceMacros($tpl,[
'$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));
// 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, [
'$banner' => $datarray['banner'],
'$product' => $datarray['product'],
@ -611,7 +611,7 @@ function notification($params)
]);
// 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, [
'$banner' => $datarray['banner'],
'$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',
'$message' => L10n::t('Do you really want to delete this item?'),
'$extra_inputs' => $inputs,
@ -482,7 +482,7 @@ function posted_date_widget($url, $uid, $wall)
$cutoff_year = intval(DateTimeFormat::localNow('Y')) - $visible_years;
$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'),
'$size' => $visible_years,
'$cutoff_year' => $cutoff_year,

View file

@ -266,7 +266,7 @@ function unxmlify($s) {
* @return string html for loader
*/
function scroll_loader() {
$tpl = get_markup_template("scroll_loader.tpl");
$tpl = Renderer::getMarkupTemplate("scroll_loader.tpl");
return Renderer::replaceMacros($tpl, [
'wait' => L10n::t('Loading more entries...'),
'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, [
'$contacts' => $contacts,
'$nickname' => $a->profile['nickname'],
@ -571,7 +571,7 @@ function micropro($contact, $redirect = false, $class = '', $textmode = false) {
$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', ''),
'$class' => $class,
'$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 (!$vhead) {
$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(),
]);
}
$url_parts = explode('/', $the_url);
$id = end($url_parts);
$as .= Renderer::replaceMacros(get_markup_template('video_top.tpl'), [
$as .= Renderer::replaceMacros(Renderer::getMarkupTemplate('video_top.tpl'), [
'$video' => [
'id' => $id,
'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)
{
if (count($reasons)) {
$tpl = get_markup_template('wall/content_filter.tpl');
$tpl = Renderer::getMarkupTemplate('wall/content_filter.tpl');
$html = Renderer::replaceMacros($tpl, [
'$reasons' => $reasons,
'$rnd' => random_string(8),