Customizing SMF > SMF Coding Discussion

Content of $topic - Can´t find any documentation

(1/2) > >>

Doctor Asp:
First post in this forum.  :)
Is there a list off all the content of $topic (and $board) somewhere?
When I search the online documentation for "$topic['new_href']", I get 0 results.


Aleksi "Lex" Kilpinen:
Unless I'm mistaken, $topic and $board both should only contain the topic or board ID respectively, if defined so if you are in a topic view or a board view.

Hello and welcome to SMF!

I get the feeling that you are trying to make an integration of some kind—SSI, perhaps? Here is documentation all the SSI functions.

Doctor Asp:
Thx for both replies.
I have seen this but it isn´t very helpful.
I need a list like this:

$topic['new_href'] - The url to the first new message in this topic
$topic['first_post']['link'] - The title with a link to the first message in this topic
$topic['first_post']['id'] - The id number of the first message in this topic
$topic['quick_mod']['modify'] - ?

I´m working on a Bootstrap 5 theme for SMF 2.1 to use at my existing website.


I don't believe that $topic is ever populated like that at all

If it is, it would only be when post.php is loaded


[0] Message Index

[#] Next page

Go to full version