User talk:Aichon: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
Line 187: Line 187:
:::As for the code, without actually looking into it enough to tell if it's a viable idea, the way I'd do this would be to create a switch with 6977 cases, one for each current stub location, then use the PAGESINCATEGORY magic word to select the one that corresponds to how many pages are in the category. As that category is removed from the pages, the PAGESINCATEGORY magic word will decrease, effectively acting as a countdown for the list, rather than randomly cycling through the items. You could then bump any of the more important locations towards the bottom of the list, where they will get serviced more quickly, and leave the less important ones near the top, where they may never be reached. {{User:Aichon/Signature}} 04:33, 24 November 2012 (UTC)
:::As for the code, without actually looking into it enough to tell if it's a viable idea, the way I'd do this would be to create a switch with 6977 cases, one for each current stub location, then use the PAGESINCATEGORY magic word to select the one that corresponds to how many pages are in the category. As that category is removed from the pages, the PAGESINCATEGORY magic word will decrease, effectively acting as a countdown for the list, rather than randomly cycling through the items. You could then bump any of the more important locations towards the bottom of the list, where they will get serviced more quickly, and leave the less important ones near the top, where they may never be reached. {{User:Aichon/Signature}} 04:33, 24 November 2012 (UTC)
::::With the problem being that I'd have to create a list of about 7.000 items and the whole thing would lose the cycling effect. I already considered it, but the reason I want to cycle through them as frequent as possible to avoid seeing the same one over and over again. Then again, I'm pretty sure I could make it cycle I think, using a new switch function inside the first one (but still: 7.000 item list). {{User:Peralta/Signature}} 04:44, 24 November 2012 (UTC)
::::With the problem being that I'd have to create a list of about 7.000 items and the whole thing would lose the cycling effect. I already considered it, but the reason I want to cycle through them as frequent as possible to avoid seeing the same one over and over again. Then again, I'm pretty sure I could make it cycle I think, using a new switch function inside the first one (but still: 7.000 item list). {{User:Peralta/Signature}} 04:44, 24 November 2012 (UTC)
:::::Well, the list already exists. you'd just have to grab it 200 items at a time from the category page. And if people are actually updating things, then the location should cycle pretty often. Anyway, I think you could just copy/paste the list 200 items at a time into Excel in column A, then do <code>=CONCATENATE("case ",ROW(A1),": ",A1)</code> in column B to produce the text that you'd copy/paste directly into your switch template (just tested copying several items in column B and pasting into the wiki editor: it works as expected). Shouldn't take more than about an hour or so, I'd imagine. {{User:Aichon/Signature}} 05:33, 24 November 2012 (UTC)

Revision as of 05:33, 24 November 2012

Aichon:Talk
Aichon
ˈīˌkän :Talk