Template talk:CURRENTMINUTE: Difference between revisions

From The Urban Dead Wiki
Jump to navigationJump to search
No edit summary
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Darn. Was just trying to do the same thing and was stumbling over this one just as I was about to enter my own template. (And I had searched the template-space for "minute"...) --{{User:Spiderzed/Sandbox/Sig}} 01:04, 13 January 2011 (UTC)
Darn. Was just trying to do the same thing and was stumbling over this one just as I was about to enter my own template. (And I had searched the template-space for "minute"...) --{{User:Spiderzed/Sandbox/Sig}} 01:04, 13 January 2011 (UTC)
:want me to delete yours? -- {{User:DanceDanceRevolution/l}} 01:06, 13 January 2011 (UTC)
:want me to delete yours? -- {{User:DanceDanceRevolution/l}} 01:06, 13 January 2011 (UTC)
:Keep both and enter it as a new template. Your version is non-zero padded which could be useful. -[[MHS|<span style="color: Black">'''MHS'''</span>]][[User_Talk:MHSstaff|<span style="color: DarkBlue">'''staff'''</span>]] 02:02, 13 January 2011 (UTC)
::This template might be somewhat flawed. I made it specically for Gabba Gabba and at the time I was using another template I made {{tl|LASTHOUR}}. I think I had to change it due to daylight savings. {{User:Vapor/sig}} 02:21, 13 January 2011 (UTC)
:::Yeah, saw that you took a short-cut. I went the fool-proof way and entered every possible input from 00:00 to 23:59 manually (though with the help of Find&Replace to cut down work). --{{User:Spiderzed/Sandbox/Sig}} 02:27, 13 January 2011 (UTC)
::::All I know is that the original code for this template worked using LASTHOUR instead of CURRENTHOUR and then sometime recently it broke. My thought when I fixed it was that CURRENTTIME did not account for daylight savings. So it is probably worth relacing code with your non-shortcutted version. And like MHS said a non zero padded might be helpful. {{User:Vapor/sig}} 02:33, 13 January 2011 (UTC)
==Update==
Per conversation above, template now uses <nowiki>{{LOCALTIME}}</nowiki> and <nowiki>{{LOCALHOUR}}</nowiki> as template calls to calculate the minute. {{User:Vapor/sig}} 03:49, 13 January 2011 (UTC)
==Size==
Isn't the sheer size of this going to bumfuck most pages it's going to end up used on? Remember that the size of myself and DDR's old image-link sigs killed A/VB on a few occasions and they weren't as big as this. {{User:Misanthropy/Sig}} 04:21, 17 January 2011 (UTC)
:That's why I changed it to fewer template calls. It's used on a few pages already without too any trouble. [[Gabba Gabba]] is the one I'm worried about. What's your opinion on template calls versus extrenuous text? {{User:Vapor/sig}} 04:23, 17 January 2011 (UTC)
::Ok I took measurements of [[Gabba Gabba]] page sizes with both the text version and the template call version. The results seem to lead me to believe that using <nowiki>{{LOCALTIME}}</nowiki> actually saves space over using an all text version.
This result is when this template uses <nowiki>{{LOCALTIME}}</nowiki>
<pre>Pre-expand include size: 10705 bytes
Post-expand include size: 7894 bytes
Template argument size: 2849 bytes
Maximum: 307200 bytes</pre>
And this result uses the longer text version
<pre>Pre-expand include size: 34888 bytes
Post-expand include size: 7774 bytes
Template argument size: 2852 bytes
Maximum: 307200 bytes
</pre>
::I may need someone to look these numbers over, but to me it seems that the template call version saves page size. {{User:Vapor/sig}} 04:39, 17 January 2011 (UTC)
:::I may be wrong but those numbers look exactly the same to me. {{User:Misanthropy/Sig}} 04:45, 17 January 2011 (UTC)
::::Not you, c/p fail on me. {{User:Vapor/sig}} 05:03, 17 January 2011 (UTC)
:::::And [[wikipedia:Wikipedia:Template_limits|this]] shed some light on the subject for me. The pre-expanded include size goes up by 24,00 bytes because that is the difference in the amount of characters per page. The post-expanded is the sum of the lengths of the expanded wikitexts generated by templates, parser functions and variables. I'm not quite sure why there is such a difference since the result of the template is the same. My guess is that Magic Words such as <nowiki>{{LOALTIME}}</nowiki> count as more data in post-expanded. And template argument is practically te same because a switch is being used. When switch is envoked, the use of template arguments beyond a match do not count. Up to and including the matching case, template arguments used on the left of the equals signs count twice. Those on the right of the equals sign count for the matching case only. All and all I don't think this is a huge template in its current state. Sure, if it's used in a signature of a wiki-whore, then it might break some pages. Otherwise, used in moderation it should be fine. {{User:Vapor/sig}} 05:48, 17 January 2011 (UTC)

Latest revision as of 05:48, 17 January 2011

Darn. Was just trying to do the same thing and was stumbling over this one just as I was about to enter my own template. (And I had searched the template-space for "minute"...) -- Spiderzed 01:04, 13 January 2011 (UTC)

want me to delete yours? -- LEMON #1 01:06, 13 January 2011 (UTC)
Keep both and enter it as a new template. Your version is non-zero padded which could be useful. -MHSstaff 02:02, 13 January 2011 (UTC)
This template might be somewhat flawed. I made it specically for Gabba Gabba and at the time I was using another template I made {{LASTHOUR}}. I think I had to change it due to daylight savings. ~Vsig.png 02:21, 13 January 2011 (UTC)
Yeah, saw that you took a short-cut. I went the fool-proof way and entered every possible input from 00:00 to 23:59 manually (though with the help of Find&Replace to cut down work). -- Spiderzed 02:27, 13 January 2011 (UTC)
All I know is that the original code for this template worked using LASTHOUR instead of CURRENTHOUR and then sometime recently it broke. My thought when I fixed it was that CURRENTTIME did not account for daylight savings. So it is probably worth relacing code with your non-shortcutted version. And like MHS said a non zero padded might be helpful. ~Vsig.png 02:33, 13 January 2011 (UTC)

Update

Per conversation above, template now uses {{LOCALTIME}} and {{LOCALHOUR}} as template calls to calculate the minute. ~Vsig.png 03:49, 13 January 2011 (UTC)

Size

Isn't the sheer size of this going to bumfuck most pages it's going to end up used on? Remember that the size of myself and DDR's old image-link sigs killed A/VB on a few occasions and they weren't as big as this. For hate's sake I spit my last breath at thee 04:21, 17 January 2011 (UTC)

That's why I changed it to fewer template calls. It's used on a few pages already without too any trouble. Gabba Gabba is the one I'm worried about. What's your opinion on template calls versus extrenuous text? ~Vsig.png 04:23, 17 January 2011 (UTC)
Ok I took measurements of Gabba Gabba page sizes with both the text version and the template call version. The results seem to lead me to believe that using {{LOCALTIME}} actually saves space over using an all text version.

This result is when this template uses {{LOCALTIME}}

Pre-expand include size: 10705 bytes
Post-expand include size: 7894 bytes
Template argument size: 2849 bytes
Maximum: 307200 bytes

And this result uses the longer text version

Pre-expand include size: 34888 bytes
Post-expand include size: 7774 bytes
Template argument size: 2852 bytes
Maximum: 307200 bytes
I may need someone to look these numbers over, but to me it seems that the template call version saves page size. ~Vsig.png 04:39, 17 January 2011 (UTC)
I may be wrong but those numbers look exactly the same to me. For hate's sake I spit my last breath at thee 04:45, 17 January 2011 (UTC)
Not you, c/p fail on me. ~Vsig.png 05:03, 17 January 2011 (UTC)
And this shed some light on the subject for me. The pre-expanded include size goes up by 24,00 bytes because that is the difference in the amount of characters per page. The post-expanded is the sum of the lengths of the expanded wikitexts generated by templates, parser functions and variables. I'm not quite sure why there is such a difference since the result of the template is the same. My guess is that Magic Words such as {{LOALTIME}} count as more data in post-expanded. And template argument is practically te same because a switch is being used. When switch is envoked, the use of template arguments beyond a match do not count. Up to and including the matching case, template arguments used on the left of the equals signs count twice. Those on the right of the equals sign count for the matching case only. All and all I don't think this is a huge template in its current state. Sure, if it's used in a signature of a wiki-whore, then it might break some pages. Otherwise, used in moderation it should be fine. ~Vsig.png 05:48, 17 January 2011 (UTC)