Community Central
Community Central
m (→‎Example: update with working url)
Tag: Help
m (matching other pages)
Tag: Help
(17 intermediate revisions by 10 users not shown)
Line 1: Line 1:
  +
{{Extension infobox
{{enabled by default}}
 
  +
| name = RSSPie
  +
| version = 2.1.0
  +
| author = Alexia E. Smith and Hydra Wiki Platform Team
  +
| link = [https://gitlab.com/hydrawiki/extensions/rsspie GitLab]
  +
| desc = {{int:rsspie_description}}
  +
| default = yes
  +
}}
 
{{TOCright}}
 
{{TOCright}}
The '''RSS''' extension allows you to embed RSS [[Help:Feeds|feeds]] from any site onto a page. This could be used to display news feeds with timely information on your subject, to show entries from a related blog, or to show recent changes from another wiki.
+
'''RSS''' is a type of [[Help:Feeds|web feed]] that allows you to embed a list of content that is automatically updated when you refresh the page. RSS feeds can be used to track news articles, podcasts, blogs, or just about anything else published on the web.
   
  +
You can embed RSS feeds on a wiki using the '''RSSPie''' extension, enabled by default on all Fandom wikis. This is useful to include news about a video game, episode announcements for a TV show, or even recent changes from the wiki itself.
==How do I add the RSS feed to a wiki page?==
 
Locate the URL for a feed you would like to include, usually by clicking an "RSS" button or link on the page providing the feed. Copy the URL from the address bar.
 
   
The basic code to add an RSS feed to a page is:
+
== How do I add an RSS feed to a wiki page? ==
 
Locate the URL for the RSS feed you would like to include, usually by clicking an "RSS" button or link on the page providing the feed and copying the URL from the address bar.
   
  +
The basic code to add an RSS feed to a page is as follows:
<div style="margin-left:50px">'''<code><nowiki><rss>URL goes here</rss></nowiki></code>'''</div>
 
   
 
:'''<code><nowiki><rss>URL goes here</rss></nowiki></code>'''
   
==How can I customize the feed?==
+
== How can I customize the feed? ==
There are a number of parameters you can add after the URL for the RSS feed to customize the display output. Each is separated by a pipe ("<code>|</code>"), like this:
+
There are a number of optional parameters you can add within the <code><nowiki><rss></nowiki></code> tag to customize the output:
 
<div style="margin-left:50px">'''<code><nowiki><rss>https://wherever.com|short|date|max=4</rss></nowiki></code>'''</div>
 
 
Though no parameters are usually ''required'', you can mix and match from the following list as you wish. That said, some feeds do need the '''<code>charset=UTF-8</code>''' parameter. Try adding it if your feed displays oddly — or not at all.
 
   
 
{| class="article-table"
 
{| class="article-table"
 
|-
 
|-
  +
! Attribute and Default
! width="200px;" | Parameter
 
  +
! Description
!Result
 
 
|-
 
|-
  +
| <code>itemTemplate="''PageName''"</code><br>Default:&nbsp;[[MediaWiki:Rss_item_template]]
|<code>'''short'''</code>
 
  +
| Defines the display template for each item in the feed. ''PageName'' must be a complete page name including the namespace. See [[#Feed item template|§&nbsp;Feed item template]] for more information.
|Shows only the headline for each news item, not the description text.
 
 
|-
 
|-
|<code>'''date'''</code>
+
| <code>max="''X''"</code><br>Default: 5
|Shows the date/time stamp for each news item
+
| Shows only a certain number of items in the feed.
 
|-
 
|-
|<code>'''max='''x</code>
+
| <code>sort="''X''"</code><br>Default: newest
  +
| Sorts the feed items by "newest" or "oldest".
|Allows you to choose the maximum number of items to show.
 
 
|-
 
|-
|<code>'''highlight='''term1 term2</code>
+
| <code>descriptionLength="''X''"</code><br>Default: 200
  +
| Truncates long descriptions to a certain number of characters.
|The terms added here (separated by a space) are highlighted.
 
 
|-
 
|-
|<code>'''filter='''term1 term2</code>
+
| <code>dateFormat="''X''"</code><br>Default: <code>Y/m/d H:i</code>
  +
| Formats the date of each entry using [http://www.php.net/manual/en/function.date.php PHP date formatting guidelines.]
|Only RSS items containing at least one of the listed terms are shown.
 
 
|-
 
|-
|<code>'''filterout='''term1 term2</code>
+
| <code>filterIn="example,words"</code><br>Default: ''empty''
  +
| A list of words, separated by commas, to filter into the display. Feed items will only be shown if they contain any of these words.
|No RSS items containing the listed terms are shown.
 
 
|-
 
|-
|<code>'''reverse'''</code>
+
| <code>filterOut="example,words"</code><br>Default: ''empty''
  +
| A list of words, separated by commas, to filter out of the display. Feed items will be hidden if they contain any of these words. Feed items hidden by <code>filterOut</code> will stay hidden even if they match <code>filterIn</code>.
|The RSS items are displayed in reverse order
 
|-
 
|<code>'''charset='''</code>
 
|The charset used by the feed. For example, you may need to use UTF-8 to view some characters.
 
 
|}
 
|}
   
===Example===
+
=== Feed item template ===
  +
'''For advanced users''', you can use the <code>itemTemplate</code> parameter to modify how each item is displayed in the feed. This is useful for situations where you may need to hide certain fields or rearrange them for an optimal display.
To add some World Cup headlines directly from [[wikipedia:FIFA|FIFA]], you might use:
 
 
<div style="margin-left:50px"><code>'''<nowiki><rss>https://www.fifa.com/worldcup/rss/news|output=rss|charset=UTF-8|short|date|max=3</rss></nowiki>'''</code></div>
 
 
After adding in a title and some styling, you'd get:
 
 
<div style="width:80%; border:1px solid #555; margin:auto; padding:5px">
 
'''Keep up with the Cup:'''
 
 
<rss>https://www.fifa.com/worldcup/rss/news|output=rss|charset=UTF-8|short|date|max=3</rss></div>
 
 
== Google feeds ==
 
[[File:Bad RSS.png|thumb|right|thumb|A broken Google feed.]]
 
Clearly, one of the biggest news aggregators on the web is Google. Many wikis use Google feeds of one kind or another. Unfortunately, Google has made several changes to their news services over the years, and some wikis may be displaying broken feeds as a result.
 
 
If your wiki's Google feed begins with "'''This RSS feed URL is deprecated'''" — or if you see <code><nowiki><wikia-rss-error-wrong-status-301></nowiki></code> — you'll need to make a change.
 
 
The easiest thing to do is to copy and paste the following to your wiki, and change '''<code>MyTopicHere</code>''' — both times — to whatever you need it to be:
 
 
<div style="margin-left:50px"><code>'''<nowiki><rss> https://news.google.com/rss/search?pz=1&cf=all&q=MyTopicHere&cf=all&scoring=n&hl=en-US&gl=US&ceid=US:en|charset=UTF-8|short|date|max=3</rss>
 
</nowiki>'''</code></div>
 
 
For instance, let's say I wanted to get a newsfeed about Star Wars at Disneyland. I'd use this:
 
 
<div style="margin-left:50px"><code>'''<nowiki>
 
<rss>https://news.google.com/rss/search?pz=1&cf=all&q=DisneylandStarWars&cf=all&scoring=n&hl=en-US&gl=US&ceid=US:en|charset=UTF-8|short|date|max=3</rss></nowiki>'''</code></div>
 
 
After a little styling, the result would be:
 
 
<div style="width:80%; border:1px solid #555; margin:auto; padding:5px">
 
'''The latest from Galaxy's Edge:'''
 
   
  +
The <code>itemTemplate</code> parameter must point to a page that contains the template, which will substitute the following fields with the related data:
<rss>https://news.google.com/rss/search?pz=1&cf=all&q=DisneylandStarWars&cf=all&scoring=n&hl=en-US&gl=US&ceid=US:en|charset=UTF-8|short|date|max=3</rss></div>
 
  +
*<code><nowiki>{{{link}}}</nowiki></code> - the URL to the feed item
  +
*<code><nowiki>{{{title}}}</nowiki></code> - the feed item's title
  +
*<code><nowiki>{{{author}}}</nowiki></code> - the author of the feed item
  +
*<code><nowiki>{{{date}}}</nowiki></code> - the feed item's date
  +
*<code><nowiki>{{{description}}}</nowiki></code> - the feed item's description
   
  +
The default template, located at [[MediaWiki:Rss_item_template]], is as follows:
=== Google feeds in other languages ===
 
  +
<pre><nowiki>
This same base code is adaptable to other languages, using [https://sites.google.com/site/tomihasa/google-language-codes Google's language codes]. Often, but not always, those language codes are the same as [[Help:Language code|Fandom's language codes]].
 
  +
<div class='rss_item'>
  +
'''<span class='plainlinks'>[{{{link}}} {{{title}}}]</span> - {{{author}}} - <span class='date_epoch'>{{{date}}}</span>'''
  +
: {{{description}}}
  +
</div>
 
</nowiki></pre>
   
  +
== How can I embed a Google news feed? ==
For instance, we'd make the feed French by altering the last bit of the URL to include references to FR (the country) and fr (the language) — like this <code>&hl=fr&gl=FR&ceid=FR:fr</code>.
 
  +
[[File:Google Alerts RSS Feed.png|thumb|300px|This is an example of setting up an English Google RSS feed for ''Call of Duty'' news.]]
  +
Google provides an easy way to create an RSS feed on its [https://www.google.com/alerts Alerts page.] Simply type in the search terms for your subject and, under "Deliver to", select "RSS feed". You may need to log in to a Google account and change "How often" to "As-it-happens" to see the RSS feed option. Once you create the feed, right-click the RSS icon and select "Copy Link" to copy the link to the feed to use it on your wiki.
   
  +
For example, creating an English Google RSS feed for ''Call of Duty'' news and including it on a wiki would result in the following:
<div style="width:80%; border:1px solid #555; margin:auto; padding:5px">
 
'''French feed for the keywords "DisneylandStarWars"'''
 
   
  +
:'''<code><nowiki><rss max="3">https://www.google.com/alerts/feeds/02664616218399659428/5058949282015925287</rss></nowiki></code>'''
<rss>https://news.google.com/rss/search?pz=1&cf=all&q=DisneylandStarWars&cf=all&scoring=n&hl=fr&gl=FR&ceid=FR:fr|charset=UTF-8|short|date|max=3</rss></div>
 
   
  +
<rss max="3">https://www.google.com/alerts/feeds/02664616218399659428/5058949282015925287</rss>
But there are some important caveats to working with other languages.
 
   
 
== Can I embed RSS feeds from my own wiki? ==
* '''Language determines context.''' Choosing French in our example emphasizes Disneyland ''Paris'' over the original Disneyland in California.
 
 
Yes, feeds are available in both RSS and Atom formats for all [[Help:Page history|page histories]] and many [[Help:Special pages|special pages]], including [[Special:RecentChanges]], [[Special:NewPages]], and [[Special:WantedPages]]. To access these feeds, see [[Help:Feeds]] for more information.
* '''Topics aren't universal.''' Feed topics don't produce results in all languages. You may have to massage the RSS statement a bit to get a feed in the language of your choice. If one set of keywords isn't producing results, think of other, similar words and try them. But remember: your feed topic simply might not be ''popular'' in a given language. You may never be able to get an iCarly feed in Sudanese!
 
* '''Mixed language content possible.''' Feeds might produce results that are a mix of different languages, particularly if your topic is in a language different than the <code>?hl=</code> variable.
 
* '''Different users may see different things.''' What you see on a Google newsfeed can be shaped by your browser, the country you're in, and the language settings on your own Google account. So it's possible that two people looking at the same Google newsfeed will see different results.
 
=== Making sure the feed meets your needs ===
 
News feeds are passive. That is, you have to accept whatever results arrive. If your topic is clear and distinct, this is usually unproblematic But if your topic is comprised of very common nouns, you might get some results that have nothing to do with your topic.
 
   
  +
For example, showing a feed of new help pages created on Community Central would result in the following:
Make sure you monitor the results for a while to see that every single line item is actually relevant.
 
   
  +
:'''<code><nowiki><rss max="3">https://community.fandom.com/wiki/Special:NewPages?feed=rss&namespace=12</rss></nowiki></code>
Consider adding identifiers — like the production company, exact title, or key creative person — to the search term in order to ensure better results. For instance, "Good Omens Amazon" will return more results relevant to the Amazon version of ''Good Omens'' than just "Good Omens" alone. You may have to play around a bit to find the optimal term.
 
   
  +
<rss max="3">https://community.fandom.com/wiki/Special:NewPages?feed=rss&namespace=12</rss>
You also want to make sure you look at the dates on the news stories. If you're not pulling recent news stories, your search term probably needs a tweak. A feed that's not able to produce recent hits shouldn't be used. It helps no one to know what 2008's big news stories were about your topic.
 
==Can I embed feeds from my own wiki?==
 
Yes, MediaWiki provides feeds in both RSS and Atom formats for all [[Help:Page history|history pages]] and many [[Help:Special pages|special pages]], including [[Special:RecentChanges]], [[Special:NewPages]], and [[Special:WantedPages]].
 
   
 
== Further help and feedback ==
You can use the RSS URL, in combination with this extension, to display portions of these lists on other pages on your community. See [[Help:Feeds]] for more information.
 
==Further help and feedback==
 
 
{{Help and feedback section}}
 
{{Help and feedback section}}
   
 
[[de:Hilfe:RSS-Feeds einbinden]]
 
[[de:Hilfe:RSS-Feeds einbinden]]
[[es:Ayuda:RSS2Wiki]]
+
[[es:Ayuda:RSS]]
 
[[fi:Ohje:RSS]]
 
[[fi:Ohje:RSS]]
 
[[fr:Aide:RSS]]
 
[[fr:Aide:RSS]]

Revision as of 15:01, 11 May 2021

RSS is a type of web feed that allows you to embed a list of content that is automatically updated when you refresh the page. RSS feeds can be used to track news articles, podcasts, blogs, or just about anything else published on the web.

You can embed RSS feeds on a wiki using the RSSPie extension, enabled by default on all Fandom wikis. This is useful to include news about a video game, episode announcements for a TV show, or even recent changes from the wiki itself.

How do I add an RSS feed to a wiki page?

Locate the URL for the RSS feed you would like to include, usually by clicking an "RSS" button or link on the page providing the feed and copying the URL from the address bar.

The basic code to add an RSS feed to a page is as follows:

<rss>URL goes here</rss>

How can I customize the feed?

There are a number of optional parameters you can add within the <rss> tag to customize the output:

Attribute and Default Description
itemTemplate="PageName"
Default: MediaWiki:Rss_item_template
Defines the display template for each item in the feed. PageName must be a complete page name including the namespace. See § Feed item template for more information.
max="X"
Default: 5
Shows only a certain number of items in the feed.
sort="X"
Default: newest
Sorts the feed items by "newest" or "oldest".
descriptionLength="X"
Default: 200
Truncates long descriptions to a certain number of characters.
dateFormat="X"
Default: Y/m/d H:i
Formats the date of each entry using PHP date formatting guidelines.
filterIn="example,words"
Default: empty
A list of words, separated by commas, to filter into the display. Feed items will only be shown if they contain any of these words.
filterOut="example,words"
Default: empty
A list of words, separated by commas, to filter out of the display. Feed items will be hidden if they contain any of these words. Feed items hidden by filterOut will stay hidden even if they match filterIn.

Feed item template

For advanced users, you can use the itemTemplate parameter to modify how each item is displayed in the feed. This is useful for situations where you may need to hide certain fields or rearrange them for an optimal display.

The itemTemplate parameter must point to a page that contains the template, which will substitute the following fields with the related data:

  • {{{link}}} - the URL to the feed item
  • {{{title}}} - the feed item's title
  • {{{author}}} - the author of the feed item
  • {{{date}}} - the feed item's date
  • {{{description}}} - the feed item's description

The default template, located at MediaWiki:Rss_item_template, is as follows:

<div class='rss_item'>
'''<span class='plainlinks'>[{{{link}}} {{{title}}}]</span> - {{{author}}} - <span class='date_epoch'>{{{date}}}</span>'''
: {{{description}}}
</div>

How can I embed a Google news feed?

Google Alerts RSS Feed

This is an example of setting up an English Google RSS feed for Call of Duty news.

Google provides an easy way to create an RSS feed on its Alerts page. Simply type in the search terms for your subject and, under "Deliver to", select "RSS feed". You may need to log in to a Google account and change "How often" to "As-it-happens" to see the RSS feed option. Once you create the feed, right-click the RSS icon and select "Copy Link" to copy the link to the feed to use it on your wiki.

For example, creating an English Google RSS feed for Call of Duty news and including it on a wiki would result in the following:

<rss max="3">https://www.google.com/alerts/feeds/02664616218399659428/5058949282015925287</rss>

Sky's 'Glass' TVs Finally Solve Their Big Gaming Problem - Forbes - - 2024/04/19 10:43

In Call Of Duty my typical kill to death ratio took an absolute pounding when gaming on a Glass compared with gaming on a recent Samsung TV that ......

Blizzard cracks down on 'unapproved peripherals' in Overwatch 2's competitive mode - - 2024/04/19 10:34

I hope Call of Duty's anti-cheat team is paying attention to the latest crack down on unapproved peripherals in Overwatch 2. News. By Cole Martin....

Cheech and Chong Become Newest Operators in Call of Duty | High Times - - 2024/04/19 10:09

In recent years, Call of Duty has fully embraced cannabis culture for 4/20. This year includes a bunch of fun cannabis-themed goodies and limited ......

Can I embed RSS feeds from my own wiki?

Yes, feeds are available in both RSS and Atom formats for all page histories and many special pages, including Special:RecentChanges, Special:NewPages, and Special:WantedPages. To access these feeds, see Help:Feeds for more information.

For example, showing a feed of new help pages created on Community Central would result in the following:

<rss max="3">https://community.fandom.com/wiki/Special:NewPages?feed=rss&namespace=12</rss>

Help:Create a File - Radiobatatais17273719 - 2024/04/18 18:24

No0n4m3S: {{Delete}}...

Help:TemplateData - Kjnoren - 2024/01/23 13:51

BotAntony: more {{int:}} {{Enabled by default}} '''TemplateData''' is a way to add computer-parsable documentation to [[Help:Templates|templates]]. This allows the visual template editor to present g...

Further help and feedback