News Plugin 📰

(Angus McLeod) #1

GitHub-Mark-32px Repository : get the code here

sandbox Example : see it in action here

:heart: Donate : support it here

:raising_hand_man: Note: This plugin requires the Topic List Previews plugin to be installed.

Overview

The News Plugin adds a new route to your forum, where the latest topics in a category are displayed in a large, news-like format. It adds a link to this route in the header bar, to the left of the right icons.

It was originally sponsored by @Merlls_Rizzini and has subsequently been requested by others (cc @Eduardo_Braga) who have seen it in operation on my Sandbox. It is inspired by the Elektronauts site.

Notes:

  • It is disabled by default. Use the discourse news enabled setting to enable it.
  • It requires the Topic List Previews plugin to be installed.
  • Select your news category using the discourse news category setting.
  • If you want an rss feed of your news, just use the category rss feed, e.g. /c/news.rss.
23 Likes
(Justin DiRose) #2

I just tried the demo site and got an error stating that you can’t view the News feed without logging in. Is that by design?

2 Likes
(Eduardo Braga) #3

It’s the plugin I’ve always wanted :grinning:

Can comments be added?

1 Like
(Angus McLeod) #4

Originally yes, but not for the public version. I’ve fixed that. Thanks!

Yes, but it would require a fair bit more work. Happy to do this as a paid job.

7 Likes
(Merlls Rizzini) #5

Amazing plugin. I have more ideas to discuss with Angus to make it even better.

3 Likes
(Patrick Rien) #6

@angus awesome plugin, thank you!

Would it be possible to display topics in “News” by a tag(s) rather than a category? In my forum, would be great if users could post topics in any category and a “news” tag, which then aggregate all of those topics to a single News feed (regardless of category).

5 Likes
#7

Hey @angus, great plugin! My community also enjoys the Topic List Preview, so thank you for that!

I made some quick mockup to see if it’s possible in future releases of News plugin to have some layout and posts options:

  • To have featured topic on top, large
  • Choose a number of columns for topics after that
  • To add byline, date


I like suggested idea to display tagged topics on the News page.

I hope the development of this plugin can help communities to move from Wordpress or using two platforms into one. This type of CSMish approach will do for us. We have reviews and some articles which we will like to present in a different way than standard Discourse posts. I imagine using the News page as the front page of the website. Thanks again!

7 Likes
(Angus McLeod) #8

Yes, this is possible, but I won’t be able to fit it in as an open source task for a while.

This is great! Thanks for that design inspiration. I’m may well get to this one soonish given it’s mostly style change :+1:

6 Likes
(Riza) #9

Hi, this is an interesting plugin. I want to confirm something before I install and rebuild my instance.

My discourse instance is set to private, but once in a while I also want to write public content, something like a blog page, that people can see it without logging in. Will this plugin allow me to do such things?

#10

FYI I’m nearly ready to release a new feature for the ‘tiles’ view in Topic List Previews that doubles the width of ‘featured’ items so they take up 2 columns instead of 1.

update:this was implemented.

2 Likes
#11

Suggestion: Would be great if we could select multiple categories to include in the news feed.

(Rioforce) #12

I’m just getting a 500 internal server error when i visit whatever category I apply this to. I’ve followed the directions and have Topic List Previews installed (and working on another category), but this won’t work. Here’s a photo:

image

1 Like
(Admir Hodzic) #13

Great plugin thanx a lot.
Can we get full width for news page or it is narrowed with propose.

(Angus McLeod) #14

Not currently, no. If your site is private guests will not be able to access /news.

Great suggestion. I’ve scheduled this in for early May: News Plugin: select multiple categories to include in the news feed - Work - Angus' Sandbox

@rioforce Are you still experiencing this issue? if so can you check your /logs to see if there’s anything related to this plugin? Thanks.

It’s narrowed on purpose. You could change this via a css rule in a theme.


Note, the topic list headers seemed to have creeped back into this plugin, I’ll be removing them on Friday.

(Alexandre) #15

I’m probably doing something very wrong to don’t get what I want, but… how can I change the “News” for an icon?
I trying doing this through CSS/Header, it “works” (icon is clickable and redirects to the news page), but instead of replacing the “News” it creates the icon in the upper left corner of the page…
<a class="widget-link header-nav-link" href="/news" title="News"><img alt="" src="/uploads/default/original/1X/26a6ef477d2310aea094143ee736c9ba959b1f6e.png" title="News" width="32" height="32"></a>