Requires at least version 1.4.6/2.0.0/2.1.1 (depending on your version of Confluence) of the Utilities Plugin to be installed.
Ensure that old versions of the plugin have been deleted before installing the current version. The name of the plugin has changed from plugins-redirection-1.4.jar.
Bug reports and feature requests can be made entered via Jira.
Does anyone know of a way (e.g. using Velocity/etc) to determine whether or not a user arrived at a page from a redirect as opposed to a direct link?
Basically what I want to do is add something to the page decorator that only displays if a user followed a redirect... e.g. "Redirected from Example Page", etc.
There's nothing I can think of specifically. Theoretically, the macro could add a parameter to the URL which another macro could check for, but currently there is no facility for this.
One possible idea I can think of is perhaps this information could be read from the User History? Do you know of any way to read the last couple of items from a user's History? It must be possible somehow given that Confluence renders the list via the 'History' link...
You probably could access the user history from somewhere (I've never tried, but it wouldn't be that hard, I assume). However, you would not be able to tell from the history whether the user had been redirected or had simply viewed the page then clicked on a regular link to get to the page. The only way to tell the difference between a true automatic redirection and a user-driven click-through is if the redirection process advertises the fact somehow.
Yeah, it definitely wouldn't be an exact science... my line of thinking was that if a page followed a redirect, most of the time you could assume that the 2nd item from the top of their user history would be the page that redirected them. If you could then check the body for .*{redirect\:.* you'd be in business.
Advertising the redirect would definitely be preferred (maybe &fromID=123456 appended to the URL or something along those lines?). I might log a feature request.
Edit - Logged as REDIR-18. FYI on a completely unrelated note - there seems to be something funky wrong with the page layout when you edit a comment... between this edit box and your comment, it says "com.atlassian.confluence.pages.actions.ViewPageAction@1587a97".
Does anyone know of a way (e.g. using Velocity/etc) to determine whether or not a user arrived at a page from a redirect as opposed to a direct link?
Basically what I want to do is add something to the page decorator that only displays if a user followed a redirect... e.g. "Redirected from Example Page", etc.
There's nothing I can think of specifically. Theoretically, the macro could add a parameter to the URL which another macro could check for, but currently there is no facility for this.
One possible idea I can think of is perhaps this information could be read from the User History? Do you know of any way to read the last couple of items from a user's History? It must be possible somehow given that Confluence renders the list via the 'History' link...
You probably could access the user history from somewhere (I've never tried, but it wouldn't be that hard, I assume). However, you would not be able to tell from the history whether the user had been redirected or had simply viewed the page then clicked on a regular link to get to the page. The only way to tell the difference between a true automatic redirection and a user-driven click-through is if the redirection process advertises the fact somehow.
Updated by David Dembo
Oct 29, 2007 10:22
Yeah, it definitely wouldn't be an exact science... my line of thinking was that if a page followed a redirect, most of the time you could assume that the 2nd item from the top of their user history would be the page that redirected them. If you could then check the body for .*{redirect\:.* you'd be in business.
Advertising the redirect would definitely be preferred (maybe &fromID=123456 appended to the URL or something along those lines?). I might log a feature request.
Edit - Logged as REDIR-18.
FYI on a completely unrelated note - there seems to be something funky wrong with the page layout when you edit a comment... between this edit box and your comment, it says "com.atlassian.confluence.pages.actions.ViewPageAction@1587a97".