Author Topic: Lightbox with "normal" image  (Read 103 times)

mueller.rs

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Lightbox with "normal" image
« on: February 03, 2010, 09:32:20 PM »
Hi,

I'm working at my fist project with CCMS. My client wants to use the lightbox function with normal images, edited in the WYSIWYG editor. Is there any way to use it without handcoding the rel= attribut?

Thanks a lot for your help.

mueller.rs

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Lightbox with "normal" image
« Reply #1 on: February 03, 2010, 10:10:04 PM »
I think I found a solution by myself:
1.  Implement the original Lightbox 2.0.4 into template.
2. Change lightbox.js to search not for rel==lightbox, but id==something
3. In WYSIWYG-Editor link the small image to the big image with "something" in id field.

I have not jet tested it in CCMS but it must work.

Xander

  • Developer
  • Administrator
  • Full Member
  • *****
  • Posts: 232
  • Karma: +5/-0
    • View Profile
    • CompactCMS.nl
Re: Lightbox with "normal" image
« Reply #2 on: February 12, 2010, 06:38:50 PM »
Hi!

I'm not sure if you've been able to do this already, but just as a heads-up: try using the field class instead of id if possible. An id should be unique and "officially" should not be defined more than once on one page. You could perhaps even make it look for every <img> tag and thus automate the process all together.

Remember: the modules within CCMS are indications of what can be done. CCMS is flexible enough, like you already did :), to have other frameworks and scripts integrated.

Good luck!
Xander.
Don't ever hold back your suggestions. Help me either to improve CompactCMS or spread the word about it on sites such as Twitter, Digg, StumbleUpon, etc :). Thanks!