User talk:Skizzerz/LQT Archive 1

Please put new messages at the bottom by clicking either the + tab on top or [ click here]. If you leave a message here, I will respond here (unless you state that I should answer on your talk page).

OMG!!! RightFunctions!
I realize my section heading is AOL-speak, but in this case I think it's justified (I almost never use IM langauge). Imagine my surprise when, just when I was trying (and failing) to write my own extension to return the current protection level of a page, I discovered yours (RightFunctions) in a search for "getrestrictions"! What joy! And you just added it a few days ago. Congratulations on the extension, by the way; it's doing exactly what I need it to do so far. Thanks for making it and saving me from hours of writing and debugging! — Tuvok[Talk/en.wp] 19:32, 25 December 2007 (UTC)
 * You're welcome, and glad you enjoy it ^_^. I'm planning on making getrestrictions and ifprotected much more powerful in 1.4, so that'll come by in a few days (hopefully). And if you have any suggestions, feel free to let me know :) --Skizzerz talk 00:40, 26 December 2007 (UTC)
 * Actually, I just came here after cascade-protecting something and noticing that it didn't get tagged as protected. Is cascade-protection detection (I know, ouch) planned? I see you're using  in the code; perhaps that's a problem with MediaWiki's function that should be put in Bugzilla (if it's not there already)? That's the only bug missing feature I've seen so far (with the extension; my ParserFunctions chops have also needed work :P). I'll be watching the extension page for updates; cheers! — Tuvok[Talk/en.wp] 02:25, 27 December 2007 (UTC)
 * Ok, should work now. --Skizzerz talk 04:12, 27 December 2007 (UTC)
 * Well, I haven't tested the cascade detection yet, but it no longer works on pages I've explicitly protected. Every protected page I put the template on now displays my "not protected" icon (if you want my template source, just ask). I've gone back to 1.3. It's probably just a code flow issue. I'll look at the extension's code in a bit, after breakfast. Glad to see you're working on development, though. :) — Tuvok[Talk/en.wp] 13:57, 27 December 2007 (UTC)


 * So, I've been messing with it, and it's returning the value of what I put after the colon (e.g. for, "edit"; for  , "move"), and if I leave it blank, it returns an empty. But only in version 1.4; 1.3 returns "sysop", "bureaucrat", or "", depending on if the page is protected (sysop level or bureaucrat level) or not. — Tuvok[Talk/en.wp] 15:22, 27 December 2007 (UTC)
 * Yeah, I've been experiencing that too in my tests, and I wasn't sure what was going on with that. I'll do some major debugging of that now. --Skizzerz talk 15:24, 27 December 2007 (UTC)


 * It's kind of frustrating that it's doing that, not because it doesn't work, but because I don't see what's changed that should be causing that. I tried changing the array value you have for  to a string, but that just broke it more. I'm not sure I understand the point of  ming stuff, though. But then again, I'm not super familiar with MediaWiki's API... I've been trying to help, though. I'll have to delve into some of the docs later today. — Tuvok[Talk/en.wp] 15:32, 27 December 2007 (UTC)

I've fixed it, try it now (I didn't realize that getRestrictions sometimes returned an array, so I had to check for that and extract the value of it if it did, which is why it was breaking). --Skizzerz talk 15:56, 27 December 2007 (UTC)


 * Looks good so far! Man, that cascade detection is cool, but boy does it make template programming complicated. :P I'm going to have to think about how to update my template for that...


 * Actually, how hard would it be for you to implement another function to return just the level? This business of adding parenthetical clauses gets really complicated, really fast, and the template won't switch properly if the switch cases have spaces in them. I'm just speaking from the point of view of a template developer, here. Also, perhaps at some point you'll I18n the extension?


 * I know, I'm just piling it on. :D Sorry if you feel overwhelmed. :) — Tuvok[Talk/en.wp] 16:37, 27 December 2007 (UTC)
 * Yeah, I'll add in a toggle for how the thing should be returned... check back in about half an hour or so for that. As for internationalisation... that's on hold for 2.0 when things REALLY turn complicated (plus, I'll need someone to help translate, I can do de i18n, but that's about it). --Skizzerz talk 16:49, 27 December 2007 (UTC)
 * Done, it now returns the highest-level restriction among all sources (local and cascading) by default, but you can toggle it back to the list of all restrictions by setting the third parameter. --Skizzerz talk 17:25, 27 December 2007 (UTC)
 * Deary me, I was gone for the day and I come back to find all this! Thanks! Will it still return whether the page is cascade or local? Ideally, I'd like to display different messages depending on whether the protection is local or via cascade. Perhaps that should be its own function, though.


 * Also, on a side note, I was having issues with category links (bug 12420), and I just got a response from Brion Vibber. He says, "Looks like your extension is using ... that's bad mojo, as I believe $wgTitle may belong to someone else during background updates. You should instead pull the current title from the parser, eg  ." I dunno if it'll solve the bug I've been having, but perhaps you could change the code to use the parser's title for the next release? I tweaked the one line after , but it didn't seem to work. Perhaps you'll have better luck. — Tuvok[Talk/en.wp] 01:43, 28 December 2007 (UTC)
 * You can use to check if it's cascading protected or not (returns true if it is, false if it isn't). As for the title bug, I'll fix that tomorrow. I gotta get some sleep now :) --Skizzerz talk 02:53, 28 December 2007 (UTC)


 * Ha ha! Developers, sleep? I don't. :P


 * Seriously, though, I'll have to look into that other function. I actually forgot that there were other protection-related functions in your extension. :D Really! Thanks for all the help, and the constant communication. Let me know how the title thing goes. 'Night! — Tuvok[Talk/en.wp] 03:06, 28 December 2007 (UTC)


 * Woo! My bug is gone in 1.7. Thanks for fixing that; I'll go mark it RESOLVED INVALID. Now the only question is, why didn't it work when I tried to fix it? Maybe I need to study a little more MediaWiki... — Tuvok[Talk/en.wp] 15:10, 28 December 2007 (UTC)


 * Did you change ALL instances of $wgTitle to $parser->getTitle? If not, then the else clause is probably what messed you up. --Skizzerz talk 15:12, 28 December 2007 (UTC)