New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1680, on September 1st, 2012, 11:32 AM »
rev 1680
(8 files, 7kb)

@ This commit adds my hacks and fixes to the BBC parser that pretty much makes quotes work better than anywhere else (provided you supply them with clean CSS and collapsible margins.)

* Rewrote more BBC parsing code. Optimized whitespace discovery in trim_wspace code. Optimized footnote handling (by a tiny bit.) And other minor fixes. (Subs-BBC.php)

* Rewrote loadSource() to add an extra layer of filename caching. This should be about twice faster than directly calling require_once, but only in critical situations. So, yeah, basically you could say that it's useless. Still, it should be faster than even a function_exists() call, so it helps here and there, too. (Load.php, PersonalMessage.php, Post2.php, Subs-BBC.php, Subs-Media.php, Subs-Template.php, Subs.php)

+ Added a quote handler hack to trim whitespace inside and around them. Reset database trim settings for them as well, as there's no need for them to go through more code. (install.sql, Subs-BBC.php)
Re: New revs
« Reply #1681, on September 4th, 2012, 02:49 PM »
rev 1681
(14 files +2-3, 12kb)

* Rewrote window resizing code. Instead of JavaScript (which always added about 150 bytes per page), we'll now be relying entirely on media queries, which feel more natural in this case. Moved the responsive CSS from index.css to a new extra.css file (well, it's new for Weaving), although it's totally not needed so I may change that in the future. Doesn't work in IE6 for now, and sub-skins have yet to be committed (it's working, but it's not ready yet.) (index.template.php, index.css, sections.css)

@ There are a few caveats involved in media queries compared to my earlier #responsive implementation -- first of all, extending a class inside a media query is impossible, because you can't target it outside of a media query (@media keywords don't act like a selector themselves). Also, #responsive targets any changes in the main div's width, while @media will only see changes to the window/tab width, so you need to take sidebar width into account, and if for instance you change its width without changing the window size, the sidebar won't be moved. Finally, precedence order is no longer the same, as @media selectors don't change priority in source order, so you'll have to either be very careful with sub-skins, or use tricks like targeting an upper ID first inside the media query. This is what I'm doing right now, may change if it causes other issues: the media query targets 'body #edge' for instance, so if you override #edge later in your sub-skins, the media query won't get in your way. You will, however, have to target #wedge #edge as well if you need to rewrite #edge in a sub-skin's media query. As unlikely as it sounds.

* Due to the above, reverted the window.weres test in sbox.js to use window.eves instead, and made sure that eves is always set (i.e. if there are no delayed events, it's set to 1 regardless.) (Subs-Template.php, index.template.php, sbox.js)

* Deleted whitespace from all menu code. While it was 'nice' to have these properly indented, it's still my #1 goal to save bandwidth, especially at the beginning of a page. If a HTML page isn't gzipped, it can save up to 1.5KB on admin pages! Plus, it saves us a CSS hack akin to text-space-collapse, and it makes it easier to just skip to the proper content when you're examining the source code. (GenericMenu.template.php, index.template.php, index.css)

* Renamed latest-packages to latest-plugins. Even though the feature is disabled for now, it's no reason not to update the terminology... (other/xml/latest-plugins.php, Packages.template.php)

* Added support for newest version of the skin selector plugin. (Themes.php)

* Commented out the alert/confirm variations, as I'm not using them for now, and we might as well saved the compiled space... This will be for a future version, I'm afraid. (script.js)

* Changed extra.firefox[-2].css prefix to common.*, so that the inline-block fix is also applied to non-main CSS files. Eh. (*.firefox[-2].css)

! Fixed a couple of issues with the error log layout. (Errors.template.php, mana.css)

- Deleted duplicate hacks from IE6 and IE7 specific files. (extra.ie6.css, extra.ie7.css, editor.ie[-7].css)

* Commenazi. (Poll.php, index.css)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1682, on September 4th, 2012, 08:59 PM »
(7 files, 5KB)

Revision: 1682
Author: arantor
Date: 04 September 2012 19:58:45
Message:
! No need to check for the old installed-packages list being writable in the installer. (install.php)

! Can't have a default of -1 for an unsigned column, making it signed for the time being until we can establish whether -1 is a valid value for that column anyway. (install.sql)

! Allow custom fields to be displayed on the member list. Only one extra query, too. (ManageMemberOptions.php, Memberlist.php, Memberlist.template.php, Admin.template.php, ManageSettings language file)
----
Modified : /trunk/Sources/ManageMemberOptions.php
Modified : /trunk/Sources/Memberlist.php
Modified : /trunk/Themes/default/Admin.template.php
Modified : /trunk/Themes/default/Memberlist.template.php
Modified : /trunk/Themes/default/languages/ManageSettings.english.php
Modified : /trunk/other/install.php
Modified : /trunk/other/install.sql
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 #1683, on September 5th, 2012, 11:53 PM »
rev 1683 -- seriously hoping I didn't commit anything unneeded or undocumented...
(12 files -2, 12kb)

* Replaced arrow images (in linktree and menus) with CSS content. This saves a few dozen bytes at compression time, and is much, MUCH better in terms of code logic. For instance, we no longer need to add extra padding. Plus, there are two new classes (.vertical-arrow and .horizontal-arrow) and yes, they're re-usable. As usual, support is only provided for Weaving for now. (index.template.php, common.css, index.css,

- The extra.firefox[-3.6].css file in Wine was no longer needed, as the sidebar is now pushed to the bottom... (extra.firefox[-3.6].css)

- Removed a few IE6/7 hacks related to the arrows. Basically: nope, arrows no longer show up in these browsers... But I don't think it's worth wasting time (and bandwidth) trying to support these old browsers. (extra.ie6.css, extra.ie7.css, Wuthering/extra.ie6.css)

+ Added a nice radial gradient to IE9 menus. Actually, it's the only browser that seems to perform well with intensive inset box-shadows, so, for once, IE9 is going to look better than any other browser... (extra.ie9.css)

* Updated documentation in the index.css header to add the latest suffixes supported. (index.css)

! Fixed wrong CSS being generated if two @media keywords were used in a row. Hopefully that doesn't break anything else... This feature needs some serious checking. (Class-CSS.php)

* Translation. (ManageSettings.french.php)

* Spacinazi. (Wireless/extra.iphone.css)
Re: New revs
« Reply #1684, on September 6th, 2012, 04:21 PM »
rev 1684
(7 files, 9kb)

! Help popup titles were broken by the resizer code change. Don't ask -- don't tell. (Subs-Template.php)

! Fixed responsive mode on iOS. Yeah, contrary to popular belief, responsive isn't just for mobile... Otherwise it would be called mobile mode or something. (extra.iphone.css)

! Fixed responsive mode in sub-skins. (Warm/extra.css, Wuthering/extra.css)

* Overhauled parts of the menu CSS, mostly to simplify it. It worked. Also fixed anything in sub-skins due to the menu rewrite. (common.css, index.css, Warm/extra.css, Wuthering/extra.css)
Re: New revs
« Reply #1685, on September 7th, 2012, 12:18 AM »
rev 1685
(5 files, 3kb)

+ Added WeCSS support for '!' character in selectors -- this is a new one from the CSS4 drafts, marking the subject (desired target) of the selector, our developer dreams come true (believe me.) (Class-CSS.php)

* Managed to harmonize the arrow size across all my test browsers (let's be clear: Opera, Firefox and some IE just to be sure), without increaing the filesize too much. (common.css, index.css)

! Magically found a workaround for menu text overlapping the arrows in IE9... Just needed to add overflow:hidden to the container. And it doesn't seem to break anything else. A little prayer maybe..? I'm sure that'll help. (index.css)

! Fixed plenty of problems with various IE versions in the Wuthering skin. Yeah, not my favorite skin, and not my favorite browser -- no wonder I didn't test that case thoroughly... (Wuthering/extra.css, Wuthering/extra.ie[-9].css)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1686, on September 7th, 2012, 03:31 AM »
(3 files, 4KB)

Revision: 1686
Author: arantor
Date: 07 September 2012 02:30:13
Message:
! There are certain permissions that guests and regular members should never have. (ManageMembergroups.php)

! Clean up the dropdown for quick moderation, now it's accessible through the main message index hook (can't yet extend behaviour, just the displayed dropdown), and saves a bit of code on the side. (MessageIndex.php, MessageIndex.template.php)
----
Modified : /trunk/Sources/ManageMembergroups.php
Modified : /trunk/Sources/MessageIndex.php
Modified : /trunk/Themes/default/MessageIndex.template.php

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1687, on September 16th, 2012, 06:57 PM »
rev 1687 -- huge commit, splitting the changelog into three for your convenience!
(22 files +6-2, 39kb)

Cache changes:

+ After I decided to add version numbers to the CSS file URLs, I realized that in production, the number of variations was much higher than I expected, making for hundreds of files quite quickly. As retaliation, I decided to split the CSS files into multiple folders, and one thing led to another... Reverted /cache/data to /cache, and created new cache folders /css and /js. This is helpful in several ways: first of all, it saves a couple of bytes off each page header, it prevents users from seeing a URL with the name 'cache' in the HTML source, and it allows for better dispersion of files. The css folder, notably, can have sub-folders, allowing for nearly unlimited skins to be added. Also moved $cachedir validity tests directly to Settings.php. (cache/*, css/*, js/*, Subs-Cache.php, index.php, SSI.php, install.php, QueryString.php, Subs-BBC.php)

@ I don't know if $cssdir and $jsdir are really needed because I'm hardly going to have a matching $cssurl/$jsurl system, so I might as well force them to be at the root...?

! Cache folders weren't allowing index.php to be executed, causing their redirect code to be worthless... (cache/.htaccess)

Wess changes:

* Renamed WeCSS to Wess. What do you know, I wrote it, I can do whatever I want with it, ah ah. Next week I'll rename it to LlamaBurp, and next year it'll be TheCssPreprocessorFormerlyKnownAsDidYouHideMyRemote?IncludingTheQuestionMark. (Subs-Cache.php, Class-CSS.php, editor.css)

@ Rewrote clean_cache() function to support recursive calls (e.g. cleaning up all CSS sub-folders), and cleaning up by last modified date. (Subs-Cache.php, ManageServer.php)

+ In addition to 'mixin: mixin-name', you can now mix any selector into another, just like extending it would do. Please try and keep these selectors simple though, it could get messy otherwise. Now the only difference between using plain selectors and @mixin declarations is that the latter allows you to specify parameters, unlike classes and so on. Well, until I get to support them with a 'params' keyword or something...? Anyway -- just keep it low for now, I'm only doing this to easily mix .inline-block into media queries. What a mess. (Subs-Cache.php, Class-CSS.php, sections.css)

+ Added support for new keyword, 'mixes'. Which, guess what, behaves exactly for 'mixin:' as 'extends' does for 'base:'. Have fun. (Class-CSS.php)

+ Added new @is() function. The first parameter should be a browser, browser with version or quoted comma-separated list of browsers, the second parameter (usually between quotes) has the resulting content if the user is using that browser (or another function like RTL etc), and the third parameter has the content for failed matches, quite obviously. Also features of my most amusing regexes of recent times. So, basically, @is() is just like {}, except you're not limited to mixin and variable declarations. It's very likely that I'll remove the {} hack in the future. (Class-CSS.php)

! Fixed bug where the extends or unextends keywords could be ignored when inserted at the end of a file. (Class-CSS.php)

* Simplified smiley CSS files to only include something extra in the filename if the browser (i.e. IE < 8) doesn't support base64 encoding. (Subs-Cache.php, Class-Editor.php)

* Rewrote {%dynamic_function:paramlist%} to be cleaner. You should now use @dynamic dynamic_function(paramlist) instead. And you don't have to mess with $match in your params again if your dynamic function doesn't need parameters. (Class-CSS.php, admenu.css, index.css)

* Renamed ifnull() to @ifnull() because it's a conditional, like a media query. (Class-CSS.php, index.css)

Other changes:

* Replaced button bevel with a more convenient box shadow. (index.css, bevel.png)

* And generally rewrote buttons to use box shadows instead of gradients. Which has the added benefit of working in IE9. (index.css)

* Replaced hardcoded inline-block emulation for media queries with a mixin call to the .inline-block class... This is a smart way of emulating extends when within a media query that, by definition, doesn't accept any external influence and thus doesn't accept the 'extends/base' keyword. (sections.css)

* Opera 12.50 was renamed to 12.10, so updated Wess to reflect that. (Class-CSS.php, editor.js, index.css)

! [Semi SMF-bug] Fixed regression from revision 941 which made Settings.php stop executing before the end. That was due to a friggin' exit call at the end of a line that's still present in SMF 2.1, FWIW. Hence the tag. (Please push it to the next line to avoid any discomfort.) (Settings.php, ...)

! Some fixes for Wuthering. More fixes coming later -- the recent rewrites have again added more glitches to sub-skins. (Wuthering/extra.css, Wuthering/extra.ie[-9].css)

- Removed that nice little average() function call for IE9 menus... Now that it's using box shadows, it's no longer needed, and no longer used in Wedge, but I will always insist on keeping that function available to themers. (index.css)
Re: New revs
« Reply #1688, on September 16th, 2012, 09:17 PM »
rev 1688
(3 files, 1kb)

! Fixed a couple of places where I forgot to update the URL for smileys. (Class-Editor.php, Subs-BBC.php)

! Fixed undefined index error in member list. Well, applied Pete's fix. (Memberlist.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1689, on September 17th, 2012, 02:54 AM »
(6 files, 22KB)

Revision: 1689
Author: arantor
Date: 17 September 2012 01:54:03
Message:
! Rewrite of quick moderation to 1) not be completely lame and 2) to be almost totally extensible. It's probably got some niggly bugs regarding own/any permissions, I haven't tested it that heavily. Also created a new hook for both extending the selectbox (seeing how it appears in search) and the main message index specifically and updated everything to go with it. (ManagePlugins.php, Merge.php, MessageIndex.php, QuickMod.php, Search2.php, Search.template.php)
----
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/Merge.php
Modified : /trunk/Sources/MessageIndex.php
Modified : /trunk/Sources/QuickMod.php
Modified : /trunk/Sources/Search2.php
Modified : /trunk/Themes/default/Search.template.php
Re: New revs
« Reply #1690, on September 17th, 2012, 04:13 AM »
(4 files, 6KB)

Revision: 1690
Author: arantor
Date: 17 September 2012 03:13:08
Message:
! Add new type to the configuration settings setup to allow plugins easy configuration to boards in bulk. It's also in the main plugin settings-page stuff, too. (ManageServer.php, ManageSettings.php, Admin.template.php, plugin-info.rng)
----
Modified : /trunk/Sources/ManageServer.php
Modified : /trunk/Sources/ManageSettings.php
Modified : /trunk/Themes/default/Admin.template.php
Modified : /trunk/other/plugin-info.rng
Re: New revs
« Reply #1691, on September 17th, 2012, 02:13 PM »
(3 files, 1KB)

Revision: 1691
Author: arantor
Date: 17 September 2012 13:12:42
Message:
! (SMF bug?) Missing " in Search template. (Search.template.php)

! Don't show the "send topic starter a PM" option when moving a topic if it's their own topic. (MoveTopic.php, MoveTopic.template.php)
----
Modified : /trunk/Sources/MoveTopic.php
Modified : /trunk/Themes/default/MoveTopic.template.php
Modified : /trunk/Themes/default/Search.template.php
Re: New revs
« Reply #1692, on September 17th, 2012, 02:39 PM »
(3 files, 1KB)

Revision: 1692
Author: arantor
Date: 17 September 2012 13:38:54
Message:
! Sometimes fields were demanded of users when not even shown to them. (Profile.php)

! Custom fields with a mask would in practice always be required even if set not to be, since a blank string wouldn't match the mask. (Register.php)

! Cruft related to old time offset. (Register.php, Register.template.php)
----
Modified : /trunk/Sources/Profile.php
Modified : /trunk/Sources/Register.php
Modified : /trunk/Themes/default/Register.template.php
Re: New revs
« Reply #1693, on September 18th, 2012, 01:45 AM »
(4 files, 2KB)

Revision: 1693
Author: arantor
Date: 18 September 2012 00:44:48
Message:
! New hook for extending the moderation log. (ManagePlugins.php, Modlog.php)

! Prettying up the merge topics screen by having boards actually indicate their depth. (Merge.php, Merge.template.php)
----
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/Merge.php
Modified : /trunk/Sources/Modlog.php
Modified : /trunk/Themes/default/Merge.template.php

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1694, on September 18th, 2012, 03:43 AM »
rev 1694
(10 files -1, 3kb)

* Upped minimum PHP version from 5.2.3 to 5.2.4... Everyone is using 5.3 or 5.2.17+ these days anyway... (install.php, readme_*.html, upgrade.php...)

* ...And all that, just so we can use \h instead of [\t ] in regexes. That's just Nao for you. (Class-CSS.php)

! Moved wess_if plugin closer to the beginning of the stack. Technically, an @is (browser) call should be done before mixins are processed, because the browser name and version is a global, never changes, and thus *when* it's executed has no influence over the outcome. (Subs-Cache.php)

* @is is cool... I think?! At least it allows me to remove some short files that only contain a couple of entries. (zoom.css, zoom.ie[-7].css)