mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-11 10:58:48 +00:00
update addons to support Smarty3
This commit is contained in:
parent
66334ec5cb
commit
3da6f1471c
62 changed files with 778 additions and 468 deletions
|
@ -1,3 +0,0 @@
|
|||
{{ 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>
|
|
@ -58,7 +58,8 @@ function openstreetmap_location($a, &$item) {
|
|||
|
||||
|
||||
function openstreetmap_plugin_admin (&$a, &$o) {
|
||||
$t = file_get_contents( dirname(__file__)."/admin.tpl");
|
||||
# $t = file_get_contents( dirname(__file__)."/admin.tpl");
|
||||
$t = get_markup_template( "admin.tpl", "addon/openstreetmap/" );
|
||||
$tmsserver = get_config('openstreetmap','tmsserver');
|
||||
if(! $tmsserver)
|
||||
$tmsserver = 'http://openstreetmap.org';
|
||||
|
@ -66,7 +67,12 @@ function openstreetmap_plugin_admin (&$a, &$o) {
|
|||
if(! $zoom)
|
||||
$zoom = 17;
|
||||
|
||||
$o = replace_macros( $t, array(
|
||||
$includes = array(
|
||||
'$field_input' => 'field_input.tpl',
|
||||
);
|
||||
$includes = set_template_includes($a->theme['template_engine'], $includes);
|
||||
|
||||
$o = replace_macros( $t, $includes + 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)')),
|
||||
|
|
3
openstreetmap/view/admin.tpl
Normal file
3
openstreetmap/view/admin.tpl
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{ inc $field_input with $field=$tmsserver }}{{ endinc }}
|
||||
{{ inc $field_input with $field=$zoom }}{{ endinc }}
|
||||
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
3
openstreetmap/view/smarty3/admin.tpl
Normal file
3
openstreetmap/view/smarty3/admin.tpl
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{include file="file:{{$field_input}}" field=$tmsserver}}
|
||||
{{include file="file:{{$field_input}}" 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