Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

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

moensmoens New
edited September 2010 in Vanilla 2.0 - 2.8
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
«1

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
  • 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:
    var commentTabshtml = '<div class="MessageForm" style="border:0px;margin:0px;"><div class="Tabs CommentTabs"><ul></ul></div></div>'; $("form#Form_Discussion .Category").after(commentTabshtml);
  • 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 COO [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!
Sign In or Register to comment.