New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1875, on January 26th, 2013, 07:12 PM »
rev 1875 -- ask() fixes.
(4 files, 3kb)

! These JS ask boxes look great... But they break stuff, from time to time. Confronted to a choice between an ugly confirm box for the 'Delete post' link, and rewriting the mini-menu code, I chose the latter. So, removed the 'custom' option to add onclick events. Because jQuery has a .live() function to attach events to objects that aren't created yet, I can simply associate the function to the requested class. The code is a tiny bit longer, but it's in the footer... Heck, who likes confirm() over ask(), I'm asking? Yeah, thought so! :P (Display.php, topic.js)

! Fixed icon alignment in Add Ban area. (mana.css)

! Commenazi. (ManageSearchEngines.php)
Re: New revs
« Reply #1876, on January 27th, 2013, 06:28 PM »
rev 1876 -- I'm baaaad!
(2 files, 1kb)

! Fixed CSS @language parser... Again ;) (Subs-Cache.php)

! Typo resulting in a crash. Boo. (EmailTemplates.french.php)
Re: New revs
« Reply #1877, on January 28th, 2013, 11:53 AM »
rev 1877 -- more CSS fixes and preparing for the future.
(7 files, 9kb)

* Moved the iOS media query out of its own file so that it can be applied to any mobile device. This will allow me to test wedge.org extensively from my Galaxy SIII, so please bear with me if it doesn't look great. Also started fixing the looks of a few places in low-width mode... (header text and menu icon positions.) (extra.ios.css, index.css)

+ Decided to consolidate Wess and moved all prefixing code to it as well. The -prefix keyword should also be safer to use now, e.g. it won't break CSS classes like ".menu-prefix-element", if you ever needed to have such a class name... (Class-CSS.php, Subs-Cache.php)

+ Added support for min or max-device-pixel-ratio prefixing, because of the Firefox hiccup (min--moz-device-pixel-ratio, REALLY?)

! Fixed a Chrome v26 bug (let me insist, it's a bug from Chrome, not from Wedge) where adding a border to :hover or :focus on a textarea or input box will prevent it the latter from accepting text entry. It's completely silly and as yet unexplained. Hopefully it'll be fixed later but I'd rather not take any chances and will probably leave that hack in for quite some time. (index.css)

! Fixed print media query. It was hanging to its old #headerarea which hasn't existed for years (lulz?), so I modified it to hide the header, menu and sidebar. (index.css)

- Removed the 'strong' tag from pinned topic lists. Useg CSS to style their span instead. (MessageIndex.template.php, index.css)

! $reddish was indicated as an unused var, but it was very much used and should (semantically?) be in the var declaration area. (common.css, index.css)
Re: New revs
« Reply #1878, on January 28th, 2013, 06:42 PM »
rev 1878
(2 files, 2kb)

! Can't use $this inside a static method for the wess_prefixes rewrite... It slipped my mind for a minute. (Or half a day.) Considered moving everything to a static object, but seriously... Is it worth it? (Class-CSS.php)

* Minor updates to Warm... I'm afraid the most visible ones are the footer gradient (which is unlikely to stay forever), and the single extra pixel of padding in the linktree, which makes it look better IMHO... (Warm/extra.css)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1879, on January 29th, 2013, 12:31 AM »
(10 files, 4KB)

Revision: 1879
Author: arantor
Date: 28 January 2013 23:30:45
Message:
! SMF bug: DB could under some circumstances get into a very nasty infinite loop. (Class-DB.php)

! SMF issue: If we are doing a fatal error, clear any output buffers. I'm not any more convinced now than I was two years ago that it's strictly necessary but it can't *hurt* to have it. (Errors.php)

! SMF bug: There are some places where we do an MD5 comparison in an unsafe fashion. Not all of these *needed* to be patched, I'm just being over-thorough, and I think I did all the places it really matters. (upgrade.php, ManageServer.php, Security.php, Subs-Plugins.php)

! SMF bug: The number of password change tries was not always enforced properly. (Subs-Login.php)

! Missed changeover to cache lock file. (Subs-Cache.php)

! Don't use the Settings.php file for recording an error. On good systems this should be readonly anyway and not chmoddable from PHP without FTP help, so it won't even be writable. Instead use an error.lock file's mtime in the cache folder (which should be writable). This will also prevent any chance of the infamous race condition that causes Settings.php to be eaten. (Errors.php, Subs-Admin.php)
----
Modified : /trunk/Sources/Class-DB.php
Modified : /trunk/Sources/Errors.php
Modified : /trunk/Sources/ManageServer.php
Modified : /trunk/Sources/Reminder.php
Modified : /trunk/Sources/Security.php
Modified : /trunk/Sources/Subs-Admin.php
Modified : /trunk/Sources/Subs-Cache.php
Modified : /trunk/Sources/Subs-Login.php
Modified : /trunk/Sources/Subs-Plugins.php
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 #1880, on January 29th, 2013, 05:58 PM »
rev 1880 -- anti-prefetching stuff.
(10 files, 3kb)

* Harmonized calls to ob_end_clean() to ensure they get rid of all output buffers. (Dlattach.php, Errors.php, Security.php)

* Moved all anti-prefetch code to a single function. Adding an ugly parameter to allow for Wedge to bypass the test and simply force a 403 error. (Load.php, MessageIndex.php, Search2.php, Security.php, Subs.php, Unread.php, UnreadReplies.php)

! Wess was doing a useless foreach() that never got used. (Subs-Cache.php)
Re: New revs
« Reply #1881, on January 29th, 2013, 11:19 PM »
rev 1881 -- because I can :P
(7 files, 8kb)

* Moved all response_prefix cache getter/setter code to the Subs file, just like preventPrefetch(). This also fixes a minor issue where cache_get_data didn't indicate a TTL. Hopefully we'll remove all of this at some point and replace it with a better hack. Like, the robots.txt stuff maybe...? Dunno. (Display.php, JSModify.php, Merge.php, MoveTopic.php, PersonalMessage.php, Post.php, Subs.php)

* Renamed all $scripturl to <URL> in PersonalMessage.php. Left one in -- wasn't too sure whether it'd be properly converted, and I'm too tired to look into it. (PersonalMessage.php)

+ Added a, hopefully temporary, hidden $settings['allow_prefetching'] that should allow you to easily, errr... Do what its name says. Site-wide. If you like breaking your own sites... (Subs.php)

! Forgot to commit one of the preventPrefetch() calls... You were right, Pete. (Display.php)
Re: New revs
« Reply #1882, on January 31st, 2013, 04:12 PM »
rev 1882 -- Google Closure implementation. Thanks for the headaches!
(11 files +1, 23kb)

* Improved handling of already minified files with the Wedge minification process. Instead of using that strange <wedge_jquery> keyword, I'll instead rely on the filename following the jQuery convention, i.e. '*.min.js', meaning you can now safely add your own minified files if you're crazy like me about providing the smallest possible file and testing it through UglifyJS, Google Closure and other minifiers. This also allows jQuery UI to be kept as is. Finally, ensuring that '.min' is not kept in the final filename. This is totally untested, but don't tell anyone! (Subs-Cache.php, Load.php, jquery-1.5.2.min.js, jquery-ui-1.8.24.min.js)

+ Speaking of Google Closure -- added support for its API to Wedge. You'll be able to use Google's remote minification service if you really want to, but it's extremely slow, as expected. The best compromise is still to use Packer, which is pretty much just as efficient as Closure, at least for the Wedge files. (ManageServer.php, Subs-Cache.php, LANGUAGES: Help, ManageSettings)

+ I actually wrote a convoluted regex to convert Closure's returned UTF characters (like accented chars) back to UTF, and realized that the final file was always a couple of bytes larger. So, it was a nice piece of code and I'm committing it just in case to the attic. Additionally, I added extra functions and code to allow for non-Closure packed language strings to be optimized the same way. The more accents, the better the compression is. (attic/Unused-convertU.php, Subs-Cache.php)

+ As mentioned above -- added new functions to the string object: entity_to_utf8(), utf8_to_entity() and entity_to_js_code(). There are plenty of areas that could benefit from them, but I've only done the change in one file, sorry. That's in mimespecialchars(). And it's not even tested. Well, that's what beta testers are for! Get to work, now! (Class-String.php, Subs-Cache.php, Subs-Post.php)
Re: New revs
« Reply #1883, on January 31st, 2013, 04:18 PM »
rev 1883 -- the stuff I could afford to commit separately.
(5 files, 4kb)

! Fixed error log getting broken when showing very long lines. This was desperately in need of a word breaker... (mana.css)

! Fixed mini-menus to ensure they don't generate warnings in the JS console when being animated. This was due to jQuery not checking that a position is set to 'auto' and animating it as if it was a pixel value. So, yeah, 'NaNpx' and 'autopx', not too smart. It didn't crash anything though, which is why it took me so long to spot it. This adds 5 bytes to the gzipped file, which is okay considering I really wanted that fixed. (topic.js)

- The onComplete param was never used in Zoomedia. Thanks to Closure for pointing it out to me during my tests, I guess...! (zoomedia.js)

- Removing a temp code block that I committed by mistake in rev 1880, and which I'm not going to implement anyway. (Display.php)

* Quotenazi. Meaning, a dozen strings or so were using double quotes when they could use single quotes. It's not even gonna save a microsecond, but whatever works. (Security.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1884, on January 31st, 2013, 06:30 PM »
(10 files, 8KB)

Revision: 1884
Author: arantor
Date: 31 January 2013 17:26:56
Message:
+ Add ability to indicate maintenance mode will be required in plugins. (plugin-info.rng, ManagePlugins.php, ManagePlugins.template.php, Subs-Plugins.php, mana.css, ManagePlugins language file)
- Removed old sc/sesc legacy handling. There is no reason to accept a session id any other way. I haven't been able to break anything with doing this either. (wedge_api.php, Errors.php, ManageSearchEngines.php, Security.php, Subs.php)
----
Modified : /trunk/Sources/Errors.php
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/Security.php
Modified : /trunk/Sources/Subs-Plugins.php
Modified : /trunk/Sources/Subs.php
Modified : /trunk/Themes/default/ManagePlugins.template.php
Modified : /trunk/Themes/default/languages/ManagePlugins.english.php
Modified : /trunk/Themes/default/skins/mana.css
Modified : /trunk/other/plugin-info.rng
Modified : /trunk/other/tools/wedge_api.php


@ I didn't strictly *need* to do the sc/sesc change but it bugged me as it meant we were doing a lot of work for little benefit. The reason to preserve it - legacy - is no longer a reason, so let's just drop it and only support the more secure method we were really trying to use.
Re: New revs
« Reply #1885, on January 31st, 2013, 06:34 PM »
(1 file, 1KB)

Revision: 1885
Author: arantor
Date: 31 January 2013 17:33:39
Message:
! I documented it but forgot to include it >_< (ManageSearchEngines.php)
----
Modified : /trunk/Sources/ManageSearchEngines.php

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1886, on January 31st, 2013, 11:08 PM »
rev 1886 -- why do they keep calling it 'exifer' when it's 'exifixer'?
(4 files, 75kb, 99% of which is not my own work.)

* Updated Exifixer library to an unknown version number. Apparently the guys in charge didn't notice they broke their official site, so I found it hidden in their github repo. Since there are so many changes in the library (it's grown by 30KB), I'll just consider they still maintain it, and thus update it. BTW the new version is totally untested. I don't think there should be a problem with the gettext() calls and all, but I'm ready to revert this file change at any time. (Subs-Exif.php)

! Fixed a minor JS error that came up when clicking an attached file to remove it. Good news is, the fix actually saves 5 gzipped bytes. I want more bugs like this one!!!!!!!!1 (post.js)

* Translation. (ManagePlugins.french.php)

* Spacinazi. (smfinfo.php)
Re: New revs
« Reply #1887, on January 31st, 2013, 11:33 PM »
rev 1887
(3 files, 2kb)

* PMs viewed in conversation mode will now show a 'Reply to all' button next to the regular 'Reply' if there's more than one recipient. The problem with conversation mode is that it already adds a 'generic' Reply to all button at the top of the convo, but doesn't provide with a way to quote an actual PM and still forward it. I think it was an oversight on the SMF team's side... (PersonalMessage.template.php)

! Fixing a bug with Exifixer... Oops. Was too quick to commit. And nope, still haven't tested anything. Good times. (Subs-Exif.php)

- Segoe UI Light isn't good for a default font. Well, it's okay as a header font, but not for smaller headers. Given that a large percentage of users are still on Windows XP, and they don't have that font, I'd rather everyone have the same experience and see Franklin Gothic on a default Wedge install. Did you notice? I always come back to this one... (common.css)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1888, on February 1st, 2013, 04:38 AM »
(4 files, 13KB)

Revision: 1888
Author: arantor
Date: 01 February 2013 03:36:27
Message:
! An optimisation of sorts, replacing our regex for email validation with PHP's own facilities. (Subs.php)

! Ban UI. Not very thoroughly tested, may have various side bugs in it, but it does at least save bans now. Also fix a missing test case. (ManageBans.php, Security.php, ManageBans language file)
----
Modified : /trunk/Sources/ManageBans.php
Modified : /trunk/Sources/Security.php
Modified : /trunk/Sources/Subs.php
Modified : /trunk/Themes/default/languages/ManageBans.english.php

@ This could really use more testing. Much, much, much more testing. It tries to handle various insanities of non-Latinised domains just because I *can*. :wow:
Re: New revs
« Reply #1889, on February 1st, 2013, 05:01 AM »
(6 files, 2KB)

Revision: 1889
Author: arantor
Date: 01 February 2013 04:00:36
Message:
! Did I mention I hate the generic menu system and its strange handling of top level tabs? Well, this is what it took to fix the damn tabs in a fashion that makes sense. (Admin.php, ManageBans.php, language files: Admin, ManageBans)
----
Modified : /trunk/Sources/Admin.php
Modified : /trunk/Sources/ManageBans.php
Modified : /trunk/Themes/default/languages/Admin.english.php
Modified : /trunk/Themes/default/languages/Admin.french.php
Modified : /trunk/Themes/default/languages/ManageBans.english.php
Modified : /trunk/Themes/default/languages/ManageBans.french.php