Template talk:Random portal component
From Wikipedia, the free encyclopedia
Contents |
[edit] Max?
Must the "max" variable be included? - Tim1965 02:42, 9 May 2007 (UTC)
- The computer needs to pick a random integer from 1 to max. The computer wouldn't know what to do if max is unknown.
[edit] Seed?
What does the "seed" variable actually do? I'm hoping it creates a faux-randomization (e.g., if "seed=3", then the portal will feature every third sub-sub-page).- Tim1965 02:42, 9 May 2007 (UTC)
- It's not how it works. See pseudorandomness, random seed, and pseudorandom number generator. I don't understand them myself. You only need to worry about it when there are two or more components in your portal with the same number of subpages. In this case, just specify different seed numbers for the components. Regardless, each and all subpages have equal chance. --ChoChoPK (球球PK) (talk | contrib) 08:20, 9 May 2007 (UTC)
[edit] Description
How about a description of what this template actually does? Samuel Grant 17:08, 7 August 2007 (UTC)
- Done. --ChoChoPK (球球PK) (talk | contrib) 08:49, 13 August 2007 (UTC)
- Thanks! Samuel Grant 15:57, 13 August 2007 (UTC)
[edit] Max max?
Is there a maximum number for the max value? Can the random component randomize and cycle through, say, 100 or more entries? Cirt (talk) 20:48, 6 December 2007 (UTC).
- As far as I know, there's no maximum. I'm not aware of anyone that's used a hundred entries; but, for example, Portal:War uses 60 with no problems. Kirill 02:37, 7 December 2007 (UTC)
[edit] Portal:Philately
I am trying this out on "Stamp of the month" section of the Portal:Philately, for which I will soon have 12 articles setup (currently 9 are done) but have no idea who often the randomisation changes the article. I understand the article choice is made randomly but what is the delay between changes? Maybe it is determined by the number of articles to choose from, I just don't know. Thanks ww2censor (talk) 15:14, 31 December 2007 (UTC)
- The selection is refreshed every time the page cache is cleared on the server, which is entirely random and unpredictable. Kirill 17:05, 31 December 2007 (UTC)
- Thanks Kirill. You must be the portal answer guy. Cheers ww2censor (talk) 17:20, 31 December 2007 (UTC)
- Kirill I know you said the refresh is entirely random but have you any idea when it might refresh as I have ben watching my new section now for about 2 weeks but see no action. Do I just need more patience? ww2censor (talk) 20:59, 8 January 2008 (UTC)
- I changed the max setting. It should be the same number as you have in the archive. I would also suggest using a <div style="text-align:center; margin:-7px; padding-bottom:12px;">{{purge|'''Show new selections'''}} </div> button for easier refreashing, otherwise the purge server cache button is used for that. Joe I 05:23, 9 January 2008 (UTC)
- Sorry for the stupid questions but, do you mean the number should be equal to the number of articles available to be randomly changed? Did you set the number to 4 because I did not yet have a full complement of 12 sub-pages but when I have filled in 5, 6 & 7, I could change the number to 12? After your edit I noticed that at first #3 article showed up but when I refreshed the portal main page #2 was displayed. Concerning the purge, do you mean that piece of code should be included in every individual archive page or on the main page? TIA Cheers ww2censor (talk) 05:35, 9 January 2008 (UTC)
- I'll answer your questions in order:
- do you mean the number should be equal to the number of articles available to be randomly changed? Did you set the number to 4 because I did not yet have a full complement of 12 sub-pages — Yes, the max number should be set to the maximum number of subpages ready to be shown. Since subpages 5, 6, and 7 weren't created yet, Joe I didn't set the max to 12, or something like Portal:Philately/Stamp of the month archive/5, for example, would show up on the main page.
- when I have filled in 5, 6 & 7, I could change the number to 12? — Yes.
- After your edit I noticed that at first #3 article showed up but when I refreshed the portal main page #2 was displayed. — That's the beauty of randomness.
:) - Concerning the purge, do you mean that piece of code should be included in every individual archive page or on the main page? — Just on the main page. For an example, see the featured Numismatics Portal.
- Happy editing, [sd] 03:44, 10 January 2008 (UTC)
- I'll answer your questions in order:
- Sorry for the stupid questions but, do you mean the number should be equal to the number of articles available to be randomly changed? Did you set the number to 4 because I did not yet have a full complement of 12 sub-pages but when I have filled in 5, 6 & 7, I could change the number to 12? After your edit I noticed that at first #3 article showed up but when I refreshed the portal main page #2 was displayed. Concerning the purge, do you mean that piece of code should be included in every individual archive page or on the main page? TIA Cheers ww2censor (talk) 05:35, 9 January 2008 (UTC)
- I changed the max setting. It should be the same number as you have in the archive. I would also suggest using a <div style="text-align:center; margin:-7px; padding-bottom:12px;">{{purge|'''Show new selections'''}} </div> button for easier refreashing, otherwise the purge server cache button is used for that. Joe I 05:23, 9 January 2008 (UTC)
- Kirill I know you said the refresh is entirely random but have you any idea when it might refresh as I have ben watching my new section now for about 2 weeks but see no action. Do I just need more patience? ww2censor (talk) 20:59, 8 January 2008 (UTC)
- Thanks Kirill. You must be the portal answer guy. Cheers ww2censor (talk) 17:20, 31 December 2007 (UTC)
(deindent) Thanks for the really clear and precise answers. Both sections are working now and I will add another random biographical section later on. Thanks again SD. Cheers ww2censor (talk) 15:13, 10 January 2008 (UTC)

