mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +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
|
@ -60,7 +60,7 @@ function libravatar_lookup($a, &$b) {
|
|||
* Display admin settings for this addon
|
||||
*/
|
||||
function libravatar_plugin_admin (&$a, &$o) {
|
||||
$t = file_get_contents( dirname(__file__)."/admin.tpl");
|
||||
$t = get_markup_template( "admin.tpl", "addon/libravatar" );
|
||||
|
||||
$default_avatar = get_config('libravatar', 'default_img');
|
||||
|
||||
|
@ -95,7 +95,13 @@ function libravatar_plugin_admin (&$a, &$o) {
|
|||
|
||||
// output Libravatar settings
|
||||
$o .= '<input type="hidden" name="form_security_token" value="' .get_form_security_token("libravatarsave") .'">';
|
||||
$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'),
|
||||
'$default_avatar' => array('avatar', t('Default avatar image'), $default_avatar, t('Select default avatar image if none was found. See README'), $default_avatars),
|
||||
));
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
{{ inc field_select.tpl with $field=$default_avatar}}{{ endinc }}
|
||||
{{ inc $field_select with $field=$default_avatar}}{{ endinc }}
|
||||
<div class="submit"><input type="submit" value="$submit" /></div>
|
2
libravatar/view/smarty3/admin.tpl
Normal file
2
libravatar/view/smarty3/admin.tpl
Normal file
|
@ -0,0 +1,2 @@
|
|||
{{include file="file:{{$field_select}}" field=$default_avatar}}
|
||||
<div class="submit"><input type="submit" value="{{$submit}}" /></div>
|
Loading…
Add table
Add a link
Reference in a new issue