Depending on either mod_rewrite is turned ON (like on our forums), or it is turned OFF (like in default version), miniBB can produce different types of URLs. Analyzing them, you can always determine topic ID.
For example, URL of this topic is:http://www.minibb.com/forums/7_4217_0.html
In default version, it would look like:.../index.php?action=vthread&forum=7&topic=4217&page=0
In default version, look at the URL portion saying topic=4217
. 4217 is topic ID. In mod_rewrite (HTML) version, look at the second value of topic URL.