DrupalCon Portland 2013

Las novedades de Organic Groups 2.X

Amitai Burstein  · 


Extracto de la transcripción automática del vídeo realizada por YouTube.

so that's from the message issue queue and obviously when I read it I felt ashamed because I do make a fuss about the message model and we gon regarding that commerce stuff I still have a really sad memory of ryan from commerce guys literally on his knees

begging and crying and saying no let's have one product for each variation and what like nigh we will have 1,000,000 product and and i felt ashamed because you know this guy he's using my model and he doesn't work for him and now we need to lose

more time in getting into the issue and write a new issue so I've decided to rectify that problem and I've invented it actually developed there are a de AG commonly known as the ridiculously annoying issue generator or in short rage so the idea of

rage is that it automates your issue submission so in the first version I actually had one checkbox obscure but complexity and when you submit it it basically finds an issue that already has tons of comments and adds another comment and it makes you to it

a lot of low quality information there and are you laughing at serious and and just in case you the main tenets don't have enough low quality information it will make sure to zip the whole internet and attach it to the issue but I told myself that I could

do better I could make it obscure even more obscure so I change the checkbox to obscure and when you submit it it creates something like can create work a group it doesn't work but I'm a perfectionist you see and I told myself an atty you can do better

than that so I made the obscure checkbox obscure and now and now when you submit it it just as can't and it won't next we have the check box saying every piece of information is equally important and I think it's pretty self-explanatory what the

output is after that we have to assume the maintainer knows everything may assume the material knows everything in every possible language and when you submit it the output is this error who knows which are it is it's in Tamil that's the clue that

I can give you it's the maximum function nesting and i'm using google translate to help me with that and thanks thanks to to google translated I took google translate I've actually realized that it's also a cultural thing because the same error

has different severity level in different languages so for example if i'll ask a google translate to read out loud with the english version it sounds like that fatal error maximum function nesting level of 100 reached aborting so you can hear by her tone

she's not really mad at you or angry batches kind of disappointed and that's the spanish version fatale a roar función de nivel de ne da miento Maximo def en dijo avatar to better understand the next check box I would like to read a little poem once

upon a time there was an issue and now it is fixed and now it is closed and now it is dead so the next red box is called resurrection when you click on when you click on the check box you have a slider with the issue queue etiquette awareness and you are able

to change the different levels and basically when submitted when we're starting with the minimum like the lowest level it will find an issue that is already closed for years and the next step that it will just set it to active after that it will set the

study priority from from normal to critical and of course it will not fail adding a comment such as setting to critical as I'm on a tight schedule and of course me as I maintainer you can you can guess how I react I scream at the office everybody stop

this guide is on a tight schedule next is setting the status the needs review meaning that you is the maintain you need to review what this guy is saying and then if you take the slider the issue queue etiquette awareness slider all the way to the maximum

it will do the most insult anything it will set the status to network meaning that you domain tell you thought you fix it but you need to work on it just a little more and after I finished working on on on rage on that version i have actually realized that

which can also cater their maintain errs and this time i don't need the check boxes and fancy widgets I think it just enough to have one button saying generate respond so when you click on it it just generates a response so organic groups I have I had

quite a few sessions and postcards and blog post about the basic concepts of organic group so I'd like to take advantage of this presentation and talk about some more advanced concept and we will talk we'll start with the selection handler which is

actually applying not only 20 g it's part of the entity reference it so it applies to entity reference in Drupal 7 and it applies also 23 reference which is now in the core of Drupal 8 so what do we have here we know OG the basic staff with group and we

have group content and it's a group and permission on the on the group level and it's working nicely with field API you in entity I API and views and so on but let's talk about that idea of selection handlers so over here I have a post this is

a group content so I see the title and I see a group audience field now I'm as an administrator I see two widget one is the your groups and one is the other groups and remember you're the your groups is changing from user to user so any ties use your

groups is different from Jim's your group port or Jones your groups and what I'm seeing over here that your groups I call it a field mode in OG didn't have a better name so this is the default field mode every user will she will sit and the other

groups this is only for privileged user I call it the admin field mode so og is taking advantage advantage of the fact that enter it entity reference is Club pluggable and it allows us to have our own logic when we are creating select a when we are creating

sorry have our own logic when we want to fetch values into the your groups so for example if I go to the group audience field settings and I've enabled the model called organic groups example this is part of the og package I have a new selection handler

that I can now change so looking a bit into the code this is OG and I've OG example plugins entity reference selection and let's have a tiny look at the code it's not really important what's written over here just and to understand the concept

I have the OG example selection handler I have the function bill entity field query which is basically the function that builds the logic of saying which groups should appear in the your groups and which one through the pier in the other groups and in the

OG example and doing a really silly example saying if the field mode is default meaning a meaning a normal user then show me all the groups that are below node 85 otherwise if I'm an administrator in the other other groups show me all the node IDs that

are above 5 and in drupal commons we took advantage of that acquires drupal commons and we've written a selection handler for drupal commons that allows people to post content into groups they don't belong to up until now that was not let's say

[ ... ]

Nota: se han omitido las otras 3.605 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.