Last modified: 2010-01-07 19:42:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T23963, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21963 - Patch that fixes multiple bugs for DynamicPageList (intersection)
Patch that fixes multiple bugs for DynamicPageList (intersection)
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
DynamicPageList (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-29 09:09 UTC by Bawolff (Brian Wolff)
Modified: 2010-01-07 19:42 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch that fixes several bugs, and adds a couple new features (65.34 KB, patch)
2009-12-29 09:09 UTC, Bawolff (Brian Wolff)
Details
patch with commented debug line removed, and whitespace changes ignored. (63.04 KB, patch)
2009-12-29 09:44 UTC, Bawolff (Brian Wolff)
Details
redo the requested version of patch that has no whitespace changes (apperently i screwed up the last one somehow) (61.51 KB, patch)
2009-12-30 02:27 UTC, Bawolff (Brian Wolff)
Details

Description Bawolff (Brian Wolff) 2009-12-29 09:09:46 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
Comment 1 Bawolff (Brian Wolff) 2009-12-29 09:44:47 UTC
Created attachment 6909 [details]
patch with commented debug line removed, and whitespace changes ignored.
Comment 2 Bawolff (Brian Wolff) 2009-12-30 02:27:05 UTC
Created attachment 6910 [details]
redo the requested version of patch that has no whitespace changes (apperently i screwed up the last one somehow)
Comment 3 Priyanka Dhanda 2010-01-04 19:52:01 UTC
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.
Comment 4 Bawolff (Brian Wolff) 2010-01-05 00:19:33 UTC
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.
Comment 5 Priyanka Dhanda 2010-01-07 19:26:33 UTC
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
Comment 6 Chad H. 2010-01-07 19:37:33 UTC
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
Comment 7 Chad H. 2010-01-07 19:42:20 UTC
Ah, didn't see the checkin already. Marking this FIXED as of r60800.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links