<?php
/**
* Name: Widgets
- * Description: Allow to embed info from friendika into another site
+ * Description: Allow to embed info from friendica into another site
* Version: 1.0
* Author: Fabio Comuni <http://kirgroup.com/profile/fabrix/>
*/
function widgets_settings_post(){
-
+ if(! local_user())
+ return;
if (isset($_POST['widgets-submit'])){
del_pconfig(local_user(), 'widgets', 'key');
- $t = file_get_contents( dirname(__file__). "/settings.tpl" );
+# $t = file_get_contents( dirname(__file__). "/settings.tpl" );
+ $t = get_markup_template("settings.tpl", "addon/widgets/");
$o .= replace_macros($t, array(
'$submit' => t('Generate new key'),
'$baseurl' => $a->get_baseurl(),