How do you link to a specific post in a thread?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

RossMAN

Grand Nagus
Feb 24, 2000
79,008
430
136
Is it possible to move the "direct link" to underneath the joined date field?
 

Alone

Diamond Member
Nov 19, 2006
7,490
0
0
I don't think so. There's a complete lack of span id's as Evadman mentioned.
 

Evadman

Administrator Emeritus<br>Elite Member
Feb 18, 2001
30,990
5
81
Originally posted by: Alone
I don't think so. There's a complete lack of span id's as Evadman mentioned.

It may be possible using the same kinda methodology that I used, though it was a total hack and not elegant at all. I looked for a span that had only a date and a specific CSS class. I sorted the output from the parcing code so the spans would be in the same order as the anchor tags. then I had to look for a span with that CSS and only a date in the span that was directly after the anchor, and add the corresponding link to it.

I had to use the CSS and the date check because there are other spans that had the same CSS class, like the edited text at the bottom of a post and the fusetalk copyright tag at the very bottom of the page, but only the span at the top of the post had a date only.

The text under the avatar has a different CSS class, so it may be possible by looking for the text 'joined:' and a valid date within the span with the class. But because that 'joined:' and date is not really inside another element, it would require finding that table cell and parcing out that section and rebuilding it with the link from the pieces pulled out of it.

If it were VB or something, I could do it but my javascript skills are sorely lacking. It would probably be pretty easy with a regular expression replacement.
 

Spacehead

Lifer
Jun 2, 2002
13,067
9,858
136
Finally got this to work. I guess the last version of Greasemonkey had a bug in it & the new one's working for me now.
 

Spacehead

Lifer
Jun 2, 2002
13,067
9,858
136
Um, i'm wondering how well this will work now. I think if people have different "Messages Per Page" settings in their profile settings things will get messed up.

Look at this example:
In the "What are you listening to *right now*?! Chapter V" thread i linked to the last post with my normal 40 messages per page setting. The post should be by "ethebubbeth" with "Dream Theater - Systematic Chaos - 01 - In the Presence of Enemies" in the post
forums.anandtech.com/messageview.aspx?catid=38&threadid=2026429&frmKeyword=&STARTPAGE=10&FTVAR_FORUMVIEWTMP=Linear#26552296

Then i direct linked after changing to 100 messages per page.
forums.anandtech.com/messageview.aspx?catid=38&threadid=2026429&frmKeyword=&STARTPAGE=4&FTVAR_FORUMVIEWTMP=Linear#26552296

Notice how the "STARTPAGE=" are different?
 

Evadman

Administrator Emeritus<br>Elite Member
Feb 18, 2001
30,990
5
81
Spacehead, anyone who is anyone has it set at 100 per page. :)

Yes, you are correct, direct linking this way only works if the page settings are the same, or at least close between users. The posts per pages setting is not in my cookies, so I assume it is only stored server side. Unless there is a undocumented bit somewhere in the source code of the ASP page that checks for a specific value in the get string direct linking to a post will never work 100% for all users. Besides Jason, I have no idea how to get at the source code to check, or how the upgrade will effect this script (or make it moot)
 

RossMAN

Grand Nagus
Feb 24, 2000
79,008
430
136
Woohoo this still works despite the forum upgrade.

Thanks again Alone and Evadman :)
 

Evadman

Administrator Emeritus<br>Elite Member
Feb 18, 2001
30,990
5
81
Really? It wasn't working for me. The CSS style changed and the span changed into a div. I have no idea how yours is working, but awesome :)

I updated it because it wasn't working for me. Here's the new one: Link
 

Alone

Diamond Member
Nov 19, 2006
7,490
0
0
Originally posted by: Evadman
Really? It wasn't working for me. The CSS style changed and the span changed into a div. I have no idea how yours is working, but awesome :)

I updated it because it wasn't working for me. Here's the new one: Link

I imagine mine still works because it's not dependent on CSS.

EDIT: Haha, it's even neater now. It places the lin right above the avatar.
 

Evadman

Administrator Emeritus<br>Elite Member
Feb 18, 2001
30,990
5
81
Yeah, the location of the anchor changed in the page itself. It is no longer above the post, it is in the div of the user name.