https://the-legendary-tales-of-among-us.fandom.com/wiki/MediaWiki:ProfileTags
https://the-legendary-tales-of-among-us.fandom.com/wiki/MediaWiki:Common.css
It works on these below that I've done/edited/studied, why not that wiki....
https://the-legendary-tales-of-among-us.fandom.com/wiki/MediaWiki:ProfileTags
https://the-legendary-tales-of-among-us.fandom.com/wiki/MediaWiki:Common.css
It works on these below that I've done/edited/studied, why not that wiki....
Looks like it's working great!
But you sure it will switch to a new one every day ?
As we said before, there is no way to force it to update other than purging both the page cache and the DPL cache. However, the wikitext that HumansCanWinElves suggested should set the DPL cache period appropriately to allow it to refresh the next time the page is purged the following day. Purging the page happens periodically and users can forcefully purge the page if need be.
Edit: Just to make sure, did you want it to change every day or every other day? Every day would be 24 hours and every other day would be 48 hours.
Oh i did mean every 24 hours (technically 23 hours and 56 minutes or whatever it is).
It's just when setting up and trying the code, they kept on switching within a short time. At first i thought it was cuz I published a new change or reloaded idk
Please give a link to the page where you tried it.
(nevermind this reply)
https://amonguslogic.fandom.com/wiki/Template:Image_Of_The_Day
Or
{{NavigationFrame
| align = center
|title=Image Of The Day!
| info =
{{#dpl:
| category = Featured Image
| cacheperiod = {{#expr: 86400 + {{#time: U | 00:00}} - {{#time: U}}}}
| randomcount = 1
| format = ,[[File:%TITLE%|700x700px]],,
}}
<br>''Every day, an image out of [[:Category:Featured Image|this category]] will be randomly picked.<br>Put some good images in too!''}}
Yes, it seems that each purge causes it to re-pick an image. The possible reasons I can think of are either that the random selection isn't subject to caching or that when the cache period is different than the previous one DPL clears the cache.
This would have leave us out of luck since the trick with the cache period didn't work. However, when looking for more information on the documentation of DPL, I have found that there is a documented method to achieve the daily selection:
{{#dpl:
| category = Featured Image
| randomcount = 1
| randomseed = {{#time:Ymd}}
| format = ,[[File:%TITLE%|700x700px]],,
}}
Hmm ok.
It still seems every time I leave editing mode on just the template page (even when making no edits), it switches to a new one (at least most times when reload). But a page like the Main one that holds that template doesn't change that fast
It's weird, same seed should give the same result. I will see if I have an idea of what's going on.
The random seed just determines the starting point in the pseudo-random number sequence. Since the random seed is the same for a give 24 hours period, the selected image should change if the cache is purged before the 24 hours are over. The fact that it is always changing implies that the cache isn't being used. Just to be sure we are doing everything we can, try setting allowcachedresults=true. Also, after looking at the syntax for #time, I think this would be a simpler way to achieve the input for cacheperiod.
{{#expr: {{#time: U | tomorrow}} - {{#time: U}}}}
What do you think?