Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Req: Post # in Permalink.
Right now it just says "permalink" I'd love to change this to "#5" (for example) so I can just say "refer to post 5" instead of forcing them to click the permalink to take them to the post in question. Seems like a simple enough edit to the existing permalink plugin (may attempt it myself).
0
This discussion has been closed.
Comments
Current examples:
http://lussumo.com/community/discussion/4867/req-post-in-permalink/#Item_1
http://lussumo.com/community/discussion/4858/2/the-iphone-has-landed/#Item_1
I'm suggesting that the following would be a lot more permanent:
http://lussumo.com/community/discussion/4867/#Item_1
http://lussumo.com/community/discussion/4858/2/#Item_1
Perhaps bjrn's method is better and this is really a core change? Mark, do you have an opinion on this? Is there a reason why it's not done this way?
The extension should intercept any link pointing to a comment ID, determine which discussion it is in, which page to go to, then redirect to that. This would also be essential for the upcoming moderator tools extension, in case a comment is moved from one discussion to another.
I.E.:
http://example.com/forum/extension.php?CommentID=1234
redirects tohttp://example.com/forum/discussion/56/#Comment_1234
testing... edit: I guess it does.
http://lussumo.com/community/discussion/4858/2/#Comment_54906 http://lussumo.com/community/discussion/4858/#Comment_54906 <-- does NOT work
http://lussumo.com/community/discussion/4858/2/monkeys-ate-my-grand-mother/#Comment_54906
Well whaddaya know? It works when it's wrong
The reason that happens, I believe, is because of the order of the mod_rewrite rules. Here's an extract from the .htaccess file: You'll notice that the rules for a discussion with a title and not page are before the 'correction' rules for discussions with pages but without titles. The /(.*)/ of the second rule happens to match the page id for urls with a specified page and no title, and the page id is consequently treated like a title and 'dumped' from the url. I don't think switching them would be that great an idea, though, as titles which consist solely of numbers would then be treated as a page. Doesn't seem to be any way out of this...
EDIT: while we're on the topic of the friendly urls extension, mark, I'd recommend enclosing all your rules/settings for mod_rewrite between so that if someone's server disables mod_rewrite for some reason it will at least not cause a server error.
And in addition, now that I think of it, you should see what aterr does to try and automatically detect if mod_rewrite is installed. In the .htaccess file, between the mod_rewrite ifmodule tags, it has the following code: then it tests for the environment variable ATERR_REWRITE in it's initialization code to see if the rewrite rules are in effect: I thought that was a pretty neat way of doing it...