News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

BBC Topics List

Started by Diego Andrés, December 21, 2023, 09:44:04 PM

Previous topic - Next topic

Diego Andrés

Link to the mod




BBC Topics List
Developed by Diego Andrés



Introduction
Inserts an alphabetically ordered list of topics from the board using a BBC.

Features
  • Permissions to use the BBC
  • Limit the amount of results
  • Show the list only in topics or everywhere
  • Exclude sticky topics
  • Exclude self topic
  • Show the list only in topics or everywhere
  • Integration with SMF Post Prefix
  • Customize each list
    • From specific board
    • Include only certain characters
    • Only alphanumeric

Localization
English
Russian by Bugo


Changelog
GitHub

SMF Tricks - Free & Premium Responsive Themes for SMF.

Diego Andrés

1.2 - 26 December 2023
  • New Feature Added setting to exclude sticky topics.
  • New Feature Added setting to exclude the current topic.
  • Improvement Added setting for prefixes.
  • Bug Fix Fixed displaying '0-9' anchor when there are no numeric results.

SMF Tricks - Free & Premium Responsive Themes for SMF.

StarredSkies

This is an interesting addition! May be helpful for keeping character biographies in alphabetical order... hm...

Lucarella

Hi, the mod works very well from day one, as I already told you.
In the last few days some users have suggested me some of their ideas and I should install this mod: https://custom.simplemachines.org/index.php?mod=3012
The problem, however, is that the description is not displayed in the lists. Do you think it is possible to add this function to your mod?

Thanks

Diego Andrés

Where would be the appropriate place to display it? Below the topic?
You can try adding it like this:

Sources/BBC-TopicsList.php
Code (Search) Select
t.id_topic, t.id_board, t.approved, t.id_first_msg,
Code (Replace) Select
t.id_topic, t.id_board, t.approved, t.id_first_msg, t.description,
Code (Search) Select
                    'subject' => $row['subject'],
Code (Replace) Select
                    'subject' => $row['subject'],
                    'description' => $row['description'] ?? '',


Themes/default/TopicsList.template.php
Code (Search) Select
<a href="' . $scripturl . '?topic=' . $topic_info['id_topic'] . '.0">' . $topic_info['subject'] . '</a>
Code (Replace) Select
<a href="' . $scripturl . '?topic=' . $topic_info['id_topic'] . '.0">' . $topic_info['subject'] . '</a><span class="smalltext" style="flex-grow:1;width:100%;padding-inline:1.75rem 0.5rem;">' . $topic_info['description'] . '</span>

SMF Tricks - Free & Premium Responsive Themes for SMF.

Lucarella

For now I thank you Diego, at the moment I can't make these changes because I have other commitments, as soon as I do I will tell you the result

Advertisement: