Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 08 Feb 2016, 17:48
ndoktoruser ndoktoruser is offline
 
Join Date: Aug 2015
How to get the thread URL from a nodeid?

Let's suppose I have a node id (the integer value) which corresponds to a thread. How do I get the URL?
Reply With Quote
  #2  
Old 09 Feb 2016, 02:34
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Real name: Mel
You can get to the threads by nodeid using the www.example.com/forum/node/1234 where 1234 is the nodeid. Is that what you are looking for or are you looking for API?

from the command line ---- curl http://www.vbulletin.com/forum/ajax/...l?nodeid=54756
or javascript ---
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

The ajax method is hit or miss. On VB 5.2, I don't know why, but if a user is logged in, this js throws an error, but for guests, works as expected.

You can also call the API in the templates using {vb:data}
__________________
VB5 mods - RepliClock VB4 mods - Member Online Status

Last edited by Replicant; 09 Feb 2016 at 03:16.
Reply With Quote
  #3  
Old 09 Feb 2016, 15:31
ndoktoruser ndoktoruser is offline
 
Join Date: Aug 2015
Cool

Once and again, thank you very much!

I did as you said using curl:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

It was exactly what I needed.
Reply With Quote
  #4  
Old 10 Feb 2016, 15:32
Replicant's Avatar
Replicant Replicant is offline
 
Join Date: Sep 2014
Real name: Mel
Originally Posted by ndoktoruser View Post
Once and again, thank you very much!

I did as you said using curl:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

It was exactly what I needed.
If you are using this in a php script, you can call the api directly in the code also. It'll save an http request and be much faster if you are dealing with several urls. I included a screenshot of the docs for this function.
Attached Images
File Type: png route.png (45.9 KB, 31 views)
__________________
VB5 mods - RepliClock VB4 mods - Member Online Status
Reply With Quote
  #5  
Old 15 Feb 2016, 17:34
ndoktoruser ndoktoruser is offline
 
Join Date: Aug 2015
Amazing!

And much simpler now:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Last edited by ndoktoruser; 15 Feb 2016 at 17:51.
Reply With Quote
  #6  
Old 07 Oct 2020, 22:18
excentryk excentryk is offline
 
Join Date: Apr 2011
Hello, sorry for response in old topic - but I have the same problem and don't know how to convert mysite.pl/forum/node1234 to full url to the post. I don't know how to use this getAbsoluteNodeUrl API. Any Tips?

Should create php file example converter.php and put this code in to this file?

I need only working redirection from mysite.pl/forum/node1234 to full url to the post how to do that?
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 13:37.

Layout Options | Width: Wide Color: