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
7951
Features / Re: New revs - Public comments
« on September 4th, 2011, 09:26 AM »
It also reminds me that I don't need to prove the world anything... My code was already perfectly, excruciatingly godly years ago, it's not like I'm improving and I need to show it... :whistle:
7952
Features / Re: New revs - Public comments
« on September 4th, 2011, 08:45 AM »
I myself have learned not to meddle too much with parse_bbc() doings... Usually they're there for a reason, too bad they're not documented ;)
I tried to comment the actions I'm performing in the new version of Aeva-Embed.php -- it's probably a good thing since I had a hard time diving back into the original code, even though I spent so much time on it :P
7953
Features / Re: New revs - Public comments
« on September 4th, 2011, 01:02 AM »
I wouldn't have made that change otherwise ;) SMF was using a temp var for nothing.

It must not be confused with for() where the second argument is always reevaluated.
7954
Features / Re: New revs
« on September 3rd, 2011, 04:17 PM »
rev 978
(11 files, 13kb)

! Locked sticky topics would only show their status as locked. (MessageIndex.template.php, Recent.template.php)

! Another oops. Someone has to tell me why PHP won't let me do that, though... (Subs-BBC.php)

- Removed 'image' parameter from all button strips, as they're remnants of SMF 1.x themes and aren't used for now. Also removed 'lang', as it can easily be achieved via CSS and the $language variable. Note: calendarpe.gif still exists in the SVN, not used anywhere though. (MessageIndex.php, TEMPLATES: BoardIndex, Calendar, Display, Media, Memberlist, PersonalMessage, Recent, Reports)
7955
Features / Re: These two bytes may not matter to you...
« on September 3rd, 2011, 12:53 PM »
Just as I thought, thanks. I just couldn't find docs about that. :)
7956
Features / Re: New revs
« on September 3rd, 2011, 11:34 AM »
rev 976
(3 files, 12kb)

* If there is ONE single place in Wedge where micro-optimizations are going to make a difference, it's parse_bbc(). So that's what I did -- turned == into === where it made sense, cached strlen() when used several times, turned substr($str, $pos, 1) into $str[$pos], and so on... Probably only saves a couple of percents in the end, but guys, this is parse_bbc(). (Subs-BBC.php)

! Left and right bbc tags weren't using the proper classes. (install.sql)

* Curlynazi. (Display.php)
Posted: September 3rd, 2011, 11:06 AM

rev 977
(1 file, 1 line) <-- Now I'll try to just say the number of changed lines when there aren't more than a few...

! Oops. (Subs-BBC.php)
7957
Features / Re: These two bytes may not matter to you...
« on September 3rd, 2011, 10:39 AM »
@above> Uh, I hope this is working by now... :P Haven't looked into the code for a while... And I still have to finish moving the 'change skin' setting to the menu.

Okay, I'm looking into parse_bbc() and I'm micro-optimizing it... It's surprising the number of things that were left hanging, such as "strlen($possible['tag'])" being used a dozen times inside a *loop*. Or "1 + strlen(..) + 1". I understand it's done for clarity, but inside a loop, over time, it still wastes time adding 1 and 1 when it could just be using 2...

Now, I also found a surprising amount of substr($something, $somepos, 1) instead of just $something[$somepos]. It's stunning, really. Now, if substr is overloaded to behave like mb_substr, I can understand the use of the first, but it's never done by SMF so obviously it could simply use the bracket version...

I seem to remember potential problems in future versions of PHP with the bracket version. Do you remember anything about that, Pete?
7958
Off-topic / Re: Bootstrap, from Twitter
« on September 2nd, 2011, 01:51 PM »
For starting a project yeah. Like html5 boilerplate or 960 grid system etc. ;)
7959
Features / Re: New revs
« on September 1st, 2011, 11:14 PM »
rev 975
(2 files, 6kb)

! Fixed this annoying bug where Wedge wouldn't take non-numeric start variables into account when viewing a topic page. This was due to a conflict between board start and topic start, given that topic pages now also define $_REQUEST['board']. (QueryString.php)

- Removed support for .htm extensions in URLs -- don't remember ever seeing these used in SMF, probably a YaBB SE leftover. Keeping index.php/stuff URLs for compatibility with published URLs only. (QueryString.php)

! Parsing of hypothetical URLs like /do/viewjpeg (any pretty URL ending with 'jpeg') could have failed. (QueryString.php)

* Micro-optimization in loadSource(). (Load.php)
7960
Off-topic / Re: YouTube using short links?
« on September 1st, 2011, 08:06 PM »
wedge.org is unpatched. Didn't bother.

Is the HD option still relevant today? Does it still work?
7961
Other software / Re: New One
« on September 1st, 2011, 08:04 PM »
FAQ!
7962
Off-topic / Re: Not really off topic but I'm short on ideas.
« on September 1st, 2011, 02:35 AM »
Write your own parser, like I did :P
7963
Other software / Re: Fork discussion at SMF
« on August 31st, 2011, 11:27 PM »
(Forwarded.)
7964
Features / Re: New revs
« on August 31st, 2011, 11:21 PM »
rev 974
(4 files, 9kb)

* We're using jQuery for on* events, so the spoiler tag code could be simplified... (install.sql)

* Being bold, and disabling in-context video embedding by default. Will probably change my mind once we get lots of support requests... :P (install.sql)

- Removed copyright year from Settings.php. (Settings.php)

* There are only 4 valid metacharacters in a character class, so I figured I might as well clean up all of the useless escaping in the embedding code. (Aeva-Embed.php, Subs-Aeva-Sites.php)

! Fixed in-context video embedding. It seemed like center tags and similar were broken in this mode, so I decided to be a bit nicer and allow for most tags instead. (Aeva-Embed.php)

@ Pete and anyone else: I don't think it's very robust though, and should probably switch to an even nicer version where embedding is only disabled if the URL follows a space or some common punctuation like parenthesis. I'm starting to think it's best to make things simple here, and the whitespace/punctuation solution would be the way to go.
7965
Other software / Re: Fork discussion at SMF
« on August 31st, 2011, 09:44 PM »
Hi Mark,
Could you share the vulnerability itself...?