Flightmare (talk | contribs) (v1.1) Tag: sourceedit |
No edit summary Tag: rte-source |
||
Line 1: | Line 1: | ||
+ | {{Languages}} |
||
{{Infobox JavaScript |
{{Infobox JavaScript |
||
| Image file = Script_discussions_feed.png |
| Image file = Script_discussions_feed.png |
Revision as of 09:41, 13 September 2017
Discussions Feed adds a Special:RecentChanges-like flat view of recent posts on wiki's with discussions enabled. It creates a special page that can be accessed at Special:DiscussionsFeed. Entries provide links to their corresponding posts in the discussions-module, as well as links to the user profiles and quick blocks if the viewer has blocking rights. The list is updated every two minutes.
Installation
This script can be added to one's own global.js to have it enabled on any wiki. Or it can be installed per wiki, so all users can access it for that specific wiki.
Template:Script Install/ImportJS
Theme (optional)
Installing the theme is optional, by default the special page will use the theme as defined on the host wiki. Adding a theme will make the special page a bit easier to read.
It is not recommended to apply one of themes to your global CSS as you will encounter wikis with both light and dark skins. To install this theme on your wiki just add the following @import line to your wiki's MediaWiki:Common.css (Note that all imports go at the very top of the page). The themes will only enhance the theme of the host wiki, it will not override it. This means that installing the light theme on a dark wiki or vice versa will result in a page that is very hard to read.
Light theme: (example)
@import url('/load.php?mode=articles&articles=u:dev:MediaWiki:DiscussionsFeed/style-light.css&only=styles');
Dark theme: (example)
@import url('/load.php?mode=articles&articles=u:dev:MediaWiki:DiscussionsFeed/style-dark.css&only=styles');
Styling
Each entry has its own paragraph you can style. Text elements inside this paragraph all have their own classes for styling:
df-entry
A line in the feed.df-date
The time-stamp of the post.df-content
The plain text content of the post.df-user
The user that posted the message.df-category
The category the post is in.df-block
A link to the Special:Block (only visible to viewers with blocking-rights).
CSS example for a wiki with dark theme:
/* Theme for Special:DiscussionsFeed */
.df-content {
font-weight: bold;
color: LightGrey;
}
.df-user {
color: LightSkyBlue;
}
.df-date {
color: LightGrey;
}
.df-entry:hover {
background-color: rgba(255,255,255,0.1);
}
.df-category {
font-style: italic;
}
.df-block {
color: firebrick;
}
.df-content:link, df-content:visited, .df-user:link, df-link:visited, .df-block:link, df-block:visited {
text-decoration: none;
}
Changelog
Date | Notes | Updated by |
---|---|---|
October 10th, 2016 | Created | Flightmare |
October 13th, 2016 | Improved error throwing | Flightmare |
November 28th, 2016 | Added auto refreshing | Flightmare |