New revs

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: New revs
« Reply #2715, on November 12th, 2014, 11:31 PM »
[Commit revision 010e52b]
Author: Nao
Date: Wed, 12 Nov 2014 23:31:07 +0100
Stats: 1 file changed; +1 (insertion), -1 (deletion)

  • Actually, users should be able to override the number of topics shown on the homepage... (Home.template.php)
Re: New revs
« Reply #2716, on November 12th, 2014, 11:42 PM »
[Commit revision 7769f80]
Author: Nao
Date: Wed, 12 Nov 2014 23:42:45 +0100
Stats: 7 files changed; +10 (insertions), -10 (deletions)

  • Some areas didn't use the latest flag icon code, resulting in incoherent padding. (ManageSettings.php, Profile-Modify.php, TEMPLATES: Admin, ManageInfractions, ManageMail, ManageModeration, Register)
  • Again, mostly untested...
Re: New revs
« Reply #2717, on November 16th, 2014, 09:17 PM »
[Commit revision ee77aaf]
Author: Nao
Date: Sun, 16 Nov 2014 21:15:43 +0100
Stats: 1 file changed; +31 (insertions), -23 (deletions)

  • The smiley CSS generator wasn't applying page replacements; as this features is intended to allow you to replace straight folders with sub-domains for readability or whatevs (see wedge.org), it was breaking non-embedded smileys. (Subs-Cache.php)

[Commit revision 8f04071]
Author: Nao
Date: Sun, 16 Nov 2014 21:17:13 +0100
Stats: 1 file changed; +3 (insertions), -7 (deletions)

  • Fixed relative dates... Again. Hopefully, for good this time. (Subs.php)
Re: New revs
« Reply #2718, on December 10th, 2014, 03:57 PM »
[Commit revision 16b5014]
Author: Nao
Date: Wed, 10 Dec 2014 15:46:40 +0100
Stats: 3 files changed; +129 (insertions), -2 (deletions)

  • Implementing support for SMF-style file modifications (mods). (ManagePlugins.php, Subs-MinifyPHP.php, index.php)
  • Notes:
  • (1) You may only edit files loaded via loadSource, including SSI.php and most files in the core/app folder.
  • (2) This is a very basic implementation for now. Hopefully, I can build upon this to make it a better mod system than SMF's.
  • (3) You need to add a 'mods.xml' file to your plugin folder, and just have it say things like this: <file name="Home"><operation><search position="after">loadTemplate('Home');</position><add>echo 'Hello, world!';</add></operation></file>.
  • (4) You can use CDATA tags if you want, but they're not actually taken into account. Meaning you can't really use </position>, </add> and </operation> strings inside your code. But then again... Why would you?
  • (5) This new feature enforces the use of app caching. So every time you enable or disable a plugin, pages should take a bit longer to load, to give Wedge time to actually re-patch files on your behalf. Good news is, if a file can't be patched (e.g. wrong file version or you edited it manually), conflicting plugins should be automatically disabled, and an error will be logged for admins to look into. Needs translations and stuff.
  • (6) As usual, I haven't tested much.
Re: New revs
« Reply #2719, on December 10th, 2014, 10:26 PM »
[Commit revision edb14af]
Author: Nao
Date: Wed, 10 Dec 2014 22:26:34 +0100
Stats: 1 file changed; +1 (insertion), -0 (deletion)

  • Forgot to declare $flushed in DisablePlugin. Thanks CerealGuy! (ManagePlugins.php)
Re: New revs
« Reply #2720, on December 21st, 2014, 08:57 PM »
[Commit revision 921070e]
Author: Nao
Date: Sun, 21 Dec 2014 20:54:56 +0100
Stats: 4 files changed; +0 (insertion), -5 (deletions)

  • Removing disableTemplateEval setting... Next commits will deal with the feature in a way that allows running evals without losing any time. Permission to look smug, sir? (ManageServer.php, Help.english.php, ManageSettings.english.php, install.sql)
Re: New revs
« Reply #2721, on December 21st, 2014, 09:51 PM »
[Commit revision d1657f6]
Author: Nao
Date: Sun, 21 Dec 2014 21:51:00 +0100
Stats: 5 files changed; +45 (insertions), -24 (deletions)

  • Introducing support for template modding, yay! Basically, templates are now cached the same way source files are (except in the new gz/html folder), and then they go through the same patching process. This is untested, but it should work, and if it doesn't, I'll fix it soon. (Load.php, OriginalFiles.php, Subs-MinifyPHP.php, Subs-Template.php, index.php)
  • All templates are now evaluated once at cache time, and never again after that. Best of both worlds...? Although I guess if the error is in a main template, it won't do you much good to have it listed in the error log if you can't show it, will it..? (Subs-Template.php)
  • If the gz/app folder is removed by mistake, loadSource will re-create it automatically. (index.php)
  • Language inclusion needs no basic caching, since it already has caching of its own. (Load.php)
Re: New revs
« Reply #2722, on December 22nd, 2014, 01:00 AM »
[Commit revision f73826a]
Author: Nao
Date: Mon, 22 Dec 2014 00:59:22 +0100
Stats: 3 files changed; +3 (insertions), -3 (deletions)

  • Unused globals. (Security.php, Subs-Cache.php)
  • HTML tags aren't allowed in error messages... (Subs-MinifyPHP.php)
Re: New revs
« Reply #2723, on December 23rd, 2014, 11:14 PM »
[Commit revision 779c7c0]
Author: Nao
Date: Tue, 23 Dec 2014 23:14:10 +0100
Stats: 2 files changed; +3 (insertions), -3 (deletions)

  • iOS doesn't like <input type="number">, so I'm forcing a numeric keypad in situations where visitors can access one (PM search, and post search, basically.) Silly hack... (PersonalMessage.template.php, Search.template.php)
Re: New revs
« Reply #2724, on December 24th, 2014, 12:34 AM »
[Commit revision 5483d62]
Author:
Date: Tue, 23 Dec 2014 23:19:13 +0100
Stats: 1 file changed; +6 (insertions), -3 (deletions)

  • Wedge didnt clean the html cache, so template modifications didnt get
  • applied.
  • If the plugin has no mods.xml we dont need to clean the cache at all.

[Commit revision 9d5de43]
Author: Nao
Date: Wed, 24 Dec 2014 00:34:13 +0100
Stats: 1 file changed; +6 (insertions), -3 (deletions)

  • Merge pull request #24 from C3realGuy/master
  • Wedge didnt clean the html cache, so template modifications didnt get
Re: New revs
« Reply #2725, on December 29th, 2014, 08:43 PM »
[Commit revision 76d76c0]
Author: Nao
Date: Mon, 29 Dec 2014 12:54:44 +0100
Stats: 1 file changed; +1 (insertion), -3 (deletions)

  • Subs-Admin is no longer needed in a function, the call was forgotten by Arantor when he removed some other code 2 years ago. (Errors.php)

[Commit revision 1b5c546]
Author: Nao
Date: Mon, 29 Dec 2014 20:42:50 +0100
Stats: 10 files changed; +150 (insertions), -141 (deletions)

  • Renamed Subs-MinifyPHP to Subs-CachePHP, because now it does more than just minify a file. It also deals with everything a PHP file needs to go through to end up in the cache folder, including modding. (Subs-CachePHP.php)
  • Moved updateSettingsFile() from Subs-Admin to Subs-CachePHP, to prevent any potential crashes if Subs-Admin was modified by a plugin mod and then another mod crashed another file. It's too complicated, just trust me on this one... Also, since it handles writing PHP files, it's similar in spirit to the other functions in that file. (Subs-Admin.php, Subs-CachePHP.php, ...)
  • updateSettingsFile() will now determine variable types by itself, so there's no need to escape them before sending them to the function. That was one silly way of doing things..!
  • Allowed loading Subs-CachePHP through loadSource, for convenience in calling updateSettingsFile; this doesn't change the fact that it's not moddable! (index.php)
  • Renamed $settings['enabled_plugins'] to $my_plugins, to make the array independent from database access, allowing for more source files to be modded.
  • Files modified by this commit: Subs-MinifyPHP.php, Load.php, ManagePlugins.php, ManageServer.php, ManageSettings.php, OriginalFiles.php, Subs-Admin.php, Subs-Plugins.php, Upgrade.php and index.php. I'm not listing them individually above because most of the entries would list most of the files anyway.

Jurien

  • All i want is a couple days off
  • Posts: 132
Re: New revs
« Reply #2726, on December 30th, 2014, 12:34 PM »
On my test forum something went wrong

Fatal error: require_once() [function.require]: Failed opening required '/home/onkecjfr/domains/phdforum.nl/public_html/mymug/wedge-master/core/app/Subs-MinifyPHP.php' (include_path='.:/usr/local/lib/php') in /home/onkecjfr/domains/phdforum.nl/public_html/mymug/wedge-master/gz/app/Subs-Template.php on line 1129

Code: [Select]
$cache = $no_caching ? $filename : ROOT_DIR . '/gz/html/' . str_replace(array(ROOT_DIR . '/', '/', '..'), array('', '_', 'UP'), $filename);
$settings['current_include_filename'] = $cache; // For debugging purposes...
$file_found = file_exists($cache);

if (!$no_caching && (!$file_found || filemtime($cache) < filemtime($filename)))
{
if (!file_exists($filename))
{
loadSource('ManageErrors');
handleTemplateErrors($filename);
}
require_once(APP_DIR . '/Subs-MinifyPHP.php');
apply_plugin_mods($filename, $cache);
minify_php($cache);

CerealGuy

  • Posts: 343
Re: New revs
« Reply #2727, on December 30th, 2014, 12:47 PM »
@Freñiçh
Use the commit before or change 'Subs-MinifyPHP.php' to 'Subs-CachePHP.php'. Also you can delete the Subs-MinifyPHP.php file.

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: New revs
« Reply #2728, on December 30th, 2014, 02:27 PM »
Sorry, forgot to commit my file. That's because it has custom changes to disable auto-merging for testing purposes, and I tend to disable it before committing stuff. If only git could allow for ignoring specific changes in a file, rather than an entire file... Their way of doing it is wrong.

As for the my_plugins error, I'll look into it. Busy right now... Baby stuff.

PS... Having comments in this topic is odd. Yet I allowed for it because it gives the topic more... Life?

CerealGuy

  • Posts: 343
Re: New revs
« Reply #2729, on December 30th, 2014, 03:22 PM »
Perhaps you should permit people to reply on this topic. I dont think that it needs "life", its only to keep track of new commits. In my opinion bugs should be discussed in an own topic.