Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Extension: JQThickBox
Stash
✭
Download link: JQThickBox
From the ThickBox homepage:
ThickBox is a webpage UI dialog widget written in JavaScript on top of the jQuery library. Its function is to show a single image, multiple images, inline content, iframed content, or content served through AJAX in a hybrid modal.
Now developers can integrate ThickBox functionality into their extensions quickly and easily, without having to worry about conflicting with other extensions using older/different versions of ThickBox.
I'm using Klaus Hartl's ThickBox 2.1 variant currently, as it seems that little bit better than the *ahem* vanilla ThickBox 2.1.
JQuery extension needs to be installed and enabled first in order for this to work.
To do:
+ Convince extension authors to support this package!
Thank you to Johan Sundström for the "#TB_window *" CSS trick that was preventing me from releasing this.
From the ThickBox homepage:
ThickBox is a webpage UI dialog widget written in JavaScript on top of the jQuery library. Its function is to show a single image, multiple images, inline content, iframed content, or content served through AJAX in a hybrid modal.
Now developers can integrate ThickBox functionality into their extensions quickly and easily, without having to worry about conflicting with other extensions using older/different versions of ThickBox.
I'm using Klaus Hartl's ThickBox 2.1 variant currently, as it seems that little bit better than the *ahem* vanilla ThickBox 2.1.
JQuery extension needs to be installed and enabled first in order for this to work.
To do:
+ Convince extension authors to support this package!
Thank you to Johan Sundström for the "#TB_window *" CSS trick that was preventing me from releasing this.
0
This discussion has been closed.
Comments
$("body").append("<div id='TB_load'><img src='loadingAnimation.gif' alt='Loading' /></div>");
could be$("body").append("<div id='TB_load'><img src='extensions/JQThickBox/loadingAnimation.gif' alt='Loading' /></div>");
and below the line 26 default.php
'termsofservice.php'))) $Head->AddStylesheet('extensions/JQThickBox/thickbox.css'); $Head->AddString(' <!--[if lte IE 7]><link rel="stylesheet" href="thickbox.ie.css" type="text/css" media="screen" /><![endif]--> '); $Head->AddScript('extensions/JQThickBox/thickbox.js');
may be'termsofservice.php'))){ $Head->AddStylesheet('extensions/JQThickBox/thickbox.css'); $Head->AddString(' <!--[if lte IE 7]><link rel="stylesheet" href="thickbox.ie.css" type="text/css" media="screen" /><![endif]--> '); $Head->AddScript('extensions/JQThickBox/thickbox.js'); }
or get preview extenstion error.$this->Context->Configuration['APPLICATION_PATH']
get_settings('siteurl')
You could echo each one to make sure you are getting what you need.
As I'm updating my Inline Images extension, I came accross your JQuery and JQThickBox extensions. I have the following remarks:
- You use the following code:
$Configuration["JQTHICKBOX_PATH"] = 'extensions/JQThickBox/';
But it isn't used in your extension, so why add that Configuration parameter?
- You use the following code to add configuration settings:
AddConfigurationSetting($Context, 'JQTHICKBOX_VERSION_EXT', '1.0.0');
But this code gets executed everytime your refresh your browser, which means it will write to the configuration file every page load. I suggest you add:
// Set the Extension and JavaScript version numbers. if( !array_key_exists('JQTHICKBOX_VERSION_EXT', $Configuration)) { AddConfigurationSetting($Context, 'JQTHICKBOX_VERSION_EXT', '1.0.0'); AddConfigurationSetting($Context, 'JQTHICKBOX_VERSION_JS', '2.1'); }
- I've noticed the JQuery extension needs to be loaded BEFORE JQThickBox is loaded. Maybe you could mention that in your ReadMe's (if you haven't done already)
Other than that, these are fine extensions And they work flawlessly with my Inline Images extension
Is there a way for "JQPluginExtensions" to check to see if the JQuery extension is enabled and if not, not enable themselves and tell the admin? Perhaps even have them enable the JQuery extension if it is there and THEN enable themselves with a little message telling the admin that JQuery has been enabled?
Is there a way for extensions to check for other ones and then enable themselves and others in a specific order?
Edit: I misunderstood you as well I shall add that check.
// Set the Extension and JavaScript version numbers. if( !array_key_exists('JQTHICKBOX_VERSION_EXT', $Configuration)) { AddConfigurationSetting($Context, 'JQTHICKBOX_VERSION_EXT', '1.0.1'); } if( !array_key_exists('JQTHICKBOX_VERSION_JS', $Configuration)) { AddConfigurationSetting($Context, 'JQTHICKBOX_VERSION_JS', '2.1'); }
And if there's an older version in, such as JQTHICKBOX_VERSION_EXT 1.0.0, will it update it to the newer value, in this case 1.0.1?
$Head->AddString(' <!--[if lte IE 7]><link rel="stylesheet" href="'.$Context->Configuration['APPLICATION_PATH'].$Context->Configuration['JQTHICKBOX_PATH'].'thickbox.ie.css" type="text/css" media="screen" /><![endif]--> ');
But that gives me:
<!--[if lte IE 7]><link rel="stylesheet" href="/home/exhibitq/public_html/treasurytoday/extensions/JQThickBox/thickbox.ie.css" type="text/css" media="screen" /><![endif]-->
Instead of what I want, which is a nice neat:
<!--[if lte IE 7]><link rel="stylesheet" href="/extensions/JQThickBox/thickbox.ie.css" type="text/css" media="screen" /><![endif]-->
Is there another variable (is that what they're called?) that will give me the result I want?
P.S. Jazzman, I'm using that Configuration dooberry now
JQThickBox 1.0.1 released!
Is it possible to do a check to see...
if the value first exists,
if it doesn't, create it
and if it does,
check to see if it is different,
and if so, overwrite it.
This way if you put an older version of the extension back in, it will update the version info to the correct value.
Do you have SmoothPageJump installed? Can I see the forum where you're getting this problem?