Posted on: 01/02/07 12:22pm
By: LWC
I'm relieved you've finally removed the PEAR files that need a manual transfer. Now the forum is on the good path to become a standard plugin (main files, public_html, admin).
Yet still there's the theme.[*1]
And also lib-portalparts.php - why?
I mean, all it takes it to leave it in the forum's main folder and change
Text Formatted Code
require_once ($_CONF['path_system'] . 'lib-portalparts.php');
to
Text Formatted Code
require_once ($_CONF['path'] . 'plugins/forum/lib-portalparts.php');
Re: Forum v2.6rc3 - why isn't it standalone?
Posted on: 01/02/07 01:30pm
By: Laugh
My guess is that the library file is used by one or more of his other plugins.
Re: Forum v2.6rc3 - why isn
Posted on: 01/02/07 02:40pm
By: jmucchiello
This is has bothered me as well. Perhaps he should put it in $_CONF['path'] . "plugins/lib-portalparts.php". Or perhaps GL needs a "$_CONF['path']/extensions" directory and lib-common would also be moved there.
Re: Forum v2.6rc3 - why isn't it standalone?
Posted on: 01/02/07 03:13pm
By: eg0master
Quote by: LaughMy guess is that the library file is used by one or more of his other plugins.
I also use a common utility file in several of
my plugins[*2] (all are not released to the public yet). It is included by each plugin's function.inc and each plugin has its own "copy" (so older versions may coexist with newer versions). It is quite easy to guard against multiple definitions with a simple:
Text Formatted Code
if (!function_exists('foo')) {
function foo($bar) {}
}
The drawback ofcourse is that I have to upgrade all plugins when a bug is found and the behaviour of the functions must be backward compatible. But at the moment I prefer this instead of adding files to the geeklog system folder. And I only use this common file for basic common tasks - much like the lib-portalparts.php is used.
I also like the way most plugins use their own theme files if they are not present in the layout/theme folder. Gives them a standard look without adding files to the layout/theme folder i.e. easier to install and remember to to "right" when upgrading.
But these are only a matter of taste but streamlining plugin installs makes it easier for people to install them. We even might see a small script do all file copies automatically if all plugins did the same things in order to install (I think LWC has one he made himself). And I don't see the need for "special treatment" for any plugins at the moment. Even many things added to lib-custom.php by plugins might be added in function.inc. An optimal situation would be for all plugins to install the same way I think.
Re: Forum v2.6rc3 - why isn't it standalone?
Posted on: 01/02/07 04:20pm
By: LWC
Exactly, I've had to devote a lot of time today to make my bin/sh script give the forum plugin a "special treatment" when it upgrades it (i.e. upgrade the special folders and lib-portalparts.php too).
As for the theme, I dedicated it its own topic. If you enter there, you can see I never said it doesn't worth it. All I claim is that the CSS files should be called automatically (thus making them transparent to the admins). Dirk provided the auto CSS function for plugins for a reason. So unlike eg0master's unofficial solution, for the theme there's an actual official solution that is overlooked. Blaine, remember it takes about the same time to read a 5K file or five 1K files.
Re: Forum v2.6rc3 - why isn't it standalone?
Posted on: 01/02/07 05:19pm
By: ByteEnable
Quote by: LWCBlaine, remember it takes about the same time to read a 5K file or five 1K files.
Not true, especially when dealing with CSS files.
http://rakaz.nl/item/make_your_pages_load_faster_by_combining_and_compressing_javascript_and_css_files
http://drupal.org/node/101227
Re: Forum v2.6rc3 - why isn't it standalone?
Posted on: 01/02/07 06:29pm
By: LWC
What if each plugin starts to demand you manually add its CSS?
I think those sites agree with me it's illogical to actually combine everything, which is why both offer patches to virtually and automatically combine.
Re: Forum v2.6rc3 - why isn
Posted on: 01/02/07 07:42pm
By: jmucchiello
Well the real solution is to only include the css files that will be used. If I'm in submit.php chances are I won't need anything from the forum's css file. But I realize that this solution would require a major rewriting of how COM_siteHeader works.
Re: Forum v2.6rc3 - why isn't it standalone?
Posted on: 01/08/07 11:19am
By: Laugh
I think including cms files that only will be used would be difficult since plugins do use blocks and those come into play all over the place and each sites setup could be different.
Plus are not most css files just loaded once at the first request?
Re: Forum v2.6rc3 - why isn
Posted on: 01/08/07 01:29pm
By: 1000ideen
Quote by: LaughPlus are not most css files just loaded once at the first request?
Yes, I also remember the developers discuss this somewhere. I don`t think that it is such a problem. The poll plugin has 2 classes in the style.css and the calendar plugin got it`s own css. As I don`t use either of them I`ll simply delete the css or respective parts.
Probably it is the best solution to copy and paste the forum css code into the main style.css for speed reasons.
But what about the many config.php files for the plugins? I copied the code into the main config.php to keep an overview and replace it with a "require_once". Any thoughts on that?
Re: Forum v2.6rc3 - why isn't it standalone?
Posted on: 01/08/07 05:21pm
By: jmucchiello
Quote by: 1000ideenBut what about the many config.php files for the plugins? I copied the code into the main config.php to keep an overview and replace it with a "require_once". Any thoughts on that?
What are you asking? That the installs consolidate the config files? No, I'd rather make my files readonly and limit the number of writeable files to certain directories. The "cost" of reading those files is small compared to the simplicity of having them in logical locations.