Topic: Change flickrTags configuration option with JaveScript and refresh
I would like to change flickrTags configuration option with JaveScript and and refresh the gallery. Any clews???
You are not logged in. Please login or register.
Juicebox Support Forum → Juicebox-Pro Support → Change flickrTags configuration option with JaveScript and refresh
I would like to change flickrTags configuration option with JaveScript and and refresh the gallery. Any clews???
I hacked it out by putting the configuration options in a function, passing the tag as a variable and reloading the whole thing. There must be a better way.
function juicer(theTags) {
var jb = new juicebox({
useFlickr: "TRUE",
galleryWidth: '390',
galleryHeight: '550',
backgroundColor: '#eee',
containerid: 'juicebox-container',
captionPosition: 'bottom',
showOpenButton: "false",
captionHeight: 25,
imagePadding: 5,
buttonBarPosition: "TOP",
galleryTitlePosition: "TOP",
themeUrl: "//bla/blas/juicebox/classic/theme.css",
configUrl: "//bla/bla/",
textColor: "333333",
textShadowColor: "rgba(0,0,0,0)",
captionBackColor: "rgba(238,238,238,.5)",
showAutoPlayButton: "false",
showThumbsButton: "false",
galleryFontFace: "Georgia,serif",
flickrUserId: "38123794@N03",
flickrSort: "DATE-POSTED-DESC",
flickrImageSize: "LARGE",
flickrImageCount: 75,
flickrShowDescription: "TRUE",
flickrShowPageLink: "TRUE",
flickrTags: theTags,
flickrTagMode: "ALL",
imageTransitionType: "CROSS_FADE",
enableLooping: "TRUE",
});
}
What you are currently doing is possibly the best solution.
If you want to dynamically change a configuration option, then it is certainly much easier to do so by setting the option in the embedding code (via a JavaScript variable) rather than try to set it in the gallery's XML file.
Also, it is not possible to change the value of a configuration option once the gallery has been loaded so the only option would be to reload the gallery with the new value (as you are doing).
Steven,
Thanks for the response. It seems like creating a method for this would make a nice addition to the API and would make Juicebox a lot more versatile for Flickr users.
Please post suggestions for future versions of Juicebox in the Feature Request forum thread
It keeps them all together and ensures that they are not overlooked.
Thank you.
Juicebox Support Forum → Juicebox-Pro Support → Change flickrTags configuration option with JaveScript and refresh
Powered by PunBB, supported by Informer Technologies, Inc.