Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 04:38 pm EDT

Geeklog Forums

Forum v2.6rc3 - why isn't it standalone?


Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
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.

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');
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Location:Canada
My guess is that the library file is used by one or more of his other plugins.
One of the Geeklog Core Developers.
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
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.
 Quote

Status: offline

eg0master

Forum User
Regular Poster
Registered: 07/21/05
Posts: 73
Location:Stockholm
Quote by: Laugh

My 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 (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.
Geeklog Plugins: http://plugincms.com
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
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.
 Quote

Status: offline

ByteEnable

Forum User
Full Member
Registered: 10/20/03
Posts: 138
Quote by: LWC

Blaine, 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
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/04
Posts: 818
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.
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
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.
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
Location:Canada
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?
One of the Geeklog Core Developers.
 Quote

Status: offline

1000ideen

Forum User
Full Member
Registered: 08/04/03
Posts: 1298
Quote by: Laugh

Plus 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?
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
Quote by: 1000ideen

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?

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.
 Quote

All times are EDT. The time is now 04:38 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content