Home

Primary links

  • top o the deck
  • Drupal for Beginners
  • about
  • links
  • give me some sugar

Drupal stuff

  • EDAM
  • STARDOM
  • Question Bank
  • Drupal musings
  • Drupal tips
Home

Key stuff on this site

Easy Drupal Admin Manual (EDAM)

SEO, Traffic and Revenue: Drupalace's Online Manual (STARDOM)

Drupal for Beginners

Subscribe to posts by RSS or email

Subscribe to Drupal Ace by RSS feed RSS feed 

Subscribe to Drupal Ace by Email

Donate towards my web hosting bill! Get a great host!

Share and save

Share/Save

Random piece of content

Oof! Hit by bad_httpd_conf error

Manuals on this site

  • Easy Drupal Admin Manual (EDAM)
    • Welcome to Your Site
    • First Steps: Please Read!
      • Understanding These Instructions
      • Important Terminology!
      • Best Practices for Site Admins
    • Super Quick Guide (for the experienced and the brave)
    • Logging In
    • Your Administrator Tools
    • Setting Site Basics
      • Setting Site Information
      • Configuring Your Theme
    • Creating Content
      • Node Types
      • Create a Page Node
      • Create a Story Node
      • Create a Blog Entry Node
      • Making Images and Other Files Available
      • Using Text and Image Editors
    • Organizing Your Content
      • Terms, Vocabularies, and Taxonomy: "Tagging" Your Content
        • Taxonomy Suggestions
      • Menus, Links, and Paths: Navigating the Site
        • Content Paths and URLs
        • Creating Links
        • Working with Menus: Administration Form (Drupal 6)
        • Working with Menus: Administration Form (Drupal 5)
        • Creating Menu Items on the Fly
        • Placing Menus on Your Pages
      • Placing Content on pages
        • Creating a page from a Single Node
        • Creating a page from a List of Nodes
        • Setting the Front Page
      • Working with Blocks
    • Maintenance Stuff
      • Maintenance and Construction Notices
    • Other Fun Things
      • Changing Color of Garland Theme
      • Free Aliases!
  • SEO, Traffic and Revenue: Drupalace's Online Manual (STARDOM)
    • Set a Clear Goal
    • Make a Good Site
      • Put out the Welcome Mat
      • Make Great Content
      • Build a Great Brand
      • Make Navigation Easy
      • Tune Site Performance
    • Drive Traffic
      • Promote your Site
      • Get Found with SEO
    • Build a Community
      • Build an Offsite Community
    • Monitor and Improve
    • One-Page Checklist
    • Drupal and the Blogging Starter Checklist
      • Drupal and the Blogging Starter Checklist, Part 1
      • Drupal and the Blogging Starter Checklist, Part 2
      • Drupal and the Blogging Starter Checklist, Part 3
      • Drupal and the Blogging Starter Checklist, Part 4
      • Drupal and the Blogging Starter Checklist, Part 5
      • Drupal and the Blogging Starter Checklist, Part 6
      • Drupal and the Blogging Starter Checklist, Part 7

You said it!

  • Tough one to Inves...

    I have heard and read stories such as this one before, and their common denominator is Drupal...

  • exclude

    excellent tip - can highly recommend the module - installed and working perfectly in drupal 7

  • Great CMS

    This book seems very interesting as I am currently starting a project to build a community site...

  • Thanks!

    Thank you very much !

  • Thank you very muc...

    Thank you very much !

more

images

How to make Lightbox2 work for Views images and inline images?

Submitted by Drupalace on Mon, 2010-04-19 23:01
  • images
  • overview
  • answered question
Question

This should be very simple for a good Drupaller:

I'm using Lightbox2 on a new site. I've set Lightbox as the handler for Image node settings, via the Lightbox2 "Automatic image handling" settings page (settings/lightbox2/automatic). One click on the "Attached image" of a content node summons a familiar large-size Lightbox image. No problem.

I also have Views displaying a random image node in a block. I'd like a click on that block's image to trigger Lightbox, but nothing happens.

From perusing bits and pieces on drupal.org, my understanding is that I need to:

1) Give the image(s) displayed by Views a unique class; and
2) Specify that class under the "Custom class images" option at settings/lightbox2/automatic .

The HTML currently generated by the site includes the following, for the random image Views block:

<div class="content"><div class="view view-Random-image view-id-Random_image view-display-id-block_1 view-dom-id-1">

      <div class="view-content">

        <div class="views-row views-row-1 views-row-odd views-row-first">

  <div class="views-field-image-image">

                <span class="field-content"><img src="[path to image]image.JPG"  class="image image-preview " width="280" height="210" /></span>

  </div>

That offers plenty of classes to play with. I don't know which should be usable as the trigger for Lightbox, but I've tried them all in the Lightbox "Custom class images" setting – image image preview , field-content, views-field-image-image, everything appearing above – and nothing triggers Lightbox in my Views block.

Am I fundamentally mistaken in my understanding of what I need to do to have a Views-generated image trigger Lightbox?

Related URL: 

http://drupal.org/node/769734

Question answer: 

Yes, I was fundamentally mistaken in my understanding of what I need to do to have a Views-generated image trigger Lightbox.

Re-reading the Lightbox2 settings more carefully, I see the key phrase "Choose how URLs for [such-and-such] images will be automatically handled" repeated for many settings.

Ah, that may be what I was skipping over. Perhaps Lightbox2 is looking for URLs, not certain classes, attached to the images. Going back to the Views settings for my random image block, I found the desired setting under the Fields section, where I had specified "Image: Image" as the field to appear in the View. The settings for that field include the option "Link this field to its node". I had originally left this unchecked, as I don't want clicks on images taking users to a page built on the image node. But, as I soon confirmed, that's not a worry; with a link URL in place on the images, Lightbox2 intercepts those links and performs its magic, opening a big floating image on the same page. Boom!

Now, what about inline images in my general nodes, the ones embedded helter-skelter amidst node text via my WYSIWYG text editor (TinyMCE and IMCE, if you must know)? I was getting no Lightbox2 click love there either. "Ah", I brilliantly surmised after enough tequila, "Perhaps you want a URL there as well, Lightbox2?" Ever so gently, I adorned my inline image with – for lack of a better idea – a link to its actual location in the file system (files/image.jpg or whatever).

"Now you understand me", breathed Lightbox2, and graced my inline with that old popup hoodoo. She/he/it and I have been like this (crosses fingers) ever since. 

I don't know that the above is the way to best work Lightbox2 into a site, but as a quick solution to what I was looking for, it did the trick for me.

  • 6 comments

Changing download method from Private to Public: Image problems solved (somehow)

Submitted by Drupalace on Fri, 2010-01-15 18:11
  • Drupal 6
  • images
Question

In this earlier Drupal Question, I lamented how changing a site's Private download method to Public resulted in non-displaying images with wacky URLs. Well, the problem is solved... or at least, it's just not there any more. Why? Well, maybe you could help explain. See the link for the full description of the problem and the new solution-of-sorts.

No closure, just working images. I guess that will have to do.

  • Drupalace's blog
  • Add new comment
  • Quote

How to fix broken image paths when changing download method from Private to Public?

Submitted by Drupalace on Tue, 2009-09-15 16:11
  • Drupal 6
  • images
  • unanswered question
Questions

This is a long-running question I've had. I can't find a forum post with exactly the same question, though this one comes close: http://drupal.org/node/489850

I have a site that's used the Private download method from the start. I'd like to switch to Public, so I can enable CSS optimization. Easy enough to do, and most images – logo, and images inserted into text via TinyMCE – are unaffected.

But I also have many nodes with images attached via the Images module, which adds an "Attached images" upload option to nodes. (Side note: Why it's labeled "Attached images" when it appears to allow attachment of only one image, I don't know.) Paths to those images break when switching download methods (which, fairly enough, warns in advance of such trouble).

Click here and read more!
Related URL: 

http://drupal.org/node/576732

Question answer: 

As of January 2010, I have no answer to the problem – but suddenly have no problem, either. In the kind of unsatisfying conclusion that happens time and again, I find that I can now change all affected sites to Public download, and even enable optimization of CSS and Javascript at Administer » Site configuration » Performance (which was the point of it all). After doing so, images display normally – even though the images still have the screwy addresses, like http://www.site.com/sites/site.com/files/images/image.png, that earlier resulted only in "image broken" placeholders.

That's if I'm logged in. If not logged in, image addresses have the nice expected form http://www.site.com/system/files/images/image.png. Can't these images make up their minds? But either way, they seem to display just fine.

So, what gives? I can't say. I don't recall making any major changes to the system that would affect this; perhaps it was simply an upgrade to the Image module somewhere between then and now (I'm currently running 6.x-1.0-alpha4).

If you've had this same problem, all I can suggest is trying the change from Private to Public again, especially if you've made any changes to Drupal or modules recently. Who knows, it just may suddenly work. 

  • 6 comments

Learn Drupal, hands-on

Get the beginner-friendly ebook that teaches community site building via a live case study.

Drupal 6 Ultimate Community Site Guide

Read the review

It's a deal!

Dreamhost dealsDrupal Ace presides over his domain, proudly ensconced in his DreamHost eyrie. Won't you join me?

Promo code deal!

Just enter the code 49ER when you register for an account, and save $49 off the already-low price. No strings!

Read my hosting service review

Drupal mini tip

Need to disable a Drupal module but can't do so from within the site? (This could happen if the wayward module is preventing you from reaching the Modules form!) Look for the module's entry within the "system" table of the site's database, and set the module's status to "0". 

(From within phpMyAdmin: Select the "system" table from the column of tables at left. Click the "Browse" tab. Find the row for the module you wish to disable, and click the "pencil" icon in that row. In the resulting form, input "0" for the Value of "status", and click the "Go" button. Done!) 

Powered by Drupal, an open source content management system

Copyright 2007 and forever after. Made with Drupal, of course. On OS X, of course. Served up by DreamHost. DreamHost

RoopleTheme