Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Vanilla 2.3 fully supports PHP 7. Get it now!
Please upgrade to 2.3 here. The 2.2 and earlier branches are no longer being updated.

"Attachments" for Vanilla 2.0 - What's it going to cost?

moensmoens New
edited September 2010 in Vanilla 2.0 - 2.2
I need attachments for 2.0... heh... most of us do. Who can do it... and what's your bid? Online or offline offers will be considered.

It would be even cooler if it could handle "link attachments" (read: embeds) as well (raw flickr URLs, youtube and vimeo URLs => embeds, etc)

Somewhere, one of the devs mentioned that most of the necessary code for image attachments is *already written* in the v2.0 avatar handler.

Edited to add: Check out the UploadFile addon by @Tim here: http://vanillaforums.org/addon/607/file-upload

Comments

  • passatgtpassatgt New
    edited July 2010
    Well, in my case, i just need an image upload thing, but i dont know how to do it, so i came up with this idea:
    http://pastebin.com/qxFtj2Xt
    Just add this to the js/global.js
    This thing is gonna add a button next to the Save Draft.

    And if the image is too big, i just use this:
    http://pastebin.com/ryesw1fU
    This gonna resize the image, and put a Full screen link after the image
  • Well, the attachments plugin (actual upload / resize / display) thing is what I need most.

    But, your js is cool for image embeds... and one could easily add some regexp to strip the actual media from flickr / youtube / vimeo using js like yours as a basis (the "magic" plugin sort of does this for youtube videos). I'll mess with it and see what I can do.

    ...maybe (does vanilla core include jQuery?) something like the WP YoxView plugin, or the (http://jqueryui.com/demos/dialog/) jquery ui to give us a nice little "add stuff to this post" widget that can eventually include the attachments plugin.



  • image
    ^^Here is the Code Bounty
  • @Todd said : http://vanillaforums.org/discussion/comment/125463/#Comment_125463 we have to wait ;)
  • passatgtpassatgt New
    edited July 2010
    well, here we go, i make a youtube, vimeo, jpg, png, gif for embed things
    it has a nice popup window looking, and it has validation:)

    http://pastebin.com/05d9FJx3

    just add this code at the end of the js/global.js file, before the });
  • holy mackeral, that is awesome... pm me your email address, and I'll send you some "Code Bounty."

    I'll owe the devs something as well when the "attachments" code gets done.

    btw: is it just me, or do all comment permalinks link somewhere beyond the event horizon? I had to click the above link then google the title to find the thread so I could read the comment. o_0?
  • i'd write a plugin if i know their is not one already being worked on. no time to waste.
    confirm?
  • See the link in Doudou's post - seems like the main team is working on it
  • here is the font style thing, this gonna add a Strong, Italic and Underline button next to the Save Draft:

    Install:
    1. add this js script to the bottom of the js/global.js, before the });
    http://pastebin.com/qrSLXNHj
    2. add this js script to the very bottom of the js/global.js:
    http://laboratorium.0xab.cd/jquery/fieldselection/0.2.3-test/jquery-fieldselection.pack.js

    Its works great with selected text also
  • Ah yes. so we wait... thanks, however, passatgt for that great bit of javascript. Very nice.
  • moensmoens New
    edited July 2010
    [talking to myself]
  • moensmoens New
    edited July 2010
    OK, now it [mostly] works...

    To Do:
    1) The json call for the flickr image takes a second or two, and there should be a "waiting" image on the dialog box.

    2) The error .append also does not work(?!) (really should use the jquery dialog ui http://jqueryui.com/demos/dialog/ .. maybe I'll get around to doing that)

    But, all in all, pretty sweet...

    http://pastebin.com/QvXuMHi9

    @passatgt: thanks for the inspiration. See it in action / test it out.
  • the error append is working for me, and i try it on your site, and working also, but the flickr thing is not, i think

    image
  • passatgtpassatgt New
    edited July 2010
    and for the flickr loading indicator you should try this one out:
    paste this after the api_key variable:
    $(".copy").append('<span class="TinyProgress');
    and paste this after the error append:
    $('.TinyProgress').remove();

    i dont try it out, but is should work
  • PablinPablin New
    edited August 2010
    @passatgt I put the "Embed Something" and it appears on Comments not in posts
  • Add this to the js/global.js:
    <br />var commentTabshtml = '<div class="MessageForm" style="border:0px;margin:0px;"><div class="Tabs CommentTabs"><ul></ul></div></div>';<br />$("form#Form_Discussion .Category").after(commentTabshtml);<br />
  • Sorry to dig up an old thread, but I'm having a bit of a problem with your script, passatgt: If I place it at the end of global.js, it doesn't function correctly (the 'Insert Something' button fails to appear), while if I place it in the middle of global.js, the pop-up isn't formatted correctly. Is this just a problem with compatibility and Vanilla 2.0.3, and, if so, can it be corrected?
  • I have a few other changes I need to make to the script, but I am waiting form more than "2.0.3" to upgrade... anyway, I will republish the script when I upgrade my install, in the mean time, you might want to pm passatgt to see if you can get an answer.
  • TimTim Operations Vanilla Staff
    Another option now available is the FileUpload addon. http://www.vanillaforums.org/addons/addon/607/file-upload

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • Any word on this?

    The last piece of my V1->V2 puzzle is getting my V1 attachments images loaded into V2. Help!
  • moensmoens New
    edited September 2010
    Yes, see the above post by @Tim. That FileUpload addon is pretty close to the original "attachments." Not sure if they are going to make a core facility for this or not, but try Tim's FileUpload for now: http://vanillaforums.org/addon/607/file-upload
  • edited September 2010
    File-Upload doesn't help to get my V1 imported forum attachments loaded into V2, though it's a definite step in the right direction. Even if I can't get it to work.
  • Right... heh... you have to fix it with the stuff in the end of this thread:

    http://vanillaforums.org/discussion/12782/fileupload-1.1-released

    ...and, right... making an import script would be another issue altogether.
Sign In or Register to comment.