WordPress.org

Forums

  1. SimplyMarkB
    Member
    Posted 2 years ago #

    How can I make colorbox fixed (or 75% of the browser size) width with this plugin? Anything special I need to know?

    Should I be using a diff lightbox?

    -Mark

    http://wordpress.org/extend/plugins/photonic/

  2. Sayontan Sinha
    Member
    Plugin Author

    Posted 2 years ago #

    You will have to change the plugin code in photonic/include/scripts/photonic.js:

    Look for this code:

    $j('a.launch-gallery-colorbox').each(function() {
    		$j(this).colorbox({
    			opacity: 0.8,
    			maxWidth: '95%',
    			maxHeight: '95%',
    			title: photonicLightBoxTitle(this),
    			slideshow: Photonic_JS.slideshow_mode,
    			slideshowSpeed: Photonic_JS.slideshow_interval
    		});
    	});

    Replace maxWidth and maxHeight with width and height respectively.

    You have to make a similar change in photonic/extensions/Photonic_Processor.php, where you will see this code:

    else if ($this->library == 'colorbox') {
    			$ret .= "<script type='text/javascript'>\$j('a.launch-gallery-colorbox').each(function() { \$j(this).colorbox({ opacity: 0.8, maxWidth: '95%', maxHeight: '95%', title: photonicLightBoxTitle(this), slideshow: Photonic_JS.slideshow_mode, slideshowSpeed: Photonic_JS.slideshow_interval });});</script>";
    		}
  3. SimplyMarkB
    Member
    Posted 2 years ago #

    WOW.. I didn't notice your reply Sayontan. I thought you forgot about me. LOL. Thanks for the info. :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Photonic Gallery for Flickr, Picasa, SmugMug, 500px, Zenfolio and Instagram
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic