diff options
Diffstat (limited to 'start.php')
-rw-r--r-- | start.php | 26 |
1 files changed, 17 insertions, 9 deletions
@@ -1,15 +1,23 @@ <?php
-
/**
-* Simplepie Plugin
-*
-* Loads the simplepie feed parser library and provides a widget
-**/
+ * Simplepie Plugin
+ *
+ * Loads the simplepie feed parser library and provides a widget
+ */
+
+elgg_register_event_handler('init', 'system', 'simplepie_init');
function simplepie_init() {
- add_widget_type('feed_reader', elgg_echo('simplepie:widget'), elgg_echo('simplepie:description'));
- elgg_extend_view('css', 'feed_reader/css');
-}
+ elgg_register_widget_type(
+ 'feed_reader',
+ elgg_echo('simplepie:widget'),
+ elgg_echo('simplepie:description'),
+ 'all',
+ true
+ );
-register_elgg_event_handler('plugins_boot', 'system', 'simplepie_init');
+ elgg_extend_view('css/elgg', 'simplepie/css');
+ $lib = elgg_get_plugins_path() . 'simplepie/vendors/simplepie.inc';
+ elgg_register_library('simplepie', $lib);
+}
|