Hello !

On Mon, Jan 25, 2010 at 6:42 AM, Radek Bartoň <[email protected]> wrote:
> Dne pondělí 25 Leden 2010 06:02:52 Mike Fotiou napsal(a):
>>   I didn't take that route because the discussion docs appeared to only
>> relate to linking to a particular topic/reply.  I'm somewhat new to to the
>> Trac world, but I think what you're saying is that I should use a syntax in
>> the image macro similar to this?  -->  Image(topic:1/RTB.png)
>>
>
> Hello.
>
> I never thought about such use, but theoretiaclly it may work. Please, try and
> if it won't, create a ticket on trac-hacks.org with new feature request.
>

The last time I reviewed the code Image macro only supported a fixed
(limited?) set of sources (VCS, attachments, ... ). In fact I did that
before writing TracGViz plugin because there were similar requirements
(i.e. a macro needing a URL to render something ...). BTW I didn't
consider the approach used by that implementation because it didn't
scale if new TracLinks providers will be installed in the environment
. It would be nice if Image macro could expand any TracLinks
expression supported by the current environment and use that URL in
IMG tag .

If somebody has time (and decides) to do that, an example can be found
in TracGViz code [1]_ . It relies on `FirstTracLinkFormatter` class,
which is based on a idea that has proven to be very useful to
implement other features like `wiki.listLinks` method [2]_ in TracRpc
plugin (under development yet ;o)

Of course you can always make it better
;o)

.. [1] iGoogleGadgetMacro.resolve_link_url
        
(http://simelo.hg.sourceforge.net/hgweb/simelo/trac-gviz/file/275ce6364959/trac-dev/gviz/tracgviz/ig/wiki.py#l140)

.. [2] New patch for `wiki.listLinks` (#1055) Supports TrackLinks +
CamelCase + ...
        (http://bitbucket.org/osimons/trac-rpc-mq/changeset/852ab5767c42/)

-- 
Regards,

Olemis.

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:
Fixing `xsv` test cases after switching to UNICODE ... PASS  -
http://simelo.hg.sourceforge.net/hgweb/simelo/trac-gviz/rev/8a911ef70782

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to