 Not much more because because you guys are already on the 8th floor and the elevator only seems to be speeding up On the 12th floor, I said organic groups and explained about it all the way to the 19th floor Then he looked at me But really looked at me not that yet another random guy telling him yet another elevator pitch How did you get into that? He asked I Steered back For two whole floors. We kept quiet Considering we were already on the 21st floor. That was a lot Then without saying anything. I lean toward the elevator buttons and press the stop button We were hanging between two floors Have a floor more it was the 24th floor our last stop You know I said as if I was the Richmond and he was the frightened entrepreneur Some stories are best told when hanging on the 23rd and a half floor Here's the prologue. I used to be a fashion designer, but nowadays I'm only a Drupal developer Although there are still sometimes I consider myself a bit of a fashion designer For years my interest was mass customization. You know like a jacket a tailor can make it custom-made But it will be expensive a factory can make it cheaper, but it won't fit exactly Mass customization is about the technologies that allow you to have custom-made done with mass production tools Now I could go on and on about mass customization, but I know how it ends People start rolling their eyes and they ask me why don't I just design clothes? Why do I insist on dealing with all those technical aspects this whole technology stuff? It's so It's so without a soul. They say For that I would like to finish the prologue and tell you three stories Actually, the first story will be repeated twice Here's the first story I'm a fashion designer and a Drupal developer although I haven't always been Few years ago. I've developed a new technology for mass customization called MTM made to measure It allows you to enter your body measurements and get the pattern a pattern of a garment that fits you exactly This new technology of mine works great. I'm so proud of that If the next short movie you will see a pattern of basic pants being transformed four times The first time the change is minor The second is intended for a slim fit The third is for someone very big and the last one The last one doesn't change at all and remains the same Here's the second story This part will be repeated only once I Guess I could have repeated it a thousand times, but I hope I will never have to that's Yuri Yuri came from Russia when he was 14 His parent joined when he was 17, but he didn't mind that because he really hated them He's also very poor one of the poorest I know Few years back. He met a girl and they decided to get wet to get married The wedding was held in a tiny hall There were almost no guests. There was barely any food on the table Yuri's wedding never in my life. Have I been in such a happy wedding? That's Arik Arik didn't stay with us until the end. He couldn't hold it and it broke down really quickly after one year and a half He said he preferred hanging out with his friends and go to parties. I Haven't seen him since but I heard some rumors That he got a bit crazy that he started taking drugs and that he became really thin and unhappy. I Don't know if I believe those rumors, but somehow years later I still find myself to be the only one spreading them around in this picture. So he appears We used to call him taco boys and that's a bit strange because it's a real giant a genuine tender giant Such a still didn't find his own place in the world He's been traveling all over he worked in every possible job and started studying in every university that agreed to accept him But still he doesn't know what he wants. I truly hope that one day he'll find that thing He's looking for there aren't many giants like him and he deserves better. That's issue Issue is no doubt one of the funniest guys I've ever met. He's able to find something funny in just about any situation It's extremely difficult because some situations can be really bad Like that one time he and a couple of friends went to swim in the Yangtze River in China In that afternoon the two friends climbed back to the village to make a phone call From what I've heard his body drifted 80 kilometers from where he drowned Recognize that that's the first story, but now in the second version I'm a fashion designer and a Drupal developer although I haven't always been I'd like to prepare pants to some of my old friends This I'll do for you And this for Eric. I hope it will cheer him up This one will belong to the tender giant I know The last one The one that remains the same and never changes that one I prepare for issue I know it doesn't make much sense, but hey, what do I know? I can't always say I'm just a fashion designer So when I prepared this presentation, I realized that mass customization a term. I've been using for years applies also to Drupal Drupal can be considered Custom-made it can be considered mass production, but I believe that in its core its mass customization Organic groups is mass customization per se each group has some freedoms and autonomy, but they are still bound To the rules of the main site In Gizra my company will be we've been developing a new distribution called open Gizra It's a PLM a product lifestyle product lifecycle management and it's intended for the textile industry It allows companies and groups to collaborate together in preparation of garments Today, I would like to give a sneak preview to this Distribution and show how organic groups is playing a part of it now You should understand that the code is not real not ready yet really really not ready In fact, I ask our designer to make an under construction page or so it will be clear I of course emphasize it should reflect the top edge technology we've been using and yeah, that's the that come If you'll tilt your head a bit you will see that the current release code name is Middle East basically because the code is As stable as the middle it's itself now We actually prepared another under construction page for the people who are actually navigating from the Middle East again Very chic very classic Now before I dive into the distribution and show you how organic groups is playing playing a part in it I'd like to share a small anecdote since I've been talking about fashion design and about Drupal I actually had a plan to do a fashion show I have I had everything planned out. I will show a slide saying the first Drupal fashion show in neon lights Loud music would start. I would call the models out and they would present clothes That was that I designed as it with Drupal as inspiration. However one thing I didn't plan and Somebody did it before me. Yeah, so just wanted to get it out of my system because I was a little depressed but Although it's a bit like I tell myself that I'm a tie Being original is overestimated Big round of applause for Sam Boyer Sam is wearing the country Sam is wearing the country shirts This sweatshirt was inspired by our model the way they are interacting with each other. I called them the IE 710 The reason is you might think because maybe It looks plastic a bit boring. Maybe only old people will use it The real reason is that like IE 7 if you look at the pockets, there are just no rounded corners Children's Kennedy everybody Patches are that comic substance That builds our group and changes Drupal because everything changes the world changes Drupal changes Nothing remains the same Alison Simmons everybody They say an entity is everything and nothing in the same time At the first look it might seem empty But when you fill out the first layer you add some feel you see it's beauty Alison Simmons and the fieldable dress Last is Johan Falk Not everything in design should map directly to Drupal sometimes sometimes it's enough You take a similar color from you and some inspiration for me This actually doesn't squeeze Drupal but yes, it's the most Drupal of them all of course. It doesn't hurt to add embroidered kitten in the back big round for of applause for our attractive models Main concept the three main concept beyond organic groups. I don't know if you're for some of you might be familiar with organic group 6 There was kind of the notion of roles and permissions But in Drupal 7 I would say that this is the most important thing Associating content you can do it with node reference entity was reference whatever, but the really The real key element of organic groups is having roles and permission per group The second thing is leveraging entity in fields again if you're coming from Drupal 6, you know CCK field is the same thing but in Drupal core itself an entity is something new in Drupal 7 You are able entity you can describe a node entity You can describe a user you can describe a taxonomy term I would even dare to say that with entity you are even able to describe your true feelings towards high-profile Hollywood celebrities The third is of course using as much as possible merfago, you know merfago Merlin of chaos with views sitles and panels Fago with entity API and rules Those all those models have great API and they have great UI and it's just a shame not to use them No, I would like to take this opportunity to say that I've been accused many times of being a groupie of these two and Really people this is really preposterous. I mean just the fact that I have a little shrine with this picture inside and That I serve them as offering small patches doesn't mean that I'm a groupie So some of you actually came to see organic groups, so we'll do it I will go what we're what we're seeing over here is This is the open Gizra. This is the distribution again It's intended for the textile industries so different companies can work and collaborate together on garment What we're seeing here is the user her name is Alan What we can see on the screen that she belongs to two groups One is Imanimo the name of the company and the second is pattern makers This is like a department inside the Imanimo will see how the subgroups functionality works later on and Let's go for example into the pattern makers page Into the pattern makers page what we can see is like a message stream of all the new Activity that has been done in this specific group. We can see all the images that are related to the pattern makers For example the images over here. Let's go into the jumper and let's start seeing organic groups in action So again a jumper it's a content type called item an item can be any piece of garment a shirt trousers whatever and Let's As an administrator Let's edit it so we can see what it is. This is actually a know the very simple node We can see the title we can see the group audience meaning The the group that this content belongs to the different images if this Item is public or private and so on So this is like a simple node But yet when we are looking at the picture over here or the screen over here We can see much more information and I'd like to To take advantage of this session to explain the way I see To explain sorry to explain the way that I think People should be working with organic groups and this is using page manager and panels and I'll give some explanation about it Who is using panels and who is not? Why not? So let's take for example this block over here as we can see we are talking about We're talking about the jumper which is an item. I can see the bread crumb telling me the hierarchy I see home then the company money more than pattern makers and then some information about the group itself This is pattern makers. I can see I'm subscribed to the group who is the group manager and so on This is done through panels and in this case. I'm using a mini panel Now the key concept in understanding the way of working with panels is probably understanding what context is you might have heard about it Also, there is initiative for Drupal 8 talking about context And this is the idea of If we know blocks from Drupal 6 or even Drupal 7 blocks are dumb objects. They don't know nothing about where they appear when we have context So I this like this advanced block is saying to Drupal listen If you want me to show something then I must get as context an organic group group entity From that entity Many panels know how to extract through relationship Other other objects other entities So from the group itself it will extract the node because a node unlike Drupal 6 and node and the group are Different entities and from the node it will extract the user and then if I go to the content We'll see that this is very just simple just playing displaying different Fields or different sitles plugins So for example here in the in the body You can see this is like expand and collapse. This is like a Model I have in my sandbox called jquery Jx jquery expander or something like that Nothing too fancy. This is just a formatter on the field. So over here. I choose the expander So that's about this element the same thing is going here with a mini panel Another type of inserting related information to the pages of course using views Yeah, go ahead if it's an important call over here we have the group members view two things that I would like to show you and We are basically querying the user We're querying the user table the two important thing are first the relationship. We are adding the group membership entity The same thing like when we haven't we said we have a node in a group We have another entity in organic groups called og membership this entity basically Describes that a user relates to another group or a node relates to another group and it adds some metadata If the user is active there or pending or blocked and it is fieldable So you can add your own information later on we'll see how we can take advantage of that So that's the relationship The second thing is we are passing here a contextual filter or an argument of the group ID Again the idea of context we take advantage of it using a model called views content that comes with see tools We had a new display called content pane and Over here in the argument input Again views is now telling Drupal I Need to get the group ID from somewhere and This somewhere is from the context and the group ID So later on panels know how to pass this information along into views I forgot my list over here. So hey Sorry So the next thing I would like to to explain is the the roles and permission we talked earlier about being the most Probably the key element in organic groups again as the administrator Under configuration We have here the global roles It means that every group that will be created automatically will be assigned this Group roles. Okay, they are not related to the role that we know from Drupal itself just for organic groups Same thing goes for the permissions. You can see we have here different permissions That we can throw that we can control How we are interacting with a group. So for example if I will unsubscribe from group Now we can see the button became request group membership It means when I'll click it I have to request the group membership. I'm not immediately become a member That's a permission thing. I can change it over here. I Would say a non-member can subscribe without approval So now I can just subscribe to you to the group and I'm subscribed again if you're coming from OG 6 This has changed. It's no longer settings. It's Right now we are seeing the global roles and permission, but we can have it per group as well So over here for example, just so we see another short example Helen cannot edit the pattern makers. She cannot edit the pattern makers Item so I actually have Few ways to give her permission I can give her permission I can give her a special role under the pattern makers Group, but it would be more interesting to see what happens if I give her a certain permission under The company which means higher in the hierarchy hierarchy So first we'll define another role. Let's call it and now again as the administrator I'm doing it right now as the site administrator, but I could have used just the group administrator Over here. I've got the group settings. I See all the people list that are inside the group. I can see Helen is here It looks very similar to how Drupal core looks and I can add The salesman only forgot to assign a permission to the correct role So it would be added any item. Yeah, it actually works She now has added permission based on her permission not in the group not only in the group that The jumper belongs to pattern makers. It does not belong directly to Emmanuel This is actually the subgroups model that is working and give you the hierarchy So till now we talked about the global roles and permission right now We are able actually to override those role and permission. How is it done? We have here we have here a field that allows us to do this override How did I get this field under configuration? I have the field settings and Over here I can select the bundle because We're dealing with different entities and different bundles then I would so that I would select for example under the node The company and the fields I will select the group pros and permission Right now. I'll probably get an error because I already have it Yeah, it's already existing in company and actually I can see it over here The company has all those fields So back in the node edit if I override the default pros and permissions For that specific group. I can have my own roles and my own permissions Regardless of the other groups. O.G. is taking care of Checking the permission of a user based on the different roles in the day different permission they have Site-wide so if the jumper for example belongs to several groups, it will check permission in each group I talked earlier about leveraging the fields Where can we see it? We can see it when we're requesting when we are requesting a group membership Let me just make the permissions just change the permission a bit. So there will be approval required. Okay this is something that This is This is leveraging the fields again if you are coming from O.G. 6 and you know the code a bit So you know that organic groups just did some form alter and or its own form and ejected some form and We made sure that whenever you write a request we catch that request from the form and we send an email and That's it if the email is not sent or after it was sent a year later You cannot know what the request is What happens over here is that we have the O.G. membership entity and we actually attach a New field called request message a request message. It's a text field We attach it to the entity which means that right now if I write a request and I say join What actually happens is that this information is saved with the membership with the O.G. Membership so we can send an email right no problem, but I can also later on Create my own views or whatever and extract this information So if the email was not sent to all group managers and there is another group manager that want to check it They can do it The way we define those fields is over here in the O.G. Membership type we see we have over here two different group membership type I will soon explain about the expire, but let's look at the default if I go into the managed fields I will see the request message that comes automatically when organic groups is being enabled and There is another one that I added myself called the last message ID and I explain two minutes about it This is related to the message stream the message stream is using a model that Fago and myself we've been writing together It's very similar to activity and heartbeat only very a very slim model basically you have a message entity and you write your own messages very similar to Activity try to do a demonstration. So it will be clear what's going on. Yeah So over here. I see many more zero and pattern makers zero as an admin I'll create an item belongs to Okay, another user created an item. He actually created an activity and now our user He sees is like he got a new activity stream a new message that appears over here. I See you are very excited of that. I'm very happy because it took me some times to do it and So what am I doing here? And this is Actually using the new approach to Drupal 7 of how we can leverage the entities and how we can leverage the fields What actually happened over here is? I'm using the og membership to give me some meta data the og membership of this specific user of user Helen the way that She is associated with pattern makers. There is another field on that on that entity that tells me or tells the system Sorry, what was the last message ID? She saw right? Let's say she saw message ID one number 100 but when administrator created an event There was a new message 101 So the system calculates takes them when we are loading the page the system takes the The last message ID and checks what was the last one and whenever I go into pattern makers and actually see the new message activity It is now zero don't be shy don't be shy So the membership type Again, this is leveraging the idea of entities We can define Multiple membership types. So we have the default one the one that we know a user becomes a group member and that's it another Typical use case that we have in premium sites is that the user subscribe that but they should be expired after Set an amount of time one month one year, whatever So I'm able to create a new membership type. I called it expire over here. You can see it in under og expire Og expire model I created a new membership type I attached a field Called expire. It's a date field. I added the request message because I want to have a request message and Currently, this is something a feature. I plan to do in the future, but currently what you can already do and See the way and see the different membership is for example, if I will go to Pattern makers group if I'd like to add a user So over here, I can see that the user will be added with membership default. I see just one field If I'll change it to expire I Now has that I now have the date field and it is saved with the og membership entity So it means with a very simple hook cron. I can go over all the different memberships That are expired and just set the membership entity the og membership entity set it from active into pending And if I would like yeah, okay another time Yeah, and if I would like to react on that that's where rules kicks in so either you do it with your own custom code Or either you use rules again If you know og 6 it tried to do everything by itself whenever you were kicking a user out or something like that Oh, you was trying to send the email That's not the case in og 7 og 7 is saying let me do as little as I can I'll just explore. I'll just expose this this activity and you do whatever you want with it So if we'll have a look in rules for example, and we look at the og expire rule Yeah, the model comes with with the rule bit. It's mostly an example model, but it's still usable So we can see the event is after we update an existing organic group membership the aim of this The the target of this rule is to notify a user that they were Expired they are now pending. They're no longer active in the group So after updating an og membership entity we can check is it the group is it? is the members membership type indeed expired is the status is the state sorry pending is the Entity type a user if so just email just email that user another thing that People would probably be using organic groups is for access control, right? A part of the hierarchy that we have permission is also access control who can see a node and who cannot Over here right now. I'm a different. I'm a different user I can see jumper because if I look over here. I can see jumper is public It's accessible to all to all users if I will change it. I can either strictly Explicitly sorry say it's private or I can say use group defaults So it will look to the into the group it belongs to and use its definition And now the same user is getting this I think this is probably also a good time you saw the four or three the Access denied probably a good time to show you also the page note found It's very hard to find the unicorn and it's even harder to make them cry and Then to to write the portrait Q&A you ask Questions, I'll be with two mics Okay, so the question is What's your name? Sam The question is how do I know the group ID because like we said the node ID might be 10 But the group ID can be one again. I look if I'll have a look in panels itself as an administrator Of course you have API to get to get The group from a node, but if we're talking about the user interface and now Panels can help us so over here over here when I added the panel We have this context When I press on this context tab right now panels got the node entity That's the way it works what I did I added a relationship and I say oji group from node and Then I get the group ID automatically That's the way to use it with panels. Otherwise if you're using the API you have like Oji get group you pass the node and the node ID and you get the group itself So those are the two ways to do it. Yeah, next question Do you have another question? I know the answer to there is an issue about it I don't remember. I know I gave an answer there, but I don't remember what it was other models Blame somebody else. What about subgroups? It works It took me like one year and a half to get to that But yeah, basically, there's the Oji subgroups model It's the version of course like every other model in Drupal 7 right now you just enable the model and It works it checks the hierarchy checks for the groups above your group It goes all the way up the minute it finds the permission. It has no like strict Strict settings the minute is fine one permission Then it's enough then it's enough for it another question in the meanwhile. It's just the permissions Currently, I mean if there is a need for a feature you can open an issue and probably I'll never get to it Yeah, the permissions are per group, right? It relates to the group itself the membership It doesn't affect the rules of the permission. The rules and the permission are like Related to the group entity and the membership is Oji membership entity. Yeah. Yeah Is there a persistent URL support for it for organic group 7? Well, that automatically adds the name of the group to the path How did I add the name of the group? Is it the name of the group there in the path is the PLM is that just the URL of the demo or is it No, no, if you see the URL and on top local host slash plm Is there persistent URL support so we can automatically add the name of the group there to all notice So we know that if we're viewing a note that the path is automatically there Review a view at the path is automatically there like we did in organically and triple six with Spaces and pure Basically, I didn't understand the question at all. So I say yes, but maybe no and and I'll catch you later on and I'll better understand Sorry any more questions not necessarily related to Drupal. I really talked like talking about my personal life. Yeah And Mike yeah, it took me like two months to make it. So I think never again Hi Morton gave me some crap on Twitter the other day because he was trying to get something working with Oji and rules and VBO and I went to try and help him with that in my D7 sandbox And the reason that it didn't work is because the Oji actions module in D6 Doesn't exist in D7 which was a bit of a stumbling block Is that going to be replaced? First Morton is giving everybody, you know, hard time. So don't feel bad about it No, I'm not I myself not going to port Oji actions Maybe somebody will do it basically because there is rules, which I think is a superior model One of my plans is actually for the next release is What we've seen all the tables like the people that the list of the table right now It's hard-coded what I'd like to have is views and VBO do it So we should probably help you but I think that there is a VBO and rules model for Drupal 7 So maybe So while I'm on the MC tip tonight if you didn't get the tweet from Drupal con We've managed to black the bar here until 2 a.m. So you're all free to come down here at no cost The bar will be obviously your own expense But come down we're gonna try to get some music on and just like come down towards some people have some beer No running around London to pubs that don't exist or shut about eight hours ago or any of that crap Just come down and get shit-faced and everything's okay Yeah, that's question. That was my story. That was organic groups. Welcome to the 21st floor. Thank you very much