<param /> and <embed></embed> tags:
<object><param name="wmode" value="opaque" /><embed wmode="opaque" [all other embed settings, file src etc.]></embed></object>
== Frequently Asked Questions ==
= I can't get Lightbox Plus to work, why not? =
The problem may be with your Wordpress theme, mangling image display properties. Try using another theme, that doesn't interfere with posted images. You may be lacking wp_footer() function in your footer.php of your Wordpress theme. Look at the default theme to see how it is implemented.
Alternately you may have other plugins that conflict with Lightbox Plus. Try disabling your other plugins and see if that helps. If it does, re-enable each plugin, one at a time to see which one is causing the conflict. Please let me know which plugin is causing the problem.
Finally, it seems that recent version of WordPress (or perhaps the plugin is causing this in some way I am not aware of) do not automatically add the link to the full size image. You must also make sure that when you are adding an image from the WordPress media dialog control you must make sure there is a link to the image in the Link URL field. The easiest way to get the correct link is to click on the link to image button beneath the field. Visual depiction of what is required when adding images in order for lightbox to function correctly.
= Lightbox Plus doesn't work properly in browser X, Y, or Z (Chrome, Safari, Firefox, Opera, Explorer 6, 7, etc)? =
Yes it probably does, the problems may be the same as above or there may be a conflict with another plugin or a style conflict. It has been tested in ChromeIE 7+, FireFox 2+, Chrome, Safari 3+, Opera 8+ since development began.
= Does Lightbox Plus work with PHP 4? If not, why not? =
No it doesn't. PHP 4 reached end of life on August 8th 2008 (over 3 years ago.) WordPress no longer supports PHP 4 and all plugin developers are encourage to follow. The best solution at this time is to ask your host provider to upgrade to PHP 5.
You will know that Lightbox Plus is not working because of PHP if you recieve the following error:
Plugin couldn't be activated because of fatal error
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /path/to/plugin/classes/filters.class.php on line 81
= Can I use this plugin and Lightview Plus, Lightbox 2 (either one), WP lightbox JS Plugin at the same time? =
No other lightbox plugins can be used, they will most likely interfere with each other as they all modify the image URLs. Other image overlay plugins may possibly be compatible.
= Can I add my own styles and images for the overlay? =
Yes, you can easily create additional styles by adding a new folder to the CSS directory under wp-content/plugins/lightbox-plus/css/ by duplicating and modifying any of the existing theme folders or using them as examples to create your own.
= How does Lightbox Plus differ from other Lightbox plugins for WordPress? =
Performance wise the ColorBox jQuery plugin is smaller and generally faster and has more options than most lightbox JavaScript plugins. The regular expressions that handle the text are more robust handling a wider variety of characters and in addition it will also grab the image title from the image to use for the overlay image caption.
= Does Lightbox Plus work with WordPress' built in gallery =
Yes it does. There are few simple requirements however. You you must set Link thumbnails to: Image File or use [gallery link="file" for the gallery options. You must check Use For WP Gallery box under Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /path/to/plugin/classes/filters.class.php on line 81 you have PHP 4.
* Contact your host provider to see if they can upgrade to PHP 5.
* Fixed issue where PHP Simple HTML DOM Parser was stripping returns causing issue with HTML output in several plugins (including SyntaxHighlighter Evolved)
* This issue should be fairly rare.
* Patched PHP Simple HTML DOM Parser (shd.class.php) to verify mb_detect_encoding() function exist before calling
* This issue was reported by several users that did not have mbstring functions compiled into PHP.
* Assumes UTF-8 if function doesn't exist
* The correct solution is to add the mbstring library to PHP (contact you host/support to resolve)
= 2.3.1 =
* Changed wp_enqueue_script of jquery.colorbox-min.js to reduce chance of conflict with other implementations of ColorBox (should update for this reason)
* Updated PHP Simple HTML DOM Parser from version 1.1 to 1.5
* Memory leak fixed!
* Added support for detecting the source html character set. This is used to convert characters when plaintext is requested.
* Other little fixes and features, too numerous to categorize.
* Error of "file_get_contents()" will be thrown as an exception.
* Add flag: LOCK_EX while calling "file_put_contents()".
* Fix the typo of "token_blank_t".
* Supports xpath generated from Firebug.
* New method "dump" of "simple_html_dom_node".
* New attribute "xmltext" of "simple_html_dom_node".
* remove preg_quote on selector match function: [attribute*=value];
* Element "Comment" will treat as children.
* Fixed the problem with <pre>.
* Fixed bug #2207477 (does not load some pages properly).
* Fixed bug #2315853 (Error with character after < sign).
* Cleaned up some general code and updated some help in the admin panel
* Updated demos as some were no longer pointing to working links
* Fixed typos in this file
* Updated the following styles: Dark, Elegant, Framed, Lightweight, and Shadowed
= 2.3 =
* Tested with WordPress 3.2.x
* Minor bug fixes
* Some minor text fixes
* Added option to allow up to 100 inline lightboxes
* Updated ColorBox to verion 1.3.17
* Added properties "top", "bottom", "left" and "right" to specify a position relative to the viewport, rather than using the default centering.
* Added property "data" to specify GET or POST data when using Ajax. ColorBox's ajax functionality is handled by jQuery's .load() method, so the data property works the same way as it does with .load().
* Added property "fixed" which can provide fixed positioning for ColorBox, rather than absolute positioning. This will allow ColorBox to remain in a fixed position within the visitors viewport, despite scrolling. IE6 support for this was not added, it will continue to use the default absolute positioning.
* Fixed ClearType problem with IE7.
* Minor fixes.
* Updated ColorBox to verion 1.3.16
* Better IE related transparency workarounds. IE7 and up now uses the same background image sprite as other browsers.
* Added error handling for broken image links. A message will be displayed telling the user that the image could not be loaded.
* Added new property: 'fastIframe' and set it to true by default. Setting to fastIframe:false will delay the loading graphic removal and onComplete event until iframe has completely loaded.
* Ability to redefine $.colorbox.close (or prev, or next) at any time.
= 2.2.2 =
* Corrected load_plugin_textdomain function calls, had incorrect number of arguments - Thanks Johannes!
* Minor interface corrections
= 2.2.1 =
* Require HTML Parser only for PHP 5.X. Was causing errors with PHP 4.X.
* Updated ColorBox to verion 1.3.15
* In IE6, closing an iframe when using HTTPS no longer generates a security warning.
* Changed the index.html example files to use YouTube's new embedded link format.
* By default, ColorBox returns focus to the element it was launched from once it closes. This can now be disabled by setting the 'returnFocus' property to false. Focus was causing problems for some users who had their anchor elements inside animated containers.
* Minor bug fix involved in using a combination of slideshow and non-slideshow content.
* Minor bug fix involved in preloading images when using a function as a value for the href property.
* The slideshow now respects the loop property.
* Fixed compatibility with jQuery 1.4.3
* The 'open' property now accepts a function as a value, like all of the other properties.
* Preloading now loads the correct href for images when using a dynamic (function) value for the href property.
* Fixed bug in Safari 3 for Win where ColorBox centered on the document, rather than the visitor's viewport.
* May have fixed an issue in Opera 10.6+ where ColorBox would rarely/randomly freeze up while switching between photos in a group.
* Some functionality better encapsulated & minor performance improvements.
= 2.2 =
* Fixed "Object id #", "Object", "Object #" errors with PHP 5.1.x.
* Problem was due to circular memory leak in PHP 5.1 and 5.2 and HTML DOM object not being cleaned up.
* Altered way the content is returned to allow for closure and cleaning of object sooner eliminating memory leak.
* Due to overhwhelming demand I added PHP 4 functionality back in but it is not officially supported.
* If you were seeing an error that looked something like `Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /path/to/plugins/lightbox-plus/classes/shd.class.php on line 86` you have PHP 4.
* Option is automatically set to use legacy method if you have PHP 4
* You will have to manually select the option to use the PHP 4 Auto Lightbox Method if you are using PHP 5.X and wish to use legacy method.
* Fix for images with upper case file extension not being auto-lightboxed.
* Probable fix for `XML Parsing Error: no element found` likely caused by memory leak
* Unable to reproduce error but research indicates memory leak is a likely cause.
= 2.1 =
* Now requires PHP 5+, no PHP 4 support.
* PHP4 reached it's end of life on 8/8/2008 nearly 2 years ago.
* Fixed problems with initialization and re-initialization of the plugin not working under various circumsanstances.
* Add code for activation/deactivation of the plugin
* Added true HTML parser instead of regular expressions
* Using PHP Simple HTML DOM Parser for parsing HTML
* Should mitigate issues of not consuming the HTML content and correctly modifying it
* Change method for finding and selecting styles
* Added option for stylesheet directory to reside outside of plugin directory
* Lightbox Plus no longer stores stylesheet path in options, it is now pulled from global definitions
* It should now be easier to use on multiple servers with different paths.
* Added support for multiple galleries on a single page displaying separate slide shows
* Updated ColorBox to version 1.3.9
* Fixed a bug in IE where iframed youtube videos were not opening correctly.
= 2.0.5 =
* Rewrote the way the plugin is instantiated.
* Provide better conrol over how actions and filters are added by Lightbox Plus.
* Provides fix for jQuery UI styles loading on all admin panels.
* Prevented jquery.colorbox.min.js from loading on admin panels other than Lightbox Plus.
* Rewrote several functions to provide better compaibility with other plugins.
* Admin scripts are now enqued correctly.
* Admin and plugin styles are now enqueued correctly.
* Fixed slideshow always auto-starting if slideshow enabled.
* Changed several variables and related fields
* Do Not Auto-Lightbox Images using `auto_lightbox` to `no_auto_lightbox` to accurately reflect it's use.
* Do Not Display Image Title using `display_titles` to `no_display_titles` to accurately reflect it's use.
* Use Class Method using `class_method` to `use_class_method` to accurately reflect it's use.
* If you use any of these settings you will need to re-check them and save your settings.
* Reduced size of inline JavaScript and converted all to jQuery.
* Reduced size of some scripts using old toggle method for help.
= 2.0.2 =
* Add quick fix/hack for a big interface issue on the admin panel. See roadmap for long term solution.
* jQuery UI themes were overloading other plugins that were using the jQuery UI
* Lightbox Plus specific themes and scripts should only load on Lightbox Plus panel
* The exception is colorbox.min.js will load in any admin panel due to the way it is initilized. Expect version 2.0.5 to address this.
= 2.0.1 =
* Fixed several interface issues in the admin panel.
* User feedback was not reporting updates because admin scripts were not loading properly - this hs been fixed.
= 2.0 =
* Added secondary lightbox option
* There is no auto-lightboxing for the secondary lightbox
* Allows the creation of a secondary lightbox with iFrame capabilities
* Allows lightboxing of video, flash, and content that resides elsewhere
* Added inline lightbox options
* There is no auto-lightboxing for the inline lightbox
* Can have multiple inline lightboxes (up to 20)
* Can be used to display hidden inline content, forms and more...
* Improved interface in admin panel.
* Added better feedback for users
* Added backend test/demo areas
* Allows user to test lightbox settings in the admin panel
* Provides demos and examples for secondary lightbox using video,external webpages and interactive flash
* Provides demos and examples for inline lightbox using inline content
* Fixed issue with saving setting and changes not being reflected.
* Updated ColorBox to verion 1.3.8
* Fixed a bug in Chrome where it would sometimes render photos at 0 by 0 width and height (behavior introduced in recent update to Chrome).
* Fixed a bug where the onClosed callback would fire twice (only affected 1.3.7).
* Fixed a bug in IE7 that existed with some iframed websites that use JS to reposition the viewport caused ColorBox to move out of position.
* Abstracted the identifiers (HTML ids & classes, and JS plugin name, method, and events) so that the plugin can be easily rebranded.
* Small changes to improve either code readability or compression.
= 1.7 =
* Updated ColorBox to verion 1.3.7
* $.colorbox can now be used for direct calls and accessing public methods. Example: $.colorbox.close();
* Resize now accepts 'width', 'innerWidth', 'height' and 'innerHeight'. Example: $.colorbox.resize({width:"100%"})
* Added option (loop:false) to disable looping in a group.
* Added options (escKey:false, arrowKey:false) to disable esc-key and arrow-key bindings.
* Added method for removing ColorBox from a document: $.colorbox.remove();
* Fixed a bug where iframed URLs would be truncated if they contained an unencoded apostrophe.
* Now uses the exact href specified on an anchor, rather than the version returned by 'this.href'. This was causing "#example" to be normalized to "http://domain/#example" which interfered with how some users were setting up links to inline content.
= 1.6.9.7 =
* Fixed auto-lightbox breaking links that contained manually created `rel="lightbox[]"` attributes.
= 1.6.9.6 =
* Skipping of auto-lightboxing of second image when image links were next to each other in html source should be fixed. At least in my testing.
* Fixed do not display image titles to work with text links.
* Note - must already not have title tag in links elements.
* Fixed ability to use class method in text only links and gallery.
* Added ability to specify the class name used with class method. Defaults to cboxModal for the class.
* Changed jQuery implementation of colorbox on the page to both reduce size and prepare for allowing two different colorboxes. (see Road Map)
= 1.6.9.5 =
* No really, the IE problems should be resolved.
* Correctly handle new settings when empty to render correct JavaScript on output - was causing IE to not display lightbox and wierd sliding effect on lightbox in all browsers.
* Fixed invalid function call that would prevent older versions of IE (7 or less) from rendering lightbox at all.
* Fixed issue that if admin was being accessed via SSL you could not save settings.
* Fixed some skipping of images being auto-lightboxed. May not resolve all issues - please let me know at Hi
"});` * Changed `$.fn.colorbox.element()` to return a jQuery object rather the DOM element. * jQuery.colorbox-min.js is compressed with Google's Closure Compiler rather than YUI Compressor. * Added `'innerWidth'` and `'innerHeight'` options to allow people to easily set the size dimensions for ColorBox, without having to anticipate the size of the borders and buttons. * Renamed `'scrollbars'` option to `'scrolling'` to be in keeping with the existing HTML attribute. The option now also applies to iframes. * Bug fix: In Safari, positioning occassionally incorrect when using '100%' dimensions. * Bug fix: In IE6, the background overlay is briefly not full size when first viewing. * Bug fix: In Firefox, opening ColorBox causes a split second shift with a small minority of webpage layouts. * Simplified code in a few areas. * Special thanks for navjotjsingh for the include, excude fix for WordPress built in gallery = 1.6.3 = * Eliminated conflict with Featured Content plug-in * Removed `jQuery.noConflict()` due to poor implementation on my part. * Kept `$lbp` jQuery variable. * jQuery conflicts should all be resolved - hopefully. * Minor modification to `wp_enqueue_script` function cal to include colorbox version. * Now works with WordPress Mu if `rel=lightbox[]` is added manually. * Working on solving auto lightboxing issues with WordPress Mu = 1.6.2 = * Added `jQuery.noConflict()` to the initiator to hopefully eliminate issues with other jQuery libraries loading and causing conflicts. * Changed jQuery `$` variable to `$lbp` to give a unique constructor. * Added replacement shortcode gallery method to allow Lightbox Plus to work with shortcode galleries called via the `echo do_shortcode('[gallery link="file" size="thumbnail"]');` method in templates. * Replacement shortcode gallery function automatically adds `rel="lightbox"` or `class="cboxModal"` as selected in options. * Added code to automatically cleanup doubled title tags from shortcode galleries. * Added quicklinks to the plugin listing on the plugin page. * Some minor UI tweaks to the admin page. = 1.6.1 = * Fixed IE display issues for elegant and shadowed themes. * Should now correctly grab path to images for IE 6/7/8 * Re-added additional simple styles blue, green, grey, purple, red, teal, yellow in addition to balck and white * Fixed prev/next buttons in simple styles to only display when cursor hovers over left or right of image. = 1.6 = * Added the much requested feature for Lightbox Plus to work with WordPress' built in gallery * Added checkbox to select whether to use with WP built in gallery. * Updated LightBox Plus to use new version of ColorBox * Updated ColorBox to version 1.3.1 with the following changes * Removed the IE-only stylesheets and conditional comments. All CSS is handled by a single CSS file for all examples. * Removed user-agent sniffing from the js and replaced it with feature detection. This will allow correct rendering for visitors masking their agent type. * Added `$.fn.colorbox.resize()` method to allow ColorBox to resize it's height if it's contents change. * Added `scrollbars` option to allow users to turn off scrollbars when using the `resize()` method. * Renamed the `resize` option to be less ambiguous. It's now `scalePhotos`. * Renamed the `cbox_close` event to be less ambiguous. It's now `cbox_cleanup`. It is the first thing to happen in the close method while the 'cbox_closed' event is the last to happen. * Fixed a bug with the slideshow mouseover graphics that appeared after ColorBox is opened a 2nd time. * Fixed a bug where ClearType may not work in IE 6 & 7 if using the fade transition. * Minor code optimizations to increase compression. * Minor corrections to admin interface. = 1.5.5 = * Updated additional code that didn't make it into 1.5.4 to use less memory and run faster * Separated the admin panel output to a separate file * Added some custom admin panel styles * Cosmetic changes to admin panel = 1.5.4 = * Fixed bug where titles were being broken when DO NOT USE TITLE was checked. * Fixed issue with limited character sets - should allow any characters in the title (diacritics, umlauts, etc.) * Optimized code to use less memory and run faster * Updated ColorBox to version 1.2.9 * No new features at this time = 1.5.3.1 = * Fixed bug causing plugin not to use correct stylesheet on initial install or reset. It was pointing to a non exsitent style (shadow instead of shadowed.) = 1.5.3 = * Added class based option. * If options is checked, Lightbox Plus will only lightbox images via class: cpModal attribute. * Using this method you can manually control which images are affected by Lightbox Plus by adding the cpModal class the image link URL and checking the Don't Auto-Lightbox Images option. * Added option to not automatically add attributes required for Lightbox Plus to work. This allows for more manual image control. * Added option not to display image titles. * Updated ColorBox to version 1.2.5 = 1.5.2 = * Reset/re-initialize button on the plugin page will now remove the old files that were not removed during upgrade to 1.5.x from pre 1.5 versions. * Fixed the slideshow timing to display and save correctly - any amountof time over 5000 milliseconds was displaying as 13000 milliseconds. * Miscellaneous cosmetic fixes and text adjustments = 1.5.1 = * Fixed the need to haveclass="imagebox" added to image links
= 1.5 =
* Rebuilt Lightbox Plus to utilize ColorBox for its image overlay functions
* Supports photos, photo groups, slideshow, ajax, inline, and iframed content.
* Appearance is completely controlled through CSS so users can restyle the box.
* Written in jQuery plugin format and can be chained with other jQuery commands.
* Generates W3C valid XHTML and CSS, adds no JS global variables & passes JSLint.
* README! - If you are upgrading from a previous version you will need to reset your Lightbox Plus settings as they have all changed and the old values are no longer useful.
* README! - There is a reset button that will remove your old options and replace them with the new options, Lightbox Plus will act funny until you either reset it or update the settings.
* README! - If you have custom styles back them up before proceeding. You will need to convert them to the new directory and ColorBox format to use them again.
* README! - Only the black and white existing styles have been ported to the new format, it is very easy to convert any of the other color styles to the new format.
* Added reset button to allow for resetting to default settings.
* Tested In: Firefox 2, 3, Safari 3, 4, Opera 9, 10, Chrome 1, 2, Internet Explorer 6, 7, 8.
= 1.4 =
* There is no version 1.4
= 1.3.4 =
* Updated to work with WordPress 2.8
= 1.3.3 =
* Fixed another problem with JavaScript error causing script not to work correctly.
= 1.3.2 =
* Fixed problem with JavaScript error on IE7.
* Added some additional color styles.
= 1.3.1 =
* Updated lightbox.js to allow better control from the admin panel - lightbox was failing sometimes due to duplicate JavaScript.
= 1.3.0 =
* Added ability to configure Lightbox options from the admin panel
* Initializes base options on load
* Modified and rewrote code for better readability and functionality
= 1.1.1 =
* Moved admin panel under Design/Appearance
* Minor code formatting for better readability
= 1.1.0 =
* Fixed absolute pathing - should now work in blog residing in subdirectories
* Rolled code into class structure
= 1.0.1 =
* Modifications to regular expression usage for image linking
= 1.0 =
* Initial release
== Special Thanks ==
* Dirk Schmitz (for pointing out an obvious bug that I kept overlooking)
* Michael Sheehan and Helena Hultén for continued support and testing.
* Ken Williams (for testing version 1.5)
* Bart Lauwers of GenThree
* navjotsingh (for bug fix in gellery shortcode with version 1.6.x)
* Milan Petrovic for some quick debugging of version 2.0 admin panel
* Melanie Sallis for needing a lightbox for her site which prompted me to create this plugin
* Jack Moore for creating the awesome jQuery plugin, ColorBox, and everyone who has contributed to the support in developing this plugin.
== More Information ==
Visit plugin site | FAQ | Support | Follow on Twitter | Add Facebook Page