Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Nao
6631
Off-topic / Re: Doctor Who
« on January 15th, 2012, 10:37 PM »
Watch Night 3 & 4, it's less than 10 minutes. You'll get your answer for the towers of Darilium. Then read through the timeline I posted :)
6632
Features / Re: New revs
« on January 15th, 2012, 10:15 AM »
rev 1258
(258 files, 13kb)

* Updated copyright year to 2012 in file headers.

@ 258 files in rev 1258...? Another funny coincidence ;)
6633
Features / Re: New revs - Public comments
« on January 15th, 2012, 09:54 AM »
I don't know. The error appeared twice in my log in November (early and late), IIRC. It's not THAT important... Let's just put that aside and deal with it if it happens again.
6634
Features / Re: New revs
« on January 15th, 2012, 01:08 AM »
rev 1257
(2 files, 1kb)

! $context['skin_folders'] was filled in incorrectly when caching a replace-type skin. (Subs-Cache.php)

* Forgot to document the 'indent' parameter. (Warm/skin.xml)
6635
Features / Re: New revs - Public comments
« on January 15th, 2012, 12:38 AM »
As mentioned above...?
6636
Features / Re: Selectbox
« on January 15th, 2012, 12:37 AM »
As per my commit I chose to go for inputs. At worst I'll use the replace hack above with a span rather than a button; styling across browsers will be much easier.
6637
Features / Re: New revs
« on January 14th, 2012, 08:01 PM »
rev 1256
(5 files, 4kb)

! Warm was broken in complex pages, due to the indentation code being too heavy, even while using atomic grouping... Bugger. (Subs-Template.php)

* Modified thought editor to use an indexed array for privacy levels. Used the totally arbitrary following numbers: 1 for public, 5 for members, 8 for self. Removed a couple of entries that I have yet to implement in Wedge. (index.template.php, index.language.php)

* Moved all script_in_head code to template_body_after(), it should be cleaner this way. Scripts are now added at the end of the head tag instead of the beginning, which is the recommended position. Decided that IE7 and IE8 aren't fast enough to justify moving script tags either. (index.template.php)

* Commenazi. (QueryString.php)
6638
Features / Re: New revs
« on January 14th, 2012, 07:53 PM »
rev 1255
(9 files -1 +13, 29kb) (mostly icons being moved around.)

* Rewrote input button styling to be more consistent across different browsers. As always, I started with Opera, and I fixed the CSS manually in Firefox 9, IE 8/9/10 (IE8 sucks because it renders text incorrectly), and Chrome 17. Won't bother with the rest. (index.css, index.firefox.css, index.ie*.css, index.webkit.css, other/images/buttons/*, images/buttons/*)

* Spacinazi. (theme.js)
6639
Features / Re: Selectbox
« on January 14th, 2012, 06:34 PM »
(Not a big fan of speaking to myself.... :sob:)

I wrote this NEAT little single-line function built from a couple of stackoverflow inspirations, that turns inputs into buttons.

Code: [Select]
$(function () {
$('input[type=button],input[type=submit],input[type=reset]').each(function () {
$(this).replaceWith($((this.outerHTML || new XMLSerializer().serializeToString(this)).replace(/^<input/, '<button')).html(this.value));
});
});

Inputs are cool, because their HTML is shorter. But:
- They don't accept :before and :after, because it's "semantically" frowned upon as they have no proper 'content'... Bollocks!
- Because of that, I can't add an extra 3D border without resorting to using multiple backgrounds...
- And multiple backgrounds are only supported by IE9+, so bye bye other IEs. Not that it matters much...
- Also, with my recent rewrite to make it, err, cross-browser pixel-perfect (which I still haven't achieved), I need to re-specify my entire list of backgrounds every time. Thankfully, gzip will notice that and limit the catastrophe to just a few lost bytes. Still, it looks ugly in the code... Perhaps also because I'm forced to generate strange CSS variables for IE at the end of the file.

Buttons are cool (except for the extra size) because:
- you can put straight HTML into the contents, duh!
- they accept :before and :after, AFAIK, and anyway it's easier to generate content around them,
- :before and :after are supported in IE7 and IE8,
- so I can add my extra borders to these pseudo-elements, and fix the problems mentioned above...
- and I supposedly can more easily style the entire thing across browsers. However this isn't the case in practice -- I noticed Firefox has the exact same behavior as with inputs. Uh...

So. What do you think is best?
And if <button> is best -- I suppose I should do a site-wide replace, shouldn't I...? Well, easier said than done. I have a feeling that I'll have to do it all manually... 1500+ occurrences and probably many jQuery tests for 'input' tags :-/ And the function above will, as always, give a noticeable delay before it's all transformed.
6640
Features / Re: New revs - Public comments
« on January 14th, 2012, 05:33 PM »
Among other things it's used to re create the current URL... pretty urls etc.
6641
Features / Re: New revs
« on January 14th, 2012, 11:24 AM »
rev 1254
(3 files, 2kb)

! updateOnlineWithError() could be called before $user_info was set, thus generating silent errors. (Errors.php)

! sendmail() could be called before $context['server'] was set, thus generating silent errors. Thank you, copy and paste! (Subs-Post.php)

* Commenazi. (QueryString.php)
6642
Features / Re: New revs - Public comments
« on January 14th, 2012, 11:14 AM »
Looking through my Apache error log... Interesting things to be found, including PHP errors that aren't reported on screen.

I noticed that one: it seems that sometimes, $_SERVER['HTTP_HOST'] isn't even set at all... cleanRequest() relies on this on a couple of occasions (and also once in Errors.php, at least.)
Any idea why this shouldn't be set at all...? And in this case, what could it be replaced with...?
6643
Using my host's DNS for my website, and my provider's for myself... Never cared much about OpenDNS (although I did consider using it, I really never had noticeable problems with my default DNS.)
Never heard of Google Public DNS. I'm not sure I would want them to be aware of EVERY SINGLE of my website requests, though... "Oh, we're only offering this service because we don't know what to do with our gazillion dollars..." Yeah, and I'm the queen of England.[1]
 1. Where is Our favourite British subject?!
6644
Features / Re: Selectbox
« on January 13th, 2012, 09:47 PM »
So... I pretty much have a usable button on Firefox and Opera (Firefox adds an extra pixel to the padding... Whatever, I'll live with that), but in the meantime I played with building my own button code and ended up with this in less than 5 minutes:

Code: [Select]
$(function () {
$('input[type=button],input[type=submit],button').each(function () {
$('<div class="webutton ' + (this.className || '') + '"' + (this.id ? ' id="' + this.id + '"' : '') + '>').data('that', $(this)).html($(this).val()).click(function () { $(this).data('that').click(); }).insertBefore($(this).css('left', '-99999em'));
});
});

It's pretty short... Innit? And it works quite well, and obviously allows for pixel-perfect buttons. Still, with that solution, buttons aren't immediately styled -- they have to wait for a bit to appear, like select boxes do.

Which solution would be best then..?
6645
Plugins / Re: Plugin copyrights in the footer
« on January 13th, 2012, 07:08 PM »
My bad, looks like the plugin section is not on its own column... It used to be, though. We'll have to figure out whether we should 'split' the column each time we reach a certain number of credits in it...
Quote from Lurker on January 13th, 2012, 04:01 PM
But if there's a secondary handler, by definition the handler's the one handling the credits - so what the hook sees/gets/returns is only its own. So the handler would have to do the work of figuring out duplicates.
I can't see how it'd be harder than giving the task to a plugin author... Who's just as likely to fail as we do :P
Quote
Not only that, but it's actually impossible to cleanly add to the list and be reliable. There is no hook in SMF to attach to, so short of some other hack introducing a layer in Who.php, that manipulates $context['copyrights'] as an _above template so that it's applied before the main layer is called, you're reliant on standard editing.
And on conflicts with other mods (just like the footer area is home to so many conflicts...!)
Quote
Oh, and note the fact that it's not indexed by search engines. I'm undecided whether that should change in Wedge - but there is good reason not to.
Hmm, AFAIK, it's the page itself that's not indexed, but they can perfectly well crawl the links and index them, can't they...? It doesn't have rel="nofollow" in them AFAIK...