New revs

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1560, on April 23rd, 2012, 04:17 PM »
rev 1560
(3 files, 2kb)

! Fixed attach_downloaded being parsed with the actual string rather than the $txt index. Maybe I should allow for a string to be sent directly, though...? It's just an extra isset()... (Display.template.php)

! Fixed autolinking triggering itself a bit too happily in non-quick-edit mode... Should I reuse the exact same code as in parse_bbc()? (Aeva-Embed.php)

! Applied SMF 2.1 fix 8d54b5b by Spuds for cleanXml (PCRE v8.3 no longer accepting range D800-DFFF in regexes.) I never look into their fixes but when it comes to regex I must have a radar of sorts... (Subs.php)
Re: New revs
« Reply #1561, on April 24th, 2012, 07:35 PM »
rev 1561
(5 files, 14kb)

* Rewrote quick message icon modification popup. The gzipped code for this object is now only 321 bytes, as opposed to the original ~1100. This also saves over 20% off the total gzipped filesize of topic.js. All of the CSS is now moved to the skin, as it should have been from the start. Also optimized MiniMenu (turned it into a single object as well), and a few other objects. (Display.template.php, Xml.template.php, sections.css, topic.js)

- Wedge will no longer mark a post as 'modified' if the user only changes its icon. That field should be there to notify users something important may have changed -- and an icon isn't that important. (JSModify.php)

@ Note: icon box's hover site has issues compared to earlier version (I'll fix it if I don't forget), and I removed the timer that removed the popup if hovering out for a while -- mainly for accessibility reasons, as it's not exactly a very wide popup to begin with...
Re: New revs
« Reply #1562, on April 25th, 2012, 06:08 PM »
rev 1562
(3 files, 2kb)

+ Added support for user-defined JavaScript files. I thought very hard for an original name, and came up with 'custom.js'. What do you think? Anyway, it's easier to create that file manually than adding a plugin to add a custom JS file to the main one... If you know what I mean. (Load.php, Subs-Cache.php)

- Removing 'sbox', 'custom' and 'theme' from the main JS file's cached filename. How 'bout saving a few bytes off every page, eh..? (Subs-Cache.php)

* Saved another 42 bytes off the gzipped topic script by getting rid of its prototypes. It may be controversial because the benefits aren't huge and the drawbacks are potentially bigger, so I may have to revert this in the future, but if no issues arise, why not save the space..? (topic.js)

! Fixed a bug in QuickReply where it was considering bUsingWysiwyg as part of the object, rather than its options. (topic.js)

! Fixed right positioning of mini-menus. (topic.js)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1563, on April 25th, 2012, 11:52 PM »
(4 files, 5KB)

Revision: 1563
Author: arantor
Date: 25 April 2012 22:52:06
Message:
! When moving a topic between boards, you can now also opt to send the topic starter a PM. It's not a particularly nice boilerplate wording but I haven't got anything better. It does also use a slight variation on the moved notice, in that it actually injects a link to the topic with the subject in it, rather than injecting the bare URL. (Currently uses an iurl as per the moved topic notice, but that's easily changeable.) (MoveTopic.php, MoveTopic.template.php, Errors and ManageTopics language files)
----
Modified : /trunk/Sources/MoveTopic.php
Modified : /trunk/Themes/default/MoveTopic.template.php
Modified : /trunk/Themes/default/languages/Errors.english.php
Modified : /trunk/Themes/default/languages/ManageTopics.english.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 #1564, on April 26th, 2012, 04:09 PM »
rev 1564
(5 files, 7kb)

! Fixed a last-minute warning message that showed up when not providing a custom.js file. I'd tested for this, but incorrectly it would seem... (Subs-Cache.php)

* Rewrote the topic title changer (in message index) to be entirely contained in topic.js (this saves us the extra JavaScript at the end of the HTML, as well as the onmouseout/onmouseover events.) Somehow, even adding more code resulted in saving 31 more bytes off the gzipped size... Yeah, I'm like that. (MessageIndex.template.php)

* Fixed the dollar fix. SMF bug, somehow: the comment says it's for IE compatibility, when it really happens on all browsers, because $ is a meta-character when used in the replacement string in a .replace() call. The solution is to simply convert it (once) to $$$$ (or just $$$, but it's close to a hack and doesn't save any gzipped space), and not bother with converting it back. Basically: a bug fix is good when it makes sense. This one didn't and I got stumped for months because I kept researching IE bug lists instead of JS regex flavors. (topic.js)

* Translation. (Errors.french.php, ManageTopics.french.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1565, on April 27th, 2012, 06:49 PM »
(5 files, 2KB)

Revision: 1565
Author: arantor
Date: 27 April 2012 17:48:31
Message:
! No need to check for GD when doing certain types of image work. (Subs-Graphics.php)

! Auto-removed topics do not need to go to recycling. (Subs-Scheduled.php)

! Minor formatting bug with a line break not being added when it should. (MoveTopic.template.php)

! Admin registration of users should notify the user of the relevant URL as well. (EmailTemplates.english.php)

! Drafts code made an assumption about the URL that wouldn't be true with latest PURLs code. (post.js)
----
Modified : /trunk/Sources/Subs-Graphics.php
Modified : /trunk/Sources/Subs-Scheduled.php
Modified : /trunk/Themes/default/MoveTopic.template.php
Modified : /trunk/Themes/default/languages/EmailTemplates.english.php
Modified : /trunk/Themes/default/scripts/post.js
Re: New revs
« Reply #1566, on April 27th, 2012, 10:12 PM »
(5 files, 14KB)

Revision: 1566
Author: arantor
Date: 27 April 2012 21:10:10
Message:
! Convert file cache to use file_put_contents instead of fwrite. It's something I meant to do ages ago but forgot about, but it should solve the cases where the file was only being partially written to the 8KB boundary. (SMF have also implemented it, though we both did it independently, I think) (Subs-Cache.php)

! There's now a timezone selector on the registration page too. It isn't pretty, it does no magic detection of timezone so it defaults to American Samoa time but at least we're on the way to solving things. Also, the bug in the profile page should be fixed where it was showing the wrong saved value. (Profile-Modify.php, Register.php, Register.template.php, Login language file)
----
Modified : /trunk/Sources/Profile-Modify.php
Modified : /trunk/Sources/Register.php
Modified : /trunk/Sources/Subs-Cache.php
Modified : /trunk/Themes/default/Register.template.php
Modified : /trunk/Themes/default/languages/Login.english.php

@ To answer the point about the file cache, the reason it was breaking at the 8KB boundary is because of the way fwrite caps at 8KB under certain circumstances but it isn't a problem because it's rare that more than 8KB is cached at once. However, we can use file_put_contents instead these days which is a bit faster and has no such issues.
Re: New revs
« Reply #1567, on April 28th, 2012, 01:26 AM »
(2 files, 1KB)

Revision: 1567
Author: arantor
Date: 28 April 2012 00:25:04
Message:
! Made the blog board template less rubbish. It still needs a lot of work but it's definitely an improvement IMO on what was there before. (MessageIndex.php, MessageIndex.template.php)
----
Modified : /trunk/Sources/MessageIndex.php
Modified : /trunk/Themes/default/MessageIndex.template.php


Nao, please feel free to abuse this commit however you see it, it was just bugging me how the blog layout needed work.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1568, on April 28th, 2012, 12:12 PM »
rev 1568
(22 files -1, 11kb) (bit in a hurry, hope I didn't screw up anything...)

* Tweaked mini-menu code to make the resulting HTML shorter and avoid outputting empty strings. Note for later: array_map() is super-slow, especially compared to foreach. (Display.php, topic.js)

* Renamed we_prepareScriptUrl to weUrl because I added support for more than just dealing with we_script ($scripturl), and optimized the function (a bit). Also removed aeva_prepareScriptUrl which was unused (probably a SMF1 compatibility leftover.) (index.template.php, Packages.template.php, Post.template.php, SplitTopics.template.php, Themes.template.php, editor.js, mediadmin.js, post.js, register.js, script.js, stats.js, suggest.js, topic.js, up.js)

* I think that periods should be in language files, rather than in the template. Better support for exotic languages... (MoveTopic.template.php, ManageTopics.language.php)

* Removed AeMe feed icon and replaced it with the default one. (images/aeva/feed.png, Media.template.php)

* Saved a few bytes off the ajaxRating function, the wedgeAttachSelect object, the editor object, and various other JS areas. (Media.template.php, script.js, post.js, editor.js)

* Translation. (EmailTemplates.french.php, Login.french.php)

* Commenazi. (Subs-Cache.php)
Re: New revs
« Reply #1569, on April 29th, 2012, 12:39 AM »
rev 1569
(4 files, 3kb)

! Fixed attachment handler not correctly disabling/re-enabling the file input after going over or below the maximum file limit. (post.js)

+ Added slide animations to adding and deleting attachment files in the post page. This adds 20 bytes of code but I saved over 50 with some optimizations in the same time... (post.js)

* Saving a few bytes, again... (editor.js)

* I don't like redeclaring a local var... Will need to move all that code to a JS file later anyway. (Post.template.php)

* Aligning icons vertically in blog posts. (MessageIndex.template.php)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1570, on April 29th, 2012, 03:22 PM »
(1 file, 1KB)

Revision: 1570
Author: arantor
Date: 29 April 2012 14:21:45
Message:
! Board position selectboxes were not updated properly. (ManageBoards.template.php)
----
Modified : /trunk/Themes/default/ManageBoards.template.php

(Would have done more but have chores to go do instead)

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: New revs
« Reply #1571, on May 2nd, 2012, 12:42 PM »
rev 1571 (a huge scary commit... Even I have trouble navigating it >_< needs extra care from volunteer reviewers whom I'll love forever.)
(18 files -1, 18kb)

+ Added a new option to allow add_js_file() and add_css_file() to ignore some filenames when they build the actual filename for a cached file. In typical Nao fashion, the CSS version is totally untested and was written right... now. (Class-Editor.php, Load.php, Subs-Cache.php)

+ Added a .wereplace() custom function for Wedge JS. It behaves similarly to .easyReplace() in the editor, but is now in the main script file, and used in a few more places. (Subs-Post.php, Welcome.template.php, editor-func.js, script.js, suggest.js, topic.js)

! Fixed tag splitter (was broken after my recent rewrites.)  (Class-Editor.php, editor-func.js)

! Fixed 'local' suffix for CSS files -- it was internally considered as a main file name, instead of a potential suffix. Also added a 'global' suffix if you need to differentiate between the two, although basically, every single suffix will apply globally without the need to resort to using this one. (Load.php)

! Fixed bug in calling previewPost. Although I still don't know the point of having this check for the CTRL key... Anyone tried it? For me it 'simply' creates a new tab with the preview... Odd. (Post.php)

! Finally took time to just tell Wedge to shut up if a menu tab doesn't provide a description. (GenericMenu.template.php)

- Got rid of add_params for menus. Anyone ever used these...? (PostModeration.php, GenericMenu.template.php)

* Replaced the login time hack with a cleaner and more accurate session variable for determining the desired position of our script files in the HTML source. (index.template.php)

* Renamed post.js to editor-func.js (editor-related helper functions), and ignoring editor-func filename. (Class-Editor.php, editor-func.js, post.js)

@ Temp: renamed whatever remained of post.js to postpage.js, will rename it back in the next commit. (Class-Editor.php, post.js, postpage.js)

* Moved 99% of the Post template's inline JavaScript to the postpage.js file. And it still works. Polls need some polish. (Post.template.php, postpage.js)

* More size optimizations, some being even more logical than the original code, my favorites really. (editor.js, pm.js, script.js, spellcheck.js, suggest.js, topic.js)

* Commenazi, spacinazi. (QueryString.php, admin.js)
Re: New revs
« Reply #1572, on May 2nd, 2012, 12:45 PM »
rev 1572
(10 files, 16kb)

* A larger logical rewrite of AeMe. (Aeva-Foxy.php, Aeva-Gallery.php, Aeva-Gallery2.php, Aeva-ModCP.php, Subs-Media.php, (GenericMenu.template.php), ManageMedia.template.php, Media.template.php, Media.language.php, mediadmin.js)

  . Category headers now use page titles (this should help with readability and, basically, common sense.)
  . $txt['media_album'] was probably unclear for i18n so I added $txt['media_album_is'] which is sprintf'd into a proper line.
  . A cache key for embedded media items could be too long and was shortened to two md5 hashes.
  . Fixed plenty of template glitches, such as showing the Mass Download button on empty albums, duh...
  . Some problems with the urlmore variable missing an extra semicolon.
  . Rewrote media admin toggler to fix it and add a nice little animation.
  . Added template_show_generic_tabs function to make them into *actual* generic tabs...
  . Spacinazi fiesta... Really.
Re: New revs
« Reply #1573, on May 2nd, 2012, 01:04 PM »
rev 1573
(4 files +1, 12kb)

+ Mobile mode will now hide some more areas in board/message index, such as topic stats. (Boards.template.php, MessageIndex.template.php)

+ Forgot to actually commit postpage... Well, now it's renamed back to post.js. (Class-Editor.php, post.js)

* Spacinazi. (stats.js)
Re: New revs
« Reply #1574, on May 2nd, 2012, 05:01 PM »
rev 1574
(3 files, 2kb)

! SMF bug: in signatures, only the first line-break was excluded from length calculation. These regexes were missing a global modifier... (Profile.template.php)

+ Implemented scrollbar for touch devices (iPhone etc), as written by Dragooon. It's a bit slow, but at least it works. (sbox.js)

* Optimized sha1.js for size. Some very weird changes allowed for an extra 50+ byte shrinking of the gzipped file. (sha1.js)