About Contribute
Content
Map

Elgg 1.0 Social Networking

Auto Define Default Widgets on User Profiles and Dashboards in Elgg 1.0

The plugin is here and the plugin works!
Per Ben's advice I have finally managed to code the modification as a plugin, using and elgg event.

Much credit also goes to Chad @ NCR from the elgg-developement google group. Chad helped me solve a problem I could not figure out, which is why it took me so long. It seemed the add_widgets function required a logged-in user to check permissions against to see if the user was even allowed to add_widgets.

How do you add widgets when a user is created, if when the user is created, he needs to validate his email before he logs in, and upon log in, the widgets NEED to be already included!? (the whole point of default widgets)
The answer?
LOG THE USER IN!
Thanks Chad!

Download default_widgets plugin
(supports both profile and dashboard widgets)

elgg 1.0 download
Default Widgets on User Profiles/Dashboard in Elgg 1.0

See default_widgets plugin In Action
My elgg test site is at www.pathly.com. To see it work:
  1. Register for account
  2. Confirm email
  3. Login
When you login for the first time you should you should see your dashboard pre-loaded with 1 widget in each column for a total of 3, and your user profile should have "groups", "friends", and "messageboard" all loaded down the right column.

Discuss This Article

discuss tastyseed
  • No need to sign up.
  • Post questions, comments, or feedback.
  • I will reply to every comment or question during beta.
Gray icon Greyed out topics indicate content coming soon
but not currently available.