Self-contained MODs
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.
If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Self-contained MODs
With the new hook system and the way cron works we make it possible for MODs to consist only of files to be added. However presently they still need to be located in different directories in various places. I'm wondering if we can make it so that a MOD consists of exactly one directory so that uninstalling it simply means removing that directory (and database changes of course). Any thoughts on this?
Re: Self-contained MODs
I like the idea and I think it should be possible. This would make the forum more clearly arranged, especially if you have many MODs installed.
Maybe this will even be possible by just defining the inclusion path of i.e. an HTML file to the MOD path. The hook system would then load the HTML file from the MOD folder and not from the normal template folder of the style.
But: What do you do if the HTML snippet or file you include is not compatible with the current style? Maybe this will break the whole page layout.
Of course it would be important to define a directory for MODs, i.e. just add the folder "mods" in the root directory.
Anyhow, I like the idea.
Maybe this will even be possible by just defining the inclusion path of i.e. an HTML file to the MOD path. The hook system would then load the HTML file from the MOD folder and not from the normal template folder of the style.
But: What do you do if the HTML snippet or file you include is not compatible with the current style? Maybe this will break the whole page layout.
Of course it would be important to define a directory for MODs, i.e. just add the folder "mods" in the root directory.
Anyhow, I like the idea.
Re: Self-contained MODs
The idea is worth pursuing, however if it would compromise something else I would evaluate pros and cons carefully.
- DavidIQ
- Customisations Team Leader
- Posts: 1904
- Joined: Thu Mar 02, 2006 4:29 pm
- Location: Earth
- Contact:
Re: Self-contained MODs
You could also have a styles directory in the MOD's directory and have the applicable template files and stylesheets, images, etc. for the MOD located there in the appropriately named style's directory. Styles would likely still be either prosilver or subsilver2 based anyways so they would theoretically work the same as they do right now.marc1706 wrote:But: What do you do if the HTML snippet or file you include is not compatible with the current style? Maybe this will break the whole page layout.
Re: Self-contained MODs
IRC wrote: (17:08:00) naderman: I think for a start a phpbb_class_finder('_task', $phpbb_root_path, 'includes/cron/task/') which searches the given directory as well as all MODs for classes with a _task suffix or something along those lines would work nicely
(17:08:01) nx-: my reply was not a sign-up
(17:08:08) naderman: so cron could then just use that to find its tasks
-
- Registered User
- Posts: 523
- Joined: Sat Apr 22, 2006 10:29 pm
- Contact:
Re: Self-contained MODs
I don't have the technical know-how to offer a solution but this definitely makes sense... and I hope it can be implemented.naderman wrote:With the new hook system and the way cron works we make it possible for MODs to consist only of files to be added. However presently they still need to be located in different directories in various places. I'm wondering if we can make it so that a MOD consists of exactly one directory so that uninstalling it simply means removing that directory (and database changes of course). Any thoughts on this?
Re: Self-contained MODs
But many styles change the layout or add things to the html files. Cyberaliens styles are a perfect example of that with the way he uses, eg, $CA_BLOCK stuffStyles would likely still be either prosilver or subsilver2 based anyways so they would theoretically work the same as they do right now.
Do not hire Christian Bullock he won't finish the job and will keep your money
-
- Registered User
- Posts: 5
- Joined: Wed Sep 08, 2010 8:38 am
Re: Self-contained MODs
Well I love the idea, but I don't get how the mods should be parsed.The mod files should be separated from the others, but when you need http://www.example.com/some-file.php to be in the index it should be moved from 'mods folder' to the index and then we go to automod use and not separating.I don't know how this to be done, then the other part should be a bit easier.
Maybe only index files should be moved to index (they may be separated in some folder like 'base') and the other styles,includes.. should not be moved and parsed from mods folder.
Then may be created or saved mod (db, cache or simple info file) information which files are moved from base and then if we want to reinstall that mod that list of base files should be read from this 'mod info file'.This can be done by mod author (like acp modules info files) or automatically via the mod parser.
Hope developers understand it, I'm not very good with English.
Maybe only index files should be moved to index (they may be separated in some folder like 'base') and the other styles,includes.. should not be moved and parsed from mods folder.
Then may be created or saved mod (db, cache or simple info file) information which files are moved from base and then if we want to reinstall that mod that list of base files should be read from this 'mod info file'.This can be done by mod author (like acp modules info files) or automatically via the mod parser.
Hope developers understand it, I'm not very good with English.
Re: Self-contained MODs
This obviously only works for MODs that
a) do not need to modify code
b) do not need to place files into publically accessible places like the root directory.
a) do not need to modify code
b) do not need to place files into publically accessible places like the root directory.
-
- Registered User
- Posts: 5
- Joined: Wed Sep 08, 2010 8:38 am
Re: Self-contained MODs
What are these mods ?naderman wrote:This obviously only works for MODs that
a) do not need to modify code
b) do not need to place files into publically accessible places like the root directory.
Some xml parser like in automod will do the code changes and for the second it won't be very hard to make.
Nevermind I think that some engine to parse edit from one place to another will be very good (no more mod install.xml).