News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

ssi_recentTopics - how to hide "MOVED: " topics?

Started by Armada, March 15, 2017, 08:18:49 AM

Previous topic - Next topic

Armada

Hiya all,

Are "MOVED: " topics (as in the topics that just say a topic has been moved) stored any differently to ordinary topics?

Or rather, I'm trying to hide "MOVED: " topics from the ssi_recentTopics.

At the moment I'm thinking of just looking in the array['subject'] for the first six characters to say MOVED:

Is that the only way to do it?

Thanks in advance :)
--- SMF Rocks even more than YabbSE---

Shambles

In the past I've amended the SELECT..WHERE statement to include AND m.icon != 'moved'

This involves an edit to SSI.php.

That way you retain the number of topics you requested.

Armada

Great stuff - thank you!

That worked a treat.

I added it near the end of the WHERE of the SELECT statement as you suggested.


  AND m.icon != "moved"
                        AND m.approved = {int:is_approved}' : '') . '
                ORDER BY t.id_last_msg DESC
                LIMIT ' . $num_recent,


I've spotted too that the $array['icon'] also shows a special icon for moved items - I hadn't noticed that until you mentioned it.


Your idea works very effectively!
--- SMF Rocks even more than YabbSE---

Advertisement: