mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-11 02:48:48 +00:00
revert addon Smarty3 templates to non-variable-based includes
This commit is contained in:
parent
75f47b74d2
commit
c12542ef96
53 changed files with 75 additions and 146 deletions
|
@ -58,7 +58,6 @@ function openstreetmap_location($a, &$item) {
|
|||
|
||||
|
||||
function openstreetmap_plugin_admin (&$a, &$o) {
|
||||
# $t = file_get_contents( dirname(__file__)."/admin.tpl");
|
||||
$t = get_markup_template( "admin.tpl", "addon/openstreetmap/" );
|
||||
$tmsserver = get_config('openstreetmap','tmsserver');
|
||||
if(! $tmsserver)
|
||||
|
@ -67,12 +66,7 @@ function openstreetmap_plugin_admin (&$a, &$o) {
|
|||
if(! $zoom)
|
||||
$zoom = 17;
|
||||
|
||||
$includes = array(
|
||||
'$field_input' => 'field_input.tpl',
|
||||
);
|
||||
$includes = set_template_includes($a->theme['template_engine'], $includes);
|
||||
|
||||
$o = replace_macros( $t, $includes + array(
|
||||
$o = replace_macros( $t, array(
|
||||
'$submit' => t('Submit'),
|
||||
'$tmsserver' => array('tmsserver', t('Tile Server URL'), $tmsserver, t('A list of <a href="http://wiki.openstreetmap.org/wiki/TMS" target="_blank">public tile servers</a>')),
|
||||
'$zoom' => array('zoom', t('Default zoom'), $zoom, t('The default zoom level. (1:world, 18:highest)')),
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{{ inc $field_input with $field=$tmsserver }}{{ endinc }}
|
||||
{{ inc $field_input with $field=$zoom }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$tmsserver }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$zoom }}{{ endinc }}
|
||||
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{{include file="file:{{$field_input}}" field=$tmsserver}}
|
||||
{{include file="file:{{$field_input}}" field=$zoom}}
|
||||
{{include file="field_input.tpl" field=$tmsserver}}
|
||||
{{include file="field_input.tpl" field=$zoom}}
|
||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue