Ticket #4937 (closed enhancement: fixed)

Opened 4 years ago

Last modified 3 years ago

Allow linking to all Trac attachments for swf=<source>

Reported by: ogiesen Assigned to: rudyryk
Priority: normal Component: FlashEmbedMacro
Severity: normal Keywords: flash attachment
Cc: ogiesen Trac Release: 0.11

Description

It would be great if I could easily embed SWF videos that are attached to a ticket or wiki page rather than using the full http-link to the raw attachment.

E.g.:

  • [[Embed(attachment=tutorial.swf)]]
  • [[Embed(attachment=ticket:123:video.swf)]]
  • [[Embed(attachment=wiki:SomePage:movie.swf)]]

Alternatively allow attachment:-links for the swf-source, e.g.:

  • [[Embed(swf=attachment:tutorial.swf)]]
  • [[Embed(swf=attachment:ticket:123:video.swf)]]
  • [[Embed(swf=attachment:wiki:SomePage:movie.swf)]]

Attachments

Change History

04/27/09 18:54:06 changed by rudyryk

  • status changed from new to closed.
  • resolution set to fixed.

Thank you for the feedback! The feature is implemented in r5614. Watch examples at FlashEmbedMacro.

(follow-up: ↓ 3 ) 04/28/09 15:50:19 changed by ogiesen

Thanks for looking into this! :)

However, ...
Sorry, doesn't work for me. The URL that gets generated is not valid on my system (trac 0.11.3).

Let's say my environment root is at /trac/myEnv and I'm trying to embed an attachment movie.swf that belongs to a wiki page named SomePage. The macro currently generates the following URL:

  /raw-trac/myEnv/attachment/wiki/SomePage/movie.swf

where AFAICT it should be:

  /trac/myEnv/raw-attachment/wiki/SomePage/movie.swf

I noticed that for instance the built-in [[Image()]] macro appears to use a utility function named get_resource_url() to expand the attachment link (e.g. here). Would that help, maybe?

(in reply to: ↑ 2 ) 05/02/09 12:50:15 changed by rudyryk

  • status changed from closed to reopened.
  • keywords set to flash attachment.
  • resolution deleted.

I see. Of course, this need to be fixed. Copy-paste complex code from Image-macro source seems a bit ugly, so some research and refactoring may need.

Thank you for detailed report! :)

03/26/10 23:45:56 changed by rjollos

  • summary changed from allow linking to trac attachments for swf= source to Allow linking to all Trac attachments for swf=<source>.

I'm seeing this same issue.

Also, the third example for using the attachment prefix syntax seems incorrect. It is shown as:

[[Embed(swf=wiki:FlashEmbedMacro:flowers.swf,w=500,h=400)]]

However, I don't even think that is a valid TracLinks syntax. The example should probably be:

[[Embed(swf=attachment:wiki:FlashEmbedMacro:flowers.swf,w=500,h=400)]]

which is the form of attachment linking that currently does not work for me.

03/31/10 01:02:26 changed by rudyryk

  • status changed from reopened to closed.
  • resolution set to fixed.

attachments for current page should work since r7800

    [[Embed(swf=attachment:flowers.swf,w=500,h=400)]]

Add/Change #4937 (Allow linking to all Trac attachments for swf=<source>)




Change Properties
Action