https://bugzilla.wikimedia.org/show_bug.cgi?id=57595
Web browser: ---
Bug ID: 57595
Summary: Add filter to DynamicPageLists for page_title (prefix)
Product: MediaWiki extensions
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: DynamicPageList
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Mobile Platform: ---
DPL would be substantially more useful for me if I could filter the list with a
title prefix in order to select for "subpages".
For example, if I'm working on page "Foo" and talking on page "Talk:Foo", it's
nice to archive discussions at "Talk:Foo/Archive/<Month, Year>". I'd like to
automatically list these archives on the talk page using a call that looks
like:
<DynamicPageList>
namespace = Talk
titleprefix = Foo/Archive/
ordermethod = created
count = 10
shownamespace = false
showprefix = false
mode = unordered
suppresserrors = true
</DynamicPageList>
...which would output something like:
* [[Talk:Foo/Archive/September, 2013|September, 2013]]
* [[Talk:Foo/Archive/October, 2013|October, 2013]]
FWIW, I have several other use-cases in mind, but I thought that the one above
was the most universal.
------
The filter I am requesting should be efficient since the underlying query is
probably using the "name_title" index on "page" in order to filter by namespace
already.
> EXPLAIN SELECT page_title FROM page WHERE page_namespace=1 AND page_title
> LIKE "Foo/Archive/%";
+------+-------------+-------+-------+---------------+------------+---------+------+------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len |
ref | rows | Extra |
+------+-------------+-------+-------+---------------+------------+---------+------+------+--------------------------+
| 1 | SIMPLE | page | range | name_title | name_title | 261 |
NULL | 1 | Using where; Using index |
+------+-------------+-------+-------+---------------+------------+---------+------+------+--------------------------+
1 row in set (0.05 sec)
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l