New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #2190, on July 28th, 2013, 11:24 AM »
rev 2190 -- macros rewrite, hopefully will help me with the upcoming soft-merge trick, hmm...
(5 files +2, 11kb)

* Tweaked the macro system. Default macros are *no longer* defined in index.template.php, and are instead declared in a new 'macros.xml' file in the skins folder, which you can augment with contents in custom.xml, or a sub-skin's macros.xml file. Just like for skeletons, a replace-type skin shouldn't ignore the root skin's macros, so if you want to cancel a parent macro, make sure to rewrite it entirely, otherwise it's here to stay. I think. The reason why I did this rewrite was to (1) completely clean up the index template, which is already complicated as it is with all of the blocks defined, and (2) make it easier for me to add new macros, as the xml definition style is, well, definitely better looking... Plus, the banner macro needed to be fixed with non-PHP code, so, two birds with one stone. (Load.php, Subs-Cache.php, index.template.php, macros.xml)

+ Started adding a few macros... (Msg.template.php, macros.xml)

- skin.xml no longer accepts macro redefinitions. Use macros.xml, sorry about that. (Warm/skin.xml, Warm/macros.xml)

- A couple of unused globals... (index.template.php)
Re: New revs
« Reply #2191, on July 29th, 2013, 10:55 PM »
rev 2191
(1 file, 3kb)

* Updated CSS prefix handling. I still do tech watch really, always need to...! So, what's fixed on my side: iOS 6 should now show border-image, unprefixed, and use calc(), prefixed. What's new in the browser world: IE 11 supports border-image (unprefixed), Chrome 26 finally unprefixed gradients (didn't notice before), Chrome 29 unprefixed the final flexible box layout model, a bit late, but still... Safari 7 unprefixes gradients, transitions and calc(). iOS unprefixed transitions and calc() only. Hopefully, I didn't miss anything... The code is starting to get complicated, but it's still a bit early to drop all of the old browsers from the list; still, I'll eventually do it, at least for the evergreen ones, i.e. Chrome and Firefox. (Class-CSS.php)

+ I don't think it's of much interest, but I added prefixing support for 'backface-visibility', 'perspective' and 'perspective-origin'. Supposedly (I even read that again in the latest issue of WDM), you can force hardware acceleration with these, but I never got any issues without them either, so I'll have to wait for someone to tell me they have performance issues... Although, I might eventually apply backface-visibility: hidden to all 2D-only transforms, because, whatever. Maybe in a mixin, or somethin'. (Class-CSS.php)
Re: New revs
« Reply #2192, on July 31st, 2013, 05:10 PM »Last edited on August 1st, 2013, 10:04 PM
rev 2192 -- soft-merging! Yay!
(5 files +1, 11kb)

+ Implemented soft-merging of posts. This is similar to regular double-post merging, except it's done at display time, rather than in the database, allowing for internal parent IDs not to get screwed, thus allowing for easier threaded mode, in case we eventually implement this. It's also done automatically, and is quite fast (1ms to merge all posts in a page together), the only drawback really is that it makes the msg skeleton structure a bit less flexible, but whatever... Also turned a few msg blocks into macros, yay. (Subs-Template.php, Msg.template.php, macros.xml, sections.css)

+ Added, for reference, the JavaScript prototype of soft-merging, to the attic. (attic/scripts/Unused-softMerge.js)

+ Macros can now use extra params even without specifying an <if> tag in their body. I should have dealt with that long ago, but, well, I didn't even notice the problem was there... (Subs-Template.php)

:edit:
* Chrome 29+ should support min-resolution CSS stuff now, so I'm changing the logic to save a few bytes.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #2193, on August 1st, 2013, 04:42 AM »
9 modified, 1 deleted, 4KB

Revision: 2193
Author: arantor
Date: 01 August 2013 03:41:25
Message:
- Remnants of the old package manager. (detailed-version.php, Class-Package.php)

! Some of the /e modifier stuff. (Class-String.php, Class-System.php, Dlattach.php, ManageMaintenance.php, Subs-BBC.php, Subs-Post.php, Subs-PrettyUrls.php, Aeva-Embed.php)

@ Combo Breaker: these were bits I meant to post beforehand. I had meant to finish all the /e conversion stuff but that didn't happen due to time constraints. But since it's an active bug, here's what I have thus far. Do note it has NOT been battle tested and there are likely to be bugs at this stage. Please do testing, especially of pretty URLs before deployment. Note there is also one still lurking in Subs-PrettyUrls, where I haven't yet rewritten all of it, just the semantics around the first callback.
----
Deleted : /trunk/Sources/Class-Package.php
Modified : /trunk/Sources/Class-String.php
Modified : /trunk/Sources/Class-System.php
Modified : /trunk/Sources/Dlattach.php
Modified : /trunk/Sources/ManageMaintenance.php
Modified : /trunk/Sources/Subs-BBC.php
Modified : /trunk/Sources/Subs-Post.php
Modified : /trunk/Sources/Subs-PrettyUrls.php
Modified : /trunk/Sources/media/Aeva-Embed.php
Modified : /trunk/other/xml/detailed-version.php
Re: New revs
« Reply #2194, on August 1st, 2013, 07:44 AM »
6 modified, 4KB

Revision: 2194
Author: arantor
Date: 01 August 2013 06:44:07
Message:
! MySQL version not detected properly in installer (thanks Dragooon) (install.php)

! Fix to RIPE lookup (thanks Live) (Profile-View.php)

! Ability to search 'this board' or 'this board and all its sub-boards', feel free to find better wording, I just wanted to implement this quickly tonight. (Search2.php, Subs-Boards.php, Search.template.php, Search language file)
----
Modified : /trunk/Sources/Profile-View.php
Modified : /trunk/Sources/Search2.php
Modified : /trunk/Sources/Subs-Boards.php
Modified : /trunk/Themes/default/Search.template.php
Modified : /trunk/Themes/default/languages/Search.english.php
Modified : /trunk/root/install.php
Re: New revs
« Reply #2195, on August 1st, 2013, 08:13 PM »
4 files, 6KB

Revision: 2195
Author: arantor
Date: 01 August 2013 19:12:30
Message:
! More overhaul of the underlying search code. There's still plenty more to do but this is a bit of what had to be done to properly isolate custom indexes from, say, everything else. (ManageSearch.php, ManageSearch.template.php, SearchAPI-Custom.php, SearchAPI-Standard.php)
----
Modified : /trunk/Sources/ManageSearch.php
Modified : /trunk/Sources/SearchAPI-Custom.php
Modified : /trunk/Sources/SearchAPI-Standard.php
Modified : /trunk/Themes/default/ManageSearch.template.php

@ Just some background: pretty much all the code paths where searching ever touches treat custom indexes as a special case. The whole point, ultimately, is to not do that and push everything out to the search APIs as it should have been.
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
« Reply #2196, on August 1st, 2013, 09:22 PM »
rev 2196
(3 files, 2kb)

! Soft-merging broke un-ignore links on ignored posts. (Display.template.php)

! Fixed smileys showing as text in notification previews, when viewed from a page which had no smileys in the first place. Please help me find other situations where this could occur. (Notifications.php)

! ..Such as in new thoughts. (Thoughts.template.php)

! Also fixed smileys not showing up on thought threads' master thought, whether using Ajax or not... Really, it was just an unrelated bug. (Thoughts.php)
Re: New revs
« Reply #2197, on August 1st, 2013, 09:29 PM »
rev 2197
(3 files, 1kb)

! Soft-merging broke un-ignore links on ignored posts. (Display.template.php)

! A matter of logic... The generic smiley CSS definition should be in the same file as the additional smiley definitions, as if the file fails loading, at least you won't get any awkward styling overrides. (Subs-Cache.php, sections.css)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #2198, on August 1st, 2013, 10:52 PM »
6 modified, 1 added, 42KB

Revision: 2198
Author: arantor
Date: 01 August 2013 21:51:37
Message:
+ Drag and drop board rearrangement. It gets kind of funky when you have many boards and the scrollbars misbehave but that's more of an issue of the underlying jQuery UI Sortable and the nestedSortable components rather than strictly anything else. Seems to work for me other than that. (contributors.txt, ManageBoards.php, ManageBoards.template.php, mana.css, jquery.mjs.nestedSortable.js, ManageBoards language file)
----
Modified : /trunk/Sources/ManageBoards.php
Modified : /trunk/Themes/default/ManageBoards.template.php
Modified : /trunk/Themes/default/languages/ManageBoards.english.php
Modified : /trunk/Themes/default/languages/ManageBoards.french.php
Added : /trunk/Themes/default/scripts/jquery.mjs.nestedSortable.js
Modified : /trunk/Themes/default/skins/mana.css
Modified : /trunk/root/contributors.txt
Re: New revs
« Reply #2199, on August 2nd, 2013, 07:38 AM »
2 files, 2KB

Revision: 2199
Author: arantor
Date: 02 August 2013 06:37:33
Message:
! Atom feeds shouldn't try to optimise links and also shouldn't really use content tags when summary would be more accurate. (Feed.php, Subs-Template.php)
----
Modified : /trunk/Sources/Feed.php
Modified : /trunk/Sources/Subs-Template.php

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #2200, on August 2nd, 2013, 04:18 PM »
rev 2200 -- this is \x01 complicated commit, my <head> is about to explode().
(10 files, 7kb)

* Replaced a few single-char str_replace calls with faster strtr's and some chr() with equivalent \x codes, could do more, but I'm not bothering. (Class-CSS.php, Class-System.php, QueryString.php, Subs.php, Subs-Cache.php, Subs-Template.php)

* Replaced a few create_function calls with faster hardcoded functions, whatever. Also, if parse_bbc's replacement is a failure, show it in italics, to point out there's a problem with it; I think it's for the best. (Class-System, Aeva-Embed.php, Subs-BBC.php)

* strpad() is a strange name for a function that converts a string to its unicode number... Uh? (Class-String.php)

! Removed brackets from a preg_replace. I think that one was a bug... $matches[1] would reach the outer brackets, not the inner ones. (ManageMaintenance.php)

! Because I forgot to account for them, using a | or || inside brackets in a we::analyze string, while allowed by my specs, would result in crossing the streams. Never cross the streams, it's bad. Okay, now you can use them. I think. (Class-System.php)

* Transformed another couple of preg_replace evals into callbacks; there are plenty left to do, though, in the following files: Class-CSS, Class-Editor, Subs-Media, Modlog, Post, and Subs-Cache. (QueryString.php, Subs-PrettyUrls.php)

@ Well, just like Pete said... These things are pretty fragile, and they need further testing; I've triple-checked them when committing, though, so hopefully any problems will be down to syntax errors, rather than logic oversights.

@ Note to self: I fixed \x0f\x10 to return "' in Subs-Cache, rather than '', because it seemed to make more sense. However, it may be a workaround of mine rather than a bug, so we'll have to be careful whether this breaks $txt handling in JS files, or if the really nothing was broken before is that I never used any strings with problematic characters in them.
Re: New revs
« Reply #2201, on August 2nd, 2013, 04:40 PM »
rev 2201 -- leftovers.
(5 files +1-1, 4kb)

! And of course, I forgot to commit Subs-Cache in the previous rev... Happens all the time, with my last-minute changes. (Subs-Cache.php)

* Translation. (Search.french.php)

* Renamed jquery.mjs.nestedSortable.js (gesundheit!) to nested-sortable.js. (ManageBoards.php, nested-sortable.js)

* Inline JS clean-up. (ManageBoards.template.php)

* Spacinazi. (ManageBoards.template.php)

* Commenazi. To be precise, the comment was saying the opposite of what it meant... Also, a personal note. The no_strip_domain context variable is equivalent to a hack I wrote months ago for the sendmail function, but never committed, and eventually rewrote with the new helper function prettify_url(). Technically speaking, whenever outputing raw XML or HTML that doesn't require any post-processing but pretty URLs, it's best to use prettify_url() and skip obExit() entirely, but it also means that macros aren't replaced, things like that, so... Maybe I'm just being too bitchy about this, and as a result I decided to keep no_strip_domain in place, and advienne que pourra, as we say on Mars. (Subs-Template.php)
Re: New revs
« Reply #2202, on August 2nd, 2013, 10:16 PM »
rev 2202 -- time for some bug fixing, man!
(2 files, 3kb)

! A beautiful bug in Wess... A year ago, rev 1667, I removed some pass-by-reference elements, and didn't realize that one of them needed to be there. As a result, it created situations where some selectors were mentioned twice. It probably wasn't very costly once gzipped, but it was still quite nasty, so here we go, a fix. (Class-CSS.php)

! Chrome 29+ would still add some prefixes to flexbox properties, even though I thought I'd unprefixed them. (Class-CSS.php)

! Cleaned up createPost topic creation query, and (hopefully) fixed a situation where it would reject the privacy value; a big woops. (Subs-Post.php)
Re: New revs
« Reply #2203, on August 3rd, 2013, 12:01 AM »
rev 2203 -- a quick one for the night...
(1 file, 1kb -- no, it's not a one-liner! Close enough, though!)

! IconList was broken in soft-merge mode. Also optimized a few lines, always feels good to use that one() function whenever I can..! (topic.js)
Re: New revs
« Reply #2204, on August 3rd, 2013, 03:55 PM »
rev 2204 -- scrollbar and notification fixes
(5 files, 4kb)

! Fix for a Chrome bug where scrollbars are glitchy when contained in a flex box. Unfortunately, the bug still happens in some situations. A minority, thankfully. (topic.js)

- Removed $email_data parameter from getEmail and other notifier functions; this wasn't used at all, and I don't even get what it's about, so... Let's just rewrite it if needed, alright Dragooon? (Class-Notification.php, Class-Notifier.php)

* A couple of 'new Notification' calls were done, instead of just 'new self', in the Notification class. (Class-Notification.php)

! Fixed template_notification_email, and saved some memory in the scheduled function. Thanks John for the suggestions! (Notifications.php, Notifications.template.php)