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
2851
Archived fixes / Re: Menu is cut off below the footer
« on June 11th, 2013, 11:57 PM »
wontfix -> hope you don't mind..... :^^;:
2852
Features / Re: New revs
« on June 11th, 2013, 11:22 PM »
rev 2163 -- Some boring maintenance...
(11 files +4-2, 16kb)

* Optimized the new buttons to PNG8, and made them raw-url; as permbutton isn't used anywhere (I suspect it's not as desired..?), it's even less important to embed it, while the modify button, per se, is only found in one place, so let's not clutter the index CSS with more bytes, I'd say... (other/images/buttons/*, images/buttons/*, index.css, mana.css)

* Since the admin area is less bandwidth-critical, I figured that it might not be a complete waste to add hover text over A/X/D radio buttons in the permissions area, clearly indicating what the button is for, without needing to resort to reading the header description again. I know, as I found myself wanting this. The result is about 5% larger, but once gzipped, is only about a hundred bytes larger. (ManagePermissions.template.php, ManagePermissions.language.php)

* URL cutter now uses the Safari 'codepath' for all browsers, as it's shorter, seems more solid and actually works everywhere I tested, so whatever. (index.css)

* Commenazi. (ManagePermissions.php)

* French translation. (Help, ManagePermissions, ManageSettings)

- Removed a now unused style from IE6/7. (extra.ie6.css, extra.ie7.css)
2853
Features / Re: New revs
« on June 8th, 2013, 11:14 PM »
rev 2161 -- To infinity... AND BEYOND!!!
(6 files, 8kb)

+ Added Infinite Scrolling feature to topics. Just keep rolling your mouse wheel until it starts loading the next page! There are still a few bugs, such as video embedding not always working in newly loaded posts, and quick moderation being broken. It's not enough to justify not committing this nice feature, I think. (QueryString.php, Subs-Template.php, index.template.php, script.js, topic.js)

* Defined a new constant, INFINITE, which is set if the page was loaded through infinite mode. I may remove it later, but for now, I think it could be helpful. (QueryString.php)

! In some rare situations (for instance, pages with embedded videos), Wedge could have empty script tags. Dealing with these. (Subs-Template.php)

* Grouping block calls from mini-skeletons in the debug log; seriously, this saves admins from having huge logs in topic pages, although it might be argued that it makes debugging (slightly) harder, but whatever. (Subs-Template.php)

* Translation. I'm late with the other files, I know... (ManageMail.french.php)

@ I can't believe I fully commented my JavaScript for infinite scrolling... What happened to me? ;)

:edit: Forgot to mention script.js (which was committed) -- it adds a check related to infinite scrolling, too.
2854
Features / Re: Crazy idea: fonts as a preference
« on June 8th, 2013, 01:44 PM »
Old topic...
Quote from Arantor on March 28th, 2013, 03:40 PM
I'm thinking a single dedicated option in the profile area. Or even in the sidebar. And then along with it a change-of-font-size menu. This would be a nightmare to do with skins since you'd need to have multiple variations of each skin.
Hmm, like a "a A" pair of icons somewhere, as seen in gameblog.fr reviews and other sites...?
Yeah, I guess you don't need an extra skin for that, *but*, I'd just like to point out, if you add another skin later, what guarantees that changing the font size won't break it..? Ah, well...
Posted: June 8th, 2013, 01:43 PM
Quote from live627 on March 29th, 2013, 12:19 AM
@Nao: Please  explain that css include tag. Can I reference local fonts? Does it replace @font-face (which no longer works, btw)?
Hmm, I thought I'd documented that one, at the very least... ;)
You should have all your answers in the source code, ah ah!
(What a lazy ass I am...)

And, can you confirm @font-face doesn't work..? That's odd.
2855
The Pub / Re: Infinite Scroll
« on June 8th, 2013, 01:30 PM »
Yeah, it just isn't so solid on the long term...
For instance, since I'm removing external script files, if you have on page 2 a video embed but not on page 1, the embedder will try to call swfobject, but generate an error because it failed to find it, since it wasn't declared to begin with, ah ah...

This is the kind of thing that can happen everywhere, to anyone, with whatever plugin you want... :-/

And, I'm still unable to find some kind of jQuery trick to 'limit' the scope of a DOM traversal to a certain item. Which is really upsetting, because they could do, say, some kind of function like $.proxy() but for $()... For instance, $.traverse(from_here); $('span').hide(); would be the equivalent of doing, $('span', from_here).hide()... Then call $.traverse() again to reset to the actual DOM. Seems like a good idea, and a perfect feature for jQuery... Hmm, I'm wondering, if I can't implement it as plugin, maybe..??
Posted: June 8th, 2013, 01:26 PM

Oh, crap!

Good news: it exists! http://api.jquery.com/context/
Bad news: they just deprecated it in the latest release..!!! >_<

Well... At least, it means it's "doable"...

:edit: Talked too soon... It's a getter, not a setter. Well, still, apparently I could attempt to set $.context manually... I'll look into that.
2856
Off-topic / Re: Plagiarism Warnings?
« on June 8th, 2013, 11:15 AM »
I for one would like some similar warnings, yeah, why not...
Or maybe, a more generic one about breach of copyright, I don't know.
2857
The Pub / Re: Infinite Scroll
« on June 8th, 2013, 11:14 AM »
Okay, so I think it's all fixed... Quick moderation is still buggy, though. Because apparently, newly inserted inputs don't get added to the overall form, when I submit the request to delete a post loaded from beyond, it just ignores it. Also, it reloads the original page, without the infinity items, which I'm not surprised about, but still not happy with...

Apart from that, it *seems* that the infinite scroll is now working fine, and may even be in committable state... (I can live with the quickmod bug for now.)
YAY!! :)
2858
The Pub / Re: Infinite Scroll
« on June 8th, 2013, 10:59 AM »
Quote from agent47 on June 8th, 2013, 10:17 AM
I noticed two bugs after the scrolled feature has been used:
1. Quick reply textbox doesn't stay collapsed.
2. Clicking on the 'number of likes' button takes you to the top of the page.
(1) is already known, I reported it. Use Quote for now.
(2) I didn't notice. This is most certainly due to the eves counter not being increased; I forgot to upload a file yesterday, I'll see if it works when I upload it.
Posted: June 8th, 2013, 10:36 AM

Okay, both bugs should now be fixed... :)
I've had to had some extra code to the infinite scroller, though, and give up on loading any external files from within the new posts, which means it's bound to create other bugs, it's a bit like whack'a'mole, right..? :lol:
2859
The Pub / Re: Infinite Scroll
« on June 8th, 2013, 09:59 AM »
Quote from MultiformeIngegno on June 8th, 2013, 03:58 AM
I have some issues when I try to like posts or post thoughts. The "loading" text loads forever and nothing happens. To solve I have to reload the page, post/like again and now works. Maybe this is related to the JS changes?
That's odd...
- Loading stops for me.
- Like button works. (I just did it on xrunner's post above, from an infinitely scrolled page.)
And even if it didn't work, it'd still fall back to the non-Ajax version, which reloads the page entirely.

Meaning, it's certainly a JavaScript error that's blocking your entire process.

You should check out your JavaScript error log (usually in the browser's 'console'), what is your browser?
2860
The Pub / Re: Infinite Scroll
« on June 8th, 2013, 01:01 AM »
Quote from Arantor on June 8th, 2013, 12:29 AM
I like infinite scrolling enough to spend some time on it. I'm just not sure right now what use I am with it :/

It's really up to you at this stage whether you want to continue or leave it for now and we'll come back to it. I think ultimately, though, for it to work it'll require spending more bytes in topic view's JS.
New version up...
Should work: everything.
Doesn't work, from what I can see: multi-quote, inline moderation.

Hmm, getting close...! ;)
Right in time for bed, eheh...

:edit: Testing quick edit, in infinite mode. Works :)
Posted: June 8th, 2013, 12:49 AM

Also, quick reply seems to be broken, clicking it closes it.... I guess it's due to it executing its setup twice, eheh. I'll make sure to fix that.

So, basically, we can simply tell people that they should be careful that their code can be run several times, and possibly several times per item they're looking to modify. In conclusion, I'll have to 'fix' bugs as we find them, but from now on, it should be relatively 'easy', as these bugs, I can properly understand what they come from, eheh.
2861
The Pub / Re: Infinite Scroll
« on June 8th, 2013, 12:18 AM »
Quote from Arantor on June 7th, 2013, 11:51 PM
1) I think the behaviour needs to be predictable and documentable but that's all it needs to be.
Can't seem to predict anything.
For instance, 'eves' may not have the same values on the next page. Thus, it's best to add a hack to subs-template to increase the base eves number by 100 or more, so that we don't mix things incorrectly. Unfortunately, doing this... Breaks even more.
Quote from Arantor on June 7th, 2013, 11:51 PM
2) Plugins will just splice themselves into the normal menus, and/or splice themselves into the template layers as given.
Hmm, possibly...
Anyway, my current implementation (I rewrite everything every 10mn or so...), doesn't strip anything, it loads the entire page, which then prompts jQuery to run scripts, then I strip everything that isn't #forumposts. Unfortunately, it looks like the scripts are still executed in the global scope....... Meh. So, it means that functions will run twice, and that isn't too good. If I'm not mistaken, running script.js twice will break deletion confirms, while removing *.js files before their execution, will break quick edit and a few others.
Also, loading the entire page also adapts the layout internally (to make room for the sidebar, etc), and the action menu is then incorrectly positioned, at least once I remove the sidebar etc...

It's incredible, how random it all is... Definitely not for the weak-hearted.
Quote from Arantor on June 7th, 2013, 11:51 PM
Provided display_main is still called and there's some way for a plugin to know that it's being called via infinite scroll vs not by infinite scroll... hell, could even provide two hooks - one that will be run for each post a la display_main and one that is only run for the first place (for things like topic_solved to splice its information into the page, that's not needed every iteration of page load, only the 'master' load for a topic)
Hmm yeah, a possibility...

Do you like infinite scrolling enough to justify more work from both of us, though...? :P
Quote from Arantor on June 7th, 2013, 11:51 PM
3) That sounds like a huge and drastic change :(
Yeah, one I certainly won't ever do, eh.
2862
The Pub / Re: Infinite Scroll
« on June 7th, 2013, 11:51 PM »
Quote from Nao on June 7th, 2013, 11:50 PM
PS: just pushed this version online, so that you can test it...
Hmm, just noticed that quick edit won't work, either... -_-
2863
The Pub / Re: Infinite Scroll
« on June 7th, 2013, 11:50 PM »
I've got it working a bit better...

First, I determined where that $.each error was coming from; it was actually from the .acme loop, and was due to the fact that the loop executed on ALL .acme items on the page, i.e. also on items that had already been transformed. So, I simply (?) added a fail-safe to the mime plugin, which would search for a mime container and, if found, skip the item.

And that actually works, now...

After that, I modified the Display template to show the scripts inside the forumposts div, but then I managed to do it another way in pure JS, by filtering the script tags.
A a result, both mini-menus will show on new posts. :)

Of course, I wasn't finished... For instance, clicking Delete on a post would show the confirm box, but immediately delete the post, too.
I determined that if I removed the script src includes from the script list, it would no longer do that; at this point, though, I'm not exactly sure why the eves list of events is actually executing, or something, but whatever...

Another bug that remains, is that if I have the Quick Reply box opened, clicking Quote on a new post will lead me to the full post page, instead of multi-quoting it.

So, yeah, it's technically working, but (1) it's fairly unstable and hard to predict, (2) I still have no frigging idea how to integrate plugins into this, (3) I think that ideally, I should rewrite all post-related code (and things that are changed in ob_sessrewrite) to use $(source).find('...') instead of $('...'), with source being div.new_page:last when called from a new page, or simply the body when called from the main page. See what I mean...? Yeah, it's pretty much impossible to rewrite all of that...

Should I be happy with the, errr... Current drawbacks, and implement it this way...? :-/
Posted: June 7th, 2013, 11:47 PM

PS: just pushed this version online, so that you can test it...
2864
The Pub / Re: Infinite Scroll
« on June 7th, 2013, 09:25 PM »
Quote from Arantor on June 7th, 2013, 08:21 PM
But I get the impression that the solution is to ultimately do it the long way - not using an iframe, and in the second (and onward) page, triggering the menu generation manually on the new items as inline code. I don't see how else to get around all the issues.
I'm not sure it's easy to do; and as I said, it doesn't solve the issue of plugins not being able to run their code on the newly loaded posts... And that bothers me the most, really. I don't want to provide support for that later, I guess...
2865
Other software / Re: SMF with a different name, huh?
« on June 7th, 2013, 09:23 PM »
Quote from Arantor on June 7th, 2013, 08:32 PM
Thirdly, I have no idea why it bothers me as much as it does. I don't like people talking smack about me behind my back,
Oh, I can understand you'd feel upset that he did it behind your back. It's only natural...
Quote from Arantor on June 7th, 2013, 08:32 PM
Fourth, I'm annoyed because I vouched for him and gave him beta access. I'm not normally a bad judge of character. But this time I was and it annoys me.
He felt like a nice person, at the beginning... But, I guess at some point, he considered your involvement in AAF a 'given'.