Replies: 1 comment 2 replies
|
Všetko najlepšie k narodeninám, @Jimmi08! One day late, but the audit below is my card. Your TYPE A/B/C/D classification maps really well onto what the code actually looks like. I went through the codebase with a fine-tooth comb and the evidence backs it up. By the numbersCore code has 65 direct
The good news: e107 already has the right infrastructure for clean separation. The TYPE A: separated but with dangling wiresYou said "if you delete this type of plugin files and something is broken, it is a bug." Agreed. And there are bugs. Forum has its own tables and
Poll: Banner: TYPE B: entangled with coreNews is the deepest:
Social runs deeper than a single
TYPE C: core code that should be plugin codeComments is the hardest case:
Ratings: same pattern. Navigation: you pointed this out already. The URL systemYou said this is "the worst" and I'd back that. Core has URL handlers in Practical order for decouplingTo your first question: "removable" as in separate repos or as in deletable from an installation? I think the answer is the second one first. If deleting files can't break core, moving to separate repos becomes safe later. If this gets tackled step by step:
All of it touches backwards compatibility. But you've already proven in your Lite fork that a slimmer core works in practice, and having the map makes it easier to chip away at the right places. Full audit table (65 core-to-plugin includes)All line references pinned to Hardcoded plugin includes (11)These reference a specific plugin by name. Removing that plugin breaks the include.
Root-level PHP files (thin plugin wrappers, 8)These files exist solely to
Dynamic plugin includes via e_* addon system (36)These iterate plugin preference lists and load plugin-provided hooks. This is the correct pattern, but still represents a core-to-plugin interface.
Core shortcodes with plugin database queries
Plugin-serving tables in core SQL
Plugin prefs stored in core SitePrefs
|



Uh oh!
There was an error while loading. Please reload this page.
At first, I noticed this line in today's post, and @rica-carv mentioned my Lite version, so I would like to make some notes.
I am not asking for anything, there are more important things to do, but if we agree on far far future plan, it can be taken step by step.
I tested and tried this again and again in different ways, so maybe I can say where I hit limits and what was possible or not.
1. question what do you imagine under the word "removable"? Because there are 2 answers. First, move to separate repos or second, to be able to just delete code from installation. I did first way, but only because there were no fixes in the core for a long time. It is harder to maintain, so if it is called a core plugin, then it should be packed with the core. There can be a community decision that some plugin is not core anymore, then you can move it to a separate repo.
For the second way, I already asked about the option to delete the uninstalled plugin from the Plugin manager. But it is related to the topic of how to add those plugins back if they are needed after some time (they should be listed on e107.org then).
2. plugins types regardless of this topic, there are some types of core plugins
TYPE A = already separated (like forum, download etc) - there should be a rule that - if you delete this type of plugin files and something is broken, it is a bug (for example, missing test if plugin is installed, or hardcoded legacy stuff etc). Some are fully separated - FAQs - because they are new in version 2.
TYPE B = plugin already exists, but it is entangled with core. You know them by using core shortcodes, core templates or core URL system. The URL system is the worst - it is the plugin, so it should use the e_url addon. I was able to do this for the gallery and the news, so I know this is possible, but it is a wide topic. Any change in those plugins should start with the core URL rewrite system. The next step is moving core prefs to plugin prefs. Core prefs shouldn't contain prefs that belong to the already existing plugin area. Only then continue with handlers, shortcodes, templates...
TYPE C = functionality in core that should be in separate plugins (for me, it is comment, rating system - if the site doesn't need them, why can't I remove them by removing the plugin? ). You can see an example already in the navigation plugin; it is partially done. it is called a navigation plugin, but it is not a separate plugin.
TYPE D = plugins that duplicate functionality from legacy or back compatibility reasons - like login_menu and signin, like featurebox and hero plugin.
And with this topic, loading of e107 handlers is related too,
All reactions