New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1590, on May 22nd, 2012, 11:31 AM »
rev 1590
(1 file, 1kb)

* Only animate quick-edit subject input box if the subject was empty to begin with, i.e. it wasn't shown to the user. This is something that's only useful in Wireless, and since it's unlikely mobile users can watch full-fledged animations, I'm actually tempted to get rid of that animation altogether. (topic.js)
Re: New revs
« Reply #1591, on May 22nd, 2012, 11:32 AM »
rev 1591 (forget to tick a box... oops.)
(1 file, 1kb)

! weUrl() was recently broken for cookieless users. (script.js)
Re: New revs
« Reply #1592, on May 24th, 2012, 04:44 PM »
rev 1592
(7 files, 8kb)

+ Thought replies finally get to be shown without this dreaded 'Reload to interact' warning. Need to apply this to the Welcome template, uh... (Ajax.php, Home.template.php, Post.language.php, script.js)

* Sort selector lists before generating the CSS files. This helps a bit with overall gzip compression rates. (Class-CSS.php)

! Member-only thoughts weren't shown to anyone in profile pages. (Profile-View.php)
Re: New revs
« Reply #1593, on May 24th, 2012, 05:05 PM »
rev 1593
(9 files, 3kb)

* Simplified and shortened HTML for main and mini menus by moving the top arrow to a pseudo class, and doing some internal data analysis to avoid using an HTML id on mini-menus. Renamed .mimenuitem to .mimeitem for consistency. (Display.template.php, script.js, index.css, index.ie6.css, index.ie7.css, sections.css, Warm/index.css, Wireless/sections.iphone.css)

* Optimized a dozen more bytes out of the thought function... Oh well, you know how I am. (script.js)
Re: New revs
« Reply #1594, on May 24th, 2012, 06:35 PM »
rev 1594
(5 files, 4kb)

! Partly reverted my latest optimization, because it sucked and was buggy. Well, so what? I still saved a few bytes. (script.js)

* Added a 'Thought deleted' mention in case a thought was in reply to a... well, a thought that was deleted. (Home.php, Welcome.php, Post.language.php)

@ The profile version needs a rewrite. I'm currently putting it into its own page, where a thread will have a specify ID not linked to the owner. Heck, much better that way...
Re: New revs
« Reply #1595, on May 25th, 2012, 11:35 AM »
rev 1595
(12 files, 8kb)

* Rewrote some parts of the quick edit JS and HTML to simplify and shorten them. The HTML no longer needs to specify fallback templates. Error CSS is no longer hardcoded. Topic pages no longer need to specify the topic ID when calling a function -- the index template automatically specifies a we_topic variable when current_topic is set. Error message XML now specifies the target ID directly instead of asking JS to second-guess it. Etc. Overall, saved over 110 bytes in topic.js alone. (Display.template.php, index.template.php, topic.js, index.member.css)

* SMF bug: the topic ID is specified in both GET and POST when submitting a quick edit through Ajax. I can only confirm that it's fine not specifying the topic ID into the HTML form at all... (Display.template.php, topic.js)

* SMF bug: $context['message']['error_in_body'] was sent through cleanXml() even though it was just a boolean test... (Xml.template.php)

* SMF bug: modifytopicdone is never called when errors are found (it redirects to modifydone instead), so it doesn't need to test for errors. (Xml.template.php)

* Simplified various Aeva embedding methods. Flash will no longer show a codebase (it was the old Macromedia URL, and Adobe themselves don't seem to advocate for a codebase in the HTML), as well as WMP -- because it actually points to a 404! Well done, Microsoft... (Aeva-Embed.php)

* Renamed admin.css (admin area's CSS file) to mana.css, to avoid confusion with the 'admin' suffix for CSS files (used to keep a CSS file to administrators). 'Mana' is short for 'Manage', and it also justifies its use in the Moderation center, but it really is the RPG fan trying to justify the name change, ah ah. (Admin.php, ModerationCenter.php, admin.css, Packages.template.php -- when are we removing that file already, Pete? :P)
Re: New revs
« Reply #1596, on May 25th, 2012, 03:40 PM »
rev 1596
(4 files +5-12, 21kb)

+ And it's time for this dreaded rewrite of the CSS caching code... It still needs some work (especially with the replace suffix), but it works for now, so let's get it over with. Basically, instead of checking whether files exist (index.mysuffix.css), Wedge will instead go through all of the files and decide whether they should be included, allowing you to use comma-separated lists of suffixes, which solves an AWFUL lot of problems. It was harder to implement as it sounds, if only because Wedge needs to sort all files at the end of the process, while the original implementation was naturally sorted. (Subs-Cache.php, editor.*.css, media.*.css, zoom.*.css, Wine/index.*.css, Warm/index.*.css)

+ As mentioned, added a 'replace' suffix to the list of accepted CSS suffixes. This will basically delete any prior file with the same radix (index, sections, mana...) found in the CSS file list, i.e. files from a parent skin, allowing you to create an add-type skin and still benefit from a complete rewrite of, say, sections.css. (Subs-Cache.php, Load.php)

+ Added support for m, b and c suffixes, followed by a number. 'm1' will restrict a CSS file to member #1, 'b1' to board #1 and 'c1' to category #1. And another many issues were instantly solved. (Load.php)

! Canonical URLs for category pages were pointing to the homepage. (Boards.php)

* Replaced quote tag's quote icon with dynamically generated CSS. It doesn't look exactly the same across all browsers, but it saves 150 bytes off the final gzipped CSS file. I'm all for that... (index.css, quote.png)
Re: New revs
« Reply #1597, on May 25th, 2012, 08:31 PM »
rev 1597
(10 files +2, 20kb)

+ Implemented new pages for the thought system: a thread page and a rewrite of the profile page. This should at last make it more usable, even with thousands of thoughts around... (index.php, Home.php, Profile.php, Profile-View.php, Thoughts.php, Welcome.php, Profile.template.php, Thoughts.template.php)

! Fixed wrong days given in 'latest news' box in the admin area. (admin.js, xml/latest-news.php)

! Fixed improper number of lines in error popups. (ManageErrors.php)

* Styling detail. (index.member.css)
Re: New revs
« Reply #1598, on May 28th, 2012, 09:05 PM »
rev 1598
(11 files, 13kb)

+ Added support for a 'custom.xml' skin file. Basically, you can quickly add a new setting to a skin without needing to create a sub-skin. For instance -- adding a css option for loading a Google web font that will be overriding another font through custom.css. You won't be able to say I didn't think of everything... (Subs-Cache.php)

* Optimized parse_bbc() in various areas, notably to use a new $tag['len'] variable from the database instead of calculating it every time through strlen(). It doesn't save a lot overall, but it's also a very cheap new database field -- you can set it through 'update bbcodes set len = length(tag)'... (Subs-BBC.php)

* Saved some time when preprocessing media tags -- php and nobbc tags already pre-protect the tags so there's no need to test for them. Merged all preg_replaces into one, which makes the call a bit faster if you mix code, noembed and/or html tags in one post. Okay, it's not like I'm saving more than a microsecond... So what? Also optimized the media tag parser itself, for similar speed improvements... Meh. I did the work, so I have to commit it. (Subs-Media.php)

! Fixed Google Maps embedding (due to them now using HTTPS...) Looks like the embed code fixer is broken, I'll have to look into it another time. (Subs-Aeva-Sites.php)

! SMF bug (minor): max_image_width and max_image_height were both expected to be set, even though the later code will still test for them independently. (Subs-BBC.php)

- Removed support for the fixLongWords option, as it's now systematically enabled through CSS. (install.sql, ManagePosts.php, Subs-BBC.php, Admin.language.php, Help.language.php)

- Removed a few footer tags from the bbcode list, whenever they weren't used at all in the final CSS/HTML. Fixed margins around and inside quotes. (install.sql, index.css)

@ 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..?
Re: New revs
« Reply #1599, on May 29th, 2012, 05:25 PM »
rev 1599
(6 files, 2kb)

* Minor fixes to errorbox items. Also introduced a $subject_font variable for user names and board titles. Well, that's what I'm using it for anyway... (Admin.template.php, index.french.php, PersonalMessage.template.php, index.css, index.rtl.css, sections.css)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1600, on May 29th, 2012, 08:34 PM »
(2 files, 1KB)

Revision: 1600
Author: arantor
Date: 29 May 2012 19:33:25
Message:
! Allow plugin-defined actions to call static class methods as well as regular functions. (index.php, Load.php)
----
Modified : /trunk/Sources/Load.php
Modified : /trunk/index.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 #1601, on May 30th, 2012, 07:30 PM »
rev 1601
(3 files, 2kb)

+ New WeCSS feature: ifnull($var, something) will output $var if it's defined, or something (which can be a var, a string or nested ifnull calls) if it isn't. That regex was painful to write, as it refused to process my perfectly formed negative lookbehind assertion. Bugger. Now it's using a lookahead preceded by a possessive quantifier, the likes of which I rarely use. So maybe it's even neater. Added a few examples with cat/title font sizes. (Class-CSS.php, index.css)

! Aeva embeds were never pre-processed correctly when quick editing a post. Bad me. (JSModify.php)

@ Note: ifnull() is named after the MySQL function, and is a prototype. Maybe in the future I'll want to do something like if(var1, var1, var2) but it's unlikely.
Re: New revs
« Reply #1602, on May 31st, 2012, 08:22 PM »
rev 1602
(7 files, 4kb)

! Fixed ifnull() function (last-minute change that broke it... My nemesis.) (Class-CSS.php)

* Harmonized post buttons below textareas. (editor.css, index.rtl.css, Display.template.php, Media.template.php, PersonalMessage.template.php, Post.template.php)
Re: New revs
« Reply #1603, on May 31st, 2012, 11:50 PM »
rev 1603
(4 files, 3kb)

! Although it worked, the regex for matching media tags was a bit odd; rewrote it to ensure closing brackets inside quotes won't break anything. (Subs-Media.php)

! Fixed word wrapping in code blocks, except for my iPod where it's muuuuuch nicer not to have to bother scrolling manually. Have you ever tried that? Well it sucks. (index.css, index.iphone.css)

! Fixed 'remove nested quotes' when quote depth level is higher than 1. This one should work in all situations, and be more reliable than any proper recursive regex. (Post.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1604, on June 1st, 2012, 02:46 PM »
(10 files, 24KB)

Revision: 1604
Author: arantor
Date: 01 June 2012 13:44:57
Message:
! Admin intro code that I've been threatening to commit, only this time all cleaned up and should even be hookable. (Admin.php, Admin.template.php, ManagePlugins.php, Admin language file)

! Scheduled tasks fixes. Thanks Dragooon! (ScheduledTasks.php, ManageScheduledTasks.php)

! Allow for overriding settings manually as per Dragooon's request (ManageServer.php)

! The big change: overhaul of the Q&A to allow multi-language, multi-answer questions. It hasn't been battle tested yet but it seems to work in my tests. (ManageSettings.php, Subs-Editor.php, Admin.template.php, ManageSettings language file)
----
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/ManageScheduledTasks.php
Modified : /trunk/Sources/ManageServer.php
Modified : /trunk/Sources/ManageSettings.php
Modified : /trunk/Sources/ScheduledTasks.php
Modified : /trunk/Sources/Subs-Editor.php
Modified : /trunk/Themes/default/Admin.template.php
Modified : /trunk/Themes/default/languages/Admin.english.php
Modified : /trunk/Themes/default/languages/ManageSettings.english.php

@Nao, feel free to go nuts with optimising the anti spam Q&A code, I deliberately didn't optimise it while writing it because it was done in stages, and if you want to fix the alignment of buttons, please do feel free.