New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #2025, on March 27th, 2013, 10:10 AM »
rev 2025 -- Wess bug fixes.
(1 file, 3kb)

! In some situations, calling @if/@endif in CSS code would crash Wedge. After a painful debugging session, I discovered that I could either force php.ini's pcre.recursion_limit to something sensible in Windows (which was compiled to have a very small recursion stack, unlike Linux versions) and then use preg_last_error() to catch recursion errors, or... I could simply use my Goddess of All Regex trick. That's the name I gave (in reference to one of Karl's expressions) to the atomic grouping hack that I cooked up something like 5 years ago, and that sealed my descent into the abyss of PHP programming and regex madness. That's it: turning a simple '(?:' into '(?>' was enough to make Wess behave. I considered using it in the @is handling code path as well, but it's probably useless because inline code is generally extremely short and doesn't suffer from backtracking issues. (Class-CSS.php)

! Opera 12.1+ supports the new flex model, but it's buggy. To be specific, sometimes divs will overflow out of their defined boundaries, and I couldn't find any workarounds for that, unlike Firefox and Chrome quirks I met during development. Because I'm now using a Chrome fork as my main browser, and my beloved Opera will switch to WebKit later this year, I don't think it's worth the hassle, so I'm removing Opera from the list of browsers aliases by the 'can_flex' constant. (Class-CSS.php)
Re: New revs
« Reply #2026, on March 27th, 2013, 10:11 AM »
rev 2026 -- short, thematic commits help me clear my head.
(1 file, 3kb)

! Fixed fallback layer/block selection in Wess. For those interested, here are some details... Doing something like wetem::before(array('sidebar', 'default'), 'my_block') would work because both items (sidebar and default) are layers. However, wetem::before(array('target_block', 'target_layer'), 'my_block') would always select the fallback layer even if target_block existed, because layers had priorities in my code. This is due to the refactoring I made to the skeleton code back in late 2011. At the time I wrote the find() function, the skeleton system just wasn't strong enough to accomodate for this. Now it is. And it allows me to remove that weird code block with all the iterator objects. Which are incredibly, horribly slow according to a quick benchmark. (Class-Skeleton.php)

* Optimized weSkeleton->has() for speed, if used on a layer. (Class-Skeleton.php)
Re: New revs
« Reply #2027, on March 27th, 2013, 10:22 AM »
rev 2027 -- nearly 1000 revisions after I personally introduced that huge bug...
(7 files, 2kb)

! Fixed 'new posts' warning not triggering when replying from the full Post page. This annoying bug really annoyed/bugged the hell out of me for months, until I realized yesterday it was all my fault, so: sorry guys, I'm bad. I forgot to rename a few 'last_msg' occurrences to 'last'. (Display.php, Post.php, SSI.php, MessageIndex.template.php, Post.template.php, Xml.template.php, post.js)
Re: New revs
« Reply #2028, on March 27th, 2013, 10:28 AM »
rev 2028 -- a selection of smaller fixes. Just because they're small doesn't mean they should be ignored. Especially the eye.
(5 files -1, 3kb)

! The language links were silly. They thought a language couldn't have dashes in it. English-uk just proved them wrong. They apologize for any inconvenience, as well as infinite ;language=...;language=... links. It was fun while it lasted. (index.template.php)

* Quotenazi. Will do more of these soon enough... (index.template.php)

* Spacinazi. Harmonized code to Wedge standards: we do "$ref =& $var", not "$ref = &$var", even though it's technically the same. Semantically, "=&" means to me "assign by reference", so it's more readable that way. Hence the standard. (Profile-Actions.php, Subs-Plugins.php)

* Typonazi. Or Commenazi. Whatever you like best. (Class-Notification.php)

* Optimized hidden.png file for size (saves nearly 200 bytes). I'm still not a big fan of this icon... I'm sure it's under my bed it's hiding. It watches me at night. With a grin. On its mouthless face. #MommyImScaredIDontWannaSleepAlone (hidden.png)

- Removed spell.png file... As far as I know, it's not in use anymore. Life is good. (Except when the hidden.png eye is watching, of course.) (spell.png)
Re: New revs
« Reply #2029, on March 27th, 2013, 11:48 AM »
rev 2029
(4 files +1, 4kb)

+ All touch-enabled devices will now get automatic quote splitting for free. As they don't have a Shift or Ctrl key to use along with Enter, it only makes sense, especially given how hard it is to make quotes in mobile mode. Heck, this suddenly makes quoting messages possible in Android, iOS and whatever. Thanks Dragooon for the suggestion! (editor-func.js)

* Because the registration agreement is a special language string that's explicitly parse_bbc'd, I turned its HTML tags (double line-breaks) into actual line-breaks. This also makes them easier to use them as base for your own registration agreement. If you're never heard about text wrap mode, of course. (Agreement.language.php)

* Missing file. Note that Home files are not supposed to be in the final distro, and that I'm sure I'll forget all about it soon enough, but whatever... (Home.english-uk.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #2030, on March 27th, 2013, 09:45 PM »
(2 files, 2KB)

Revision: 2030[1]
Author: arantor
Date: 27 March 2013 20:44:07
Message:
! Some missing and slightly inaccurate who's online strings. (Who language file)
! Injected error information would be overlooked. Most useful for bans. (Who.php)
! Pretty URLs don't save the user id into the URL for profiles, so viewing any other user's profile would always fail in who's online. (Who.php)
----
Modified : /trunk/Sources/Who.php
Modified : /trunk/Themes/default/languages/Who.english.php
 1. I can't help but feel we should have had a Terminator reference by now.
Re: New revs
« Reply #2031, on March 28th, 2013, 04:53 AM »
(7 files, 6KB)

Revision: 2031
Author: arantor
Date: 28 March 2013 03:52:37
Message:
! Missed English UK translation. It's entirely possible there will be more. (Reports.english-uk.php)
! Group styling is now handled with CSS classes, dynamically pulled into index.css. It's all very magical. If you're very good, I might even extend this to include bold and italics and stuff. But only if you're very well behaved. (ManageMembergroups.php, Profile-Modify.php, Subs-Cache.php, Subs-Membergroups.php, Subs-Template.php, index.css)
----
Modified : /trunk/Sources/ManageMembergroups.php
Modified : /trunk/Sources/Profile-Modify.php
Modified : /trunk/Sources/Subs-Cache.php
Modified : /trunk/Sources/Subs-Membergroups.php
Modified : /trunk/Sources/Subs-Template.php
Modified : /trunk/Themes/default/languages/Reports.english-uk.php
Modified : /trunk/Themes/default/skins/index.css
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 #2032, on March 28th, 2013, 07:42 PM »
rev 2032 -- notification updates. And also the year where Bubblegum Crisis starts...[1]
(9 files, 13kb)

+ Split loadMemberContext() into another function, loadMemberAvatar(), which can load a user's avatar and only that, if you don't need anything else, including expansive things like signature. (Load.php)

* Moved notifications bar to the header, with fallbacks to the sidebar and the main layer. (Notifications.php)

+ Added loadMemberData() to all notifications prior to showing them. This allows you to show an avatar next to the notifications. This is only temp code, as from what I gathered, Dragooon offered a patch to add proper support for issuers, meaning this will probably require tweaks. (Notifications.php)

* Updated notification code to optimize template size. There is more to come... But it implies committing more files, and I need to draw a line. So, in case you're wondering: if it's buggy, I'm probably already aware of it... (Notifications.template.php, index.css, notifications.js)

* Notification popup will now use proper relative positioning, instead of JavaScript-driven positioning. The notification JS is thus probably unrecognizable by now... The magic of Naoisms. It's also much, much shorter. By something like 100 or 150 bytes. I'll add Wess support for user-select later. It's in my to-do. (index.css, notifications.js)

* Notification CSS is member-only. Saves bytes! Also fixed things like ':parent'... (index.css)

* Moved some CSS around for logic reasons. And yes, it saves bytes, too... (index.css, sections.css, index.member.css)

* Translation, spacinazi. (Notifications.language.php)
 1. If I couldn't reference Blade Runner and Akira's 2019 setting, then at least I can reference the best Blade Runner clone ever released, made around the same time as Akira... Lucky me ;)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #2033, on March 28th, 2013, 11:53 PM »
(4 files, 8KB)

Revision: 2033
Author: arantor
Date: 28 March 2013 22:51:22
Message:
! Silly linktree bug of mine. Only occurred in rare circumstances. (Subs.php)
! Plugin permissions oddities from my removal of the simple view. (ManagePermissions.php)
! Poll display should be separated out a bit. (Display.php, Display.template.php)
----
Modified : /trunk/Sources/Display.php
Modified : /trunk/Sources/ManagePermissions.php
Modified : /trunk/Sources/Subs.php
Modified : /trunk/Themes/default/Display.template.php

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #2034, on March 29th, 2013, 12:06 AM »
rev 2034 -- avatar and notification fixes from rev 2032. Hopefully didn't forget anything...
(4 files, 2kb)

! Fixed a wrong test that preventing avatars from being shown at all in topic pages. (Load.php)

! And, hum, another minor bug prevented avatars from being re-filled when first calling loadMemberAvatar and THEN loadMemberContext. Not that I think this would happen normally, but I'd rather not take any chances. (Load.php)

! JavaScript retrieval of notification updates would break because of a wrong variable name, effectively emptying the popup (that's for anyone wondering why this would happen.) (Notifications.php)

! Some quick temp hacks to fix notification popup styling. (Notifications.template.php, index.css)

* Made $avatar_width and $avatar_height static. (Load.php)
Re: New revs
« Reply #2035, on March 29th, 2013, 09:56 PM »
rev 2035
(7 files -2, 11kb)

+ weSkeleton()->rename() was a layer-only function. From now on, it can also rename blocks. Don't abuse it! (Class-Skeleton.php)

! add_plugin_css_file() is a bit broken. Notably, its param list was always added to the filename, instead of the elements actually used in the file. Until we do something better, I'm removing most of the (relatively useless) suffixes, like 'mod' and board/category/member ID. (Subs-Cache.php)

* Topic icons were missing some padding in the message index. I don't think that was voluntary... (sections.css)

* Optimized a few images for size, saving several hundred bytes in the process, without losing image quality. (quick_lock.gif, quick_my.gif, quick_pin_my.gif)

- Removed a few unused images -- these were from the old quickmod system. (quick_move.gif, quick_remove.gif)

- Hmm... I think Pete forgot to remove a code block after rewriting $context['error_new_replies'] to use number_context(). At least, it generated an error for me, and the variable wasn't used anywhere... (Post.php)
Re: New revs
« Reply #2036, on March 30th, 2013, 01:47 AM »
rev 2036 -- woohoo, message index icon fixes :)
(10 files +1-4, 10kb)

* Rewrote the topic status icons in the message index (pinned, locked, poll, my).
  - Fixed poll icon to (finally!) show up... (MessageIndex.php, quick_poll.gif)
  - Now using a JS-generated span system to show them. Fixes positioning issues and allows for solo manipulation. (MessageIndex.template.php, topic.js)
  - Removed composite icons. This saves over 1500 bytes in the main gzipped CSS! (quick_*_*.gif)
  - Improved legend styling the sidebar. (MessageIndex.template.php, sections.css)
  - Harmonized Unread Posts and Unread Replies styling with Message Index. Lots of things... (Recent.template.php, sections.css)
  - Just want to point out that yes, the crap rules repeated in icon_* classes saves bytes, too. (sections.css)

* Naoisms. (Unread.php, UnreadReplies.php)

! Unread Replies feature didn't actually set the participation icon. YES, we know that it's always set, as the page name implies... But still, not showing it when there's a legend next to the change is awkward. (UnreadReplies.php)

! Fixed h6 tag styling. Was broken due to incorrect nesting. (index.css)

! Fixed 'move selection to...' board select box showing up even when not selected. This was due to the .hide class being too close to the beginning of the CSS file, giving it lower priority. Hmm... (index.css, sections.css)

@ Quick note: there are three files only in the images/topic folder. Technically, they should be moved to images/icons... I'm too tired to deal with that.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #2037, on March 30th, 2013, 04:12 AM »
(3 modified, 2 added, 4KB)

Revision: 2037
Author: arantor
Date: 30 March 2013 03:10:49
Message:
! Feeds should not include MOVED topic notices. (Feed.php)

! Another bug of mine in Who's Online. (Who.php)

! Finally putting in icons for all the buttons along the moderation-options in a topic. Been meaning to find icons for the last two, in the end I just resized two of the icons deleted today. small_move in particular is ugly because I suck at resizing images in GIMP. (index.member.css, small_delete.gif, small_move.gif)
----
Modified : /trunk/Sources/Feed.php
Modified : /trunk/Sources/Who.php
Added : /trunk/Themes/default/images/small_delete.gif
Added : /trunk/Themes/default/images/small_move.gif
Modified : /trunk/Themes/default/skins/index.member.css

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #2038, on March 30th, 2013, 02:28 PM »
rev 2038
(4 files, 3kb)

! Fixed smiley caching... AGAIN. I noticed that clean_cache was overzealous, and would delete all variations of a file because of the special css codebath. Wedge now bypasses this by letting the extension start with a dot. Ah ah. Used the opportunity to shorten the filenames to use a 3-digit ID instead of a full timestamp. (Class-Editor.php, Subs-BBC.php, Subs-Cache.php)

- Debug code. Oops! That never happens to me... (Class-Skeleton.php)
Re: New revs
« Reply #2039, on March 30th, 2013, 02:49 PM »
rev 2039 - a byte is a byte is a byte.
(9 files -2, 3kb)

* Optimized moderation button CSS declarations for bytesize and better positioning. Renamed moderationbuttons to modbuttons (everyone gets what it means, right..?), and got rid of this odd moderationbuttons_strip, which is just as easily accessed by '#modbuttons ul'... Also simplified template_button_strip to accept an $extra param instead of an array of options. I've double-checked all calls to TBS, and couldn't find a single use of these options except for the moderationbuttons_strip ID setting I was talking about. I could remove the $extra as well, but figured some plugins might find it helpful (you can still do $extra = 'id="my_id"'). (Display.template.php, index.template.php, topic.js, index.member.css, sections.css, Wine/extra.css, Wine/index.member.css, Wuthering/extra.css, Wuthering/index.member.css)

* Shortened small_move.gif from 305 bytes to 125. I'd actually brought it down to 100 bytes, but it didn't compress as well (took 3 more bytes than the 125-byte version). Go figure! I knew I had to compare... ;) Mind you, I also tried the same on small_delete, but Pete somehow managed to crush the competition here. What tool did you use for that one..?! (small_move.gif)

* Added '@if member' to our post liking function, as guests can't use it anyway. (topic.js)