Difference between revisions of "Talk:News"
(news blog (no RSS yet)) |
(Change source-code blocks to standard format) |
||
Line 12: | Line 12: | ||
'''A News page''' which displays the feed using a DPL query to select all the items in the [[:Category:News|News category]] in the order they were categorised there (that way they can be worked on and then "published" when they're ready for publication by categorising them at that time. We use '''<onlyinclude>''' tags to surround the snippet within the news articles that should be in the feed, but this could be modified to only embed a specific section, or only the first few paragraphs etc. | '''A News page''' which displays the feed using a DPL query to select all the items in the [[:Category:News|News category]] in the order they were categorised there (that way they can be worked on and then "published" when they're ready for publication by categorising them at that time. We use '''<onlyinclude>''' tags to surround the snippet within the news articles that should be in the feed, but this could be modified to only embed a specific section, or only the first few paragraphs etc. | ||
− | + | <source> | |
<DPL> | <DPL> | ||
category=News | category=News | ||
Line 25: | Line 25: | ||
</DPL> | </DPL> | ||
{{public}} | {{public}} | ||
− | </ | + | </source> |
Line 32: | Line 32: | ||
Some '''CSS''' rules in [[MediaWiki:Common.css]] which make the DPL items render in the right style. | Some '''CSS''' rules in [[MediaWiki:Common.css]] which make the DPL items render in the right style. | ||
− | + | <source lang="css"> | |
table.news { | table.news { | ||
background-color: #f8f8f8; | background-color: #f8f8f8; | ||
Line 54: | Line 54: | ||
color: #666; | color: #666; | ||
} | } | ||
− | </ | + | </source> |
Latest revision as of 18:11, 22 May 2015
so, i can't find or seem to remember the article we had to do rss feeds in the logo area. i was about to download a reader, but i want to give this another shot...--Phalseid 22:09, 2 Jan 2007 (NZST)
- I removed the RSS and other external changes cos its too inefficient and buggy and got very little time for xmlwiki hacking. All that stuff is handled by the XmlWiki changes - transform-changes.php --Nad 22:22, 2 Jan 2007 (NZST)
- noprobro --Phalseid 22:31, 2 Jan 2007 (NZST)
We should limit the number of articles on the front page. Some browsers will not display the page until all the html is loaded. So you could be waiting a long time until the page appears. Also lots of images can give slow loading. Good hello world rectangles also ;) --Rob 17:24, 10 Dec 2006 (NZDT)
the article 22 March 2007 has no content now, but still ends up in the news... --Sven 10:10, 1 Apr 2007 (NZST)
Typical News blog in MediaWiki
We use the following components to create a typical news blog feed from a MediaWiki:
A News page which displays the feed using a DPL query to select all the items in the News category in the order they were categorised there (that way they can be worked on and then "published" when they're ready for publication by categorising them at that time. We use <onlyinclude> tags to surround the snippet within the news articles that should be in the feed, but this could be modified to only embed a specific section, or only the first few paragraphs etc.
<DPL>
category=News
includepage=*
format=,¶{|class=news¶|-¶|¶== %PAGE% ==¶|-¶!Posted by [[User:%USER%|%USER%]] on %DATE%,¶|-¶|<div class="news-comment plainlinks">[{{fullurl:Talk:%PAGE%|action=edit§ion=new}} add a comment]</div>¶|}¶¶,
addfirstcategorydate=true
addauthor=true
ordermethod=categoryadd
order=descending
secseparators=¶|-¶|
userdateformat= F d, Y
</DPL>
{{public}}
A template such as Template:News to do the categorisation so that it can put news items into multiple categories if necessary (such as for example into both a News category and a Public category), and could also add some common design elements to news items if desired. Note that the majority of the design should be done in CSS and the wrapping into a table with date, author and title etc be done by the DPL query. This way the news items can remain as normal informational pages, but yet also have a small snippet of themselves appear in the blog feed.
Some CSS rules in MediaWiki:Common.css which make the DPL items render in the right style.
table.news {
background-color: #f8f8f8;
border: 1px solid #aaa;
padding: 5px 30px 15px 30px;
}
table.news .editsection {
display:none;
}
#bodyContent table.news h2 {
margin-bottom: 0;
}
table.news th, #bodyContent .news-comment a.external {
text-align: left;
font-weight: normal;
font-size: 75%;
color: #666;
}
table.news th a {
text-decoration: underline;
color: #666;
}