User talk:Phlip

From TheKolWiki
Jump to: navigation, search

Ah, nice change. I'd mostly copy-pasted the table from "Moons" and added some columns. I thought about converting it to wiki format, but it was giving me a headache when I went to go change it. I didn't think of changing it to have the after section underneath the before-- good idea. --LucySpace 00:27, 8 June 2006 (CDT)

Oh, and I was mostly getting a headache from trying to figure out how to set the width of the Moons column so that it looks right regardless of where we put the minimoon. It's a bit squashed right now. --LucySpace 00:29, 8 June 2006 (CDT)

Yeah, the spacer you put in still doesn't fix the problem of Ronald being directly above Grimace in the table. Good idea, though. --LucySpace 01:52, 8 June 2006 (CDT)

Above? Hmm... maybe on lower resolutions... That's why I made the table narrower in the first place, for the low-res screens... I added a fixed column width to the moons... it's fine down to about 1024x768 for me now. 800x600 only just works, and only because I've got greasemonkey stuff that increases the width of the content pane... I doubt there's any more I can do. Phlip 02:00, 8 June 2006 (CDT)

Hi, I messed with the moon table, regularizing the spacing -- now there is a minimoonspacer or minimoon in every spot; I also added predictions based on the theories you and others were describing. I think we should have done the old/predicted values with separate rows and colspan="2" on the date cells, but I don't have the energy to fix now; maybe later. --DirkDiggler 02:34, 8 June 2006 (CDT)

Yeah, it might be because my screen is low-res, 800x600. I changed "Lightness" to "Light" and it seemed to fix it automatically for my resolution. I hope people still get the meaning behind the column name even when it's abbrev'd. :) --LucySpace 04:41, 8 June 2006 (CDT)

Hi Phlip, the minimoon is dark today in an unexpected way. Can we add a "light/dark" parameter to the moons template until we are sure that the minimoon predictions hold up? --DirkDiggler 23:45, 10 June 2006 (CDT)

Done. Phlip 23:46, 10 June 2006 (CDT)

ParserFunctions and Template:Item

I noticed you updated the new Item template to use #if/#ifeq, but this has had the side effect of breaking the 'autosell' behavior for items such as the worthless trinket/knick-knack/gewgaw. See the template talk for more info. --Quietust 10:56, 22 June 2006 (CDT)


I am trying to update Tard's framework script to include the new pattern of the moons and I have run out of good ideas for generating the list. Since I can't think of anything else, I was planning on creating a page in the wiki that generated the next 7 days of moon behavior in easy parsable format. My only question is, will this lag the server as much as the moonrow concept did?--SomeStranger (t|c) 08:24, 21 July 2006 (CDT)

I tried a bunch of different ways of making the moonrow templates, and all of them lagged up something chronic... MediaWiki just isn't designed to cope with that kind of procedural algorithm. Couldn't you just write the moons code in Javascript and throw it in the GM script itself? I don't know that much about how Tard's framework works... the NO calendar has something which you might be able to just copy and paste, with a few tweaks (look in this file, scroll down to show_detail())... Phlip 08:36, 21 July 2006 (CDT)
I was trying to avoid sticking the moon part into the actual script as it will almost double the size of the script for such a small feature. I will see about converting the NO calendar script, thanks for the tip!--SomeStranger (t|c) 09:11, 21 July 2006 (CDT)
One more question. The entire script seems to run off of a js file (calendar_day.js) which seems to automatically be generated. Do you know if it is possible to simply insert that script into a page with greasemonkey, or do I have to parse it for the information?--SomeStranger (t|c) 23:45, 27 July 2006 (CDT)
Nevermind, I found an absurdly easy way to make it work without me doing anything. Thanks for the help you would have given if I had allowed you a chance to respond =).--SomeStranger (t|c) 23:48, 27 July 2006 (CDT)
It appears I need your assistance once again...Do the to way that the NO calendar is set up I need to determine the time passed since a certain date, much like what you accomplished with the moonrow/today template, except in javascript and corresponding to the 28th of June. I have managed to convert all but the last line of the code (I have no grasp of what the "mod" functions combined with "and" and "or" do. And in the end, I am not really sure how to change the date that it seeks. Thanks again. --SomeStranger (t|c) 11:08, 1 August 2006 (CDT)
var d = currenday;
var m = currentmonth;
var y = currentyear;
var daysin = [[0],[31],[59],[90],[120],[151],[181],[212],[243],[273],[304],[334]];
var days = d + daysin[m] + (y - 2000) * 365 + Math.round(((y - 2002) / 4)) - ((y mod 4 = 0) and ((m = 01) or (m = 02))) - 2342;
  • I'm not sure what is the context, nor did I even look at the template code, but I think you're shooting for:
var d = currentday;
var m = currentmonth;
var y = currentyear;
var daysin = [0,31,59,90,120,151,181,212,243,273,304,334];
var days = d + daysin[m] + (y - 2000) * 365 + Math.round(((y - 2002) / 4)) - ((y % 4 == 0) & ((m == 1) | (m == 2))) - 2342;

--Dehstil (t|c) 18:47, 1 August 2006 (CDT)

Well, those should be && and ||, but otherwise, that should be right. However, this is a little easier:
var days = d + daysin[m] + (y - 2000) * 365 + Math.floor((y - 2000) / 4) - 2342;
if ((y % 4 == 0) && (m <= 2))

I only did it the other way in the template because you can't say "do this, then do that" in the template, it all had to be one expression. Also, mediawiki doesn't have a "floor", just a "round". Phlip 20:01, 1 August 2006 (CDT)

Or, even easier, get Javascript to do it for you:
var now = new Date(y,m,d);
var then = new Date(2006,5,1); // for some stupid reason, month is 0-11, but day is 1-31 - so this is June 1st, 2006
var days = Math.round((now - then) / 86400000); // 86,400,000 milliseconds in a day

Should solve all your problems, and you can easily change the epoch to whenever you want. Just make sure that y, m and d are in the right scales... 1-based for the day, and 0-based for the month. Phlip 20:06, 1 August 2006 (CDT)

  • Oops, double response over at User talk:SomeStranger. Did you take into account the difference in time zone etc from kol rollover to 12:00 in whatever time zone it does or does it not matter? *fumbles about confusedly*--Dehstil (t|c) 20:46, 1 August 2006 (CDT)
    • It doesn't really matter for my purposes. This was just to offset the weird system that Noblesse Oblige uses on their calendar. I had no, and still have no grasp of how the moons function so I had to copy their code and convert it for my purposes. This was just a pathetic patching mechanism to get it to display what I wanted since they made theirs to display 42 items and month division while mine only shows the next 14 days in the future. I plan to go back and fully convert it later, but right now I am tired as heck and just plain not in the mood. (If you looked at Tard's scripts you would see what I mean)--SomeStranger (t|c) 22:14, 1 August 2006 (CDT)

Adding categories to templates

Just to let you know, adding a category tag to a template does not automatically recategorize pages which include the template - in order to do so, every page which includes the template must have some sort of edit performed. See this article for more information. --Quietust 11:51, 21 July 2006 (CDT)

That was fixed in MediaWiki 1.6... the documentation just isn't up to date. Phlip 11:57, 21 July 2006 (CDT)
I just found out what was changed to fix it - it also explains something I noticed, that the category takes a while to fill up and empty again... after changing a template used by 1700 item pages, it'll take 1700 page views (of any page, by any user) before the category is up-to-date... Phlip 19:50, 24 July 2006 (CDT)

Louvre Map

Great job on the Louvre Map. Cheers! --Gymnosophist 07:23, 21 September 2006 (CDT)

Well, you've been here only once in the past year and a half, but in case you still check in once in a while... great job on the map. Quite a help. Rosstafari 14:49, 5 May 2008 (CDT)

Moon Updating Script

Sooo, any chance you might share your script for updating the Full Moon Data page in the off chance that you are not around when we need to update it :)?--SomeStranger (t|c) 20:28, 2 November 2006 (CST)

Sure thing. Phlip 12:20, 3 November 2006 (CST)

Proposed Changes to Recipe article

I noticed you have been a contributor to Recipe. I've proposed some fundamental changes on how it's connected in the wiki and would like to invite you to discuss them on Talk:Recipe.
Thanks! ColtsScore 16:55, 16 November 2007 (CST)