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
5581
Features / Re: New revs
« on April 6th, 2012, 04:06 PM »
rev 1542
(3 files, 8kb)

* Moved Spellcheck button before the Draft button. (Class-Editor.php)

* Optimized editor code even more. Removed the aEventWrappers array (the only thing it brings is 'this' harmonization. Just use 'that' in your events to target the JavaScript object, and 'this' to target the HTML object.) Turned a few public functions private (assuming that plugins won't want to use them), removed this.opt (it's not used outside of editor.js really), fixed a bug when RTF isn't possible, the usual stuff. Saved about 260 extra bytes... (editor.js)

! Fixed font size in WYSIWYG mode. (editor.css)
5582
Archived fixes / Re: Split topic appears to trip Bad Behaviour
« on April 6th, 2012, 03:37 PM »
Quote from Arantor on April 6th, 2012, 01:48 AM
Now I have a log viewer, it might be worth emptying $settings['allow_external_forms'] now and trying it again.
Done... Will let you guys do the testing ;)
5583
Test board / Re: Test topic.
« on April 6th, 2012, 10:11 AM »
Hey... Interesting. Now I can reproduce.

Test. Test.
http://wedge.org

The problem doesn't happen when I quick edit an existing post to add a straight URL. If I save, then quick edit again, the link is url-tag free.

Editing this post again... It never happens! Surprising. So there's something happening generally, that doesn't happen when quick editing to add the link.
5584
Test board / Re: Test topic.
« on April 6th, 2012, 10:10 AM »
Okay, here's the deal... I can't get the url problem to reproduce here. Is this a special board that is entirely bug-free? :P

Try to edit my post, Pete!

Test. Test.
http://wedge.org
5585
Test board / Re: Test topic.
« on April 6th, 2012, 10:09 AM »
5586
Archived fixes / Re: Preparsing adds url bbc where it shouldn't
« on April 6th, 2012, 09:57 AM »
I see. I'll try disabling it then.
5587
Archived fixes / Re: Undefined index, Subs.php
« on April 6th, 2012, 07:46 AM »
Yep!
But I didn't add it to my to do list I think. Yet.
5588
The Pub / Re: The Cookie Law (in the UK at least)
« on April 6th, 2012, 07:44 AM »
There's a French saying. L'usage fait loi. Users get to make the rules.
5589
The Pub / Re: The Cookie Law (in the UK at least)
« on April 5th, 2012, 10:55 PM »
France has strong privacy laws too. All sites are required to register at the CNIL (google it) and print their CNIL ID in their footer.
Did I do that? Nope. Do I care about my user's privacy? Of course I do.
What happen effectively is that they just decided to trust webmasters they wouldn't do anything bad. The CNIL is treating the overall French web community with respect as long as everything's going fine. It's just politics. They can't sue everyone in the uk for not complying.
5590
The Pub / Re: The Cookie Law (in the UK at least)
« on April 5th, 2012, 08:34 PM »
What if we use local storage instead :P
5591
Features / Re: New revs
« on April 5th, 2012, 06:08 PM »
rev 1539
(3 files, 33kb -- really not that much work.)

* Increased opening speed of action/user menus. They look good, sure, but that shouldn't be at the cost of usability. Found a better compromise. (topic.js)

* Considering how using prototypes isn't too great for optimizing bytesize, re-ordered the JS weEditor object to be a single function. I can't rename everything to local variables because plugins may want to use some functions, or access some properties. I'll try to keep optimizing, so this is a work in progress. About 200 gzipped bytes saved for now. (editor.js, Class-Editor.php)
5592
Features / Re: timeformat annoys me...
« on April 5th, 2012, 04:18 PM »
Yeah but it's date(), so it would require doing some conversion work anyway... (from % variables to single-letter variables, at the very least.)
5593
Features / Re: timeformat annoys me...
« on April 5th, 2012, 03:59 PM »
Two spaces? Not one?

About 1st etc, I guess this could be done... Really, adding a %wd (Wedge day) or something, which we strpos in timeformat(), and str_replace with ($day = ltrim(strftime('%d', $date))) . (isset($txt['date_day_finish_' . $date]) ? $txt['date_day_finish_' . $date] : $txt['date_day_finish_n'])... Would that do? Something like that (not tested :P)
5594
Features / Re: timeformat annoys me...
« on April 5th, 2012, 03:37 PM »
Quote from Arantor on April 5th, 2012, 03:02 PM
I'm now thoroughly confused. You wanted to deal with the left spacing on the number, and suggested using trim(), I just suggested a variation on that which didn't use %e, nothing more.
Okay, hmmm... Okay can I say that?

Let's say we have this:

Most users online: 127 (December  2)

In French, that would be:

Records de visiteurs : 127 ( 2 Décembre)

Notice the position of the extra space. Because HTML is pretty cool when it comes to multiple spaces, it will only show one space in "December 2", but will show the extra space in French.

My goal was initially to fix %e to return no padding. However, I don't really care that %e returns an extra space when HTML will deal with it. It's not a big deal... So, in the meantime I figured I should just call ltrim() on the final string (" 2 Décembre"). Do you understand what I mean...?
Quote
For cases where there's an extra space in the middle of the string, you're still stuffed either way, whether you use ltrim() or trim(), aren't you?
Yeah, but does it matter? Do you know of any language where the standard for dates is something like "Djèkêmbërr (2)"? In that case, yeah, that string would get the extra space... But I'm trying to work out of a 'realistic' goal, i.e. the most likely languages to be seen. English has an 80% chance to be used, Turkish has a pretty high chance too (in SMF at least -- in Wedge it's gonna start slow), and French will certainly be in the Top 5. So it needs some love.

And you're lucky, I haven't come around to adding the "1er" thingy. :P (Although we could somehow do it by, for instance, adding a custom %variable, which could be transformed at runtime to $txt['strftime_finish_n'] = 'th'; $txt['strftime_finish_1'] = 'st'; $txt['strftime_finish_2'] = 'nd'; $txt['strftime_finish_3'] = 'rd'; -- hmm... I'm a bit crazy :P Perhaps there's already such a thing built into PHP...
5595
Features / Re: timeformat annoys me...
« on April 5th, 2012, 02:57 PM »
I'm calling trim() (or more specifically, ltrim because these never generate right padding AFAIK), on the final strftime() call, you know, just inside the return call...