|
|
 Rank: Administration
Joined: 7/25/2006 Posts: 415 Location: vipperoed, denmark
|
We already have the MemberPicker datatype. Has anyone developed a MultipleMemberPicker datatype? Kindly, Jesper webbureau jesper.com doing webdesign / development / umbraco implementations / 2007&2008 MVP
|
|
 Rank: Umbracoholic
Joined: 7/20/2006 Posts: 1,074 Location: Charleston, West Virginia, United States
|
None that I can recall. Would something like a member group picker be a bit more efficient?
• 2007/2008 MVP • 2008/2009 MVP • Certified • Licensing • Support • Development • Hosting •
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 790 Location: Århus, Denmark
|
Casey Neehouse wrote: None that I can recall. Would something like a member group picker be a bit more efficient?
I could definately use a membergroup picker datatype...
|
|
 Rank: Administration
Joined: 7/25/2006 Posts: 415 Location: vipperoed, denmark
|
Casey Neehouse wrote: None that I can recall. Would something like a member group picker be a bit more efficient?
MemberGroupPicker, MultipleMemberGroupPicker, MemberPicker (Exists) and MultipleMemberPicker ... all could be very handy. Using a memberGroupPicker would mean that I had to lookup if the (current) member is a member of the group using a db request since no memberdata is cached. I wan't to avoid that if possible. There's a couple of other reasons why I wouldnt use a membergroup but that's related to the specific solution. Guess I'll have to get VS started and steal from Cpalms multiplePagePicker :whistle: Kindly, Jesper webbureau jesper.com doing webdesign / development / umbraco implementations / 2007&2008 MVP
|
|
 Rank: Administration
Joined: 7/25/2006 Posts: 415 Location: vipperoed, denmark
|
Hi again, I've created 3 datatypes: - MultipleMemberPicker - MemberGroupPicker - MultipleMemberGroupPicker Credits goes to Christian Palm for creating MultiplePagePickerViaSource which I've used as template. Requirements: .NET 2, Umbraco 3 Download memberpickers_beta.zip. ( It's not a package. ) .. and tell me the good and bad :) Kindly, Jesper webbureau jesper.com doing webdesign / development / umbraco implementations / 2007&2008 MVP
|
|
 Rank: Umbracoholic
Joined: 7/20/2006 Posts: 1,074 Location: Charleston, West Virginia, United States
|
Hey Jesper, Wow, you are on a roll with creating datatypes. If you are up to it, and have a few minutes free, I think a CSS picker would be userful as well (Dropdown list probably) :P Casey
• 2007/2008 MVP • 2008/2009 MVP • Certified • Licensing • Support • Development • Hosting •
|
|
Rank: Newbie
Joined: 8/20/2007 Posts: 7
|
If someone will hit a problem with displaying member names instead of IDs here is the solution which Jesper helped me out with : Code: <xsl:variable name="contacts" select="$node/data [@alias='multimembervaluefield']"/> <xsl:variable name="contactsplit" select="umbraco.library:Split($contacts, ',')"/>
<xsl:for-each select="$contactsplit//value"> <xsl:variable name="member" select="umbraco.library:GetMember(number(.))"/>
<xsl:value-of select="$member//@nodeName"/><br/> </xsl:for-each>
Above is the original code, however the line with GetMember function was erroring so I just make number(.) as a variable and ticked Skip testing - then it works fine. Code:<xsl:variable name="memberId" select="number(.)" /> <xsl:variable name="member" select="umbraco.library:GetMember($memberId)"/> Cold beer goes to Jesper for that :) Regards Przemek
|
|
 Rank: Administration
Joined: 7/25/2006 Posts: 415 Location: vipperoed, denmark
|
Przemek Luczak wrote:Above is the original code, however the line with GetMember function was erroring so I just make number(.) as a variable and ticked Skip testing - then it works fine. Code:<xsl:variable name="memberId" select="number(.)" /> <xsl:variable name="member" select="umbraco.library:GetMember($memberId)"/> Cold beer goes to Jesper for that :) Regards Przemek Thanks ;) .. I'm looking forward to that cold thing... About the error .. Some library functions generate errors when no data is available. Validating data is always a good thing - but can be timeconsuming. Sometimes I just do a shortcut by preventing all the code to run: Add a boolean macro parameter "runmacro". Add this code around the whole damn thing: Code: <xsl:if test="$runmacro = 1">
all my code ...
</xsl:if>
Kindly, Jesper webbureau jesper.com doing webdesign / development / umbraco implementations / 2007&2008 MVP
|
|
Rank: Devotee
Joined: 8/15/2007 Posts: 30
|
I like the interface, but both boxes are empty. Is there something I missed?
Thanks, Zac
|
|
 Rank: Administration
Joined: 7/25/2006 Posts: 415 Location: vipperoed, denmark
|
Have you any members in your installation? Kindly, Jesper webbureau jesper.com doing webdesign / development / umbraco implementations / 2007&2008 MVP
|
|
Rank: Devotee
Joined: 8/15/2007 Posts: 30
|
Yes, it's a rough site, but I built out a fairly similar structure with to the main site I'm building. Does the node it's on need to have children under it?
|
|
 Rank: Administration
Joined: 7/25/2006 Posts: 415 Location: vipperoed, denmark
|
Zach wrote: Yes, it's a rough site, but I built out a fairly similar structure with to the main site I'm building. Does the node it's on need to have children under it?
Oh I think you misunderstand. The MemberPickerType and MultipleMemberPickerType works with Members being people who you have created in the member section or have signed up. Both boxes should be empty if you havent created any members yet. Kindly, Jesper webbureau jesper.com doing webdesign / development / umbraco implementations / 2007&2008 MVP
|
|
Rank: Devotee
Joined: 8/15/2007 Posts: 30
|
Doh, I completely mis-understood you too. My brain just automatically assumed member = node. My bad. Thanks for the taking the time to set me straight... :blush:
|
|
 Rank: Aficionado
Joined: 10/31/2007 Posts: 111 Location: Birmingham (UK)
|
Has anyone got this in an application yet? Basically I want to restrict access to certain documents to document groupts, I wanted to just select the member groups that have access to the file and then filter the user's files based on that but I can't get access to the user's groups via XSLT. Has anyone got an example of this in use? I don't really want the users to have to right click --> public access etc as it's cumbersome. TIA Tim
Managing Director at The Site Doctor Ltd - My personal blog is here - Umbraco Newbie ;)
|
|
|
Guest |