XF 2.1 Is there a way to get thread ID from URL?

See function getThreadFromUrl() in file Repository\Thread.php
It return a thread, if found, but you could create a similar function to return just the thread_id using the same code.
 
See function getThreadFromUrl() in file Repository\Thread.php
It return a thread, if found, but you could create a similar function to return just the thread_id using the same code.
Thank you for replying. Found it.

I'm looking for a solution at an API standpoint.

Say, for example, From this thread's URL I can assume the thread id as 180204. But, Will it work every time?

 
Top Bottom