<span id="post_hello">Hello fellow practitioners</span>, Let's talk links.<br/>I will use this thread and Catherine's "Tails of Monkey" ongoing story (highly recommended) as examples.<br/><br/>Linking to a topic is simple.<br/>Example: link (https://elliquiy.com/forums/index.php?topic=300188)<br/><br/><div class="floatleft"><div class="codeheader">Code: <a class="codeoperation" href="javascript:void(0);" onclick="return smfSelectText(this);">[Select]</a></div><pre style="margin: 0; padding: 0;"><code class="bbc_code">[url=https://elliquiy.com/forums/index.php?topic=300188]link[/url]</code></pre></div><br class="clear_left"/><br/><br/>Note that the URL<tt class="bbc_tt">https://elliquiy.com/forums/index.php?topic=300188 (https://elliquiy.com/forums/index.php?topic=300188)</tt>can be shortened because some parts are implied,<br/>so the following will also work:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188 (https://elliquiy.com/forums?topic=300188)</tt><br/>and also this:<tt class="bbc_tt">?topic=300188 (https://elliquiy.com/forums/index.php?topic=300188)</tt><br/><br/>But I digress.<br/><br/>Notice the number (300188 in this case)?  It is the thread identifier we want to link to, but we can also do some more interesting things.<br/><br/><br/><strong>[1]</strong>We can link to a page containing a specific message, by adding a dot followed by a message specifier to the URL.  For example:<br/>Link to the top of the page containing the 5th reply:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188.5 (https://elliquiy.com/forums?topic=300188.5)</tt><br/>Link to the top of the page containing the 47th reply:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188.47 (https://elliquiy.com/forums?topic=300188.47)</tt><br/><br/><br/><strong>[2]</strong>Incidentally, the original post is not a reply so it is assigned an index of zero.<br/>Also, since the number of posts per page is fixed at 25, we can use the following formula:<tt class="bbc_tt">index = (page - 1) x 25</tt>, so:<br/>Link to the top of the first page in the thread:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188.0 (https://elliquiy.com/forums?topic=300188.0)</tt><br/>Link to the top of the second page in the thread:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188.25 (https://elliquiy.com/forums?topic=300188.25)</tt><br/>Link to the top of the third page in the thread:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188.50 (https://elliquiy.com/forums?topic=300188.50)</tt><br/>And so on...<br/><br/><br/><strong>[3]</strong>Similarly, we can use the internal message id to do the same as [1] above, for example:<br/>Link to the top of the page containing message #14697198:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188.msg14697198 (https://elliquiy.com/forums?topic=300188.msg14697198)</tt><br/>Link to the top of the page containing message #14959885:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188.msg14959885 (https://elliquiy.com/forums?topic=300188.msg14959885)</tt><br/><br/><br/><strong>[4]</strong>This is all good, but what if we want to link to<em>the specific post</em>rather than the top of its page?<br/>Luckily, it can be done using "anchors", which is a fancy name for linking to locations<em>inside</em>a web page.<br/>As it stands, the forum automatically generates anchors for us for each message on the page, and we can link to them by appending a hash sigh (#) and the anchor name to the url, so building on the example in [3] we do:<br/>Link to the actual message #14697198:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188.msg14697198#msg14697198 (https://elliquiy.com/forums?topic=300188.msg14697198#msg14697198)</tt><br/>Link to the actual message #14959885:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188.msg14959885#msg14959885 (https://elliquiy.com/forums?topic=300188.msg14959885#msg14959885)</tt><br/><br/><br/>But wait, there's more!  Turns out that we can create anchors ourselves and link to<em>arbitrary locations inside posts</em>!  How cool is that?<br/>There are two ways to do that, one using the<tt class="bbc_tt">[anchor]</tt>tag, and the other using the<tt class="bbc_tt">[anch]</tt>tag.<br/><br/><br/><strong>[5a]</strong>The<tt class="bbc_tt">[anchor]</tt>tag assigns an anchor to some text.  For example, this post starts with:<br/><div class="floatleft"><div class="codeheader">Code: <a class="codeoperation" href="javascript:void(0);" onclick="return smfSelectText(this);">[Select]</a></div><pre style="margin: 0; padding: 0;"><code class="bbc_code">[anchor=hello]Hello fellow practitioners[/anchor]</code></pre></div><br class="clear_left"/><br/><br/>which appends the prefix "post_" to create an anchor named<tt class="bbc_tt">post_hello</tt>.<br/>Then, an "internal" link to it would be:<tt class="bbc_tt">#hello (#post_hello)</tt>(the rest of the URL is implied to point to the same page).<br/>Note that I wrote "#hello" rather than "#post_hello".  This is because the forum automatically appends the "post_" prefix if the URL contains only an anchor.  Yes, it caught me by surprise and I had to edit this post.<br/><br/>Linking inside a post in a different thread is just as easy, except that more of the URL parts must be specified.  For example:<br/>Link to the 2nd part of message #14762028:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188.msg14762028#post_part2 (https://elliquiy.com/forums?topic=300188.msg14762028#post_part2)</tt><br/><br/><br/><strong>[5b]</strong>The<tt class="bbc_tt">[anch]</tt>tag is very similar to [5a], with some minor differences.  Firstly, the anchor name cannot include numbers or special characters (so for example "part3" will not work, but "partthree" will).  Secondly, the anchor created has a different prefix ("user_" instead of "post_"), and thirdly it comes with another tag,<tt class="bbc_tt">[link]</tt>, that simplifies linking within the same page.<br/>So if the end of this post looks like this:<br/><div class="floatleft"><div class="codeheader">Code: <a class="codeoperation" href="javascript:void(0);" onclick="return smfSelectText(this);">[Select]</a></div><pre style="margin: 0; padding: 0;"><code class="bbc_code">[anch=signature]-- Al[/anch]</code></pre></div><br class="clear_left"/><br/><br/>An internal link can be written either like this: link1 (#post_user_signature)<br/><div class="floatleft"><div class="codeheader">Code: <a class="codeoperation" href="javascript:void(0);" onclick="return smfSelectText(this);">[Select]</a></div><pre style="margin: 0; padding: 0;"><code class="bbc_code">[url=#user_signature]link1[/url]</code></pre></div><br class="clear_left"/><br/><br/>Or like this:<a href="#user_signature">link2</a><br/><div class="floatleft"><div class="codeheader">Code: <a class="codeoperation" href="javascript:void(0);" onclick="return smfSelectText(this);">[Select]</a></div><pre style="margin: 0; padding: 0;"><code class="bbc_code">[link=signature]link2[/link]</code></pre></div><br class="clear_left"/><br/><br/>However, linking inside a post in a different thread will have to be done using the<tt class="bbc_tt">[url]</tt>syntax.  For example:<br/>Link to the 3rd part of message #14762028:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188.msg14762028#user_partthree (https://elliquiy.com/forums?topic=300188.msg14762028#user_partthree)</tt><br/><br/><br/>(A big thank you to Catherine for editing her post to include the anchor tags for the sake of this tutorial!)<br/><br/><br/>So far, so good!  Let's ramp things up a little.<br/><br/><br/><strong>[6]</strong>If a thread is relatively short (less than 10 pages I believe), it has an "All" option next to the pages links to display all the posts on one page.<br/>A link can achieve the same effect by appending ";all" to the thread address.  For example:<br/>Link to the entirety of the thread:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188;all (https://elliquiy.com/forums?topic=300188;all)</tt><br/><br/>And the fun part is that this also works with anchors.  For example:<br/>Link to message #14697198 in the entirety of the thread:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188;all#msg14697198 (https://elliquiy.com/forums?topic=300188;all#msg14697198)</tt><br/>Link to the 2nd part of message #14762028 in the entirety of the thread:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188;all#post_part2 (https://elliquiy.com/forums?topic=300188;all#post_part2)</tt><br/><br/>Unfortunately this does not work with longer threads (likely to minimize server load).  More on this later.<br/><br/><br/><strong>[7]</strong>In addition to the "All" link we discussed in [6], there are two more special links next to the pages selection: "Go Down" on the top and "Go Up" on the bottom, which will bring you respectively to the top or the bottom of the current page.  How do they do that?  Using anchors of course!  They are named "#top" and "#lastPost", and just as any other anchor, it can be used in our links.  For example:<br/>Link to the first post in<em>Monkey</em>:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188#top (https://elliquiy.com/forums?topic=300188#top)</tt><br/><br/>That was easy, but how do we link to the last post in a thread?  (Actually, the bottom of the last page, but it's close enough.)<br/>If the thread is finished, locked or otherwise unlikely to gen further posts, we can point to the last page:<tt class="bbc_tt">https://elliquiy.com/forums?topic=153845.10675#lastPost (https://elliquiy.com/forums?topic=153845.10675#lastPost)</tt><br/>If the thread is not expected to pass 10 pages, we can use the "all" trick:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188;all#lastPost (https://elliquiy.com/forums?topic=300188;all#lastPost)</tt><br/><br/>But what if it's a long and active thread like this one?  What do we do then?<br/>We cheat!<br/><br/><br/><strong>[8]</strong>If we try to specify a page number which is higher than the last page in the thread, the last page will be used instead.  Since no thread is likely to have more than 99,999 pages (about 2.5 million posts), we can use 99999 as a surrogate for the last page.  For example:<br/>Link to the last post of this thread:<tt class="bbc_tt">https://elliquiy.com/forums?topic=290221.99999#lastPost (https://elliquiy.com/forums?topic=290221.99999#lastPost)</tt><br/><br/><br/><strong>[9]</strong>And finally, if we want a link that will take the person to the first new post in a thread since they last visited it, we can use a special combination of a ".new" specifier and a "#new" anchor.  Like this:<br/>Link to a new post in<em>Monkey</em>:<tt class="bbc_tt">https://elliquiy.com/forums?topic=300188.new#new (https://elliquiy.com/forums?topic=300188.new#new)</tt><br/><br/>Figuring out how the "new" options interact with others is left as an exercise to the reader.<br/><br/><br/>Be well,<br/><a name="user_signature">-- Al</a><br/>