This is a simple plugin which takes advantage of view post processing in order to turn #12345 ticket links and [12345] changeset links into an active link into your Trac repository.
By default the plugin will link to the Elgg central trac repo, however you can change this setting in the plugin's settings page.
The techniques used in this plugin are discussed in more detail on my blog.
View Marcus Povey's plugins
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
@Marcus
re: ".. some much more interesting uses.."
Suppose we do want to ".. process *everything*..."
e.g. filter out rude words... I suppose the code
if (($view) && (in_array($view, $CONFIG->tractags_views)))
{
// Search and replace ticket numbers
simply becomes--
if (($view) )
{
// Search and replace rude words
. . .
Actually what's on my mind is hooking into Google's translator APIs to perform on-the-fly translation of content...
That wouldn't be too hard to do.
A simple way would be to use the similar technique but listen to the page_shell or canvas views.
You could also hook into the filtering hook used by the kses/htmlawed module.
Marcus:
Thanks heaps !! More food for research here... already reading up more....
If you're curious and interested what I'm up to with language translations with mixed languages content on ELgg.. have a look here ==> http://community.elgg.org/mod/groups/topicposts.php?topic=66529&group_guid=1138 and you'l see the challenges presented for translating ;-(
( I wonder how much people miss out on techie trickx b/c they don't follow the blogging from ppl such as you, Dave, Ben, et al... ;-)
http://community.elgg.org/pg/pages/view/78206/ has one "interesting use" ;) to generate a "PrintMe" href for Pages --> triggers my mickeymouse code to create a printable version of the main content. Having coded this hook using Marcus's TracTags as the design basis.. I feel game enough now to go for the Google Translate API ;-)
Thanks ! Marcus !
hi Marcus Povey i would like to know what is trac respository? and where do i have to get the link? in admin settings how should i give trac respository url? please reply me. since i need #tags in thewire plugin. help me pls