Planet Drupal

Syndicate content
drupal.org - aggregated feeds in category Drupal Planet
Updated: 15 min 1 sec ago

Mike Crittenden: Making a Drupal bookmarklet

Thu, 05/09/2013 - 00:16
div class=field field-name-field-subtitle field-type-text field-label-hiddendiv class=field-itemsdiv class=field-item evenDown with copying and pasting!/div/div/divdiv class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpLast weekend I built/launched a href=http://frugalzon.comFrugalzon/a, which is a little hand-curated list of cool stuff on Amazon for $10 or less. (It's still new and fairly empty, but give it time!)/p pThe Drupal site itself is simple--one content type, one view, one taxonomy, that's pretty much it. The only interesting aspect comes in the form of content entry. Since the whole point of the site is to be hand-picked items, I couldn't just pull some Amazon feed of cheap products. I had to manually add each of the items on there (and I continue to add a few items per day) by choosing stuff I think is cool. To make this easier, I made a bookmarklet that scrapes the info off of whatever Amazon product page I'm looking at and pre-populates a node add form on Frugalzon with that data./p pSo there are two things at work here: page scraping and prepopulation./p h3Page scraping/h3 pThe first part of the bookmarklet gathers up the relevant info on the Amazon product page I'm viewing. This includes:/p ul liTitle/li liPrice/li liPrime shipping or regular/li liImage URL/li liPage URL (with my affiliate code added)/li liCategory/li /ul pFor finding this stuff, the easiest method is to just use your browser's dev tools. Inspect the elements to find a unique selector to match them, and then test it out in the console. This can get a little tricky sometimes depending on the markup, especially on a site like Amazon that has a few different possible product templates each with unique un-semantic markup./p pHere's the JS in my bookmarklet that does all of this on Amazon./p precodevar frugalzontitle = jQuery('h1').text().trim(); var frugalzonprice = jQuery('.a-color-price, .priceLarge').eq(0).text().trim().replace($,); var frugalzoncategory = jQuery('.nav-category-button').eq(0).text().trim().replace('All ', '').replace(',', ''); var frugalzonimage = jQuery('#holderMainImage img, #prodImageCell img').attr('src'); var frugalzonurl = document.URL; if (frugalzonurl.indexOf('?') gt; -1) { frugalzonurl += 'amp;tag=frugalzon-20'; } else { frugalzonurl += '?tag=frugalzon-20'; } if (jQuery('#actualPriceExtraMessaging img').length gt; 0 || jQuery('#price img').length gt; 0) { frugalzonshipping = 'Prime'; } else { frugalzonshipping = 'Normal'; } /code/pre pAs you can see, Amazon includes jQuery in the page so we can use that (yay!). If the site you're scraping doesn't, then you can either load it in noConflict mode or just use vanilla JS selector hotness. You might also notice that I'm prefixing all of my variable names with frugalzon as a poor man's way of namespacing this./p pSo now we have all the data we need...what do we do with it?/p h3Node prepopulation/h3 pThere's a cool module called a href=http://drupal.org/project/prepopulatePrepopulate/a that lets you pass data to the node/add/whatever page as a query string and that data will prepopulate the form. So for example, going to /node/add/product?edit[title]=Something would make the Title field have a default value of Something when the page loads./p pThis works great, but it can get a little hairy with different field types (Image URL, taxonomy term reference, plain text, etc.) because each field type has a different array path in the code$form/code array in Drupal. Luckily, a href=http://drupal.org/node/228167this is documented/a and all you have to do is view the source to see what the codename/code attributes of your form elements look like to know what to pass./p pIn the end, here's what my JS looked like to build the URL to hit./p precodeurl = 'http://frugalzon.localhost/node/add/product?'; url += 'edit[title]=' + encodeURIComponent(frugalzontitle) + 'amp;'; url += 'edit[field_price][und][0][value]=' + encodeURIComponent(frugalzonprice) + 'amp;'; url += 'edit[field_url][und][0][value]=' + encodeURIComponent(frugalzonurl) + 'amp;'; url += 'edit[field_category][und]=' + encodeURIComponent(frugalzoncategory) + 'amp;'; url += 'edit[field_shipping][und]=' + encodeURIComponent(frugalzonshipping) + 'amp;'; url += 'edit[field_image][und][0][filefield_remote][url]=' + encodeURIComponent(frugalzonimage) + 'amp;'; window.open(url, '_blank'); /code/pre pYou'll notice that the Image field is passing in a URL which is handled via the a href=http://drupal.org/project/filefield_sourcesfilefield_sources/a module. Also, the Category field is a tag-style term reference field so whatever gets passed in there will be fine; you don't have to match up tid's to existing terms or anything./p h3Putting it all together/h3 pSo now we have our bookmarklet code (a href=https://gist.github.com/mikecrittenden/5509547here's a full gist/a) and we're set up to handle it on the Drupal side (using the Prepopulate module), so we just need to make an actual bookmarklet out of this thing./p pI used a href=http://ted.mielczarek.org/code/mozilla/bookmarklet.htmlthis online tool/a for that. Paste in your JS and it'll crunch it and build a little link for you to drag to your bookmarks bar. This worked like a charm. Now, adding products to Frugalzon is as simple as clicking the bookmarklet on an Amazon product page and then clicking Save on the prepopulated node add form. Not bad!/p pstrongHey, maybe you should a href=http://twitter.com/mcrittendenfollow me on Twitter/a!/strong/p /div/div/div

Trellon.com: New CRM Core Releases, and What to Expect

Wed, 05/08/2013 - 23:30
pToday, Trellon released new versions of a href=http://drupal.org/project/crm_coreCRM Core/a and a href=http://drupal.org/project/crm_core_profile target=_blankCRM Core Profile/a. Both of these modules include new features that are important for anyone looking to build modules that use CRM Core as a backend for storing contact information./p pThese releases are part of our Garden Party roadmap, as part of the 'Live Music' stage. They are for site builders and developers looking to build modules and features that expand upon CRM Core's basic capabilities. With them, you have some more powerful tools for working with contact records stored in your Drupal site, and they include some usability enhancements based on feedback we received as part of the 0.91 release of CRM Core./p pI wanted to share a little about what you will find, and why it is important./p pa href=http://www.trellon.com/content/blog/new-crm-core-releases-and-what-expect target=_blankread more/a/p

Acquia: Drupal Camp Scotland 2013 Double-Header

Wed, 05/08/2013 - 19:36
div class=field field-name-body field-type-text-with-summary field-label-hidden div class=field-items div property=content:encoded class=field-item evenpThis week's podcast features two Drupal Scots: strongDuncan Davidson/strong (recorded live in a back alley right after a href=http://camp.drupalscotland.org/Drupal Camp Scotland 2013/a) and strongBrian Ward/strong (recorded via Skype, post-event). Duncan is the Scottish regional manager and UK Professional Services Manager for a href=http://www.i-kos.com/i-KOS/a and Brian is a developer at a href=http://heehaw.co.uk/heehaw.digital/a in Edinburgh./p /div /div /div div class=field field-name-field-podcast-file field-type-file field-label-hidden div class=field-items div class=field-item evenspan class=fileimg class=file-icon alt= title=audio/mpeg src=/modules/file/icons/audio-x-generic.png / a href=https://www.acquia.com/sites/default/files/podcasts/duncan-n-brian_final_0.mp3 type=audio/mpeg; length=18262328duncan-n-brian_final.mp3/a/span/div /div /div span property=dc:title content=Drupal Camp Scotland 2013 Double-Header class=rdf-meta/span

Lullabot: Announcing Our 5th Annual DrupalCon Party

Wed, 05/08/2013 - 18:30
pDrupalCon Portland will be happening in a few weeks and, as usual, Lullabot will be out in force. Our entire team will be there and we'll be spending our days training (4 classes) and presenting (8 sessions). We'll also be hanging out at both the Lullabot and Drupalize.Me booths in the exhibit hall. As usual, we've got a lot going on./p

Drupal Association News: Sponsored blog post: Where should Drupal professionals focus for the next phase of growth?

Wed, 05/08/2013 - 17:51
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item evenpemAs part of the Diamond and Platinum sponsorships for DrupalCon Portland, we've offered leaders at these sponsor companies the opportunity to guest blog on the Drupal Association site. In today's post, Robert Douglass of Commerce Guys takes a look at where Drupal is today, and the untapped opportunities for Drupal growth in e-commerce./em/p /div/div/divdiv class=field field-name-taxonomy-vocabulary-4 field-type-taxonomy-term-reference field-label-abovediv class=field-labelPersonal blog tags:nbsp;/divdiv class=field-itemsdiv class=field-item evena href=/taxonomy/term/718sponsor blog/a/divdiv class=field-item odda href=/taxonomy/term/583DrupalCon Portland/a/divdiv class=field-item evena href=/taxonomy/term/708guest blog/a/div/div/div

Aten Design Group: Project Review Wednesday: Content Reminder

Wed, 05/08/2013 - 16:52
div class=field-image-blog img src=http://atendesigngroup.com/sites/default/files/project_review_17.png width=520 height=250 alt= / /divdiv class=body pThere are currently a href=http://drupal.org/project/issues/projectapplications?text=amp;status=8amp;priorities=Allamp;categories=Allamp;component=All98 new Drupal contributors/a awaiting review of their first project. This is a great place to contribute to the community and learn about interesting upcoming projects, for example.../p h2Module: Content Reminder/h2 h3What does it do?/h3 pPublishing content feels great. There's a sense of accomplishment and it's there for the world to see. However, that content oftentimes needs to be checked on and updated. Instead of letting a page languish, alone and forgotten, you can use the a href=http://drupal.org/node/1605798Content Reminder module/a to set up reminders to check on it./p pContent Reminder adds a notification tab to each node, allowing a user to create a notification to be sent to a site's user with a customizable message and date upon which it should be sent. Now you can ensure that your site's content is fresh and relevant, not forgotten./p div a href=http://drupal.org/files/project-images/content_reminder_add.jpg data-images=http://drupal.org/files/project-images/content_reminder_add.jpgspan class=zoomZoom/spanimg src=http://drupal.org/files/project-images/content_reminder_add.jpg width=550//a /div h2Look Useful? Review it!/h2 pIf you would like to see this module readily available on Drupal.org, you should review it and help make that happen./p p class=clearfixa href=http://drupal.org/node/1605798 class=buttonReview It/a/p pstrongPro Tip/strong: If you've never reviewed a project application before, you can find a href=http://drupal.org/node/894256instructions for reviewers on Drupal.org/a and the a href=http://groups.drupal.org/code-reviewCode Review group/a is happy to help more people get involved./p /div

Pronovix: Drupal for the European Commission: BoFSession at DrupalCon Portland 2013

Wed, 05/08/2013 - 16:47
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpemThis is a guest post by stronga href=http://twitter.com/mathewlowryMathew Lowry/a from Intrasoft International/strong. We suggested him to write this post as a preparation for a BoF session his colleague will be organizing at DrupalCon Portland. If you are working on a Drupal platform for government or for a bigger organization that wants to standardize on Drupal as a communication platform for a series of its departments, and if you are attending Drupalcon Portland, come and join us to discuss best practices and lessons learned./em/p/div/div/div

Acquia: Notes from Views Mini-Course, Part II: Creating Flexible Views with Drupal

Wed, 05/08/2013 - 16:45
div class=field field-name-body field-type-text-with-summary field-label-hidden div class=field-items div property=content:encoded class=field-item evenpHere are notes from the 2nd class in our Views mini-course. /p/div /div /div span property=dc:title content=Notes from Views Mini-Course, Part II: Creating Flexible Views with Drupal class=rdf-meta/span

Microserve: Drupal.org - Contributing a Module The Review Process

Wed, 05/08/2013 - 16:40
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encoded pI recently went through the process of contributing my first Drupal 7 module, and while the process isn't too hard there were many things that would have been helpful to know at the start rather than finding out half way through the process. As a result of my experiences I've decided to put together this blog which covers many of the common pitfalls people run into and provides a collection of useful links to various bits of documentation on Drupal.org./p h2How It Works/h2 pWhen you first register at drupal.org you will only be able to create sandbox projects, once you've created your first sandbox project you will be able to apply for full project access. Applying for full project access means your sandbox project will have to go through a review by the community, once that's approved you will gain full project access and wont have to get any future projects reviewed./p h2Getting Started/h2 pThe first thing you'll need is an idea of what the module you want to create will do, once you've come up with the idea check that there aren't existing modules that do the same thing and make sure what you are trying to do should be in its own module and not just part of another existing module. If your module is too similar to an existing module then your project application will be declined, and any hard work you've put into the module will have gone to waste. For more information on duplicate modules see a href=http://drupal.org/node/23789collaboration rather than competition/a./p h2Creating a Sandbox Project/h2 pCreating a Sandbox project is fairly straight forwards, but be sure to check out a href=http://drupal.org/node/997024tips for a great project page/a or for even more project page tips a href=http://growingventuresolutions.com/blog/module-owners-how-make-your-module-description-usefulHow to make your module description useful/a. Your project application may be delayed if the description of your project isn't sufficiently detailed./p pWhen setting up Git for your new sandbox project if you follow the instructions provided you will end up with a master branch, unfortunately this isn't actually correct, Drupal requires that you work out of a major version branch (7.x-1.x for example) instead of master. You will need to change this before your project goes for review, read through a href=http://drupal.org/node/1127732Moving from a master to a major version branch/a to find out how to do this./p h2Coding Your Project/h2 pGetting your code to meet the standards expected by Drupal is quite easy, it does however involve reading through a lot of documentation, these are the bits I found most useful:/p ullia href=http://drupal.org/coding-standardsCoding standards/a/li lia href=http://drupal.org/coding-standards/docsCommenting standards/a/li lia href=http://drupal.org/writing-secure-codeWriting secure code/a/li lia href=http://drupal.org/node/161085Module documentation guidelines/a (also see a href=http://drupal.org/node/447604README files/a)/li /ulpOnce you've read through the above and written some code there are some handy tools available to check that your code complies with Drupal's standards:/p ulliThe a href=http://drupal.org/project/coderCoder module/a which checks your module code on your local Drupal installation./li lia href=http://ventral.org/ventral.org/a which can be used to test your code once it has been pushed to the repository on drupal.org./li /ulpIf either of the above tools pick up any errors they will be brought up in your project application, and you will be expected to fix them however trivial they may seem./p p /p h2Applying for Full Project Access/h2 pBefore you apply make sure you check that the sandbox module you are going to apply with meets all of the requirements listed in the a href=http://drupal.org/node/1587704Project application checklist/a, also note you can only apply for full project access with one sandbox module./p pWhen you're ready to apply for full project access read a href=http://drupal.org/node/1011698Apply for permission to create full projects/a for guidance. Once you've done this you will need to obtain a review bonus. Although the documentation suggests obtaining a review bonus is optional in practice, it truly isn't if you want your module to be reviewed in any sensible amount of time./p pTo get the review bonus you will need to review three other modules, see a href=http://drupal.org/node/1975228Review bonus/a for guidance on how to do this. Make sure that your review of the other modules is sufficiently detailed as your review will not be counted if it's just a copy of the results from ventral.org./p pOnce you have your review bonus add the tag and you should find your module being reviewed shortly after. Note though if any major issues are found you will not only have to fix them but will have to re-earn your review bonus so it's well worth reading the standards documentation etc... beforehand as it will probably save you time in the long run./p p /p pGood luck with your module!/p /div/div/div

LevelTen Interactive: Using Drupal 7 Entity Reference to help Create User Dashboards

Wed, 05/08/2013 - 15:55
img typeof=foaf:Image src=http://getlevelten.com/sites/default/files/styles/600x300/public/content/blog/images/entity_reference.png?itok=i4eCf7D8 width=600 height=300 alt=User Dashboard / pOver the years, I have noticed a significant increase in the need for businesses to create user dashboards from which their customers are provided account details, up-to-date reports, downloadable documents and other important information. As more clients ask for user-driven websites that provide user-specific information, the need to relate or reference various types of content/data together is becoming commonplace.... a href=/blog/brent-bice/using-drupal-7-entity-reference-help-create-user-dashboards class=more-linkRead more/a/p

Drupal Easy: DrupalEasy Podcast 105: Men in Tights

Wed, 05/08/2013 - 15:38
div class=field field-type-link field-field-embed a href=http://podcasts.drupaleasy.com/DrupalEasy_ep105_20130508.mp3 rel=enclosureDownload Podcast 105/a /div pBob Kepford (a href=http://drupal.org/user/212517kepford/a) from a href=http://theweeklydrop.com/The Weekly Drop/a joins Andrew Riley, Ted Bowman, and Mike Anello to talk about how Bob mines nuggets of Drupal goodness from the weekly Drupal firehose. Other topics discussed include Panopoly, open-source project statistics, the impending Google Reader apocalypse, Open Atrium 2.x, and a bunch of other mostly Drupal-related topics./p pa href=http://drupaleasy.com/podcast/2013/05/drupaleasy-podcast-105-men-tights target=_blankread more/a/pimg src=http://feeds.feedburner.com/~r/DrupalEasy/~4/l0kmV9GDDlo height=1 width=1/

Amazee Labs: How Drupal Views Auto-Refresh really works

Wed, 05/08/2013 - 15:27
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpa href=http://drupal.org/project/views target=_blankViews/a is a great module and as you'll probably know it is the a href=http://drupal.org/project/usage target=_blankmost downloaded module/a in Drupal's history. The possibilities which Views provides you with are almost endless but there is one limitation. The generated output of a view is by default static. What if you want to have a dynamic activity stream as you know it from Twitter or Facebook?/p pAllow Drupal's unofficial slogan to answer that question: There is a module for that! The module in question is a href=http://drupal.org/project/views_hacks target=_blankViews Hacks/a and contains another module called Views Auto-Refresh. There is a a href=http://thereisamoduleforthat.com/content/auto-refreshing-views-real-time-information-streams target=_blankblog post/a about how to implement this module in order to get it to work as you want to, but it seems like this post doesn't cover all of the aspects that are implemented in the dev-version. A a href=http://thereisamoduleforthat.com/content/auto-refreshing-views-part-ii-optimizing-pings target=_blankfollow up blog post/a offers a little more insight, but still not everything I needed./p p On a side note:strong /strongIn this tutorial we will use the dev-version of Views Hacks, because the alpha was buggy at the time, and the implementation of the JavaScript part is not in the Drupal way anymore./p h3Preparation/h3 pimg alt=Views autorefreshb src=http://blog.amazeelabs.com/sites/default/files/views_autorefresh_1.png //p pLet's get started with the implementation. I assume that you have downloaded, installed and activated Views, Views UI, Views Hacks and Views Auto-Refresh. Further I assume that you have created a view for which you want to use the auto-refresh feature./p pI will demonstrate the implementation of Views Auto-Refresh by showing screenshots of the a href=http://likemag.com target=_blankactual project/a./p h3Implementation/h3 pimg alt=Views autorefresh src=http://blog.amazeelabs.com/sites/default/files/views_autorefresh_2.png //p pMake the following configurations:/p ulliFirst of all, you need to duplicate your actual view as a view page. Give it a semantic name like autorefresh./li liGive the page a unique path as displayed in the screenshot above./li liAlso give an easy-to-remember machine name./li liMake sure that the view is using AJAX./li liAdd the Content: Post date (with operator) or any other timestamp as a contextual filter (we used the Content: Updated date). Views Auto-Refresh will provide the timestamp needed./li /ulpNow head over to your view and add a Global: Text area with the text format PHP Code and add following code:/p prelt;?php print theme('views_autorefresh', array('interval' =gt; '30000', 'incremental'=gt; array( 'view_base_path' =gt; 'frontpage/autorefresh', 'view_display_id' =gt; 'autorefresh', 'view_name' =gt; 'articles', 'sourceSelector' =gt; '.view-content', 'targetSelector' =gt; '.view-content', 'firstClass' =gt; 'views-row-first', 'lastClass' =gt; 'views-row-last', 'oddClass' =gt; 'views-row-odd', 'evenClass' =gt; 'views-row-even', ))); ?gt;/predivimg alt=Views autorefresh src=http://blog.amazeelabs.com/sites/default/files/views_autorefresh_3.png //div div /div divAs you can see, there is a base path and a display ID.br / The base path equals your defined page path, and the display ID equals the Machine name of the auto-refresh View./div divinterval defines how often the auto-refresh View is being called while view_name is the machine name of the actual view./div pThe additional settings are the selectors and classes which will be addressed by the JavaScript of Views Auto-Refresh. I don't want to dig too deep since they should be self describing./p pNow you might think that everything is done. But no, wait, we have to add the same code to the header of your original view. So do the same thing there as I have described it above. Please make sure that this view also uses AJAX, else it wouldn't work./p h3Further possibilities/h3 pIn our project we use the jQuery library a href=http://isotope.metafizzy.co/ target=_blankIsotope/a which sorts all the posts dynamically on loading or resizing. But you have to trigger the re-layout of the page if the Views Auto-Refresh has delivered some new posts. This is really simple and straight forward. You just have to add a Drupal behavior in your JavaScript like this:/p pre/** * Add functionality to trigger reloadItems after an autorefresh */ Drupal.behaviors.triggerIsotopeAfterAutorefresh = { attach: function(context, settings){ $('.view-id-articles').bind('autorefresh.incremental', function() { //getting the content/context $isotope = $('.view-id-articles .view-content'); //reload all items by original order $isotope.isotope( 'reloadItems' ).isotope({ sortBy: 'original-order' }); }); } }/prepAs you can see, you can just bind the event 'autorefresh.incremental' to execute your own code. 'autorefresh.incremental' is fired every time the Views Auto-Refresh module loads the designated view./p h3Conclusion/h3 pAfter a few trial and error attempts, I finally figured out how Views Auto-Refresh really worked. There is a lot more to this module that isn't documented. So it is much more powerful than I can describe in only one blog post. So go on and give it a go./p pstrongUpdate 9.5.2013/strong: As pointed out by Phil Dodd in his comment the Views Auto Refresh module has been moved to its own home at a href=http://drupal.org/project/views_autorefreshhttp://drupal.org/project/views_autorefresh/a./p p /p /div/div/div

Mediacurrent: How to Prepare Your Website for Drupal 8

Wed, 05/08/2013 - 15:21
img src=http://www.mediacurrent.com/sites/default/files/imagecache/thumb_blog_spotlight/drupal8.png alt= title= class=imagecache imagecache-thumb_blog_spotlight imagecache-default imagecache-thumb_blog_spotlight_default width=200 height=150 / pDrupal 8 may seem a long way off but we are approximately 6 months away from its target release date in fall 2013. Though a href=http://www.mediacurrent.com/blog/whats-new-drupal-8 target=_blankDrupal 8/a won’t be released until all critical issues have reached zero (a href=http://drupal.org/core-mentoring target=_blankAre you helping get there?/a) there are things you can do now with your Drupal site to prepare for Drupal 8’s release./p

more onion - devblog: Unraveling a Field-API mystery (or the journey of field item data)

Wed, 05/08/2013 - 13:23
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even pDuring development of the a href=http://drupal.org/project/pgbarpgbar module/a I often ran into Notices for something in code$items/code. This time I said to myself: Let's get this straight once and for all. So I've inserted some debug code into my module to track which field related hook can manipulate data and in which order they are called. You can see the result in the dot-graph at the bottom./p/div/div/divdiv class=field field-name-field-tag field-type-taxonomy-term-reference field-label-inline clearfixh3 class=field-labelTags: /h3ul class=links inlineli class=taxonomy-term-reference-0a href=/tags/drupal-planetDrupal Planet/a/lili class=taxonomy-term-reference-1a href=/tags/drupal7drupal7/a/lili class=taxonomy-term-reference-2a href=/tags/fieldsfields/a/li/ul/div

Modules Unraveled: 061 The Walkthrough.it Project with Kristof Van Tomme - Modules Unraveled Podcast

Wed, 05/08/2013 - 07:00
div class=field field-name-field-image field-type-image field-label-hiddendiv class=field-itemsdiv class=field-item evena href=/podcast/061-the-walkthroughit-project-with-kristof-van-tomme-modules-unraveled-podcastimg typeof=foaf:Image src=http://modulesunraveled.com/sites/default/files/styles/thumbnail/public/podcast/images/kristofvantomme.jpg?itok=7rdHNP9- width=140 height=112 alt=Photo of Kristof Van Tomme //a/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:encodedh2Walkthrough.it/h2 ulliWhat is walkthrough.it?/li liI heard that this works with Selenium in the background ulliWhat is Selenium?/li liHow does Selenium make this awesome?/li /ul/li liHow is this related to the Tour module in Drupal 8 core?/li liHow do you record walkthroughs?/li liHow do you play walkthroughs?/li liYou recently finished a crowdfunding campaign on IndieGoGo, can you tell a bit more aboutbr / that?/li liWhat things did you promised as part of the campaign? ulliWalkHub: walkthrough server distribution,/li liWalkthrough module for Drupal/li lireally awesome t-shirts/li liWalkHub.net: GitHub for interactive tutorials/li liAn iPad application with introductory tutorials for Drupal distributions/li /ul/li /ulh2App/h2 ulliWhat is this iPad app for?/li /ulh2Drupal Module/h2 ulliCan you tell me a bit more about the Drupal module?/li liWill there be versions for both Drupal 7 and Drupal 8?/li /ulh2Grand prize: documentation of a distribution/h2 ulliYou promised that you would document 1 distribution with walkthroughs if your IndieGoGobr / campaign would be a success. Do you already know which one will win?/li /ul/div/div/div

Ryan Oles: Hubot Drush me Drupal

Wed, 05/08/2013 - 06:15
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpRecently the company I work for shifted the bulk of our instant message communications over to a href=http://campfirenow.com/Campfire/a, and established a series of rooms to discuss our various projects. This transition seemed to go fairly well, once everyone settled on their preferred client interface. I was used to using IRC and found a a href=https://github.com/zerowidth/camper_vannice little Ruby gem/a that piped Campfire through my IRC client. Chatting in this environment quickly had me missing Druplicon, the friendly Drupal fueled chat bot that tirelessly serves the Drupal IRC community. I decided to look for a replacement, and after some searching I stumbled upon a href=http://hubot.github.com/Hubot/a, a Node.js powered chat bot. It was initially built by the folks at GitHub and includes a long list of a href=http://hubot-script-catalog.herokuapp.com/plugin scripts/a added by community developers. This was immediately appealing for several reasons:/p ul liIt is built using Node.js/li liIt is written in Coffeescript (something I have wanted to try my hand at for a while)/li liAdditional scripts appeared easy to write, and plugin simply/li liIt has built in Campfire integration/li /ul pSo I installed Hubot on a small server, with a handful of scripts that I thought would be useful and fun for our team. Adding the bot to our Campfire rooms was fairly painless, and after writing a small init script we were good to go. This sparked some discussion among our team about how the bot was deployed, cool ways it could be extended, and methods of use. A fellow developer, a href=http://davidfells.net/David Fells/a, mentioned that it would be handy if we could tell Hubot to execute a href=http://drupal.org/project/drushDrush/a commands. This gave me pause, and after a quick:/p pThat's a great idea! You mind if I implement that?br / Sure, go for it./p pI found myself firing up my editor, trying a few test methods, and reading up on a href=http://coffeescript.org/CoffeeScript/a. Things moved fairly quickly, once I got going. I realized a href=http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_optionscodechild_process.spawn()/code/awas going to be my friend, a core Node method that I had yet to use. Generally CoffeeScript proved to be the biggest challenge. While writing the initial prototype I actually used a a href=http://js2coffee.org/JavaScript to CoffeScript translator/a and was cursing the whole time. However, by the time I was putting the finishing touches on my methods and objects I found myself smiling as I wrote in this almost comical syntax. Simply put, CoffeeScript is fun! I still find myself favoring the comforting structure of the curly braces and semicolons when working with JavaScript, but now that all seems somewhat gray and drab, knowing there is something much more playful out there./p pAs you can imagine there were, and are, several security concerns. The early prototype actually had user commands pipe right into Drush which is a security nightmare. Any user with access to the bot could escape or pipe in any old Bash command directly through the bot. Further, any Drupal installation that Drush is aware of would be at the mercy of users who may or may not have the best intentions at heart. Needless to say this approach was quickly abandoned in favor of a hand picked list of commands made available to the bot. This caused the code to be a bit more tedious, and likely less elegant, but I needed to insure that Drush would be executing the allowed commands, and nothing more. After some discussion I also decided to weed the available commands down to a relatively innocuous set (giving information vs. actually changing something). I attempted to structure the code in a way that it would not be difficult for another developer to add commands. Overall, I'm pretty happy with the a href=https://github.com/github/hubot-scripts/blob/master/src/scripts/drush.coffeeend result/a, and the pull request was soon accepted. You can find this script along with all of the other a href=http://hubot-script-catalog.herokuapp.com/#drush.coffeeHubot scripts on GitHub/a./p pemstrongtl;dr/strong If you're looking for a fun chatbot for campfire (or otherwise) check out a href=http://hubot.github.com/Hubot/a and enable a href=http://hubot-script-catalog.herokuapp.com/#drush.coffeedrush.coffee/a if you'd like that bot to have cool Drush functionality./em/p /div/div/div

Expresstut: Multiple file upload in drupal using plupload

Wed, 05/08/2013 - 02:04
p /p divIn this tutorial we will be looking at how we can allow multiple file upload in drupal. To achieve this, we will be considering the plupload module./div divPlupload is a GPL licensed library used for multiple file uploading/div divThe plupload module allows backwards bend in other to achieve cross-browser compatibitility. using HTML5, flash, silverlight and even the classic HTML4 depending on the clients computer resources./div div /div divModules used for this tutorial./div div /div diva href=http://drupal.org/project/filefield_sourcesFilefield sources/a/div diva href=http://drupal.org/project/filefield_sources_pluploadFilefiled sources plupload/a/div diva href=http://drupal.org/project/pluploadplupload/a/div

Friendly Machine: Custom Content Types and the Fields UI

Tue, 05/07/2013 - 20:42
div class=field field-name-body field-type-text-with-summary field-label-hiddendiv class=field-itemsdiv class=field-item even property=content:encodedpOne of the best things about Drupal is the ability to flexibly manage your content. If you're coming from a WordPress background, you'll know that system uses the emPost/em and emPage/em for its content types. In Drupal you have something similar in the emArticle/em and emBasic page/em, but also an easy to use interface for creating a virtually unlimited number of other content types./p !--break-- pBefore we get into the how, let's briefly discuss why we would want to use custom content types. Some of you may be thinking to yourselves that you've been getting along very nicely without additional content types. Whenever you've needed to organize your content, you've always had your taxonomy terms handy./p pAlthough taxonomy terms (the equivalent of emCategories/em in WordPress) are very useful, they don't solve the same problem as content types. Let's break away for a moment from the idea of our site consisting of pages and instead think of it as being comprised of objects. Of course we still have objects we call pages, but we may also find that our site has other types of objects like products, events, and forum topics./p pUltimately, all of our objects may be expressed as web pages, but conceptually they represent different types of things and have often have different characteristics. We can use Drupal's custom content types and the Fields UI to define these objects and give a more logical structure to our site's content. /p pNow you may be asking about those taxonomy terms...where do they fit in? Taxonomy terms simply help us differentiate between the variations we find within our objects. For example, a bicycle and a shirt are both products, but certainly quite different. So we can use taxonomy terms to essentially create sub-categories within our content types. In a future lesson in a href=/learning-drupalthis series/a we'll take a closer look at taxonomy in Drupal./p h2Creating a Custom Content Type/h2 pNow that we have an idea of why we would want a new content type, let's create one called Product for our a href=http://friendlymachine.net/posts/free-drupal-themeexample site/a. We'll begin by going to emStructure/em gt; emContent types/em. You should see something like the screenshot below./p pa href=http://friendlymachine.net/sites/default/files/uploads/images/_learning_drupal/create-content-type.jpgimg src=http://friendlymachine.net/sites/default/files/uploads/images/_learning_drupal/create-content-type-small.jpg alt=Custom content types title=Click to view larger image. width=730 height=345 //a/p pYou'll see a link at the upper left that says, Add content type. Go ahead and click that link. You'll be directed to the screen below where we can define our new content type./p pa href=http://friendlymachine.net/sites/default/files/uploads/images/_learning_drupal/new-content-type.jpgimg src=http://friendlymachine.net/sites/default/files/uploads/images/_learning_drupal/new-content-type-small.jpg alt=Creating a new content type title=Click to view larger image width=730 height=537 //a/p pThe name and description fields are pretty self explanatory, but we'll briefly go through the other fields in the tabs at the bottom of the form./p pstrongSubmission form settings/strongbr /You see three settings under this tab. The first is Title field label. This is what content creators will see when creating a new piece of content and by default it's set to, Title. Frequently with custom content types, this isn't as descriptive as we would like. In our case we should change it to something like, Product name. /p pThe second setting controls preview options and the last one allows you to create a message that will be displayed at the top of the page providing submission guidelines. This can be very useful if the content type you are creating will be user-generated content./p pstrongPublishing options/strongbr /These setting help you determine the default status of the post when you click 'Save'. For example, should the post be automatically published? Should it be promoted to the front page? If you have the a href=http://drupal.org/project/revisioningRevisioning module/a installed you will also see options for creating a new revision - very handy if you want to be able to roll back any changes./p pstrongDisplay settings/strongbr /You can disable the display of the author and post date information by unchecking this box./p pstrongComment settings/strongbr /This is where you can adjust the settings for the comments on your site. I personally recommend you consider disabling Drupal comments and use a third party commenting system. I've talked about this in a a href=http://friendlymachine.net/posts/drupal-comments-look-optionsrecent post/a, but suffice it to say there are significant advantages to not using Drupal's built-in comments./p pstrongMenu settings/strongbr /With this setting, you can optionally make your content assignable to any menus you may have created for your site./p pstrongXML sitemap/strongbr /This setting isn't present in Drupal by default, but is found in our example site because using a sitemap is such an important - and in my view, fundamental - part of building a website. However, there are times when you may not want a content type indexed by search engines and here is where you can disable that if needed./p pstrongCustom breadcrumbs/strongbr /This is another one that isn't included by default with Drupal, but also very useful for most sites. It exposes the custom breadcrumb information on the node edit form. /p pFor most of these settings, we'll stick with the defaults. Once we've given our content type a name we'll click the Save and add fields button at the bottom of the form. You should then see something similar to the image below./p pa href=http://friendlymachine.net/sites/default/files/uploads/images/_learning_drupal/fields-ui.jpgimg src=http://friendlymachine.net/sites/default/files/uploads/images/_learning_drupal/fields-ui-small.jpg alt=Fields UI title=Click to view larger image. width=730 height=407 //a/p h2The Fields UI/h2 pThe image above is the Fields UI, the administrative interface for adding and configuring the fields for your content types. There are a few fields here that have been added by modules that are installed with the example site (Meta tags, for example) and two that are included by default by Drupal. The default fields are emTitle/em - in our case renamed to emProduct name/em - and emBody/em./p pWhat we're going to do next is add a new field. Since we're adding a content type for our products,  emPrice/em seems like a logical field to start with./p pa href=http://friendlymachine.net/sites/default/files/uploads/images/_learning_drupal/adding-price-field.jpgimg src=http://friendlymachine.net/sites/default/files/uploads/images/_learning_drupal/adding-price-field-small.jpg alt=Adding price field to a content type. title=Click to view larger image. width=730 height=407 //a/p pYou'll notice in the area highlighted in green how we have the form filled out. Our emField type/em is set to decimal and we've chosen a text box for the widget - aka input element -  that will appear on the node create form for our content type. Let's go ahead and click emSave/em to continue./p pThe next screen (not shown) allows us to set the precision of our decimal number as well as how many digits should be to the right of our decimal point. We've kept these at the defaults and continued to the screen below./p pa href=http://friendlymachine.net/sites/default/files/uploads/images/_learning_drupal/content-type-settings_0.jpgimg src=http://friendlymachine.net/sites/default/files/uploads/images/_learning_drupal/content-type-settings-small.jpg alt=Content type settings title=Click to view larger image. width=730 height=1109 //a/p pWe won't go over each of these, but an important point to keep in mind is that these settings will change depending on the content type you set for the field. For example, if you chose the image type, you would have settings for allowable file formats, maximum and minimum image size, as well as for which a href=http://friendlymachine.net/posts/working-images-drupalimage style/a you wanted to apply./p pIn this particular example, one field we may want to change would be the prefix. Maybe setting it to the dollar sign (or pound, euro, etc.) might be a good idea. Let's do this and then click save. You'll then see that our field has been added to our content type and we can change its position on the node create/edit form by dragging it up or down our list of fields./p pBefore we move on we should briefly note that you can also reuse fields that you may have defined previously using the, Add existing field component. One situation where this may come in handy is for an image field. Instead of having multiple image fields, you could reuse a single field for all of your content types and control the display of the image using image styles. Sometimes this may not be what you need, but in general it's a good practice because it will make things less confusing as your site grows in complexity./p h2Managing Display/h2 pThe final thing we'll discuss is managing the display of our fields. You'll see a tab on the page titled, Manage Display. The settings on that tab are pretty straightforward so I won't go into too much detail, but something that new site builders sometimes do is forget to hide the display of the label for certain fields, in particular, those for images. This tab is where you can remove the label for those images as well as other aspects of how the fields for the content type will be displayed on your a href=http://friendlymachine.net/posts/basic-site-building-conceptsnodes/a (aka web pages)./p pThat's it for our discussion of content types and the fields UI. There is a lot going on, but fortunately it is pretty intuitive to use, particularly once you've got a handle on what is happening conceptually. Next time we're going to take a look at using Views - a big and very important topic! If you'd like to keep up to date on this series, you can subscribe to the a href=http://friendlymachine.net/learning-drupal.rssRSS feed/a./p pIn the meantime, if you'd like to comment on this post, you can do so on this a href=http://drupal.org/node/1989340discussion forum/a./p /div/div/div

LevelTen Interactive: Drupal Learning Curve too Steep for the Weak

Tue, 05/07/2013 - 19:41
img typeof=foaf:Image src=http://getlevelten.com/sites/default/files/styles/600x300/public/legacy_files/idiot.jpg?itok=E877Bb7v width=600 height=300 alt= / pI am sick and tired of hearing that the a href=http://dimitriokunev.com/post/2956689013/learning-curve-modx-joomla-wordpress-drupal target=_blankDrupal learning curve is much steeper/a than the WordPress learning curve. The reality is, both platforms are a href=http://dougal.gunters.org/blog/2010/10/13/wordpress-and-drupal-convergence/ target=_blankstarting to converge/a in several areas.... a href=/blog/superuser/drupal-learning-curve-steep-weak class=more-linkRead more/a/p

Open Source Training: Move a Drupal Site to a New Folder

Tue, 05/07/2013 - 18:15
pMoving a Drupal site to a new location on your server is surprisingly easy./p pThere is a simple 3 step process to move a Drupal site from one folder to another. In this tutorial we're going to show you those 3 steps./p pIf you'd like to move a Drupal site to new folder, we recommend using ta href=http://www.ostraining.com/courses/class/drupal/backuphe Backup and Migrate module/a./pimg src=http://feeds.feedburner.com/~r/ostrainingdrupal/~4/bL81lptoDiQ height=1 width=1/