"Attachments" for Vanilla 2.0 - What's it going to cost?
  • moensmoens
    Posts: 27
    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
  • passatgtpassatgt
    Posts: 19
    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
  • moensmoens
    Posts: 27
    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.



  • moensmoens
    Posts: 27
    image
    ^^Here is the Code Bounty
  • passatgtpassatgt
    Posts: 19
    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 });
  • moensmoens
    Posts: 27
    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?
  • sullsull
    Posts: 5
    i'd write a plugin if i know their is not one already being worked on. no time to waste.
    confirm?
  • nevirnevir
    Posts: 8
    See the link in Doudou's post - seems like the main team is working on it
  • passatgtpassatgt
    Posts: 19
    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
  • moensmoens
    Posts: 27
    Ah yes. so we wait... thanks, however, passatgt for that great bit of javascript. Very nice.
  • moensmoens
    Posts: 27
    [talking to myself]
  • moensmoens
    Posts: 27
    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.
  • passatgtpassatgt
    Posts: 19
    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
    Posts: 19
    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
    Posts: 43
    @passatgt I put the "Embed Something" and it appears on Comments not in posts
  • passatgtpassatgt
    Posts: 19
    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?
  • moensmoens
    Posts: 27
    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
    Posts: 1,547
    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
    Posts: 27
    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
  • 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.
  • moensmoens
    Posts: 27
    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.

Howdy, Stranger!

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

Login with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

In this Discussion

Who's Online 2

JhauraWpaintballer82