From 762bb8de795f8bb455da969d287397b2fa6a2f82 Mon Sep 17 00:00:00 2001 From: Fabio Comuni Date: Thu, 30 Jun 2011 17:00:26 +0200 Subject: update oembed and widgets plugins settings form --- addon/widgets/widgets.php | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'addon/widgets/widgets.php') diff --git a/addon/widgets/widgets.php b/addon/widgets/widgets.php index f5f868222..13c4f93bb 100644 --- a/addon/widgets/widgets.php +++ b/addon/widgets/widgets.php @@ -33,34 +33,32 @@ function widgets_settings(&$a,&$o) { $key = get_pconfig(local_user(), 'widgets', 'key' ); if ($key=='') { $key = mt_rand(); set_pconfig(local_user(), 'widgets', 'key', $key); } - - $o .='

Widgets

'; - - - $o.=' -
- '. t('Widgets key: ') .''.$key.' -
-
-
- -
'; - - - $o.='

Widgets:

'; - $o .= ''; - + + + $t = file_get_contents( dirname(__file__). "/settings.tpl" ); + $o .= replace_macros($t, array( + '$submit' => t('Generate new key'), + '$baseurl' => $a->get_baseurl(), + '$title' => "Widgets", + '$label' => t('Widgets key'), + '$key' => $key, + '$widgets_h' => t('Widgets available'), + '$widgets' => $widgets, + )); + } function widgets_module() { -- cgit v1.2.3