Umbraco Member Controls and editable member profiles
Please note:
This article covers Umbraco V3, for Umbraco V4 you really
should use the standard .Net control Login
Control.
- - - - - - - - - - -
It seems that a lot of people are having serious problems with
getting the original UmbracoMemberControls
package working correctly, so was I back in Mars -08..
The first thing that bugged me was that I wasn't able to log
out, instead I was shown a error message (Object moved to here) in
Firefox and blank page in Internet Explorer 6 & 7. It seems
like this was due to a session that wasn't cleared correctly so I
added a Session.Clear() to the logout method and that seemed to fix
this. All in all I've made
about 5+ updates to the original package:
- Fixed the issue with failing log-outs
(displayed "Item moved to here" in FF, blank page in IE) by adding
Session.Clear() and Response.Redirect(Request.RawUrl, true); to the
login and logout logic.
- Added a property for specifying a number of days that
the cookie should be valid
- Added a "remember me" checkbox, if selected
this will set a cookie that's valid for the specified number of
days.
- Made all texts/labels support the dictionary
syntax, i.e if you enter "#LoginFailed" that label will
pick a language aware dictionary item named "LoginFailed" instead
of some hardcoded parameter.
- Fixed some labels that wasn't possible to
modify via macro parameters before.
My initial idea was to release this as an new version of the
package, but sadly the
Packager released by Per Ploug Hansen haven't made it across
the finish line yet. Therefore I will only release
these files for manual installation, with manual adding of all
macros and macro parameters.
UPDATE: A few days ago
Immo Wache released an updated Packager (1.0.5) that's working just
fine ; ) Thanks to Immo you will find a package installer at
the bottom of this page! Nice work Immo!
Installation instructions:
- Remove your old umbracoMemberControls files (if you have any),
especially the macros and their parameter since otherwise there's a
risk for a
duplicate parameters error.
- Install the package by right-clicking the macros node and
select "upload".
- The last thing to do is to add some styling to your new
controls. Since the label/control pairs in this version uses
dl-syntax (definition list) the easiest thing is to style them according to this
technique.
Additional information about Member Controls
- All text parameters supports dictionary items.
Instead of entering "You are now logged in as %%LOGINNAME%%" as
your User Logged In Text parameter you can enter
"#" followed by the name of a dictionary key i.e.
"#LoggedInText". This means that you can use different values for
different languages if you have a multilingual website. The
dictionary is also very nice if you would like one single place to
edit many frequent terms like "log in" or "remember me".
- The parameter User Logged In Text supports the
constants %%LOGINNAME%% and
%%REALNAME%%, if you place these inside your text
they will be replaced with the users login name and/or the users
real name when the control is displayed.
Download
You can download the package here:
Click to
download umbracoMemberControls v0.4 unofficial
Visual Studio 2005 solution file in a zip can be found here:
Click to download
umbracoMemberControls v0.4 Source
UPDATE2: Link to download VS2005 sourcefiles
added
Technorati Tags: umbraco,membercontrols,package