New revs

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: New revs
« Reply #2580, on May 1st, 2014, 10:57 PM »
[Commit revision a4a1400]
Author: Nao
Date: Thu, 01 May 2014 21:36:50 +0200
Stats: 1 file changed; +3 (insertions), -2 (deletions)

  • Getting these entities to behave with messages is complicated. Because westr::safe will disregard the location of the text it's transforming, I've decided to go back on this and just have plain entities protected as well, instead of kept that way. If you need to use a special UTF8 character in your posts, you can always google for it, and paste the actual character into your post... Personally, I'm done with preparsecode stuff for now. (Post2.php)

[Commit revision e739d0b]
Author: Nao
Date: Thu, 01 May 2014 21:42:48 +0200
Stats: 2 files changed; +63 (insertions), -42 (deletions)

  • Oh yes, I forgot to commit my actual rewrite of preparsecode which I mentioned in the last commit... Uh.
  • Fixed quick edit and regular edit/post, when it comes to handling entities and URLs. (Class-Editor.php, topic.js)
  • The entire 'modulo' trick for code tags is just what it is, a smart trick, but ultimately it'll probably fail to recognize malformed posts. I've replaced it with a proper method, wedit::is_protected, which is probably a bit slower, but is only called when posting, so it's not like it's a big deal. (Class-Editor.php)
Re: New revs
« Reply #2581, on May 1st, 2014, 11:03 PM »
Quote from Nao on April 30th, 2014, 07:04 PM
[Commit revision 9965000]
What are the odds that a github commit hash will have ONLY numbers in it, AND that the hash ends in three consecutive zeroes??!!
Amazing. About one chance out of 30.000, if I'm not mistaken! = 1/(((10/16)^7)/1000)
Re: New revs
« Reply #2582, on May 3rd, 2014, 10:12 AM »
[Commit revision abc9cc7]
Author: Nao
Date: Sat, 03 May 2014 10:12:22 +0200
Stats: 1 file changed; +25 (insertions), -25 (deletions)

  • A follow-up to (already) Pete's optimization from January 2011 where the oldTopicDays code is skipped if not used later. Thanks. (Display.php)
  • Yes, Pete, I'm a regular lurker (if not contributor) at AAF. You're lucky I don't want to reply to one of your posts and tell you what I think about something you said about me. That would be messy.
Re: New revs
« Reply #2583, on May 3rd, 2014, 10:40 PM »
[Commit revision b3fc536]
Author: Nao
Date: Sat, 03 May 2014 16:51:21 +0200
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Wrong link. (ManageSearch.template.php) (Pete fix)

[Commit revision 45842d7]
Author: Nao
Date: Sat, 03 May 2014 17:06:30 +0200
Stats: 1 file changed; +0 (insertion), -6 (deletions)

  • Removed language strings that were deprecated a year ago. (Post.english.php)

[Commit revision 6825418]
Author: Nao
Date: Sat, 03 May 2014 22:24:59 +0200
Stats: 4 files changed; +46 (insertions), -14 (deletions)

  • Improvements to Wireless/Wilderless skins. Basically, I'm adding an enclosing div to be able to turn post headers into tables. This might seem a bit overkill, I know. But, hey, it works... Maybe I'll rewrite that later. I'm just happy enough that I finally was able to correctly vertically center that frigging header. (Wilderless/*, Wireless/*)

[Commit revision ddaddb7]
Author: Nao
Date: Sat, 03 May 2014 22:25:55 +0200
Stats: 1 file changed; +6 (insertions), -0 (deletion)

  • Show avatars in PM templates, even on mobile-friendly skins. That's, err... Just the way I'm envisioning it. This styling thing still needs work, I know, I know... (PersonalMessage.template.php)

[Commit revision 59677fe]
Author: Nao
Date: Sat, 03 May 2014 22:27:46 +0200
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • There are many files whose presence was checked on each page load for admins, when they weren't expected to exist at all. Also, let's make it clear: since the install script can no longer be run on its own, and you can't even overwrite an existing database, there's no reason to bother with it either, so I'll just stick to the two that matter: the importer script, and settings 'backups'. (Subs-Template.php)

[Commit revision 8405861]
Author: Nao
Date: Sat, 03 May 2014 22:28:41 +0200
Stats: 1 file changed; +4 (insertions), -4 (deletions)

  • Don't insist. I don't really like in_array(). (Security.php)

[Commit revision f2a8a51]
Author: Nao
Date: Sat, 03 May 2014 22:29:30 +0200
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • imagecreatefrombmp used to let incorrect headers fly by. (Subs-Graphics.php) (Pete fix.)

[Commit revision 911e2de]
Author: Nao
Date: Sat, 03 May 2014 22:30:18 +0200
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • The readme gave an incorrect method for uploading language files. This 'fix' isn't too great, though... (readme_install.html)

[Commit revision 7184f6e]
Author: Nao
Date: Sat, 03 May 2014 22:31:29 +0200
Stats: 1 file changed; +2 (insertions), -3 (deletions)

  • The .unreadlink class is always used inside .table_list, no need to specify it. (extra.rtl.css)

[Commit revision 4fec31c]
Author: Nao
Date: Sat, 03 May 2014 22:38:03 +0200
Stats: 9 files changed; +206 (insertions), -176 (deletions)

  • If I never commit this, then how can I expect people to beta-test it..?
  • A relatively big rewrite of the board list styling. Basically, it's now fully responsive. Also, there's a '.wide' class that gets applied to some areas (not only the board list) where narrow widths should result in the element overflowing beyond its left and right margins, just for styling purposes. (Boards.template.php, Home.template.php, MessageIndex.template.php, Recent.template.php, Thoughts.template.php, extra.ios.css, index.css, sections.css, Warm/extra.css)
  • Also a few fixes on the 'recent posts' page styling. (sections.css)

[Commit revision 3de1dfb]
Author: Nao
Date: Sat, 03 May 2014 22:39:17 +0200
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Debug code. (Boards.template.php)
Re: New revs
« Reply #2584, on May 6th, 2014, 12:10 PM »
[Commit revision 39591f6]
Author: Nao
Date: Tue, 06 May 2014 12:10:03 +0200
Stats: 2 files changed; +31 (insertions), -34 (deletions)

  • More helper functions for the database class. wesql::query_row('query') will return array(0 => first_column, 1 => second_column..), query_assoc() will return an array of associative results, query_all will return an array of these associative arrays (with multiple results, if any), and query_rows() does the same with numeric arrays. (Class-DB.php)
  • Just showing that you can save 200 bytes of code just by using query_all instead of regular wesql code, and cache_get_data with a callback instead of a cache_put_data fallback. (Subs-Editor.php)
  • Of course, you don't HAVE to use all of these shortcuts... They may use a bit more RAM and CPU time (but not much!), so I wouldn't recommend them on critical areas; you can always use the old code if you want. But anywhere else..? Be my guest. Enjoy the freedom.
Re: New revs
« Reply #2585, on May 6th, 2014, 12:55 PM »
[Commit revision 704e222]
Author: Nao
Date: Tue, 06 May 2014 12:50:46 +0200
Stats: 1 file changed; +14 (insertions), -3 (deletions)

  • Prevent duplicate calls to add_css_file() from adding the same file twice. I guess there could be situations where it's desirable, but until someone gives me a proper use case, I'll just prevent it, making it possible to include your file as many times as you may need it, without having to keep track of it. (Subs-Cache.php)

[Commit revision 031469d]
Author: Nao
Date: Tue, 06 May 2014 12:53:58 +0200
Stats: 10 files changed; +164 (insertions), -127 (deletions)

  • Another of these useless rewrites I've been working on for weeks... Some rarely called pages (move topic, report post, etc.) well declaring their CSS in the main CSS files, which I've always found to be quite rude. They're now getting their very own file, 'pages.css', yippie. (TEMPLATES: Errors, Login, Mailer, Merge, MoveTopic, Poll, Post, Split;
  • #whoisviewing isn't used, AFAIK. (sections.css)
  • The change only reduces CSS filesize by about 300 gzipped bytes (or 1.3KB unzipped), but it's still a good thing to do. It's totally worth the extra work.

[Commit revision 8dec85f]
Author: Nao
Date: Tue, 06 May 2014 12:55:35 +0200
Stats: 1 file changed; +1 (insertion), -6 (deletions)

  • Forgot to remove #fatal_error. (sections.css)
Re: New revs
« Reply #2586, on May 6th, 2014, 06:47 PM »
[Commit revision 1dea450]
Author: Nao
Date: Tue, 06 May 2014 18:44:07 +0200
Stats: 6 files changed; +0 (insertion), -39 (deletions)

  • A year ago, Pete removed the ability to put menus into the sidebar (although I honestly can't remember our discussion and motivation for doing so but I'm going to assume that I agreed on that point), but he forgot to remove lots of related things. So I'm removing all .left_menu styles, which it turns out, make the sidebar menus look actually better when they're gone, so... No reason to keep them in. Also removing sidebar menu separators. You can still have sidebar menus by hardcoding the feature into Subs-Menu.php, but I won't do that for now. (GenericMenu.template.php, Wilde/extra.css, Wine/extra.css, Wuthering/extra.css, extra.rtl.css, sections.css)

[Commit revision 4bc6b0b]
Author: Nao
Date: Tue, 06 May 2014 18:44:29 +0200
Stats: 2 files changed; +0 (insertion), -16 (deletions)

  • Removed some bad styling for the admin quick search area. (Wilde/mana.css, Wuthering/mana.css)

[Commit revision 6be62d4]
Author: Nao
Date: Tue, 06 May 2014 18:45:16 +0200
Stats: 1 file changed; +0 (insertion), -4 (deletions)

  • Remove a redundant selector. (extra.ie6.css)

[Commit revision f007676]
Author: Nao
Date: Tue, 06 May 2014 18:47:30 +0200
Stats: 1 file changed; +43 (insertions), -39 (deletions)

  • Saved more bytes in CSS: (sections.css)
  •  Posting icons are only shown to members
  •  Inline post moderation checkboxes are only shown to members (if they can see them)
  •  #index_common_stats isn't shown if show_stats_index is disabled
  •  YouTube embed styling isn't shown if embedding is disabled
Re: New revs
« Reply #2587, on May 8th, 2014, 05:49 PM »
[Commit revision 9127ea1]
Author: Nao
Date: Thu, 08 May 2014 14:34:03 +0200
Stats: 1 file changed; +6 (insertions), -5 (deletions)

  • You can now use array_insert() on multi-dimensional arrays. I'm pretty happy with that one, as it only cost me 250 more bytes of PHP, and no extra functions. I'm sure someone else wrote a one-liner to do the same at some point, but I haven't found it, so you're stuck with my algorithm. (Subs.php)
  • For instance: array_insert(array('hello' => 'world', 'sub' => array('multi' => array('foobar' => false))), 'sub>multi>foobar', $my_array) should add $my_array right before the 'foobar' entry. Patent pending.
Re: New revs
« Reply #2588, on May 9th, 2014, 02:56 PM »
[Commit revision 58ec45a]
Author: Nao
Date: Fri, 09 May 2014 14:35:02 +0200
Stats: 4 files changed; +101 (insertions), -102 (deletions)

  • This is a noticeable overhaul of some of the main menu mechanisms...
  • Rewrote main menu template to use recursion. While there's nothing to account for depth levels beyond what we currently have, it's still cleaner, clearer and shorter than the previous version. Saves 150 bytes of PHP, which is nice. (index.template.php)
  • Moved some of the main menu's top entries (media gallery, member list) to sub-entries of the 'home' menu. Also moved the Logout button to the 'profile' menu. (Subs.php, index.css, index.english.php)
  • Renamed 'sub_items' to just 'items' in the main menu. (Subs.php, index.template.php)
  • Renamed array_insert's 'parent>child' relationships to 'parent child'. I thought of '>' for CSS inheritance reasons, but really, CSS already has simple spaces for inheritance, so why bother... (Subs.php)
  • Saved a few CSS bytes by hiding login/register rules from members, and logout rules from guests. (index.css)
  • Removed the 'Search' button from the header, since it's (1) obvious it's a search box given it's icon, (2) already there in the search popup that shows up when you click the input box. (index.template.php)

[Commit revision b943c9f]
Author: Nao
Date: Fri, 09 May 2014 14:53:07 +0200
Stats: 5 files changed; +8 (insertions), -27 (deletions)

  • Removed 'latest smiley sets' feature. Let's be realistic, it'll never be activated. I've got more important things to do... (ManageSmileys.template.php, ManageScheduledTasks.english.php)
  • If for some reason the sidebar-type menu should get activated, it should at least get moved to the actual sidebar, rather than the main area... (Subs-Menu.php)
  • Forgot the opening h4. (index.template.php)
  • Random commenazi. (Post.template.php)
Re: New revs
« Reply #2589, on May 11th, 2014, 01:29 PM »
[Commit revision 58d4943]
Author: Nao
Date: Sun, 11 May 2014 12:47:44 +0200
Stats: 13 files changed; +8 (insertions), -17 (deletions)

  • Removed assets/bbc folder for simplicity, simplified BBC button URLs (i.e. removed the ability to just specify a button name, you'll now have to provide a fully qualified URL), moved bbc/sprite.png to the root (which makes for a shorter URL hardcoded on all pages where you can post), and the textarea resize handle to the buttons folder, because, whatever. (assets/bbc.png, Class-Editor.php, editor.css, sections.css)
  • Removed assets/theme folder for simplicity, moved bg.jpg to the root, actions.png to buttons (because that's what they are), and menurow.gif to the same, because, again, whatever. (assets/theme, Wilde/extra.css, Wine/extra.css, Wuthering/extra.css)

[Commit revision 3d67dd2]
Author: Nao
Date: Sun, 11 May 2014 13:20:19 +0200
Stats: 3 files changed; +2 (insertions), -1 (deletion)

  • Replaced PNG versions of the language flags with GIF versions. This saves over 1.2KB of gzipped data, for very similar results. Seriously, if you can spot the differences, you're good. (And no, I don't want you on my team. Get off my lawn.) (core/languages/Flag.*.png)
  • Made it so that if you want to replace them with PNG versions, you still can. i.e., if you want to use the GIF versions on a currently running Wedge board, you'll have to manually remove the PNG files from the language folders. (Subs-Cache.php)

[Commit revision 2a1bdd2]
Author: Nao
Date: Sun, 11 May 2014 13:20:44 +0200
Stats: 3 files changed; +1 (insertion), -1 (deletion)

  • Similarly, replaced contacts.png with contacts.gif -- it's using the same palette so there is NO difference at all visually, and it saves a hundred bytes. Gosh. PNG may be the winner overall, but GIF really is great at a lot of things on small files. (contacts.*, index.member.css)

Posted: May 11th, 2014, 01:21 PM

[Commit revision 0be756d]
Author: Nao
Date: Sun, 11 May 2014 13:28:55 +0200
Stats: 1 file changed; +0 (insertion), -0 (deletion)

  • Forgot to remove contacts.png... Actually, I uploaded members.gif in its stead. I'll be leaving that one in here, even though it's a duplicate file, because I'm still planning to use it at one point. Sorry for the mixup. (contacts.png)
Re: New revs
« Reply #2590, on May 11th, 2014, 01:35 PM »
[Commit revision 38fd193]
Author: Nao
Date: Sun, 11 May 2014 13:35:23 +0200
Stats: 1 file changed; +2 (insertions), -4 (deletions)

  • Alcohol is bad, as John reminded me. (Who.template.php)
Re: New revs
« Reply #2591, on May 15th, 2014, 10:24 AM »
[Commit revision 7013192]
Author: Nao
Date: Tue, 13 May 2014 19:24:49 +0200
Stats: 1 file changed; +0 (insertion), -0 (deletion)

  • Saved another 400 bytes of gzipped CSS by optimizing the small_merge icon. I think I simply forgot this one when I did my initial round of GIF optimizations, given that all other small_* files are less than 150 bytes overall. (assets/small_merge.gif)

[Commit revision e97ce35]
Author: Nao
Date: Wed, 14 May 2014 17:45:12 +0200
Stats: 1 file changed; +2 (insertions), -0 (deletion)

  • Padding problem in media item pages. (media.css)

[Commit revision da08648]
Author: Nao
Date: Thu, 15 May 2014 10:24:03 +0200
Stats: 3 files changed; +27 (insertions), -1 (deletion)

  • Added a skin option to allow resetting the menu to how it used to look like, so that you can build your skins upon long menus. I called it <shortmenu> and it's set to 1 by default (so that you get the short menu if you don't care, obviously), but I'm open to changing the name or whatever. Documented in Warm/skin, as usual. (Subs-Cache.php, Subs.php, Warm/skin.xml)
  • Added a separator between the Home menu's section list and the menu items (media, etc.) Also added placeholders for menu icons. Technically, you should extend #m_home_media if you want to add a Media icon to the submenu, and #m_media if you're explicitly disabling <shortmenu>. Of course. (I like saying 'of course' when it makes little sense. Makes me looks smart.) (Subs.php)
  • Happy now? :P
Re: New revs
« Reply #2592, on May 15th, 2014, 10:17 PM »
[Commit revision 433d9d0]
Author: Nao
Date: Thu, 15 May 2014 14:48:23 +0200
Stats: 2 files changed; +2 (insertions), -2 (deletions)

  • Unused globals. (Subs.php, index.template.php)

[Commit revision 0e38b3f]
Author: Nao
Date: Thu, 15 May 2014 22:14:15 +0200
Stats: 1 file changed; +2 (insertions), -2 (deletions)

  • External links in messages will get the nofollow treatment until I find a smoother way to deal with human spam. I'm not in the mood to rewrite all parse_bbc calls to provide, in addition to the existing user ID, a flag indicating whether or not said user is proven to be 'real'. (install.sql)
Re: New revs
« Reply #2593, on May 15th, 2014, 11:39 PM »
[Commit revision 21e2320]
Author: Nao
Date: Thu, 15 May 2014 23:36:17 +0200
Stats: 6 files changed; +7 (insertions), -8 (deletions)

  • Removed ability to upload a png version of the flags. I can't really justify extra file_exists tests just for something nobody will ever bother with. Also finished converting all flag links to use gif. (ManageLanguages.php, Subs-Cache.php, TEMPLATES: Boards, ManageBoards, ManagePlugins, MessageIndex)

[Commit revision 29fdcaa]
Author: Nao
Date: Thu, 15 May 2014 23:37:41 +0200
Stats: 1 file changed; +3 (insertions), -3 (deletions)

  • Forgot flags in the installer. (install.php)
  • Fixed missing argument when triggering an SQL error in the installer. (install.php)
Re: New revs
« Reply #2594, on May 16th, 2014, 12:00 AM »
[Commit revision b2cbcfc]
Author: Nao
Date: Fri, 16 May 2014 00:00:09 +0200
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • PHP < 5.5 fix. (Subs.php)