Site administrators

Image gallery: pager ("prev - next") for the images

Last modified: February 9, 2010 - 19:37

To set up a pager for Image Gallery images:

  1. install custom pagers and token
  2. Create a pager with these settings:
    • visibility:
      • If *all* your image nodes are in galleries, just pick 'image' from the node type selection.
      • If some images are not in galleries, enter this PHP code:
        if ($node->type == 'image') {
          $vid = variable_get('image_gallery_nav_vocabulary', '');
          // Check to see if any taxonomy term on this node is a gallery term.
          foreach($node->taxonomy as $term) {
            if ($term->vid == $vid) {
              return TRUE;
            }
          }
        }
    • pager node list, 'Use a view':
      pick 'image_gallery'.
    • pager node list, view arguments:
      Enter this code (two lines):
      term
      [term-id]
  3. You may need to adjust your vocabulary weights to make sure that the [term-id] token corrrectly produces the gallery term -- the token description says it returns the 'top term' so I presume this considers vocabulary weight. If your images have terms in more than one vocab, move the gallery vocab to be the first.

GeoRSS for Views

Last modified: February 9, 2010 - 15:40

Using the GMap module with Views 2, it is possible to generate GeoRSS data. This data can be used to export map data, which can then be imported into other programs. To generate this data, add a "feed" display to a view containing location data. The resulting feed contains the GeoRSS.

Collapse and Uncollapse Form Fieldsets

Last modified: February 8, 2010 - 21:52

This snippet allows for the modification of Drupal fieldsets, which are groupings of fields of forms that can be collapsed or un-collapsed. This example uses the form for adding a page node and uncollapses the menu fieldset.

1. First, find the form's form_id by viewing the page's source in your browser (usually edit>>view source) or in Firebug. Search for "form_id" and the value in that is the form_id. The code should look something like this

<input type="hidden" name="form_id" id="edit-page-node-form" value="page_node_form"  />

Here the form_id is page_node_form
2. Find the form element and property. You can use the forms API reference or Devel module(turn on Display form element keys and weights (key=devel_form_weights, weight=0)" in the settings). The key is often simply the name of the fieldset and the property in this case is #collapsed which determines whether or not a field is collapsed. It can have the values true or false. If the value is true then the fieldset will be collapsed, if false it will not be collapsed.

Vimeo

Last modified: February 7, 2010 - 15:28

Vimeo is a CCK field with easy-to-use video browser.

Installation:

Watch a video tutorial on installing Vimeo.

Vimeo depends on four main modules before it can be installed:

After you have installed these modules, drop the vimeo folder into your modules directory and install via the admin interface as usual.

Remember to setup the correct permissions for your users, and add some Vimeo sources (Users, Albums, Groups or Channels) for your users to browse through.

Finally create the a Vimeo CCK field on one of your content types.

Theming your user profiles

Last modified: February 6, 2010 - 06:46

As of Beta 3, Advanced Profile Kit comes without any CSS so you can theme it to match your site without having to untheme anything. In the directory "advanced_profile/theme" you will find "advanced_profile_blue-lagoon.css" which is some basic styling to match the default Garland. Copy this to your theme and add it to the .info file.

Mobility

Hi,

I got this email here, from a Wordpress developer guy showing me what WP guys are doing. Now, I know comparing WP and Drupal is like comparing eggs and bananas, somewhat, but we do need to step up our game.

http://wordpress.tv/2010/02/04/introducing-wordpress-for-blackberry-1-0/

I believe this is what we need to be doing. I love Drupal, but I sometimes feel it at 359 degrees and we need it at 360.

Just sharing.

Kahenya

Syndicate content
 
 

Drupal is a registered trademark of Dries Buytaert.