Planet Drupal

Syndicate content
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 55 min 52 sec ago

Aten Design Group: How to Easily Create Drupal Webforms in Code

Wed, 01/07/2015 - 16:10
img src=http://atendesigngroup.com/sites/default/files/drupal-configuration_0.png width=1000 height=600 alt= /pDrupal webforms are useful in a variety of contexts, but the most typical context is something like a contact form: user-facing functionality that needs to exist when a site launches, and be easily edited by a site owner post-launch. In that context, webforms should be created automatically for a smooth, predictable launch. There are a few ways you can do that, including the a href=https://www.drupal.org/project/webform_featuresWebform Features module/a, the a href=https://www.drupal.org/project/uuidUniversally Unique IDentifier (UUID) module/a or custom code, maybe following a href=https://www.drupal.org/node/2030697documentation on Drupal.org/a./p pWhen making webforms on a recent site, none of these options appealed to me. I wanted to manage webforms in code pre-launch, then hand them to a content editor to manage (outside code) post-launch. The Features-based options for creating webforms were okay pre-launch, but would add overhead post-launch. And creating a webform node from scratch seemed overly complicated to manage pre-launch. So I wrote the interface I wanted for creating and managing Drupal webforms, and it's now in the a href=https://www.drupal.org/project/cincConfig in Code (CINC) module/a for anyone to use./p pHere's the example linked above from Drupal.org, implemented in this new CINC-based approach:/p div class=geshifilterpre class=geshifilter-phpspan style=color: #0000ff;$webform/span = CINC::span style=color: #006600;init/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'Webform'/spanspan style=color: #66cc66;#41;/span-gt;span style=color: #006600;machine_name/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'Contact Us'/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #0000ff;$components/span = a href=http://www.php.net/arrayspan style=color: #000066;array/span/aspan style=color: #66cc66;#40;/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #0000ff;$components/spanspan style=color: #66cc66;#91;/spanspan style=color: #66cc66;#93;/span = CINC::span style=color: #006600;init/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'WebformComponent'/spanspan style=color: #66cc66;#41;/span-gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'form_key'/span, span style=color: #ff0000;'gender'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'type'/span, span style=color: #ff0000;'select'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'mandatory'/span, span style=color: #cc66cc;1/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'extra.items'/span, span style=color: #ff0000;quot;Mrs|Mrsspan style=color: #000099; font-weight: bold;\n/spanMiss|Missspan style=color: #000099; font-weight: bold;\n/spanMr|Mrquot;/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'extra.aslist'/span, span style=color: #cc66cc;1/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #0000ff;$components/spanspan style=color: #66cc66;#91;/spanspan style=color: #66cc66;#93;/span = CINC::span style=color: #006600;init/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'WebformComponent'/spanspan style=color: #66cc66;#41;/span-gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'form_key'/span, span style=color: #ff0000;'name'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'name'/span, span style=color: #ff0000;'Last name'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'mandatory'/span, span style=color: #cc66cc;1/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #0000ff;$components/spanspan style=color: #66cc66;#91;/spanspan style=color: #66cc66;#93;/span = CINC::span style=color: #006600;init/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'WebformComponent'/spanspan style=color: #66cc66;#41;/span-gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'form_key'/span, span style=color: #ff0000;'first_name'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'mandatory'/span, span style=color: #cc66cc;1/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #0000ff;$components/spanspan style=color: #66cc66;#91;/spanspan style=color: #66cc66;#93;/span = CINC::span style=color: #006600;init/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'WebformComponent'/spanspan style=color: #66cc66;#41;/span-gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'form_key'/span, span style=color: #ff0000;'city'/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #0000ff;$components/spanspan style=color: #66cc66;#91;/spanspan style=color: #66cc66;#93;/span = CINC::span style=color: #006600;init/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'WebformComponent'/spanspan style=color: #66cc66;#41;/span-gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'form_key'/span, span style=color: #ff0000;'country'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'type'/span, span style=color: #ff0000;'select'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'extra.options_source'/span, span style=color: #ff0000;'countries'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'extra.aslist'/span, span style=color: #cc66cc;1/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #0000ff;$components/spanspan style=color: #66cc66;#91;/spanspan style=color: #66cc66;#93;/span = CINC::span style=color: #006600;init/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'WebformComponent'/spanspan style=color: #66cc66;#41;/span-gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'form_key'/span, span style=color: #ff0000;'email_address'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'type'/span, span style=color: #ff0000;'email'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'mandatory'/span, span style=color: #cc66cc;1/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #0000ff;$components/spanspan style=color: #66cc66;#91;/spanspan style=color: #66cc66;#93;/span = CINC::span style=color: #006600;init/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'WebformComponent'/spanspan style=color: #66cc66;#41;/span-gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'form_key'/span, span style=color: #ff0000;'subject'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'type'/span, span style=color: #ff0000;'select'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'extra.items'/span, span style=color: #ff0000;quot;s1|Subject 1span style=color: #000099; font-weight: bold;\n/spanother|Otherquot;/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'extra.aslist'/span, span style=color: #cc66cc;1/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'mandatory'/span, span style=color: #cc66cc;1/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #0000ff;$components/spanspan style=color: #66cc66;#91;/spanspan style=color: #66cc66;#93;/span = CINC::span style=color: #006600;init/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'WebformComponent'/spanspan style=color: #66cc66;#41;/span-gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'form_key'/span, span style=color: #ff0000;'message'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'type'/span, span style=color: #ff0000;'textarea'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'mandatory'/span, span style=color: #cc66cc;1/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #0000ff;$components/spanspan style=color: #66cc66;#91;/spanspan style=color: #66cc66;#93;/span = CINC::span style=color: #006600;init/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'WebformComponent'/spanspan style=color: #66cc66;#41;/span-gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'form_key'/span, span style=color: #ff0000;'mandatory_fields'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'type'/span, span style=color: #ff0000;'markup'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'value'/span, span style=color: #ff0000;'lt;pgt;Fields with * are mandatorylt;/pgt;'/spanspan style=color: #66cc66;#41;/span -gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'extra.format'/span, span style=color: #ff0000;'full_html'/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #b1b100;foreach/span span style=color: #66cc66;#40;/spanspan style=color: #0000ff;$components/span span style=color: #b1b100;as/span span style=color: #0000ff;$index/span =gt; span style=color: #0000ff;$component/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#123;/span span style=color: #0000ff;$webform/span-gt;span style=color: #006600;add_component/spanspan style=color: #66cc66;#40;/span span style=color: #0000ff;$component/span-gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'weight'/span, span style=color: #0000ff;$index/span * span style=color: #cc66cc;5/spanspan style=color: #66cc66;#41;/span-gt;span style=color: #006600;set/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'extra.title_display'/span, span style=color: #ff0000;'inline'/spanspan style=color: #66cc66;#41;/span span style=color: #66cc66;#41;/span; span style=color: #66cc66;#125;/span nbsp; span style=color: #0000ff;$webform/span-gt;span style=color: #006600;add_email/spanspan style=color: #66cc66;#40;/spanspan style=color: #ff0000;'somebody@example.tld'/spanspan style=color: #66cc66;#41;/span; nbsp; span style=color: #0000ff;$webform/span-gt;span style=color: #006600;create/spanspan style=color: #66cc66;#40;/spanspan style=color: #66cc66;#41;/span;/pre/div pThe line count on that (52) is less than a third of the non-CINC example on Drupal.org (170), and did not require any time clicking around in a browser to create and export the webform. The code is also far more readable than both a Features export and starting from scratch, which makes it more maintainable. You may look at that city component and think I left something out, but that's really the entire code needed for a textfield with a name matching its form_key. Sensible defaults are nice./p pAs an added bonus, the CINC interface can also be used to read, update, and delete existing webforms. So if you need your Drupal webforms in code and Features isn't the best option for some reason, I invite you to enjoy the ease of creating webforms programmatically with CINC./p

Jonathan Brown: Using HD Bitcoin wallets with Drupal Coin Tools

Wed, 01/07/2015 - 14:10
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpiPreviously: a href=http://jonathanpatrick.me/blog/bip70-pki-drupalDrupal / Bitcoin BIP 70 / PKI certificates /a/i/p pEach a href=https://www.drupal.org/project/cointools target=_blankCoin Tools/a payment needs its own Bitcoin address. This is necessary so that it is clear whether or not the payment has been completed. It is also important for preserving anonymity./p pIn order to participate in the Bitcoin network, a a href=http://drupal.com/ target=_blankDrupal/a website must talk to a Bitcoin node. Currently Coin Tools utilises the reference implementation, a href=https://bitcoin.org/en/download target=_blankbitcoind/a./p pbitcoind has wallet functionality built in. In fact, it was originally released as a desktop wallet for Microsoft Windows. By default, bitcoind will pre-generate a pool of 100 pairs of addresses and corresponding private keys. This pool will be increased as necessary./p pThis presents a number of problems. If data-loss were to occur on the server, the private keys could be unrecoverable and therefore the funds stored on the addresses would be unspendable. If a hacker gains access to the server they could copy the keys and steal the funds. The private keys can be encrypted, but the password is exposed on the server when generating new keys and spending funds./p pTo solve these problems, key pairs could be pre-generated in a secure environment and then the public addresses uploaded to the server./p pLogistically this is challenging. A much more robust solution to this problem is to use Hierarchical Deterministic Wallets as described in a href=https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki target=_blankBIP 32/a (with draft extensions in BIPs a href=https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki target=_blank43/a, a href=https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki target=_blank44/a amp; a href=https://github.com/bitcoin/bips/blob/master/bip-0045.mediawiki target=_blank45/a)./p pHD wallets are composed of a tree of pairs of bextended/b public (xpub) and bextended/b private (xprv) keys derived from a single seed or mnemonic sentence. An xprv can generate its child xpubs and child xprvs. An xpub can only generate its child xpubs. Any bextended/b key can be converted into it's bnon-extended/b variant that cannot generate children./p pA bnon-extended/b public key can be converted into a payment address. A bnon-extended/b private key can be used to spend funds that are held on the payment address it is associated with./p pAn example bextended/b public key is:br /codexpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8/code/p pAn example bextended/b private key is:br /codexprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi/code/p pExtended key pairs are also considered to be either bhardened/b or bnon-hardened/b. One of the properties of bextended/b keys is that if an attacker knows a bnon-hardened/b private key and the parent xpub, they are able to determine the parent xprv./p pIn situations where private keys are to be distributed, for example within a company, bhardened/b derivation must be used to prevent other private keys at the same level from being determined./p pA further property of bextended/b keys is that xpubs are not capable of generating bhardened/b child public keys at all. This is fine because in an untrusted environment (with only a bnon-hardened/b xpub) no private keys will be present./p pPayment addresses in an HD wallet can be considered to be either binternal/b or bexternal/b. bExternal/b addresses are used when funds are being paid into an account from outside the wallet. bInternal/b addresses are used as a href=https://bitcoin.stackexchange.com/questions/1629/why-does-bitcoin-send-the-change-to-a-different-address target=_blankchange addresses/a./p pThe default wallet layout is shown below:/p pimg src=http://jonathanpatrick.me/bip32-images/derivation.png width=764 height=467 style=width: 100%; //p pHD wallets have many use-cases and BIP 32 identifies a href=https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#use-cases target=_blankseveral/a./p pUnsecure money receiver is the use-case to solve the problem described in this blog post./p pThe idea is to maintain an HD wallet in a secure environment. An account would be created in this wallet for the purpose of receiving payments in a specific Coin Tools payment type. The xpub for bexternal/b addresses from this account would then be exported and added to the configuration of the payment type within Drupal./p pDespite the obvious complexity of HD wallets, the concept of creating an account for a specific person, organisation or reason and exporting the xpub is actually very simple. The key point is that only one authority should be making payments into an specific xpub, otherwise addresses would be used multiple times. Scanning for unused addresses would not be an effective strategy to prevent this. a href=https://bitcoin.stackexchange.com/questions/20701/what-is-a-stealth-address target=_blankStealth addresses/a could become a solution for allocation of payment addresses without an authority./p pCoin Tools can interrogate the provided xpub. The results of this process will be displayed, including the first four addresses that can be generated from the xpub and the brelative/b path of the next address Coin Tools will generate:/p pimg src=http://jonathanpatrick.me/bip32-images/xpub-ui.png width=1155 height=1187 style=width: 640px; //p pEvery key pair in the wallet has a path specifying the indexes at each level in the hierarchy, for example M/44'/0'/0'/0/3. bAbsolute/b paths have either an m or M as their first component. bRelative/b paths have an index as their first component. In the example above we can see that the xpub has a depth of 3, so brelative/b paths start with describing the index at depth 4./p pA b'/b or bsubH/sub/b character after an index in the path indicates that the index is actually i+2sup31/sup. This means that keys at this level have bhardened/b derivation./p pAccording to a href=https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki target=_blankBIP 43/a (draft), the index at level 1 should be the bhardened/b index of the BIP that describes the layout of the hierarchy beneath it. In the example above it is 44, meaning that it is using the layout from a href=https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki target=_blankBIP 44/a instead of the default one from a href=https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki target=_blankBIP 32/a./p pDespite the fact that many wallets are now HD, support for exporting account xpubs is currently quite low. However, some HD wallets that do not allow xpubs to be exported for regular accounts will allow xpubs to be exported from a href=http://bitcoinmagazine.com/11108/multisig-future-bitcoin/ target=_blankmultisig/a accounts, for example a href=https://coinkite.com/ target=_blankCoinkite/a. In the future Coin Tools will support generation of addresses from multisig xpubs./p pThe only wallets that I know of that will export an xpub from a non-multisig account are a href=https://play.google.com/store/apps/details?id=com.bonsai.wallet32 target=_blankWallet32/a and a href=https://electrum.org/ target=_blankElectrum/a./p pBoth these wallets export xpubs that allow derivation of both the bexternal/b (0/i) and binternal/b (1/i) addresses. This is useful for watching an account balance but means that an entity making the payments into the account has greater ability to spy on subsequent transactions than would otherwise be possible. Coin Tools is currently hard coded to use the relative path 0/i. This will need to be made configurable as Coinkite xpubs do not need any prefix on the index./p pIt is essential that the addresses generated by Coin Tools match those generated by the wallet otherwise the account will not receive the payments. The xpub in the previous screenshot was exported from a Wallet32 account. In the following screenshot we can see that the addresses displayed in Wallet32 are the same as those generated by Coin Tools:/p pimg src=http://jonathanpatrick.me/bip32-images/wallet32.png width=270 height=244 //p pIn theory when an xpub is imported the addresses should be scanned to make sure the xpub has not been used before. However, bitcoind does not maintain the correct indexes to be able to quickly list transactions for arbitrary addresses. When Coin Tools needs to receive a payment on an address from an xpub, it adds it as a watch-only address using the importaddress bitcoind command. The rescan parameter is set to false which means that transactions that happened before the address was added are not detectable. If this parameter is set to true it can take many minutes even on an SSD to import each address./p pCoin Tools uses the Drupal a href=https://www.drupal.org/node/1787278 target=_blankState API/a to maintain the next index for each xpub. If there are more unreceived payments in a row than the a href=https://electrum.org/faq.html#gap-limit target=_blankgap limit/a of the wallet software, the wallet will loose track of later payments. To avoid this happening, payments that expire should maybe have their addresses put in a pool for re-use. However this may cause a problem if someone records the payment address and then satisfies the payment at a later time after it has expired./p pOf course, if a hacker gained access to the web server they could change an xpub to their own. This would mean that until the problem was detected and the service shut down the hacker would be receiving the funds instead of the intended recipient. While damaging, this would be nowhere near as bad as the total loss of a hot wallet./p pIn order to facilitate handling of HD wallets, Coin Tools was converted to use the a href=https://github.com/Bit-Wasp/bitcoin-lib-php target=_blankBitWasp PHP Bitcoin library/a instead of a href=https://github.com/mikegogulski/bitcoin-php target=_blankGogulski/a./p /div/div/div

Kristian Polso: Integrating Twitter feed to your Drupal site

Wed, 01/07/2015 - 08:00
Twitter API can be a major PITA sometimes, but luckily there are modules for Drupal that makes integrating it to your website easy.

Drupal core announcements: Drupal core critical issues sprint in Princeton, Jan. 29 to Feb. 1

Wed, 01/07/2015 - 04:24
div class=field field-type-datestamp field-field-start7 div class=field-items div class=field-item odd div class=field-label-inline-first Start:nbsp;/div span class=date-display-start2015-01-29 (All day)/spanspan class=date-display-separator - /spanspan class=date-display-end2015-02-01 (All day) America/New_York/span /div /div /div div class=field field-type-text field-field-event-type div class=field-items div class=field-item odd Sprint /div /div /div div class=field field-type-userreference field-field-organizers div class=field-labelOrganizers:nbsp;/div div class=field-items div class=field-item odd a href=/user/729 title=View user profile.pwolanin/a /div div class=field-item even a href=/user/19797 title=View user profile.davidhernandez/a /div /div /div pTimed to coincide with the 4th a href=https://www.drupalcampnj.org/DrupalCamp NJ/a and focusing on issues that were not addressed at the recent sprint in a href=https://groups.drupal.org/node/453798Ghent, Belgium/a./p pThe focus of this sprint will be resolving critical issues around menu, menu link, and routing issues in Drupal 8./p pstrongDates:/strong Wednesday, January 29 through Sunday, February 1br / strongLocation:/strong Princeton University in Princeton, NJ. (See the a href=https://www.drupalcampnj.org/directions-and-parking-informationcamp website/a for details.)br / strongTravel:/strong From Newark Airport (EWR), a good option is the a href=http://www.njtransit.com/sf/sf_servlet.srv?hdnPageAction=TrainSchedulesFromamp;selOrigin=37953_NECamp;selDestination=125_NECamp;OriginDescription=Newark+Airportamp;DestDescription=Princeton+Junctionamp;datepicker=01/28/2015Newark Airport to Princeton Junction train/a./p pConfirmed attendees for this area of focus include pwolanin, dawehner, kgoel, and mpdonadio. Additional attendees may include xjm, Wim Leers, effulgentsia, and beejeebus./p pMost of the travel expenses for attendees to work on menu, menu link, and routing issues are being paid for by a grant from the new Drupal Association a href=https://assoc.drupal.org/d8accelerateDrupal 8 Accelerate/a program./p pAdditionally, local participants plan to work on core issues related to finishing the Classy theme in core so that the base Stark theme lives up to its name and serves as a true blank slate of HTML./p pWe only have limited additional space available, so please contact a href=https://www.drupal.org/user/49851/contactpwolanin/a if you'd like to participate in the sprint. Everyone is welcome attend the camp (while tickets last!) and the Drupal mentoring and collaboration day on Feb 1./p pMany of the expected attendees participated in person or remote at this past summer's a href=http://jerseyshoredrupal.github.io/Drupal 8 at the Jersey Shore/a sprint./p pimg src=/files/jerseyshore-gallery1.jpg //p table id=attachments class=sticky-enabled theadtrthAttachment/ththSize/th /tr/thead tbody tr class=oddtda href=https://groups.drupal.org/files/jerseyshore-gallery1.jpgjerseyshore-gallery1.jpg/a/tdtd162.94 KB/td /tr /tbody /table

Capgemini Engineering: Drupal 8 in 2 steps

Wed, 01/07/2015 - 01:00
pDrupal 8 is the latest version of Drupal, a modern, PHP 5.4-boasting, REST-capable, object-oriented powerhouse. The concepts are still the same as the previous versions but the approach is now different. Drupal 8 comes with a modern Object Oriented Programming (OOP) approach to most parts of the system thanks to the use of the a href=http://symfony.comSymfony2/a framework./p pI took part in the Drupalcon in Amsterdam and I enjoyed a number of really interesting talks about Drupal 8, among those ‘Drupal 8: The Crash Course’ realized and presented by a href=https://www.drupal.org/user/26398Larry Garfield/a. In this post the idea is to recap few key points of his talk as I think they are important to fully understand the basics of this new Drupal version. In case you are interested you can also a href=https://amsterdam2014.drupal.org/session/drupal-8-crash-coursewatch the full talk/a./p h2 id=how-do-i-define-a-moduleHow do I define a module?/h2 pIn Drupal 8 to define a module we need only a YAML (.info.yml) file:/p pstrong/modules/d8_example_module/d8_example_module.info.yml/strong/p div class=highlightprecode class=language-yaml data-lang=yamlspan class=l-Scalar-Plainname/spanspan class=p-Indicator:/span span class=l-Scalar-PlainD8 Test Module/span span class=l-Scalar-Plaindescription/spanspan class=p-Indicator:/span span class=l-Scalar-PlainD8 Test Module/span span class=l-Scalar-Plaintype/spanspan class=p-Indicator:/span span class=l-Scalar-Plainmodule/span span class=l-Scalar-Plaincore/spanspan class=p-Indicator:/span span class=l-Scalar-Plain8.x/span span class=l-Scalar-Plainpackage/spanspan class=p-Indicator:/span span class=l-Scalar-PlainCustom/span/code/pre/div pIn Drupal 8 the .module file is not required anymore, so with only the .info.yml file the module is ready to be enabled./p h2 id=how-do-i-make-a-pageHow do I make a page?/h2 pStart creating a controller extending the ControllerBase class and return the output of the page:/p pstrong/modules/d8_example_module/src/Controller/D8ExampleModuleController.php/strong/p div class=highlightprecode class=language-php data-lang=phpspan class=xnamespace Drupal\d8_example_module\Controller;/span span class=xuse Drupal\Core\Controller\ControllerBase;/span span class=xclass D8ExampleModuleController extends ControllerBase {/span span class=x public function test_page($from, $to) {/span span class=x $message = $this-gt;t(#39;%from to %to#39;, [/span span class=x #39;%from#39; =gt; $from,/span span class=x #39;%to#39; =gt; $to,/span span class=x ]);/span span class=x return $message;/span span class=x }/span span class=x}/span/code/pre/div pOnce this is done, within the .routing.yml file we can define the path, the content, the title and the permissions:/p pstrong/modules/d8_example_module/d8_example_module.routing.yml/strong/p div class=highlightprecode class=language-yaml data-lang=yamlspan class=l-Scalar-Plaind8_example_module.test_page/spanspan class=p-Indicator:/span span class=l-Scalar-Plainpath/spanspan class=p-Indicator:/span span class=s#39;/test-page/{from}/{to}#39;/span span class=l-Scalar-Plaindefaults/spanspan class=p-Indicator:/span span class=l-Scalar-Plain_content/spanspan class=p-Indicator:/span span class=s#39;Drupal\d8_example_module\Controller\D8ExampleModuleController::test_page#39;/span span class=l-Scalar-Plain_title/spanspan class=p-Indicator:/span span class=s#39;Test/spanspan class=nv /spanspan class=sPage!#39;/span span class=l-Scalar-Plainrequirements/spanspan class=p-Indicator:/span span class=l-Scalar-Plain_permission/spanspan class=p-Indicator:/span span class=s#39;access/spanspan class=nv /spanspan class=scontent#39;/span/code/pre/div h2 id=how-do-i-make-content-themeableHow do I make content themeable?/h2 pWe still have the hook_theme() function to define our theme:/p pstrong/modules/d8_example_module/d8_example_module.module/strong/p div class=highlightprecode class=language-php data-lang=phpspan class=x/**/span span class=x * Implements hook_theme()./span span class=x *//span span class=xfunction d8_example_module_theme() {/span span class=x $theme[#39;d8_example_module_page_theme#39;] = [/span span class=x #39;variables#39; =gt; [#39;from#39; =gt; NULL, #39;to#39; =gt; NULL],/span span class=x #39;template#39; =gt; #39;d8-theme-page#39;,/span span class=x ];/span span class=x return $theme;/span span class=x}/span/code/pre/div pFor the template page Drupal 8 uses strongTwig/strong, a a href=http://twig.sensiolabs.org/documentationthird-party template language/a used by many PHP projects. For more info about Twig have a look at a href=https://www.drupal.org/theme-guide/8/twigTwig in Drupal 8/a. One of the cool parts of Twig is that we can do string translation directly in the template file:/p pstrong/modules/d8_example_module/template/d8-theme-page.html.twig/strong/p div class=highlightprecode class=language-yaml data-lang=yamlspan class=l-Scalar-Plainlt;sectiongt;/span span class=l-Scalar-Plain{% trans %}/span span class=l-Scalar-Plainlt;stronggt;{{ from }}lt;/stronggt; to lt;emgt;{{ to }}lt;/emgt;/span span class=l-Scalar-Plain{% endtrans %}/span span class=l-Scalar-Plainlt;/sectiongt;/span/code/pre/div pAnd then we assign the theme to the page:/p pstrong/modules/d8_example_module/src/Controller/D8ExampleModuleController.php/strong/p div class=highlightprecode class=language-php data-lang=phpspan class=xnamespace Drupal\d8_example_module\Controller;/span span class=xuse Drupal\Core\Controller\ControllerBase;/span span class=xclass D8ExampleModuleController extends ControllerBase {/span span class=x public function test_page($from, $to) {/span span class=x return [/span span class=x #39;#theme#39; =gt; #39;d8_example_module_page_theme#39;,/span span class=x #39;#from#39; =gt; $from,/span span class=x #39;#to#39; =gt; $to,/span span class=x ];/span span class=x }/span span class=x}/span/code/pre/div h2 id=how-do-i-define-a-variableHow do I define a variable?/h2 pDrupal 8 has a whole new configuration system that uses human-readable a href=http://www.yaml.org/YAML/a (.yml) text files to store configuration items. For more info have a look at a href=https://www.drupal.org/documentation/administer/configManaging configuration in Drupal 8/a./p pWe define variables in config/install/*.settings.yml:/p pstrong/modules/d8_example_module/config/install/d8_example_module.settings.yml/strong/p div class=highlightprecode class=language-yaml data-lang=yamlspan class=l-Scalar-Plaindefault_count/spanspan class=p-Indicator:/span span class=l-Scalar-Plain3/span/code/pre/div pThe variables will be stored in the database during the installation of the module. We define the schema for the variables in config/schema/*.settings.yml: /p pstrong/modules/d8_example_module/config/schema/d8_example_module.settings.yml/strong/p div class=highlightprecode class=language-yaml data-lang=yamlspan class=l-Scalar-Plaind8_example_module.settings/spanspan class=p-Indicator:/span span class=l-Scalar-Plaintype/spanspan class=p-Indicator:/span span class=l-Scalar-Plainmapping/span span class=l-Scalar-Plainlabel/spanspan class=p-Indicator:/span span class=s#39;D8/spanspan class=nv /spanspan class=sExample/spanspan class=nv /spanspan class=sModule/spanspan class=nv /spanspan class=ssettings#39;/span span class=l-Scalar-Plainmapping/spanspan class=p-Indicator:/span span class=l-Scalar-Plaindefault_count/spanspan class=p-Indicator:/span span class=l-Scalar-Plaintype/spanspan class=p-Indicator:/span span class=l-Scalar-Plaininteger/span span class=l-Scalar-Plainlabel/spanspan class=p-Indicator:/span span class=s#39;Default/spanspan class=nv /spanspan class=scount#39;/span/code/pre/div h2 id=how-do-i-make-a-formHow do I make a form?/h2 pTo create a form we extend a ConfigFormBase class:/p pstrong/modules/d8_example_module/src/Form/TestForm.php/strong/p div class=highlightprecode class=language-php data-lang=phpspan class=xnamespace Drupal\d8_example_module\Form;/span span class=xuse Drupal\Core\Form\ConfigFormBase;/span span class=xuse Drupal\Core\Form\FormStateInterface;/span span class=xclass TestForm extends ConfigFormBase {/span span class=x public function getFormId() {/span span class=x return #39;test_form#39;;/span span class=x }/span span class=x public function buildForm(array $form, FormStateInterface $form_state) {/span span class=x $config = $this-gt;config(#39;d8_example_module.settings#39;);/span span class=x $form[#39;default_count#39;] = [/span span class=x #39;#type#39; =gt; #39;number#39;,/span span class=x #39;#title#39; =gt; $this-gt;t(#39;Default count#39;),/span span class=x #39;#default_value#39; =gt; $config-gt;get(#39;default_count#39;),/span span class=x ];/span span class=x return parent::buildForm($form, $form_state);/span span class=x }/span span class=x public function submitForm(array amp;$form, FormStateInterface $form_state) {/span span class=x parent::submitForm($form, $form_state);/span span class=x $config = $this-gt;config(#39;d8_example_module.settings#39;);/span span class=x $config-gt;set(#39;default_count#39;, $form_state-gt;getValue(#39;default_count#39;));/span span class=x $config-gt;save();/span span class=x }/span span class=x}/span/code/pre/div pThen within the .routing.yml file we can define the path, the content, the title and the permissions:/p pstrong/modules/d8_example_module/d8_example_module.routing.yml/strong/p div class=highlightprecode class=language-yaml data-lang=yamlspan class=l-Scalar-Plaind8_example_module.test_form/spanspan class=p-Indicator:/span span class=l-Scalar-Plainpath/spanspan class=p-Indicator:/span span class=l-Scalar-Plain/admin/config/system/test-form/span span class=l-Scalar-Plaindefaults/spanspan class=p-Indicator:/span span class=l-Scalar-Plain_form/spanspan class=p-Indicator:/span span class=s#39;Drupal\d8_example_module\Form\TestForm#39;/span span class=l-Scalar-Plain_title/spanspan class=p-Indicator:/span span class=s#39;Test/spanspan class=nv /spanspan class=sForm#39;/span span class=l-Scalar-Plainrequirements/spanspan class=p-Indicator:/span span class=l-Scalar-Plain_permission/spanspan class=p-Indicator:/span span class=s#39;configure_form#39;/span/code/pre/div pWe use another YAML file (.permissions.yml) to define permissions:/p pstrong/modules/d8_example_module/d8_example_module.permissions.yml/strong/p div class=highlightprecode class=language-yaml data-lang=yamlspan class=s#39;configure_form#39;/spanspan class=p-Indicator:/span span class=l-Scalar-Plaintitle/spanspan class=p-Indicator:/span span class=s#39;Access/spanspan class=nv /spanspan class=sto/spanspan class=nv /spanspan class=sTest/spanspan class=nv /spanspan class=sForm#39;/span span class=l-Scalar-Plaindescription/spanspan class=p-Indicator:/span span class=s#39;Set/spanspan class=nv /spanspan class=sthe/spanspan class=nv /spanspan class=sDefault/spanspan class=nv /spanspan class=sCount/spanspan class=nv /spanspan class=svariable#39;/span/code/pre/div pWe also use another YAML file (.links.menu.yml) to define menu links:/p pstrong/modules/d8_example_module/d8_example_module.links.menu.yml/strong/p div class=highlightprecode class=language-yaml data-lang=yamlspan class=l-Scalar-Plaind8_example_module.test_form/spanspan class=p-Indicator:/span span class=l-Scalar-Plaintitle/spanspan class=p-Indicator:/span span class=s#39;Test/spanspan class=nv /spanspan class=sForm#39;/span span class=l-Scalar-Plaindescription/spanspan class=p-Indicator:/span span class=s#39;Set/spanspan class=nv /spanspan class=sthe/spanspan class=nv /spanspan class=sDefault/spanspan class=nv /spanspan class=sCount/spanspan class=nv /spanspan class=svariable#39;/span span class=l-Scalar-Plainroute_name/spanspan class=p-Indicator:/span span class=l-Scalar-Plaind8_example_module.test_form/span span class=l-Scalar-Plainparent/spanspan class=p-Indicator:/span span class=l-Scalar-Plainsystem.admin_config_system/span/code/pre/div h2 id=how-do-i-make-a-blockHow do I make a block?/h2 pTo create a block we extend a ConfigFormBase class:/p pstrong/modules/d8_example_module/src/Plugin/Block/TestBlock.php/strong/p div class=highlightprecode class=language-php data-lang=phpspan class=xnamespace Drupal\d8_example_module\Plugin\Block;/span span class=xuse Drupal\Core\Block\BlockBase;/span span class=x/**/span span class=x * Test Block./span span class=x */span span class=x * @Block(/span span class=x * id = quot;test_blockquot;,/span span class=x * admin_label = @Translation(quot;Test Blockquot;),/span span class=x * category = @Translation(quot;Systemquot;)/span span class=x * )/span span class=x *//span span class=xclass TestBlock extends BlockBase {/span span class=x public function build() {/span span class=x return [/span span class=x #39;#markup#39; =gt; $this-gt;t(#39;Block content...#39;),/span span class=x ];/span span class=x }/span span class=x}/span/code/pre/div pIn this way the block is ready to be configured in the CMS (/admin/structure/block). Here is an example of a more complex block:/p div class=highlightprecode class=language-php data-lang=phpspan class=xnamespace Drupal\d8_example_module\Plugin\Block;/span span class=xuse Drupal\Core\Block\BlockBase;/span span class=xuse Drupal\Core\Form\FormStateInterface;/span span class=x/**/span span class=x * Test Block./span span class=x */span span class=x * @Block(/span span class=x * id = quot;test_blockquot;,/span span class=x * admin_label = @Translation(quot;Test Blockquot;),/span span class=x * category = @Translation(quot;Systemquot;)/span span class=x * )/span span class=x *//span span class=xclass TestBlock extends BlockBase {/span span class=x public function defaultConfiguration() {/span span class=x return [#39;enabled#39; =gt; 1];/span span class=x }/span span class=x public function blockForm($form, FormStateInterface $form_state) {/span span class=x $form[#39;enabled#39;] = [/span span class=x #39;#type#39; =gt; #39;checkbox#39;,/span span class=x #39;#title#39; =gt; $this-gt;t(#39;Configuration enabled#39;),/span span class=x #39;#default_value#39; =gt; $this-gt;configuration[#39;enabled#39;],/span span class=x ];/span span class=x return $form;/span span class=x }/span span class=x public function blockSubmit($form, FormStateInterface $form_state) {/span span class=x $this-gt;configuration[#39;enabled#39;] = (bool)$form_state-gt;getValue(#39;enabled#39;);/span span class=x }/span span class=x public function build() {/span span class=x if ($this-gt;configuration[#39;enabled#39;]) {/span span class=x $message = $this-gt;t(#39;Configuration enabled#39;);/span span class=x }/span span class=x else {/span span class=x $message = $this-gt;t(#39;Configuration disabled#39;);/span span class=x }/span span class=x return [/span span class=x #39;#markup#39; =gt; $message,/span span class=x ];/span span class=x }/span span class=x}/span/code/pre/div h2 id=structure-of-a-moduleStructure of a module/h2 pThe structure of a module should look like the example module strongd8_example_module/strong:/p div class=highlightprecode class=language-yaml data-lang=yamlspan class=l-Scalar-Plaind8_example_module/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- config/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- install/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- d8_example_module.setting.yaml/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- schema/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- d8_example_module.settings.yaml/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- src/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- Controller/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- D8ExampleModuleController.php/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- Form/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- TestForm.php/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- Plugin/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- Block/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- TestBlock.php/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- templates/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- d8-theme-page.html.twig/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- d8_example_module.info.yml/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- d8_example_module.links.menu.yml/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- d8_example_module.module/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- d8_example_module.permissions.yml/span span class=l-Scalar-Plain|/span span class=l-Scalar-Plain|- d8_example_module.routing.yml/span/code/pre/div pstrongDrupal 8 in 2 steps: Extend a base Class or implement an Interface and tell Drupal about it./strong/p pa href=https://github.com/geberele/D8-Example-ModuleDownload the example module/a/p pa href=http://capgemini.github.io/drupal/drupal-8-in-2-stepsDrupal 8 in 2 steps/a was originally published by Capgemini at a href=http://capgemini.github.ioCapgemini/a on January 07, 2015./p

PreviousNext: Drupal Testing Roadmap

Tue, 01/06/2015 - 23:19
pRecently a href=https://www.drupal.org/node/2232861#comment-9329887the patch/a to bring Mink based testing to drupal core went green. As result of that Lee Rowlands (@larowlan), Nick Schuch (@wesome1989), Adam Hoenich (@djphenaproxima), and myself (@grom358) had a discussion to create a roadmap for improving testing in Drupal core. Here is what we discussed./p span property=dc:title content=Drupal Testing Roadmap class=rdf-meta element-hidden/span

Mediacurrent: Introducing the Mediacurrent Contrib Committee

Tue, 01/06/2015 - 22:21
img typeof=foaf:Image src=http://d1l4od7sxc8nwf.cloudfront.net/sites/default/files/styles/thumb_blog_spotlight/public/introducing-mediacurrent-contrib-v1-01.png?itok=3WYxKlVD width=200 height=152 / pspan style=line-height: 1.538em;After a href=http://www.mediacurrent.com/blog/mediacurrent-retreat-culture-code-karaokeMediacurrent's excellent retreat/a in October 2014 it was decided to set up some internal committees to help organize various company initiatives. Several of these committees were fairly straight forward - marketing, training, porting our corporate site to D8, etc, but I felt that one had been overlooked - a committee for organizing our contrib efforts./span/p

Drupal Watchdog: PHP and JavaScript Closures

Tue, 01/06/2015 - 22:17
div class=field field--body field-type-text-with-summary field-label-hidden field--rss pPHP closures are pretty simple as they are barely more than syntactic sugar over the following:/p pre class Something { function __construct($x) { $this-gt;x = $x; } function __invoke($y) { extract(get_object_vars($this)); // Your closure here. } } /prep Becomes:/p pre function something ($y) use ($x) { // Your closure here. } /prep So closures are objects with a small difference: they are automatically constructed and once constructed they can not be changed and the only thing you can do with them is call them. Now it should be easy to see how variables work: variables given in span class=geshifiltercode class=php geshifilter-phpuse()/code/span are copied to properties on the object. If span class=geshifiltercode class=php geshifilter-php$x/code/span is an object itself then of course only its handler is copied so changing from inside the closure affects it everywhere else, exactly like how objects work in any other operation. All this is quite consistent on how PHP works and relatively simple to understand./p pre function foo() { $x = 1; $y = function() use (amp;$x) { $x++; print in $x\n; }; $y(); print $x\n; return $y; } $func = foo(); $func(); print $x\n; /prep JavaScript is just a little different. First of all, there is no explicit import, emevery/em variable from the parent scope is imported. Second, since everything is an object, changing these variables affects the variables in the parent scope./p pre function foo() { var x = 1; var y = function() { x++; console.log('in' + x);} y(); console.log(x); return y; } func = foo(); func(); console.log(x); /preh2Flow Control/h2 pIn both languages returning from a closure will simply return to the caller. If the closure is called in a loop then the loop will continue. Short of throwing an exception the closure can’t stop such a loop. See Smalltalk for an example of a language where this is different. Obviously, Common Lisp can do both kinds of returns and the syntax is succinct and easy to understand. Obviously again, Ruby can do both and the syntax is extremely obscure./p h2About span class=geshifiltercode class=php geshifilter-php$this/code/span / span class=geshifiltercode class=php geshifilter-phpthis/code/span/h2 pSince PHP 5.4, you can use span class=geshifiltercode class=php geshifilter-php$this/code/span in closure. Just imagine that one is passed in via span class=geshifiltercode class=php geshifilter-phpuse()/code/span and everything will be fine. So span class=geshifiltercode class=php geshifilter-php$this/code/span always means the object it is defined in even if the closure is passed to another method on another object. If necessary then a new closure can be created with a new span class=geshifiltercode class=php geshifilter-php$this/code/span variable: span class=geshifiltercode class=php geshifilter-phpClosure::bind($closure, $newthis)/code/span or span class=geshifiltercode class=php geshifilter-php$closure-gt;bindTo($newthis)/code/span:/p pre class foo { protected $x = 1; function bar() { return function() { $this-gt;x++; print $this-gt;x\n;}; } } $func = (new foo)-gt;bar(); $func(); class bar { protected $x = 10; } $func2 = $func-gt;bindTo(new bar, bar); // bar allows the closure to access protected things $func2(); /prep JavaScript span class=geshifiltercode class=php geshifilter-phpthis/code/span means the defining scope however it can be changed when calling the closures via the span class=geshifiltercode class=php geshifilter-phpcall/code/span or span class=geshifiltercode class=php geshifilter-phpapply/code/span methods of the closure. This doesn't have a PHP equivalent. Your favorite framework or native DOM handling will often do this for you. span class=geshifiltercode class=php geshifilter-phpeach/code/span in jQuery sets span class=geshifiltercode class=php geshifilter-phpthis/code/span to the current object, event handlers will get the current event in span class=geshifiltercode class=php geshifilter-phpthis/code/span etc. ES5.1 in 2011 introduced the span class=geshifiltercode class=php geshifilter-phpbind/code/span method on function objects which behaves exactly like span class=geshifiltercode class=php geshifilter-phpbindTo/code/span in PHP: span class=geshifiltercode class=php geshifilter-phpsomething.bind(newThis)/code/span returns a new closure with span class=geshifiltercode class=php geshifilter-phpthis/code/span being set to span class=geshifiltercode class=php geshifilter-phpnewThis/code/span. Examples:/p pre function foo() { x = 1; var y = function() { this.x++; console.log(this.x);} y(); return y; } var func = foo(); func(); /prepre var func = function() { this.x++; console.log(this.x);} func.call({x:1}); o = {x:10}; var func2 = func.bindTo(o); func2(); /pre /div div class=field field--tags field-type-taxonomy-term-reference field-label-above field--rss div class=field-labelspan class=icon glyphicon glyphicon-tag aria-hidden=true/spanTags:nbsp;/div div class=field-items a href=/tags/php typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=PHP/a a href=/tags/javascript typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=JavaScript/a a href=/tags/closures typeof=skos:Concept property=rdfs:label skos:prefLabel datatype=Closures/a /div/div

Drupal core announcements: Ghent critical issue sprint recap

Tue, 01/06/2015 - 22:08
pLast month, 13 sprinters a href=https://groups.drupal.org/node/447123gathered in Ghent, Belgium/a for a very focused sprint designed to accelerate work on issues blocking the release of Drupal 8. The sprint was a great burst of momentum for the core critical queue -- we went from 115 critical issues at the start of the sprint to only a href=https://www.drupal.org/project/issues/search/drupal?project_issue_followers=amp;status%5B%5D=1amp;status%5B%5D=13amp;status%5B%5D=8amp;status%5B%5D=14amp;status%5B%5D=4amp;priorities%5B%5D=400amp;categories%5B%5D=1amp;categories%5B%5D=2amp;version%5B%5D=8.0.x-devamp;issue_tags_op=%3D81 as of today/a. That means we have 30% fewer critical issues than we did a month ago./p pa href=https://www.flickr.com/photos/63401575@N02/15408372734 title=Ghent sprinters by xjm., on Flickrimg src=https://farm8.staticflickr.com/7461/15408372734_772b6ca2c6_z.jpg width=640 height=259 alt=Ghent sprinters //a/p pDuring the 5-day sprint, we worked on an impressive 51 critical issues, 28 of which are already fixed. Of particular note are the a href=https://www.drupal.org/project/issues/search/drupal?project_issue_followers=amp;priorities%5B%5D=400amp;version%5B%5D=8.0.x-devamp;issue_tags_op=all+ofamp;issue_tags=Ghent+DA+sprint%2C+D8+upgrade+path18 upgrade path blockers that we moved forward/a (that's 70% of the issues blocking a a href=https://www.drupal.org/node/2341575beta-to-beta upgrade path/a during that time)./p h3Sprint goals: Accomplished!/h3 pBefore the sprint, we a href=https://groups.drupal.org/node/451513set some goals/a for the progress we wanted to make on upgrade path blockers for the Entity Field API, Configuration system, and Views. Here's how we did on each of these goals:/p h4Views data structure and Entity Field API integration/h4 pWe a href=https://www.drupal.org/node/2349553decoupled Views' entity field data from the SQL table structure/a by storing entity field information in the view configuration. This will make it possible for Views to detect when the entity field schema has changed and a href=https://www.drupal.org/node/2341323respond to the changes/a (as well as allowing better support for non-SQL databases). We also defined the entity schema changes that Views will need to support, and work is underway to support them./p h4Content and configuration dependencies in Views/h4 pWe a href=https://www.drupal.org/node/2372855added content and configuration dependencies to Views/a so that Views that use entity display modes, field formatters, user roles, and so on can be safely deployed. We also a href=https://www.drupal.org/node/2341357#comment-9421155discussed how to store deployable references to entities/a (for example, the taxonomy term displayed at the top of codetaxonomy/term/*/code listings) based on the shared needs of Views and Entity Reference. A patch to a href=https://www.drupal.org/node/2341357implement the proposed API in Views/a is nearly ready./p h4Global settings.php overrides/h4 pWe had a fruitful discussion that clarified the problem space and culminated in splitting the issue into two steps. We a href=https://www.drupal.org/node/1934152#comment-9427193retitled/a and a href=https://www.drupal.org/node/1934152/revisions/view/7926617/7926943resummarized/a the original issue into the second step, and began work on the a href=https://www.drupal.org/node/2392319first step/a. While getting an initial patch for the first step to pass tests, we uncovered several blocker issues, each of which has now been committed. The patch for this issue is now up for review./p h4Configuration schema/h4 pAll hidden configuration schema issues are now fixed and will not regress, because all tests now have strict schema checking enabled by default!br / To help people get started with config schemas, Gábor Hojtsy also created a a href=http://hojtsy.hu/blog/2014-dec-12/drupal-8-configuration-schema-cheat-sheetvery handy cheat sheet/a that provides the most crucial information at a glance./p pa href=http://hojtsy.hu/blog/2014-dec-12/drupal-8-configuration-schema-cheat-sheetimg src=https://groups.drupal.org/files/config_schema_cheat_sheet.png alt=Drupal 8 Configuration schema cheat sheet //a/p h4Data integrity on module uninstallation/h4 pThe two critical bugs in this problem space are now fixed:/p ul liModules that define content entity types (e.g., node.module, comment.module) a href=https://www.drupal.org/node/2278017can no longer be uninstalled if the site has existing entities of that type/a. Instead, the site administrator must first delete the entities via normal channels (UI, Drush, etc.), so that deletion hooks and the corresponding reference cleanups happen./li liModules that define field storages (e.g., path.module) a href=https://www.drupal.org/node/2338873can no longer be uninstalled if the site has existing entities with data for that field/a. Instead, the site administrator must first either delete those entities or update them to have empty values for that field./li /ul pTo implement both of the above, we created a new a href=https://www.drupal.org/node/2392677ModuleUninstallValidatorInterface/a. We also have a non-critical issue to a href=https://www.drupal.org/node/2392815better integrate those validators when a module is being uninstalled as part of a configuration import/a./p h4NOT NULL constraints for entity base fields/h4 pThanks to fast collaboration between plach, amateescu, yched, and fago (which was greatly assisted by having them all together in-person), a patch that fixes a href=https://www.drupal.org/node/2232477the fatal error bug/a has now been committed. This required resolving some trickiness with entity reference fields, whose target_id property is simultaneously required but not known while in the process of referencing a not-yet-saved entity. The solution results in a a href=https://www.drupal.org/node/2392807more semantically correct API/a and better delineation of responsibilities between field types, field definitions, and storage handlers for identifying and implementing required-ness./p h3The UN of Chocolate/h3 pWe worked hard at the sprint, but also managed to fit in some international chocolate comparisons, with Swiss, Hungarian, and Belgian sweets to power all that coding. Contributor pfrenssen also a href=https://twitter.com/gaborhojtsy/status/542631869922410496pledged not to shave until 8.0.0/a (1 cm of beard per beta?), and Berdir shared a href=https://twitter.com/berdir/status/543827684913324032/photo/1just how brimming with criticals his issue tracker became/a. We even learned a bit about the history of Ghent, thanks to swentel and his father-in-law./p pa href=https://www.flickr.com/photos/63401575@N02/15844903347 title=The Leie by xjm., on Flickrimg src=https://groups.drupal.org/files/leie.jpg alt=The Leie //a/p h3Sponsors/h3 pThe sprint was sponsored by the a href=https://assoc.drupal.org/homeDrupal Association/a and a href=http://www.wunderkraut.com/Wunderkraut/a./p pThe following organizations also contributed their employees' time to participate in the sprint:/p ul lia href=https://www.drupal.org/marketplace/acquiaAcquia/a/li lia href=https://www.drupal.org/marketplace/chapter-threeChapter 3/a/li lia href=https://www.drupal.org/marketplace/drunomicsdrunomics/a/li lia href=https://www.drupal.org/node/2308287eps amp; kaas/a/li lia href=https://www.drupal.org/marketplace/md-systemsMD Systems/a/li linuvole/li lia href=https://www.drupal.org/node/1545988ONE Agency/a/li /ul pFinally, thanks to all the sprinters: alexpott, amateescu, Berdir, bircher, dawehner, fago, Gábor Hojtsy, pfrenssen, plach, swentel, Wim Leers, xjm, and yched!/p h3What's next?/h3 pWith the record-breaking productivity of our sprint, we know that more sprints like these will a href=https://www.drupal.org/drupal-8.0/get-involvedhelp get Drupal 8 done/a. The Drupal Association's a href=https://assoc.drupal.org/blog/holly.ross.drupal/announcing-drupal-8-accelerate-programD8 Accelerate progam/a will include more critical issue sprints in 2015. Watch for an upcoming sprint on menu and routing criticals at a href=https://www.drupalcampnj.org/DrupalCamp New Jersey/a later this month!/p

Marzee Labs: Blueprinting Drupal projects

Tue, 01/06/2015 - 20:00
p class=lead Planning the structure of a Drupal project is important. At Marzee Labs, we've developed some pretty robust methodologies over time to approach new Drupal projects, and in this post we'll outline some of these tools and processes that help us get off the ground in no time. While some of the topics are probably familiar (Drupal makefiles, installation profiles and such) you might learn some new tips and tricks to make your next Drupal project just that tiny bit more automated and run smooth. /p h3 id=the-blueprint-of-any-drupal-project-the-makefileThe blueprint of any Drupal project: the makefile/h3 pAny project we start has to have a makefile. Full stop. Requiring that every module, library or theme we use - be it from drupal.org, github, or any other source - is documented in a single file, is a great way to quickly get the gist of any drupal project./p pEven though you might want to version your contributed modules (more on this below), the Drupal makefile should form the backbone of your website./p pAs an example, check out the makefiles of our a href=https://github.com/marzeelabs/mzMZ profile/a, our boilerplate profile that can be used to kickstart a new project. For a Drupal profile that can be contributed and packaged on drupal.org, we typically have 3 different Makefiles, but now we’re only interested in codemz.make/code./p pHere are the instructions to make the codelink/code module./p precodeprojects[link][version] = 1.3 projects[link][subdir] = contrib /code/pre pEveryone inspecting the site running this profile now knows that you are using the 1.3 version of the Link module./p pNeed to patch the codelink/code module because you encountered a bug or missing functionality? Sure thing. First we scan the drupal.org issue queue for patches. An example is a href=https://www.drupal.org/node/1475790this issue/a, with a working patch. We add this to our makefile, with a one-liner comment and a link to the issue on d.o./p precodeprojects[link][version] = 1.3 projects[link][subdir] = contrib ; Provide the original_url when loading the field. ; @see https://www.drupal.org/node/1475790#comment-7743415 projects[link][patch][] = http://www.drupal.org/files/7.x-1.x-_link_sanitize-bandaid-1475790-16.diff /code/pre pAnd we rebuild our project to test the patch in our Drupal sandbox, passing code--projects=link/code (and also code--no-core/code since we don’t want to rebuild Drupal core)/p precodedrush make profiles/mz/mz.make --projects=link --no-core . /code/pre pOr we download the nifty a href=https://github.com/davereid/drush-patchfileDrush Patchfile/a to apply patches directly and work with a patch file (our makefile, in this case)./p pIf you want to use the latest development version of a module, you can also do that. If you do however, always specify the revision hash as well (you find it in the a href=https://www.drupal.org/node/74971/commitscommit log/a), so you make sure you’re working with that specific development release that you tested./p projects[link][version] = 1.x-dev precodeprojects[link][subdir] = contrib projects[link][revision] = 7dc306c /code/pre pFeel the power of this? You can quickly evaluate community contributed patches, roll your own (and contribute them as a a href=http://gist.github.comGist/a if they don’t fit on drupal.org), and not be dependent anymore on the module maintainers to publish that new release./p pSince you also document every patch used, you’re making this knowledge available to the other developers in the team, to the reviewer of your Pull Request (if you are using the a href=http://marzeelabs.org/blog/2014/05/18/coding-as-a-team-code-workflow/github branching model/a), or generally as part of the Git history of your project. You can often revisit your makefile to remove patches if they’ve been rolled out in a new release, and update your modules. Make this a habit and it will pay off eventually./p h3 id=bundling-using-profilesBundling using profiles/h3 pAll your custom code and modules, themes and libraries to be installed should be bundled as an a href=https://www.drupal.org/developing/distributionsinstallation profile/a, so your site can be a href=http://marzeelabs.org/blog/2014/03/03/coding-as-a-team-automation-using-phing/installed over and over/a./p pIf you haven’t started organizing your sites as Drupal profiles, you probably should. Have a look at our boilerplate a href=https://github.com/marzeelabs/mzMZ profile/a. We use it to bundle our favourite contributed modules, but it also has some custom features and part of our common worfklows we find often useful. Other examples of great Drupal profiles are a href=https://www.drupal.org/project/commerce_kickstartCommerce Kickstart/a or a href=https://www.drupal.org/project/commonsDrupal Commons/a./p h3 id=organizing-your-code-in-a-git-repositoryOrganizing your code in a git repository/h3 pIt’s time to dive in the organization of your git repository (we love a href=http://github.com/marzeelabs/mzGitHub/a). If you’ve followed along so far, contributed code is documented in your makefile, while your custom features and code lives in your profile. It would be enough to version these, and that is the recommended way if you want to package your code as a profile or a base profile upon which to build new sites./p pHowever, most of the time, you will also need to deploy off this repository directly, so we suggest that you store strongall your code/strong - including Drupal core amp; contrib - in the git repository. Your directory structure could look like/p precodeprofiles/mz/modules/contrib profiles/mz/modules/custom profiles/mz/modules/features profiles/mz/libraries profiles/mz/themes ... sites/default/settings.php sites/default/settings.prod.php sites/default/settings.test.php sites/default/settings.dev.php ... index.php ... README.md /code/pre pWe also store codesettings.php/code in the git repository, and include an if statement to load the right codesettings.php/codedepending on the environment that is available./p pAnother advantage of versioning environment-dependent settings is that you can force certain variables to be set in code, e.g. for production you might want to add/p precode// Caching settings $conf['page_cache_without_database'] = TRUE; $conf['page_cache_invoke_hooks'] = FALSE; /code/pre pto your codesettings.prod.php/code, making all these settings directly available in git and thus for review by your peers, and it avoids having to wonder what setting is active on which environment/p pFinally, create a codesettings.local.php/code file that is loaded from codesettings.php/code, with your local database settings./p precode// For local development if (file_exists('./sites/default/settings.local.php')) { include_once('./sites/default/settings.local.php'); } /code/pre h3 id=whats-nextWhat’s next?/h3 pNow that we have given an overview of our favourite project architecture in Drupal (makefiles, profiles, and github), some of the next topics we’d like to talk about our setting up a continuous integration pipeline (using a href=https://travis-ci.com/Travis CI/a), writing a couple of Behat tests to assert your site works fine, and reviewing our worfklows with Github (pull requests, issues, releases)./p pDid you miss our “Coding as a Team” series? Check out a href=http://marzeelabs.org/blog/2014/03/03/coding-as-a-team-automation-using-phing/pt.1: automation workflow using Phing/a, a href=http://marzeelabs.org/blog/2014/03/17/coding-as-a-team-content-fixtures/pt. 2: using content fixtures/a and a href=http://marzeelabs.org/blog/2014/05/18/coding-as-a-team-code-workflow/pt. 3: code workflow/a./p pemFeatured image credit: brianbutko / Flickr/em/p

Drupal core announcements: This Month in Drupal Documentation - December 2014

Tue, 01/06/2015 - 17:46
pHere's an update from the a href=https://drupal.org/governance/doc-working-groupDocumentation Working Group (DocWG)/a on what has been happening in Drupal Documentation in the last month or so. Sorry... because this is posted in the Core group as well as Documentation, comments are disabled./p pIf you have comments or suggestions, please see the a href=https://drupal.org/governance/doc-working-groupDocWG home page/a for how to contact us. Thanks!/p h3Thanks for contributing!/h3 pSince November 28, (a href=https://groups.drupal.org/node/450833our previous TMIDD post/a), 232 contributors have made 733 total Drupal.org documentation page revisions, including 8 people that made more than 20 edits (lolandese, Francewhoa, webchick, kreynen, YesCT, Pierre.Vriens, Wim Leers, and PsyCode) -- thanks everyone! Most of these people are seasoned Drupal contributors, but PsyCode is a Google Code-In participant who has been editing pages. That's great -- we love it when our old friends come back to help, and when new people get involved!/p pIn addition, there were many many commits to Drupal Core and contributed projects that improved documentation -- these are hard to count, because many commits combine code and documentation -- but they are greatly appreciated too!/p h3Documentation Priorities/h3 pThe a href=https://www.drupal.org/documentation/prioritiesCurrent documentation priorities page/a is always a good place to look to figure out what to work on, and has been updated recently./p pstrongOf special note: We're trying to get the Help pages inside Drupal 8 updated -- check the priorities page and events section below on this page for details./strong/p pIf you're new to contributing to documentation, these projects may seem a bit overwhelming -- so why not try out a a href=https://drupal.org/contributor-tasks/writersNew contributor task/a to get started?/p h3Upcoming Events/h3 ul lia href=https://groups.drupal.org/node/447258Global Sprint Weekend/a is coming up on January 17-18, worldwide! a href=http://www.drupalcampbrighton.co.uk/DrupalCamp Brighton/a is having a documentation sprint that weekend, and we've also posted a href=https://groups.drupal.org/node/452493instructions on how anyone, anywhere can participate by reviewing Drupal 8 help/a./li lia href=http://bogota2015.drupal.org/ title=http://bogota2015.drupal.org/http://bogota2015.drupal.org//a - DrupalCon Latin America, Bogotá, Columbia, Feb 10-12, 2015/li /ul h3Report from the Working Group/h3 pThe Working Group meets monthly via Google Hangouts, and our next meeting is January 14. a href=https://drupal.org/user/22175Contact Boris/a if you'd like to join the meeting. We're currently discussing how we and the community can address several big problems:/p ul liThe lack of documentation for Drupal in languages other than English./li liThe difficulty of locating documentation that answers specific Drupal questions./li liThe overwhelming size of Drupal documentation for newcomers (not knowing where to start)./li /ul

Blink Reaction: Getting up and VMing

Tue, 01/06/2015 - 17:32
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedp dir=ltrLast time we overviewed virtualization and its advantages for a href=https://www.drupal.org/ target=_blankDrupal/a developing. It was all theory stuff, so I’m sure you’re itching to actually get a VM going. Let’s get started./p/div/div/div

Gábor Hojtsy: 2014 in review from a multilingual Drupal perspective

Tue, 01/06/2015 - 15:30
div class=field field-name-body field-type-text-with-summary field-label-hidden view-mode-rssdiv class=field-itemsdiv class=field-item evenpWhew! 2014 was a fantastic year for the Drupal multilingual team. We had some great events with huge sprints, including but not limited to: a href=https://groups.drupal.org/node/332998Global Sprint Weekend/a, the amazing a href=http://szeged2014.drupaldays.org/program/code-sprints/drupal-8-multilingual-initiative-sprintDrupal Dev Days Europe/a, a href=https://groups.drupal.org/node/398158NYC Camp/a, a href=https://austin2014.drupal.org/sprintsDrupalCon Austin/a, a href=https://amsterdam2014.drupal.org/sprintsDrupalCon Amsterdam/a and a href=https://2014.badcamp.net/event/core-dev-sprintBADCamp/a./p pA fun fact about people on the multilingual team is that even though we usually turn out in big numbers at sprints, there are numerous great mentors among us, so we don't work on code that much at mentored sprints. We do a great job helping people get started and move into more serious core work though. Our most famous mentee this past year is 2014th Drupal 8 core contributor Holly Ross, Executive Director of the Drupal Association who contributed her first and second core patches fixing multilingual issues./p /div/div/div

Conocimiento Plus: Drupal 8 Web Services and Context Core (WSCCI) Initiative

Tue, 01/06/2015 - 13:07
Web services and mobile are more important than ever, and with that comes the need to have more flexible page and layout capabilities #8211; Dries Buytaert Introduction The future is a world where content management systems need to output data to many more devices and integrate with more and more systems and services. Drupal 7 [#8230;]img alt= border=0 src=https://pixel.wp.com/b.gif?host=conocimientoplus.wordpress.com#038;blog=49138767#038;post=595#038;subd=conocimientoplus#038;ref=#038;feed=1 width=1 height=1 /

Evolving Web: Iterating over trees in PHP

Tue, 01/06/2015 - 13:00
img typeof=foaf:Image src=http://evolvingweb.ca/sites/default/files/styles/medium/public/directory-tree_0.jpg?itok=gpf8jll0 width=243 height=220 alt=Screenshot of a directory tree. title= Processing recursive data structures in PHP /pAs a good Drupal developer, one of your New Year's resolutions should be to learn more PHP features. Today, we'll talk about iterating over tree-structured data using the awkwardly-named class a href=http://php.net/manual/en/class.recursiveiteratoriterator.phpRecursiveIteratorIterator/a./p a href=http://evolvingweb.ca/blog/iterating-over-trees-phpread more/a

IXIS: Looking forward to a Drupaltastic 2015

Tue, 01/06/2015 - 12:20
div class=field field-type-filefield field-field-blogimage div class=field-items div class=field-item odd img src=http://www.ixis.co.uk/sites/ixis/files/imagecache/blogfull/invaders_background.jpg alt=teaser image for blog post title=Space Invaiders class=imagecache imagecache-blogfull imagecache-default imagecache-blogfull_default width=435 height=253 / /div /div /div p dir=ltrIt was an exciting and busy year here at Ixis in 2014 as we continued to build our portfolio of a href=http://www.ixis.co.uk/clientsDrupalnbsp;clients/a.nbsp;/p p dir=ltrHighlights have included a href=http://www.ixis.co.uk/blog/we-are-10-today-look-backcelebrating our tenth birthday/a and building on and growing the teamrsquo;s expertise which has allowed the company to win more clients across a variety of sectors. We also celebrated one of our best financial quarter since Ixis was founded in 2004.nbsp;/ppa href=http://www.ixis.co.uk/blog/looking-forward-drupaltastic-2015 target=_blankread more/a/p

Blair Wadman: How do you create a single on/off checkbox field?

Tue, 01/06/2015 - 10:29
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpSimple on/off checkbox fields where you want the user to select or deselect a checkbox are a common requirement. Yet it is not so obvious how to create them in Drupal./p pOn/off checkbox fields are often used to toggle for things like:/p/div/div/div

Drupal Association News: Get Ready for the 2015 Community Elections

Tue, 01/06/2015 - 05:31
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpimg alt= src=https://assoc.drupal.org/files/7157055718_4bc129954f_m.jpg style=width: 240px; height: 188px; border-width: 0px; border-style: solid; margin: 5px; float: left; /During the holidays I met some folks who used to work at other open source projects. One of them asked me, What's your favorite part of your job? Lucky for me, I have a lot of great things to choose from, but the thing that always stands out is the global nature of our community. All the customs, cultures, and values are tough to navigate, but I love learning about the variety of perspectives you all bring to the table. I sincerely believe that this diversity of experince makes our community that much stronger./p pThat diversity is also why we have two At-Large positions on the Association Board of Directors - positions that are self-nominated and elected by the community. Simply put, the At-large Director position is specifically designed to ensure community representation on the Drupal Association board. If you are interested in helping shape the future of the Drupal Association, we encourage you to read this post and be prepared to nominate yourself between 1 February and 20 February, 2015./p h3 How Do Nominations and Elections Work?/h3 pSpecifics of the election mechanics were decided through a href=https://groups.drupal.org/node/199178a community-based process/a in 2012 with participation by dozens of Drupal community members. More details can be found in a href=https://groups.drupal.org/node/201753the proposal/a that was approved by the Drupal Association board in 2012 and adapted for use this year./p h3 What Does the Drupal Association Board Do?/h3 pThe Board of Directors of the Drupal Association are responsible for financial oversight and setting the strategic direction of the Drupal Association. New board members will contribute to the strategic direction of the Drupal Association. Board members are advised of, but not responsible for matters related to the day to day operations of the Drupal Association, including program execution, staffing, etc./p pDirectors are expected to contribute around five hours per month and attend three in-person meetings per year (financial assistance is available if required). You can learn more about what’s expected of board members by reviewing the a href=https://association.drupal.org/files/BoardAgreementTemplate.pdfboard member agreement/a. You can also check out the a href=https://assoc.drupal.org/blog/holly.ross.drupal/what-association-board-does-why-you-should-runpresentation and summary/a we shared this summer./p h3 Who can run?/h3 pThere are no restrictions on who can run, and you don't need anyone to nominate you./p h3 What will I need to do during the elections?/h3 pDuring the elections, members of the Drupal community will ask questions of candidates. They'll post comments on candidate profiles here on assoc.drupal.org and to the public Drupal Association group at a href=http://groups.drupal.org/drupal-associationhttp://groups.drupal.org/drupal-association/a. We'll also organize at least two all-candidates meetings (which will be announced on the Drupal Association group and blog), where community members and candidates will be able to ask questions and share information. The more you can participate, the more Drupal community members will be able to find out what you would bring to the Drupal Association board./p h3 How Do I Run?/h3 pCandidates needed! If you are considering running, please read the entirety of this post, and then be prepared to complete a self-nomination form. This form will be open on 1 February, 2015 through 20 February, 2015 at midnight UTC. You'll be asked for some information about yourself and your interest in the Drupal Association Board. When the nominations close, your candidate profile will be published and available for Drupal community members to browse. Comments will be enabled, so please monitor your candidate profile so you can respond to questions from community members./p h3 Who can vote?/h3 pVoting is open to all individuals who have a Drupal.org account by the time nominations open and who have logged in at least once in the past year. These individuals' accounts will be added to the voters list on association.drupal.org and they will have access to the voting./p pTo vote, you will rank candidates in order of your preference (1st, 2nd, 3rd, etc.). The results will be calculated using an instant runoff method. For an accessible explanation of how instant runoff vote tabulation works, a href=https://groups.drupal.org/node/200143#comment-660713see videos linked in this discussion/a./p h3 Elections process/h3 pVoting will be held from 9 March, 2015 through 20 March, 2015. During this period, you can review and comment on candidate profiles on assoc.drupal.org and engage all candidates through posting to the a href=https://groups.drupal.org/node/201753Drupal Association group/a. We'll also be scheduling and announcing two phone-in all candidates meetings, where community members and candidates can ask questions and get to know each other./p pemstrongHave questions? /strong/emPlease contact Drupal Association Executive Director a href=mailto:holly@association.drupal.org?subject=Community%20Elections%20QuestionsHolly Ross/a. Many thanks to a href=https://drupal.org/user/4481nedjo/a for pioneering this process and documenting it so well last year!/p pemstrongFlickr photo: a href=https://www.flickr.com/photos/kodakviews/7157055718/in/photolist-bUrMjo-4qdati-4qj9PB-4xVDxB-dofEB1-bPBC2B-5xiiAi-5zuhAU-4pvC1M-7HB2CW-ML3RS-5zpcuq-93wypN-dj8wYm-rMVM7-rMkWM-7ihsR5-5Zddzz-5wka3S-5C7NtB-axHmCG-5yN8Gc-aQom9n-oZPa1-9JwpDq-Ztq-5whAg3-63FcQb-5RZFNv-7XisNb-8Qc4qU-5vdtiB-drdwj5-995bT2-5zuKcU-ns7GM3-5ze2WP-8Tx2F3-gHKDhQ-8w8EkU-8NSDDv-aQjx7a-mESJ5X-48vvav-5zvkFt-558f-bi8Kcv-4rKm56-4c8n3o-9yDGf1Kodak Views/a/strong/em/p /div/div/div

Nextide Blog: Standalone Drupal 8 script using Guzzle

Mon, 01/05/2015 - 23:24
p/ppDrupal 8 will have web services as part of core which will provide native support for all entity types including custom entity types. Drupal 8 will have support for different serialization formats like HAL+JSON, XML and JSON./p pA couple good article references:/p

Pivots recommendations: Drupal Recommender API: Roadmap for 2015 and beyond

Mon, 01/05/2015 - 18:54
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpI have seen slow but steady adoption of the new release of Drupal a href=https://www.drupal.org/project/recommenderRecommender API module/a over the past few weeks after a href=/node/692the announcement/a. This post will explain my plans about future development of a href=https://www.drupal.org/project/recommenderRecommender API/a in order to help the audience make informed decisions. This is also an update to an older post on a href=/node/6812012-2013 roadmap/a./pp /ppI will categorize all my development plans into three tiers./p/div/div/divdiv class=field field-name-node-link field-type-ds field-label-hiddendiv class=field-itemsdiv class=field-item evena href=/blog/drupal-recommender-api-roadmap-2015-and-beyondRead more/a/div/div/div