Good, now I and others can clearly see what you are after. I could now say that all the questions is yes/no questions and you might get yes/no answers. But since I have already got you to rephrase it once I won't say that.
I have a comment on the last one, it is damn easy:
<?php
// You get the variables from somewhere, probably a database. But for the example I will only add a variable in the php-tag.
$variable = "http://www.somesite.com/viewtopic.php?topicid=44";
?>
<a href="<?php echo $variable: ?>">Look at this</a>
And a little about the second last. A good way to start every PHP script is to first design everything (website to know what content you will use, database to store the content, programming in between), then program. And when you program do it in small parts and check it often. It is quite easy to get and display the links, your problem will probably be if you want this done automatically to design a good way to order topics in categories.