Link to specific post - Printable Version +- Discovery Gaming Community (https://discoverygc.com/forums) +-- Forum: Rules & Requests (https://discoverygc.com/forums/forumdisplay.php?fid=6) +--- Forum: Site & Forum Feedback (https://discoverygc.com/forums/forumdisplay.php?fid=14) +--- Thread: Link to specific post (/showthread.php?tid=15942) |
Link to specific post - eyvind - 01-31-2009 I might not have found it yet, if that is the case I apologize. The feature I am refering to is one I have seen on many other forums (vB, phpBB3, and SMF at least) and I can't imagine that it would be particularly difficult to provide here either. The post number in the upper right of each post now links to a script that displays a link to that post in a dialogue box. It does not seem particularly useful since it only links to the page of the topic that the post is on, not the specific post in question. It also seems a bit erratic in the link it provides, occasionally it includes extraneous querystring arguments (such as session ID). The solution I have been using is using the "st" parameter to put the post I am linking to at the top of the page. For example, "st=167" puts post #168 at the top of the page. This works fine though it doesn't explicitly point out the post in question and could still leave some uncertainty as to which post really is being linked to. It also requires some rudimentary technical understanding. It's little more than a half-useful patch. I can think of two ways to implement linking to specific posts. The first is simple but perhaps not as useful as the second. The simple implementation is to put anchors at the top of each post (simple template change) and change the top-right post number link to that anchor. (I believe this is the way phpBB3 does it.) Each post begins with Code: <!--Begin Msg Number 12345--> The generated HTML should look something like this: Code: <!--Begin Msg Number 12345--> And the link_to_post function in ipb_topic.js should be changed to: Code: /*--------------------------------------------*/ The more complicated implementation might require adding quite a few lines of PHP code (or a new page), and a new template. It would end with a link to a page that has the specific post alone on a page with a link to the topic it is part of. I don't know enough to say more than that. (I believe this is the way vB does it.) Maybe worth doing? Link to specific post - hribek - 01-31-2009 It is already implemented, however it does not work perfectly. The "Blue Solution" and "Deep Blue" forum skins differ in the anchor names, so if you make a link to a post, it won't work for everyone. Example: The link you get from the JavaScript linking function: http://discoverygc.com/forums/index.php?s=...st&p=485046 This is what it gets transformed to: http://discoverygc.com/forums/index.php?sh...mp;#entry485046 the #entry485046 anchor works in "Blue Solution" but does not work in Deep Blue. For Deep Blue, you have to change it to #post-485046 making the "Deep Blue" link look like this: http://discoverygc.com/forums/index.php?sh...mp;#post-485046 I simply looked into the source code and got it from there. Now if this could be unified, it would help a lot. Link to specific post - eyvind - 01-31-2009 I looked through the HTML source in Deep Blue, and I can't find any named anchors. Am I blind? The Deep Blue link_to_post has never worked for me, and never gives a link to a named anchor. No matter, it wouldn't be useful if it isn't standardized, as you said. Standardize it. |