Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Need to add title to fancybox display


Reply


4 Posts   3988 Views

Avatar
zim

Community Member, 135 Posts

28 October 2009 at 1:28am

Edited: 28/10/2009 2:57am

I have got the imaggallery working fine. am using fancybox to display images. I have added a TITLE field to Database along with the caption field... so now have TITLE and CAPTION saved. I have amended fancy.css and jquery.fancybox-1.0.0.js to get the box appearinmg exactly as I want.

MY PROBLEM... is that I can not figure out how to display the TITLE above the CAPTION on the popup.

I believe it will be a matter of amending jquery.fancybox-1.0.0.js but I am not sure where. here is the code in case anyone can help..

//// CODE REMOVED -- see "jquery.fancybox-1.0.0.js" ////

Avatar
UncleCheese

Forum Moderator, 4096 Posts

28 October 2009 at 2:56am

I'm not about to debug a third-party Javascript plugin -- you might want to try the Fancybox forums for that, but I will tell you, if you figure it out, let me know, so we can release this as a new UI option for ImageGallery. Sounds interesting.

Sorry to remove your code. That was way too much for a single post.

Avatar
zim

Community Member, 135 Posts

28 October 2009 at 3:15am

totally understand.

Sorry for putting all that up.

Thought someone might have done it already.

If I work it out I'll post it up.

Avatar
zim

Community Member, 135 Posts

28 October 2009 at 10:33pm

I have spoken to fancy box developer... as advised and it is not possible to do this with fancybox as is.

this is the message I got

"zim
when Janis says "you can't" is because he is fancybox developer
and fancybox was not created that way

of course there is always many ways to do things but it would require
to modify or create a new script .... but so far not with fancybox as
it is

on the other hand, you may create your own script with captions (or
use an existing plugin) and then display it within a fancybox "

...At the moment I have just put bold tag around the first bit (TITLE)
and carraige return before second bit (CAPTION) and it now displays how i want it too. As I see it
gets caption from img title attribute. Not sure if my hack is
compliant or accessible though :(