New revs

Nao

  • Dadman with a boy
  • Posts: 16,061
Re: New revs
« Reply #2370, on January 5th, 2014, 10:10 PM »
[master 57390d8]
 1 file changed, 1 insertion(+), 1 deletion(-), 428 bytes

! Nice bug... Was calling add_hook instead of call_hook. Thankfully, I never did that anywhere else. (Feed.php)
Re: New revs
« Reply #2371, on January 5th, 2014, 11:30 PM »
! Fixed wrong assets URL in JavaScript. Oops. (index.template.php) <-- just one line, not reproducing everything.
Re: New revs
« Reply #2372, on January 6th, 2014, 10:19 PM »
[master ae6147f]
 2 files changed, 2 insertions(+), 2 deletions(-), 668 bytes

! Profile options were broken due to a typo. (ManageMemberOptions.php)

! Stats page went into a bad infinite loop, but only if visiting it in January (yeah, yeah...) (stats.js)
Re: New revs
« Reply #2373, on January 7th, 2014, 07:55 PM »
[master 9f36769]
 23 files changed, 123 insertions(+), 117 deletions(-), 6.73 KiB

* Rewrote the skin system to use a flat folder structure. While nested folders are good to help understand how it all works, and is globally a bit faster, they make it impossible to use sub-folders elegantly in skins (and I'm all about elegance), and they take more time to update manually. (Subs-Cache.php)

* Simplified wedge_get_skin_list. A lot. It no longer even does recursion to build the array. I never thought I'd manage to do that. (ManageBoards.php, Themes.php)

- Removed css_folder initialization from loadTheme(); it was redone later in the process anyway. (Load.php)

@ Note: I'm having trouble with moving Wilderless, so I'll just be moving it in this commit, and will commit the xml changes in the next one. Also, I refrained myself from using a lambda function in the CSS file builder, but only because these things are called from the installer, too. I should probably just abruptly exit from the installer if PHP 5.3 is not found, instead of going through the templating system. Adding that to my to-do list.
Re: New revs
« Reply #2374, on January 7th, 2014, 07:59 PM »
* It's just one line, but it's good for my git history. (Wilderless/skin.xml)
Re: New revs
« Reply #2375, on January 8th, 2014, 12:09 AM »
[master 509ea9b]
 2 files changed, 34 insertions(+), 32 deletions(-), 1.17 KiB

! Skin folder loading order is important, so I restored the original order. I also rewrote the code to use the skin list cache in order to determine the top-level skin for the current skin chain. (Subs-Cache.php, Themes.php)

- Debug code. (Themes.php)

@ Note to self: need to move the skin list cache code to Subs-Cache.
Re: New revs
« Reply #2376, on January 8th, 2014, 04:57 PM »
[master 73ef974]
 12 files changed, 135 insertions(+), 51 deletions(-), 4.00 KiB

+ Added new cache system: session-based. This is very different from all other implementations, as it holds the entire cache in memory, but from my experience, it's never more than a couple dozen kilobytes. The cache is loaded on session read (any call to the cache before that, such as retrieving $settings, will use the file cache), and saved on session write, but only if it was actually modified. Wedge also handles cache expiration manually. This is superior to my prior attempt at implementing this last week, on which I'd given up. On my system, there's about a 5% performance improvement compared to the file-based cache, but it depends on many factors and may be slower for you. The fact is, install Wedge, then switch between all cache types, and decide which one is the best for your setup. (Load.php, ManageServer.php, Subs-Cache.php, ManageServer.language.php)

+ Added a new SQL insert method, 'update', which will attempt a regular UPDATE query first, and then fall back to the normal codepath for any data set that failed to update. It's only a basic update, the condition query is taken from the first data set entry, and thus is limited to 'variable = {type:variable}'. Still, it can be useful here and there. (Class-DB.php, Load.php)

+ Added auto-optimization of the session table. It's been historically the biggest space waster in the entire table list of SMF/Wedge, and even the auto-optimize weekly task is fairly inefficient on it. It needs to be triggered more often, so I thought this could be a welcomed addition. Only doing optimization on 10% of all session removals. Should be often enough, but I'll need some testing to ensure this is an ideal number. (Load.php)

* Merged both flat and nested versions of the skin list into the same cache entry. Well, it certainly can't hurt. (Themes.php)

+ Added a placeholder for skin enabling/disabling code. Still needs the actual UI for it, of course. (Themes.php)

* Details. (ManageMaintenance.php, ManageMedia2.php, Subs-Media.php, install.php)
Re: New revs
« Reply #2377, on January 8th, 2014, 05:09 PM »
[master 2f7fb2c]
 16 files changed, 90 insertions(+), 90 deletions(-), 2.21 KiB

* Turning all normallist classes into the unused 'list' class. This will make life easier for me later on, if I do what I'm planning to do. (16 files, boring search & replace.)
Re: New revs
« Reply #2378, on January 10th, 2014, 02:24 PM »
[master d3d6572]
 309 files changed, 0 insertions(+), 0 deletions(-)

* Okay... Step 1: rename Themes to core. The rest will follow, I don't want to screw it up.



[master d614364]
 187 files changed, 0 insertions(+), 0 deletions(-)

* Step 2: move Sources to core/sources. Phew...



[master e902490]
 2 files changed, 0 insertions(+), 0 deletions(-)

* Step 3: move Plugins to core/plugins.



[master 83b218c]
 92 files changed, 184 insertions(+), 174 deletions(-), 421.48 KiB (total for all commits in this push.)

* Started updating the program with the new folder structure. I'm totally sweating right now. Moved template files to templates subfolder. Introduced a CORE constant to make it easier to link to these subfolders. (Load.php, QueryString.php, Subs-Cache.php, Subs-Template.php, Themes.php, contributors.txt, install.php, install.sql, ManageBoards.template.php, ManagePlugins.template.php, maybe others.)

* Reverted core/plugins to plugins, to avoid the risk of having core/ URLs in the HTML. I could have ammended my last commit, but this allows me to change the folder to lowercase without any issues with git follow rename. (plugins/*)

* Details. (ManageServer.php, ScheduledTasks.php)

! Fixed SSI link. (Home.template.php)

! Fixed undefined variable in session reading. (Load.php)

- Removed what seems to be a buggy line in the plugin CSS cache code that was supposed to be replaced by a fix, but both lines remained in there. Hmm. QC anyone? (Subs-Cache.php)

- Getting rid of folder names for add_js_file calls to any files within the javascript folder. I'm also considering removing the js extension to match add_css_file calls, but I'm not sure yet. I like adding the js extension, for some reason. (37 files; Admin, Class-Editor, Load, ManageBans, ManageBoards, Profile, Subs-Cache, Subs-Editor, Subs, Aeva-Foxy, Aeva-Gallery2, Aeva-ModCP, Aeva-Subs-Vital, ManageMedia, ManageMedia2; TEMPLATES: Admin, Boards, Display, Login, ManageBoards, ManageMembergroups, ManageNews, ManagePaid, Media, MessageIndex, PersonalMessage, Profile, Recent, Register, Reminder, Stats, index; SKINS: skin.xml, Warm/skin.xml, Wilde/skin.xml, Wine/skin.xml, Wuthering/skin.xml)

NB - This is the quasi-final folder structure, but it may get tweaked depending on my needs, really. At this point, I accept the idea that I'll have an unclean portion of my git history (with many successive folder renames), but it's okay, as it won't hurt either Show Log or Blame in TortoiseGit.
Re: New revs
« Reply #2379, on January 16th, 2014, 06:39 PM »
Got a bit behind, posting all of these revs at once, because I can...

a26b559 +1 -1 line

* ! Typo in announcement code was making this code not work. Doesn't matter much, as the feature needs a rewrite anyway, ahem... (Admin.php)



d094759d8c78c37b04fd9b09b54ba7a1728f2d64 +5 -5 lines

* ! Fixed an old missing language string. (Profile.template.php)



7e1134cd70b733a65fdb909934cacf89ffef791c +1 -1 line

* ! Fixed wrong JS filenames since the recent rewrite. The bug wasn't obvious, as the filename was still valid and JS still worked. (Subs-Cache.php)



b61078b2b4cbbe65ba09dc25456aef0e9199cba3 +1 -1 line

* ! Wess was using the user's preferred skin file, regardless of overrides. (Subs-Cache.php)

! Default skin was always Weaving. Oops. Okay, that was in the same line... (Subs-Cache.php)



[master 236f70c]
 2 files changed, 52 insertions(+), 79 deletions(-).

+ Language caching no longer requires any particular language to have a matching file. Just one of the folders (English, default forum language and user language) needs to have it. If not found, then it's an error as usual. (Load.php)

! Custom language files were always being searched for, if not found. Wedge will now properly cache a non-existent custom file, and if you ever add one, then just flush the language cache. (Load.php)

! Wess will no longer leave $txt variables in if it can't find a matching language string. It'll just replace them with an 'Error' string, which is way, way better than the script refusing to execute, innit..? (Subs-Cache.php)

- Removed integrate_theme_include feature. Never used in Wedge. If a plugin needs this, there's a hook just below it. If a skin needs it, there's an include feature in skins, and if you really want PHP includes, I can look into it. (Load.php)
Re: New revs
« Reply #2380, on January 16th, 2014, 07:42 PM »
[master cebde06]
 4 files changed, 33 insertions(+), 30 deletions(-), 1.33 KiB

! Fixed installer. A lot of things were broken due to the theme removal process. I'm not sure it'll work perfectly everywhere, but it does for me. (install.php, Subs-PrettyUrls.php)

! Fixed incorrect margin on homepage top. (index.css)

* I thought I'd updated the homepage to be set to Home by default... Well, nope. So, I'm doing that now. I don't even know if I want to keep Welcome, at this point. (install.sql)
Re: New revs
« Reply #2381, on January 16th, 2014, 08:01 PM »
[master 919e92f]
 1 file changed, 33 insertions(+), 33 deletions(-)

Improved installer script by making sure that source caching is disabled. Known issue: user isn't auto-logged in after install. Honestly, I don't know why, so it'll remain there until I'm less tired, or someone fixes it for me. (That'll probably come down to the latter, because I can't really bother. Much.) (install.php)
Re: New revs
« Reply #2382, on January 17th, 2014, 01:02 AM »
[master df06599]
 1 file changed, 5 insertions(+), 1 deletion(-)

Can't serialize lambdas, so after_run pseudo-hook failed. Only concerned the calendar plugin, though. (Subs-Cache.php)

NB: this one was a bit fucked up... I did an amend by mistake on the previous commit (I was trying to amend the plugin repo, but targeted the wrong folder), so my tree diverged from the remote one after this commit, and TGit refused to push (thankfully.) So, I 'simply' did a reset soft to HEAD^^, then pulled from remote (!!), then committed my change again. Apparently, the tree is one again. Also, I did a reflog expire and a gc prune, just to ensure my tree wasn't polluting the remote, but I don't think orphan SHA's get pushed anyway. If you understood anything out of what I just said, will you marry me?
Re: New revs
« Reply #2383, on January 17th, 2014, 10:37 AM »
[master 2b676c7]
 3 files changed, 42 insertions(+), 36 deletions(-)

Made calendar homepage a bit more bearable to the human eye. (Calendar.template.php, calendar.css)
Re: New revs
« Reply #2384, on January 17th, 2014, 10:40 AM »
[master e1c0ca2]
 1 file changed, 3 insertions(+), 3 deletions(-)

Fixed plugin CSS cache code. It was nicely broken, and could additionally conflict with other plugins or even main files. Bad! (Subs-Cache.php)