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
2956
Okay, the multiple name bug should be fixed... It was due to the name container being created outside of the $.post Ajax request, which normally should have worked, but in this case, it didn't, and I fixed it by moving the item creation to inside the Ajax callback... This is totally weird, but you know what..? It doesn't matter... Anyway, I didn't write the original code, and it's not anywhere on SVN, so I'm having trouble keeping track of what I changed in it, so maybe I added another bug in the meantime, which could only be solved by delaying the container creation.

I also fixed that odd bug where you'd get a very small, empty, container when having the container show up, then pressing backspace to the @ and typing a name that's not in the name list. This was a more logical fix, so my honor is saved, ah ah...

I still need to understand the logic of key handling, though, as I have a feeling that it's not behaving as well as it should. (Notably the up and down keys... >_<)
2957
Off-topic / Re: Automagically De-Nesting Quotes
« on May 24th, 2013, 03:06 PM »
Quote from xrunner on May 24th, 2013, 02:26 PM
I am very interested in it. So much so that I went to this thread and read about it -

http://wedge.org/pub/feats/posts/6682/automatic-quote-splitter/

In that thread you don't mention the shift key, you simply say press enter -
Oh, that would explain why Dragooon was confused about it, too...
I updated the first post to reflect the fact that you need to hold either Shift or Ctrl while pressing Enter. Thanks.
Quote from xrunner on May 24th, 2013, 02:26 PM
So although I do see re-reading this thread that shift-enter was mentioned earlier, I guess I was confused when I went to the above thread, and when I tried to split a quote by pressing enter, it didn't work, so I just thought it was a minor bug at the time. I read a handful of comments and they all just looked like "congratulations" "great" so I figured the first post was still the correct explanation of how it was supposed to work (press enter).
It's because I rewrote the feature in the meantime, after some complaints about the fact that this behavior wasn't optional. So, I made so you needed to press Shift or Ctrl at the same time. Which was fine by me...
2958
Off-topic / Re: Automagically De-Nesting Quotes
« on May 24th, 2013, 11:55 AM »
Quote from Arantor on May 23rd, 2013, 11:25 PM
Breaking a quote up... press quote, place cursor where you want to break the quote,
Actually, you don't need to press Quote... :^^;:
2959
Off-topic / Re: Automagically De-Nesting Quotes
« on May 24th, 2013, 11:54 AM »
Holy cow... That's the automatic quote splitter I've been mentioning since the beginning.

It's also mentioned prominently in the post area.

What else should I do to get people interested in it, if even those who are looking for a quote helper haven't noticed it..?!
Have it enabled by default, and show a popup explaining what it did, and offering to disable it..?!?!

:-/
2960
Features / Re: New revs
« on May 23rd, 2013, 10:57 PM »
rev 2132
(6 files, 5kb)

* Had some room for improvement in wedge_get_css_filename... Rewrote to use array keys instead of values, so it's about twice faster now (we're talking about fractions of a milliseconds, so whatever... I like saving time, all right?), and also removes the 'member' keyword if a 'mID' keyword is already present (ID being your member ID). (Subs-Cache.php)

* Tweaked 'time remaining' box in the admin area to give breathing space to the menu below, hey, it's just three extra bytes... (Admin.template.php)

+ French translation. (Admin, Help, ManageSettings)
2961
Features / Re: File cache backend
« on May 23rd, 2013, 10:37 PM »
Quote from Arantor on May 23rd, 2013, 08:33 PM
Really? Even native functions?
Yeah. Then again, it's complicated... It's something like, json_encode is faster than serialize, but json_decode is slower than unserialize, or the other way around... Plus, both systems behave differently depending on the complexity of the string.
All in all, I'd decided not to look further into it, but considering that we don't use caching that much, I don't think there would be much of an improvement, whether you want to use serialize or json_encode. After all, I think that most of the caching process is spent on the file system manipulation, rather than data manipulation itself.
Quote
And, really, I'm not particularly interested in json_encode vs serialize, because unless it's vastly out of whack, it's irrelevant - it's write once read many.
I'm not so sure about it...
I mean, there are many cases where the delay is very short, to avoid being too much behind the real data, so I think that at least half of the time, caching will fail for something, because it's not accessed that much.
I don't have any data to prove my point, though...
Quote
* Arantor might try and benchmark that later.
Good idea.

$a = microtime(true); for ($i=0; $i<1000; $i++) { my code... } echo " ", microtime(true)-$a;
$a = microtime(true); for ($i=0; $i<1000; $i++) { my alt code... } echo " ", microtime(true)-$a;


I love how easy it is to benchmark stuff in PHP... Eh, I can even write the above in just a few seconds, I've done it so many times already... :P

Sorry for being so slow on work these days, BTW... I'll try to upload the latest commits you did, though.
2962
Off-topic / Re: Automagically De-Nesting Quotes
« on May 23rd, 2013, 10:29 PM »
Maybe we could offer the ability to strip quotes if they're more than 2 levels down, i.e. no more than a quote and a child quote are allowed... That way, we maintain context, and avoid pyramids entirely... Is that better, now..?

Anyway, what I offered still holds:
- adding a "show this quote" button for quotes below the first level,
- using e-mail-like quotes in the post area, so that you can easily delete the quotes, without having to look for quote tags, e.g.

> > Quote: Arantor
> > Nice...
>
> Quote: Nao
> Hello, world.

Easy to turn back into quote tags, and nearly as easy to build in the first place, as it only requires a technique similar to what I did with the Mentions popup positioning... (Which, ahem, is still buggy.. Not for the positioning, though...)

- or, simply, showing the automatic quote splitter's description in huuuuge red bold text :P
- or just enabling it by default, and bypassing by shift+enter. (Not hot about that one, personally... I'm still old school, and even though I got the idea for the quote splitter, and even implemented it, I don't use it much... At least, not as much as Pete seems to do... ;))
2963
Off-topic / Re: Automagically De-Nesting Quotes
« on May 23rd, 2013, 08:42 PM »
Is it worth trying to implement a text mode quote system similar to text emails..?
Then we can easily manipulate multiple quote levels.
2964
Features / Re: File cache backend
« on May 23rd, 2013, 08:29 PM »
Odd. From my testing months ago, json was slower than serializing. I didn't insist.
2965
Off-topic / Re: Automagically De-Nesting Quotes
« on May 23rd, 2013, 03:28 PM »
There is already a special codepath in parse_bbc (Subs-BBC::592) that goes through a quote's parent quotes, and alternates their styling.
Meaning, we can reuse this to additionally add a "show quote" class/behavior to the penultimate quote in the stack.
Alternatively, we can also get rid of that code block and instead use CSS to alternate style (I gave it a try, it's an additional 13 gzipped bytes compared to an .alternate > div styling solution, but obviously it also saves us a few HTML bytes, as well as processing time.)
Then we'll be back to square one when it comes to showing "show quote", but whatever... ;)
2966
Off-topic / Re: Automagically De-Nesting Quotes
« on May 22nd, 2013, 10:54 PM »
Quote from Arantor on May 22nd, 2013, 10:40 PM
Hmm, I don't know whether it would be quicker to just hide it in CSS or to strip it on view before parsing (thus saving some tags)
It all depends on whether disabling nested quotes is about saving bandwidth, saving database space, or saving scrolling time, or a combination of all three...

The main advantage of adding a 'view quote' link/button, is that you can possibly get rid of the option.
Quote
I also don't know how you'd do it in CSS if it's a user preference because that means it can't really be in the CSS file at all... unless we add a class at parse time to it (which is currently not supported and would make parsing undoubtedly slower)
Well, it's easy to find nested quotes at parse time, so..?
2967
Off-topic / Re: Automagically De-Nesting Quotes
« on May 22nd, 2013, 04:32 PM »
I'm not talking about hiding all quotes for them, rather simply stripping off nested quotes for their own posts.

Although, well, it could be possible to strip quotes at runtime. Say, in ob_sessrewrite...

Or... Let me think about it... Replace all nested quotes with a "Show this quote" button..? At least it won't take as much size, although it'll still be a problem with the database size, but I think we have a setting around here to prevent long quotes from being saved, or something...?
2968
Off-topic / Re: Automagically De-Nesting Quotes
« on May 22nd, 2013, 08:59 AM »
A useful suggestion, perhaps..?

Since nested quotes are an acquired taste, maybe have this as a user option, rather than a site-wide option, and disable or enable it by default, I don't really care -- having them disabled by default means that you'll never get pyramid contests (I fun them fun from time to time, even as an admin, but...), while having them enabled by default allows people to at least discover the qualities of my quote splitter... :P

(Although I still need to fix said quote splitter, as I recently noticed a minor bug with it.)
2969
Features / Re: New revs
« on May 21st, 2013, 10:01 PM »
rev 2127 -- and that'll be all for tonight... I hope!!
(3 files, 2kb)

! Forgot to include Subs-Cache fix to last commit... Oops. (Subs-Cache.php)

! Fixed error when quick-editing a post during the grace period. In fact, parse_bbc() should always set posts as coming from the original author, rather than the one who edited it. Also rewrote something to make it shorter and execute faster. (JSModify.php)

* Did some more work to improve Wireless on Android. Unfortunately, this means I had to add a few odd fixes here and there, due to Android not actually showing stuff as expected. See the Recent Posts page... Brr. Well, better than nothing. I probably broke some other mobile browser in the process, but I can't test them all... (Wireless/extra.css)
2970
Features / Re: New revs
« on May 21st, 2013, 09:05 PM »
rev 2126
(6 files, 2kb)

* Considering that thoughts are the only thing in Wedge that currently use parse_bbc_inline, and I've wanted to use the long list for them for a long time, I've decided to disable $short_list by default. (Subs-BBC.php)

! The me tag has no reason (that I can think of) to be a block-type. Made it an inline object. (install.sql)

! Fixed an error that showed up when viewing a page from a mobile browser, a regression from last commit. (Subs-Cache.php)

* Tweaked layout for custom field management. No biggie... (Admin.template.php)

* Minor language tweaks. Plus, ahem, forgot to translate the very same string I added to ManageSettings... (Admin.language.php, ManageSettings.french.php)