Pull announcements from discourse to a static home page?


(Luke) #1

Hey, I’ve decided to migrate from XenForo to discourse, permentantly… I’ve been testing it for the last few months, I’m in love. The only thing I can not figure out how to do is create a “portal” type thing. If you look at SpongePowered’s website, they seem to pull announcements from their forum to their main site, how could I accomplish something similar? With RSS possibly? Thanks! :slight_smile:


(Mittineague) #2

You mean this?
https://meta.discourse.org/c/support.rss


(Luke) #3

Doesn’t seem to exist. :frowning:


(Mittineague) #4

What browser are you using? With latest Firefox I get


(Luke) #5

Oh, I’m in Safari (Forgot it doesn’t have a built in RSS reader). Opened in FF, that is what I’m talking about. Is there any way I could embed that into a standard HTML page?


(Mittineague) #6

Sure, the same as with any RSS feed into the page.


(Luke) #7

Would it require the user to have an RSS reader installed?


(Tarak'ha) #8

No, you can use any kind of script out there that pulls in an RSS feed and prints it onto the page of your choice. The Discourse RSS feed is like any other feed out there, as @Mittineague mentioned.


(Luke) #9

I know I sound like I want to be spoonfed, is there any certain RSS feed script that would work best or that you recommend?


(Tarak'ha) #10

Googling “put RSS content into html page” came up with this site as the top choice: How To Embed And Display RSS Feeds On Any Web Page: Best RSS-To-HTML Publishing Tools


(Luke) #11

So, I’m not sure if that’s the way the site I linked seems to be doing it… The only problem with this method is the fact I can’t style the contents of the feed, and that’s a problem to make it match my home page. Now I am trying to get this to work. Apparently discourse has a built in embed feature… I just can’t figure out how to get it to work…

I just get this:

Loading Discussion


(Khoa Nguyen) #12

I think you should hire a developer


(Luke) #13

That’s not exactly an option. The Google Feed API is working well, so far.


(Luke) #14

Woo! I got it working, just have to style it.

Also, is there anyways I can remove the “Luke H. Flynn wrote this:”? and the email?


(Mittineague) #15

It’s XML so it can be styled

<item>
        <title>Pull announcements from discourse to a static home page?</title>
        <author>no-reply@example.com (@Luke Luke)</author>
        <description><![CDATA[
          <p><a href="https://meta.discourse.org/users/luke">Luke</a> wrote:</p>
          <blockquote>
              <p>Woo! I got it working, just have to style it.</p>

<p>Also, is there anyways I can remove the "Luke H. Flynn wrote this:"? and the email?</p>

<p><div class="lightbox-wrapper"><a href="http://puu.sh/dYYJT.png" class="lightbox" title="dYYJT.png"><img src="http://puu.sh/dYYJT.png" alt="Image" width="690" height="141"><div class="meta">
<span class="filename">dYYJT.png</span><span class="informations">1369x279</span><span class="expand"></span>
</div></a></div></p>
          </blockquote>
          <p><a href="https://meta.discourse.org/t/pull-announcements-from-discourse-to-a-static-home-page/23589/14">Read full topic</a></p>
        ]]></description>
        <link>https://meta.discourse.org/t/pull-announcements-from-discourse-to-a-static-home-page/23589/14</link>
        <pubDate>Fri, 02 Jan 2015 20:51:12 +0000</pubDate>
        <guid isPermaLink="false">post-23589-14</guid>
        <source url="https://meta.discourse.org/t/pull-announcements-from-discourse-to-a-static-home-page/23589.rss">Pull announcements from discourse to a static home page?</source>
      </item>

It should be possible to strip out tags, but likely easiest to simply display: none them


(Luke) #16

I’ve already styled it, I just want to strip out certain things. I can’t seem to figure out how to do that with JS.


(Mittineague) #17

Have you tried CSS

author {
  display:none;
}