Author Topic: Display one topic?  (Read 476 times)

Offline ormuz

  • Full Member
  • ***
  • Posts: 689
Display one topic?
« on: December 03, 2017, 11:07:02 AM »
how can I achieve something like this:

- Have a predefined list of topics
- Show the amount of these topics to display (like one topic)
- Display them randomly
- Have a layout (output) similar to the boardnews block (subject, content, user, avatar, read more, etc)

Any ideas, suggestions?

Offline Gluz

  • Sr. Member
  • ****
  • Posts: 985
  • Gender: Male
Re: Display one topic?
« Reply #1 on: December 03, 2017, 09:09:06 PM »
Make a custom PHP block, in it make an array with all the IDs of the topics you want to show.

Randomize n number of indexes from that array (n = the number you want to display).

Load the ID from the first message from that topics. (it's a fairy easy query using $smcFunc)

There is a SSI function to load posts from an array of posts IDs.

Need help with PHP, HTML, CSS, Themes or MODs?

Think in spanish, habla en ingl├ęs.