update addons to support Smarty3

This commit is contained in:
Zach Prezkuta 2012-12-22 13:36:35 -07:00
parent 66334ec5cb
commit 3da6f1471c
62 changed files with 778 additions and 468 deletions

View file

@ -1,7 +0,0 @@
{{ inc field_input.tpl with $field=$owner }}{{ endinc }}
{{ inc field_input.tpl with $field=$ownerprofile }}{{ endinc }}
{{ inc field_textarea.tpl with $field=$postal }}{{ endinc }}
{{ inc field_textarea.tpl with $field=$notes }}{{ endinc }}
{{ inc field_input.tpl with $field=$email }}{{ endinc }}
{{ inc field_textarea.tpl with $field=$footer_text }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View file

@ -78,8 +78,15 @@ function impressum_plugin_admin_post (&$a) {
info( t('Settings updated.'). EOL );
}
function impressum_plugin_admin (&$a, &$o) {
$t = file_get_contents( dirname(__file__). "/admin.tpl" );
$o = replace_macros($t, array(
$t = get_markup_template( "admin.tpl", "addon/impressum/" );
$includes = array(
'$field_input' => 'field_input.tpl',
'$field_textarea' => 'field_textarea.tpl',
);
$includes = set_template_includes($a->theme['template_engine'], $includes);
$o = replace_macros($t, $includes + array(
'$submit' => t('Submit'),
'$owner' => array('owner', t('Site Owner'), get_config('impressum','owner'), t('The page operators name.')),
'$ownerprofile' => array('ownerprofile', t('Site Owners Profile'), get_config('impressum','ownerprofile'), t('Profile address of the operator.')),

7
impressum/view/admin.tpl Executable file
View file

@ -0,0 +1,7 @@
{{ inc $field_input with $field=$owner }}{{ endinc }}
{{ inc $field_input with $field=$ownerprofile }}{{ endinc }}
{{ inc $field_textarea with $field=$postal }}{{ endinc }}
{{ inc $field_textarea with $field=$notes }}{{ endinc }}
{{ inc $field_input with $field=$email }}{{ endinc }}
{{ inc $field_textarea with $field=$footer_text }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View file

@ -0,0 +1,7 @@
{{include file="file:{{$field_input}}" field=$owner}}
{{include file="file:{{$field_input}}" field=$ownerprofile}}
{{include file="file:{{$field_textarea}}" field=$postal}}
{{include file="file:{{$field_textarea}}" field=$notes}}
{{include file="file:{{$field_input}}" field=$email}}
{{include file="file:{{$field_textarea}}" field=$footer_text}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>