New revs

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: New revs
« Reply #2340, on December 3rd, 2013, 10:18 PM »
rev 2340 -- okay, next one then.
 3 files changed, 11 insertions(+), 7 deletions(-), 1.35 KiB

! Fixed HTML tags being shown in relative date titles. (topic.js)

! Fixed ajax loader height. Okay, this is getting annoying... (index.css)

! When re-opening a select box with the Space key, the current selection was not always in view. (sbox.js)

! Using arrow keys/home/end on a closed but focused select box used to re-open it. While it was a conscious decision of mine long ago, contradicting the established UI standards for select box development, I came to a point where I think the 'regular' way is just as good, if not better, as mine. So, doing it the regular way now. (sbox.js)

* Committing a long, very long standing (several years!) change to IE handling of keyboard bindings. Well, actually I'm not committing you. No kidding: I spent years having sbox.js in my 'changed' log every time I did a commit, having to uncheck it because I postponed further tests under IE for this fix. Turned out, the testing process itself took about 3 minutes, and the fix didn't have anything to fix. I'm feeling emotional right now. One less 'permanent' file in my changeset, is something to celebrate. (sbox.js)
Re: New revs
« Reply #2341, on December 4th, 2013, 03:34 PM »
rev 2341 -- phew!! Biggest commit in a long time, really...
 7 files changed, 1456 insertions(+), 568 deletions(-)
 rewrite Themes/default/scripts/stats.js (95%), 15.29 KiB

+ And, welcome to the statistics rewrite... What used to be a long table of meaningless data is now a proper chart, powered by a cool script I heavily customized to my needs. And, it's all Ajaxified. Enjoy. (Stats.php, Stats.template.php, Stats.language.php, stats.js, wraph.js <-- that's the magical script.)

* If no user has entered their gender in their profile, show 'not applicable' in stats, rather than '0:1'. No, they're not all women...

@ Did my best to update the German file and fill in the blank with help from Google. It's probably very gross German, though.

@ Wraph doesn't work on oldIE (<=8), but really? Who cares, at this point..?
Re: New revs
« Reply #2342, on December 6th, 2013, 10:51 PM »
rev 2342 -- this has been a bit of a nightmare, but the result is quite good.
 6 files changed, 595 insertions(+), 449 deletions(-), 7.04 KiB

* More work on the stat charts. (Stats.php, Stats.language.php, stats.js, wraph.js)

  + Added the ability to zoom into a specific area of a chart when it's got more data available (e.g. on the 'Lifetime' chart.) Just drag around the area you want to zoom into.
  + Added pseudo-separators, i.e. when the chart reaches a new month or year, it shows the label in bold. If this step is skipped, then the next available step will be bolded.
  ! Fixed hovering and clicking on mobile devices.
  + The range select box will be updated to show all ranges accessed within this page load.
  * Optimized speed of tooltip renderer. Shouldn't be noticeable, though, but still...
  * Tweaked number of steps to avoid being overwhelmed by useless details.
  * Tons of spacinazi and related changes to the Wraph library, to make it fit the Wedge coding guidelines.
  * Ajax indicator.

@ Need to implement a button to 'cancel' a zoom. I'm not sure about the UI for that, so it's postponed for now.
@ Known issue in mobile: tapping an empty area with a tooltip opened somewhere else will not hide the tooltip if you're on a daily chart. I know why it happens, just can't bother to add more code to 'fix' that.
Re: New revs
« Reply #2343, on December 8th, 2013, 09:36 AM »
rev 2343
 7 files changed, 17 insertions(+), 7 deletions(-), 1.60 KiB

- Reverting the universal border-box. I was happy with the results, but then I remembered that IE6/IE7 didn't support it, and would be systematically broken. I won't add more hacks for these, and I still want to retain at least a bit of usability for these silly browsers, and reverting only adds a dozen bytes to the final gzipped file, so... What the hell. I'll look into this again in a few years, if it keeps bugging me. Border-box is an excellent universal selector to use, better than the content-box default if you're starting a new project. Fixing a large, complex older one..? Probably not so much. (editor.css, index.css, index.member.css, mana.css, media.css, sections.css, zoom.css, Wireless/extra.css)

@ Note: I committed too much of index.css, so I forced a reset of the remote and amended my commit to only have what it needed. (If I ever need to unrevert this... :lol:) --> so, if you updated your repo during these two minutes, it's now broken.
Re: New revs
« Reply #2344, on December 8th, 2013, 08:14 PM »
rev 2344 -- FREE, AT LAST!!!
 39 files changed, 155 insertions(+), 269 deletions(-), 59.72 KiB
 delete mode 100644 Themes/default/Settings.template.php

@ Okay, so this one's a pretty big commit that consists of the bulk of my work on progressively removing $theme variables, and replacing them with either $settings or $options (mostly $settings), or just removing them. I tried listing all files related to respective changes, but honestly, there are so many, I tried twice and failed to gather everything, and I doubt anyone reads through my file lists anyway. Suffice to say, there are tons of stuff.

* Moved show_board_desc and show_children from user options to settings, and show_stats_index, show_latest_member, gender, avatars and blurbs from theme settings to regular settings. I can't think of a single board where I've seen these settings modified anyway, and worse, can't think of a single reason why I would have overridden them. No need to clutter user space with that. (ManageMemberOptions.php, ManageSettings.php, Boards.template.php, Display.template.php, InfoCenter.template.php, Admin.language.php, ManageSettings.language.php, Profile.language.php, install.sql, updgrade.php, upgrade.sql

- Removed setting for warning on new replies. It's on, by default, forever. Live with it. I know that people will ultimately be thankful their new posts aren't ignored by you. (ManageMemberOptions.php, Post.php, Post2.php..)

* Renamed $theme['require_theme_strings'] to $context. Still settable through plugins or templating. I don't remember adding support for extra language strings into skins, so that'll stay for now, but as soon as that is done, you're gone baby, gone. (Load.php)

* Started to merge $theme['default_theme/images*'] variables with the regular non-default ones. (Load.php, Subs-Template.php)

- Removed $context['show_login_bar'], which was an alias to two variable tests, except that all further uses of show_login_bar would systematically reproduce one of these tests, so that's one waste of a test. (Load.php, index.template.php)

- Removed $theme['use_image_buttons'] and $theme['use_buttons'], which were barely used anywhere anyway. (index.template.php, ManageMembergroups.template.php, Memberlist.template.php, ModerationCenter.template.php, Profile.template.php, Search.template.php, Who.template.php)

* $context['menu_separator'] was barely used. Renamed to 'page_separator', and allowing skins to override that. It's probably never going to be used, but at least you can use it to insert extra data in that place through a plugin... Whatever. (Load.php, Display.template.php, MessageIndex.template.php, PersonalMessage.template.php)

* Renaming German language to remove the two-letter code. Basically: if a language is seen as the de-facto 'default' variation, then it doesn't need the code. 'French' and 'German' are exempted. UK English is used by less people than US English, so it's hard to pick a de-facto default here, and thus they both get a code. (index.german.php)

! Wrong function name. (Profile-Modify.php)

- The rest of my uncommitted unnused globals cleanup. (Stats.php, Display.template.php, Msg.template.php, etc.)

* Oh, bugger... That border-box revert isn't going to be so smooth, I forgot one file in the list. (sections.css)

* Moved unread post count to a more proper place in blog homepages. (MessageIndex.template.php)

- Removed Cuil from the list of search engines. It died just two weeks after I started work on Wedge. How amusing. (install.sql)

- Removed unused theme variables, linktree_link and show_bbc. (install.sql)

@ I'll deal with the removal of Settings.template.php later, if you'll allow me.
Re: New revs
« Reply #2345, on December 15th, 2013, 11:12 PM »
rev 2345 -- this huge commit is NOT pushed to master yet; I'm pushing it to the byebye-themes branch, mainly to test branching. I may rebase my stuff, although I'll try to avoid that.
 185 files changed, 1939 insertions(+), 2828 deletions(-), 169.14 KiB (record beaten! And unlikely to be beaten again :P The actual diff patch size is 717KB, and I'm going to go through it again, yay.)

 delete mode 100644 Themes/default/languages/Settings.english-uk.php
 delete mode 100644 Themes/default/languages/Settings.english.php
 delete mode 100644 Themes/default/languages/Settings.french.php
 delete mode 100644 Themes/default/languages/Settings.german.php

@ The previous commit, despite its size, was a joke compared to this one. Removing theme support (while keeping support for 99% of its features with intelligent skinning) saves a surprising amount of code. Most files get a few kilobytes shaved off their size. Everything done by hand (and triple-checked!), but I'm still expecting many things to be broken for a few days/weeks. I'll fix as bug reports come.

* Renamed all $theme variables to $settings equivalents. $theme, the equivalent of SMF's $settings, is gone. Forever. (There are 120 files or something in this commit, I'm not going to list them all.)

* Replaced $scripturl with SCRIPT and 'theme_url/theme_dir' with TEMPLATES/TEMPLATES_DIR everywhere. Lots of fun. Same with images_url/dir and ASSETS/ASSETS_DIR.

* And more importantly, renamed we::$id to MID most everywhere. This is about twice faster, and, I guess, easier to type and remember.

- Removed theme support from a lot of places. Again-- not listing these all. Basically, many areas will now consider there's only one theme, and that's all there is to say. They'll usually accept multiple skins, of course.

- Removed a suspicious $theme['smileys_url'] I couldn't find used anywhere. (Class-Editor.php)

- Removed theme settings page entirely, phew. (Admin.php Themes.php and Themes.template.php, ManageSettings.php, ManageSettings.language.php, and a few others.)

- Removed unused globals as found by the new version of my fix-globals script. (Class-Skeleton.php, Class-String.php, Notifications.php, and maybe a couple others.)

- This $theme['smileys_url'] alias hadn't been used for years. (Class-Editor.php)

- THEMEURL and DEFAULT_THEMEURL have never been used as variables in email templates. Time to go. (Subs-Post.php)

* Replaced $settings['images_aeva'] with just a hardlink to the /aeva assets folder.

* Renamed show_avatars and show_signatures user options to hide_* equivalents, as it used to be in SMF; this was partly motivated by the fact that most user options have a more sensible 'off' default (except for return to post and quick reply, where it makes more sense to enable these), but mostly because it was buggy and I had to fix it.

* Renamed reloadSettings() to loadSettings(). It's never called more than once... (index.php, Load.php)

* Renamed a few variables to use $context instead of a setting. For instance, if you want to play with templates to be loaded, you should now do it with $context['theme_templates']. Although this one will probably go at some point, too. Or be renamed. Or whatever. Also, $theme['output_buffers'] is now in $context. (Load.php, Subs-Template.php)

* Moved path settings from Server to basic settings. Seriously, this never had anything to do with 'database settings', why mix them up together..? (Admin.php, ManageServer.php, ManageSettings.php)

* Rewrote the $boardurl hack for url_parts(). Thus making $boardurl non-changing across the page lifetime. (Subs-Auth.php)

! News sender was incorrectly interpreting {$board_url} as the script URL, i.e. with 'index.php' in default situations. (ManageNews.php)

! Fixed query viewer not redirecting to the correct URL. (ViewQuery.php)

! Fixed thoughts being refreshed (after an Ajax post) in non-mobile mode even when posting from a mobile skin. (Ajax.php, Load.php, Subs-Cache.php)

! Fixed main menu showing error when the login process failed. (Subs.php)

! Fixed a Pete bug in loadEssentialThemeData stuff. Then removed all code related to the bug, including the fix. Because if you've been reading this changelog, I'm sure you won't mind reading an extra useless line. (ScheduledTasks.php)

* Harmonized member table column lists in loadMemberData; this saves something like 3KB, which is that less data the PHP parser has to load every page load. (Load.php)

* Slightly faster JS/CSS cache purging. (Subs-Cache.php)

Now, go ahead, Like like you've never liked a commit before!! Because that means I'm getting closer to a public release :P
Re: New revs
« Reply #2346, on December 16th, 2013, 10:41 AM »
[byebye-themes fab1826] rev 2346 -- Okay, I need to stop posting rev numbers... If you want one, just look at the post number, since they've always matched, and always will (at least approximately.)

 11 files changed, 2 insertions(+), 2621 deletions(-)

! Fixed an occurrence of ROOT being called before being defined. (Subs-Cache.php)

- Removed unit tests. Never used, never will. (other/unittest/*)
Re: New revs
« Reply #2347, on December 17th, 2013, 04:17 PM »
[php-cache 1b3bb92] -- done with rev numbers! <sad>
 10 files changed, 189 insertions(+), 87 deletions(-), 4.16 KiB
 rewrite cache/.htaccess (81%)
 create mode 100644 cache/php/.htaccess
 create mode 100644 cache/php/index.php

+ Added ability to minify and cache PHP source files. This saves about 0.01 to 0.02s per page load. (cache/php, index.php, Load.php, Subs-Template.php)

+ Moved loadSource to index.php, so that we can always call it, from the beginning. (SSI.php, Load.php, ScheduledTasks.php, Subs.php)

* Optimized htaccess for cache folder. (cache/.htaccess)

* Spacinazi. (Login.french.php)

@ While a dozen milliseconds isn't a spectacular speed gain (it's still a 20-30% improvement over regular file includes), it's also the first step towards enabling Wedge to do PHP editing for plugins, just like good old SMF, for situations where hooks aren't flexible enough, with a caveat: you can disable plugins (as opposed to uninstalling them) to easily find the ones that are breaking your site, and you can immediately restore a clean copy of your forum without any changes. Okay, this isn't done yet, and won't be done by the time Wedge goes public, but maybe someone will step up and help.

@ I also need to look into security implications of this change. Couldn't think of anything, but you never know. In any case, it's easy to disable PHP caching entirely, so it's enough to stop me from doing this.[/php]
Re: New revs
« Reply #2348, on December 18th, 2013, 02:25 PM »
Hopefully, no longer giving rev numbers should encourage me to post one-liner fixes, and get into the 'git spirit' a little more... Uh?

[php-cache 7512df6]

! clean_cache() should also clean the PHP cache. (Subs-Cache.php)

 1 file changed, 3 insertions(+), 457 bytes
Re: New revs
« Reply #2349, on December 20th, 2013, 12:42 PM »
[php-cache 69c200a] -- mostly unrelated to PHP caching, but whatever, better than committing to byebye-themes :P
 9 files changed, 34 insertions(+), 36 deletions(-), 2.34 KiB

- Not sure why calls to wesql::error_backtrace would insist on passing totally useless file names and line numbers, when the purpose of that function is to get the proper file/line. (Class-DB.php)

! If we can't load the index language file while processing an error (i.e. it was already loaded, and then erased from $txt, then another attempt was made to load it), then Wedge should insist a bit more. If it still fails, better show a raw page than a styled page full of error messages. (Class-DB.php)

- Removing the infamous 'your database may need upgrading' hint at the end of SQL errors. Seriously, when Wedge upgrades its database format, it'll do it without relying on a stupid upgrade script. (Class-DB.php, Errors.language.php)

! Since PHP caching tends to screw up line numbers in error messages, and preserving line numbers in minified files is possible (I did it in fix-globals last week) but still adds a few bytes I'd like to avoid, I'm disabling PHP cache on setups where debugging is enabled, so that you can keep, err... Debugging properly. (index.php)

! Fixed clean_cache() always removing index.php when using $force_folder outside of the recursive process (i.e. it's not a sub-folder we don't care about.) (Subs-Cache.php)

! Fixed a logic error in ViewFile. Funny thing is, it's not even the first one; but the previous bugs weren't mine. (ManageErrors.php)

! French grammar. (ManageSettings.french.php)

* Commenazi. (Profile-Actions.php)
Re: New revs
« Reply #2350, on December 23rd, 2013, 12:15 PM »
[misc-fixes 434d117]
 9 files changed, 106 insertions(+), 115 deletions(-), 3.13 KiB

* Improved htaccess to automatically detect the best alternative for pretty URLs. In short: enable mod_dir and mod_version, and then you can disable mod_rewrite. (root/.htaccess)

! Fixed a PHP 5.4 warning in contact list generation. (Maybe it's 5.3, I dunno, I skipped that one.) (Class-System.php)

! Fixed a bug in the smiley parser that caused it to always regenerate the smiley cache. Wedge is so fast, I didn't even notice that this was slowing it down. (Subs-BBC.php)

! Prevent running the installer on an existing copy of Wedge. Also fixed that particular detection process, and the error message not disabling the Continue button. (install.php)

* It's certainly much unneeded (for now), but I'd rather make sure the installer only loads pristine copies of the files. I'll need to test later. (install.php)

- Removed some browser version tests that were too old and unneeded. (Class-CSS.php)

* Improved poll builder layout. (Poll.template.php)
Re: New revs
« Reply #2351, on December 23rd, 2013, 07:16 PM »
[php-5.3 2fe90ec] -- how many branches can I live with before I start merging them...? :P
 12 files changed, 291 insertions(+), 339 deletions(-), 6.11 KiB

* Wedge now requires PHP 5.3+, which allows me to use closures instead of create_function or other ugly callbacks. I'm not going to use these everywhere (it's a manual conversion), but I'm definitely excited to use it everywhere I can from now on. Also, using const keywords where possible -- it should be faster over define() calls. (index.php, Class-CSS.php, Class-String.php, Class-System.php, Profile-Modify.php, QueryString.php, Profile.template.php)

* Overhauled the installer's readme file. I don't know if anyone's ever read it, but it needed more work. Eventually, I'll copy that file somwhere on wedge.org, don't fret. (readme_install.html)

- PCRE is always compiled from PHP 5.3 on, and its version is recent enough, so I can finally remove the PCRE test. Which means no one ever got to see it... Hmm. (install.php, Install.language.php)
Re: New revs
« Reply #2352, on December 24th, 2013, 12:14 PM »
[php-5.3 8729bad]
 16 files changed, 129 insertions(+), 111 deletions(-), 3.99 KiB


+ Added wesql::fetch_all() and wesql::fetch_rows() functions, which are helper functions implementing PHP 5.3's mysqli_fetch_all. Still need to actually use it everywhere it makes sense, of course... (i.e. anywhere row retrieval is done all at once.) (Class-DB.php, Pin.php)

+ Wedge now supports a permanent cache status. Just use 'forever' as the TTL parameter. (Subs-Cache.php)

* Wedge now uses permanent caching for settings. Redoing that query every 90 seconds made no sense, as once settings are updated, the cache is always emptied anyway. I found a few areas where it wasn't true, so I fixed them as well. (Load.php, ManagePlugins.php, ManageSearch.php, ScheduledTasks.php, Subs-Post.php, Subs.php)

* Also switched smiley database cache to permanent status. I'd already partially accounted for that in my smiley rewrite years ago, and I'm not exactly sure why I didn't go all the way at the time. (Class-Editor.php, ManageSmileys.php, Subs-BBC.php)

* Wedge cache filenames cache (what an interesting name) is now permanent, too. (Subs-Cache.php)

@ No idea why $settings['settings_updated'] isn't updated in updateSettings() (what an interesting sentence); I have a feeling it's a dirty hack and it should be removed from Wedge ASAP.

- Unused array. (Subs-Cache.php)

- Unused setting. (install.sql)

- Removed an eval feature that was available for lists, but never used. In case plugins need that, I'll add a callback version, but don't ask me to use eval when not needed. (Subs-List.php)

* Renamed post_retri_eval to after_run in cache_quick_get(), and using lambda functions instead of eval(). $params are passed as your function params, as it just makes sense. AFAIK, this is only used in the calendar code, which is not even core in Wedge. (Subs-Cache.php)

* Turned a couple of string helper functions to closures. (Class-String.php)

! Missing global in list_getGroups(). Also got rid of the create_function calls, yay.  (Groups.php)
Re: New revs
« Reply #2353, on December 27th, 2013, 11:12 PM »
[php-5.3 5129f7b]
 21 files changed, 515 insertions(+), 511 deletions(-), 20.03 KiB

* More create_function calls were utterly destroyed for the good of everyone. Nearly all of them are done, the rest are in WIP files. (Dlattach.php, ManageAttachments.php, ManageBans.php, ManageMaintenance.php, ManageMembergroups.php, ManageMemberOptions.php, ManageMembers.php, ManagePaid.php, ManageScheduledTasks.php, ManageSearchEngines.php, ManageSmileys.php, ModerationCenter.php, Modlog.php, RepairBoards.php, Subs-Members.php, install.php)

! Fixed incorrect handling of invalid database prefixes. Replaced a leftover language entry with this new error string. (install.php, Install.language.php)

! Fixed TTL on a settings cache call. (ManageServer.php)

* Saving a cache refresh. (ScheduledTasks.php)
Re: New revs
« Reply #2354, on December 29th, 2013, 03:41 PM »
[php-5.3 8e8967e]
 253 files changed, 33939 deletions(-), 409 bytes

- Moving other/ folder into a different repo altogether, and deleting it from here. At one point, when I get to rewrite/clean up the Wedge history, I'll remove other/ from it entirely, and this commit will be gone, too, so, it's the ultimate opportunity to just say it, loud and clear: (REDACTED-BY-GIT)