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

edited January 2008 in Vanilla 1.0 Help
I've released the new and improved Attachments 2.0 which now uses a SQL table to store attachment information. You can import your old attachments with just a click on a button.

Inline Images is the first of many which is an extension for Attachments 2.0. It will display all uploaded image attachments and resize them on the fly if they exceed a maximum width. Users can also display those images inside their comments by using an image tag (e.g. [Image_123]).

Download: Attachments 2.0
Download: Inline Images 1.1

If you find any bugs, let me know :)
Enjoy
«134567

Comments

  • Jazzman, you are the man. Can't wait to try these out.
  • Error in Attachments 2.0 install -
    Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /extensions/Attachments/default.php on line 649

    Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /extensions/Attachments/default.php on line 655
    ???
  • edited August 2006
    Tnx erissiva... bug :P
    I've changed:
    ...->NewContextObject(&$DiscussionForm->Context, 'AttachmentManager');
    into:
    ...->NewContextObject($DiscussionForm->Context, 'AttachmentManager');
    Stupid little '&' sign :P

    Also updated the zip file
  • hea? why is the no image processing anymore?
  • edited August 2006
    Jazzman want to make it simple. The attachment extension 2.0 only do its job, attaching file to a comment.

    Fancy options like image processing - that could be buggy - will be added with other extensions.
  • edited August 2006
    yeah ... i found it! sorry :) is it right, that i can only uplod one attachment at the post. of course i can edit the post... //edit: safari don´t work :(
  • YEP, you can only add 1 attachment. I removed multi-uploading to have maximum browser compatibility. I will release the multi-uploading as a seperate extension.
  • Exciting :D

    I'll give it a shot on my test forum and see if its stable enough for the live forum.
  • Jazzman, Thanks for creating an excellent extention. Everything seems to work just fine, except when I upload a pdf, I get the error: Some problems were encountered The file you attempted to upload (NewarkBio.pdf) was of type "application/download", but the file extension "pdf" did not match the accepted extensions for this type of file: rar, RAR The name of the file is Newarkbio.pdf. That error is actually different from an error I was getting earlier this morning that read: Some problems were encountered Cannot find the discussion (something along those lines) Any ideas?
  • try this: go into extensions/Attachments/default.php and change line 23 from this
    'application/download' => array('rar', 'RAR')
    to this:
    'application/download' => array('rar', 'RAR', 'pdf', 'PDF')
  • that did it. thanks very much.
  • YEP, you can only add 1 attachment. I removed multi-uploading to have maximum browser compatibility. I will release the multi-uploading as a seperate extension.
    nice! This is the best vanilla extension ...
  • I must be dense... I uploaded an image then i put in [image_1] in another post and no display... please help the challenged... :P TIA
  • i love this addon, but i like the attachments form to appear above the comments box, because if it's underneath it interrupts my "tab-enter" flow when posting comments.

    if you want to move it up, open up Attachments/Default.php and change these two lines:

    line 728: change "PreButtonsRender" to "PreCommentRender"
    line 733: change "PreButtonsRender" to "PreCommentsInputRender"
  • @corn13read: you can only use the image inside your the comment you've uploaded it to :)
  • I'm getting this error: Some problems were encountered The file you attempted to upload (base.gif) was empty. You are not allowed to upload (base.gif) the requested file type: You must enter a value for the comments input. any idea?
  • Is it a real gif-image? And you forgot to enter text in comments area :)
  • @Jazzman - nice!!! I love it. honest. One question, if when using the inline images attachment extension, putting [Image_XX] (XX is actually my attachment ID) at the very top of a comment, it shows up at the bottom. if [Image_XX] is somewhere in the middle of the comment, it works fine. thoughts?
  • Jazzman, thanks for these valuable upgrades! :)


    I hate to be dense, but I'm not getting the [Image_1] syntax. Where do I find the image number?

    I can see the image I uploaded at the end of the comment...What is the purpose to access it via [Image_###] in the message, if that's the only one I can use? If I use [Image_###] then will this one at the end not appear? Being at the end seems perfectly ok for ZIPs, PDFs, and the like.

    Hmmm... Maybe I'm thinking of the extension's function in the wrong way.
  • could we just remember our id and use the same image in multiple posts without having to upload it all the time? just a thought/suggestion. also when uploaded it would be cool if it told us our image ID right after we uploaded it. just thinking outloud. TIA
This discussion has been closed.