New revs

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: New revs
« Reply #2865, on February 27th, 2017, 12:00 PM »
[Commit revision ec62771]
Author: Nao
Date: Mon, 27 Feb 2017 12:00:12 +0100
Stats: 1 file changed; +25 (insertions), -28 (deletions)

  • Fixed a $txt['here'] that was removed long ago (because it was used in this case outside of its original context-- wow, nice for translators!). Replaced it with some random Unicode character that's supposed to indicate the current location. Please tell me if you find anything better that doesn't require the use of words. (ManageSmileys.template.php)
  • Also updated all colons to $txt[':'] in that file. I'm not gonna do all files... Just figured I'd do that one. (ManageSmileys.template.php)
Re: New revs
« Reply #2866, on March 2nd, 2017, 12:45 PM »
[Commit revision 1d5d214]
Author: Nao
Date: Thu, 02 Mar 2017 12:45:44 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Fixed an incompatibility with strict PHP 7.1 when a skeleton layer was being renamed. (Class-Skeleton.php)
Re: New revs
« Reply #2867, on March 4th, 2017, 12:37 AM »
[Commit revision 168f199]
Author: Nao
Date: Sat, 04 Mar 2017 00:33:12 +0100
Stats: 3 files changed; +8 (insertions), -7 (deletions)

  • A small optimization in the CSS cache code that saves a dozen bytes on default gzipped CSS files. (Subs-Cache.php)
  • For a few less bytes... (common.css, index.css)
  • Removed a @ suppressor that I think wasn't useful. If the cache code fails, it should show up as an error so that it can be fixed. (Subs-Cache.php)

[Commit revision 7ea895d]
Author: Nao
Date: Sat, 04 Mar 2017 00:35:34 +0100
Stats: 1 file changed; +1 (insertion), -0 (deletion)

  • One minor feature stumped me for a minute, I figured it was in need of a comment. (index.template.php)

[Commit revision 0902d9b]
Author: Nao
Date: Sat, 04 Mar 2017 00:36:31 +0100
Stats: 1 file changed; +4 (insertions), -1 (deletion)

  • Avoid double separators in menu if a feature surrounded by separators was disabled. (Subs.php)
Re: New revs
« Reply #2868, on March 5th, 2017, 11:54 PM »
[Commit revision 40c60b2]
Author: Nao
Date: Sun, 05 Mar 2017 23:54:26 +0100
Stats: 7 files changed; +41 (insertions), -16 (deletions)

  • Finally...! Added that dreaded 'Mark all as read' feature to notifications. Seriously, I'd been wanting to do that for years now. I had 336 'unread' notifications and I didn't see myself deleting them like that. Also used the opportunity to fix notification popup headers to all fit into a single row. (Notifications.php, Notifications.template.php, PersonalMessage.template.php, Notifications.english.php, index.css)
  • Commenazi, more precisely removing a UK spelling. It's all about harmonization. Or was it harmonisation? (ScheduledTasks.php)
  • Removed some weird brackets that were probably inherited from an old SMF build. Like, version 1.0. Ouch. (index.english.php)
  • The upshrinks class should be a virtual (meaning it's only used in mixes, and shouldn't show up in the final CSS file). If you want a generic class (i.e. one you can use in your mods), use foldable. (index.css)
  • Note: while writing the mark as read feature, I noticed there were settings ($settings['notification_prune_days']) and language strings related to a non-existent notification admin page (I guess thanks Shitiz for writing the feature, but you could have finished it?). While you can change the prune days setting by yourself with phpMyAdmin, I reckon the 7-day default is acceptable and maybe I should just not bother. What do you think? (Apart from the fact that 'reckon' is a typically British word and I just committed a change to a US spelling.)
  • Needs testing. I'm confident it's working, though.
Re: New revs
« Reply #2869, on March 6th, 2017, 12:07 AM »
[Commit revision f978581]
Author: Nao
Date: Mon, 06 Mar 2017 00:07:41 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • We don't really need to hide the 'Settings' text link from notification popups if there's no 'Mark read' link next to it. There's enough space, even on mobile. (Notifications.template.php)
Re: New revs
« Reply #2870, on March 6th, 2017, 10:40 PM »
[Commit revision 3c2eb2f]
Author: Nao
Date: Mon, 06 Mar 2017 22:40:06 +0100
Stats: 3 files changed; +7 (insertions), -7 (deletions)

  • I'm reverting an old commit from September 16, 2014 that 'fixed' IE11 not being able to load compressed CSS/JS. The problem seems to be linked to the server, I need to test it more. I may re-revert this later, I don't know yet. Needs some testing from other parties. (Class-Editor.php, Subs-BBC.php, Subs-Cache.php)
Re: New revs
« Reply #2871, on March 11th, 2017, 11:32 AM »
[Commit revision 1fcd685]
Author: Nao
Date: Sat, 11 Mar 2017 11:22:15 +0100
Stats: 2 files changed; +5 (insertions), -5 (deletions)

  • Updated $can_filter to include Firefox 35+ and Android KitKat browser, and $can_sticky to include Chrome 56+ (AT LAST!) and remove the small hack in my 'follow me' implementation. (common.css, sections.css)
  • I'm also considering removing the entire follow_me function from topic.js... Its main problem is that it makes it hard (if not impossible?) to change the layout of avatar boxes. The only browser that need it now are IE 8 and above. I wanna say I don't care about them... I don't know.

[Commit revision ded9e47]
Author: Nao
Date: Sat, 11 Mar 2017 11:32:23 +0100
Stats: 1 file changed; +14 (insertions), -0 (deletion)

  • Not sure this'll work 100% because I neither have opcache nor APC installed on my current test server, but apparently it's a good thing to invalidate stuff. Needs testing. (Subs-Cache.php)
Re: New revs
« Reply #2872, on March 13th, 2017, 10:27 PM »
[Commit revision 113d4e4]
Author: C3realGuy
Date: Sat, 11 Mar 2017 16:59:35 +0100
Stats: 6 files changed; +17 (insertions), -10 (deletions)

  • Allow setting the max length a subject should have.
  • If subject is too long, yield an error.
  • Introduced $settings['max_subjectLength'].
  • Introduced $txt['error_subject_too_long'] in Errors.english.php
  • Introduced $txt['max_subjectLength'] and $txt['max_subjectLength_zero']
  •  in ManagePosts.english.php
  • Also using vsprintf for errors now to support more than one argument.
  • Before the limit for subject size was inconsistent. For editor it was
  •  80, for Post/Post2.php it was 100. We now use the same limit for all.
  • (ManagePosts.php, Post.php, Post2.php, Post.template.php, Errors.english.php, ManagePosts.english.php)

[Commit revision 2999165]
Author: C3realGuy
Date: Sun, 12 Mar 2017 17:04:11 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Subject => subject

[Commit revision dc72afe]
Author: Nao
Date: Mon, 13 Mar 2017 22:27:11 +0100
Stats: 6 files changed; +17 (insertions), -10 (deletions)

  • Merge pull request #59 from C3realGuy/dev_max_subject_length
  • Allow setting the max length a subject should have.
Re: New revs
« Reply #2873, on March 13th, 2017, 10:41 PM »
[Commit revision 38d17d4]
Author: Nao
Date: Mon, 13 Mar 2017 22:40:48 +0100
Stats: 1 file changed; +2 (insertions), -2 (deletions)

  • Updated a date and position. ;) (contributors.txt)
Re: New revs
« Reply #2874, on March 18th, 2017, 11:27 AM »
Quote from Nao on March 13th, 2017, 10:41 PM
Updated a date and position. ;)
Yeah CG, thought you'd appreciate that ;)
Least I could do, really! I'd just forgotten about that file...
Re: New revs
« Reply #2875, on March 18th, 2017, 11:44 AM »
[Commit revision 4b63508]
Author: C3realGuy
Date: Thu, 09 Feb 2017 12:46:03 +0100
Stats: 1 file changed; +857 (insertions), -63 (deletions)

  • BBCodes are now hardcoded in Subs-BBC again.
  • Still loading bbcodes from plugins from database.
  • Should increase performance.

[Commit revision 5c077e8]
Author: Nao
Date: Sat, 18 Mar 2017 11:44:36 +0100
Stats: 1 file changed; +857 (insertions), -63 (deletions)

  • Merge pull request #58 from C3realGuy/dev_bbc_move_only_bbc_to_disk
  • BBCodes are now hardcoded in Subs-BBC again.
Re: New revs
« Reply #2876, on March 18th, 2017, 12:45 PM »
[Commit revision df6398f]
Author: Nao
Date: Sat, 18 Mar 2017 12:45:04 +0100
Stats: 1 file changed; +674 (insertions), -725 (deletions)

  • IMPORTANT: this commit and the previous one only work on PHP 7+. Don't update Subs-BBC.php if you're using an older version! This will be fixed later.
  • Spacinazi. Big time. (Subs-BBC.php)
  • Removed some useless things that were obviously leftovers of a bad print_r/var_dump, like arrays indexed from 0. Also, just as a quick note, array(1 => 'hello', 'world') will return an index of 2 for 'world'. It's a nice thing to know. See font size handling. (Subs-BBC.php)
  • Started reintegrating a couple validation functions into the array. This needs testing, I'm pretty sure this will neither be faster nor slower, but it just looks better and is easier to debug. (Subs-BBC.php)
  • Note: I removed an allowed tag mention in the spoiler tag, when it only had a single space instead of a list of tags. My guess is that Pete pressed space by mistake when filling in the database. Also noticed that 'len' was being used... strlen() would do the job fine. After all it's more about convenience than speed here (we're in an era of fast web hosting where... who cares about BBCode speed?!)
  • Note: Another thing, I've seen spaces in 'li', 'media' and other tags that got removed. They don't seem to show up in rev d3a5a117eade320a3d8b89b46f667d9f0a7dfd17, where the original BBCode was moved to the database, but I'm also unable to find a version of install files from that day so I don't know if these were errors made at export time. I really think we should compare with the old code.
Re: New revs
« Reply #2878, on March 19th, 2017, 12:22 AM »
[Commit revision f2ba207]
Author: Nao
Date: Sun, 19 Mar 2017 00:22:20 +0100
Stats: 13 files changed; +18 (insertions), -90 (deletions)

  • Removed support for PHP 5.3.x, which hasn't been patched in years. Going for 5.4 now, may even go higher if I ever find a reason to do so. Please, upgrade to PHP 7 if you're still on one of these slow 5.x versions. Faster PHP means happier visitors. (README.md, SSI.php, Class-DB.php, Class-SFTP.php, Errors.php, Memberlist.php, OriginalFiles.php, QueryString.php, Subs-Plugins.php, getid3.php, index.php, install.php, readme_install.html)
  • Note: magic quote functions were removed in PHP 5.4, so Wedge no longer has to deal with these. :-D (Plenty of occurrences removed.)
  • Note: there was also a typo in Memberlist.php (which, for once, was my own fault), causing an 'escape route' to be bypassed instead of executed on PHP 5.4+.
Re: New revs
« Reply #2879, on March 19th, 2017, 11:48 AM »
[Commit revision 0d9d3e4]
Author: Nao
Date: Sun, 19 Mar 2017 11:47:30 +0100
Stats: 1 file changed; +9 (insertions), -29 (deletions)

  • Spacinazi. (Subs-BBC.php)
  • Removed duplicate array declarations, and simplified one of them. (Subs-BBC.php)