The "ip_address()" Drupal Function
If you are a Drupal module developer, then the title of this Quicktip might be enough for a lightbulb to suddenly appear above your head.
If you are a Drupal module developer, then the title of this Quicktip might be enough for a lightbulb to suddenly appear above your head.
I was banging my head up against the wall trying to figure out how to update a view's description (normally set when you first create the view) and I put the question out to the twitterverse and @_happygolucky_ came to my rescue with this link that simply explains that the view description is hidden behind the "tag" link on the view editing page.
(how's that for a run-on sentence!)
One of the many wonderful and useful forums over at groups.drupal.org is the Similar Module Review group.
Edit: you can also use ctools
Is there too much text on your page? Do you need to allow users to un-clutter an interface, or hide some of the interface until your users need it? Don't go and grab any extra JavaScript, Drupal can do collapsible fieldsets out of the box!
However, there are some steps involved:
The HTML Filter that comes with Drupal core is extremely useful - it allows you to restrict the HTML elements that you allow your content creators to use in their posts. If you don't want them including images or JavaScript, no problem. The filter settings allow you to specify exactly what HTML elements they are allowed to use.
One of the most actively used administration pages on any drupal site is the main content administration page (admin/content/node). From this page, the site administrator can quickly get a list of all the nodes on their site as well as filter and sort the list in a variety of ways.
However useful you may find this, you may not be aware that the Views Bulk Operations module provides an even more useful main content administration page with the often requested "search by title" filter.
If you've done much Drupal theming, then you're probably aware that you can override the default node.tpl.php template file on a per-content type basis. For example, if you have a content type called "food", then you can create a node-food.tpl.php that will be used only when nodes of type "food" are displayed.
A full list of template suggestions can be found on drupal.org.
Exposed filters in Views are a wonderful thing. They allow your site visitors the ability to dynamically alter a view to suit their needs best. But what happens when you display your view in a block?
Exposed filters on View pages use URL querystring variables to pass the filter variables back to the server, but when your view is displayed in a block, this isn't possible.
Need to export data from your Drupal web site to Excel?
Use the Views Bonus Pack module - it gives you the ability to set your view's style to CSV, XML, DOC, and other formats.
Check it out!
I recently presented 45 Modules in 45 Minutes: The Best Modules You're Not Using at DrupalCon Paris. Here's a tip using one of the forty-five modules in my presentation.
The Better Messages module is a quick and simple drop-in module that will instantly give your site a bit of a "wow" factor by displaying all system messages in a floating CSS popup window over your content.
If you use CCK often, then you've probably at least once had to implement a select box where the user can select a year value. Sometimes they're used for birthdays, magazine issues, events, or even historical reasons.
You can easily populate the "Allowed values" textarea of the field's "edit" page, but how can you quickly set the default value to the current year (and not have to worry about changing it every year)?
One of my sites had a funny error complaining about an "unsupported form of compression" shortly after installing a new module. The browser would return a white screen of death with an error message (Safari and Firefox).
Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
By now, you should know and love the Tracker module that comes with core. It has its strengths, but many weaknesses. For one, you can't separate out posts from comments, or sort the list in interesting ways. Views can help you make exactly the list you want, and place it in a tab on the user's profile exactly like the "Track" tab.
For this example, you'll be adding a list of comments. Creating the view is simple enough:
There are often 17 ways to do any particular action with Drupal - here is #18 on the list of "How do I display related content on this node's page?" You'll be using the Views Attach module and a nodereference field.
In this example, you want to relate a photo to an event. Inside the photo's content type, create a nodereference field that is able to reference the event content type. When a user is adding a new photo, she will be able to choose the related event if applicable.