Widget Manager v4.3

Release Notes

  • added: favorites widget
  • added: updates widget titles without page refresh (thanks to Matt Beckett)
  • added: new 'simple' layout in content_by_tag widget
  • changed: freehtml is now contained within a div with elgg-output class (better styling)
  • changed: manifest requirements (needs to be after twitter and tagcloud plugins)
  • changed: Natural sorting of widgets (for example in add panel)
  • changed: content by tag widget now allows to show all site content from within a group
  • removed: index_file and group_files widgets moved to file_tools plugin
  • removed: unused language keys
  • removed: index_pages widget (moved to pages_tools plugin)
  • removed: widgets_pagesetup event trigger
  • fixed: support for old widget settings in index_activity widget
  • fixed: add panel keeps correct layout if no widget description is given
  • fixed: some layout issues when using IE7
  • fixed: no need for flooding apache error logs with the error message that a rss feed could not be found (SimplePie)
  • going back to the subject of index and group widgets.. where would i find a description of how to alter an existing plugin's widget/code to support index and group widgets?
    i've looked through the elgg 1.8 book from cash.. no mention (only profile and dashboard plugins).
    compared code from blog module to the one i want to change (they are 95% the same from what i can see)..
    anyone? 

  • @ura widgets are register for certain contexts (profile, dashboard). By registering a widget for the extra "groups" context you will be able to add widgets to that context. Sometimes already existing widgets are working in other contexts like "groups" or "index", but most default widgets don't. That is because they assume page_owner is a user and in the groups context that is a group (duh) and on index there is no page_owner

     

  • @jeroen:
    in the start.php for blogs i see: 

    elgg_register_widget_type('blog', elgg_echo('blog'), elgg_echo('blog:widget:description'));

    - no mention there of context..

    i see in the elgg reference that there is space for a context to be given:

    http://reference.elgg.org/engine_2lib_2widgets_8php_source.html#l00143

    and the default is 'all'.. so if there is nothing passed for that field, the widget will be used in all contexts.

    the videolist plugin also has the same type of widget register line, so it looks like it should be used in all contexts.. but it isn't. i haven't located another relevant line yet. so from what you have written above, the appearance is that the admin page that lists the widgets and the contexts that they are used in must somehow check/know if each widget has been coded to 'assume page_owner is a user' or not.. 
    looking at the code for the blog widget (content.php) and for videolist, the files are essentially the same, beyond replacing 'blog' with 'videolist'..  

     

  • @ura you are correct about the "all" contexts option, but index and groups widgets only will be shown if the widget is explicitly registered for those contexts. The reason is that most core plugin widgets which are registered for "all" do not work on other contexts than dashboard and profile.

  • err.. that is bizarre to me!
    anyhow, i have altered the register line to be:

    elgg_register_widget_type('videolist', elgg_echo('videolist'), elgg_echo('videolist:widget:description'),"groups,profile"); 

    and the video widget now works in groups.. since as far as i am aware, the group owner process is the same as profiles, hence the correct owner is detected. this approach has not worked for index (i am using homepage_cms for the index page) - the widget appears on the index but is empty.
    i don't really need to use the widget for the index so i will leave the code for the widget there as it is.

    as the code for tidypics is presently, this approach also worked for albums in groups.. not for 'recent images'. 

  • Hi Jeroen,

    I think the definition of Default Widgets might give some "strange" results currently. I don't know if the handling of default widgets for existing accounts is really exactly like you intend it to be with the current release of the Widget Manager plugin.

    It says on the settings page: "These changes will only affect new users on the site."

    I was missing the option to "reset" the profile pages / dashboard for existing account that was possible with earlier releases as you might want to force a widget to be added not only to new profile pages but also to all already existing profile pages when you add this widget at a later time only.

    Well, if you wouldn't be able to modify existing profile pages / dashboards at all it would be sad to not be able to do so, but it would at least be a logical behaviour of the Widget Manager plugin ("These changes will only affect new users on the site."). Unfortunately, if you select the "Fix" option for a widget in the Default Widgets configuration to prevent a user from moving / removing this widget from profile pages / dashboards, this also affects existing accounts. Still, this behaviour wouldn't be completely incomprehensible. Unfortunately, this "sticky" widget gets added in addtion to any already existing widget of the same type. So, you might easily end with profile pages showing for example two messageboard widgets - one removeable and one not.

    I don't know if it is possible to change this confusing behaviour. The most reasonable approach seems to me to either clearly distinct between new and existing accounts again or to make no difference between them at all. This means that the default widget configuration including all widgets settings should either really only affect new accounts (but then an option to set all existing accounts to the same layout would be nice) or you don't differ between new and existing accounts at all and any changes in the default widget configuration will always affect all accounts.

  • Just letting you know Jeroen that with elgg 1.8.12 this is not putting the default widgets on a newuser registration profile. They are able to add widgets, but the default ones are not there after they signup for some reason. Can you update when you have a moment please? All other profiles are in tact with the default widgets, just newusers don't have them...

    Link to thread:

    http://community.elgg.org/discussion/view/1166555/default-widgets-not-appearing-on-new-registrations

  • @kimberly thanks for the info. it is a core issue, so hopefully they will fix it soon.

  • @Jeroen Dalsem Thanks you for amazing plugin.

    Does üt allow tabbed index like tabbed dashboard? I could not find how do it in settings.

    If currently not possible, then if I myself create a tabbed custom index can I use your index widgets on it? Thanks.

  • Thanks you @RvR!!! I modify custom index with your code and see if it let me add Coldtrick's Widget Manager's index widgets on it. Thanks!

  • @jdalsem first thanks for the great plugin.

    We have an existing site with many users and we are considering adding this Widget Manager, but we would like to set the default widgets for all existing users not just future ones. Reading @iionly's post above, looks like we would need his suggestion. Would you have any hints about how we could go about settings default profile and dashboard widgets for existing users? Ideally we would like to set the defaults for only users that have not already customized their own widgets.

    Again thank you.

    /s

     
  • Hi

    I use the facebook theme and widget manager not work in this theme. is there any way to solve it?

  • @olive could you be a bit more specific about the issues you are having?

  • Humans are visual animals. How could you not support tidypics? Third party, fourth party, fifth party, who cares? Look at the downloads. If so many Elggers are using tidypics, it makes sense to support it. That's what the community is about, right? Support, and the support of support. 

  • How is it unsupported?  I use tidypics and widget manager together without issue...

  • Widget Manager is awesome. I use it with Tidypics and tons of other plugins, works great. Definetly recommend.

  • My bad Matt. For me it works with everything except tidypics. I'll look at it again. 

  • The problem was with the latest version of tidypics. In mod\tidypics\start.php I had to change 
    this:

    // Register widgets

    elgg_register_widget_type('album_view', elgg_echo("tidypics:widget:albums"), elgg_echo("tidypics:widget:album_descr"), 'profile');

    elgg_register_widget_type('latest_photos', elgg_echo("tidypics:widget:latest"), elgg_echo("tidypics:widget:latest_descr"), 'profile');

    to this:

    // Register widgets

    add_widget_type('album_view', elgg_echo("tidypics:widget:albums"), elgg_echo("tidypics:widget:album_descr"), 'dashboard');

    add_widget_type('latest_photos', elgg_echo("tidypics:widget:latest"), elgg_echo("tidypics:widget:latest_descr"), 'dashboard');

    add_widget_type('album_view', elgg_echo("tidypics:widget:albums"), elgg_echo("tidypics:widget:album_descr"), 'all');

    add_widget_type('latest_photos', elgg_echo("tidypics:widget:latest"), elgg_echo("tidypics:widget:latest_descr"), 'all');

    This so-called page "Elgg hacks" helped me find out: http://elgghacks.com/add-tidypics-widgets-on-dashboard/

    But this is hardly a "hack". It seems to me like something trivial that was left out on purpose so you can go looking for it and land on those other pages they want you to land.

     

  • Jeroen, Thanks for your great job.

    I've a problem (sorry for my bad english) :

    When i use the theme Classy Theme, in Widget manager and the section index if I choose, for example, "For loggedin uses only" I get an error on the index page (that's the same thing with Cooltheme. I've not try with another):

    Fatal Error.

    Redirect could not be issued due to headers already being sent. Halting execution for security. Search http://docs.elgg.org/ for more information.

    SecurityException Object
    (
    [message:protected] => Redirect could not be issued due to headers already being sent. Halting execution for security. Search http://docs.elgg.org/ for more information.
    [string:Exception:private] => exception 'SecurityException' with message 'Redirect could not be issued due to headers already being sent. Halting execution for security. Search http://docs.elgg.org/ for more information.' in /adresse/www/monrepertoire/engine/lib/elgglib.php:151
    Stack trace:
    #0 /adresse/www/monrepertoire/mod/ac-130/index.php(4): forward('activity')
    #1 /adresse/www/monrepertoire/mod/ac-130/start.php(23): include_once('/adresse/www/monrepertoire...')
    #2 [internal function]: new_index('index', 'system', true, NULL)
    #3 /adresse/www/monrepertoire/engine/lib/elgglib.php(981): call_user_func_array('new_index', Array)
    #4 /adresse/www/monrepertoire/index.php(17): elgg_trigger_plugin_hook('index', 'system', NULL, false)
    #5 {main}
    [code:protected] => 0
    [file:protected] => /adresse/www/monrepertoire/engine/lib/elgglib.php
    [line:protected] => 151
    [trace:Exception:private] => Array
    (
    [0] => Array
    (
    [file] => /adresse/www/monrepertoire/mod/ac-130/index.php
    [line] => 4
    [function] => forward
    [args] => Array
    (
    [0] => activity
    )

    )

    [1] => Array
    (
    [file] => /adresse/www/monrepertoire/mod/ac-130/start.php
    [line] => 23
    [args] => Array
    (
    [0] => /adresse/www/monrepertoire/mod/ac-130/index.php
    )

    [function] => include_once
    )

    [2] => Array
    (
    [function] => new_index
    [args] => Array
    (
    [0] => index
    [1] => system
    [2] => 1
    [3] =>
    )

    )

    [3] => Array
    (
    [file] => /adresse/www/monrepertoire/engine/lib/elgglib.php
    [line] => 981
    [function] => call_user_func_array
    [args] => Array
    (
    [0] => new_index
    [1] => Array
    (
    [0] => index
    [1] => system
    [2] => 1
    [3] =>
    )

    )

    )

    [4] => Array
    (
    [file] => /adresse/www/monrepertoire/index.php
    [line] => 17
    [function] => elgg_trigger_plugin_hook
    [args] => Array
    (
    [0] => index
    [1] => system
    [2] =>
    [3] =>
    )

    )

    )

    [previous:Exception:private] =>
    )

    Can you help me. Thank you

  • @ligrane you probably have 2 plugins fighting for the index page and it looks like mod ac-130 is forwarding you to another page, while there is already output provided by widgetmanager

  • Hello,

    Normally when I create a group, the different type of information is displayed as:

    Blogs -  Bookmarks

    Files  -  Activity

    Discussions - Pages

    Images - Events

    Is there way to reorder this information using Widget Manager? I can not see where you can rearrange the order of group widgets. I think it should be in admin menu option "Default Widgets" but there are tabs only for Profile and Dashboard and not for groups. I have the the dependency plugin Group Tools activated. Do you know where I can rearrange the group widgets?

    Thank

  • Hi there -- I sent you a DM but I might as well post the question here to. How can I get the included Tagcloud to display all tags available to the user (not just those "owned" by the user)?

    Awesome plugin, recommended.

  • @Jon L  Just delete this strings:

    if($owner instanceof ElggUser){
            $cloud_options["owner_guid"] = $owner->getGUID();
        } elseif($owner instanceof ElggGroup){
            $cloud_options["container_guid"] = $owner->getGUID();
        }

    In mod\widget_manager\views\default\widgets\tagcloud\content.php

  • When a widget is deleted and then added again, it has a new guid which means it is a new row in a table of the database. How can I select the widgets that aren't active anymore and delete them from the database?

    We're having an issue where for this one group, if the widget manager is enabled and you try and visit the groups page, the server crashes. Maybe it is due to some error with the widget permisson settings?

    Anyways, we thought that deleting the old widgets from the database is worth a try.

Jeroen Dalsem

Owner of ColdTrick IT Solutions, developing social networking sites for the dutch market

Stats

  • Category: Widgets
  • License: GNU General Public License (GPL) version 2
  • Updated: 2021-9-28
  • Downloads: 40671
  • Recommendations: 99

Other Projects

View Jeroen Dalsem's plugins