comment form in URL
|
|
By Defect , Section Dev Notes [] Posted on Fri Dec 08, 2000 at 10:19:06 AM PST
|
|
Someone in #k5 last night (Thur 12-07-00) asked if there was a way to change the url to have the comments take on a certain form so that a link to a story can be viewed with the comment sorting/mode/etc something other than default. The specific example was "when linking to a story, can the url make the comments nested?" I just thought i'd post my replies here for other's who might have use for them.
|
Adding the following expressions to the GET string will allow links to form comments in a way other than default.
commenttype=
mixed
topical
editorial
all
commentmode=
threaded
minimal
nested
flat
commentrating=
unrate_highest
highest
lowest
dontcare
commentorder=
newest
oldest
ratingchoice=
yes
no
So this link
naked URL
/?op=displaystory&sid=2000/12/4/6317/28950
will take you to the story"Scoop.kuro5hin.org returns at last!" with the comment sorting as your default while this link
modified URL
/?op=displaystory&sid=2000/12/4/6317/28950&commentmode=minimal&commentorder=oldest
will take you to the story with the comments ordered oldest first in a traditional bulletin board format (minimal).
One thing to note though, all the comment mode changes in the url are sticky. So any other stories you visit will be minimal/oldest first until you change it so keep in mind what type of people will be using the link. If they're mostly people who already go to your scoop site, then it could just be annoying if overused, but it could be handy with one time links or if there is some other reason for it.
These settings are usually set with a POST command so you wouldn't normally see them in the URL, but there they are if you need them. |
|
Story Views
|
2 Scoop users have viewed this story.
|
|