#4801 (Insert image into arbitrary places of a comment or blog page using memo command)
by Luc Saffre · in Developers · assigned to Luc Saffre
Summary
Children
- #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") (by Luc Saffre in Developers assigned to Luc Saffre)
Comments
- 3 years, 9 months ago by Luc Saffre in reply to Luc Saffre about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : fixed
- 3 years, 9 months ago by Luc Saffre about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) (1 reply) : There is still a problem: in shop1 there should be three mentions, but there is none.
- 3 years, 9 months ago by Luc Saffre about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : After committing my changes I "finished" the changelog, and as usual: after some time I just need to leave it as it is because documentation is never finished...
- 3 years, 9 months ago by Luc Saffre about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : #4818 is actually just a child of this ticket, and we can say that I stole this ticket from @8lurry. I now adapted the welfare test suite after my changes (seems that there were also failures from older changes in the welfare suite).
- 3 years, 9 months ago by Sharif Mehedi about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : I am putting this ticket to ready. Changes are in xl and lino.
- 3 years, 9 months ago by Sharif Mehedi about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : I got the image command working with uploads, albums as well as explicit url, did not publish anything, because I need to test the code and give it a finishing touch. Will continue tomorrow.
- 3 years, 9 months ago by Luc Saffre about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : NB: for the author of a memo, two separate memo commands would be easier because less words.
- 3 years, 9 months ago by Luc Saffre about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : I added two image formats: couple and trio in rstgen. I would probably use two memo commands ("upload" and "image"). But a single [img] command might also be nice. The first mandatory argument of img would be an object identifier ("upload:1" or "image:1"): [img upload:1 thumb|Here is the caption] or...
- 3 years, 9 months ago by Sharif Mehedi about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : I was thinking maybe we can have something like [[uploads:id|albums:id|url]|[and_other_properties]]
- 3 years, 9 months ago by Luc Saffre about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : @8lurry if you haven't yet moved the definition of the image memo command from albums plugin to the memo plugin, then let's talk. Maybe we prefer two different memo commands.
- 3 years, 9 months ago by Sharif Mehedi about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : We can probably use the whole line2html from sigal_image
- 3 years, 9 months ago by Sharif Mehedi about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : I probably just answered my own question
- 3 years, 9 months ago by Sharif Mehedi about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : Also I am not yet sure what to do in case of an image from external source. should we download it, or should we just render it on the frontend. downloading in the server is dangerous, could contain malicious code.
- 3 years, 9 months ago by Sharif Mehedi about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : I don't like how the sigal_image parses the name. I'd like to do some extensive modification to it.
- 3 years, 9 months ago by Luc Saffre about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : With Sharif I encapsulated image formatting logics to rstgen.sphinx_image.parse_image_spec(). Next step is to move the definition of the image memo command from albums plugin to the memo plugin and make it more general. Instead of defining it using register_django_model(), simply define it using reg...
- 3 years, 9 months ago by Luc Saffre about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : We want a similar command to insert uploaded files into a comment. And a third one for volume files.
- 3 years, 9 months ago by Luc Saffre about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : We also need utility actions, e.g. an action on each image that displays a memo command so the user can copy it to the clipboard...
- 3 years, 9 months ago by Luc Saffre about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : The [image] memo command already exists (it's done using mp.register_django_model()), but we maybe want to add some arguments. We should probably use the same syntax as the sigal_image directive. And not duplicate the code but encapsulate and share the existing code in sigal_image.
- 3 years, 9 months ago by Luc Saffre about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : Yes, of course in every rich text field. This was a nightly thought and I checked the code only now. And I see that we have it already :-)
- 3 years, 9 months ago by Sharif Mehedi about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : Do we also want to have it on pages.Node or maybe on any rich text field, (but the application should have uploads and albums plugin installed maybe).
- 3 years, 9 months ago by Sharif Mehedi about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : I have also been thinking about this.
- 3 years, 9 months ago by Luc Saffre about #4801 (Insert image into arbitrary places of a comment or blog page using memo command) : Created new Ticket #4801 (⚹ Insert image into arbitrary places of a comment or blog page using memo command).