News:

Wondering if this will always be free?  See why free is better.

Main Menu

Possible to add multiple boards in "action=recent;"?

Started by themavesite, September 25, 2017, 04:43:51 AM

Previous topic - Next topic

themavesite

http://forums.themavesite.com/index.php?action=recent;start=0;
Shows all recent posts

http://forums.themavesite.com/index.php?action=recent;start=0;board=1
Limits them to board 1

What I would like is showing recent posts for two boards at once, something like this:
http://forums.themavesite.com/index.php?action=recent;start=0;board=1,2
But that obviously does not work. How would one accomplish this?
TMS Forums
Since 2008 and still going strong! Join today! http://forums.themavesite.com/index.php

Arantor


themavesite

Quote from: Arantor on September 25, 2017, 04:50:31 AM
Try using "boards" rather than "board" in the URL.
That was surprisingly easy, I'm an idiot.
Thank you.

One more question:

Is there a way of defining a topic in the recent action?
Something like
http://forums.themavesite.com/index.php?action=recent;start=0;topic=xxx

Why would I want something like this? Because it always shows the latest reply first. And I want people to see the latest posts on top. (#new#new) doesn't work for everyone, especially not guests.
TMS Forums
Since 2008 and still going strong! Join today! http://forums.themavesite.com/index.php

Arantor

Not without writing it and honestly I'm not convinced it would have the positive effect you think it will.

themavesite

Quote from: Arantor on September 25, 2017, 07:22:00 AM
Not without writing it and honestly I'm not convinced it would have the positive effect you think it will.
Damnit, I really want to be able to link to the latest reply or sort them all by new-old.
Is there another way?

Linking to a reply that doesn't exist and is way higher obviously does not work: http://forums.themavesite.com/index.php?topic=20452.msg999999#msg999999
http://forums.themavesite.com/index.php?topic=20452.new#new only works for people who've previously seen all the other replies
TMS Forums
Since 2008 and still going strong! Join today! http://forums.themavesite.com/index.php

Arantor


themavesite

Quote from: Arantor on September 25, 2017, 07:53:09 AM
No, there isn't without writing it.

Then I'll have to use a really bad workout unfortunately..
Create different "recent" templates for the topics where I want this feature..

      SELECT
         m.id_msg, m.subject, m.smileys_enabled, m.poster_time, m.body, m.id_topic, t.id_board, b.id_cat,
         b.name AS bname, c.name AS cname, t.num_replies, m.id_member, m2.id_member AS id_first_member,
         IFNULL(mem2.real_name, m2.poster_name) AS first_poster_name, t.id_first_msg,
         IFNULL(mem.real_name, m.poster_name) AS poster_name, t.id_last_msg
      FROM smf_messages AS m
         INNER JOIN smf_topics AS t ON (t.id_topic = m.id_topic)
         INNER JOIN smf_boards AS b ON (b.id_board = t.id_board)
         INNER JOIN smf_categories AS c ON (c.id_cat = b.id_cat)
         INNER JOIN smf_messages AS m2 ON (m2.id_msg = t.id_first_msg)
         LEFT JOIN smf_members AS mem ON (mem.id_member = m.id_member)
         LEFT JOIN smf_members AS mem2 ON (mem2.id_member = m2.id_member)
      WHERE t.id_board != 132 AND t._id_topic=20452
      ORDER BY m.id_msg DESC

Can't I create another "url variable" like "board", but with "topic"?
Then I could use this and endless amount of times, instead of hardcoding queries.
TMS Forums
Since 2008 and still going strong! Join today! http://forums.themavesite.com/index.php

Arantor


Advertisement: