MultipleMemberPicker datatype? Options
jesper
Posted: Thursday, May 24, 2007 8:56:51 PM

Rank: Administration

Joined: 7/25/2006
Posts: 425
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 / umbraco certified
neehouse
Posted: Thursday, May 24, 2007 9:56:43 PM

Rank: Umbracoholic

Joined: 7/20/2006
Posts: 1,076
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 •
mortenbock
Posted: Thursday, May 24, 2007 11:03:22 PM

Rank: Addict

Joined: 7/19/2006
Posts: 817
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...

Morten Bock - Level 2 certified - MVP 2008/2009 - My danish blog with a few english posts

jesper
Posted: Thursday, May 24, 2007 11:24:01 PM

Rank: Administration

Joined: 7/25/2006
Posts: 425
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 / umbraco certified
jesper
Posted: Friday, May 25, 2007 2:39:57 PM

Rank: Administration

Joined: 7/25/2006
Posts: 425
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 / umbraco certified
neehouse
Posted: Friday, May 25, 2007 3:44:19 PM

Rank: Umbracoholic

Joined: 7/20/2006
Posts: 1,076
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 •
P-Maister
Posted: Tuesday, October 02, 2007 2:35:44 PM
Rank: Newbie

Joined: 8/20/2007
Posts: 9

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
jesper
Posted: Tuesday, October 02, 2007 2:45:11 PM

Rank: Administration

Joined: 7/25/2006
Posts: 425
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 / umbraco certified
Zach
Posted: Tuesday, October 02, 2007 10:03:25 PM
Rank: Devotee

Joined: 8/15/2007
Posts: 30
I like the interface, but both boxes are empty. Is there something I missed?

Thanks,
Zac
jesper
Posted: Wednesday, October 03, 2007 12:08:50 AM

Rank: Administration

Joined: 7/25/2006
Posts: 425
Location: vipperoed, denmark
Have you any members in your installation?

Kindly,

Jesper

webbureau jesper.com doing webdesign / development / umbraco implementations / 2007&2008 MVP / umbraco certified
Zach
Posted: Friday, October 05, 2007 4:46:08 PM
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?
jesper
Posted: Friday, October 05, 2007 4:52:09 PM

Rank: Administration

Joined: 7/25/2006
Posts: 425
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 / umbraco certified
Zach
Posted: Friday, October 05, 2007 6:17:58 PM
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:
timgaunt
Posted: Friday, November 30, 2007 10:39:20 AM

Rank: Aficionado

Joined: 10/31/2007
Posts: 114
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 ;)
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.