Get list of topics pinned globally

Is there a way to get list of topics which are pinned globally.

In advanced search there is “are pinned” but it does list all pined topics.

We wold like to find globally pined topics so we can clear our latest list.

1 Like

The usual way is to view the site in incognito mode in your browser.

1 Like

We unfortunately require logins to view any content .
I need then dummy account to reuse.

If you have Data Explorer Plugin installed, this should do it.
pinned-topics.dcquery.json (213 Bytes)

7 Likes

Thanx for tip here is corrected version for others.
Added pinned_globally=TRUE in where clue

SELECT id, title, user, category_id ,pinned_globally FROM topics WHERE pinned_at IS NOT NULL and pinned_globally=TRUE

{"query":{"id":12,"sql":"SELECT id, title, user, category_id ,pinned_globally FROM topics WHERE pinned_at IS NOT NULL and pinned_globally=TRUE","name":"Pinned Topics","description":"Enter a description here","param_info":[]}}

8 Likes

Note in:pinned should find all pinned topics be they globally or locally pinned.

7 Likes

This gives this error when ran:

PG::SyntaxError: ERROR:  syntax error at or near "{"
LINE 9: {"query":{"id":12,"sql":"SELECT id, title, user, category_id...
        ^

Here is an updated Data Explorer query which returns a tidier list of all pinned posts by category, with globally pinned topics at the top:

SELECT pinned_globally, TO_CHAR(pinned_until,'DD/MM/YYYY') as pinned_till, id as topic_id, user_id, category_id 
FROM topics 
WHERE deleted_at IS NULL
AND pinned_at IS NOT NULL
AND (pinned_until IS NULL OR pinned_until > CURRENT_TIMESTAMP)
ORDER BY pinned_globally desc, category_id
4 Likes