Difference between revisions of "Talk:News"

From Organic Design wiki
(too many bugs, too little time)
(Change source-code blocks to standard format)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
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...--[[User:Phalseid|Phalseid]] 22:09, 2 Jan 2007 (NZST)
 
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...--[[User:Phalseid|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]] --[[User:Nad|Nad]] 22:22, 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]] --[[User:Nad|Nad]] 22:22, 2 Jan 2007 (NZST)
 +
::noprobro --[[User:Phalseid|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 ;) --[[User:Rob|Rob]] 17:24, 10 Dec 2006 (NZDT)
 
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 ;) --[[User:Rob|Rob]] 17:24, 10 Dec 2006 (NZDT)
 +
 +
the article [[22 March 2007]] has no content now, but still ends up in the news... --[[User:Sven|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 [[: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>
 +
  category=News
 +
  includepage=*
 +
  format=,¶{|class=news¶|-¶|¶== %PAGE% ==¶|-¶!Posted by [[User:%USER%|%USER%]] on %DATE%,¶|-¶|<div class="news-comment plainlinks">[{{fullurl:Talk:%PAGE%|action=edit&section=new}} add a comment]</div>¶|}¶¶,
 +
  addfirstcategorydate=true
 +
  addauthor=true
 +
  ordermethod=categoryadd
 +
  order=descending
 +
  secseparators=¶|-¶|
 +
  userdateformat= F d, Y
 +
</DPL>
 +
{{public}}
 +
</source>
 +
 +
 +
'''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.
 +
<source lang="css">
 +
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;
 +
}
 +
</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&section=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;
}