[Plugin] Improved attachments upload

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Messages: 1 841
[Plugin] Re: Improved attachments upload
« Réponse #30, le 10 Mars 2013 à 08:13 »
And fixed (lightly tested, didn't do a cross browser test), also merged the changes Nao did in Plugin repository
Citation de live627 le 10 Mars 2013 à 00:18
Citation de Arantor le 9 Mars 2013 à 23:53
Sure I remember that. I'm still convinced it's ultimately not a blocker for it being a core feature, but simply that the selector is not as selective as it should be about grabbing events.
If only drag events let us see if any files are being dragged, then such would be easier.
You can, actually (see my commit above), it's slightly more awkward since you can't directly access files object while the element is being dragged.
The way it's meant to be

Nao

  • Dadman with a boy
  • Messages: 16 082
[Plugin] Re: Improved attachments upload
« Réponse #31, le 11 Mars 2013 à 16:49 »
Citation de Dragooon le 9 Mars 2013 à 09:46
Citation de Plugin revs
Dragooon, I'm still waiting for your approval to change the author ID to Wedgeward
Nobody told me about this?
I mentioned it in another topic...
Well, the plugin isn't "public" yet, so I didn't bother to ask you too much.
Citation de Dragooon le 9 Mars 2013 à 09:46
I didn't even know there was an alternative copy of this plugin in Wedge's plugin repository :P.
I renamed it several times.
Citation de Dragooon le 9 Mars 2013 à 09:46
I don't mind the author ID change, but there has to be a better way to maintain the repository. Can't it be some sort of svn:external with the master in my GitHub account?
I wouldn't know how to use externals or whatever... :^^;:
Posté : 11 Mars 2013 à 16:49
Citation de live627 le 9 Mars 2013 à 23:47
Remember the bug where a selected word in the posting box being dragged would trigger this plugin's event?  That's why it was removed from this site...
I didn't remove nothing from no site, sir! Or did I..?
I don't even know what bug you're talking about.
Citation
BTW, whatever became of the ambitious dream to replace attachments with media items?
Ahh.......................................

Arantor

  • As powerful as possible, as complex as necessary.
  • Messages: 14 278
[Plugin] Re: Improved attachments upload
« Réponse #32, le 11 Mars 2013 à 16:51 »
And even if it does become a core feature, it won't work nicely through externals because core feature implies not being bridged through the plugin manager... so it would need to be a separate tree anyway.
Citation
I don't even know what bug you're talking about.
There was certainly a bug with it affecting events and at least once it was disabled for that reason.

It is currently disabled but there's other reasons why that might be (as other plugins are also disabled without any reason I'm aware of for that)
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Messages: 16 082
[Plugin] Re: Improved attachments upload
« Réponse #33, le 11 Mars 2013 à 16:53 »
Hmm, didn't get a "new post" warning when sending the last one, even though I'd posted another... Maybe because it was one of mine..?
Citation de Arantor le 9 Mars 2013 à 23:53
Sure I remember that. I'm still convinced it's ultimately not a blocker for it being a core feature, but simply that the selector is not as selective as it should be about grabbing events.
(Eh..?!)
Citation
Mostly I think Nao and I have been quietly hoping the other will have a sudden idea on how to solve the architectural issues that come out of it but I think that in the end I'll just have to go in and do it. There is one aspect to it that is rather awkward to solve but not unsolvable, it's just figuring out how to do it without breaking the crap out of everything.
The reason that topics don't use AeMe for attachments is, errr... It's not an *architectural* issue (what's to be afraid of? Creating a generic "Attachments" album where all attachments will go..? Adding a feature to keep track of all topics that make mention of an item? I also wanted to code that one anyway...), it's more that I'm a perfectly reasonable man, and the days I spent on AeMe were crazy, and I did a lot on it, and I know that even after I did all that, there were still tons of bugs, and I was weary of moving the bugs to the attachment system.
But really, the real reason, in reality, is really that, really, I'm super-fucking lazy and I try to focus on features that require less than a week to implement... And this one... It even requires writing a converter!! Eh!! And I'm not going to ask TE to do it... :^^;:

Arantor

  • As powerful as possible, as complex as necessary.
  • Messages: 14 278
[Plugin] Re: Improved attachments upload
« Réponse #34, le 11 Mars 2013 à 16:59 »
Citation
Hmm, didn't get a "new post" warning when sending the last one, even though I'd posted another... Maybe because it was one of mine..?
Hmm, it should still have warned. Something is very much amiss.
Citation
(Eh..?!)
There's a bug report somewhere around here of someone using the select+drag of text to move it around, except the event was captured by the drag 'n' drop.
Citation
It's not an *architectural* issue (what's to be afraid of? Creating a generic "Attachments" album where all attachments will go..?
The problem that I mention isn't that at all, I wouldn't mind but I have mentioned it multiple times now.

If you have an attachments system like that, you need to be able to reference the topic it came from, not so much for 'which topics use this' but 'can the person see this attachment'. Would really suck if attachments could be leeched without having proper board access.

Right now, access to a given file is based on its album. But that doesn't work for attachments whose access rights are implicitly different. Thus you need to be able to indicate where a given media item is supposed to get its authentication from, be that an album or thread access. Or, indeed, anything else you care to think of, e.g. helpdesk attachments.

I did suggest one method of doing this but you weren't very keen on it.

Nao

  • Dadman with a boy
  • Messages: 16 082
[Plugin] Re: Improved attachments upload
« Réponse #35, le 11 Mars 2013 à 17:20 »
And I didn't get a warning for that post either...

Although I just got one for your latest, but it's because you posted it before I hit the Reply button, so I had the warning at post time, not post2 time, basically.
This needs fixing, because it will make people miss on posts, as they're expecting to be told when someone posted in the meantime...
Citation de Arantor le 11 Mars 2013 à 16:51
There was certainly a bug with it affecting events and at least once it was disabled for that reason.
Probably some discussion I missed. Did that happen after I restored your admin access, maybe..? Otherwise it must be a very old discussion, and I remember having the plugin enabled here...
Citation
It is currently disabled but there's other reasons why that might be (as other plugins are also disabled without any reason I'm aware of for that)
It got disabled when I changed its name, but I'm pretty sure I re-enabled it...
Posté : 11 Mars 2013 à 17:14
Citation de Arantor le 11 Mars 2013 à 16:59
Hmm, it should still have warned. Something is very much amiss.
That 'last' param in the URL... Is it only checked against correctly...?
Citation
The problem that I mention isn't that at all, I wouldn't mind but I have mentioned it multiple times now.
Oh, don't talk down to your elders! I'm young enough to remember things! Well, at least part of the things! What was I talking about, already..?
Citation
If you have an attachments system like that, you need to be able to reference the topic it came from, not so much for 'which topics use this' but 'can the person see this attachment'.
I'm of the opinion that this should be done at post time... i.e. if you post an attachment from within a certain topic, get the topic, then the board, get its group list, attach these groups to the item's permissions.
Hmm, does that imply creating a new album on the fly, matching these..? I don't know. I don't remember if AeMe has a setting to fine-tune permissions per-item. I'M NOT OLD!!! I'm just rusty.
Citation
Would really suck if attachments could be leeched without having proper board access.
Well, in some situations I suppose you wouldn't mind...
Citation
Right now, access to a given file is based on its album. But that doesn't work for attachments whose access rights are implicitly different. Thus you need to be able to indicate where a given media item is supposed to get its authentication from, be that an album or thread access.
Or we could just store the id_board in the item table, yeah, and do a {query_see_board} on that.
Citation
I did suggest one method of doing this but you weren't very keen on it.
I don't rem....I'm not old!!

Arantor

  • As powerful as possible, as complex as necessary.
  • Messages: 14 278
[Plugin] Re: Improved attachments upload
« Réponse #36, le 11 Mars 2013 à 17:26 »
Citation
Did that happen after I restored your admin access, maybe..? Otherwise it must be a very old discussion, and I remember having the plugin enabled here...
Dunno, not sure.
Citation
It got disabled when I changed its name, but I'm pretty sure I re-enabled it...
Others are disabled, e.g. Users Online Today.
Citation
That 'last' param in the URL... Is it only checked against correctly...?
It should be a num_replies parameter?
Citation
Oh, don't talk down to your elders! I'm young enough to remember things! Well, at least part of the things! What was I talking about, already..?
I guess it's just one of my bugbears that I've gone on about it at times and don't see a solution other than what I'd proposed but you weren't keen on it.
Citation
Well, in some situations I suppose you wouldn't mind...
In some you wouldn't, true, but in those cases the board would be set up to show attachments to guests, i.e. you'd intended to make it the case.
Citation
I'm of the opinion that this should be done at post time... i.e. if you post an attachment from within a certain topic, get the topic, then the board, get its group list, attach these groups to the item's permissions.
Eeek, no. What if you later want to change permissions? You'd have to update all the related items.
Citation
Or we could just store the id_board in the item table, yeah, and do a {query_see_board} on that.
Which is 50% of what I originally suggested.

We would need two columns: type and contextual id. For album items, this would be 'album' and the album id. For regular attachments this would be 'board' and the board id. Or topic id, actually, since there's per-topic privacy.

Then in the file server, you'd fetch the item, figure out what it wants to do to authenticate, check it, and if all good, serve it. The trick is making it extensible.

I don't remember why you weren't keen on it though.

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Messages: 1 841
[Plugin] Re: Improved attachments upload
« Réponse #37, le 12 Mars 2013 à 08:53 »
Bug, I can't get the drop area to appear after dropping my first item. Will have a look at it in a while.

Nao

  • Dadman with a boy
  • Messages: 16 082
[Plugin] Re: Improved attachments upload
« Réponse #38, le 12 Mars 2013 à 09:48 »
I installed your copy yesterday, but didn't look into it I have to admit.

Dragooon

  • I can code! Really!
  • polygon.com has to be one of the best sites I've seen recently.
  • Messages: 1 841