🇮🇷 Iran Proxy | https://www.wikipedia.org/wiki/Module_talk:Database_reports/Hot_articles
Jump to content

Module talk:Database reports/Hot articles

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Article and days limits

[edit]

Hi, out of curiosity, is there a technical reason behind the parameter limits, specifically the 5-10 article limit and 1-7 days limit? Or are these completely arbitrary limits that could be increased? Thank you! Ganmatthew (talkcontribs) 09:11, 24 September 2025 (UTC)[reply]

They are same as the limits imposed in HotArticleBot. They can be increased. The only hard restriction is that the db query should take less than 10 minutes. – SD0001 (talk) 10:54, 24 September 2025 (UTC)[reply]
Ah I see. For the article limit, does setting it to 15 or 20 come close or exceed 10 minutes when used on the big WikiProjects? Maybe increased limits could be allowed based on the article count of the WikiProject or category? Ganmatthew (talkcontribs) 14:17, 25 September 2025 (UTC)[reply]
I don't think it would, but I haven't checked. The bot anyway applies the 10-minute timeout so I think there's not much point to having the limits on articles and days, except a nicer error message than the one for query timeout. I have just relaxed the days limit to 30 and removed it entirely for articles. – SD0001 (talk) 14:53, 25 September 2025 (UTC)[reply]
Alright nice. Thanks! Ganmatthew (talkcontribs) 15:12, 25 September 2025 (UTC)[reply]

Table row numbers

[edit]

Hi, I realized having row numbers would be beneficial for the table reports and I noticed that the SQL query used by the module already has a Row parameter that returns the row/index number, so I went ahead and added commented-out changes to both the header and row template to make them visible in the tables.

But when it came to this module and the Database report template, I couldn't figure out a straightforward way to pass an optional parameter from the report template to both the header and row templates to determine whether to show row numbers, or maybe I'm just not familiar with how it could be done.

Is there a way to have some kind of parameter like `rownumber = yes` that could be read by the header and row templates? Thanks! Ganmatthew (talkcontribs) 09:58, 7 October 2025 (UTC)[reply]

There's currently no straightforward way to do that (one of the reasons I had to make Module:Database reports/Hot articles by category altogether separate).
Instead of using Row parameter, you could use {{static row numbers}}, so that header and row templates don't need to be modified. See bullet 3 of Template:Database report#SQL formatting tips – it suggests making it a header template, but as another header template is already used here, you can put it in report:setHeadContent() instead. – SD0001 (talk) 18:26, 7 October 2025 (UTC)[reply]
That helps. I'll also go and revert the changes to the header and row templates. Thanks! Ganmatthew (talkcontribs) 09:12, 8 October 2025 (UTC)[reply]