User login

User Image Gallery (Avatar page) with Views: Basics and Beyond

(Changing the options on an avatar gallery page created from user's profile pictures with Views Bonus Pack's grid view. The instructions and options here are for Drupal 4.7 but should apply equally to Drupal 5.)

Administer > Views

Click "edit" next to member_gallery

Scroll down to "Arguments" and click to expand.

Under "Argument Handling Code" change:

$view->gridcount = 3;

to:

$view->gridcount = 5;

Scroll all the way down and press the "Save" button.

Click on member_gallery to have a look at your view.

Note that only four columns show up because the pictures are too big, and recall that there isn't a good way of dealing with this.

Weigh the pros and cons of panicking, and decide it's just too silly-looking a word to bother with.

There are two ways to shrink the picture size, both involve a bit of work:

  1. Create a theme of the grid view and use imagecache to present the views

  2. Make a module which can make imagecache presets available to views.

I like the latter because it'll be useful to everyone (we'll see what response it gets: http://drupal.org/node/118488#comment-214964 ), though the former is probably easier even though farther from what we've done before.

Although the former ultimately gives more fine-tuning ability for the look of this specific gallery.

(Changing the options on an avatar gallery page created from user's profile pictures with Views Bonus Pack's grid view. The instructions and options here are for Drupal 4.7 but should apply equally to Drupal 5.)

Administer > Views

Click "edit" next to member_gallery

Scroll down to "Arguments" and click to expand.

Under "Argument Handling Code" change:

$view->gridcount = 3;

to:

$view->gridcount = 5;

Scroll all the way down and press the "Save" button.

Click on member_gallery to have a look at your view.

Note that only four columns show up because the pictures are too big, and recall that there isn't a good way of dealing with this.

Weigh the pros and cons of panicking, and decide it's just too silly-looking a word to bother with.

There are two ways to shrink the picture size, both involve a bit of work:

  1. Create a theme of the grid view and use imagecache to present the views

  2. Make a module which can make imagecache presets available to views.

I like the latter because it'll be useful to everyone (we'll see what response it gets: http://drupal.org/node/118488#comment-214964 ), though the former is probably easier even though farther from what we've done before.

Although the former ultimately gives more fine-tuning ability for the look of this specific gallery.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.