RSS Viewer Widget - HELP me fix it please! v1.0

Release Notes

**Need help passing the global variable that the user enters in the widget settings for the number of articles to display into the function that displays the feed**

  • Is it only the configuration of the number of entries the widget should display that fails to work? This setting is used in a number of plugins including core plugins. For example the blog plugin allows to configure the number of entries to be configured in mod/blog/views/default/widgets/blog/edit.php. The current number of entries to display is then fetched by $num = $vars['entity']->num_display; in mod/blog/views/default/widgets/blog/content.php. In case of your plugin  you could add an edit.php file in your widget folder with the numbers of entries to be displayed adjusted to your needs and adjusting the name of the language tag used. Modify your content.php also according the blog's content.php.

  • Yes the only thing not working is that the view is not displaying the number of entries selected in the edit.php.

    I looked at the code for the blog content.php, but I still don't see how it knows to only display the selected number of posts?

    I see that the $num variable is passed into the $options array and is declared as the 'limit', but I see nothing referring to this limit in the content.php.

    What is the event elgg_list_entities? Do I need to incorporate this somehow. I don't understand why a function can't just use a global variable. If I capture a value in edit.php and store it as a variable why can't I use that value in the content.php?

    Thanks in advance for any help.

  • You can also take a look at the Widget Manager which has a more full featured rss widget available http://community.elgg.org/pg/plugins/project/384604/developer/jdalsem/widget-manager

  • Can Anyone help me on Meta Tag? All the pages giving same RSS meta tag. Google not indexing all the pages as same meta tag

Stats

  • Category: Widgets
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 368
  • Recommendations: 1