Liz Baumann

Drupal Notes


Notes: 1 | 2 | 3 | 99 |

Drupal DBUG meetup, 2/9/11: Photo Gallery

Use for SMMTC Photos!!

Fyi
More Photo Galleries - see
Preliminaries
Steps
  1. Set PHP memory limit - increase e.g. to 96 M or 128 M. Default is often 32 M. (this page looks a bit like PHP Info page)
  2. Install modules - go to admin menu
    • CCK module (Content Construction Kit) - really important module - content, content copy, content permissions, field group, file field, file field sources, image, imagefield, node ref, number, options etc.
    • Features module - allows you to export and install on another site
    • *Image cache, Image API - Image cache actions used to add borders and rotate
    • IMCE - way to browse image
    • *Lightbox2
    • Views and Views UI
  3. Create content type
    • set name, type = photo album. Used CCK to define 3 custom fields:
    • CCK - manage fields: added, album cover, sort, photo... permitted file types, other settings. min/max resolution. file sources from filefield sources: IMCE browser = already on the server; or file attach from server directly. IMCE needs to work with files field in the database or use file-attach module - then IMCE can see it. (you say how you want this module to work)
    • Sort field
    • Photo field - # values = # photos. where to look.. move to final location? (this stuff sounds a lot like PHP). Keep arbitrarily uploaded files separate from others.
    • Multisite = single codebase but multiple sites. site choices: all, default.. they can have separate modules, images etc. Default has settings.php, js, css, database stuff, etc. provides separation between core and modules. DON'T HACK THE CORE. everything s/b under sites somewhere.
    • Note every content type you define is a node in Drupal. Node = parent, content type = child
    • Drupal 7 is more optimized for performance (Kevin). Drupal 6: looks from R and L and if not found, looks in sites / default.
    • If you have several galleries and want same background theme: put it in sites-all-themes. Each site can enable that theme.
    • photo album, 3 fields - don't show label (hidden). teaser = for album core only. short - don't show, exclude. photos: full node view only. lightbox: thumbnail => original (image cache presets)
  4. Configure lightbox
    • admin menu - site config - lightbox setup
    • video setting?? or:
    • Note there is a module called 'views caroussel' - has video setting too, and more
    • tabs - slideshow (disable), html content - sizing (w and h), automatic image handling
  5. Configure image cache
    • image cache actions stuff goes here too
    • site building - image cache - list
    • setup 2 presets: album cover (scale, put border around), thumbnail
    • all content goes into Drupal in raw form
    • for display, things also get stored in other ways - goes into the image cache, then can pull from the cache for speed subsequently
    • can scale - 100; crop 100x100 square, xoffset yoffset center, etc.
  6. Define the view
    • sitebuilding - views
    • views = a way to pull info from db and present to the user = an sql builder really
    • views does not work in a number of implementations though, e.g. Mongo db.
    • 9 of 10 sites works great; 1/10 no optimized way, complex sites.
    • if performance becomes an issue, try not using views.
    • you can write sql instead of using views
    • 4 stylings of views: grid, html list, table, unformatted (Neat!!)
    • other views plugins have even more, e.g. calendar.
    • Google Maps too
  7. Style the Album
    • file field sources adds: file browser, file attach - in addition to upload, file dir on the IMCE / server
    • NOTES TO SELF: maybe could build something to just upload photos, then I could edit it? Not sure - my process may still be better. I can probably do better than this?
    • file field source - file attach - may have error, then need to patch.
    • note e.g. if image cache to 100px x 100px, then cnage it to 50x50, this is a load on teh image cache and the server in general
    • at some point you could need to flush your cache (site config - performance - clear cached data??)

Top


Drupal DBUG meetup, 3/9/11: Drupal 7

Config
Upgrade to 7 or not? From modules perspective:
Must-have Modules

Top


Drupal DBUG meetup, 4/13/11:

Basics
Modules
Misc

Top


Misc Drupal Notes, Tips

Notes and Tips
Modules

Top