Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Site Related Forums
 Site Related Discussions
 Link to a certain reply ID

Author  Topic 

kriki
Starting Member

14 Posts

Posted - 2007-04-11 : 12:09:24
I know it is possible to create a link to a certain topic knowing it's ID.
And also to a certain reply ID in a topic. But to create this link I also need the topic ID.

What I now want to do, is to make a link to a certain reply ID WITHOUT knowing its topic ID.
But I don't find any example on how to construct the link.

The reason I want to do that is because I prefer to keep track of the topics/replies outside the forum.
I can see use the forum-features to keep track, but when have to interrupt it I loose track.
So I programmed something to easily keep track of topics/posts, but to be able to use it I need to know how to create a link to a reply without knowing it's topic ID.
I have already done that for some other forums and it works like a charm.

Alain Krikilion

IF Debugging = removing bugs from program THEN programming := putting bugs in program;

Kristen
Test

22859 Posts

Posted - 2007-04-11 : 13:33:46
If you "hover" the Reply icon it will show you the Reply ID, which you can then include in you URL

So the URL for this topic is
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81952

and the Reply URL for this message is
post.asp?method=ReplyQuote&REPLY_ID=298991&TOPIC_ID=81952&FORUM_ID=2

so the composite URL would be:
topic.asp?TOPIC_ID=81952#298991

Kristen
Go to Top of Page

kriki
Starting Member

14 Posts

Posted - 2007-04-11 : 14:33:31
I noticed that. But the problem I have is that I DON'T have the topic ID.
So I need a link with the ID of the reply WITHOUT knowing the topic ID.


IF Debugging = removing bugs from program THEN programming := putting bugs in program;
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-11 : 15:20:40
You want to link to a topic that does not yet exist?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2007-04-11 : 15:46:18
I'm completely lost. this makes no sense to me.

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

jhermiz

3564 Posts

Posted - 2007-04-11 : 16:19:28
quote:
Originally posted by jsmith8858

I'm completely lost. this makes no sense to me.

- Jeff
http://weblogs.sqlteam.com/JeffS




As Kristen would say +1 for that...I was completly lost when the topic was started, hence no reply. It's another case of the ol' Im going to post something with no relevant data!

Programmers HowTo's -- [url]http://jhermiz.googlepages.com[/url]
Go to Top of Page

kriki
Starting Member

14 Posts

Posted - 2007-04-12 : 06:14:59
quote:
Originally posted by Peso

You want to link to a topic that does not yet exist?


Peter Larsson
Helsingborg, Sweden


I have a the ID of a post and it is also connected to an existing topic. The problem is: I don't have the ID of it's topic. I only have the ID of the post.
So I need to create an url that shows me the post, but I only found examples of url's in which ALSO the ID of the topic is used.

IF Debugging = removing bugs from program THEN programming := putting bugs in program;
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-12 : 06:18:29
I am still not with you.
You want to be able to show individual post? Not a page of posts?

Did you read Kristens answer per 04/11/2007 : 13:33:46 ?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

kriki
Starting Member

14 Posts

Posted - 2007-04-12 : 07:20:23
quote:
Originally posted by Peso

I am still not with you.
You want to be able to show individual post? Not a page of posts?

Did you read Kristens answer per 04/11/2007 : 13:33:46 ?


Peter Larsson
Helsingborg, Sweden


I explain the whole idea:
I have programmed my own "RSS feeder" to download the posts/topics from a forum.
First part is : I need to know what is the last post of the forum (not the last topic because after that topic, it is possible there is a reply to an old topic). That I know by downloading (and analyzing) the main page of the forum.
In it the last post ID (something like [url]http://www.sqlteam.com/forums/topic.asp?whichpage=-1&TOPIC_ID=81985&REPLY_ID=299235[/url]).

So in my own DB I have for example last post ID = 299000 attached to some topic ID. So I have posts 299001=>299235 that I didn't download yet and check if they interest me or not.
So I must request post 299001 and this should return me a page and in it I find the topic and optionally other posts.
BUT I DON'T have the topic ID to request the post ID.
So I can't use something like [url]http://www.sqlteam.com/forums/topic.asp?whichpage=-1&TOPIC_ID=81977&REPLY_ID=299001[/url], because in this url there is also the topic ID. And I don't have it. I want to download the post to have the topic ID.
And I would prefer avoiding downloading ALL topics to find that post ID.

I'll give some examples of another forum:
I know the last post is 82233 but I never downloaded it, so I request this url: [url]http://www.mibuso.com/forum/viewtopic.php?p=82233#82233[/url].
As you can see, I don't need to include the topic ID (especially that I don't have it) to get that post and other posts of the same topic.
After I receive the page, I analyze it and in it I find the topic ID and the forum ID. With this information I decide if the post interests me or not.

I hope I am more clear now.

IF Debugging = removing bugs from program THEN programming := putting bugs in program;
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-04-12 : 07:28:23
The REPLY_ID is the individual post.
The TOPIC_ID is the thread, to where the post belong.

I think you need to redesign your database so it can handle this too. It should not be to hard. Add a new column.

And in the link above, you also have two values (who happens to be the same).


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

kriki
Starting Member

14 Posts

Posted - 2007-04-12 : 08:30:15
quote:
Originally posted by Peso

The REPLY_ID is the individual post.
The TOPIC_ID is the thread, to where the post belong.

I think you need to redesign your database so it can handle this too. It should not be to hard. Add a new column.

And in the link above, you also have two values (who happens to be the same).


Peter Larsson
Helsingborg, Sweden


I was already thinking about rethinking my strategy for it.

In the link above, the second number is for positioning the browser to that post. I don't need to use it to get the page.

IF Debugging = removing bugs from program THEN programming := putting bugs in program;
Go to Top of Page
   

- Advertisement -