New revs - Public comments

Nao

  • With a Box
  • If you say so.....
  • Posts: 12,899
Re: New revs - Public comments
« Reply #390 on May 16th, 2012, 09:55 AM »
Oh crap, I don't know what to answer to Pete's post... :^^;:

John, it's just a reference to Lucky Luke...

Re: thoughts, indeed $last_thought was an error on my part.
Also, it's amusing that you put id_master and id_parent into a variable - I did the same yesterday ;) Hadn't come to commit yet though... It's part of my process to attempt to show 'clean' thoughts after a reply.
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

Nao

  • With a Box
  • If you say so.....
  • Posts: 12,899
Re: New revs - Public comments
« Reply #391 on May 16th, 2012, 06:10 PM »
Quote from Nao on May 16th, 2012, 09:55 AM
Re: thoughts, indeed $last_thought was an error on my part.
I take that back... :P
$last_thought = id_thought.
I'm doing strlen($last_thought) because that's what it looks like when it's serialized... (I know it's a bit odd to do a search on a serialized array, but it's always going to be stored the same way, so why bother...)
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

Arantor

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,607
Re: New revs - Public comments
« Reply #392 on May 16th, 2012, 06:12 PM »
Searching on a serialised array is not unheard of. I just got really confused with what the search was trying to do, since it looked to me like it was searching for the string itself, not for the id for it.
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Nao

  • With a Box
  • If you say so.....
  • Posts: 12,899
Re: New revs - Public comments
« Reply #393 on May 16th, 2012, 06:22 PM »
Nope, it wasn't... :)

Yet, I still have issues with my current work on this... I'm trying to get Wedge to correctly determine that a deleted thought was deleted if it's being retrieved by a child as reference. Currently, if you delete a parent, it'll say "@> Something". Grmpf... I'd like for it to say something like "@(Deleted)> Something." Or just "Something", actually...
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

live627

  • Talking Head
  • 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,412
Re: New revs - Public comments
« Reply #394 on May 31st, 2012, 12:02 AM »
Quote
@ Of recent memory, this rewrite of Subs-BBC.php is my biggest disappointment... I was really hoping to optimize it a lot, until I realized it really didn't need optimizing that much. What a waste of time! Is that 'len' field really worth it..?0
Should probably keep that field. Is it tinyint(3) unsigned not nulll? IIRC, parse_bbc had several strlen calls to determine tag  length, and every little bit of savings helps, especially on large,  tag-heavy posts, right?

Nao

  • With a Box
  • If you say so.....
  • Posts: 12,899
Re: New revs - Public comments
« Reply #395 on May 31st, 2012, 04:56 PM »
Quote from live627 on May 31st, 2012, 12:02 AM
Quote
@ Of recent memory, this rewrite of Subs-BBC.php is my biggest disappointment... I was really hoping to optimize it a lot, until I realized it really didn't need optimizing that much. What a waste of time! Is that 'len' field really worth it..?0
Should probably keep that field. Is it tinyint(3) unsigned not nulll? IIRC, parse_bbc had several strlen calls to determine tag  length, and every little bit of savings helps, especially on large,  tag-heavy posts, right?
Yes, it's as you describe it.
There's one call to strlen every time it matches a tag. It also adds another call in some situations later (unparsed_contents or whatever...), but in the end it'll only save time on tag-heavy posts as you said -- and even then, not THAT much..
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

Arantor

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,607
Re: New revs - Public comments
« Reply #396 on May 31st, 2012, 04:58 PM »
Every little helps though :)
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Nao

  • With a Box
  • If you say so.....
  • Posts: 12,899
Re: New revs - Public comments
« Reply #397 on May 31st, 2012, 05:02 PM »
Yep, sure...
But in the case of Aeva for instance, I'm still stuck with a half-baked Aeva-Embed.php+Subs-BBC.php that doesn't seem to know where it wants to go (autolink or not? should I get rid of the code I have no idea what it is doing like aeva_protection? etc.)
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

Arantor

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,607
Re: New revs - Public comments
« Reply #398 on May 31st, 2012, 05:08 PM »
Perhaps it's time we went back and looked over all the code and figured out what all of it did - including the protection code and whether it's all really necessary.

Oh, btw, I very kindly got told that, in theory, a closed bbc could accept parameters - something I've not tried but it would clean up the media bbc if it's true.
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Nao

  • With a Box
  • If you say so.....
  • Posts: 12,899
Re: New revs - Public comments
« Reply #399 on May 31st, 2012, 05:30 PM »
Nope. It's easy to add support for multiple params though. Well not too hard at least.
Dontforget that the quote tag has 5 entries in the list ;) it's not very flexible right now.
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

Arantor

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,607
Re: New revs - Public comments
« Reply #400 on May 31st, 2012, 05:48 PM »
I was told with some certainty that the closed tag actually supports parameters. I was sure it doesn't but the conviction behind the person who told me makes me wonder if I'm wrong...
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Nao

  • With a Box
  • If you say so.....
  • Posts: 12,899
Re: New revs - Public comments
« Reply #401 on May 31st, 2012, 07:50 PM »
Well... I'm perfectly willing to test again (after all, maybe this was added after 2009 or so), but how do I test for it...?
If anything, having the bbcodes in the database makes it VERY hard for me to do any testing on them... (Heck, it's happened so many times to me, I think we should have implemented this move right before going alpha, not before... :P)

I suppose the params list would be like this, but that's all I got done:

Code: [Select]
a:6:{s:2:"id";a:1:{s:5:"match";s:14:"(\d+(?:,\d+)*)";}s:4:"type";a:2:{s:5:"match";s:82:"(normal|box|av|link|preview|full|album|playlist|(?:media|audio|video|photo)_album)";s:8:"optional";b:1;}s:5:"align";a:2:{s:5:"match";s:24:"(none|right|left|center)";s:8:"optional";b:1;}s:5:"width";a:2:{s:5:"match";s:5:"(\d+)";s:8:"optional";b:1;}s:7:"details";a:2:{s:5:"match";s:97:"(none|all|no_name|(?:name|description|playlists|votes)(?:,(?:name|description|playlists|votes))*)";s:8:"optional";b:1;}s:7:"caption";a:2:{s:6:"quoted";b:1;s:8:"optional";b:1;}}

Perhaps I need to fix this code tag that doesn't behave perfectly with word-break...
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

Arantor

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,607
Re: New revs - Public comments
« Reply #402 on May 31st, 2012, 07:57 PM »
If only I'd built that configuration tool -_-

But apparently the test was carried out successfully on both SMF 1.1 and 2.0... might just be worth trying it there for now?
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


Nao

  • With a Box
  • If you say so.....
  • Posts: 12,899
Re: New revs - Public comments
« Reply #403 on May 31st, 2012, 08:10 PM »
I just don't know if:
- it's really gonna help performance (SMF/Wedge's param tester in parse_bbc() basically does all possible permutations of all parameters, while AeMe only tests for the presence of every single param... So in the end I don't think it's better optimized...?)
- it's going to make it 'clearer' in any way. We'd still have to call aeva_showThumbnail() for any media tag...
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

Arantor

  • With a Box
  • As long as the planets are turning, as long as the stars are burning, as long as your dreams are coming true...
  • Posts: 13,607
Re: New revs - Public comments
« Reply #404 on July 4th, 2012, 05:44 PM »
Loving the new popup in r1627 by the way. I like it even more than the lower-right-corner alignment (which is something I never thought would happen)

What I will do then, now we have the newer shinier version of it, is migrate the PM popup to use that - that was really what stopped me from changing the PM popup to use reqWin before was that the alignment of it seemed strange given the context, but putting it like that will work well.

I'm amused to note that some months ago I mused on doing exactly that: putting the popup info in the middle of the screen, though originally just for the PM, in http://wedge.org/pub/6943/pm-popup/msg268865/#msg268865
Posted: July 4th, 2012, 05:33 PM

One thing that does occur is that depending on what else is going on it might not be obvious enough. XenForo, for example, does their popups similarly, but adding something like a 10px border plus a massive shadow - personally I find that a bit much, but it definitely shows some contrast to the background.
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.