WikiIndex talk:DPL test page: Difference between revisions
Andy Roberts (talk | contribs) (reply about Totals) |
Hoof Hearted (talk | contribs) m (Hoof Hearted moved page WikiIndex talk:DPL Test Page to WikiIndex talk:DPL test page without leaving a redirect: Text replacement - "DPL Test Page" to "DPL test page") |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 36: | Line 36: | ||
This is just a hint, hope it helps. If you think of something else... | This is just a hint, hope it helps. If you think of something else... | ||
Use the talk page (see link above). | Use the talk page (see link above). | ||
:: Yes, I saw that and I added a more direct request to his list. I'll give his suggestions a try as soon as I have a bit of time to work with it. [[User:John Stanton|John]] 15:05, 15 September 2006 (EDT) |
Latest revision as of 17:52, 11 January 2023
Thanks to Ted Ernst for pointing me to this extension and test page after reading my blog post. Now I'd like to see if it's possible to produce totals instead/as well as lists. --Andy 04:37, 12 September 2006 (EDT)
Totals[edit]
I asked about totals on the medeiwiki-l list and received this reply from Cyril Dangerville
Hello,
this feature has already been requested (more or less):
http://meta.wikimedia.org/wiki/Talk:DynamicPageList2#mode.3Dcount
If you want to add something and get some help, this is the place to go.
I am still working on other features that have been requested a long time ago (but when a patch is submitted with a request, I try to make it a priority).
Meanwhile, I can give you some help if you want to look at the code. To get counts, I can see at least 2 ways. The changes mentioned here concern DynamicPageList2 v0.6.4: 1) (Depending on DPL2 parameters to be specified, like 'mode=count') change the SQL query line 592 and use something like SELECT count(page_title) blabla instead. This would keep the SQL to a minimum, good for performance. Then get the counts with "$dbr->numRows( $res )" like at l. 682. 2) Quick easy solution: just use the "$dbr->numRows( $res )" like at l. 682, no matter what the query was. ( If you don't want to mess with it.)
Last, be careful with the ordermethod you are using. With multi-param ordermethod, you may get the same page more than once. For instance, with 'ordermethod=category,title', if a page on your wiki links to 10 categories, you'll have 10 occurrences of the page in the result. You may not want to count them as much. This is not the case for simple ordermethods (firstedit, lastedit, title...)
This is just a hint, hope it helps. If you think of something else... Use the talk page (see link above).
- Yes, I saw that and I added a more direct request to his list. I'll give his suggestions a try as soon as I have a bit of time to work with it. John 15:05, 15 September 2006 (EDT)