Promblems using URI2HTTP

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

So, I’ve read about this wonderful variable named ‘URI2HTTP’ that will allow
me to link to far-away websites and do magic things; but I can’t make it
work.
Besides http, https, and ftp which were aleady in config.pm, I can’t get any
of the others to work (or see them fail, for that matter). I’m trying to add
a ‘wiki’ link currently, but plan to move on to add ‘cktid’ (circuit id) and
others. Here is my current URI2HTTP:

%URI2HTTP=
(
‘http’ => sub {return @;},
‘https’ => sub {return @
;},
‘ftp’ => sub {return @;},
‘wiki’ => sub { return @
; },

‘wiki’ => sub { @_ =~ |wiki://(\S+)|i; return

http://url.to.wiki.com/wiki/index.cgi?$1”; },
‘fsck.com-rt’ => sub {warn “stub!”;},
‘mozilla.org-bugzilla’ => sub {warn “stub!”},
‘fsck.com-kb’ => sub {warn “stub!”}
);

As you can see, I’ve commented out the ‘real’ wiki link until I figure it out,
and was using a ‘fake’ wiki link similar to ftp and http - but even this one
fails (to create a link, that is - no error in my logs). Even linking to a
false protocol doesn’t create a warning as it should (in
RT::Link.pm->AsHREF()) and putting ‘fsck.com-rt://stuff’ in my ticket won’t
make a ‘stub!’ warning either.
Thanks for any help or examples on the ‘correct’ way to get this work. I’m
using rt 2.0.13, in case it matters - and I am restart-ing (not reload or
graceful) httpd to get config changes to take - if this is wrong, let me
know.

  • -Doug

Douglas E. Warner dwarner@ctinetworks.com Network Engineer
CTI/PAdotNET http://ctinetworks.com +1 717 975 9000
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9xCkUJV36su0A0xIRAsrpAKCGvsktI6/62NCVJZ07IWoh9+ernQCffDom
dpqqNc0Bjd/2MV8Grh3w2h4=
=4Bpn
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

So, I did some mucking around and noticed that URI2HTTP is only used in the
’Relationships’ box (Refers To was where I got it to work). Also while I was
mucking around, I found that the reason http, https, and ftp worked in my
tickets (ticket history, to be precise) was because those were hard coded to
produce links.

My new question is this: would it be possible to port the URI2HTTP stuff into
the ticket body (history)? If not, would the correct way for me to change
this be to copy the ‘WebRT/html/Ticket/Elements/ShowTransaction’ to
’local/WebRT/html/Ticket/Elements/ShowTransaction’ and add the appropriate
regexps there?

  • -Doug

Douglas E. Warner dwarner@ctinetworks.com Network Engineer
CTI/PAdotNET http://ctinetworks.com +1 717 975 9000
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9xrhFJV36su0A0xIRAhXjAKDVo/pZ6/vwa7icJXQOZe0d71srdQCcCupK
Iaf/Srx8RV1AUqkMFXJJa2Y=
=3CcC
-----END PGP SIGNATURE-----