added url.raw for Post assets to get a URL without the #id stuff at the end

This commit is contained in:
Doug Bell 2007-11-30 19:34:38 +00:00
parent 241bb7ebac
commit 8975ef5ef2
3 changed files with 7 additions and 0 deletions

View file

@ -516,6 +516,7 @@ sub getTemplateVars {
$var{"reply.url"} = $self->getReplyUrl;
$var{'reply.withquote.url'} = $self->getReplyUrl(1);
$var{'url'} = $self->getUrl.'#id'.$self->getId;
$var{'url.raw'} = $self->getUrl;
$var{'rating.value'} = $self->get("rating")+0;
$var{'rate.url.thumbsUp'} = $self->getRateUrl(1);
$var{'rate.url.thumbsDown'} = $self->getRateUrl(-1);

View file

@ -99,6 +99,7 @@ our $HELP = {
{ 'name' => 'reply.url' },
{ 'name' => 'reply.withQuote.url' },
{ 'name' => 'url' },
{ 'name' => 'url.raw', description => 'help url.raw' },
{ 'name' => 'rating.value' },
{ 'name' => 'rate.url.thumbsUp' },
{ 'name' => 'rate.url.thumbsDown' },

View file

@ -620,6 +620,11 @@ user subscribed to.|,
lastUpdated => 1184174365
},
'help url.raw' => {
message => 'The URL to the post asset without the #id... at the end. Useful for performing other functions on the post like func=promote or func=demote',
lastUpdated => 0,
context => "Help for the 'url.raw' template var.",
}
};
1;