DrupalCon Los Angeles 2015: Harmony – Forums & communities with Drupal

good afternoon everyone all you very prompt people those four elements go but I think we might as well just start so this is harmony forums and communities with Drupal okay Who am I I’m Ali Hey look alive on most things and I’ve been working with Drupal worry about those six ish years now I’m a weird mix of roles development front ends kind of a bit of everything really so this kind of project really kind of does it for me I guess because I get to play about everything and a good time with that enjoyable like the easy stuff and then can’t run away from the hard stuff and if you’re really really interested you can find your Linkedin but I wouldn’t really bother with that that was an interesting transition that is the only one that is in there I’m told that my slides are pretty boring so that was for that friend that’s pretty much it i kind of like black and white and simplement works so landscaper forums this talk I’m basically going to go through why I considered even doing this how I went about it and the the result so promise place start is the current landscape which is pretty much one of two things you can either go with call forum and if you reveal like it you can sort of amp up a book bit with advanced forum or you can go with third-party integration which will be stuff like the ability in PHP BB and so on like and of the choices they’re not really great ones so call forum is architectural a pretty simple I’m not too far away from how it started out in Drupal 4.6 I believe where you’ve got a content type and then you’ve got comments against that and you get this kind of disjointed experience because of it where if you wanted to theme a discussion then it’s going to be a theme the note and our theater comments separately theme comment separately and really the main problem with it is the architecture because it’s always going to go back to that issue that it’s just a node and you’ve got comments on it so if you want to have a really sort of performant experience and it doesn’t kind of lend itself to that and if you look at any design my database design for forums they don’t do this so really it’s just kind of like to me a kick-out draw this will do and that’s kind of how it’s stayed third-party integrations there are quite a few options and when you look at them they’ve pretty much again stayed the same for many years forums as the concepts have changed a bit this is around and still very well used and people do get a lot from them but things are shift around a bit in how people interact but you can see this through the fact that these projects are of some age that said though they still exist people to do still use them and it shows that people do want to use Drupal to have communities but the downsides that complex in that you have to install subacute software and understand it you’ve got to track it in terms of security updates much as you would drupal to keep it secure it requires more knowledge it’s not Drupal for one thing so you just kind of fight against a bit on the Drupal side you’ve got to make sure the Drupal project integrates with this party piece of software is up to date works how you expect it to yeah there’s a lot of stuff basically and having done a few of them yeah I’ve lost some life out of it yep separate admin areas so that that’s not a good thing either it’s not really nice great experience and you suffer because of it yet more things violence you tried to put varnish in front of vbulletin it doesn’t really go well it again will make you cry don’t try and do it yeah it’s just not funny or enjoyable don’t just don’t do it so harmony harmony is meant to addressing these problems hum use drupal base form solution very much born out of frustration side a couple years ago slice that with a prototype with ec k and that kind of validates into okay i can plug these things together it does make sense that’s the kind of feature list so when you look at this the aim is to create basically what you’d need as a developer so from that point if you’ve got integrations with

all the things one for example with call forum you can’t change the location of / forum easily you’d have to hook menu alter to do that whereas because we use views for all listings you could just override that and then change the path so everything that it would make sense to have available to you you can do you can use so you’re beautiful listings past also for sensible thread paths because these are separate entities you’ve gotta throw density and you got the post density so good yeah all the kind of things you’d expect so my favorite probably being Travis CI so we’ve integrated with that recently so they’ll run i’ll be at tests when we commit to Drupal or game github the idea harmony is that it’s an ecosystem that provides everything you need but at the very core of it you have harmony cool in all you should need is that and we’re not going to give you anything extra on top of that because a lot of the problems that you can get say with logical comments for example will be that you spend a lot of time I’m stripping that back and again you’re fighting something so with harmony it’s a kind of built with an approach that do produce like minimum but do the sensible amount without kind of overstepping mark and then we’ve got other modules out there to provide extras such as moderation and other bits and bobs so in terms of components it’s that kind of family of things you’d expect you’ve got a distribution moment just the one but we plan to add wall just to kind of prove the concept that you could have stuck overflow with Drupal if you wanted to and then some more community focus things you’ve also got modules there are a lot of them there’s going to be a lot more and then also themes to support that so aims to be like kind of a full package or product and the real vision for is that even is like an open source project that when you think of forums you can’t stack up against PHP DB or vbulletin or disk also any of these things and it’s a decent kind of collection or product in its own right regardless of the fact it’s Drupal just like the fact it is Drupal is just like an extra thing that’s an amazing buttons so let’s run through the modules very quickly so we’ve got a various quite a few different things which address different needs go through like the interesting ones bit by bit but as you can see you know that there are modules which address the needs that you’d expect to have as a result of I want to build a community and I want to enable people you communicate in ways that make sense what’s also ministering it and then tackling spam and all those different requirements and challenges I you’re going to have one thing that I do like to show is the info file for harmony even if you can see them not point is that there’s incredible amount dependencies and this guy a lot ties in with proudly built elsewhere and that I’m going to let these other projects do things and I think that’s kind of sensible approaching that I’m not going to try and make those things those things can be views or inline NC form works well for embedding the post form inside the thread form which is how it works so that’s why those key sort of approaches leverage all the other things out there which we can right now let’s have a look at the front end demo so this is a HTML mock-up of what I want harmony to look like so this would be like the distribution so this is bootstrap 3 responsive all those good things it was a break from doing that hard dev stuff so one of the reasons why read like this project is that I get to do all these different things in terms of I could see some front-end stuffs and dev stuffs from branding design badly and the front end was kind of like short break from doing these little core development so what this has done is kind of set out that high level of I’m going to make this product I know exactly what I want to do with it what it should look like and how it should behave and that’s informed things like I know that when I want to build out views listings that I need to have a way to have a responsive table and whilst we do have these things I’ve done in Drupal in some form or another there’s no number ways to do it so we’ve got in hominick

or a separate views plugin style for harmony responsive table which going to execute this vision and much in the same way we’ll see that the thread page the posts themselves they should be largely represented easily by harmony call by itself so when you install it will roughly look like this or give you the means to kind of build this and in terms of setting goals for a product very much kind of make something that looks very nice or decent and don’t worry about too much the fact that it’s Drupal and even if you can tell there is Drupal then something’s gone a bit wrong because you should be able to just sort of look at it and go okay this is harmony in space to all this is Drupal because I can recognize the tab style or you know those kinds of things right so harmony core let’s have a look at home decor can everyone see it’s okay yep so answers yes cool right so I said we provide a views listing at / forums though is something you can override because it’s a view it’s should more or less look like the front end mock-up circuit we have a look at the listing style itself then it’s very not too far away in that you’ve got number of Lights use avatar so on and is also responsive so don’t try into that right now because this theme is non-responsive it works believe me so currently is user one so you see the kitchen sink of all these tips but I can go and create a thread as you expect to have the regular kind of options that as a Drupal use you to expect to have so this is a threat NC where the post and see form embedded in it so ineffective creating two things which gets a bit conceptually funny sometimes when you’re trying to work out what saves first and so on but in lines NC formed as a good job of kind of working that out what would draw attention to is the fact that we do have these kind of foreign based options which meshes the concept of you got nodes they’re published and threads also have that because you know you would have that in other forms software but we take on that sort irma nology just because it’s Drupal again it’s what you’d expect from a drupal module let’s create that and then we’ve got a threat and you’re all different kind of options this looks roughly like what we wanted to so you’ve got thread operations if I reply it will show as a direct reply to this post you can see it in reply to I’m jump you up we now have one reply so again looks like this and when you click on one reply it loads in that reply so you can see ladder applies to that posts all the stuff is backed by NC references and views and core Ajax type of stuff which has nice benefits in that if I like this red here what dates it here so anywhere that we can rely on someone else doing something for us we do it and we get that benefit and then there are the nice things such as this is work number of projects that kind of sprung out of again I want to me it’s a good product and I want to or just having that kind of approach I mean it’s open source software it’s separate modules as you’d expect it to be but there have been bonafide projects which you’ve kind of sprung out of trying to build this thing and we’ll touch on this a bit more later that you’ve got things like at jas where you can inline app mention people in a post and then it will be a linked kind of tokenized thing which will appear inside the content which you can do whatever you want so in this case it’s just a link to that users profile so PNC’s so harmony when you install it you get harmony menu which kind of collects everything together so you can view all the threads you’ve also got a nap reporting stuff in here but posts you can modify the threads you know again so this is all kind of stuff you expect to have so it’s your reference fields quite a lot of them really you’ve got bundles as well so you’ll have different types of threats you have standard type poll thread announcement

thread QA that kind of stuff and you can you know really just sort of do what you want with it post it’s like more basic and you just got one post like there’s no bundles but again you’ve got NC references you’ve got all the kind of things that you can achieve what you want to with this and you’ve got a really sort of strong basis to build what you want from it yeah i’ll do it for army cool so destroy there is a harm you destroy which again it’s kind of monster really just because that dependencies less so to Sean I’m scared taking it works then great if not then mhm and this is kind of gluing everything together so this is very much a work in progress and it’s mostly like different harmony module spoke together with them if you had a choice ones for security and again it gives you sort like an easy way to jump in and understand what’s thing is so I encouraging them on to give this a go if they they feel like it all they want to know more about this or just kind of pull it apart and see how how it could work out for building community site for yourself for client or you know some just going to take four I give up right so let’s um talk a bit about the separate different modules exist the first one that really was a requirement is that sort of i’ve got a forum i’ve got to run categories which people can post in I want to have a moderator only one so from that game on the access and on the forum access again looking at things like core you see things such as the node access layer which is can’t look it is like okay and then starts gettin is like okay this is really mental incite while these people are smart I’m just going to copy what they did so I pretty much just copy what they did the few tweaks one of the pain points about creating your own end caesars you have to pretty much create your own entity and there are tools out there to help you with it but you kind of their much on your own you’ve got a lot like to do some things are nice views for example which does provide an amount of integration but when it comes to things like I want to have a view edit delete link in my view listing that will not be provided for you you have to do that kind of stuff yourself so with all of this with with in as many places there’s kind of kitchen sink approach to integrating with things so with the value you’ve got into rational developer you’ve also got to develop generate integration where you can just kind of spawn a lot of content to play about with so it’s have actual look at well looks like again all this has been done with kind of intelligent approach to what would I want as a developer or what would I want as a site builder in by installers thing I just want to work I want to have sensible defaults with this as a developer i would like to have the ability to enable or disable access control against multiple different categories and then only have that in place if i want it for that category and if i’m going to have all these permissions and they are you know standard permissions then let’s have them with taxonomy term machine names as opposed to taxonomy term IDs because when you move between environments that’s what we going to work out for you so a lot of it is just try and make it work try and make it as painless as possible harmony moderation so this was a good one through real-world requirements where we’ve done quite a few things which allow people to or active members of the community to really be a part of preventing spam or flagging up inappropriate content in the third features like if I’d know five ten people have many people report one posts you can automatically unpublish it and put it into the moderation queue and flood control against someone’s going around reporting tons and tons of posts you can limit that kind of stuff all the kind of things you want in place learning lessons from other places in Drupal core Drupal community and so on yep so as you can see what’s post then let’s see to see tools modal appears and you can provide this is using flag as well provide the reason for why you’re reporting it go through right things and then you’ve got nabbed in listing which is a place to moderate that kind of stuff so it’s all kind of glued together quite nicely and again it goes back to that ecosystem and in providing something which plugs in together in all

the right places pravasi Sousa fun profanity can be a problem in communities there are a few other modules which can do this kind of thing for you but they weren’t really that modern so stuff like I think it’s bad words and there’s another one which escapes my mind but they were missing things such as features integration so islands have multiple word lists and be able to export them and move my configuration around from different environments that was one requirement and it just what made sense to create a separate project and it means you can also go out and try and do Lee’s tackle these different problems such as I’ve got a views listing I want to have a profound you filtered title in that listing how do I do that with views and it’s like good lord have to provide a separate field which means I’ve now got to go through in NC info ulcer and and there’s I ok now and to provide tokens because I don’t want that in my URLs and so really gone to the nth degree on on this one and again they’re just sort of that’s the approach that’s kind of happened with this retake it’s far as possible without killing yourself at J so we saw that in action the moment go but this implements our library JavaScript library and we sort of that you can mention people but what this really is is the ability to have a trigger character trigger phrase which then references starts up a search against a list of entities and provides that back as I can also complete within a text area and when you go to output that in filter text theme it so make it linked to user profile make it linked to a taxonomy term so for example if you wanted to you could have it a hash or something is a trigger for online search taxonomy terms and then also complete based off of that and then you can now type content automatically just by sort of doing hashtag whatever so it’s quite a lot of potential for this one and the other thing that’s quite good about is that it’s also got this awareness of what is an existing mention and what’s a new mention so if I add mentioned someone then someone goes through and edits that post which can potentially happen if I leave it alone then no new notifications will be sent as a result of it but if I choose to add in another mention then you know that there’s another mention in there because that guy and stuff does happen so again as degree really sort of think about everything as much as possible and seeing the potential for what could happen after this project because again this is a standalone project and if you want to have notifications as a result of a mention a taxonomy tag or that kind of stuff then you’ve got the ability to do that okay event datastore so with eventdata storm the initial requirement was that we need to make charts and having a look at what’s available in Drupal there’s there’s quite a lot of stuff around charlatan but not I want to have a data storage back end so again it’s one kind of came out requirements and it’s got a lot larger kind of potential for what you can do with it in that with this module you can create your own watchdog so just like a store of events that happened and then create listings of it because we’ve integrated views filter against date so you got pop-up calendar again integrative reviews and you can create multiple different storage items for use different events so it means you can track things such as I want to track number of user logins I don’t attract registrations threads creative post created edited deleted all those kind of things and then produce a chart image bigger button then produce a chart which has all have stated together and do it easily because the other stuff the other issue with this is that I want to create a chart easily how do I do that I need to start using aggregation this module will aggravate your data for you so you can easily go in and say I want only the yearly data or a monthly weekly daily hourly data so this is a really good module into it makes things quite simple and easy in terms of I want to produce a chart I want to create a listing of stuff that’s happened and it kind of hits on event sourcing which is Colin septums that i’m going to log and track and have a storage for every different kind of event that happens and as a result this it means i can rebuild the state of an application so i mean have a

read of this blog post here because it’s really quite interesting stuff but with this modulus kind of thing you can do so i want to rebuild the state of the application in terms of posts created so I can sort if I wanted to in the live sense see all the posts that occur and have links through the database to the actual entities exist and kind of read recreate the sort of play-by-play of all the different events happen less a default avatar okay another module which has come out of real world requirements and this was surprisingly hard purely because of imagemagick support and it’s not really you can’t rely on that being there so we see this kind of happening quite a lot in that you’ve got a default avatar now so you in I know google inbox on trying to think of other examples I remember discourse would be another one github I believe does have something in any case it’s quite simple give me a default avatar based off the users username with this you would you can’t bring in the concept of I have a default avatar which means we had to do stuff like also the user scheme which was kind of surprised but says don’t use the data property so then and then provide an amount of ability to have this kind of stuff live in the CDN so we generate real images which can be derived you can provide separate fonts so this is help SQL i believe and change the color set so it’s all quite random and you can choose different colors but again it’s kind of like another solid approach to providing something which is kind of expected now in terms of community because you don’t want to have just like a simple default avatar it’s just a bit more interesting and google recently Google being the other example of default avatars if you want to see you can have separate images so they’re now doing animals so if you look on google docs you’ll see anonymous anaconda you know so on going through the alphabet you could just have images for animals what if you like really right so what starts coming up with harmony um a lot there’s a lot of effort that’s going to go into this project because over the past year or so that it’s been kind of like gradual progression whereas looking to kind of kick things into overdrive in terms of providing all the different things you want for a strong community part of that is giving people the ability to move away from things like call forum advanced forum PHP BB all those places where we we want people to come to us and to leverage Drupal as a platform one of the things that happen recently as I was reviewing things to this talk is that I remember that a Korea did a community site for Twitter so dev taught Twitter or wherever it might might be now that did use call forum which is kind of surprising because when you look at it it’s like that’s the best we’ve got to offer and again that’s really why I’ve done this project and looking at recently Twitter now use discourse instead of Drupal so they’ve bend the call forum thing for discourse which is not great again so this is about giving people more choice and really enabling people to use Drupal to create communities one of the main things that I see coming up as a crime is that we don’t have just say good enough messaging with the message module or private message or whichever you think you choose to use its that I want to have slack or add no facebook grade messaging in my community so there’s a lot of sort of interesting to see stuff that we see out on the horizon and looking to do but right now I realize that communities is very similar niche in a way with Drupal and that that’s a problem and probably the Twitter example is the best one I can give and that people are seen as a viable platform which is something working to change and this leads me into who’s using it so I cancer research in the UK is some massive charity that do a lot of good work and they wanted to rebuild their community going away from jive into Drupal because that’s their platform of choice harmony was seen as pretty much the only game in town I suppose if they didn’t want to use call for more if they didn’t want to do a third-party integration which really don’t do that

it’s horrible and they’re committed to open source software so I worked with them to create the new community which launched in November migrated a lot of content and it sorry been quite a good experience it has given this project kind of legitimacy that it really needed to progress and in a really good way but also repaying phul way for myself current resources that it needed to become a lot more serious in that there’s a dedicated tester on the project making me cry and finding so many bugs but all this good stuff went back into the projects Holland ripple dog so they’ve really really given a lot to the open source community for from from that project and I’m at those modules which you saw previously that that’s from that work and the real world requirements cannot be sort of underestimated in that it’s kind of stuff that none of us would ever think of depending on you know what kind of role you fulfill if you’re a site builder if you’re a developer it’s like wow I’d not have thought that people would want to do that but we found those things and harmony as an ecosystem is much much better for it so I’m massively grateful to cancer research for that and it’s aside from that never I would say have a look at the site if you want to but never actually read anything on that because it can be incredibly sad so don’t don’t read it but yeah I appreciate it and be happy that you know they’ve sort of believed in this open source vision which I’m very privileged to be a part of yeah who else all right well as I was saying about as a Drupal as a platform it’s got so many incredible kind of solutions and modules available such as Commerce for almost create a shop then it’s it’s own sort of like standalone thing which makes a lot of sense you mean solve a lot of problems with Drupal but communities isn’t really one of them that you can do easily or do well so that’s exactly why I do these kind of things why do talk some columns camps whatever it’s kinda stuff I want to be doing to raise awareness that you can create communities with Drupal if they can be really good and with that not that many people using it which makes me sad because I poured a lot of effort into this and a lot of time is I each time I do these talks I meet more people who say this is really great so what I need I’m gonna go build it but when you take on communities a part of the bill it’s never a light thing it’s not just I’m going to throw in the community it’s far more of a consideration and it can be its own site as well as in like cancer chat that was the same thing that’s a lot of project and with that I expect to see a lot more spring up I know there are launches which are coming up within the next day week and then it’s another in a couple of months and then there’s more on the horizon I expect see more and more of them and there are quite a few harmony sites out there I can search at someone that I really want to talk about and sort of like point2 but the reason for doing this is improving so or landscape and improving options and it’s one of the things about doing open source software and that you can share kind of stuff and make things better in so who else will see I hope to fill out a few more slides by next one but yeah for now I’d say if you are aware of requirements for a client or someone asks about I wanna make community service today about harmony I’d be very grateful encourage that can there’s a dieta oh group which isn’t so well traveled that’s kind of the state of droop adore groups sometimes but if you want to get involved then by all means come say hello come say I think you suck you waste a little time and then you might cry but that give the opportunity in that I can make it better who knows yep and if you want to try the distribution out then simply test me is a great way to do that kind of think I wonder if that ever got there yeah did I see that now aside from that I’m pretty much done if anyone does want to get in touch then yeah you can email me tweet do what you want if you want to keep up to date on the project self there’s a recently read longer to get harmony door I 0 which has a few things on there live which being a newsletter signup so you can do that and there’s 150 people somehow on that list I’ve sent probably two emails over the past year that’s pretty bad yet i’m going to click through this and feel any questions if there are already if not

then yeah yeah okay you said a few things there so remember all them chill so notification spree the first one I talked about this kind of vision for everything that hung is going to be and do and all that good stuff and communication is proved the key point in that and there is a module planned called calm sac which is aiming to be that kind of solution in providing modern intelligent means to create notifications messaging live chat all these different things when I talk about slack grade Facebook grade even increasing like an email client that’s what I’d hope that you be able to do with this module and that’s a very very quick kind of statement on something incredibly complex so it’s on the horizon and I hope to get smarter people than me involved in building this thing it’s on the list definitely and you’re right in that when you think about forums discussion forums now they have kind of changed and they’ve sort of I don’t know ten years ago they were very different in its kind of place that you would go to to discuss things and you’d be very involved but now things written more detached and when you look at new of social media is kind of this more abstract way to interact with people and getting people back into that community is absolutely vital to ensuring that it stays active and people are engaged and they are kept up to date with what’s happening so when you part of this is notification so you know this vision of what I want to build has notifications it has probably messaging and when you think about when you consider what’s happening on say twitter where you at mentioned people that’s exactly where you want someone to mention you on harmony with at jeffs and be aware that it’s a new mention in which case send a notification about that so it’s all kind of connected together for me and I’ve got a very clear vision of what I’ll on the build that’s top of the list basically for I mean that’s its own project entirely that’s that’s not necessary harmony but something harmony would use to the cover or all the questions statement yeah yeah absolutely and that is one of the reasons and that’s how things can die and slow down what that guy said strength building

yeah um-hum knees and scrapes with rules in many ways you can do exactly what you said and that that’s the point in integrating kitchen sink style with all the things and yeah it’s been a request and I have comments on my blog but how about instead of using comment module one sees harmony and you could do that you can glue that stuff together there’s probably a dedication module to provide that in some way and it could either be no default rules or something a bit more involved because they’re there is a lot of unseen things in doing something like that but you know the very sort of simple way you could use rules to do that absolutely and then you get all the benefits of inline app replying and one again one of the strengths is that you can sort of leverage all this community content that will exist because it’s not only now about comments it’s about how many times I’ve been mentioned or in what content I’ve been mentioned and with having NC reference use like a million times in each in the Harmony thread or harmony post entities you can do that and you can sort of drag everything out the hope is that you have everything you need to achieve what you want and if that doesn’t exist ends as always the suq you can request things any other questions nope okay well I think we’re kind of about right on time um yeah thank you very much have a good rest of the conference