background preloader

Tutorials

Facebook Twitter

Drupal as a front-end for Google Drive | Pronovix. Out of the box, cloud storage services are not all that useful when you need to collaborate on documents in a organizational context. Most services do a pretty good job for individual use but fall short when you need to manage a complex set of projects. In this post I explain how we are using Drupal as a front-end for Google Drive and how this allows us to better organize our project documentation and create tailor-made workflows that fit our company processes. So far we've been using a combination of a Google Docs Spreadsheet (for overview and tracking) and Dropbox to store and share our official company documents: contracts, purchase orders, offers, invoices.

It's great that all documents get synched to a local folder but there are some serious limitations to this approach: Ideally we would combine the ease of sharing documents of one of the cloud storage platforms with a secondary tool for keeping overview and tracking workflows. For cloud storage we decided to use Google Drive: Drupal add timestamp to Taxonomy term data | KahThong.com - Specialist Webmaster, PHP Web Developer, Drupal Theme, Module, E-Commerce, Web Application Developer from Kuala Lumpur, Malaysia. I had another request to alter the default taxonomy_term_data table and adding the timestamps; created and changed just like in the node database table. Here's a little snippet that will do the trick. You need to create a custom module for this to work. Remember to replace YOUR_MODULE with your custom module name. <? Php * Implements hook_schema_alter(). function YOUR_MODULE_schema_alter(&$schema) { $schema['taxonomy_term_data']['fields']['created'] = array( 'description' => 'Unix timestamp when the Taxonomy term was created 'type' => 'int', 'not null' => TRUE, 'default' => 0, $schema['taxonomy_term_data']['fields']['changed'] = array( 'description' => 'Unix timestamp when the Taxonomy term was last modified * Implements hook_install(). function YOUR_MODULE_install() { $schema = array(); YOUR_MODULE_schema_alter($schema); // Altering the {taxonomy_term_data} table. db_add_field('taxonomy_term_data', 'created', $schema['taxonomy_term_data']['fields']['created']); * Implements hook_uninstall(). * @file.

How to Write a Drupal 7 Installation Profile. Based on this article. Installation profiles are like modules All installation profiles must have profilename.info and profilename.profile files, and they can also have a profilename.install file. The profilename.profile file has access to almost everything a normal Drupal modulename.module file does because Drupal is fully bootstrapped before almost anything in the profile runs. The primary exception is that st() should generally be used to translate strings instead of the usual t() because the localization hasn't been set up until the installation process completes. .info file The profilename.info file should look similar to this: You can include custom modules with your install profile or have Drupal.org automatically include other projects in your profile's package, and you can list those as dependencies as well. .install file In many cases, your profilename.install file will look like this: Use hook_install() to insert content into your database during the installation process.

<? Display. Text Formats 101: How Drupal filters work. Drupal’s text formatting and filtering system is one of its most critical components. The system performs dual duty by both providing features to make content editing for the web both more secure, by allowing us to filter out dangerous HTML tags and such from content posted by untrusted users, and more approachable, by allowing mere mortals to avoid entering content in pure HTML encoding and doing the necessary conversions when necessary. Despite its importance, the system tends not to get much hype or limelight when Drupal is discussed. An unglamorous workhorse, text formats are designed to be something that you set and then forget. Yes, even if you use it every day, the filtering system can be easy to forget about.

All the more reason that you shouldn’t pay close attention to how your site’s filters are set up, and maybe even review them once in a while to make sure they’re still configured in a manner matching how you want your site to be used. Filters work on output Example. Using rules for signup notifications | Wordpress VS Drupal. CCK Signup is a fun module that is very drupal in the sense that it really just extends a bunch of modules you may already have. Here’s a brief tutorial on using Rules to handle some basic notifications. Say you want to know when someone has dropped a class. Your initial rule conditions get a new rule set up and set the initial condition to be “After deleting content”Set the next condition to be “content has type”Select the signup type of contentLastly choose to send an email to an arbitrary email address – in this case let’s say it’s you, the webmasterSend the email.

Thanks to the Tokens module you can reference content from the fields in the deleted content Using tokens in the emails Send an email to an arbitrary email select the type of content Content has type as condition. Learn Drupal with Drupal videos and website development tips by Shane Thomas | Code Karate. Hide submit button when a fieldset is collapsed. How to override front page node tpl - drupal. Setup your own Drupal API reference site | Realityloop. Drupal Melbourne. Post date: August 13 2012 Tags: drupal planet, drupal, api One of the key reasons I was drawn to Drupal as a platform is that it had great developer documentation available. The Drupal API reference site, api.drupal.org, was and is one of my most used resources.

As good as the site is though, if you happen to have a long commute (like myself) or you're just about to jump on a plane to DrupalCon, you aren't always guaranteed to have access to it. There's long been instructions to setup your own copy of the site, but in a world of Features and Drupal.org packaged distributions, we at Realityloop decided that installing a local API site manually was an unnecessary task.

Introducing the DrupalAPI distribution, a two-step process to get your own local API reference site; download and install. Checkout the following video to see just how easy it is. So checkout, head over to the DrupalAPI distribution project page and download a copy and let us know how it goes for you. How to display Menu Block (Level 2+) for Content Types. Hello, I'm finalizing my first custom Drupal 7 theme based on the Omega Base Theme framework. My theme uses the "Menu Block" module in the first sidebar set to "Menu Block (Level 2+)" in order to provide secondary & tertiary navigation.

It works great on all nodes that are included in the primary navigation, but it disappears completely when accessing other Content Type nodes directly. Example: I have several hundred "News" Content Type nodes. They are accessed by visiting the "News" menu item, which is a "Views" page displaying all "News" Content Type nodes. This seems to be a pretty common feature, so I'm not sure why I'm struggling with it so much. I realize this is likely due to a lack of proper setup of hierarchy. Here's what I've done so far: 1) Path Auto - I do want to note that I have correctly configured Path Auto. 2) Node Hierarchy - There's a development release of Node Hierarchy for Drupal 7. Summary: Thank you very much for any insight you can provide. Fun with Fonts. Modules are the workhorses of a Drupal site.

Most are useful, some are essential, but there aren't many that qualify as fun. This tutorial is about one of those rare modules that is actually a real good time, @font-your-face. For many years there were only about a dozen web safe fonts that you could use on your site. In retrospect, it was very boring. In the past couple years, however, things have completely changed. We'll skip the glorious story of CSS3 web typography for now and instead get straight into using @font-your-face to spiff up your site with some cool new fonts. Getting Started If you're following this tutorial and you're working with one of our themes, the module will already be installed.

After you're all set up, go take a look at the the list of modules included in the @font-your-face package. You'll see that there are quite a few listed here. Enabling Fonts OK, now the fun part starts. What you should see is a list of your enabled fonts. Selecting Fonts Local Fonts. The Formula for an Amazing Drupal Website. There is a lot that goes into creating a great website. Some of us are good at one or two of these things, others are strictly specialists and some of you reading this are just getting started. After working for over 12 years designing and building websites, I still haven't mastered all the skills needed to turn a website truly golden, as it seems the learning never really ends.

However, I have got hold of the basic formula. Over time, I have also come to understand that you can't do it all by yourself. Strong Technical Foundation This is all about having a great content management system, in my opinion. If you're reading this, I probably don't have to sell you on Drupal. But having a strong technical foundation goes beyond simply downloading Drupal core and ticking off the box as mission accomplished. If you're a developer, you might scoff at this and say that's how you've been using it for years, no fancy stuff needed. No, Drupal needs a skilled hand to step in and build a proper CMS. Drupal - A very simple plugin to help develop with Drupal. Drupal Development using Sublime Text 2 in 5 Steps | Realityloop. Drupal Melbourne. Tags: drupal planet, drupal, IDE Realityloop love Sublime Text 2, it's super fast and as feature rich as many expensive commercial IDE's, but there's no question that it needs a little attention to make the out of box experience an ideal working environment.

After using Sublime for around the past 12 months, trying out lots of packages we've now refined it to the packages listed below (including one that I wrote). Step One: Download and Install Sublime Text 2 Sublime Text is a sophisticated text editor for code, markup and prose. Download Sublime Text 2 at: Step Two: Install Sublime Package Control Sublime Package Control is a full-featured package manager that helps discovering, installing, updating and removing packages for Sublime Text 2. Step Three: Update settings for Drupal Coding standards Lets set the encoding, tab size, ruler line, etc right now so that our code will meet the Drupal Coding standards.

Step Four: About packages and how to install them. 7 modules that can improve your Drupal's security | Monitor Everything IT: Website, Server, Application, Network. 100% Free!Monitor Everything IT: Website, Server, Application, Network. 100% Free! Custom Sort Drupal Content with the Draggable Views Module. In the world of sorting, sometimes 'newest first' or 'oldest first' just doesn't cut it. During a recent Drupal project, we had a client who wanted to be able to control the order of their marquee images in random ways via a drag and drop interface.

Enter the Draggable Views module. In about thirty minutes, I was able to set up custom drag and drop functionality for several content types on their site. Let's dive in and I'll show you how it's done. If you prefer a video tutorial, skip to the end of this post. Before You Begin Make sure you have the lastest version of Views and also download the Draggable Views module. The trick to getting the magic to happen is setting up two cooperative views.

Views Keeps Improving In the time since I first used this module just a few weeks ago, the module has been upgraded to allow for using a different display on the same view, rather than two separate views, which makes matters even more tidy. Change the Format setting to 'Table'. Happy sorting! Drupal 7 Tutorials. Working with the Drupal Computed Field Module | Urban Insight Blog. When setting up content types on a more involved site, a developer could easily end up with having an enormous list of fields in one single content type. When this happens, I tend to pause for a second, and think through whether there is any way to consolidate that list. Chances are, I find a field or two whose values either depend on other fields or can be generated without user input. These are the exact scenarios where the Computed Field module can be a great choice. Computed Fields lets you define an algorithm to calculate the value of a certain field, freeing the end user from having to unnecessarily fill in data that can be derived in an automatic fashion.

The module has Drupal 6 and Drupal 7 versions. Although as of the time of writing the D7 version is still in beta, I myself have not encountered any problems while using it. As the help text explains, the computed value has to be assigned to the $entity_field[0]['value'] variable. New series: Display Suite for Drupal 7. This week we're happy to announce a free series about Display Suite. This series, Display Suite for Drupal 7, was recorded by the maintainer of the Display Suite project, Kristof De Jaeger, also known as swentel in the greater internets. As the project page explains, Display Suite allows you to take full control over how your content is displayed using a drag and drop interface. Arrange your nodes, views, comments, user data, etc. the way you want without having to work your way through dozens of template files.

What this means is that you can control the layout of all the individual bits and pieces on your site without having to dive into theming or custom code. Another great feature is that you can set up the configuration for things like nodes and users, and then export those to code so that you have the peace of mind of saving your hard work and being able to easily move that around between sites. Form inside a block in drupal 7. JQuery and JavaScript Theming Tips for Drupal 7.

I often see posts on the drupal.org forums and elsewhere in regard to implementing jQuery scripts and code into Drupal. It seems common that users try to attach JQuery right within page.tpl.php or html.tpl.php. In other words, it's hard-coding a script into a page and it's not ideal. Some try to render it using the PHP filter within a block or node. The disadvantages of these methods are that code added like this cannot be included in any caching or aggregation methods and can also cause conflicts that would be tricky to troubleshoot.

For best Drupal theming practices, I have outlined some methods below. A Few Methods There are a few methods that work well for adding additional custom JQuery scripts to Drupal 7 and some of this depends on the use case. Drupal_add_js This method is good for one-offs such as adding code to specific pages and not the entire site. In the above code sample, you would replace 'my_theme' with the actual machine name of your theme. Theme .info file The Code Ajax? How can I have two different work flows in only one content type. Views Filter Populate – Search Title and Body of nodes in one exposed filter | Wordpress VS Drupal. There are many forum links with numerous hacks detailing how to create a single exposed filter that combines search across multiple fields.

In Views 3 and Drupal 6 or 7 it is as simple as installing the Views Filter Populate Setting up groups for views populate filter And that’s about it – just configure the new global filter to include your desired fields Configure views filters populate - include the fields you want searched There isn’t much to know about this module, although I certainly haven’t tested it against dates or numbers, and I rather doubt that works. One filter, two fields... yum Thanks + add any questions or comments below. Elegant CSS In Drupal—LESS vs Sass. Drupal is not a CMS | Palantir.net. Creating an Easy Print Button on Drupal Webforms | FleetThought. De-Drupalizing The Login Form. The Absolute Beginner's Guide to Drush.

Mapping

Creating a local server in Ubuntu. General and Blogs. Jeff's Handy Dandy Drupal Login Bookmarklet. How to add Javascript in Drupal 7 with jQuery | d7One. Drupal Performance Tuning ++ | Fuse Interactive. CMS Quick Start Drupal Blog | CMS Quick Start. Swentieman | Tutorial Videos | Tutr.tv. A Simple Progress Bar in Drupal Using CSS | Enterana. Git. Modules.