Planet Drupal

Syndicate content - aggregated feeds in category Planet Drupal
Updated: 6 min 19 sec ago

cs_shadow: GSoC Reunion Summit 2014 from my point of view

Mon, 11/10/2014 - 20:44
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpI was very lucky to be provided with wonderful opportunity of attending a href= title=Google Summer of Code ReunionGSoC 2014 Reunion Summit/a as a Drupal delegate. The event was celebration of ten-year anniversary of Google Summer of Code program. It was an amazing event and also my first trip to the states. I had very high expectations from this event and was very excited to attend it, and I was not appointed after I did. I totally enjoyed my time there and will try to describe my experiences in more detail below. I'll stick to a chronological in order to describe my experiences since that makes it easier for me to recollect all the things that were going on./p h223rd October/h2 h3The long flight to San Francisco/h3 pMy journey to the states started when I boarded flight to London from Hyderabad airport on the morning of 23rd (according to local time). It was a long 10 hour journey but I was accompanied by two of my friends who were also coming for the Reunion summit. From London, we had another 10 hour flight to San Francisco. While waiting at the London airport, we saw a couple of guys walking around in GSoC t-shirts. Without missing a chance to socialize, we asked them if they were also going to attend the Reunion and obviously the answer was yes. Slowly, we realized that the entire boarding area was flocked with nerds from all around the world. We boarded the flight after few introductions and it was a pleasant journey thereafter./p h3San Jose Marriott, webchick and more socializing/h3 pThe plane landed at the SFO airport late in the evening and we checked in at the Marriott an hour later. I was a bit of late to check in and apparently they ran out of normal rooms at that point of time so they upgraded me to a Deluxe room at no extra cost which was pretty cool. At this point, I was pretty tired to do anything else apart from crashing on the bed but strong desire to see Angie Byron (a href=http://webchick.netwebchick/a) ASAP kept me awake. Finally I met Angie who was in a 'Big Blue Drupal' t-shirt. It was really great to finally see her in person. It was interesting to meet another fellow Drupaler Dhruv Baldawa(a href= there./p pThere was also a dinner planned that night, but by the time I got there only dessert counters were still open. But who cares whether or not other counters are open anyway when desserts are still being served. After that it was time for some more socializing. Meeting folks from various different projects such as Libre Office, Sahana, OSGeo, PHPMyAdmin among others was also very interesting. Our topics of discussion ranged from organizational structure of large organizations to heavy metal music so it was quite a bit of fun. After some time, I slowly disappeared from the Grand Ballroom of Marriott and went to sleep./p h224th October/h2 h3Trip to Great America/h3 pimg src= alt=Me and Angie at California's Great America title=Me and Angie at California's Great America /br / Just after the breakfast, we boarded shuttles to the Great America amusement park. While in other amusement parks, the problem is the long queue for the rides, the major problem there was to identify whether or not a ride was open that day. This was because of the fact that the park was closed for common public that day. Yes, you heard me right - Google had booked the entire park that for the Reunion attendees which was pretty awesome. That also meant free access to the Arcade and we all got a chance to show off their skills on the Pacman and other games. After having a satisfying lunch, we headed back to the hotel./p h3Dressy Dinner Reception/h3 pAfter a downtime of a few hours, it was time for the Dinner Reception. The schedule said that we had to be in dressy outfits and of course everyone had a different interpretation of what dressy meant. For some, it meant not wearing shorts and beach t-shirts and for some, it meant wearing their Halloween costumes. The reception was held at the Tech Museum which had a bunch of geeky exhibits including an 'Earthquake Room'./p pGoogle had organized few sessions and the speakers included Chris DiBona, Alfred Spector, Peter Norvig, Dirk Hohndel and emdrumroll/em Linus Torvalds. Since, the speakers were not announced beforehand, it was a big surprise to see Linus there. Everyone practically stood in line to get a picture with him. Though I didn't managed to get a selfie with him, it was still awesome to see him./p h225th October/h2 pFollowed by an opening session by Carol, it was time for the un-conference sessions. Un-conferences were the part I was most looking forward to for this summit./p h3Our session/h3 pMe and Angie had also proposed a session titled: strong'Making your project more approachable to new contributors: Discuss strategies regarding how to help new contributors get started with your open source project'/strong (which by the way was the most voted session on the Moderator forum for sessions). We tried to make our session more like a discussion instead of we just walking though some slides. To get the discussion started, we talked about some of the strategies we use at Drupal to help new contributors. And then, we asked others to discuss any problems or ideas they come across working on their open source projects. Since I was a recent newcomer to Drupal and Angie was an experienced Drupalista, we could present the both sides, i.e mentor and metee. It was a pretty interesting discussion overall and I got to know about various new / Slides/Notes from our session: a href= h3Plone and Drupal get together/h3 pJust after our session, someone asked me Are you cs_shadow and I was like .....Yes!?. Then I came to know that he was David Bain (a href=, a rockstar Plone developer. He was a friend of Varun Baker (a href= who had specially asked him to get a pic with me and Angie. That was a very sweet gesture on his part and here's that pic with all of us smiling:br /img src= alt=Me, Angie and David title=Me, Angie and David //p p!-- Images --/ppAfter our session, I went attended some other sessions such as best practices for open source documentation, codejam session and feedback session for Melange and GSoC./p h3GSoC 10 year t-shirt wall/h3 pThe OSPO team had put up t-shirts from all the 10 years of GSoC on display which was pretty cool. We all were discussing in front of it that who has how many of those. I pointed out that I had that one, Angie said she has 'that, that and that one'. Then someone came and said that he had 8 of those and we all went strongWow/strong. Here's a pic of the wall:br /img src= alt=10 year t-shirt wall //p h226th October/h2 pThat morning, we went to visit the Googleplex and had a semi-guided tour of the campus including the Android lawn statues. When we came back to the hotel, there were a few more sessions. But the the most interesting session was the 'Lightning Talks' where basically people had to showcase an awesome project in just a few minutes./p pAfter the lunch, it was time for the closing session by Carol, which was followed by a much deserved standing ovation to the entire OSPO team, including Carol, Stephanie, Cat and others. After the session, they gave all of us a strongGoogle Cardboard/strong which was very cool./p pQuickly after that, we had to catch our shuttles, so I said goodbye to Angie, who had to catch a plane. And since I planned to stay around for a few more days, I went off to my hotel in San Francisco./p h227th October onward/h2 pThe Summit was officially over but I had planned to stay around for a little more so that morning I went to visit the Golden Gate Bridge area. I got a chance to meet Matthew Lechlieder (@Slurpee) and it was pretty nice to finally meet him person after those long IRC chats. Here's a pic of me and Slurpee at the Fishermen's Wharf:br /img src= alt=Me and Slurpee //p pTo sum it all up, it was an awesome trip to the States and a big thanks to everyone who provided me this wonderful opportunity./p /div/div/divdiv class=sharethis-buttonsdiv class=sharethis-wrapperspan st_url= st_title=GSoC Reunion Summit 2014 from my point of view class=st_twitter_hcount displayText=twitter/span span st_url= st_title=GSoC Reunion Summit 2014 from my point of view class=st_facebook_hcount displayText=facebook/span span st_url= st_title=GSoC Reunion Summit 2014 from my point of view class=st_linkedin_hcount displayText=linkedin/span span st_url= st_title=GSoC Reunion Summit 2014 from my point of view class=st_googleplus_hcount displayText=googleplus/span /div/div div class=field field-name-field-tags field-type-taxonomy-term-reference field-label-inline clearfixdiv class=field-labelTags:nbsp;/divdiv class=field-itemsdiv class=field-item even rel=dc:subjecta href=/tags/google-summer-code typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Google Summer of Code/a/divdiv class=field-item odd rel=dc:subjecta href=/tags/drupal-planet typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Drupal Planet/a/divdiv class=field-item even rel=dc:subjecta href=/tags/reunion-summit typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Reunion Summit/a/divdiv class=field-item odd rel=dc:subjecta href=/tags/gsoc typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=gsoc/a/div/div/div

Stauffer: Measuring Success in Web Projects

Mon, 11/10/2014 - 20:17
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpbigstrongA Ship Without a Rudder/strong/big/ppWhen I was a younger developer, I struggled often with the idea that I wasn't doing meaningful work. Yes, I was building good websites. Yes, they meant something to somebody (at least to the client). But is that brochureware site really going to make the world a better place? Does this university sub-department really need its own website? (I don't think I looked at a single individual department site when I was in school.) When you work on a project that doesn't have a clear and obvious goal, it's easy to fall into this line of thinking. And that line of thinking is very demotivating to a developer - you start to feel like you're spending your days doing busywork. And that's not even touching the fact that web projects are expensive. That university sub-department is probably spending tens of thousands of dollars to make a site that the students may never visit./ppThe solution is to figure out and clearly define the goals of a site at the outset of the project. The main purpose of that university department site is to serve information. Potential students can learn about the department, and current staff and students keep up to date on what's going on. There are secondary purposes too, like directing potential students to the main school website, getting them to submit a contact form, or getting people to sign up for a newsletter. Just knowing that much gives you something to work towards. If your work doesn't contribute to one of those goals, then things are getting off track./ppbigstrongGetting on Track/strong/big/ppOnce the list of goals for a site is known, it should be communicated to the whole team. The client knows why they need a website, but the development team may not. Keeping your developers informed of a project’s goals will keep them motivated and on track./ppSome projects have obvious goals. An e-commerce site, whose sole purpose is to to sell products, is probably the easiest example. This type of project is deemed a success when the profit from the store surpasses the cost of development. Sites that market an upcoming product may have obvious goals too, even if their value is more difficult to calculate. In the case of a promo site for an upcoming service, the business may plan to collect as many email addresses as possible,assigning an estimated value to each address collected. Then there are sites like libraries and club forums, which don't make any money, but have value in other ways, i.e. providing information and fostering community interaction. In those cases, the value is in making it as easy as possible for visitors to find what they are looking for. If visitors to the library site are getting lost on the way to finding content, the project is in trouble./ppIn any case, it's important for a project to define success for when the project goes live./ppThe next step, after knowing the goals, is to refine them into specific user actions like viewing a specific page or clicking a specific button. These goalpost actions are defined as something that users can do so we know when they have reached one of the site's goals. This makes each goal both specific and measurable. If the goal is newsletter signups, the goalpost might be user submits the newsletter form and reaches the signup thank you page. Now every time a visitor reaches the signup thank you page, we can mark a tally because the goal is specific. Looking at the percentage of visitors reaching each goal gives us what's called a conversion rate. The higher the conversion rates, the better your website is doing what it was made to do./ppbigstrongLearning to Measure Progress/strong/big/ppSetting up goalposts is what separates directionless projects from meaningful ones. Whether you, as a developer, fully stand behind the product or not, you're helping someone bring their idea into reality. And more importantly, by measuring the value of your contribution, clients can see the return on their investment./ppWebsites actually have it relatively easy when it comes to tracking goals like this. The most common bit of tracking info in web is just the path a user is on. If a user ends up on a path ending in /checkout/complete, chances are they just finished placing an e-commerce order. Your analytics package will note that /checkout/complete got a pageview, and now you have a tally that one more visitor completed a purchase. Of course, you can also log in to your commerce site to see how many orders are placed, but analytics dashboards are extra convenient and give you endless options for number crunching and filtering data./ppFor more complicated goals, any decent analytics package will let you submit custom data and track events manually. For example, if you're only tracking checkouts with /checkout/complete, you don't know how much money each individual order was worth. Using this simple method, someone buying a $10 t-shirt looks exactly the same as a person buying a $20,000 giraffe. (Why you have that in your store is beyond the scope of this article.) Custom analytics events let you pass the real value of the order, which might make a big difference depending on what you're measuring. Maybe people entering your site on the homepage mostly buy t-shirts, and people who click through from your Giraffe for Sale banner ad mostly buy giraffes. These distinctions are important for tracking the success of ad runs./ppSo you know your goals, you've decided on goalposts, and you’ve configured them in an analytics package. Unfortunately, users still aren't reaching the end point. What do you do now? Goal funnels can help identify pain points for your users. A funnel is a list of steps that a user takes on the way to a goalpost (marked by specific and measurable mini-goalposts, of course). Using commerce as an example, step 1 is viewing a product, step 2 is adding to cart, step 3 is starting checkout, step 4 is billing and shipping info, and step 5 is the goal - a finished checkout. Each step has a page or action associated, so we can track how far into the process users get. By watching the percentage of users hitting each step, you can see what step is scaring users off. A huge dropoff on step X tells you that something about that page is bad, wrong, or just plain broken. Revisit that step, develop a more user-friendly way to do it, and then after you push it live, measure the new conversion rate. Since you already have a funnel in place, you don't have to guess whether new development is actually better or not. You'll have percentages to back it up. (Prettier isn't always better. Sometimes users prefer unexpected things - Craigslist has barely updated its style in the last 20 years, and yet it remains popular.)/ppbigstrongWrapping Up/strong/big/ppTo recap, by defining and tracking the goals of a website developers stay motivated, clients focus on real sets of goals, and managers can look at the numbers and see real return on investment. So at the outset of any web project, lay out the goals. Once a general list of goals is known, refine them into specific user actions that can be tracked and measured. Analytics software can tell you the value of the completed development. If users just aren't hitting your goals, use funnels to look for pain points to improve on. All of this together will give your projects a more defined purpose with less guessing and more transparency./p/div/div/divdiv class=field field-name-field-tags field-type-taxonomy-term-reference field-label-inline clearfixdiv class=field-labelTags:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/tags/drupal typeof=skos:Concept property=rdfs:label skos:prefLabelDrupal/anbsp;,nbsp;/divdiv class=field-item odda href=/tags/planet-drupal typeof=skos:Concept property=rdfs:label skos:prefLabelPlanet Drupal/anbsp;,nbsp;/divdiv class=field-item evena href=/tags/success typeof=skos:Concept property=rdfs:label skos:prefLabelSuccess/anbsp;,nbsp;/divdiv class=field-item odda href=/tags/goals typeof=skos:Concept property=rdfs:label skos:prefLabelGoals/anbsp;,nbsp;/divdiv class=field-item evena href=/tags/analytics typeof=skos:Concept property=rdfs:label skos:prefLabelAnalytics/a/div/div/div

Chapter Three: Ruby, RVM, Gemsets and Bundler/Gemfiles

Mon, 11/10/2014 - 18:00
pAs a Drupal themer, we're often tasked with building multiple sites concurrently. One site may be a new build from scratch, and another could be a site built two years ago that is getting a new feature. If they utilize Sass in the theme, then they both have one thing in common:/pbr / br / piThey have Ruby gem dependencies./i/pbr / br / pWhat are they chances that both sites use the same versions of the same gems? Slim? None? Ever tried to build a set of Sass files when you don't have the correct gem versions installed? Oh what a pain./pbr / br / pLet's take the pain away with a few simple techniques./pbr / br / h2Ruby and RVM/h2br / br / pOS X comes with Ruby built-in, but I highly recommend installing Ruby with a href=http://rvm.ioRVM/a. With RVM, you can specify the version of Ruby you want installed, plus a whole lot more. a href= instructions/a are available, but are outside the scope of this blog post./p

Phase2: AngularJS Meet Open Atrium

Mon, 11/10/2014 - 16:52
pimg class=alignright size-full wp-image-6462 alt=atrium-logo (1) src= width=300 height=82 / The recent a title=Open Atrium Version 2.23 Released! href= version of Open Atrium/a contains a cool new interactive site builder and navigator application (a href= it in action/a). This application was written using the a href= framework/a.  The combination of Drupal, jQuery, and AngularJS proved to be powerful, but wasn#8217;t without some pitfalls./p h2Using AngularJS in Drupal/h2 pimg class=alignright size-medium wp-image-9078 alt=AngularJS-large src= width=300 height=84 / The basics of using Angular within Drupal is pretty straight-forward.  Simply reference the external AngularJS scripts using the drupal_add_js() function, then add your custom javascript app code, then use a tpl template to generate the markup including the normal Angular tags.  For example, here is the Drupal module code, javascript and template for a simple Angular app:/ppre class=crayon-plain-tag// Implements hook_menu() function myapp_menu() { $items['myapp'] = array( 'page callback' =gt; 'myapp_menu_callback', 'access callback' =gt; TRUE, ); return $items; } // The menu callback to display the page function myapp_menu_callback() { drupal_add_js(''); $base = drupal_get_path('module', 'myapp'); // data you want to pass to the app drupal_add_js(array( 'myapp' =gt; array( 'title' =gt; t('Hello World'), ), ), 'setting'); drupal_add_js($base . '/myapp.js'); drupal_add_css($base . '/myapp.css'); return theme('myapp', array()); } // Implements hook_theme(). function myapp_theme() { return array( 'myapp' =gt; array( 'template' =gt; 'myapp', ), ); }/prep/ppre class=crayon-plain-tag(function ($) { var app = angular.module(myApp, []); app.controller(myAppController, function($scope) { $scope.settings = Drupal.settings.myapp; $scope.count = 1; $scope.updateCount = function(value) { $scope.count = $scope.count + value; } $scope.myClass = function() { return myclass- + $scope.count; } }) }(jQuery));/prep/ppre class=crayon-plain-taglt;div class=myapp ng-app=myApp ng-controller=myAppControllergt; lt;h3 ng-class=myClass()gt;{{settings.title}}lt;/h3gt; lt;pgt; lt;a class=btn btn-default ng-click=updateCount(1)gt;Clicklt;/agt; to increment {{count}} lt;/pgt; lt;/divgt;/prepNow, obviously we aren#8217;t using the full Angular framework here.  We aren#8217;t using any directives, nor are we really using Angular as a MVC framework.  But it gives you the idea of how easy it is to get started playing with basic Angular functionality./p h2Angular plus jQuery/h2 pDeveloping javascript applications in Angular requires a different mindset from normal Drupal and jQuery development.  In jQuery you are often manipulating the DOM directly, whereas Angular is a full framework that allows data to be bound and manipulated on page elements.  Trying to combine both is often a source of frustration unless you understand more about how Angular works behind the scenes. Specifically, Angular has it#8217;s own execution loop causing a mix of Angular and jQuery code to not seem to execute in a straightforward order.  For example, in the above code, we set the class of the H3 based on the current #8220;count#8221; variable.  What if we modified the updateCount function to try and set a css property for this class:/ppre class=crayon-plain-tag$scope.updateCount = function(value) { $scope.count = $scope.count + value; $('.' + $scope.myClass()).css('color', 'red'); }/prepIf you click the button you#8217;ll notice that the css color does NOT change to red! The problem is that Angular is executing the query function call BEFORE it actually updates the page.  You need to delay the jQuery so it executes after the current Angular event loop is finished.  If you change the code to:/ppre class=crayon-plain-tag$scope.updateCount = function(value) { $scope.count = $scope.count + value; setTimeout( function() { $('.' + $scope.myClass()).css('color', 'red'); }, 1); }/prepthen it will work.  The timeout value can be anything greater than zero.  It just needs to be something to take the jQuery execution outside the Angular loop. Now, that was a horrid example!  You would never actually manipulate the css and class properties like this in a real application.  But it was a simple way to demonstrate some of the possible pitfalls waiting to trap you when mixing jQuery with Angular./p h2Drupal Behaviors/h2 pWhen doing javascript the #8220;Drupal way#8221;, you typically create a behavior #8220;attach#8221; handler.  Drupal executes all of the behaviors when the page is updated, passing the context of what part of the page has changed.  For example, in an Ajax update, the DOM that was updated by Ajax is passed as the context to all attached behavior functions. Angular doesn#8217;t know anything about these behaviors.  When Angular updates something on the page, the behaviors are never called.  If you need something updated from a Drupal behavior, you need to call Drupal.attachBehaviors() directly./p h2Angular with CTools modals/h2 pIn the Open Atrium site map, we have buttons for adding a New Space or New Section.  These are links to the Open Atrium Wizard module which wraps the normal Drupal node/add form into a CTools modal popup and groups the fields into #8220;steps#8221; that can be shown within vertical tabs.  This is used to provide a simpler content creation wizard for new users who don#8217;t need to see the full node/all form, and yet still allows all modules that hook into this form via form_alters to work as expected. The tricky part of this is that as you navigate through the sitemap, Angular is updating the URLs of these #8220;New#8221; links.  But CTools creates a Drupal Ajax object for each link with the #8220;ctools-use-modal#8221; class in it#8217;s Drupal behavior javascript.  This causes the URL of the first link to be cached.  When Angular updates the page and changes the link URLs, this Ajax object cache is not updated. To solve this within the Open Atrium Sitemap app, an event is called when the page is updated, and we update the cached Ajax object directly via the Drupal.ajax array. This was a rather kludgy way to handle it.  Ultimately it would be better to create a true Angular #8220;Directive#8221; that encapsulates the CTools modal requirements in a way that is more reusable./p h2Summary/h2 pAngular can be a very useful framework for building highly interactive front-ends.  Using Drupal as the backend is relatively straight-forward.  Angular allowed us to create a very cool and intuitive interface for navigating and creating content quickly within Open Atrium far easier than it would have been in jQuery alone.  In fact, we began the interactive site map tool in jQuery and the code quickly became unmanageable.  Adding functionality such as drag/drop for rearranging your spaces and sections would have been a mess in jQuery.  In Angular it was very straight-forward. Once you understand how Angular works, you#8217;ll be able to blend the best of Drupal + jQuery + Angular into very rich interfaces.  a href= in Angular is very different/a.  Learn more about Angular on the a href= blog/a!/p Featured Case Studies: Doctors of BC

Mon, 11/10/2014 - 16:11
div class=field field-name-field-mainimage field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evenimg src= width=588 height=306 alt=Doctors of BC - Responsive //div/div/divdiv class=field field-name-field-link field-type-link-field field-label-abovediv class=field-labelCompleted Drupal site or project URL:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=http://doctorsofbc.ca class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpDoctors of BC was founded in 1900 as the British Columbia Medical Association, and has a long history of working for members, improving patient care, and influencing health care policy. As part of a rebranding process started in late 2012, Doctors of BC (formerly the British Columbia Medical Association), engaged Fuse to build a new Drupal based website in spring of 2014. The Doctors of BC had been running on Drupal 6 for years and the site served successfully as a key communications and transactional resource for Doctors of BC staff amp; members. However, with a new brand, a desire to better support mobile users and a need to replace an aging codebase it was time for a rebuild./p pThis was no ordinary corporate website project. The new Drupal 7 system was replacing not only an aging Drupal 6 site, but a legacy custom eCommerce system with sophisticated business logic, a complex permissions matrix and a host of integration points with internal systems. Oh... and it all needed to be a href= rel=nofollowresponsive/a./p pWe worked alongside Cossette Communications on the project (UX amp; Design) and were given a tight four month timeframe to build out the project./p pimg src=/files/member-frontpage-screenshot-dobc_0.jpg alt=Homepage //p /div/div/divdiv class=field field-name-field-module field-type-node-reference field-label-abovediv class=field-labelKey modules/theme/distribution used:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/sandbox/alyyas/2147649Commerce/a/divdiv class=field-item odda href=/project/panelsPanels/a/divdiv class=field-item evena href=/project/panelizerPanelizer/a/divdiv class=field-item odda href=/project/mediaMedia/a/divdiv class=field-item evena href=/project/featuresFeatures/a/divdiv class=field-item odda href=/project/feedsFeeds/a/divdiv class=field-item evena href=/project/menu_minipanelsMenu Minipanels/a/divdiv class=field-item odda href=/project/ckeditorCKEditor - WYSIWYG HTML editor/a/divdiv class=field-item evena href=/project/beanBean/a/divdiv class=field-item odda href=/project/breakpointsBreakpoints/a/divdiv class=field-item evena href=/project/picturePicture/a/divdiv class=field-item odda href=/project/manualcropManual Crop/a/divdiv class=field-item evena href=/project/menu_node_viewsMenu Node Views/a/divdiv class=field-item odda href=/project/migrateMigrate/a/divdiv class=field-item evena href=/project/migrate_d2dDrupal-to-Drupal data migration/a/divdiv class=field-item odda href=/project/flagFlag/a/divdiv class=field-item evena href=/project/flag_pageFlag Page/a/divdiv class=field-item odda href=/project/omegaOmega/a/div/div/div

Paul Rowell: Drupal images; why they suck and what you can do about it

Mon, 11/10/2014 - 16:06
div class=field field-name-field-image field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evenimg typeof=foaf:Image src= width=252 height=142 alt=Drupal sucks; images //div/div/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpIt's a well-known frustration that the core image management within Drupal isn't great (to put it mildly). Compared to CMS' such as wordpress it falls very short, there are however a few modules you can install and configure to help manage images better within your site. /p /div/div/div

Drupal core announcements: Drupal core updates for November 8, 2014

Sun, 11/09/2014 - 02:06
pemCo-authored by a href=, a href=, a href=, and a href= h2What's new with Drupal 8?/h2 h3DrupalCon Amsterdam and the Drupal 8 beta!/h3 pIt's been more than a month since the last Drupal Core Update, and so much has happened! Around 2300 people travelled to the historic city of Amsterdam, Netherlands for a href= Amsterdam/a, where after 5 days of sprinting, a href= 8.0 entered beta/a! a href= 3/a will be released on Wednesday, November 12./p pa href= src= alt=Drupal 8 contributors stand at the Amsterdam keynote //abr / emPhoto credit: Paul Johnson/em/p pBe sure to review the a href= beta changes policy/a to understand which core issues are still priorities for Drupal 8.0, and which will need to wait for Drupal 8.1 or Drupal 9./p h3Highly critical security fix released for Drupal 7 and 8/h3 pOn October 15th, a href=, a highly critcial security fix necessary for all Drupal 7 and 8 sites was revealed/a and a href= 7.32/a and a href= 8.0.0-beta2/a were released to address the issue. A week later, on October 29th, the Drupal security team issued a href= public service announcement/a warning of automated attacks against Drupal sites that haven't been patched for SA-CORE-2014-005./p pTo help website administrators choose the best possible path for dealing with affected Drupal sites, Bevan Rudge has developed a href= detailed flowchart/a of actions to take, specific to different scenarios. One tool that can be useful is a href=, a Drush command that can help detect some of the exploits. It is important to understand that some attacks may not leave any trace. If possible, restore your Drupal site from backup made before October 15, 2014./p pIn a href= Lesson In Security/a, Anthony Ferrara deconstructed the vulnerability and its resolution as well as Drupal Security Team's response. For some discussion of a href= Security Team/a's practices and the media response, check out Bryan Ruby's post: a href= Security: Not Shocking but Responsible/a./p h3D8 critical office hours with chx/h3 pCore contributor chx has started a a href= critical issue office hours/a on Fridays at 12:00p PST. If you are interested in really digging into a tough problem and helping resolve a stagnating release blocker, or if you are stuck on a critical currently, join a href= IRC channel/a during the office hours. See a href='s report of the first critical office hours/a for an idea of what we've done so far!/p h2Where's Drupal 8 at in terms of release?/h2 pDrupalCon Amsterdam and the beta release have brought lots of new momentum to the critical issue queue, with many issues both identified and resolved. Of the a href=;amp;status%5B%5D=13amp;amp;status%5B%5D=8amp;amp;status%5B%5D=14amp;amp;status%5B%5D=4amp;amp;priorities%5B%5D=400amp;amp;categories%5B%5D=1amp;amp;categories%5B%5D=2amp;amp;version%5B%5D=8.xamp;amp;issue_tags_op=%3D130 critical issues currently blocking Drupal 8's release/a, 1 in 3 are new since the initial beta release, and 58% have activity within the past two weeks!/p pa href= src= alt=Posted and fixed critical issues per week since August 31, 2014. //a/p h2Where can I help?/h2 h3Top criticals to hit this week/h3 pEach week, we check with core maintainers and contributors for the extra critical criticals that are blocking other work. These issues are often tough problems with a long history. If you're familiar with the problem-space of one of these issues and have the time to dig in, help drive it forward by reviewing, improving, and testing its patch, and by making sure the issue's summary is up to date and any API changes are documented with a a href= change record/a./p ul lia href= Entity view and form display configuration schemas are too verbose / key ones missing/a needs review. This issue will resolve bugs in the entity system's configuration schemas. Critical configuration schema issues affect Drupal's multiligual functionality and block a a href= ugprade path/a./li lia href= Remove HtmlFragment/HtmlPage/a is the next step to finalize Drupal's page rendering. This detailed issue builds on extensive discussions at DrupalCon Amsterdam and includes an extremely illuminating a href= of Drupal 8's render pipeline/a. The issue needs review and iteration to incorporate the latest feedback./li lia href= [meta] CMI path to release/a tracks the progress for completing the Configuration Management Initiative. Follow this issue to get involved with the most critical current blockers for the Configuration system./li liAs of this writing, there are a href=;status%5B%5D=1amp;status%5B%5D=13amp;status%5B%5D=8amp;status%5B%5D=14amp;status%5B%5D=15amp;status%5B%5D=4amp;priorities%5B%5D=400amp;categories%5B%5D=1amp;categories%5B%5D=2amp;version%5B%5D=8.xamp;issue_tags_op=%3Damp;issue_tags=Performance20 known critical performance issues/a in Drupal 8. Help make Drupal 8 fast!/li /ul h3More ways to help/h3 ul lia href= [META-20 theme functions left] Convert/refactor core theme functions/a is part of the home stretch for completing Drupal 8's theme layer with Twig. Pick a child issue and help improve themer experience!/li lia href= Ensure twig_debug output has needed sanitization/a is a critical issue to improve the security of a newly-added theme developer debugging tool. Help discuss the best solution for this issue or provide an initial proposal for a patch./li lia href= Contextual filters in view preview UI are not retained on preview navigation/a is the last bug that needs to be fixed before we can a href= the _current_path() function/a, which is part of cleaning up legacy code from before all of the routing system conversions./li liWant to keep an eye on what issues are blocking other issues in general? Keep an eye on the a;status%5B%5D=Openamp;categories%5B%5D=1amp;categories%5B%5D=2amp;version%5B%5D=8.0.x-devamp;issue_tags_op=%3Damp;issue_tags=blockergt;blocker issue tag/a. You can also add this tag to other issues you encounter that require other work to be postponed; if more people use the tag, then it will increase these issues' visibility./li /ul pAs always, if you're new to contributing to core, check out a href= contribution mentoring hours/a. Twice per week, you can log into IRC and helpful Drupal core mentors will get you set up with answers to any of your questions, plus provide some useful issues to work on./p pYou can also help by a href= independent Drupal core development/a. /p h2Notable Commits/h2 pSo much great work has gone into Drupal 8 in the past weeks that it's difficult to pick the best of codegit log --after=2014-09-18 --pretty=oneline/code (571 commits in total). The final beta blocker was resolved across several issues, as were many entity API, theme system, dependency management, usability, and accessibility improvements./p ul liIssue a href= by alexpott, larowlan: Fixed Allow field types, widgets, formatters to specify config dependencies./li liIssue a href= by fran seva, Gábor Hojtsy, martin107, markie, Schnitzel, alexpott, Sutharsan, mon_franco, YesCT, spearhead93, herom, Désiré: Fixed Language selectors are not showing localized to the page language./li liIssue a href= by amateescu: Move the field-specific settings form elements at the top of the form./li liIssue a href= by alexpott, larowlan, jhodgdon, mgifford: Delete forum data on uninstall./li liIssue a href= by plach, alexpott, dawehner: Allow code to respond to entity/field schema changes./li liIssue a href= by vegantriathlete, franxo, InternetDevels, thamas, rootwork, LewisNyman: Add typographic styles, components, and utility classes./li liIssue a href= by lauriii, mgbellaire, Cottser, m1r1k, Mark Carver, LinL, rachel_norfolk, rteijeiro, skwashd, davidhernandez, euphoric_mv: Make 'template' the default output option for hook_theme()./li liIssue a href= by benjy: Update Migrate maintainers in MAINTAINERS.txt./li liIssue a href= by DimitriV, mgifford | andrewmacpherson: Fixed CKEditor uses the automatically generated ID attribute for the body field in the ARIA label./li liIssue a href= by Michael Hodge Jr, ParisLiakos: Remove watchdog()./li liIssue a href= by alexpott, mdrummond, davidhernandez | Cottser: Add to core, set Classy as base theme for Bartik and Seven./li liIssue a href= by cilefen, dawehner, hussainweb, jibran, andyceo: Update to Symfony 2.5./li liIssue a href= by Berdir, Wim Leers: Fixed Don't invalidate cache tags of referenced entities, use entity list cache tags correctly, add test coverage for entity list cache tags./li liIssue a href= by rteijeiro, LewisNyman, lauriii, Wim Leers, mdrummond, swentel, hosef, cbiggins, larowlan, sun, EclipseGc, Gábor Hojtsy: Convert global menus (primary links, secondary links) into blocks./li liIssue a href= by pwolanin, larowlan, dawehner, tim.plunkett, effulgentsia, xjm, Wim Leers: Provide an API function to replace url()/l() for external urls./li liIssue a href= by yched, Jose Reyero, xjm, andypost, fago, msonnabaum, Berdir, dixon_: Use adapters for supporting typed data./li liIssue a href= by herom: Remove hook_permission()./li liIssue a href= by alexpott, dawehner, martin107, Cottser, sun: Fixed Themes cannot be uninstalled./li /ul h4Security fixes/h4 pNow that Drupal 8 is in beta, we're focusing on resolving disclosed security vulnerabilities in Drupal 8 so that site owners can safely build test sites. Here are the security fixes that have gone in over the past weeks:/p ul liIssue a href= by webflo, martin107, galooph, cilefen, gaurav.goyal, amitgoyal, dawehner, dstol: Fixed Address SA-CONTRIB-2013-035 for views in D8./li liIssue a href= by Stefan Horst, greggles, larowlan, David_Rothstein, klausi: Fixed SA-CORE-2014-005 (SQL injection)./li liIssue a href= by pwolanin, cilefen, Berdir, Devin Carlson, klausi: Fixed Port private files access bypass from SA-CORE-2014-003./li liIssue a href= by znerol, torotil, rszrama, larowlan, dawehner, penyaskito, tim.plunkett, sun, Damien Tournoud, David_Rothstein, effulgentsia: Fixed Port Form API security fix SA-CORE-2014-002 to Drupal 8./li liIssue a href= by cilefen, hussainweb, Xano, netlooker, martin107: Composer update (includes security fixes)./li liIssue a href= by klausi, benjy, fgm, hussainweb, Cottser, pfrenssen, kim.pepper | moshe weitzman: Fixed Missing access control for user base fields./li liIssue a href= by larowlan | fago: Fixed Missing default access for all comment fields./li /ul h2Drupal 8 Around the Interwebs/h2 ul liCathy Theys, Tim Erickson and Alina Mackenzie a href= looked at DrupalCon Amsterdam Sprints/a and upcoming sprints for you to attend./li liWim Leers explains the a href= 8 render pipeline/a (as mapped out in a href= liChris Doherty gives an update on a href= in Drupal 8/a, highlighting current progress with the Classy theme./li liFor a look at a first time sprinter's experience in contributing to Drupal 8, check out a href= for the first time/a by Adam Evertsson/li liMatt Korostoff a href= (and answers) 27 questions/a that came up during a Drupal 8 site build. Ever wondered why you can't disable modules in Drupal 8? Matt has the answer./li liIn part 5 of a href= to Build a Drupal 8 Module/a Daniel Sipos tells us about a href= 8 Hooks and the Symfony Event Dispatcher/a. /li liIn a series of short demos, Alex Pott shows us that a href= 8 Administration is Faster, Cheaper and Easier/a./li liAre you a front-end developer? Brian Wald wrote up a a href= guide about Drupal 8/a with you in mind./li liAndrea Prescetti slipped us a a href= 7 to Drupal 8 cheat sheet/a, for a quick reference about the differences in directory structure, APIs and configuration. Interested in just Entities, try Erik Stielstra's a href= 8 Entity cheat sheet/a instead./li limartijn gives an update on the the a href= state of ReST in Headless Drupal 8/a./li liAngie Byron answers all your burning questions In the 8th and final installment of a href= Ultimate Guide to Drupal 8/a. /li liBrian Lewis of a href= Unraveled/a talks to Scott Reeves and David Hernandez about the origin story of Consensus Banana and what it means for Drupal themers./li liMichael Anello looks at the big picture and a href= 8 Migrate in core/a./li liJonathan Brown explains how to a href= safe markup/a in Drupal 8 and avoid Twig auto-escape woes./li liIs your favorite contributed module ported to Drupal 8 yet? Adrian Rollett shows us how to a href= the readiness of the top 100 modules for Drupal 8/a./li /ul h2Drupal 8 in Real Life/h2 ul listrongNovember 8 - Lima/strong: Learn more about API changes and a href= port Examples for Developers module to Drupal 8/a./li listrongNovember 10 and 11/strong: Angela Byron, Jeffrey 'jam' McQuire, and Larry Garfield will be keynote speakers at the a href=[world] Conference/a in in Washington, D.C./li listrongNovember 20 - Kitchener:/strong Join Nik Alexandrov for an a href= to object-oriented programming for Drupal 8/a in Kitchener, Ontario./li listrongDecember 10 - 14 - Ghent/strong: The Drupal Association and Wunderkraut are sponsoring a a href= sprint in Ghent to help move core critical issues forward./a/li listrongJanuary 17 and 18/strong: a href= Global Sprint Weekend/a returns for the third year to unite small local sprints around the world. Find or add your sprint location or join online./li listrongFebruary 8 - 13 - Bogotá/strong: a href= Latin America in Bogotá/a is the next DrupalCon! Join the sprinters and a href= up for various sprints/a including Multilingual and emSign me up for anything/em./li /ul h2Whew! That's a wrap!/h2 pDo you follow a href= Planet/a with devotion, or keep a close eye on the a href= event calendar/a, or codegit pull origin 8.0.x/code every morning without fail before your coffee? We're looking for more contributors to help compile these posts. You could either take a few hours once every six weeks or so to put together a whole post, or help with one section more regularly. a href= more about how you can volunteer to help with these posts/a!/p

Bluespark Labs: BADCamp Drupal Higher Education Summit - Stories of rapid adaption and the challenges of standardization at scale

Sat, 11/08/2014 - 19:08
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even pAttending the Higher Education Summit at the 2014 Bay Area Drupal Camp was a great experience. a href= target=_blankWe work with several higher education institutions/a and are acutely aware of the very specific challenges these organizations face. The summit improved our understanding of the issues and helped them coalesce around a few key overarching concerns: standardization, adaption and scalability./p pThe a href= got off to a great start before even starting because of the theme selected: “Storytellers and Geeks United for Higher Ed”. A clear indication of the importance of not solving just technological issues but solving communication issues with the help of technology. Everyone was in agreement that web people and communication people need to get together to figure out how to best tell their university’s story./p pThe opening panel session was the perfect illustration of the theme as it brought together technologists and communications partners (with the roles often blending into each other) from the universities of Arizona State, University of California, Davis and University of California, San Francisco. The big news for all was Arizona State’s bold move to enforce (albeit with a light touch) standardization from the top down. Arizona State hasnbsp;embarked on a very ambitious project aiming to provide a complete set of tools for departments to build their websites that spans not just the actual web page but hosting, analytics, sophisticated email and CRM systems (institution-wide Salesforce instance). All this will ultimately enable them to realize theirnbsp;vision of personalizing the experience for every user of the University. While it is still early days everyone seemed very excited about what AS is attempting to do and we are eagerly awaiting news about lessons learned./p pA session by John Bickar of Stanford Web Services was inspiring and provided a great roadmap for any university about how to drive adoption of Drupal within the institution and support the needs of the communitynbsp;by providing both infrastructure and Drupal development tools in the form of pre-baked solutions and templates. As John indicated the forthcoming challenges for them will be those of success. They are seeing great adoption of their hosting solution and web development tools and need to ensure that they will be able to scale./p pFinally, I found the discussions around development processes, estimationnbsp;and the use of agile particularly interesting. It is clear that where such processes have been put in place it has yielded positive results. At a break-out session on the subject everyone agreed that while agile provides a great set of principlesnbsp;it is equally important that to adapt the practicesnbsp;to the specific needs of an organization. In other words don’t be afraid to try a few different things and see what works for you, but start getting a process in place!/p pOverall, it looks like the future of Drupal in Higher Education is brighter than ever. The problems are those of improving communication and dealing with thenbsp;success that widespread adoption brings. Helping to standardize around common practices in how Drupal is deployed and how individual departments adapt so that they can meet both wider University needs as well as their specific requirements will be key. This will allow the University as a whole and groups within it to each tell the best version of their story./p pMany thanks to everyone that worked hard to make this summit possible and we look forward to attending next year!/p /div/div/divdiv class=field field-name-field-blog-tags field-type-taxonomy-term-reference field-label-abovediv class=field-labelTags:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/blog/higher-educationHigher Education/a/divdiv class=field-item odda href=/blog/drupalDrupal/a/divdiv class=field-item evena href=/blog/drupal-planetDrupal Planet/a/div/div/div

Paul Booker: Sending Push Notifications to users with a given role using Private Messages

Sat, 11/08/2014 - 18:27
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpre class=brush: php /** * Implements hook_privatemsg_message_insert. */ function push_notifications_privatemsg_message_insert( $message ) { if ( variable_get( 'push_notifications_privatemsg_integration', 0 ) ) { // Compose the payload. If the body is empty, just use the subject line. // Otherwise, combine subject and body. $payload = (empty($message-body)) ? $message-subject : $message-subject . ' ' . $message-body; $payload = 'From ' . $message-author-name . ': ' . $payload; // Compose an array of recipients. $recipients = array(); foreach ( $message-recipients as $recipient ) { if ( $recipient-type == role $recipient-name != 'authenticated user' ) { $results = db_select('users_roles', 'ur') -fields('ur', array('uid')) -condition('ur.rid', $recipient-rid, '=') -execute() -fetchCol(); } elseif ( $recipient-type == role $recipient-name == 'authenticated user' ) { $results = db_select('users', 'u') -fields( 'u' ) -execute() -fetchCol(); } if ($recipient-type == role) { foreach ($results as $result) { $recipients[] = $result; } } else{ $recipients[] = $recipient-uid; } } push_notifications_send_message( $recipients, $payload ); } } /pre/div/div/divdiv class=field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfixh3 class=field-labelTags: /h3ul class=linksli class=taxonomy-term-reference-0a href=/drupal-developer/tags/push typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=push/a/lili class=taxonomy-term-reference-1a href=/drupal-developer/tags/notifications typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=notifications/a/lili class=taxonomy-term-reference-2a href=/drupal-developer/tags/privatemsg typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=privatemsg/a/lili class=taxonomy-term-reference-3a href=/drupal-developer/tags/drupalplanet typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=drupalplanet/a/li/ul/divdiv class=field field-name-field-url field-type-link-field field-label-abovediv class=field-labelURL:nbsp;/divdiv class=field-itemsdiv class=field-item evena href= Notification does not send Push when Private Message goes to Roles/a/div/div/divdiv class=easy_social_box clearfix horizontal easy_social_lang_und div class=easy_social-widget easy_social-widget-twitter firsta href= class=twitter-share-button data-url= data-count=horizontal data-lang = en data-via= data-related=:Check it out! data-text=Sending Push Notifications to users with a given role using Private MessagesTweet/a/div div class=easy_social-widget easy_social-widget-facebookiframe src=//;href=http%3A//;send=falseamp;layout=button_countamp;width=88amp;show_faces=trueamp;action=likeamp;colorscheme=lightamp;font=amp;height=21amp;appId= scrolling=no frameborder=0 style=border:none; overflow:hidden; width:88px; height:21px; allowTransparency=true/iframe/div div class=easy_social-widget easy_social-widget-googleplusdiv class=g-plusone data-size=medium data-annotation=bubble data-href= div class=easy_social-widget easy_social-widget-linkedin lastscript type=in/share data-url= data-counter=right/script/div /div !-- /.easy_social_box --

Entity Pilot: The Entity Pilot exists plugin - dealing with conflicts

Sat, 11/08/2014 - 05:06
div class=field field-name-field-teaser field-type-text-long field-label-hiddendiv class=field-itemsdiv class=field-item evenpAny content-staging workflow is going to have conflicts. In the simplest form a conflict exists when trying to import content that already exists. In more complex cases conflict might occur between revisions./p pHaving a solid API to detect and handle conflicts is key to any content-staging workflow. Read on to find out how Entity Pilot handles conflicts via an extendable plugin system./p /div/div/div

Entity Pilot: Working with normalizers in Drupal 8

Sat, 11/08/2014 - 05:06
div class=field field-name-field-teaser field-type-text-long field-label-hiddendiv class=field-itemsdiv class=field-item evenpEntity Pilot makes extensive use of normalizers for handling dereferencing incoming content./p pNormalizers are a key part of Drupal 8's serialization strategies and represent a flexible extension point for your module to interact with core APIs./p pRead on to learn how your code can interact with Drupal's normalizing and denormalizing operations and influence what is output by the REST and Hal modules./p /div/div/div

Entity Pilot: Introducing Entity Pilot - Painless content staging for Drupal

Sat, 11/08/2014 - 05:06
div class=field field-name-field-teaser field-type-text-long field-label-hiddendiv class=field-itemsdiv class=field-item evenpAfter nine months of development, we're proud to announce Entity Pilot, a painless content-staging solution for Drupal./p pOffering a flexible content deployment model that adapts your preferred workflow, Entity Pilot aims to solve deploying content once and for all. /ppRead on for details on how it works and our plans for future development./p /div/div/div

Paul Booker: Updating push notification page to send out messages to devices belonging to users with a given role

Sat, 11/08/2014 - 01:49
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpre class=brush: php /** * Additional handler for push_notifications_mass_push_form_validate form validate. */ function mymodule_push_notifications_mass_push_form_validate($form, $form_state) { } /** * Additional handler for push_notifications_mass_push_form_submit form submit. */ function mymodule_push_notifications_mass_push_form_submit($form, $form_state) { $recipients = $form_state['values']['recipients']; $payload = $form_state['values']['payload']; $role = $form_state['values']['role']; $language = (isset($form_state['values']['language'])) ? $form_state['values']['language'] : false; // Send message to all iOS recipients. if (!empty($recipients['ios'])) { // Get all iOS recipients. $tokens_ios = push_notifications_get_tokens_by_role(PUSH_NOTIFICATIONS_TYPE_ID_IOS, $role, $language); if (!empty($tokens_ios)) { // Convert the payload into the correct format for APNS. $payload_apns = array('aps' = $payload); $result = push_notifications_apns_send_message($tokens_ios, $payload_apns); $dsm_type = ($result['success']) ? 'status' : 'error'; drupal_set_message($result['message'], $dsm_type); } else { drupal_set_message(t('No iOS recipients found, potentially for this language.')); } } // Send message to all Android recipients. if (!empty($recipients['android'])) { // Get all Android recipients. $tokens_android = push_notifications_get_tokens_by_role(PUSH_NOTIFICATIONS_TYPE_ID_ANDROID, $role, $language); if (!empty($tokens_android)) { // Determine which method to use for Google push notifications. switch (PUSH_NOTIFICATIONS_GOOGLE_TYPE) { case PUSH_NOTIFICATIONS_GOOGLE_TYPE_C2DM: $result = push_notifications_c2dm_send_message($tokens_android, $payload); break; case PUSH_NOTIFICATIONS_GOOGLE_TYPE_GCM: $result = push_notifications_gcm_send_message($tokens_android, $payload); break; } $dsm_type = ($result['success']) ? 'status' : 'error'; drupal_set_message($result['message'], $dsm_type); } else { drupal_set_message(t('No Android recipients found, potentially for this language.')); } } } /** * Determine all recipients of a given role from a specific device type. * * @param $type_id * Device Type ID. * @param $role * User Role. * @param $language * Language code, optional. * @param $raw * Boolean, set true to retrieve the raw query results. * * @return * Array of results, null if no entries. */ function push_notifications_get_tokens_by_role($type_id = '', $role = FALSE, $language = FALSE, $raw = FALSE) { // Make sure this type_id is supported. $valid_type_ids = array(PUSH_NOTIFICATIONS_TYPE_ID_IOS, PUSH_NOTIFICATIONS_TYPE_ID_ANDROID); if (!in_array($type_id, $valid_type_ids)) { return FALSE; } // Select all tokens for this type id and users of given user role. $query = db_select('push_notifications_tokens', 'pnt'); $query-join('users', 'u', 'pnt.uid = u.uid'); $query-join('users_roles', 'ur', 'u.uid = ur.uid'); $query-fields('pnt', array('token')); $query-condition('pnt.type', $type_id); $query-condition('ur.rid', $role); // If language code is passed, limit the results by language. if ($language) { $query-condition('pnt.language', $language); } $result = $query-execute(); // Return raw result, if needed. if ($raw) { return $result; } // Otherwise, create an array of tokens. else { $tokens = array(); foreach ($result as $record) { $tokens[] = $record-token; } return $tokens; } } /** * Implements hook_form_alter(). */ function mymodule_form_alter($form, $form_state, $form_id) { if ($form_id == 'push_notifications_mass_push_form') { $result = db_select('role', 'r') -fields('r',array('rid','name')) -condition('name',array('administrator','anonymous user'),'NOT IN') -execute() -fetchAll(); $role = array(); foreach($result as $role){ $roles[$role-rid] = $role-name; } $form['role']['#title'] = Roles; $form['role']['#type'] = select; $form['role']['#options'] = $roles; $form['role']['#required'] = 1; $form['#validate'][] = 'mymodule_push_notifications_mass_push_form_validate'; unset($form['#submit']); $form['#submit'][] = 'mymodule_push_notifications_mass_push_form_submit'; } } /pre/div/div/divdiv class=field field-name-field-tags field-type-taxonomy-term-reference field-label-above clearfixh3 class=field-labelTags: /h3ul class=linksli class=taxonomy-term-reference-0a href=/drupal-developer/tags/services typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=services/a/lili class=taxonomy-term-reference-1a href=/drupal-developer/tags/push typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=push/a/lili class=taxonomy-term-reference-2a href=/drupal-developer/tags/notifications typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=notifications/a/lili class=taxonomy-term-reference-3a href=/drupal-developer/tags/drupalplanet typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=drupalplanet/a/li/ul/divdiv class=easy_social_box clearfix horizontal easy_social_lang_und div class=easy_social-widget easy_social-widget-twitter firsta href= class=twitter-share-button data-url= data-count=horizontal data-lang = en data-via= data-related=:Check it out! data-text=Updating push notification page to send out messages to devices belonging to users with a given roleTweet/a/div div class=easy_social-widget easy_social-widget-facebookiframe src=//;href=http%3A//;send=falseamp;layout=button_countamp;width=88amp;show_faces=trueamp;action=likeamp;colorscheme=lightamp;font=amp;height=21amp;appId= scrolling=no frameborder=0 style=border:none; overflow:hidden; width:88px; height:21px; allowTransparency=true/iframe/div div class=easy_social-widget easy_social-widget-googleplusdiv class=g-plusone data-size=medium data-annotation=bubble data-href= div class=easy_social-widget easy_social-widget-linkedin lastscript type=in/share data-url= data-counter=right/script/div /div !-- /.easy_social_box --

Code Karate: How to setup a Drupal website with Bluehost

Fri, 11/07/2014 - 23:57
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpSo let me guess: You either have a Drupal website or are going to create one and need a place to /p/div/div/div

ImageX Media: Speeding up your MySQL dump/restores with Mydumper

Fri, 11/07/2014 - 23:39
div class=field field-name-body field-type-text-with-summary h2Why Mydumper?/h2 p How many times in your last web development project have you had to load a mysql/mariadb database? If your answer was too many, and you've been frustrated by how slow the process can be, this article may be for you. /p /div

Appnovation Technologies: How to Use Drupal REST Services with AngularJs

Fri, 11/07/2014 - 23:20
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encoded p dir=ltrspanIn a previous post I showed how to use /spana href= 8 RESTful services/span/aspan./span/p/div/div/divdiv class=field field-name-field-blog-header-image field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evena href=/blog/how-use-drupal-rest-services-angularjsimg typeof=foaf:Image src= width=680 height=200 alt= //a/div/div/divdiv class=sharethis-buttonsdiv class=sharethis-wrapperspan st_url= st_title=How to Use Drupal REST Services with AngularJs class=st_facebook/span span st_url= st_title=How to Use Drupal REST Services with AngularJs class=st_twitter/span span st_url= st_title=How to Use Drupal REST Services with AngularJs class=st_sharethis/span script type='text/javascript'var switchTo5x = false;/scriptscript type='text/javascript' src=''/scriptscript type='text/javascript'stLight.options({publisher:dr-75626d0b-d9b4-2fdb-6d29-1a20f61d683});/script/div/div

Mediacurrent: Why Drupal is the Right Fit for Higher Ed

Fri, 11/07/2014 - 21:35
img typeof=foaf:Image src= width=200 height=152 alt=Why Drupal is the Right Fit for Higher Ed title=Why Drupal is the Right Fit for Higher Ed / pAfter speaking to dozens of higher ed institutions over the last several years, I’m convinced now more than ever that open source technology, particularly Drupal, is the best fit for these organizations. I know I’m echoing what many in the Drupal community have observed for a while, but I’d like to describe why Drupal makes so much sense for higher ed./p

CMS Quick Start: Publishing Drupal 7 Content to Social Media: Part 1

Fri, 11/07/2014 - 20:55
!-- google_ad_section_start --pnbsp;Streamlined workflows are important for sites of any size. Today it is very common to update your readers via multiple social sites, namely Twitter and Facebook. However, it can be tedious sometimes to update your site, then update Facebook and Twitter separately with the correct links (especially if you publish a lot of content). In this series we are going to explore different ways of pushing content to your social media platforms automatically./p!-- google_ad_section_end --div class=og_rss_groups/divpa href= target=_blankread more/a/p

Deeson: Using PhpStorm's Live Templates for t functions

Fri, 11/07/2014 - 18:00
pAt Deeson's a href= is our IDE of choice. Working with PhpStorm's strongLive Templates/strong can save you some valueable time. In this post I'll show you how to use Live Templates to surround strings in simple a href= functions/strong/a in template files./p h4Live templates/h4 pPhpStorm’s Live Templates are chunks of code which can be quickly inserted into a file. Surround Live Templates allow you to select a piece of text and surround it with template./p h4Drupal's t function/h4 pIt's Drupal best practice to wrap all strings in a a href= function/a - this allow the sting to be translated. In a template file this looks like:/p plt;spangt;lt;?php print t('This is good Practice'); ?gt;lt;/spangt;/p pOn most sites there will be hundreds of these strings, so anything that can shave off time will be worthwhile./p h4Take a look/h4 pHere’s an example of Surround Live Templates in action. It’s quick and easy to surround a string with a simple a href= function/a./p h2 class=element-invisible oembed-titlea href= Live Templates and T function/a/h2 p/p h4Shortcuts/h4 pTo show the Surround Live Template list on Macs use strongCmd+Alt+J /strongand if you are on a Windows machine use strongCtrl+Alt+J/strong./p h4Setting up Live Templates/h4 pTo set up a Surround Live Template, go to strongPreferences/strong gt; strongLive Templates /strongand click the strongplus symbol/strong in the top right of the window./p pA Surround Live Template needs to have ‘strong$SELECTION$’/strong in it, which is replaced with the selected text. The template also need to be available in the correct contexts./p h4Here's one I prepared earlier.../h4 img src= width=400 height=295 alt=PHPStorm templates title=PHPStorm templates / p/p h4 dir=ltrHave a go/h4 p dir=ltrTo set up this T string Surround Live Template, the template text needs to be:/p p dir=ltrstronglt;?php print t('$SELECTION$'); ?gt;/strong/p p dir=ltrIt needs to be applicable in the ‘HTML’ context./p p dir=ltrThat’s it! You should now be able to use the template. Let us know if you've got any PhpStorm tips too./p frontpage posts for the Drupal planet: Drupal 7.33 released

Fri, 11/07/2014 - 16:37
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenp style=position: inherit;Drupal 7.33, a maintenance release with numerous bug fixes (no security fixes) is now available for download. See the a href= 7.33 release notes/a for a full listing./p div style=float: right; margin: 0 0 1em 1em; text-align: center; a href= class=link-button style=margin: 0 0 0.6em 0;spanDownload Drupal 7.33/span/a/div p style=position: inherit;stronga href=/upgrade/Upgrading/a your existing Drupal 7 sites is recommended./strong There are no major new features in this release. For more information about the Drupal 7.x release series, consult the a href= 7.0 release announcement/a./p !--break--div style=float: right; padding: 0 0 2em 1em; margin-left: 2em; width: 35%; border-left: 1px solid #cdcdcd; h2Security information/h2 pWe have a a href=/securitysecurity announcement mailing list and a history of all security advisories/a, as well as an a href=/security/rss.xmlRSS feed with the most recent security advisories/a. We strongstrongly advise Drupal administrators to a href=/securitysign up/a/strong for the list./p pDrupal 7 includes the built-in Update Manager module, which informs you about important updates to your modules and themes./p pThere are no security fixes in this release of Drupal core./p h2Bug reports/h2 pDrupal 7.x is being maintained, so given enough a href=[]=8amp;categories[]=1bug fixes/a (not just a href=[]=1amp;categories[]=1bug reports/a), more maintenance releases will be made available, according to our a href= release cycle/a. /p/div h2Changelog/h2 pDrupal 7.33 contains bug fixes and small API/feature improvements only. The full list of changes between the 7.32 and 7.33 releases can be found by reading the a href= release notes/a. A complete list of all bug fixes in the stable 7.x branch can be found in a href= git commit log/a./p h2Update notes/h2 pSee the a href= release notes/a for details on important changes in this release./p h2Known issues /h2 pNone./p /div/div/divdiv class=field field-name-taxonomy-vocabulary-34 field-type-taxonomy-term-reference field-label-abovediv class=field-labelFront page news:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/taxonomy/term/903Planet Drupal/a/div/div/divdiv class=field field-name-taxonomy-vocabulary-5 field-type-taxonomy-term-reference field-label-abovediv class=field-labelDrupal version:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/taxonomy/term/120Drupal 7.x/a/div/div/div