Last modified: 2010-01-07 19:42:20 UTC
Created attachment 6908 [details] Patch that fixes several bugs, and adds a couple new features I've been playing around with DynamicPageList (intersection) recently, and made a number of modifications, fixing several open bugs in the process. This is a patch that does the following: *Modifies some of the code to be (hopefully) more in-line with [[mw:Manual:Coding_conventions]] *Fixes Bug 3082 (you can't have 0 categories, but you can have a notcategory clause with a non-exisistant category which has same effect) (and thus removes message intersection_toofewcats ) *expand addfirstcategorydate parameter to accept a date format string (same as {{#formatdate:}} + dm and md) in addition to true/false ( Bug 17264 and Bug 12787 . Currently some projects accomplish this with js. *Removes showcurid parameter, as it is no longer used, and for all intents and purposes has been replaced with the googlehack parameter *Changes behaviour of qualitypages option. Previously qualitypages=exclude would list pages that were not 'quality' but still 'stable'. I assume this is a bug, and changed qualitypages=exclude to just exclude qualitypages (people can still have stable but not quality using stablepages=exclude parameter) *Integrate patches from Bug 21669 (Gallery + slight change in how it handles gallerycaption parameter to expand things like {{CURRENTYEAR}} to be consistent with other params), Bug 20936 (nofollow) *Expand ordermethod parameter to include the following values: created (aka order by page id, which always increases in a wiki, and thus is equivalent to ordering by creation date), length, sortkey/categorysortkey (which addresses Bug 14971 . currently they do it with js on wikibooks, which seems less then ideal), popularity (if hit counters enabled) **If no category clauses, cause it to use created instead of categoryadd as default (makes no sense to order by a field that would always be null) *Changes the default options for allowing unlimited results from true to false, and increases Max Results from 50 to 200. (allowing unlimited results is often a bad idea. For example on wikinews there is a category with 16071 pages in it. Accidentally forgetting to add count to a DPL querying that category currently results in a page that is quite big and takes a long time to load, which i think is a bad thing). *Add offset parameter (mostly useful for people wanting to create multi-column layouts [that don't require css3]) *parameter values can now contain = signs (probably won't notice a difference. previous versions disregarded any part of a parameter that came after the second = sign) I hope this is useful. Cheers, Bawolff
Created attachment 6909 [details] patch with commented debug line removed, and whitespace changes ignored.
Created attachment 6910 [details] redo the requested version of patch that has no whitespace changes (apperently i screwed up the last one somehow)
Is it possible to display images using the DynamicPageList? So far I only see the article title text which looks a little weird in gallery format.
with this patch try: <DynamicPageList> namespace=image mode=gallery count=5 </DynamicPageList> Any DPL results that are not images will be displayed as a text-only gallery item, which admittedly looks a tad weird, so restricting the namespace to file/image is probably a good idea if using gallery mode.
Ok i did some testing on my local install and checked in Bawolff's fix. Would be nice if someone else could also do some testing in case i missed some scenarios :) -p
I had tested it and given some feedback on IRC a week or so ago. Looks like those changes were added in this latest patch. -need-review +reviewed
Ah, didn't see the checkin already. Marking this FIXED as of r60800.