mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
replace macros
implement new replaceMacros function
This commit is contained in:
parent
f6c86649c2
commit
91facd2d0a
91 changed files with 335 additions and 249 deletions
|
@ -7,6 +7,7 @@ use Friendica\App;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function theme_content(App $a)
|
||||
|
@ -67,7 +68,7 @@ function clean_form(App $a, &$colorset, $user)
|
|||
}
|
||||
|
||||
$t = get_markup_template("theme_settings.tpl");
|
||||
$o = replace_macros($t, [
|
||||
$o = Renderer::replaceMacros($t, [
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => L10n::t("Theme settings"),
|
||||
|
|
|
@ -4,6 +4,7 @@ use Friendica\App;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
|
||||
require_once 'view/theme/frio/php/Image.php';
|
||||
|
@ -137,7 +138,7 @@ function frio_form($arr)
|
|||
$ctx['$login_bg_color'] = ['frio_login_bg_color', L10n::t('Login page background color'), $arr['login_bg_color'], L10n::t('Leave background image and color empty for theme defaults'), false];
|
||||
}
|
||||
|
||||
$o = replace_macros($t, $ctx);
|
||||
$o = Renderer::replaceMacros($t, $ctx);
|
||||
|
||||
return $o;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ use Friendica\App;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function theme_content(App $a) {
|
||||
|
@ -69,7 +70,7 @@ function quattro_form(App $a, $align, $color, $tfs, $pfs) {
|
|||
}
|
||||
|
||||
$t = get_markup_template("theme_settings.tpl" );
|
||||
$o = replace_macros($t, [
|
||||
$o = Renderer::replaceMacros($t, [
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => L10n::t("Theme settings"),
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
*/
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function smoothly_init(App $a) {
|
||||
|
@ -112,6 +113,6 @@ if (! function_exists('_js_in_foot')) {
|
|||
$bottom['$baseurl'] = $baseurl;
|
||||
$tpl = get_markup_template('bottom.tpl');
|
||||
|
||||
return $a->page['bottom'] = replace_macros($tpl, $bottom);
|
||||
return $a->page['bottom'] = Renderer::replaceMacros($tpl, $bottom);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ use Friendica\App;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
|
||||
function theme_content(App $a)
|
||||
|
@ -71,7 +72,7 @@ function theme_admin(App $a) {
|
|||
$helperlist = "https://forum.friendi.ca/profile/helpers";
|
||||
|
||||
$t = get_markup_template("theme_admin_settings.tpl");
|
||||
$o = replace_macros($t, [
|
||||
$o = Renderer::replaceMacros($t, [
|
||||
'$helperlist' => ['vier_helperlist', L10n::t('Comma separated list of helper forums'), $helperlist, '', ''],
|
||||
]);
|
||||
|
||||
|
@ -115,7 +116,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"),];
|
||||
|
||||
$t = get_markup_template("theme_settings.tpl");
|
||||
$o = replace_macros($t, [
|
||||
$o = Renderer::replaceMacros($t, [
|
||||
'$submit' => L10n::t('Submit'),
|
||||
'$baseurl' => System::baseUrl(),
|
||||
'$title' => L10n::t("Theme settings"),
|
||||
|
|
|
@ -15,6 +15,7 @@ use Friendica\Core\Addon;
|
|||
use Friendica\Core\Config;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\PConfig;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Model\Contact;
|
||||
|
@ -150,7 +151,7 @@ function vier_community_info()
|
|||
$aside['$comunity_profiles_items'] = [];
|
||||
|
||||
foreach ($r as $rr) {
|
||||
$entry = replace_macros($tpl, [
|
||||
$entry = Renderer::replaceMacros($tpl, [
|
||||
'$id' => $rr['id'],
|
||||
'$profile_link' => 'follow/?url='.urlencode($rr['url']),
|
||||
'$photo' => ProxyUtils::proxifyUrl($rr['photo'], false, ProxyUtils::SIZE_MICRO),
|
||||
|
@ -181,7 +182,7 @@ function vier_community_info()
|
|||
|
||||
foreach ($r as $rr) {
|
||||
$profile_link = 'profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
|
||||
$entry = replace_macros($tpl, [
|
||||
$entry = Renderer::replaceMacros($tpl, [
|
||||
'$id' => $rr['id'],
|
||||
'$profile_link' => $profile_link,
|
||||
'$photo' => $a->removeBaseURL($rr['thumb']),
|
||||
|
@ -245,7 +246,7 @@ function vier_community_info()
|
|||
|
||||
$tpl = get_markup_template('widget_forumlist_right.tpl');
|
||||
|
||||
$page = replace_macros(
|
||||
$page = Renderer::replaceMacros(
|
||||
$tpl,
|
||||
[
|
||||
'$title' => L10n::t('Forums'),
|
||||
|
@ -297,7 +298,7 @@ function vier_community_info()
|
|||
$aside['$helpers_items'] = [];
|
||||
|
||||
foreach ($r as $rr) {
|
||||
$entry = replace_macros($tpl, [
|
||||
$entry = Renderer::replaceMacros($tpl, [
|
||||
'$url' => $rr['url'],
|
||||
'$title' => $rr['name'],
|
||||
]);
|
||||
|
@ -387,7 +388,7 @@ function vier_community_info()
|
|||
$aside['$con_services'] = $con_services;
|
||||
|
||||
foreach ($r as $rr) {
|
||||
$entry = replace_macros($tpl, [
|
||||
$entry = Renderer::replaceMacros($tpl, [
|
||||
'$url' => $url,
|
||||
'$photo' => $rr['photo'],
|
||||
'$alt_text' => $rr['name'],
|
||||
|
@ -400,5 +401,5 @@ function vier_community_info()
|
|||
|
||||
//print right_aside
|
||||
$tpl = get_markup_template('communityhome.tpl');
|
||||
$a->page['right_aside'] = replace_macros($tpl, $aside);
|
||||
$a->page['right_aside'] = Renderer::replaceMacros($tpl, $aside);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue