Re: [th-users] Is there a hack to append attached images to a ticket description?

2020-11-10 Thread Ryan Ollos


On Tuesday, November 10, 2020 at 4:01:01 PM UTC-8 [email protected] wrote:

> Interesting! Thanks ;) I see that it adds the Image macro on the client 
> side... if I read correctly.
>
> Is there a hook that I could use that would be like a "pre-render" for the 
> ticket description? So I could add the image macro from the server side 
> rather than client side? Not sure what the right interface might be to look 
> at...
>

If you don't need access to the Request object, then 
IAttachmentChangeListener:
https://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.attachment.IAttachmentChangeListener

Otherwise IRequestFilter or IAttachmentManipulator:
https://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints/trac.attachment.IAttachmentManipulator

I would guess you can probably do it in IAttachmentChangeListener without 
needing to access the requests object. The attachment.parent object will 
give you the ticket id and you can modify the Ticket description.

Ryan 
___
th-users mailing list
[email protected]
https://lists.trac-hacks.org/mailman/listinfo/th-users


Re: [th-users] Is there a hack to append attached images to a ticket description?

2020-11-10 Thread Aikido Guy
Interesting! Thanks ;) I see that it adds the Image macro on the client 
side... if I read correctly.

Is there a hook that I could use that would be like a "pre-render" for the 
ticket description? So I could add the image macro from the server side 
rather than client side? Not sure what the right interface might be to look 
at...

On Friday, November 6, 2020 at 4:55:27 PM UTC-5 [email protected] wrote:

> On Friday, November 6, 2020 at 11:26:03 AM UTC-8 [email protected] wrote:
>
>> Hi,
>>
>> I did some searching but did not find what I'm looking for... maybe it 
>> does not (yet) exist; or maybe I'm not looking for the right thing.
>>
>> Currently, someone creates a ticket and attaches one or more images (png, 
>> jpg, etc) to the ticket and then adds wiki markup 
>> [[Image(attachedFile.jpg)]] into the ticket's description. One ticket and 
>> one attached file at a time.
>>
>> Ideally, in order to speed data entry up a bit, it would be nice that 
>> when somone creates a ticket and attaches one or more images to the ticket 
>> then the system automatically adds the necessary markup (to display the 
>> image) to the ticket's description. Avoiding the step of adding the 
>> necessary markup.
>>
>> Is there such a plugin? If not, how could I start creating one?
>>
>> Kindly,
>> Aikido Guy
>>
>
> This might help:
> https://trac-hacks.org/wiki/TracDragDropPlugin
> Each attachment has copyable Wiki markup for inserting the image. See last 
> image on page.
>
> Or this:
> https://trac-hacks.org/wiki/AwesomeAttachmentsPlugin
> The Image macro is inserted into the ticket description when a file with 
> extension jp[e]g, gif or png is added for upload.
>
> Ryan 
>
___
th-users mailing list
[email protected]
https://lists.trac-hacks.org/mailman/listinfo/th-users


Re: [th-users] Is there a hack to append attached images to a ticket description?

2020-11-09 Thread Ryan Ollos


On Friday, November 6, 2020 at 11:26:03 AM UTC-8 [email protected] wrote:

> Hi,
>
> I did some searching but did not find what I'm looking for... maybe it 
> does not (yet) exist; or maybe I'm not looking for the right thing.
>
> Currently, someone creates a ticket and attaches one or more images (png, 
> jpg, etc) to the ticket and then adds wiki markup 
> [[Image(attachedFile.jpg)]] into the ticket's description. One ticket and 
> one attached file at a time.
>
> Ideally, in order to speed data entry up a bit, it would be nice that when 
> somone creates a ticket and attaches one or more images to the ticket then 
> the system automatically adds the necessary markup (to display the image) 
> to the ticket's description. Avoiding the step of adding the necessary 
> markup.
>
> Is there such a plugin? If not, how could I start creating one?
>
> Kindly,
> Aikido Guy
>

This might help:
https://trac-hacks.org/wiki/TracDragDropPlugin
Each attachment has copyable Wiki markup for inserting the image. See last 
image on page.

Or this:
https://trac-hacks.org/wiki/AwesomeAttachmentsPlugin
The Image macro is inserted into the ticket description when a file with 
extension jp[e]g, gif or png is added for upload.

Ryan 
___
th-users mailing list
[email protected]
https://lists.trac-hacks.org/mailman/listinfo/th-users