PDA

View Full Version : image captions?



auntnini
04-29-2009, 12:07 AM
Looking for a neat new script for a friend's gallery http://www.chanit.com/gallery/index.htm

Fussed around with absolute positioned "expando" http://tchotches.tripod.com/expando/expando2.html but gave that up. Now trying to imitate and add image captions to John Davenport Schecher's great script from http://home.comcast.net/~jscheuer1/side/vfs/vac_plain.htm

See http://tchotches.tripod.com/jScheuer/jSchecherRev.html -- where I have




enableCaption : true, //Should "title" attribute of link and any paired image's 3rd parameter to be used as caption?
captionTop : true , //Place caption at the top of the image?
makeTitle : true, //Make title attribute for enlarged image from name attribute of trigger link?



And name="" alt="" title=''


<a class="" href="../chanitEnergy/coexistance.jpg" name="Coexistance"
rel="vfsimage::mouseover" rev="vac::../chanitEnergy/coexistance.jpg::lightbox[vp]::Coexistance">
<img src="../chanitEnergy/coexistance.jpg" alt="Coexistance" title="Coexistance"></a>

I also tried to modify the vfs_min.js




var viewfadeslide={
enableCaption:false, makeTitle:true, hideImgMouseOut:false, disableOnClick:true, populateWithFirst:true, enableCount:false, enableTransition:true, writeNumberButtons:true, writeControlButtons:true, useButtons:true, enableSlideShow:false, startSlideShow:false, swapControlVals:true, slideHoverBehavior:'stop', slideTriggerBehavior:'pause', slideNumberButtonsBehavior:'stop', enableLightBoxGroups:false, makeAlt:true, navSlideTitles:['Next','Previous','First', 'Last','Run','Stop'], numDes:'Image ', numPre:'Image number ', numQnt:' of ', pauseValue:'Paused', runningValue:'Running', stoppedValue:'Stopped', enableNavSlide:true, fadecapable:false, iefadecapable:false, preloadedimages:[], register:{}, paired:{}, slidestarted:{}, populated:{}, boolObj:function(v,p){v=this[v];return p=='not_what_you_are_looking_for'?false:(v===true||(typeof v=='object'&&typeof v[p]!='undefined'&&v[p]));},parentAtt:function(el,at,t,re){re=re?new RegExp(re):new RegExp();if(t[el[at].replace(re,'')])return el;while(el.parentNode){if(el.parentNode[at]&&t[el.parentNode[at].replace(re,'')])
return el.parentNode;el=el.parentNode;}



Obviously I'm not a programmer and have no OOP! Where do I look? What do I do? Short of using "innerHTML," how can I display captions under or over the images (like Lightbox)?

jscheuer1
04-29-2009, 07:20 AM
The vfs script is a work in progress and hasn't been officially released yet. The:


captionTop : true , //Place caption at the top of the image?

has already been deprecated in favor of css positioning. For more info on using:


enableCaption : true, //Should "title" attribute of link and any paired image's 3rd parameter to be used as caption?

with css positioning see:

http://www.dynamicdrive.com/forums/showthread.php?t=43787

especially post #4 in that thread.

auntnini
05-03-2009, 01:27 AM
Must say a big THANKS before I forget. See http://www.chanit.com/gallery/index.htm

I went to the above link and tried to follow along. At this point, I don't need to replace the control buttons with images, but really must change the color of the buttons' background and text. Wouldn't this be a CSS thing? For the life of me I cannot find where this would be (either CSS or JS).

Also what should a "CREDIT" line be?


Omni Image View, Fade, and/or Slide Script 2008 <a href="javascript:myopen('http://home.comcast.net/~jscheuer1/side/vfs/vac_plain.htm')">John Davenport Scheuer</a> as discussed at <a href="javascript:myopen('http://www.dynamicdrive.com/forums/showthread.php?t=43787')">Dynamic Drive Forums</a>

Have to press [Running] button to make show start.