Default Widgets (with admin web interface) v2.0

Release Notes

Hi,

I've created a simple plugin to allow an Elgg administrator to define a default set of profile and dashboard widgets for new registered users.

The previous plugins I saw didn't allow this to be configured using a simple GUI interface, so I decided to write my own. Within the administration menu you will have two new options

  • Default profile widgets
  • Default dashboard widgets

Each of these pages uses a modified version of the widgets editor found on the profile and dashboard pages. Which I felt was the easiest and would a familiar interface for most users. I also used the idea from another default widgets plugin I found (http://community.elgg.org/pg/plugins/Jade/read/734/plugin-default-widgets-full) which registers an event with the create user methods to allow me to cleanly create widgets only for new users.

One thing to be aware of is that this plugin doesn't set default configurations for the widgets, just widget placements in the profile and dashboard pages.

Feel free to send any feedback you have!

  • This is sweet, works perfectly!

  • From what I understand Sticky Widgets is used to permanently set the profile and dashboard widgets for all users, so users would not be able to edit (choose - add/remove) which widgets they can see.

    This module allows you to set the initial widgets for *new users only* instead of users seeing no widgets at all when they first log in.

    PS James - Thanks 

  • Combine Sticky Widgets with this by adding a lock option.

  • Works great!!! Thanks.

    i agree with the lock option and a wish would be to be able to sort out the widgets default settings (i know that would be seriously difficult) so thanks again for what youve done

  • I'd like to be able to lock select widgets, and allow the user to set the others

  • Firstly thanks for the feedback. I think currently Sticky Widgets does what it does well and most elgg admins would probably would want

    • All the widgets permanently set for all users (like sticky widgets)
    • A pre-set list of widgets for new users (like this mod)
    I do see a need for widgets to have some defaults, but I'd prefer some sort of official way for widget writers to be able to set some default (like what Jade said - see link in main post). Ok I know in theory widget writers could do this already by defining admin editable settings for each widget - but no-one is doing this consistently.
    Then again I'm not sure if/when that will happen, so the alternative to that would be to have a separate mod to examine each widget and allow admins to setup defaults. That way the defaults aren't just set for new users and will be used every time a user drags a widget to their profile/dashboard. (anyone want to write that??).
    holm: As far as the lock option for specific widgets goes then I think that would be a good idea (i'm specifically thinking about adverts widgets), but I've already written some separate code to do this already. It's a bit of a hack, but once i'm happy with it i'll clean it up and release it to the community as a separate mod and maybe someone will expand upon it.
    Generally I want to develop mods that do small specific tasks rather than big mod where 80% of people will use 20% of the functionality?
  • I am a newbie and can't wait to use it, but when I install it; it tells me that

    defaultwidgets is a misconfigured plugin.

    what do I do?

  • adclose2: Thanks I'll take a look at that plugin

    TheSuccessfulGal: The only time that error is displayed is when elgg can't find the start.php file. Could you make sure all the files have been copied to the right location. The plugin (specifically the start.php file) should be in:

    • [Your elgg root folder]/mod/defaultwidgets/start.php
  • Thank you so much for taking the time to answer so quickly, that was the problem it's fixed!!!!   Thank you so much!

  • Seems to work great. agree with you on the 80/20. This one is very useful within its small application.

  • Nice job on this. I'll be recommending this plugin to people.

    Some small items:

    • item:object:moddefaultwidgets is not defined in your language file - this is used on an admin screen
    • Windows Firefox 3 has display issues: image
    • there were mac ds store files in the zip file
    • adding/removing widgets doesn't obey the single/multiple restrictions (the Elgg core is broken here also so not a big deal)

    Re: display - I was able to get a better look by changing the padding on customise_editpanel to 10px and the height of widget_picker_gallery to 357px

    Re: widget restrictions - two trac items on this: [472] and [590]

  • I've updated the plugin (link above). 

    2.01: Fixed a bug spotted by Elgg Developers. When an admin creates a user in the administrator interface then the admin user is logged in as the new user rather than staying as the admin user.

     

    2.02: Bug fixes spotted by Cash: Added entity name (shown in the admin view). Also Firefox 3 issues have been fixed (not a css bug, but I wrapped my output in a layout view when it wasn't necessary).

     

    I'd recommend updating to the latest version mainly because of the admin create user bug.

  • Hi,
    This plugin is not working when users self register i.e. they don't get the default widgets. If I login to the site and go into 'User Admin', I can create new users who do receive the default widgets.

    Also, I cannot delete users who register when the Default Widgets is activated as I receive an ElgObject error. I realise it is probably because I am doing something wrong. What shall I do?

  • This module was designed to work with Elgg 1.2. The module is now maintaining within the Elgg 1.5 package. Although that is also broken due to a bug in Elgg 1.6 which breaks default widgets and the site access modules:

    https://trac.elgg.org/elgg/ticket/1196

    You should follow the bug to find out how to resolve this.

    Regards

  • Thank you for your response Milan.

    I am using version 1.5 version of Elgg.  When I make the changes suggested in the link you posted (replacing register.php and entities.php) I get a completly blank screen when I open the Elgg homepage.  I downloaded Elgg 1.6 (new installation) and the same problem occured.  I would be grateful for any advice.  Thanks again.

  • Please ignore my last comment as I have resolved the problem.

  • Just wanted to add that the problem I resolved had nothing to do with this plugin (it worked well).  The error was with my configuration.

Stats

  • Category: Uncategorized
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 7084
  • Recommendations: 2

Other Projects

View Milan's plugins