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.

JQuery

2456

Comments

  • I can't see a bugfix for the JQuery extension in the JQMedia thread — please link directly to the comment in quesiton (use the #numbers to the right of the blockuser/comment links on the right of the comment).

    P.S. Mark, uploading RAR files no longer seems to work as I get the following error:
    You are not allowed to upload (JQuery-v12-1.1.4.rar) the requested file type: application/force-download
  • it's not a fix for JQuery, it's a fix for JQMedia.

    JQMedia # 81
  • Looks like a great fix - but it's not my extension unfortunately, so I can't do anything to it since I'm not an admin. Have you tried contacting MSB directly?
  • doh! sorry, i thought you were the author.
  • Uploaded version v13-1.2.1 of JQuery.
  • v13-1.2.1 Released 2007-09-19 + Updated the JS library to jQuery 1.2.1. + Changed the default jQuery library to a minified version instead of packed (for clientside decode speed up). I have also included the packed, original uncompressed and gzip versions of all the above. If gzip works for you, the best one is the gzipped min file (even though it's 1kb bigger than the gzipped pack file). Just edit line 29 to whatever suits you best $Head->AddScript('extensions/JQuery/jquery-1.2.1.min.js'); - Removed the /src/ directory from the package as it is now unecessary.
  • I'm having a problem here Luke...
    After upgrading to the latest version, JQMedia won't work. See this page, the YouTube video isn't showing up and I made sure to disable all the extensions, enable JQuery first then the rest.

    Any thoughts?!
  • If you're using 0.5.3 try 0.5.1 and let me know...
  • I was using 0.5.1 and now I'm trying 0.5.3! :)
  • try including the 1.1.4 compatibility script with this perhaps.
  • Yep, unfortunately I'm going back to JQuery 1.1.4 since I tried it with both JQMedia 0.5.1 and 0.5.3 and it works fine!
  • A hacked up version of 0.5.1 seems to be working for me, so this is most strange. I'll see about getting an option up with the compatibility script as a simple "uncomment this line". I'll also do a little more testing to see why JQMedia's not working correctly with 1.2 as it will obviously have to be updated to work with it since 1.2 has some compelling new stuff :)
  • Uploaded version v14-1.2.1 of JQuery.
  • v14-1.2.1 Released 2007-09-21 + Added commented line to default.php for easy enabling of jQuery 1.1.4 - just in case you're using something incompatible with the 1.2 branch. It isn't elegant, but it works :P + added minified, packed, gzipped versions of jQuery 1.1.4 to the /old/ directory.

    I should also have pointed out with v13-1.2.1 that you now need to call the JQuery extension in addons that require it using includeJQuery(); Here's an example from JQThickBox...

    // Specify which pages to add JavaScript and CSS to Head Control and do it. if (in_array($Context->SelfUrl, array( 'account.php', 'categories.php', 'comments.php', 'extension.php', 'index.php', 'people.php', 'post.php', 'search.php', 'settings.php', 'termsofservice.php'))) { includeJQuery(); // call JQuery to ensure it's loaded first /* use ThickBox 3.1 */ $Head->AddStylesheet($Context->Configuration['JQTHICKBOX_PATH'].'thickbox-3.1.css'); $Head->AddScript($Context->Configuration['JQTHICKBOX_PATH'].'thickbox-3.1.min.js'); /* use ThickBox 2.1.1 by removing the // from the beginning of the next three lines and adding // to the beginning of the previous two lines. */ // $Head->AddStylesheet($Context->Configuration['JQTHICKBOX_PATH'].'old/thickbox-2.1.1.css'); // $Head->AddStylesheet($Context->Configuration['JQTHICKBOX_PATH'].'old/thickbox-2.1.1.ie.css'); // $Head->AddScript($Context->Configuration['JQTHICKBOX_PATH'].'old/thickbox-2.1.1.min.js'); }
  • I remember there was an issue about the order this extension is loaded. If it hasn't been solved, here is a solution:class MyExtensionInit extends Control { function MyExtensionInit(&$Context) { $this->Name = 'MyExtensionInit'; $this->Control($Context); } function Render() { if (defined('JQUERY_EXTENSION')) { includeJQuery(); global $Head; $Head->AddScript('extensions/MyExtenion/MyJQueryScript.js'); ... } else { $this->Context->WarningCollector->Add('You need to install the jQuery extension...'); } } } $MyExtensionInit = $Context->ObjectFactory->CreateControl($Context, 'MyExtensionInit '); $Page->AddRenderControl($MyExtensionInit, 1);
    By using the Page event you are sure the jQuery extensions is loaded when you try to use it.

    Update: It will only work with php5. The Head controller will be passed by reference to Head object with php5 but by value with php4. Maybe a new event, called just after the functions are loaded, could be added. and the Controller could be added to Page object passed by reference.
  • Sorry Doniboff, you know what you're doing and I just stumble around in php/js land - does this fix jQuery being loaded before extensions or does it fix it being loaded in the wrong order with scriptaculous?
  • That's for extensions that need your extension to be loaded first.
    (But it need a fix in the core to work)
  • Will this fix be in Vanilla 1.2?

    And what's wrong with the way I'm doing it now? (other than the warning collector of course ;))
  • People have to install your extension first, is it right? And then they can install the extensions can depends on it.

    With that, after they failed to install, e.g., jQmedia, they just need to install

    It should be fix in 1.1.3, and in 1.2 jQuery should be in the core :-)
  • I've just tried that with 1.1.3rc1 and get the following (there should be two comments there and some images using ThickBox).

    image
Sign In or Register to comment.