PDA

View Full Version : Post "permalinks"


stealthyninja
14th April 06, 10:08 PM
I'm probably the only person who would care about this, but in case I'm not, here's the story: at the moment within threads, you'll notice each post is headed by the date and time of the post (for example, "8th April 06, 07:34 PM") and the number of the post within the thread (for example, "#3"). This number links to the single view of the post (see example (http://www.welovecss.com/showpost.php?p=441&postcount=3)).

Single view links to posts look like this: /showpost.php?p=441&postcount=3

Break-down of variables and values:
p is the post number - value 441 in this case
postcount is the number of the post within the thread - value 3 in this case

Now this is fine if the post you wish to link to within another thread/PM/elsewhere contains all the information you wish to convey; often enough though one might wish to link to the post but still have it displayed within its context (in other words, have the rest of the thread viewable). So what I propose is appending another link after the number of the post like so:

http://img240.imageshack.us/img240/9794/postpermalink3yc.png

This "post permalink" would send a viewer to the anchor position of a post within a thread (see example (http://www.welovecss.com/showthread.php?p=441#post441))

Such "post permalink" links would look like this: /showthread.php?p=441#post441

Break-down of variables and values:
p is the post number - value 441 in this case
#post411 is the anchor position of the post within the thread


To add this into the forum's templates, one would have to go to the Admin CP and find the Style Manager under "Styles & Templates". Select "Edit Templates" in the drop-down list for the forum's current style and then navigation to the Postbit Templates. Edit both the postbit and postbit_legacy templates.

Find the following if condition within each template:
<if condition="$show['postcount']">

Before the closing </if>, add in:
| <strong><a href="showthread.php?$session[sessionurl]p=$post[postid]#post$post[postid]" rel="nofollow">post permalink</a></strong>

Jen
15th April 06, 05:55 AM
First I need to confirm; Is the Post Permalink same as "Thread: Which DOCTYPE do you use?" link in http://www.welovecss.com/showpost.php?p=441&postcount=3

stealthyninja
15th April 06, 06:43 AM
Designgraphy: It's exactly the same as going to a thread normally; the only difference is that it automatically scrolls your browser down to the post anchor (#post555 for example) in the URI. The only reason the URI is ?p=555#post555 is so that it works for threads that span multiple pages.

jammodotnet
12th May 06, 06:14 AM
after nearly a month of inactivity in this thread, i think that is a wonderful idea!!