Hm... it's quite bad. So what are my options here then?
Manually set an attribute that will be set for each page?
I can probably run a bot for that, but it's quite unusual way of doing this ;)
Sergey Chernyshev wrote:
> I'm trying to replace DLP functionality on my site
[what's "DLP functionality"?]
> with SMW queries but
> I'm having troubles getting N latest pages.
> Is there any way for me to run a query and order by page creation date?
> It seems to be simple functionality buy it looks like I'm stuck.
I don't believe so.
There is some semantic info in MediaWiki already, such as lastmod,
viewcount, creator, and contributors. MediaWiki can even export some of
this as RDF with action=creativecommons (e.g.
, note many wikis disable this feature). But SMW can't query or display
it because it's not maintained in the smw_* database tables.
You could imagine SMW having the smarts to query for such special bits
of information, maybe using reserved words or a prefix. But note this
MediaWiki information is not information about the page's subject, but
meta-information about the page. The creator, datecreated and lastmod
of the wiki page about "King Lear" are not going to be "William
Shakespeare", "1603", and "1606". So if you were to modify MediaWiki to
update the smw_* database tables with meta-information about each page
edit, it doesn't strictly make sense.
Although MediaWiki provides its page meta-information in various places,
it doesn't make it easy to get. I'm not sure you can even reliably get
the initial page creation date from MediaWiki. I think the closest you
can get at the database level is the revision.rev_timestamp of the
earliest rev_id in the revision table where revision.rev_page =
page.page_id. Special:Recentchanges relies on a separate recentchanges
table that mediawiki maintains, and the lastmod displayed at the bottom
of a page is the revision.rev_timestamp; there's also a
page.page_touched which I think is updated on any change.