Thứ Sáu, 13 tháng 7, 2012

Creating A Custom Page Using Panels

This video shows you how to create a custom page for your site using the Panels module. You can use Panels to help you make pages (including a front page) that include a variety of content from your site including content that exists in views, blocks and nodes. The Panels module is dependent on the Chaos Tool Suite module.

Note: Click the 'full screen' icon (to the left of the volume control) in order to watch online at full 1280x720 resolution.

Video Links

View the original article here

Take Big Action With Views Bulk Operations

Printer-friendly versionPDF version

Recently I had to plan the unenviable task of adding terms from a new taxonomy category to dozens of nodes that had previously been created on a site. As I pondered my options (including a temporary Caribbean vacation) I remembered module I had seen pop up on Drupal.org called Views Bulk Operations or VBO for short. 

What VBO allows you to do create a view that will apply an action to many nodes at one time. So you must have the Views module installed and it helps to know your way around views a little bit because after installing and enabling VBO you'll need to create a Node view that will allow you to create a list of the nodes that you want to apply actions to.

The view that I created to make the taxonomy updates to the nodes in question had a pair of fields that allowed me to identify the nodes to update. Those fields for Title and Type, as in node type. This was just enough info to know for sure whether or not I wanted to make a change to the node. I added to the view a couple of exposed filters that would allow me to narrow down the list of the nodes by selecting the node type and a string of text from the title. The image below shows you what the finished product looks like.

So with this layout using exposed filters I can then make a couple of choices to filter the list down to the nodes I want to change. Then in the actions to take section I can indicate what I want to do by selecting the appropriate radio button. Then I can select one or more of the vocabularies in order to make that change. In my case I had added a whole new vocabulary with new terms so I chose Add the selected terms and then selected the vocabulary term that I wanted to apply (in this case from the Node Type vocabulary) before selecting the nodes (either one by one or by clicking the box next to Title to select all) then clicking the button (not shown in the image) at the bottom of the page to apply the update. At the end of the process you should see a confirmation that the nodes were updated. At that point you should double check a few of the nodes to make sure the updates were applied as you intended them.

Here's a little more about how I got to the end described above. The image below shows where you would select the style of Bulk Operations which is required for your view to offer you the correct options. Take note that the type of display you're looking for is one of Page. One more important thing to notice is the Access setting. Since this is the kind of function you would only want available to special users make sure you have Access set in a way that limits the ability to get to the page. In my case the user must have the permission to administer content types.

 

The image below shows the many options for the Bulk Operations style choice. Notice that I chose Modify node taxonomy terms as the only option. I don't know enough about the module yet to choose multiple options at once so I just stuck with the one.

The image below is what the preview looked like before I saved and attempted to use the view for the first time. Take note once again of the three elements. 

Exposed filters which allowed me to narrow down the list of nodesThe actions to take which should be consistent with my Bulk Operations settings choicesThe fields, Title and Type, which allow me to identify whether or not these are the correct nodes to take action on

Okay, so now you're ready to do some damage (in a good way of course) and make big changes to your nodes in a very short period of time. A final word of caution though. I did all of this on a pre-production site so if I did make a mistake it wouldn't affect site users. If you are trying VBO out for the first time I recommend doing so on a test site so that you can get the hang of what you need to do without having to back out major changes. Of course, if you make the wrong changes using VBO you can always back those changes out....using VBO.


View the original article here

Thứ Năm, 12 tháng 7, 2012

Bringing Your Site Back Online (...And user roles)

Printer-friendly versionPDF version

 I recently received an email asking me how to bring a Drupal site back online after taking it offline for site maintenance. For those of you who haven't done this yet you can take your site offline (and put it back online) by going to /admin/settings/site-maintenance. If you take your site offline for maintenance, then log out of the site you will get the "Site off-line message" indicated in your settings. To get back into your site all you need to do is go to /user/login. There you will be presented with the login form that you can complete in order to gain entry to your site.

It's important to understand that unless you specifically set the permission for "administer site configuration" under the system module then only user #1 can manage the maintenance status of the site. If you do want to grant this access to another user then you will also probably want to grant access to "access administration pages" as well. A screenshot of the appropriate section of the user permissions page (/admin/user/permissions) is included below.

System Module Permissions

I received another question recently that relates to roles and permissions as well. A reader asked how they could eliminate all of the extra fields below the node body when editing a node. An example of these "extra fields" is shown below.

Vertical Tabs

This is what the node submission form looks like with the vertical tabs module installed. Vertical tabs is highly recommended for Drupal 6 sites. In Drupal 7 this is a core module so you'll have it out of the box. What about the fields though? Users should not see those "extra fields" as long as they don't have the "administer nodes" permission.

If you're concerned about what your users who can contribute content to your site are seeing I recommend that you do two things. First, check your permissions in the Node Module section of the User Permissions page to see what the appropriate role can and cannot do. Second, create a user for yourself with a role equal to that of your contributors. This way you can login with the contributor role and see what they see. The Masquerade module looks like something that would assist with switching on the fly so you don't have to log out and log back in. You can also use separate browsers or use something featured in the Google Chrome web browser called an incognito window.

At this point I think it's worth noting just how important roles are on your Drupal site. They are definitely worth thinking about. Out of the box there are two user roles which are anonymous and authenticated. Those roles are in addition to the everything (or "god") role that is granted to user #1 on the site. If you're going to have a site where people cannot sign up for accounts (configure that at /admin/user/settings) then you won't have to spend too much time on it. Your user setting options are pictured below.

User Settings

If you are going to allow people to sign up for accounts then think hard about the access they will have. If you're in a situation where there will be other administrators or site editors then it is likely that you will want to set up additional roles (do this at /admin/user/roles) to give those users special permissions. For example, if you have people who are editing content or perhaps moderating comments then you would create a separate role, assign the appropriate permissions to the role then assign the role to that user. Roles can be assigned manually in the account page of a user as shown in the picture below.

If you want roles to be assigned automatically I suggest that you investigate the Auto Assign Role module. I haven't used it yet but I have it on my list of modules to try for another site that I am working on.

If you have any ideas, tips or tricks related to user roles I'd love to hear about them in the comments.


View the original article here

Running Cron On Dreamhost

This short video shows you how to create a cron job using the Dreamhost web panel that will allow you to execute cron on a Drupal site. As I have noted previously execution of the cron file is an important task for any Drupal site. Many modules rely on cron for periodic processing of data including the core search and aggregator modules. Running cron also prompts the system to check for module updates. 

Here's what I entered in the video. Be sure to replace the url with url of your site. wget -qO /dev/null http://yoursite.com/cron.php

This video is one in a series of videos I created called Getting The Most Out Of Dreamhost. If you're a current Dreamhost customer you probably already know how to do things like set up a domain or create a MySQL database so it may not be relevant to you. If you're considering Dreamhost I think the series offers a very good preview of how the web panel functions make it easy to launch new Drupal sites. There's also a discount code (LEARNDRUPAL2010) on that page that will save you $50 on a new Dreamhost web hosting account.

Note: Click the 'full screen' icon (to the left of the volume control) in order to watch online at full 1280x720 resolution.

Video Links

View the original article here

Managing A Drupal Site On The iPad

Printer-friendly versionPDF version

For the past couple of months I've had my hands on an Apple iPad and one of the first things I was interested in trying out was how effectively I could manage my Drupal sites with the device. Since I didn't want to jump to hasty conclusions about how good or bad the experience is I've waited all this time to write about it. In general I'll say that it's not a bad experience. The larger screen makes managing your site much more realistic than on the iPhone which I think is nearly an impossible task because of the small screen size. With that said you won't want to sound much time engaging in hard core site building on the iPad either.

Here's what you can do. You can access any menu item even with the Administration Menu module that places a bar at the top of the screen. The drop down menus work fine so you can navigate around very quickly. You can enter text anywhere there is a plain text box. HTML formatting must be accomplished by hand. I haven't tried it yet but one of the modules that adds the correct code for you at the press of a button might make things easier. It's on my to do list to try that. You can move around the administration section and change settings pretty easily. Comment moderation and responding is also very doable especially if you don't rely on a rich text editor. You can create basic blocks and nodes (I'm creating this post on my iPad) as well but the limitations I'll mention in a moment make it a frustrating task for anything beyond basic text entry.

Here's what you can't do. You can't use a WYSIWYG editor in a text area. You can work around that by making sure the "switch to plain text editor" link is available. That allows you to enter plain text but also wipes out the line breaks once you preview the node. So your nodes or blocks will have limited formatting. You also can't access your local file system which means that you can't upload attachments or images. So the expectation should be that you can do basic editing and content creation but nothing fancy. I use the Popups API to make things easier when managing blocks and comments. I've found that the resulting popups don't scroll so that module is not very helpful if you're on the iPad. You also can't scroll within or resize the text input area which makes creating long nodes very difficult. In fact nothing that usually involves clicking and dragging, or hovering the mouse works as far as I can see. In general the experience of managing Drupal via the iPad is a mixed bag. You can get to your site settings, manage comments and create basic nodes and blocks. Since I do my most serious managing of the site at home this level of access works fine for me. I'd like to upgrade the experience though. I suppose it's on Apple to offer access to the file system and perhaps upgrade mobile Safari to work with WYSIWYG editors. Even Google Docs doesn't work yet so we're not alone there.

The bottom line is that there are limitations that prevent anyone from doing serious development on a Drupal site via the iPad. So if you have your heart set on building and creating content on a light weight device then a netbook is a much better choice. So that's my take. If you have suggestions for work arounds, modules or helpful apps I'd love to hear about them in the comments.

Here are some screenshots that I added to this post after creating it on the iPad. From left to right they show what it looks like when editing a block, activating a popup dialog and editing a comment entry, all in landscape mode. I like the landscape mode better for management because it allows me to see the appropriate areas of the screen close up and the keyboard size is much more usable.


View the original article here

Adventures In Authentication

Printer-friendly versionPDF version

A Capital Region Drupal meetup (the first of its kind I believe) is scheduled for March 6th and I hope to be able to talk about authentication and identity. Just a couple of years ago the issue of authentication and identity on Drupal sites was limited to the functions of the Drupal login system. I remember that the first module I ever utilized to improve the login process was LoginToboggan. LoginToboggan adds such nifty features as logging in with name or email address, placing a login form on pages not accessible to anonymous users and much more. It's a great module and I still use it today. Since then we've also seen a few social networks like Twitter and Facebook increase greatly in popularity. So while millions of people create accounts on those services they may not necessarily want to create an account (and have to remember another password) on your Drupal powered site.

Lucky for us Drupal site builders that the big social networking players realized that in order to get even bigger they would need to reach out to other sites. They have done so via APIs such as Facebook Connect, the Twitter API and Google Friend Connect. All three of these services allow someone to login to a website with their credentials from each of these services. So this allows people to log in to your Drupal site with their identity from Facebook, Google, or Twitter. Pretty cool, eh? All you need are the modules that make the connection between your site and these services.

Modules do exist for each of the three services mentioned above. Facebook Connect, Twitter, and Google Friend Connect all allow you to authenticate users to your site. They require varying degrees of technical expertise to set up and the exact functionality varies too. The good part is that they all seem to excel at verifying the identity of an anonymous visitor to your site, at least temporarily. The bad part is that they really don't fit in with the normal Drupal account creation process. If you're just looking for someone to be able to authenticate temporarily to add a comment they work great. If you want someone to be able to quickly create a full account, with access to all of the features of your site, with Google, Facebook or Twitter credentials then the modules fall short. What seems to work best is a hybrid approach where a user first creates an account on your site and then later connects to their account on the social network. After that they can log in with one of these services (provided you add the right links) and get all the benefits of a member of your site.

Earlier I mentioned varying degrees of functionality. Besides authenticating users these modules can do some publishing back to social networks as well. Facebook Connect will publish a link to a comment to an authenticated user's wall on Facebook. It will not publish to the wall when a new node is created though. The Twitter module will post to the wall when you add a new node but not when you add a new comment. The Google Friend Connect module will publish and update a site's "social bar" when you add a node or comment but it's not clear to me where else this activity shows up. What would be nice, and what I hope to see at some point would be for each of these modules to have similar functionality where users could choose to share a variety of activity on the site they logged in with.

The issue of account creation is also an important one. In order for these modules to be very useful they really need to fit in well with the standard Drupal account creation process. At this time they do not. One possibility would be to be able to assign people authenticating via a social service a certain type of limited role while capturing the minimum amount of information (such as username and email address) to create an account. Then generate an email that invites the person to return to the site and fill out a full profile. 

One other issue worth noting with the modules mentioned involves the placement of login buttons. Both the Twitter and Facebook modules add a button to the page at /user/login and to the login block. The Friend Connect button adds a button just above the comments but nowhere else. You can also use a snippet of code to place the Facebook and Twitter buttons where you want although the code isn't specifically made available. I just grabbed a snippet after viewing the page source html. I have been unable to do the same thing with the Google Friend Connect button. Examples of login placement are shown below.

Facebook and Twitter Login

Facebook and Twitter Login

Google Friend Connect Login

Google Friend Connect Login

As you can see there are various differences and shortcomings with these three modules. In order to really have a positive impact on site membership I think they need to be more flexible (placement of the login buttons for example), more integrated with the Drupal account creation system from the start and have consistent publishing functionality. There are other options available if you want something that is "plug and play."

If you just want to authenticate for comments and offer cross-publishing you can add the Disqus module which utilizes the service of the same name to manage commenting. In order to use this you need to turn off Drupal comments and you also lose the capability to search comments. Also keep in mind that Disqus does not create accounts on your site either. For account creation there is the Gigya Socialize module which integrates with the Gigya service. I have tested the Gigya module a little bit but I'm a bit concerned about running user data through the servers of another party besides my site and the one that the user is authenticating from. If Gigya goes down or has performance issues then it could prevent logging in or registering on my site. The same things goes for the Disqus service. There's also the issue of terms of service. I noticed the following in Gigya's terms of service for the socialize module in section 3, paragraph b.

End User Content. You retain all rights in your End User Content. However, by uploading, posting, submitting, linking to or otherwise transmitting any End User Content on or via the Site or Service, you hereby grant to Gigya a non-exclusive, worldwide, royalty-free, sublicensable, perpetual and irrevocable right and license to use, reproduce, modify, distribute, prepare derivative works of, display, publish, perform, transmit and access your End User Content in connection with the Service and Gigya’s (and its successors) business including, without limitation, for promotion and redistributing part or all of the Service (and derivative works thereof), in any media formats and through any media channels. 

I'm not completely comfortable with those terms. Gigya is well within their rights to set those terms since they are offering up free technology and computing power. As a site builder I would prefer to not expose myself or my community members to the possibility that their content could be published elsewhere. You might feel differently and in that case Gigya's service might work pretty well for you.

I think that it's important to discuss and ultimately create solutions for the issues discussed in this post. In fact I recently posted a bounty on drupal.org for a unified social authentication module. The bounty offer still stands. I'm also open to funding bounties for improvements to the individual modules as I have offered on in the Google Friend Connect issue queue. There are other discussions about this that I am aware of. The discussion called Social networking accounts: unified approach to store in external account data in user content profiles? covers some of the same issues I mention here and even mentions the fact that there is no module for LinkedIn. That's where I first say the Post It Everywhere module which is geared towards making authenticated cross posting easier. This module doesn't handle the sign up though. So there's still fragmentation.

All of this is a lot to digest. And I think it's too much to ask for one solution that does everything. After all, the meaning of everything changes as new social services and new functionality appears. It's an important discussion that I hope will lead to some better functionality soon. I'm going to do my part by talking about it, exchanging ideas and perhaps devoting some funds to help developers bring the features closer to what I would like to see.


View the original article here

Albany Drupal Meetup Notes

Printer-friendly versionPDF version

The first quarterly (hopefully ) Drupal meetup for the Albany, NY group took place last Saturday. Seven people from the upstate New York area attended and there was a lot of really good discussion about Drupal. Here's a summary of some of the things that we discussed.

Drupal for Educators

One member of the group was interested in using Drupal in an education setting. There was a discussion of whether or not Joomla or Drupal would best meet this person's needs. It's not surprising that we all felt Drupal was a great choice. That said I think it's important to be able to clearly and concisely make the value proposition for Drupal vs. other platforms such as Joomla and WordPress. Like anything else if we want Drupal to grow in a competitive environment then we need to know how to sell Drupal.

I recommended joining the Drupal in Education group for active discussion with people who are using Drupal for education on a daily basis. I also recommended checking out Moodle Integration which can add learning management features to a Drupal site. After the meeting I also discovered another Drupal 4 Educators site. There are also plenty of sites to be found via a Google search on "Drupal, Education."

Authentication and Identity

This was a topic that I initiated and lead the discussion on and it was inspired by my recent post about my Adventures in Authentication. This is a topic that everyone is interested in but for different reasons. From an educational point of view it seems that Facebook authentication is most important. There's also the issue of schools only wanting verified students and teachers to be able to sign up. Both security and process are very important. My needs are more general. I want to widen access to site features, build community and also cut down on spam and trolls. 

One very good point was made about consistency of the various APIs made available by the social services. It's hard to have consistent authentication and sharing functionality across services (Twitter, Facebook, Google, LinkedIn, etc.) because of differing API functionality. So while you may need different code in order to connect with each service you will also have different feature sets made available. 

Multi Site Support

I have received a number of queries on this site about how to run multiple domains off of a single Drupal install. This is something you might do if you have yoursite.com and want to also add community.yoursite.com, and allow visitors to have the same account across both sites. The Domain Access module was mentioned as a very good module to use for this purpose. A recent Lullabot blog post shows you how to do it without using a contributed module.

Code Management

Code management is very important for those who are managing very complex sites and maintaining multiple environments. For example, a site administrator might have environments for development, test and production. It's a challenge to keep track of code in those situations. The challenges become even greater when you have multiple sites to manage with multiple environments for each site. Drush was mentioned as a tool to help streamline the module update process. I'm drawing a blank on some of the other tools discussed (Note to self: Take notes next time!) but I found a discussion on Drupal groups called Code Deployment and Build Management that includes a few links to useful contributed modules.

Other Topics

The subject of hosting was discussed and most agreed that shared hosting is for the birds. People differed on their preference for hosting providers. Nothing new there. Virtual Private (or Virtual Dedicated) Servers are coming down in cost (Media Temple, $50/mo. | Dreamhost, $25/mo.) and the performance improvements are worth it. When talking hosting I mentioned Acquia's Drupal Gardens which is now in private beta as an option for those who want to get started quickly with minimum technical knowledge. I also introduced the group to the newly released Fusion themes for Drupal. I am using Fusion/Skinr/Acquia Prosper on Learn By The Drop and the combination has really been awesome in helping me organize and redesign the site.

Final Thoughts

Communicating with the world online is great but these offline (aka face-to-face) interactions are so crucial for networking, community building, and knowledge sharing. So I want to thank Julie Johnson from the Kinderhook Memorial Library for organizing the gathering. It's really worth the time that people put into planning and attending these types of Drupal events so consider organizing or attending one in your local area if you have the time.


View the original article here

Creating Custom Lists Using Nodequeue

The Nodequeue module is an incredibly useful module that allows you select individual nodes and place them in a list in whatever order you like. This lesson shows you how to create a new nodequeue, add nodes to the queue, arrange the queue and then add the queue to a view.

Note: Click the 'full screen' icon (to the left of the volume control) in order to watch online at full 1280x720 resolution.

Video Links

View the original article here

Thứ Tư, 11 tháng 7, 2012

New Look To Views In Drupal 7

Printer-friendly versionPDF version

There are many new features in Drupal 7. For many one of the most notable enhancements will be the changes to the Views module. First of all, in Drupal 7 Views requires the Chaos Tools Suite in order to function properly. There are also changes to the process of creating views and to the interface. I have spent a little time working with Views on D7 and I think that the changes are a nice step forward in terms of usability.

As you can see in the image below when you create a new view you are presented with a host of very basic options that allow you to create a basic view very fast. For the example I set it up to display a page that lists links to the Page content type. I have also chosen to create a block along with the page view.

 Views in Drupal 7

You can choose to either save the view as you created it (by selecting the Save & exit button) or you can continue to add further customization to the view (by selecting the Continue & edit button). Of course, you can always come back and edit things later. You can see what the customization screen looks like below. You''ll notice that there is now an option to clone a particular display in the upper right hand portion of the screen. There is also a nice preview pane at the bottom.

Customizing Views in Drupal 7

Note: Click to view the full size image.

I am still in the early stages of utilizing the new Views interface and features. So far I like it and think that that the new screen that you see when first adding a new view will help less experienced users of Drupal to get started very quickly. What do you think of this new approach to Views in Drupal 7?


View the original article here

Drupal News - Week of July 9th 2011

Printer-friendly versionPDF version

Drupal News is a collection of interesting Drupal related links and news items that I have found over the past week.

Modules

LiveReload is a Safari/Chrome extension + a command-line tool that:

Applies CSS and JavaScript file changes without reloading a page.
Automatically reloads a page when any other file changes (html, image, server-side script, etc).

http://drupal.org/project/livereload

Adds the RSS feed to the head on all pages. By default, Drupal only adds the RSS feed on the front page. This module will make sure that the feed is shown on all pages.

http://drupal.org/project/rss_all_pages

Bring Photoshop-like functionality into your Drupal website! Create/edit any images online in the powerful and feature-rich image editors and save resulted images back to your site!

http://drupal.org/project/imageeditor

News

Lullabot will be running a Module Building for Drupal 7 course on the Pre-Conference Training Day at DrupalCon London.

http://london2011.drupal.org/news/lullabot-training-drupalcon-london

DrupalCamp Wisconsin is a two and a half day, community-organized event for people who love the interwebs. Both days will be packed with multi-track sessions about Drupal. Sessions will cover basic to advanced topics with plenty in between. The camp will be held on the UW-Madison Campus at the Engineering Hall

http://drupalcampwi.com/

The library is a collection of screencasts and educational blog posts, grouped into learning series. There is currently ten learning series available.

http://nodeone.se/blogg/introducing-nodeones-drupal-learning-library

Do you have Drupal news that you would like me to point out next week. Send me the link via http://learnbythedrop.com/contact. 


View the original article here

Drupal News - Week of July 30th 2011

Printer-friendly versionPDF version

Drupal News is a collection of interesting Drupal related links and news items that I have found over the past week (or so).

A media gallery created with views3,eva & views_slideshow, no coding require and batteries included. Approx presentation time (15-21mins).

http://vimeo.com/27071972

MailChimp today announced a new integration with the Drupal Content Management System as part of the MailChimp Integration Fund. This comprehensive addition to Drupal brings MailChimp's feature set directly into the Drupal user interface. Now Drupal owners can also send transactional emails using MailChimp’s STS solution.

http://www.prweb.com/releases/2011/7/prweb8676704.htm

Implements the Paypal API for Drupal sites. With this module you may configure content types to require payment for creating or viewing. You may further limit viewing to payment per instance, or payment to view any instance of a given type.

http://drupal.org/project/paypal_api

 Adds a small amount of code to the page so that HTML5 output will work correctly in IE.

http://drupal.org/project/remysharp_html5shim

Are you considering going to DrupalCon London in August? Join Acquia, the enterprise guide to Drupal, and thousands of passionate Drupalists for this annual event being held August 22 - 26, 2011. Acquia is sponsoring this special offer for 100 participants to save £50 on their ticket to DrupalCon. (Expires July 31st!)

http://apps.facebook.com/webpromotions/drupalcon-london-offer

Do you have Drupal news that you would like me to point out next week. Send me the link via http://learnbythedrop.com/contact. 


View the original article here

Drupal News - Week of June 18th 2011

Printer-friendly versionPDF version

Drupal News is a collection of interesting Drupal related links and news items that I have found over the past week.

This “straw poll” from the Drupal Association is intended to gauge community interest in various potential DrupalCon North America host cities. This list is not intended to be exhaustive, and community members are welcome to suggest alternative options.

http://www.surveymonkey.com/s/drupalconpoll

We are changing Drupal Commons to Commons. We believe this will help non-Drupal experts to look beyond the robust Drupal platform as a technology, and focus on the business value of what Commons provides enterprises.

http://acquia.com/blog/drupal-commons-now-commons

http://drupalize.me/blog/201106/drupalizeme-has-been-pinkie-pie-zed-improvements-made-your-viewing-enjoyment

The app store -- the first of its kind for Drupal modules -- enables website owners to add functionality simply by selecting an app and adding it to their SubHub site.

http://www.prweb.com/releases/2011/6/prweb8505175.htm

From May 17 - 19, 2011, in advance of DrupalCamp Twin Cities, several Drupal community members met at the University of Minnesota usability lab in Minneapolis to perform a round of formal usability testing on Drupal 7. This is the fourth major usability testing for Drupal, and the first targeting the new Drupal 7 release.

http://drupal.org/node/1175694

Do you have Drupal news that you would like me to point out  next week. Send me the link via http://learnbythedrop.com/contact. 


View the original article here

Drupal News - Week of June 25th 2011

Printer-friendly versionPDF version

Drupal News is a collection of interesting Drupal related links and news items that I have found over the past week.

Build super awesome sites quickly, with super awesome images. The Flickrbomb module integrates Flickrbomb with Drupal!

http://drupal.org/project/flickrbomb

Well after uninstalling every module (including core optional ones) #drupal still errors on a D7 upgrade attempt. Officially a #wtf moment.

http://twitter.com/#!/mustardseedinc/status/83573829468819457

Join top Drupal designers and developers for 2 days (June 25th and 26th) of focused workshops, sessions and discussions on design and Drupal.

http://drupaldesigncamp.net/

At Enterprise 2.0 this week, Acquia demoed new status stream functionality that will be in the next version of Commons. The ability for users to post short updates to groups and users encourages new users to jump in and participate, provides a centralized space for ambient communication that doesn't need to crowd your inbox, and keeps users connected and engaged.

http://acquia.com/blog/status-streams-commons 

http://geoffhankerson.com/node/173

Do you have Drupal news that you would like me to point out  next week. Send me the link via http://learnbythedrop.com/contact. 


View the original article here

Thứ Ba, 10 tháng 7, 2012

Streamlining Site Administration With Drush

In this lesson I show you how you can use the Drush script to streamline Drupal site administration. Drush is a command line interface for your site that allows you to enter short codes to perform a wide variety of site administration tasks including downloading and installing modules, updating modules, updating core, clearing the site cache and much more. Although I don't show you how to install Drush in this lesson you can see a good video on installing Drush at the Level Ten Design blog. The installation of Drush begins at about the five minute mark.

Access to the shell (or the command line) requires a user with appropriate permissions for your web server and a client to allow you to log in and execute commands. If you are on a Windows PC you can utilize the free PuTTY software to gain access to the command line. If you are on a Mac you can use the Terminal application that is included with OS X. 

Video Links

View the original article here

Importing Content Using The Feeds Module

This lesson shows how to automatically import content from RSS or Atom feeds with the help of the Feeds module. The process relies on cron to run periodically so that the feed processor can check for new content. The feed processor creates regular Drupal nodes from the items contained in the feed. You can choose to have the imported items published by default or not. Once the items have been imported as nodes you can then create custom paths to those using Pathauto and/or customize the display using the Views module.

Note: Click the 'full screen' icon (to the right of the volume control) in order to watch online at full 1280x720 resolution.

Video Links

View the original article here

E-book Preview - Front Page View And Block Placement

Printer-friendly versionPDF version

This is a short preview from my forthcoming e-book Building Your Blog With Drupal 7. There are two sections previewed here.

Getting Your Blog Posts Onto The Front Page - I explain how to create a simple page, RSS feed and block using the new Views 3 interface.Arranging Sidebar Blocks - I explain how you can place the block you created in the previous section into the sidebar of your page.

The next things you’re going to do are to set up a “view” (which is basically a list) for your blog posts and make that view the front page of your site. It’s true that there are simpler ways to do this, namely clicking the Promoted to front page checkbox in the add content window, but Views is so integral to Drupal that I think you should get started using it sooner rather than later.

To get started click on the Structure link in the admin menu, then select the Views link which should be the last one in the Structure window. At the very top of the next window you will see an Add new view link. When you click that link you should see a window that looks like the image below.

Add new view

There are a lot of choices to make when adding a new view so I’ll make it easy for you and show you the choices I have made in the image below.

You’re free to change any of the details to suit your own needs. The most important thing to understand is that these choices will result in the following features.

A list of blog posts with the newest blog post displayed at the topA dedicated page at yourblog.com/blog that shows ten teaser (or summary) posts that include the title, the beginning of the body field and a link to the full postA dedicated RSS feed that people can use to subscribe to the blog in an RSS readerA block that you can place in the sidebar that has links to the five most recent postsOnce you have filled in your choices click the Save and exit button to complete the creation of your feed. The screen will refresh and you’ll be looking at the new page you created at yourblog.com/blog. You should see the “Hello World” post you created and an orange RSS feed icon that links to the blog feed. Now that the view for your blog has been created the next thing you want to do is make that view the front page of your site.

Click on Configuration in the admin menu then select the Site information link. The second section from the top of the site information page is called “Front Page”. Change the “Default front page” field from “node” to “blog” or whatever path you gave to your blog post view. Click Save configuration then navigate to your site home page. The front page of your site should now look something like the image below.

front page

Besides your blog posts the blocks to the left side of your posts are another important element of your site. The block you see on the top is the standard search block. I’ll have you leave that in place. The next blog down is the navigation block which we really don’t need since we have the administration bars at the top of the page. In the next section I will show you how to remove that block and add other blocks that you do need.

Click on Structure in the admin menu and then select the Blocks link which is the first link. You will see a table that looks like the one in the image below. Focus on the “Sidebar first” section of the table.

block administration

Click on the list box in the Navigation row and set the value to “-None-“. You’ll notice that Navigation disappears from the row. Scroll down to the very bottom of the page and drag the row called “blog_posts: Block” to the space below the Search form field. Then navigate to the bottom of the page and click the Save blocks button. Navigate to the home page and you will now see the Recent Posts block below the Search block.

If you like you can also add a Recent Comments block to the sidebar. The Drupal core comments module has created this block for you. Just go to the block administration window and drag “Recent Comments” to the appropriate position or select “Sidebar first” from the list box in the Recent Comments row. Keep in mind that those changes are not saved until you select the Save blocks button.

The final block that I’ll have you place for now is the block that will hold your tag (or category) “cloud”. In the Block administration window look for “Tags in Tags” and move that to Sidebar first then save your blocks. If you go to the home page it should now look something like the image below.

 home page blocks

You’ll notice that the “Tags in Tags” block has a dotted line around it with a configuration icon in the upper right portion of the block. The ability to go to the edit views of blocks directly from the block itself is a nifty new feature in Drupal 7. You should see something like that when you put your cursor directly over the block and point to the configuration icon. For all blocks you have the option of editing the title, the access levels and even the pages that they appear on. Tags in Tags happens to be a block that has an additional configuration option. You can edit the number of tags that appear in the block.

If you click on the configure block link that appears when you mouse over the configuration icon you will be taken to the block edit window where, among other things, you can adjust the block title to something like “Topics” and also change the number of tags that will be displayed if you like. Remember to click the Save button at the bottom of the window. Once you do that you will be returned to the home page of your site.

One thing you may have noticed when looking at your block configuration is the fact that the User login block is placed in the Sidebar first section. If you don’t want anonymous users to see that blog you should remove it just like you removed the Navigation block. You can always reach the login page of your site by navigating to /user/login.

I hope that you enjoyed this short preview. I have most of the content in the e-book finished. Once the content is complete I will be working on perfecting the formatting and cleaning up errors that I find along the way. If you want to be among the first to know when the e-book is finished then I suggest that you do one of three things if you haven't already.

Subscribe to posts via the main Learn By The Drop RSS feed. Follow @learnbythedrop on Twitter.Like the Learn By The Drop Facebook page.

View the original article here

Using Filters to Limit Content In A View

This video tutorial shows you how you can utilize filters to limit the content that is displayed in a view. This includes how to expose a filter so that your site visitors can filter the content as well. 

Note: Click the 'full screen' icon (to the right of the volume control) in order to watch online at full 1280x720 resolution.

Video Links

View the original article here

Reviewing Five New Features In Drupal 7

 In this lesson I show you five important new features that you will find in Drupal 7.

The new tokenized cron linkImage field and image cache now in coreSet up and application of text formatsThe shortcut bar below the admin menuVertical tabs on the node creation page

Note: Click the 'full screen' icon (to the right of the volume control) in order to watch online at full 1280x720 resolution.

Video Links

View the original article here

Migrating To Drupal From Other Platforms

Printer-friendly versionPDF version

If you spend enough time working with Drupal you'll eventually end up needing to migrate data or posts from other platforms into a Drupal site. I have had three separate situations where I needed to accomplish this.

Importing raw data into a site from comma separated value (CSV) files in order to display the data in tables that could be viewed on the site.Importing a WordPress blog.Importing several blogs from Squarespace.

I have previously covered the first situation in a post titled Moving Beyond Nodes. Please see that post if you're interesting in finding out more about how I accomplished those data imports. The second situation I addressed by utilizing the WP2Drupal module. The third situation I handled by utilizing the Import Typepad module.

WP2Drupal

As fate would have it the WP2Drupal module is currently listed as abandoned. That doesn't mean it can't/won't work for you if you are still on Drupal 6 and WordPress 2.3. For the record the maintainer of WP2Drupal recommends the WordPress Import module which will have a Drupal 7 release. WP2Drupal works by connecting to the database of the WordPress site so you will need to have access to the database settings (host, username and password) of the site you are migrating from. The module will import blog posts, categories, pages, comments and trackbacks from your WordPress site. 

Some things to consider prior to importing.

Mapping of WP users to Drupal usersTaxonomy vocabulary that will hold the WP categories and tagsNode types for blog entries and pagesInput format for posts and commentsWhether or not the old URLs must be redirected to new ones

Think about all these things before you start the migration. Users, content types and taxonomies are especially important considerations. If things aren't setup correctly and you go ahead with the import many headaches can result. For that reason it's a best practice to make a database backup prior to actually migrating. You can always restore the original database and redo the import if things go wrong.

Import Typepad

Although this module is meant for Typepad/Movable Type blogs I used it to import "journals" (which are basically individual blogs) from Squarespace. To get started you need an export file for each journal that is generated on your Squarespace account. To generate the export file you need to put the journal into structure editing mode, then select Configure This Page, and scroll down to the Data Export section. There is a button there that says "Export Blog Data". Pushing that button generates the file that you will download and then upload using the Import Typepad module. The data that will be imported will be the posts (title and description), and the categories. The date and time of the posting will be preserved as well.

With your various export files in hand you then need to navigate to /admin/content/import_typepad on your Drupal site. There are three things that you need to have set up prior to importing.

Content typesTaxonomy vocabularyUsers

Unlike the WP module there is no automatic user mapping. You will simply select an existing user to assign import posts to. The actual import itself is a 2 step process. In step 1 you select the export file to upload, select the content type to import to, and also select the taxonomy to import categories to. In the next step you see a preview of what the imported content will look like on your site, along with the categories that will be imported. You also map the content to a Drupal user at that time. When you're ready you click an Import button and then wait for a message indicating that the import is complete.

Post Import Tasks

In both cases you'll want to spend time reviewing the content that you imported to make sure things look like you want them to. You may want to adjust input formats or issues related to how the content is displayed on your site. You will also want to use the Views module to create blocks and pages to display groups of posts that you have imported. I have found Views Bulk Operations to be a very helpful tool to correct and update large groups of nodes.

If you have migration tips, and war stories or direct experience with the modules mentioned here, and you would like to share your experiences feel free to do so in the comment section below.


View the original article here

Thứ Hai, 9 tháng 7, 2012

Building Your Blog With Drupal 7 E-book

Printer-friendly versionPDF version

Building Your Blog With Drupal 7 is an e-book in Adobe PDF format. It's out now. You can find it here along with much more information. In short, it is a step-by-step guide that shows you how to build a blog-style website with Drupal 7. You'll find that the instructions are very detailed and the many screenshots are helpful as well. 

Enjoy, and happy Drupalling!


View the original article here

Making The Case For Drupal

Printer-friendly versionPDF version

I recently read a post about Wordpress vs. Expression Engine that prompted me to rethink where Drupal sits in the mix of website platforms/content management systems. In the WP vs. EE post the author compares the two platforms and decides that EE is his choice mainly because, "WordPress is designed as a single content channel system." In other words WP is great for creating blogs but presents a lot of challenges when you want to expand into a site with more complicated relationships between authors, users, information and data. I'm not saying that the author's knocks on WP were valid, but I did think that the author's requirements sounded like they were perfectly suited to using Drupal as a platform. In fact, I said so in the comments.

As long as there are people who are new to the idea of using a web-based content management system there will be people who wonder how Drupal compares to other available systems. In my Beginners Guide To Drupal I list a few types of websites that you can build with Drupal.

Website with static contentWebsite with dynamic contentSingle or multi-author blogCommunity website

Since I made that list I've come to realize that there are additional applications for Drupal that are worth exploring. Drupal can be utilized as a platform for exposing data. I wrote about that recently in a post titled Moving Beyond Nodes where I stated, "But what about another type of site that focuses not on nodes but on data contained in the Drupal database? Can you do it? Yes. Should you do it? Only if that sort of thing excites you or perhaps if a client requests it." I've continued to work with data since then and have to say that I'm very happy with the capabilities offered by the platform.

Drupal can also be utilized as the basis for an intranet or project management portal. Open Atrium looks like a great distribution for just that purpose. Acquia has also created a distribution they call Drupal Commons which they say, "takes the guesswork out of building a Drupal-based community site". These distributions are relatively new additions to the Drupal universe and assist site builders with the age old question of, "which contributed modules do I want or need?" Other notable distributions that make things easier for site builders are Pressflow and OpenPublish which I first discovered via Dries' post on Business Models for Drupal Distributions. With Drupal distributions site builders don't have to start at zero anymore if they have certain types of applications in mind. The existence of these distributions expands the market for Drupal and strengthens the business case.

Another aspect of the Drupal ecosystem that helps to make the case for Drupal is the ever expanding list of modules that not only add functionality but also allow for deeper integration with other social services. See modules such as Connector, Post It Everywhere, Twitter and Facebook Social. Drupal is not an island! What's more important is the fact that almost every time I think about the need to connect a Drupal site to a popular service I can find a contributed module that helps me to get at least part of the way there. The cost of implementing these social features is usually just time time I take to search for, implement and test the appropriate contributed module. 

Many of the features of Drupal that I've mentioned in this post are issues that either come to mind either at the outset of a site development project or at some point after the project has been launched. If you're concerned about issues related to connecting users, exposing data and integrating with other networks then I think that Drupal is a good choice for your system. If you're looking at a basic website with a blog from the beginning another system might be a good choice. But what if you want to expand later? If there's a possibility that you might want to expand the features of the site later then consider Drupal. Because while setting up a blog on Drupal is more of a pain to some people, expanding upon WordPress in the ways mentioned in this post can be a pain later on. What are the chances that you might have to introduce a second platform to achieve your goals? I think that if you use Drupal from the start there is less of a chance that you will need to utilize a second platform in order to expand your site in the way that meets your needs.

Finally, there's the issue of up front cost. I really like the zero dollars up front cost of WordPress and Drupal. Systems like Expression Engine require an up front financial investment. If you're running a commercial site it looks like you must commit to spending about $300 or more to get started. If you want a forum module you have to kick in another $100. Three to four-hundred dollars may not seem like a lot of money for a web system but people who are starting really small and have big dreams know that every dollar counts. What if you start building after having paid the license fee and realize that the system really won't work for you? With Drupal and WordPress you don't have those worries. The bottom line is that you can start working with Drupal and if you really don't like the system you can walk away having only made an investment of time and perhaps the cost of hosting which you would incur with just about any system.

The case I would make for Drupal is not as much as WordPress vs. Drupal scenario because WordPress offers all the great benefits that you get from free, open source software with a significant developer base. Rather, it's a case of proprietary, fee required software vs. Drupal. Expression Engine is certainly not the only one either. In fact, their solution is attractive and cost effective when compared to expensive systems such as Microsoft SharePoint. Yes, I think that Drupal is in that league now. So if you're in a position to make a recommendation (or even the final decision) about a web-based content platform I suggest that you give Drupal a try. The price is right and you might be surprised at just how far you can go with it.


View the original article here

Drupal News - Week of July 2nd 2011

Printer-friendly versionPDF version

Drupal News is a collection of interesting Drupal related links and news items that I have found over the past week.

This module makes the lifes of editors and webmasters a bit easier.

http://drupal.org/project/nice_dash

This module exposes configurable and extendable visibility settings for menu links.

http://drupal.org/project/menu_item_visibility

Planning group for NYC's conference-style Drupalcamp to be held in November/December 2011 timeframe. 

http://groups.drupal.org/node/159259

We've posted lots of recorded webinars today. Check them out at http://bit.ly/ixbmAO

http://twitter.com/#!/acquia/status/86887337979691008

RT @diwd: Psst. A little super-early-bird is still hanging around today.

http://twitter.com/#!/lullabot/status/86843236311760896

Drupal 7.3, a maintenance release which fixes security vulnerabilities is now available for download. Drupal 7.4 also fixes other issues reported through the bug tracking system.

http://drupal.org/drupal-7.4

Hello from Jennifer and Ariane, your friendly Drupal Documentation Team co-leads! It’s time for a quarterly update on what’s happening in the Documentation team—we've been trying out some new initiatives and working on infrastructure since our last update (April 5, 2011), and we'd like to get you up to date.

http://drupal.org/node/1197948

Do you have Drupal news that you would like me to point out next week. Send me the link via http://learnbythedrop.com/contact.  


View the original article here

Moving Beyond Nodes

Printer-friendly versionPDF version

If you're like most people who build using Drupal you want to build your site around nodes, that have titles, descriptions, tags, comments, etc. It's no surprise since those types of content oriented sites are the ones that make the world of the web go round. But what about another type of site that focuses not on nodes but on data contained in the Drupal database? Can you do it? Yes. Should you do it? Only if that sort of thing excites you or perhaps if a client requests it.

I'll give you a little background on where I'm coming from and what made me decide to play around with Drupal as a way to expose data sets. About a decade ago I was part of a group of people who built a first of its kind application to send and receive data from wholesale power markets in North America. The application was built on three tiers: a client, an application server, and a database server. The client and application server were written in Java and the database relied on Oracle technology. It was about as far away from open source as you could get. The product was successful though and we did hundreds of installs all across North America. What the product basically did for its owners was suck in data from a central server then expose that data to the user via tables and charts visible from the user interface. At some point last year I started wondering if I could do something similar with Drupal. So I started investigating, tried out different modules and realized that I could do even more with a Drupal install than we did with that product.

There are four tasks that need to be accomplished if you want to use Drupal as an effective data platform.

Capture data to the Drupal database tablesSetting the data types (text, numeric, etc.)Expose the data to the user using tables and chartsOffer simplified download format options

 Capturing Data

I have been capturing data using the Table Wizard module. Table Wizard allows you to create a database table by uploading a delimited (like tab or comma separated) file. This works pretty well. I recently uploaded a file with over 300,000 records and it was in the database within a few minutes. After you upload your file you click on the table name to "analyze" the table. Table Wizard will let you know what columns you have in the table, the data types and identify the primary key. When you first upload your data you will want to go switch over to your database to change data types of the appropriate ones and identify a primary key. Once you have done that you can come back and re-analyze the table. 

Setting the Data Types

This is probably the step that will be the least welcome to those who are not familiar with databases. If you want to do extensive work with data in Drupal then you will want to become familiar enough with phpMyAdmin and MySQL data types to be able to navigate to your database and apply the appropriate settings for each type of data. You should also indicate which field contains the primary key for the table. The primary key is a unique value that identifies each record in a table. If you have a dataset that does not have a column with unique values then consider adding a column unique numeric code in each row. You can name the column something like record_id and then add values like 100001, 100002, 100003 and so on.

Expose the Data Using Tables and Charts

If you have been a good boy or girl and added a single field primary key then the Table Wizard module will let you check a box that is labeled, "Provide default view." This option automatically creates a view that you can expand upon as you see fit. Auto created table wizard views will have the tag "tw" added to them. You can also create a view by navigating to /build/views/add and looking for the radio button in the 'View Type' section that starts with Database table. At this point you need to a thing or two about the Views module to go further. There's not enough space to cover that here so I'm going to skip over the details and point you to the key modules and settings.

The standard views module will let you create a table from your data. You just have to choose a Page display and choose the Table style. You can then choose your fields which will appear as columns within the table. Give the page a Path and perhaps add an Exposed Filter or two to allow users to narrow down the data they are looking at. If you want to get a little fancy you can choose use Views Calc to create tables that include calculations like min, max or average on a set of numeric data.

Charts are a little more tricky but it can be done with the assistance of Charts and Graphs and Views Charts. Charts and Graphs allows you to integrate a number of different free charting solutions (including Google Charts) into your site. View Charts makes those features available as a Style (called "Charts") within the Views interface. The chart gets exposed on a page based on the Path that you define. You can also create a chart within the Block display type. There are other charting modules that exist for Drupal. All of them have some drawbacks but so far the Charts and Graphs/Views Charts combo has worked the best for me.

Offering A Download Option

The ability to download data probably won't be a must have feature for every site. After all someone could probably just copy the table and paste it into their favorite spreadsheet program. It's a nice feature to offer though and you can do it pretty easily with the help of the Views Bonus Pack module. With Views Bonus Pack installed you get the option to add a Feed display within the Views interface. With the Feed display selected you then get the option of setting a Style that includes the option for CSV and other popular formats like TXT, DOC, XLS and XML. You can then attach that display to the Table display and there will be an image that appears at the bottom of the table page that will generate a file download when clicked. Be sure to add the same filters to the CSV display that you have added to the Table display so the downloaded file reflects what the user is seeing with any filters selected. 

The usual caveats apply to the ideas and tips that I've offered here. At any time a better module could come along or an existing module could change and alter the process a bit. So tread lightly and do some exploration before you commit to building a data driven site using Drupal. In fact, even though there was a very recent release of Table Wizard the development is being deprecated in favor of the Data module. I'll continue to upload using Table Wizard for now since I think it works well but also plan on giving the Data module a shot in the near future. 

As always I'd love to hear your thoughts and tips on modules and workflows in the comments. If you have built or know of a good data access website built using Drupal feel free to share those links as well.


View the original article here