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

2

Comments

  • Did you use the import feature in Attachments 2.1?
  • edited February 2007
    Yes, I did. I didn't see any instructions for the Attachments 1.4 to 2.1 upgrade. Maybe I did that wrong. I first deactivated the 1.4 version. Then I deleted the folder. Then I copied over the new 2.1 folder. Then I activated it. The settings were there so I imported. Does this sound right to you? If so, I'll do it on my live site.
  • Sounds right to me, but if it didn't work on your test forum, I'd start a new discussion here and ask a bit more first. This is going beyond my knowledge of Attachments1/2 and the scope of this discussion I'm afraid.
  • edited February 2007
    Well, I went back to some Attachments 2 discussions and saw that I should have just overwrittern the old 1.4.1 files. So, I put everything back and put the 2.1 files on top. Now, I have an icon in my post next to the image file name. But it still doesn't display. I guess I need to install InlineImages?

    edit: wala! After adding the InlineImages 1.3 and activating thickbox setting, all is well. So, for dummies like me, there should be a message that tells me I need Attachments2.1, InlineImages1.3, jQuery, and jqThickbox for this to work.

    edit part deux: Oh well, no success on my live site. All worked well on my local forum, but when I did everything live, the image opens in a new browsed window. And I still have the js error.

    edit part3: I looked at the error again (which I see in FF using FireBug) and it is from the thickbox.js in JQThickBox.
  • StashStash
    edited February 2007
    I notice you're using BoxOverand some other JS in the head as well. Try disabling BoxOver and see if that helps...

    Edit: I just downloaded a brand new copy of JQThickBox from the add-ons site and did a file compare with the thickbox.js on your site and they're identical, so it must be conflicting with something, because that exact same file works perfectly for me.
  • edited February 2007
    I deactivated both the boxover and ibox extensions with no change. Could it be the jquery.js file? When I pull this file into my editor, it is all one long line.

    or could it be a conflict with Attachments which also has thickbox and jquery?
  • StashStash
    edited February 2007
    OK, just so no one else gets confused by this (I'm not angry or shouting, I just want it to be crystal clear):

    Attachments does NOT have jQuery and ThickBox.
    InlineImages does NOT have jQuery and ThickBox.

    InlineImages DOES use the JQuery and JQThickBox extensions IF you enable the option.

    Regarding the jquery.js file being one long line, that is because I'm using the packed version - this is recommended by the jQuery people. Do not worry about this.

    I've finally done what I should have in the first place, and that's check to see if you have the crrect version of jquery.js. It appears that this file isn't where it should be as when I go to http://www.jwurster.us/Vanilla.1/extensions/JQuery/jquery.js I get a 404 error. I suggest you solve this problem first as that is almost certainly why you are getting that JS error and the JQThickBox extension is not working as expected.

    Still, it's nice to see that things degrade gracefully with the InlineImages extension when jQuery isn't there :)
  • I really appreciate your help with this. There was a thickbox and lightbox folder in the Attachments extension folder. I don't know how they got there, but I deleted them.

    You will see the jquery.js file if you use "jQuery" as the folder name. Should it be "JQuery"?
  • There was a thickbox and lightbox folder in the Attachments extension folder.
    These were form the 1.4.1 installation as they were integrated into those IIRC. They shouldn't have been interfering with anything, but it's better to get rid of them.

    Yes, the folder name should be "JQuery". I believe the lack of capitalisation is what may be creating the issue here.
  • edited February 2007
    Well, I renamed the folder but am now getting errors. I guess I have to edit the settings file to correct.

    Edit: Once I edited the extensions.php file to change the folder name, everything worked fine. See what a single character can do to you.
  • edited February 2007
    sorry.
  • edited March 2007
    I have downloaded the latest version of Vanilla and the latest versions of several extensions** today, and have them uploaded and installed on my server.

    I am getting the following error in my logs, and I am unable to track down where in the code this image is called. I have checked, and the image is on the server in the JQThickBox folder, where it should be.

    File does not exist: /home/username/public_html/domain/extensions/JQThickBox/loadingAnimation.gif

    Any help tracking down the source of this error would be most appreciated.
    ---------------------------------------------------
    **Extensions installed
    Account Pictures 1.1
    Applicant Email Verification 0.4.0
    Attachments 2.1
    Chronological 1.0
    Comment Protection 2.0
    Comment Removal 2.1
    DCalendar 1.01
    Discussion Filters 2.0
    Edit Protection 1.0
    Extended Application Form 1.0
    Html Formatter 2.0.2
    Inline Images 1.3
    IP History 1.0.1
    JQThickBox 1.1.2
    JQuery 1.1.2
    MarkAllRead 1.0
    New Applicants 1.2
    Notify 0.2
    Preview Post 2.3
    Private Accounts 1.0
    Quicktags 0.5
    Role History 1.0
    Signatures 1.0
    Forum Statistics 0.2.8
    Who's Online 1.1
    Window Links 1.0
  • Do you have friendly URLs enabled?
  • No, I don't have friendly URL's installed at all. Wanted to get everything else up and working before I attempted those.

    Where in the code is that image called? I looked through all of the files, and couldn't find it.
  • StashStash
    edited March 2007
    Ahhh, I think I've found the problem. It's to do with the loading animation being loaded from a path relative from the JS file. I've coded it for use with FriendlyURLs but you need a slightly different relative path when you're not using FriendlyURLs. You won't have found the image in the code as it's in the JS file and I just started packing the JS file, grrrrrrrr.

    Right, I'll upload a temp solution which gives you the unpacked JS files as well as the packed ones so you can pick and chose which one to use. Basically, the mod in the uncompressed JS file is at line 15 and all you need to do is remove the ../s:
    var TB_LoadingAnimation = "../../../extensions/JQThickBox/loadingAnimation.gif"; to var TB_LoadingAnimation = "extensions/JQThickBox/loadingAnimation.gif";
    Try this: JQThickBox-1.1.2a, 2007-03-04_03-26-24.rar

    So my next question to the PHP/JS gurus out there is this - what's the best way to solve this problem? Obviously it's not very elegant for people to have to swap files over themselves :/
  • Cant you build that URL in your php script so you know how it aught to be set up based on the friendly urls status then pass it to the js file as a parameter?
  • edited March 2007
    Have you tried with these rules, http://lussumo.com/community/?CommentID=34776 ? the following one should solve the problem: RewriteRule ^discussion/([0-9]+/){1,2}[^/]*/(extensions|themes|images|ajax|js)/(.*) $2/$3 [QSA,L]
  • Stash -

    Before uploading your latest package, I tried enabling friendly URLs to see if that would solve the problem - no go. Still getting the image missing error, plus friendly URLs caused the pages I created using the Page Manager extension to come up as 404. I disabled friendly URLs completely, and those pages are fine again.

    The missing image error happens with every page view. Since both Jquery and JQThickBox scripts are now included in the headers, they are being initialized on every page, and that image call is being made, regardless of whether the page needs it or not.

    I did try uploading both the packed and unpacked javascript files from your new package (the no friendly URLs versions), and there was no change - same missing image error.

    I've disabled both Jquery and JQThickBox in the extensions manager until this gets sorted out to keep my error log from going bonkers.
    ------------------------------------------
    Note to admin: am getting the following error when trying to preview a message:

    Fatal error: Call to undefined function: getunreadquerystring() in /applications/lussumo/community/extensions/PanelLists/default.php on line 72
  • StashStash
    edited March 2007
    Mini, I'd love to do that, only I don't know how. If you could point me in the right direction...
    Basically, if it could check for rewrite rules and then give one or another path that would be great. Actually, even better, I'd just like to be able to use the following as the path:var TB_LoadingAnimation = "'.$Context->Configuration['WEB_ROOT'].$Context->Configuration['JQTHICKBOX_PATH'].'loadingAnimation.gif";
    Dinoboff, how are those rules different to the ones shipped with Vanilla? Also, unless Mark's willing to change the rewrite rules that ship with Vanilla, is it worth trouble of seeing if they work? Of course, I don't have a problem with the loading animation showing up - it shows up just fine for me no matter whether Friendly URLs is on or off and no matter whether I use a packed or normal JS file.

    dhdesign, any chance of re-enabling the original 1.1.2 extensions and letting me have a look at this on your live forum? Obviously I'd like to get to the bottom of this, but I've tried this on 3 different servers/vanilla installs and with all the different combinations I can think of with no problems. Two servers are Linux based and one is Win2003, although all are running Apache (2.x I believe).

    Is anyone else having problems with the loading animation not showing up? If so, does changing the JS file from the 1.1.2b linked above solve the problem?
  • Actually, in the latest extension i was referencing something in, I used:
    $URL = $Context->Configuration['WEB_ROOT'].'extensions/name/file.php';
    which makes it a full path rather than a relative one. Does that do the trick for you?
This discussion has been closed.