diff --git a/admin/options.php b/admin/options.php index 0ee7a19..1c4c238 100644 --- a/admin/options.php +++ b/admin/options.php @@ -233,6 +233,9 @@ if ($user->isAdmin()) { +call('add_options_panel'); +?>
diff --git a/admin/settings.php b/admin/settings.php index bcaab44..07feacc 100644 --- a/admin/settings.php +++ b/admin/settings.php @@ -109,7 +109,10 @@ if ($user->isAdmin()) { } ?> - + +call('add_settings_panel'); +?>
diff --git a/entry.php b/entry.php index 8951cc2..4dbbb02 100644 --- a/entry.php +++ b/entry.php @@ -97,7 +97,7 @@ if($installed){ //print_r($plugEngine->actions); //die(); - $trigger->call('add_post'); + $trigger->call('gelato_init'); $feeds = new feeds(); $feeds->updateFeeds(); diff --git a/index.php b/index.php index 717aa34..c72e614 100644 --- a/index.php +++ b/index.php @@ -56,7 +56,8 @@ $theme = new themes; $gelato_includes .= "\turlGelato."/admin/css/lightbox.css\" />\n"; $gelato_includes .= "\t\n"; $gelato_includes .= "\t"; - + + $page_title = $conf->title; $page_title_divisor = " » "; // it should be set in configuration $page_title_len = 50; // it should be set in configuration @@ -75,7 +76,8 @@ $theme = new themes; $page_title .= $page_title_divisor.stripslashes($page_title_data); } } - + + $trigger->call('gelato_includes'); $theme->set('Gelato_includes',$gelato_includes); $theme->set('Title',$conf->title); $theme->set('Page_Title',$page_title); diff --git a/plugins/cinco.php b/plugins/cinco.php index ebd0193..73314fb 100644 --- a/plugins/cinco.php +++ b/plugins/cinco.php @@ -3,7 +3,7 @@ class cinco extends plugins { function cinco() { - $this->addAction('add_post', 'dameCinco'); + //$this->addAction('gelato_init', 'dameCinco'); } function dameCinco() { diff --git a/plugins/feedreplacement.php b/plugins/feedreplacement.php new file mode 100644 index 0000000..76bc1c1 --- /dev/null +++ b/plugins/feedreplacement.php @@ -0,0 +1,68 @@ +addAction('add_options_panel', 'feedreplacement_setOptionsPanel'); + + //crea o verifica que la opcion que usa de la tabla de opciones esta creada + $this->addAction('gelato_init', 'feedreplacement_check'); + + //reemplaza el link del feed de gelato por el link de feedburner + $this->addAction('gelato_includes', 'feedreplacement_includeFeed'); + + //lo mismo pero con el que esta en el header + //$this->addAction('add_post', 'dameCinco'); + + //guarda la opcion si viene por POST + if ($user->isAdmin()) { + if(isset($_POST["feedreplacement_url"])){ + if (!$tumble->saveOption($_POST["feedreplacement_url"], "feedreplacement_url")) { + header("Location: ".$conf->urlGelato."/admin/options.php?error=1&des=".$conf->merror); + die(); + } + } + } + } + + function feedreplacement_setOptionsPanel() { + global $conf; + echo '