Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Easy referring/navigation using # in a post

I've had this idea for a long time, but finally took some time off to write it.

Whenever you get a link to a post, it includes the #pid, which will make the screen jump down to the post.
Example can be shown here.

The #pid27346394 in the URL will make it jump down to post 27346394, which is the post ID.
The navigation is done like this:

PHP Code

<?php 
<a name="pid27346394" id="pid27346394"></a> 

A simple a-tag with a name will make it able to use #whatever is in the name-attribute to navigate with.

When people make huge threads, it would be a great idea to have this navigation. In their table of contents, they usually link to another post. Example can be found here.

The actual suggestion
Add a new tag, which will work as the master, and then you can link to it using the normal url-tag or simply send a link like you do now.
An example could look like this:

Code
[nav=quick]Some title[/nav]

That will create an a-tag with the name-attribute like so:
PHP Code

<?php 
<a name="quick" id="pid123"></a> 

pid123 would be replaced with the post ID of the post, just like it is normally. In this example, the post ID is 123.

To make a link, it would look something like this:
https://hackforums.net/showthread.php?ti...=123#quick

tid is the thread ID (unique number for each thread)
pid is the post ID from before.
#quick will nagivate to the [nav=quick] part I specified before.

Example
http://fiddle.jshell.net/9qLxA/5/show/#quick

Code on the page to navigate there is:
PHP Code

<?php 
<a name="quick"></a> 
Use #quick to navigate there.

Thoughts?
Great suggestion in my opinion, you have my full support.
I read it twice to make sure I fully understood it. I like this idea, and I can see a great use for it in lengthy threads where the full amount of characters per post is used (eg. most stickied threads such as the Android thread you linked to). I'm trying to think if it could be used in a negative manner possibly, but I don't see it being any more dangerous than a normal URL link.

The only negative thing I could see coming from this thread doesn't originate from the thread itself, but more as a foreboding barrage of members saying that this won't be used much by the typical member, and that other priorities might take a more immediate place in website development (eg. Two factor authentication).

I like the suggestion, well explained and nicely laid out. I look forward to seeing what the rest of the community thinks.
Crypto

This would help a lot with large threads.

100% agree with Mohatu.
I'm not sure if I fully understand what you're saying, bare with me.

So basically, your suggestion is to add an anchor to direct people to, rather than directing them to only a post? That way, you can send people directly to what they're trying to look at?

If so, I don't think it's a terrible idea. I just think it would only be used in very large threads. D:
(Dec 20, 2013 06:41 AM)+mK Wrote:  I'm not sure if I fully understand what you're saying, bare with me.

So basically, your suggestion is to add an anchor to direct people to, rather than directing them to only a post? That way, you can send people directly to what they're trying to look at?

If so, I don't think it's a terrible idea. I just think it would only be used in very large threads. D:

That's exactly what I mean.
Also linking to a page you're already on, but adding # to it, will make it jump immediately instead of opening another page and then jump.

I would consider making an userscript for it, but people without the userscript would see the tags and wouldn't be able to make the jump down.
That could be prevented with [color=transparent] though... But still.
This would be great for large threads with a table of contents. I highly support this.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by ๖ۣۜStarkApr 13, 2023 01:45 AM 4 144 Apr 13, 2023 01:45 AM
Last Post: ๖ۣۜStark
by SIM-3205632Jul 10, 2021 03:06 PM 6 193 Jul 10, 2021 03:06 PM
Last Post: SIM-3205632
by Yin YangNov 19, 2018 10:10 AM 1 94 Nov 19, 2018 10:10 AM
Last Post: Xerotic