New revs

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1080, on October 10th, 2011, 02:12 AM »
Revision: 1080
Author: arantor
Date: 01:12:38, 10 October 2011
Message:
! Generate the right URL if a URL is provided for admin item icons. (Subs-Menu.php)
----
Modified : /trunk/Sources/Subs-Menu.php
Re: New revs
« Reply #1081, on October 10th, 2011, 02:22 AM »
Revision: 1081
Author: arantor
Date: 01:22:05, 10 October 2011
Message:
! If a plugin can't be activated because of some requirement, make it more prominent (and consume slightly less space whilst not looking like rubbish) but also actually leave them the delete button in order to remove said plugin. (ManagePlugins.template.php)
----
Modified : /trunk/Themes/default/ManagePlugins.template.php
Re: New revs
« Reply #1082, on October 10th, 2011, 01:24 PM »
Revision: 1082
Author: arantor
Date: 12:24:25, 10 October 2011
Message:
! Allow a plugin to indicate that a given hook to be used is optional: that it should be registered as if to be called, but that it isn't a strict dependence, so if you know another plugin has a given hook, you can register for it but if the other plugin isn't installed, it'll just not do anything. And bonus: if you later install the other plugin, no extra work is required, it'll just work as expected. (plugin-info.rng, ManagePlugins.php)
----
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/other/plugin-info.rng
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 #1083, on October 10th, 2011, 01:57 PM »
rev 1083
(2 files, 4kb -- larger commit coming up.)

* Minor optimization with URL matching. (Subs-Media.php)

! Suspecting a typo here... (other/plugin-info.rng)
Re: New revs
« Reply #1084, on October 10th, 2011, 02:01 PM »
rev 1084
(16 files, 33kb)

* Created a 'wetem' (Wedge Template) object, where the entire skeleton system has been moved. Among the functions that will be of interest to modders, loadBlock() is renamed to wetem::load, loadLayer() to wetem::layer, removeLayer() and removeBlock() to wetem::remove, and hideChrome() to wetem::hide. (Subs-Template.php)

+ Testing for a layer or block's presence in the skeleton is now done through wetem::has_block() or wetem::has_layer(), or generally through wetem::has() which will return true if it finds a block of layer with that name. (Profile.php, Security.php, Subs-Template.php)

* Started fixing files to use the object. (index.php, Boards.php, Display.php, ManageAttachments.php, ManageMedia.php, ManageMedia3.php, PersonalMessage.php, Profile.php, Subs-Menu.php, Welcome.php, SSI.php)

* Moved post list to a layer. The code looks complicated for now, but with the next rewrite it will be much simpler. (Display.php, Display.template.php)

@ Note: Wedge will BREAK on many pages with this release, as I need to finish converting all files to use the template object, as well as reprocess the object to use a more general method to handle both blocks and layers. Please bear with me.
Re: New revs
« Reply #1085, on October 10th, 2011, 02:08 PM »Last edited on October 10th, 2011, 02:20 PM by Nao
rev 1085
(79 files, 55kb)

* Converted remaining loadBlock calls to wetem::load(). (other/unittest/index.php, skins/Warm/skin.xml, 77 source files)
Re: New revs
« Reply #1086, on October 10th, 2011, 02:22 PM »
rev 1086
(2 files, 5kb)

! Fixed crash that occurred when saving a PM draft with an unknown recipient. Because getPmRecipients was called without going through MessagePost2 first, the Subs-Auth file wasn't loaded in the first place. (PersonalMessage.php)

! Layout issue in Personal Message area when using wrc class on non-PM elements, i.e. anything outside the PM list. (index.member.css)
Re: New revs
« Reply #1087, on October 10th, 2011, 05:50 PM »
rev 1087
(4 files, 8kb)

* Sorted the wetem methods to put the public ones at the front. Turned wetem into a final class and converted variables to private. Until we find a good reason to make wetem inheritable, it should remain locked from view. (Subs-Template.php)

* Commenazi. (Errors.php, Themes.php, Subs-Template.php, index.template.php)
Re: New revs
« Reply #1088, on October 10th, 2011, 05:54 PM »
rev 1088
(35 files, 23kb)

* Commenazi - renamed all 'sub template' (without a dash) to 'block'. (SendTopic.template.php, Themes.template.php, and 33 source files.)
Re: New revs
« Reply #1089, on October 10th, 2011, 09:23 PM »
rev 1089
(4 files, 12kb)

+ wetem::load() can now process multidimensional arrays where sub-arrays are layers. New child layers should be properly indexed, too. (Boards.php, Display.php, Subs-Template.php, Welcome.php)

* Renamed a few ::layer options. 'replace' to 'rename' (because it's ultimately what it does), 'erase' to 'replace' (makes more sense), 'firstchild' to 'first' and 'lastchild' to 'add' (for consistency with ::load). Considering whether we should remove some of these options in favor of the use of ::load()... (Subs-Template.php)
Re: New revs
« Reply #1090, on October 10th, 2011, 09:26 PM »
rev 1090
(14 files, 11kb)

! Forgot to rename hideChrome() to wetem::hide(). (unittest/index.php, CoppaForm.php, Help.php, ManageBans.php, ManageErrors.php, ManagePlugins.php, Aeva-Gallery.php, ModerationCenter.php, Packages.php, PrintPage.php, Reports.php, Spellcheck.php, VerificationCode.php, ViewRemote.php)
Re: New revs
« Reply #1091, on October 10th, 2011, 10:54 PM »
rev 1091
(17 files, 18kb)

* Layers used to have _above and _below functions. These have now been renamed to _before and _after, for simplicity. Please note that due to the peculiarity of layers, you can override or overload these two special functions, unlike the _before and _after that are attached to any block. See example in Welcome template. (Reports.php, Subs-Template.php, Welcome.php, TEMPLATES: Display, index, InfoCenter, ManageAttachments, ManageMedia, Media, PersonalMessage, PrintPage, Profile, Reports, Welcome, Wireless)

! Reports was using a layer with the same name as its contained block. Although technically it worked, it's bad practice. I should probably refuse adding blocks when a layer of the same name already exists... (Reports.php, Reports.template.php)

- A colon was stored in the language files when other strings on the same page stored it in the template itself. (Profile.language.php, Profile.template.php)

@ Note: I'm open to suggestions regarding a way to clarify the fact that template_layer_before() can be overloaded with template_layer_before_before() or _after(), while template_block_before() can't... :P

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: New revs
« Reply #1092, on October 11th, 2011, 10:14 AM »
Revision: 1092
Author: arantor
Date: 09:13:48, 11 October 2011
Message:
! Plugin manager should now sort case-insensitively. It's still going to be off if there are mixed languages present, but there's no good way around that. (ManagePlugins.php)

! Provide filtering capability in the plugin manager, filtering by all/enabled/disabled/can't-be-enabled (aka incompatible) (ManagePlugins.php, ManagePlugins.template.php, ManagePlugins language file)
----
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Themes/default/ManagePlugins.template.php
Modified : /trunk/Themes/default/languages/ManagePlugins.english.php
Re: New revs
« Reply #1093, on October 11th, 2011, 11:20 AM »
Revision: 1093
Author: arantor
Date: 10:18:57, 11 October 2011
Message:
! Clean up of the internal plugin manager code. No need to tell it to iterate every child and test the element name, we can do that with the foreach and have it filter for us automatically. (ManagePlugins.php)

! Remove the need for Class-Package in the language pack getter. One step closer to purging the xmlArray class! (ManageServer.php)
----
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Sources/ManageServer.php


(The point of getting rid of the xmlArray class (Class-Package) is that it's 17KB of XML handling that we don't need when SimpleXML will do the job just as well, if not faster. The only uses left now for xmlArray are in the old package manager, which I'm working on phasing out.)
Re: New revs
« Reply #1094, on October 11th, 2011, 01:08 PM »
Revision: 1094
Author: arantor
Date: 12:00:34, 11 October 2011
Message:
! If a plugin is already enabled, disallow any other plugin using the same id from being enabled. Anyone upgrading a plugin will by definition need to disable the older one before enabling the new one. (The whole nature of hot-upgrade-in-place is fraught with danger. It depends how much initialisation you do on start-up, we don't do much for performance's sake, which means caches etc. MUST be cleared by next runtime on a plugin's run. By forcing that break, it makes everything a lot safer.) (ManagePlugins.php, ManagePlugins language file)
----
Modified : /trunk/Sources/ManagePlugins.php
Modified : /trunk/Themes/default/languages/ManagePlugins.english.php