Created Topic Sort

Install this theme component

This adds a sortable created date column to the topic list. Also adds an optional “Created” tab to the navigation bar.

On desktop view, a whole column is added. On mobile, the created date is only added inline with the activity date when the “Created” sort is selected (see screenshots below).

:information_source: Before using this component, it may be good to evaluate your community’s need for knowing a created date. There’s already a built in way for auto flagging newly created topics within a certain time period (customizable by users in Preferences > Tracking > Topics).

Settings

Enable Sort by Created Date Nav Bar Item

Adds a “Sort by Created Date” nav bar item to the navigation menu. Default: true

Screenshots

Desktop

Mobile

Enable Column on Created Date Filter Only

Prevents the created date column from being displayed outside of the Create Date filter. Requires the “Enable Sort by Created Date Nav Bar Item” to be true. Default: false

Screenshots

Sorting


Mobile view

With Category and Tags

Compatibility & Notes

With mobile, the sort functionality is already heavily limited, so created date would only function as an informational. The additional field only appears if the created date is different from the bumped date.

Compatibility with the Topic List Thumbnails is limited. In list style, it will function normally. In blog style, the created date is pulled to the bottom right. In grid style and masonry style, the created date is only visible when the “Created” filter is selected, and will replace the activity date. In minimal style, the created date is hidden.

12 Likes

Wow, another perfect plugin that changes the forum! It would be great if it could integrate with the Discourse Nav Item Icon / Emoji plugin.

3 Likes

I think it should work with it. :slight_smile:
Just add it like for example:
emoji:created_date:twitter:spiral_calendar:filter

4 Likes

Can confirm adding the setting as Don has it does work!


4 Likes

Very nice! Unfortunately it doesn’t play well with the Topic Thumbnails TC, adds an extra time for some reason:

Note the extra 7h at the bottom of the center.

It appears I can just hide this .topic-list .topic-list-data:last-of-type but I thought I would let you know :grin:

EDIT: I found another oddity, when I click Latest, it highlights Created, and when I click Created it highlights latest :crazy_face:

1 Like

Huh. That’s interesting. Looks like it’s just an odd side effect of how the Topic Thumbnails and Created Topic Sort adding to the templates at the same time. Might just be an issue with masonry and grid mode? I’ll see if I can make a suitable adjustment for it in the CSS instead of just hiding it, once i figure out a clean way to detect the theme component usage.

The highlighting for latest and created sounds really weird. Created should only be highlighted when the url has /latest?order=created in it… hmmm…

I’ve updated some of the component to make it prettier for (or at least match) the Topic Thumbnails component.

In blog style, the created date is pulled to the bottom right. I couldn’t find a clean way to get it to be right next to the bump date, so this will have to do. In grid style and masonry style, the created date is only visible when the “Created” filter is selected, and will replace the activity date. I tried to get both activity date and created date to display at the same time, but it made the card feel cramped. In minimal style, the created date is hidden.