New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #600, on February 6th, 2011, 10:04 PM »
rev 570
(2 files, 6kb)

* Improved performance of XML tree builder by 20% by applying various micro-optimizations. Not that it'll be noticeable, but a CPU cycle is a CPU cycle. (Class-CSS.php)
! Forgot to declare .title2 in Warm styling. (Warm/index.css)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #601, on February 7th, 2011, 12:05 AM »
Revision: 571
Author: arantor
Date: 23:00:29, 06 February 2011
Message:
! Sync to SMF 10403
 ! Non-existent permission profiles could cause undefined index errors. (ManagePermissions.php) [Bug 4612]
 ! Incorrect dots during upgrade with multiple script files. (upgrade.php) [Bug 4617]
 ! Who's Online integration hook was too restrictive. (Who.php) [Bug 4615] (+credits update, Credits.php)
 * Auto suggest could not handle display names with html special characters. (suggest.js) [Bug 4604]

Not included
 ! r10397 (changelog formatting)
 ! r10400 (possible to add the same function to a hook twice; not necessary due to the already-rewritten code)
 ! r10402 (typo in version check in fulltext API - but we require 4.1.2 which is over their version check automatically)
----
Modified : /trunk/Sources/Credits.php
Modified : /trunk/Sources/ManagePermissions.php
Modified : /trunk/Sources/Who.php
Modified : /trunk/Themes/default/scripts/suggest.js
Modified : /trunk/other/upgrade.php
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 #602, on February 7th, 2011, 01:21 PM »
rev 572
(10 files, 20kb)

* Rewrote the CSS parser to get rid of the XML parser and optimize parsing speed. Mission accomplished, with performance doubled, and code shortened by 90 lines and 2.6 KB. (Class-CSS.php)
- Got rid of the libxml dependency. Oh yeah. (install.php, readme_*.html, Class-CSS.php, Install.english.php, Install.french.php)
* Playing with Warm colors... Just for fun... (Warm/index.css)
* Typonazi. (Class-Package.php, Subs.php, readme_*.html)
Re: New revs
« Reply #603, on February 8th, 2011, 12:15 AM »
rev 573
(2 files, 5kb) (a very small fix update.)

! The lighten function was broken. (Class-CSS.php)
- Removed some leftover debug code. (Subs.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #604, on February 8th, 2011, 04:57 PM »
Revision: 574
Author: arantor
Date: 15:56:48, 08 February 2011
Message:
! Tweak to licence wording for our protection (license.txt)
! Sync to SMF 10446 aka "Clusterfuck"
 ! (10404) Minor improvements to integration hooks. (Admin.php, Load.php, ManagePermissions.php, ManageSettings.php)
 ! (10405) [2.1] Added detection for Litespeed as part of the server config. (Load.php)
 ! (10408) Tabs within code tags were not parsed correctly for some browsers. (Subs.php) [Bug 4578]
 ! (10414) Validate odd URLs (QueryString, Subs.php) *See notes
 ! (10415) Oops. Remove completely incorrect protection against $cachedir removal. (upgrade.php)
 ! (10419) Update the change in 10414, so that password flood is validated regardless of the number of times before it. (Load.php)
 ! (10439) Save a query on posting (topic=161621) (Post2.php)
 ! (10441) [2.1] Don't log robot views on topics or attachments. (Display.php, Dlattach.php)
 ! (10442) sprintf call for support resources language string was overridden. (Admin.php)

Not implemented
* r10406 [2.1] Moves the admin helper functions out of ManageServer and into Admin. I'll be doing this in the rewrite (I'm not so bothered about syncing 2.1 changes back to us and there are potential licence issues anyway with just using 2.1 branch code). There is also a tweak to allow for $context['body_id'] to be defined and if defined, attach that id to the body tag. I left it off because I'm not really sure where this would actually be useful. There is also a lot of changes for the language editor from/to display sanitising but I have absolutely no idea why it's changed (since it's not referred to at all anywhere I can find)
* r10407 [2.1] parsesmileys() created a regex too complex - I'm sure this has consequences I don't like, while it has performance, it's also more naive in how it approaches things I think (it's discussed in the beta board, and Unknown was trying to talk groundup out of it more than once) and it's more == to === conversions to safely ignore.
* r10409-10413 Minor fixes (1.0 SSI, 1.0 patch file, 1.1 spacinazi, 1.1 SSI, 1.1 patch file)
* r10416 Changelog update
* r10417 The change in 10414 to sanitise $_REQUEST['start'], I already added the check that this rev adds (that $_REQUEST['start'] is defined before trying to (int) it)
* r10418 Changing the SSI security thing AGAIN (in line with what 10409-10413 did, basically to ensure that the kickguest only got called when appropriate, but we don't kick the guest to login anyway, we do what makes more sense in the first place: restrict the user's access in SSI so they can't see anything they're not supposed to and let the folks who use SSI figure out what they want to do with the user thereafter)
* r10420-10437, 10443-446 Updating 2.0 patch file, spacinazi and patch file, 10414's fix backported to 1.0, and for 1.1, file versions for both, 1.0 patch file, 1.1 patch file, 1.0 cleanup, 1.0 patch file, 1.1 file version typo, 1.1 spacinazi, CRLF issues, more CRLF issues, 1.1 patch file, 1.0 language file version, 1.1 SSI examples, 2.0 patch file, update to manual to match the trademark slogan of SMF, 1.1 language file version, 1.0 patch file, 1.1 patch file, 2.0 patch file
* r10438 [2.1] Caching members online stats is fine but I don't like the way it's done (should really be done differently all round), and also more == to === changes
* r10440 [2.1] Moving a function from Subs-Auth to Subs-Compat is great but it's not relevant to us since it's in 4.3.2 and up!

Notes
* r10404 Sinan also added a hook to ManageSettings.php for general mod settings but that was already added by Nao under a slightly different name. In SVN log: [SiNaN] knows that he'll be shot for doing this but he still has the heart of a modder.
* r10405 [2.1] also covers making queryless URLs work on Litespeed but that doesn't apply to us. There's also a removal of a @ error suppressor in the install file and a few == to === conversions. Really though, this is pure pedantry.
* r10408 implements it with browser conditions in the definition of $tag['content'] in the original array. Since that's not an option for us, I handled it inside the validate function. I did also fix the rather frustrating issue of IE not putting treating br tags as line breaks for copying, this is something they haven't.
* r10414 is a strange one. I'll buy validation of the URLs to prevent oddities (QueryString, Subs) but it also has two other changes: it removes the char 38 replacement in un_preparsecode, which seems to be OK because & is still escaped to its entity form (though I don't see what prompted it to be changed) and there is more robust checking of password flooding, specifically that a user isn't logged out when there's a password attack.
* r10439 The idea is to move the 'logging boards read', so that if goback is set, we fold that into the 'logging unread' process. Their method involves having an if and two queries' code, mine just manipulates the query variables, heh.
----
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/Class-Editor.php
Modified : /trunk/Sources/Display.php
Modified : /trunk/Sources/Dlattach.php
Modified : /trunk/Sources/Load.php
Modified : /trunk/Sources/ManagePermissions.php
Modified : /trunk/Sources/ManageSettings.php
Modified : /trunk/Sources/Post2.php
Modified : /trunk/Sources/QueryString.php
Modified : /trunk/Sources/Subs.php
Modified : /trunk/license.txt
Modified : /trunk/other/install.sql
Modified : /trunk/other/upgrade.php

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #605, on February 8th, 2011, 11:34 PM »
rev 575
(9 files + 1 addition, ~10kb)

* Did some serious reworking of the header area. As always, it's a WIP, so feel free to share your ideas to improve on it (or just revert to what it was before.) Haven't tested in Pastel, I'm sure it'll be fun to see how broken it is. (index.template.php, Warm/index.css, images/theme/bg.jpg)
* Rewrote the cat bar and title bar to something else. Me likey.
- Don't waste time and bandwidth showing a clickable link on categories. They already have a collapse button next to them, that should be enough. Who uses collapsing anyway? (Subs-BoardIndex.php)
* Don't use windowbg overrides in the board list. Too many colors can kill the fun, really. (BoardIndex.template.php)
- Don't show the website's name next to "Info Center". The website's name is already in big large letters in the header. What's the point. (BoardIndexInfoCenter.template.php, index.english.php, index.french.php)
* The Search icon in the menu is off by one pixel. Or am I crazy? (Warm/index.css)
! Fixed issues with the channels() function. (Class-CSS.php)
+ Added ability to group properties together if they have the same value, e.g. "height, line-height: 20px". (Class-CSS.php, Warm/index.css)
* Various CSS tweaks. (Warm/index.css, Warm/sections.css, BoardIndexInfoCenter.template.php)

I'm expecting your feedback on the design tweaks, Pete! (And Bloc, maybe...?)
Not too happy with the part that prints the website's name, but the rest, I'm a bit happier with than with the earlier versions. And it's hard to please me really...
Re: New revs
« Reply #606, on February 9th, 2011, 03:43 PM »
rev 576
(5 files, 8kb)

* Saved another tenth of a second at CSS compilation time, by replacing a preg_replace_eval with a preg_replace_callback. Seriously, for a single instruction to take a tenth of a second... That's crazy. (Class-CSS.php)
! Mixin declarations would fail if they only a single-line 'function'. (Class-CSS.php)
! Mixin declarations should stop at the first line that has a shorter indentation than the first line of the 'function', rather than the first empty new line. That should teach you to behave. (Class-CSS.php)
! Fixed a missing overflow in Pastel. (css/index.css)
! IE6 was behaving badly in Warm because I forgot to update one of its hacks. (Warm/ie6.css)
* More tweaking to the Warm layout and colors. (Warm/index.css)
* The theme picker could use a visible title, really. (Themes.template.php)

NB: I'm currently playing with drag & drop, trying to make my routine as small as possible, and compatible with position:fixed (which represents most of the difficulty in this exercise.) Still, it's a funny thing to implement, and I need it for our future Highslide replacement.
Re: New revs
« Reply #607, on February 10th, 2011, 09:56 AM »
rev 577
(5 files, 12kb)

+ Added ability to compress and cache more CSS files that aren't in the base set. (QueryString.php, Subs.php)
! Fixed installer to properly compress and cache JS and CSS. At last. No animals were harmed during the fixing of this bug. Several gigabytes of data, though, were savagely killed on my test bed because I forgot to set a value for $cachedir. (install.php)
! Fixed Wireless template to use nested CSS. (Wireless.template.php)
- The script tag doesn't need a type for JavaScript. Forgot that one line. (index.template.php)

Note: Should we remove $is_direct_url from add_css_file and add_js_file? It sounds to me like it's a legacy option...
Re: New revs
« Reply #608, on February 10th, 2011, 10:52 AM »
rev 578
(4 files, 10kb)

+ Added <we:logo>, a placeholder for putting your own text and logo and styling it like you want. It's totally uncool. Punish me, master. Or at least revert. (Load.php, Subs.php, css/settings.xml, index.template.php)
! Fixed a bug in the CSS parser introduced in rev 577. Just needed to replace $files with $css. (Subs.php)

(I've never hated more a commit of mine than this one, so you've been warned. Still, if we can't make this kind of thing, then we might as well immediately drop the idea of integrating Tox-G in the future.)
Re: New revs
« Reply #609, on February 11th, 2011, 08:11 PM »
rev 579
(7 files, 13kb)

+ Added 'final' keyword to selectors, allowing to forbid another selector from inheriting a specific selector through the extends/base system. (Class-CSS.php, Subs.php, Warm/index.css)
* Tweaked header and reverted the order in which the user box and logo show up. Also did plenty of small tweaks to Warm based on user feedback. Thanks everyone! (css/index.css, Warm/index.css, index.template.php)
- Reverted <we:logo> code. I really felt it wasn't the right way to do it. (Load.php, Subs.php, css/settings.xml)

Note to Pete: I rewrote the 'final' code, as I wanted. Now it correctly cancels inheritance for nested selectors when the 'final' keyword is on a child, non-inherited level. If that means anything to you :P
Posted: February 11th, 2011, 07:46 PM

rev 580
(3 files, 9kb)

+ Added a short and sweet drag'n'drop function. Well, just the 'drag' part, but it's all I wanted anyway. (script.js)
+ Added ability to prevent an object from being dragged, by assigning the 'nodrag' class to it. (script.js, Help.template.php, Errors.template.php)
* Avoid initializing a HTML document if we're just coming through Ajax... (Errors.template.php)
- Removed all optimizations related to local variable/function names, because Parser supports them anyway. And if you're not using Parser, it means you don't care about filesize anyway... (script.js)
Re: New revs
« Reply #610, on February 11th, 2011, 09:21 PM »
rev 581
(13 files, 15kb)

* Renamed obfuscate_js back to obfuscate_filenames, as CSS filenames are now obfuscated just the same time as JS files. (install.php, ManageServer.php, QueryString.php, Help.english.php, Help.french.php, ManageSettings.english.php, ManageSettings.french.php)
* Restored alternating backgrounds in the board list, only horizontally this time... Not that I find this more exciting... Just wanna find out which is best. (BoardIndex.template.php)
! Toggle icon padding was incorrect in the news fader. (Warm/sections.css)
* Replaced toggle icons with way sexier ones (modified FamFam). Don't thank me. (collapse.gif, expand.gif)
* Prevent double-clicking the toggle icons. (script.js)
* Maintenance area was flooded with cat bars. Seriously, title bars are the way to go here. (ManageMaintenance.template.php)
Re: New revs
« Reply #611, on February 12th, 2011, 07:18 PM »
rev 582
(85 files, 83kb) (phew...)

* Important for modders -- $context['sub_template'] = $template has now become a function, showSubTemplate($template), which will automatically manage multiple sub-templates and sidebar sub-templates (showSubTemplate($template, 'sidebar')). (Activate.php, Admin.php, Announce.php, BoardIndex.php, Calendar.php, CoppaForm.php, Credits.php, Display.php, Findmember.php, Groups.php, Help.php, Jseditor.php, JSModify.php, Load.php, Login.php, Login2.php, ManageAttachments.php, ManageBans.php, ManageBoards.php, ManageCalendar.php, ManageErrors.php, ManageMail.php, ManageMaintenance.php, ManageMembergroups.php, ManageMembers.php, ManageNews.php, ManagePaid.php, ManagePermissions.php, ManagePosts.php, ManageRegistration.php, ManageScheduledTasks.php, ManageSearch.php, ManageSearchEngines.php, ManageServer.php, ManageSettings.php, ManageSmileys.php, Memberlist.php, MessageIndex.php, ModerationCenter.php, Modlog.php, Notify.php, PackageGet.php, Packages.php, PersonalMessage.php, Post.php, PostModeration.php, Profile-Actions.php, Profile-Modify.php, Profile-View.php, Profile.php, QuoteFast.php, Register.php, Reminder.php, RepairBoards.php, Reports.php, Reporttm.php, Search2.php, Security.php, SendTopic.php, Spellcheck.php, SplitTopics.php, Stats.php, Subs-Auth.php, Subs-Menu.php, Subs-Package.php, Subs.php, Suggest.php, Themes.php, Unread.php, Unreadreplies.php, VerificationCode.php, Xmlhttp.php)
* Rewrote menu system to use regular sub-templates rather than template layers, and allow putting them inside the sidebar flow. Still a bit buggy when it comes to tabs, though. (Subs-Menu.php, GenericMenu.template.php)
* I've always hated empty lines with tabs in source code. Yikes. (Profile.template.php)
* Simplified some CSS related to earlier implementations of the profile/admin sidebars, and made use of media queries instead of conditional refitting. (ie6.css, index.css, rtl.css, sections.css, Warm/ie6.css, Warm/index.css, Warm/rtl.css, Warm/sections.css)
- Removed #context .custom_field hack, as I couldn't find any issue with these in IE6 and Opera. (sections.css, Warm/sections.css)
- Removed support for old-style tabs, as pre-SMF2 themes aren't compatible with Wedge anyway. (GenericMenu.template.php, Recent.template.php, Reports.template.php)

@ Note: WrapAction() in Themes.php... Shouldn't this be removed, now that a hook caters for that?
@ Note: remove .left_menu and .side_section classes?
Re: New revs
« Reply #612, on February 12th, 2011, 11:18 PM »
rev 583
(11 files, 15kb)

+ Added support for $context['top_template'], which holds the secondary menus and tab buttons, and is protected from overwrites. (Load.php, Subs-Menu.php, Subs.php)
- Removed $settings['catch_action']. Seriously, it's totally undocumented, I couldn't find any mod using it, and we're pushing for the use of hooks anyway. And there's a hook that does exactly the same task. (index.php, Themes.php)
! Another fix for user agents not specifying the type of contents they accept. (QueryString.php)
* Tweaked sub_template handling. (Errors.php, Load.php, Profile.php, Security.php)
! Fixed an undefined index error that you'll never get anyway. (GenericMenu.template.php)
! Fixed XHTML Mobile 1.0 validation. (Wireless.template.php)
Re: New revs
« Reply #613, on February 13th, 2011, 12:12 AM »
rev 584
(1 file, 7kb)

! Fixed CSS parser bug where multiple selectors were given a same base (".class1, .class2 { base: .class }") and only the last one would correctly reflect that. (Class-CSS.php)
* Optimized inheritance parser to avoid running dozens of preg_replace's. (Class-CSS.php)
! Fixed handling of the 'final' keyword for finalized selectors' children. (Class-CSS.php)
! Fixed potential false positives when parsing selectors starting with an alphanumeric character. (e.g. a tag name) (Class-CSS.php)

@ Note: found another bug, will fix tomorrow... $this->getAncestorSelectors($this->rules[$node['parent']]['parent'])...? How does that work anyway? The function is expecting a node but it returns an ID. This works only if all cases where the selector is a root one.
Posted: February 12th, 2011, 11:50 PM

rev 585
(2 files, 5kb)

! Fixed extended selectors not applied correctly when they are themselves children of another selector. (Class-CSS.php)
* Spacinazi. (Warm/admin.css)

(Sorry for the last minute commit. I really didn't notice the bug until I reviewed the code for commit.)
Re: New revs
« Reply #614, on February 13th, 2011, 01:08 PM »
rev 586
(5 files, 10kb)

+ Added separators to the profile menu. (Profile.php)
! The duplicate separator removal code was buggy. Rewrote it from scratch. (Subs-Menu.php, GenericMenu.template.php)
! Don't show top_template items in Ajax mode. (Subs.php)
! Fixed missing parens in a dynamic function. (ManageMail.php)