On Dec 9, 2:39 pm, Henrik <hjoens...@gmail.com> wrote:
> Hi,
>
> I have tried to write a new wiki syntax provider to create links to
> our NCR system (IBM Telelogic Synergy). These NCR's looks like this,
> cbxpt_se#1234. I have managed to create my own class (see below).
> However, it works at the moment for this syntax, cbxpt_se:1234. So my
> question, is it possible to adapt my wikisyntaxprovider to match #
> instead of :? Or is this reserved for trac ticket links, #1234?
>
> class cbxptWikiSyntax(Component):
>
>     implements(IWikiSyntaxProvider)
>
>     def get_link_resolvers(self):
>         return [ ('cbxpt_se', self._format_link) ]
>
>     def get_wiki_syntax(self):
>         return []
>
>     def _format_link(self, formatter, ns, target, label):
>                 url = "http://stoweb01.scan.bombardier.com/~ebiconfig/
> infopoint/index.php?
> option=com_rcs_ncr_reports&action=detailedReport&type=cr&name=cbxpt_se
> %C2%A7"
>                 if target.isdigit():
>                     return tag.a(
>                         "cbxpt_se#%d" % int(target),
>                         href = url + target,
>                         title = "View cbx_pt #%d on infopoint" %
> (int(target))
>                     )
>                 else:
>                     return label

Not reserved as such, but a module of higher preference are currently
responding. If you don't use the ticket system, you can just disable
it and there won't be anything in Trac that knows about '#' link
prefix. In trac.ini:

[components]
trac.ticket.* = disabled

Haven't tried running with such as setting myself, but see no reason
why it shouldn't work.


:::simon

https://www.coderesort.com
http://trac-hacks.org/wiki/osimons

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to trac-...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en.

Reply via email to