Core Modules vs Plug-ins

0 views
Skip to first unread message

Robert Impey

unread,
Aug 10, 2008, 12:40:56 AM8/10/08
to Haddock CMS
I've been working on some CLI scripts to handle users in the admin
module. Take a look in

http://code.google.com/p/haddock-cms/source/browse/core/trunk/admin/classes/?r=453#classes/cli-scripts

I've copied some code for setting a user's password to a new random
string and sending out an email to the user from:

http://code.google.com/p/haddock-cms/source/browse/core/trunk/admin/classes/database/elements/row-subclasses/Admin_UserRow.inc.php?r=453

and put it in

http://code.google.com/p/haddock-cms/source/browse/core/trunk/admin/classes/helpers/Admin_UsersHelper.inc.php?r=453

The older code should be considered deprecated.

The code for sending out the email is pretty ugly. There are nicer
ways to do this using:

http://code.google.com/p/haddock-cms/source/browse/plug-ins/email-delivery/trunk/classes/EmailDelivery_TemplateEmail.inc.php?r=453

However, this would involve using a plug-in in a core module, which is
not allowed:

http://wiki.haddock-cms.com/index.php?title=Haddock_Folder

There's no immediate rush to refactor that code but it's frustrating
not to be able to use code.

There are two solutions to this.

One would be to move the email delivery and template plug-ins into the
core of Haddock CMS.

The other is would be to move the admin code to the plug-ins.

Personally, I prefer the latter as the core of Haddock is already
growing quite large and could do with pruning.

I might start a fork of Haddock where I move a number of core modules
(Admin, Database, HTML tags and Public HTML are the ones that I have
in mind) to the plug-ins folder.

Can anyone see any serious problems that would arise from that?
Reply all
Reply to author
Forward
0 new messages