danixland-user-panel

Description

danixland-user-panel is a plugin that adds a new widget to be used on the Sidebar (or wherever you like).
This widget is an enhanced version of the standard meta widget, it shows the current user’s Gravatar (can be disabled
in the control panel), shows a link to your site’s Dashboard, to the current user’s options and detects if a user is
logged in or not.
If a user is not logged in, the widget checks if user registration is enabled and shows different links based on how
the admin set up registration on the site.
If registration is enabled, the widget shows a link to the registration page plus the usual “login” and “forgotten password”
where if registration is disabled, it shows only the standard “login” link.

This plugin allows the admin to display a set of custom links which can be shown based on usernames, user ids or even user roles and capabilities.

Starting with version 1.2 this plugin uses some code from the sidebar-login by Mike Jolley, so a big thank you goes to him for releasing this nice piece of software.

ToDo list

List is actually empty, but I’m open to suggestions.

Translations

Azerbaijani translation (for previous version, not working anymore) by: deqaxwer
Italian translation by me 🙂

Screenshots

  • The link in the admin area's sidebar. It's accessible only to those users who can manage-options.
  • The heading of the settings page with the option to enable/disable the visualization of the Gravatar image.
  • The two heading options, here you can set a message to welcome your users, both when they are logged in or not.
  • The custom link area with two custom links set. Notice the tips in the description which will help you use it at its best.
  • The widget on the front page of the site, displayed in the footer of the standard twentyeleven theme with no customization. Here the user is logged in and has two custom links.
  • The same widget but showing only the "login" and "forgot password" links since the user is not logged in and registration is not allowed.
  • Here's the widget on the front site, the user has not logged in and registration of new users is allowed.

FAQ

What can I do to customize even more the appearance of the widget?

The code generated by the plugin is wrapped in an HTML element with class dnx-user-panel, what kind of element is decided by your theme, if unsure ask his creator.
Contained in that element you’ll find an unordered list with id dnxup_login_links and a variable class based on what kind of user is surfing the page; these are the classes you can use:

  • If the user is logged in to your site: .user_logged_in
  • If the user is not logged in to your site and you have registration enabled: .logged_out_yesreg
  • Or if the user is not logged in to your site and you don’t want new users to register: .logged_out_noreg

Also each custom list item has class dnxup_custom_link, predefined list items have a specific id, and you can specify ids and classes for your custom links too!!
These are the predefined ids for every list item:

Logged out users, no registration:
  • #login
  • #lostpassword
Logged out users, registration enabled:
  • #register
  • #login
  • #lostpassword
Logged in users:
  • #dashboard
  • #profile
  • #logout
I’m stuck with your plugin and don’t seem to be able to customize it/make it work, can you help me?

Of course, you can ask for help on the forums or write a comment on the main article for this plugin on my site, I’ll reply ASAP 😉

I’d like this plugin to be translated in my language, can you do this for me?

Starting with version 1.2 the plugin ships with a .POT file that can be used to create a translation of the plugin in your language, so if you’re familiar with english you can help by providing a translation and it will be added to future versions of the plugin along with a link to your site on these pages 😉

To provide a translation simply edit the file “danixland-user-panel.pot” and fill every line with the traduction in your language, then save it as yourlanguagecode.po (E.G. it_IT.po for Italian), then contact me via the forums or my site and I’ll tell you how to send this file to me. I’ll add your translation ASAP.

A number of softwares exists to help you with .po files, like POEdit or Lokalize

If you have any other questions feel free to ask

Changelog

1.4.2

  • fixed i18n functionality. This plugin is now fully international and is now shipping with a working POT and an italian translation.

1.4.1

  • wp_currentuserinfo() is deprecated as of latest WordPress 4.5-alpha, so I had to switch to wp_get_current_user() instead.

1.4

  • Plugin now uses the __construct method which is recommended since WP 4.3

1.3

  • Fixed errors that rendered the plugin unusable on WP 4.1 beta 1

1.2.1

  • Added Azerbaijani translation

1.2

  • Migration to the Settings API.
  • Added options to set multiple custom links.
  • i18n setup and plugin shipping now with standard .pot file to help translators.

1.1.0

  • Added possibility to add a custom link

1.0.2

  • Fixed “plugin link” that was pointing to a wrong url

1.0.1

  • Added “password forgotten” link in no registration mode.

1.0

  • This is the first version of the plugin.

Contributors & Developers

This is open source software. The following people have contributed to this plugin.

Contributors

Browse the code