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.

Attachments 2.0 and Inline Images 1.1

12357

Comments

  • hmm still doesn't work for attachments 2.0 and inline images 1.0 :/
  • Hmm... what browser? Happen in all browsers? Another thing to try is turn on headers with some or other firefox extension...otherwise I use http://www.rexswain.com/httpview.html to see the HTTP magic...
  • ADMADM
    edited September 2006
    Firefox 1.5 Yeah the headers are showing: HTTP/1.x 200 OK Date: Thu, 14 Sep 2006 19:00:17 GMT Content-Length: 40756 Expires: Sat, 15 Sep 2007 05:00:17 GMT Cache-Control: public X-Powered-By: PHP/4.4.4 Last-Modified: Mon, 11 Sep 2006 00:00:00 GMT Pragma: no-cache Via: 1.1 proxy (NetCache NetApp/5.5R5) Weird thought that it still forces a reload.
  • Get rid of that Pragma: no-cache! Allthough its a HTTP 1.0 directive, it may still be messing things up. Funny you also have HTTP 1.x instead of 1.1... I also wonder if that NetCache proxy could be inserting some headers...

    This is what I got:/* prior headers: HTTP/1.1·200·OK Date:·Wed,·13·Sep·2006·13:25:33·GMT Server:·Apache/1.3.37·(Unix) Content-Control:·cache X-Powered-By:·PHP/4.4.4 Content-Length:·14015 Connection:·close Content-Type:·image/jpeg */ /* New headers: HTTP/1.1·200·OK Date:·Wed,·13·Sep·2006·13:56:22·GMT Server:·Apache/1.3.37·(Unix) Cache-Control:·public Expires:·Wed,·20·Sep·2006·09:56:24·GMT X-Powered-By:·PHP/4.4.4 Last-Modified:·Wed,·06·Sep·2006·09:56:24·GMT Content-Length:·14015 Connection:·close Content-Type:·image/jpeg */
  • How do I get rid of the pragma no cache one? It's not showing up in image.php.
  • edited September 2006
    It could be coming from the server or the proxy. That HTTP/1.x troubles me too.
    A few internet searches point me to suspect the server.

    You could try header('Pragma: public'); and header('HTTP/1.1 200 OK'); to see if that will overwrite the values we don't want.
  • BentotBentot New
    edited September 2006
    How can we control the size of the attachments? Incase some members put super large images? When an img is uploaded, it will be resized to a Maximum width of 600px Thanks
  • sorry my bad.. forget my stupid question .. I just saw the max size 600 on default.php
  • Hi pbear Where can i find for info about the following: "through use of [Image_##]" Thanks
  • Hi, still haven´t got my strange header-problem fixed, just checked all /uploads on the server and they´re just okay, but when downloaded through forum: ?PostBackAction=Download&AttachmentID=XX, each file then begins with hex code:

    "00000000: EF BB BF "
    and is corrupted and not readable. With the previous version, within the same server, no such hex-insertion is made on attachment downloads. Any comments or suggestion on this matter? Thanks in advance :)
  • @forrestRain

    What did I write? lol! :)

    Ok, check my post here where I explain how to use it.

    The "##" is a wildcard for whatever number is assigned to the image. If you attach an image, post the comment, then edit it you will see the attachment number, e.g. [5]. Then, being in the edit mode, you could alter [Image_##] to say [Image_5] and after you saved the changes the image would appear now inline wherever you typed [Image_5].

    Note that on my installation I altered the Inline Image source files to make it use [Image_##] syntax with a lowercase "i" to minimize the need for the shift key.
  • pbear, that's the correct way.

    Don't you find it too troublesome.
    Why don't show us the number when we attach the attachment?
    Why like you said, we have to save->edit (to see the #->save to make it inline?
  • I think the ideal method would be to do something similar to how google's gmail handles file attachments.
    They use Ajax to check if the file input field has change, if it has, it 'submits' the file for upload whilst the user continues to write the email etc.
    Once uploaded the field changes to display the uploaded filename and delete button as usual, followed by another browse for more files.

    Doing this would enable users to add the files (display a limit otherwise it may take too long) and link the image_number as the number will be displayed whilst writing the article after the upload. Thus not requiring any page reloads or clicking edit and going back to the comments and all that mess.

    I would give advice but im not that farmiliar with vanilla's structure and extensions yet.
    I would very much like this feature so if I can help in any way please dont hesitate to ask.

    <3 Ajax
  • edited September 2006
    the js:

    function ImgIDLink(i, link)
    {
    i.value = link
    }

    the uploaded image link to click to add to the textarea input field:

    onClick="ImgIDLink(document.frmPostComment.Body, '[image_01]')"

    Not sure if name= and id= would work the same in this context, havent tested it as the forms done have a name. only id=frmPostComment. If not im sure it wouldnt be hard to update the template to add the name.
  • I wouldn't even mind non-sequential numbers assigned to images if I could have them immediately, e.g. [Image_239].
  • I noticed something strange with my attachments...wondered if anyone know what went wrong?

    I recently installed vanilla and the attachments2.0 extension witht he inline images extension. i uploaded one image and everything worked fine. Subsequent images have not loaded properly. I don't receive an error...when I upload the image I see the link to the image. I can view my first, successful image. I can't view the others. I get an error that the file is corrupt. Anyone know why the first would work but the others would fail?

    I did change the upload directory after the first. I've since changed it back...still not working. Everything has the appropriate permissions.

    Any ideas?
  • Just to confirm I too can upload attachments okay with this extension using Firefox 1.5, but not with Safari 2.03 on OSX10.4.6, which is a great shame. If someone would be kind enough to LMK where to paste the javascript to make Safari play nice (the javascript posted was on the previous page of this thread) I'd be very very happy indeed. thanks!
  • does these extensions require BBCODE-extension? why?
  • edited September 2006
    I'm getting this error when using 2.0: Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid/gid is 121132/121132 is not allowed to access .../forum/uploads/2006 owned by uid/gid 398/398 in .../forum/library/Framework/Framework.Class.Uploader.php on line 90 Version 1.4 didn't have this problem. Am I missing something obvious?
  • How would I go about handling ANY/ALL file type(s)?
This discussion has been closed.