New revs - Public comments

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #270, on December 25th, 2011, 12:02 AM »
I use it too, but its usefulness is diminished with convo mode, as compared to unlabelled.

Default labels would be quite good but it really depends whether it would be more useful spun as folders or Gmail like tags, which is really what it's closer to.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #271, on December 25th, 2011, 12:10 AM »
I think doing default labels could also encourage us to make them more prominent ie show them as sidebar folders or whatever rather than menu things.

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: New revs - Public comments
« Reply #272, on December 25th, 2011, 06:02 AM »
What's the point of using an array for a post error if it isn't run through sprintf()? Currently only tag errors get such treatment. (C&P error, I assume)
Re: New revs - Public comments
« Reply #273, on December 28th, 2011, 10:28 AM »
Bump
Posted: December 28th, 2011, 10:23 AM

Also, I think I found a bug with either the CSS parser or the caching subsystem. I have a stylesheet with my plugin that uses $here. Well, that variable spits out the correct path.  Isn't it supposed to give the URI?
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #274, on December 28th, 2011, 10:44 AM »
I don't understand your bumped question. Line numbers and files please?

$here spits out the relative path from the cache folder to wherever your skin file is (for images in the same folder). Iirc because I'm on my iPod.

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: New revs - Public comments
« Reply #275, on December 28th, 2011, 10:58 AM »
I found the issue. $boarddir uses backslashes but dirname($file) has forward slashes.
Quote from Nao on December 28th, 2011, 10:44 AM
I don't understand your bumped question. Line numbers and files please?
Post.php, line 410. Does it make more sense for that to use sprintf()?

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #276, on December 28th, 2011, 12:35 PM »
Yes, it does -- $post_errors can still contain arrays as filled in by Class-Editor.php with the 'mismatched_tags' type.
However, there IS an error indeed -- missing_tags is no longer a valid error, which I forgot to remove from that. After thinking it through, I decided to merge the methods for mismatched_tags and long_message, and thus I rewrote every area that filled in long_message, and put it into a sub-array instead. This makes for a cleaner code. (Hopefully it'll work... :P)

As for $here, does that still mean there's a bug for me to fix...?
Re: New revs - Public comments
« Reply #277, on December 28th, 2011, 01:42 PM »
So... I made a quick benchmark with script positioning, and here are my (non-scientific) results:

- all browsers pretty much execute the stuff in the same time. So the time before .load() is available remains the same, whatever the method used.

- IE6 benefits from having scripts at the bottom, because it's so slow at executing JS, and running jQuery + script in the head slows it down by a second or two... :( So, I've disabled it for IE6, it'll always execute below.

- IE7, IE8 and IE9 give similar results in both situations.

- Same for Chrome, Firefox 3 and Safari.

- Opera looks clearly better with the scripts at the top, plus it probably fixes the occasional FOUC I would get (only in admin pages). So it's definitely staying this way for Opera (i.e. always at the bottom, except if user is logged in and came recently.)

Interestingly, the YSlow tool recommends having the scripts at the bottom -- but wherever I have them, it still gives me an A ranking for that category. It probably 'understands' that some scripts can't be put at the bottom (which is actually completely untrue, given what I managed to do with SMF/Wedge, but whatever.)

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: New revs - Public comments
« Reply #278, on December 29th, 2011, 05:23 AM »
Quote from Nao on December 28th, 2011, 12:35 PM
As for $here, does that still mean there's a bug for me to fix...?
Yes. Actually, the problem seems to be in Load.php, where $sane_path is defined. Replacing it with $pluginsdir solves the problem.
Posted: December 28th, 2011, 11:36 PM
Quote
I'm counting on you to check this out
Will do later tonight
Posted: December 29th, 2011, 01:51 AM

Flawless! Actually, I tested only the post area. My plugin can now use a dynamic string in place of %1$s. :D I use post_post_validate to extend $post_errors, which isn't run in preview mode[1].
 1. Neither does pre_post_validate.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #279, on December 29th, 2011, 02:35 PM »
so...
Quote from live627 on December 29th, 2011, 05:23 AM
Quote from Nao on December 28th, 2011, 12:35 PM
As for $here, does that still mean there's a bug for me to fix...?
Yes. Actually, the problem seems to be in Load.php, where $sane_path is defined. Replacing it with $pluginsdir solves the problem.
I see. But from what I see, it's simply $pluginsdir with '\' turned into '/' (i.e. Windows paths to Linux paths.)
I'm not familiar with that part of the code, as Pete wrote it as part of his plugin code.
Can you suggest a fix that would only deal with $here...? Like, in Subs-Cache.php:

Code: [Select]
$final .= str_replace('$here', '..' . str_replace($boarddir, '', dirname($file)), file_get_contents($file));

Into something like...

Code: [Select]
$final .= str_replace('$here', '..' . str_replace(str_replace('\\', '/', $boarddir), '', dirname($file)), file_get_contents($file));

(I don't know if that's what causes trouble to you. And maybe dirname($file) also needs to be rewritten...?)
Quote
Flawless! Actually, I tested only the post area.
I doubt anything will break because I definitely double-checked all of my changes, but never say never...
Quote
My plugin can now use a dynamic string in place of %1$s. :D
And everyone's happy!

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: New revs - Public comments
« Reply #280, on December 30th, 2011, 02:05 AM »
That would work and fix the issue, but I'd like to fix the *real* problem, which is as I described above.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #282, on December 30th, 2011, 01:47 PM »
Okay, so, to elaborate: I don't know *why* $sane_path is set at all. I suspect that Pete had issues with his plugins on his local install. But, OTOH, I also have no idea how this has any influence on $here, which is why I don't feel comfortable tackling this problem. So, maybe my 'fix' would be just a quick hack that needs to be removed later, but at least it wouldn't break anything...

Ah, well... I have a strange feeling that I'm on my own, these days... :(
I'm working on rev 1231, and Pete's last commit (apart from rev 1183 that consisted in adding a semi-colon) was rev 1168, back in November 17. That's 6 weeks and 60+ revisions without a commit. A new record I'm afraid...

Maybe we should start giving SVN commit access to some people... Because at the current pace, even with me spending my entire Christmas holidays on Wedge, it won't be out before 2014... :^^;:

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs - Public comments
« Reply #283, on December 30th, 2011, 02:43 PM »
Quote from Nao on December 30th, 2011, 01:47 PM
Okay, so, to elaborate: I don't know *why* $sane_path is set at all. I suspect that Pete had issues with his plugins on his local install. But, OTOH, I also have no idea how this has any influence on $here, which is why I don't feel comfortable tackling this problem. So, maybe my 'fix' would be just a quick hack that needs to be removed later, but at least it wouldn't break anything...
OK, the point of $sane_path is to cope with the fact that PHP on Windows sometimes issues \ in the path strings and sometimes uses / as well; the idea is that it should be consistently using the same both ways (i.e. always using /) because that works on Windows.

Oh, I remember now why I did it. When doing error reporting, and using the path of the file-causing-error for discovery purposes, debug_backtrace() always returns it with / even if on Windows, so I made it so it was stored up front with that in.



Yes, I'm sorry that I haven't committed much, but the last few months have been shitty for me (death of two family members in six months, another family member with dementia), and given that right now I'm trying to prevent a breakdown of a 10 year relationship which may or may not end up with me splitting up with my partner (which will entail me moving out, selling my house and finding somewhere to live etc.)... plus stuff going on with my consulting clients, you can probably imagine that it's not exactly the best time for me to be doing anything.

There is a part of me that thinks I should probably resign at this point, actually, and clear the way for someone who can properly devote time and energy to this project. Especially because of comments like this, makes me wonder if I'm really not suited to doing this sort of thing anyway.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs - Public comments
« Reply #284, on December 30th, 2011, 04:32 PM »
So... How would you solve that...?



Yup, I remember our PMs (sorry I didn't follow up on the last one but it started to be taxing even on me... :sob:), and I deeply sympathize with you. Things are happening, not all them good. I would perfectly understand that you'd want to resign, however I'd rather you choose to be seen as 'on hiatus'.

Bloc-- don't bother with him, he's too unstable emotionally. How many times have we had to deal with his issues? How many times did he start getting angry at us because we weren't enthusiastic about one of his endeavours? I'm not saying we're better than he is, but when I see him think that he's "the better skilled one" (same topic) and complain about our reception (let's be clear: he's referring to my saying I'd already gone through this path, which was far from being insulting!), and as a result he asked for his account to be removed from Wedge for the Nth time... Meh, he's got his issues, and he's certainly not in a position to tell you what you are and what you can do.

One thing he's true about, on that topic, is that you can't expect to get anything in return from working on SMF-related projects. I already experienced that with Aeva, now with Wedge... I probably should have gone to WordPress, but love has its reasons that reason doesn't know... I made my peace with that idea long ago!