Search for pinned topics


(Joshua Rosenfeld) #1

Continuing the discussion from What advanced search filters should exist?:

Can’t seem to find an answer for this here yet…can you search for pinned topics?

Pinned & Unpinned Topics
Show all (my, their, everyone's) uploads
(Mittineague) #2

If I’m correct the available search filters come from /lib/search.rb

There are several “advanced_filter” lines but I see none for “pinned”

Unfortunately it might be a bit complex to code up.

The topics table has

pinned_at timestamp without time zone,
pinned_globally boolean DEFAULT false NOT NULL,
pinned_until timestamp without time zone,

and the topic_users table has

cleared_pinned_at timestamp without time zone,

I think something simple like

  advanced_filter(/status:pinned/) do |posts|

might work, but accounting for when / if it is / will be un-pinned would take a bit more

(Jeff Atwood) #3

The pinned search should exist @sam

(Sam Saffron) #4

Implemented per:

(Sam Saffron) closed #5