Topics
|
|
phpWebLog
|
|
Last 5 Comments
|
|
phpWebLog Addons
|
|
|
|
Revaluating Addons and Addon Managment
views: 894 |
By Micheal Wigley (---.rancor.birch.net) on Wednesday October 17 2001 @ 02:31PM EDT [ Mods & Hacks ] It is known that phpweblog is one of the best up and coming webpage systems on the Internet. With a well defined API of blocks and main pages and the near infinite possibilities when in conjunction with the php used to script it; I believe there might be no equivelent. The system is not without flaw, however, and one is in the including of unecessary code fragments for those features one doesn't wish to use (and even turns off). Another of those comes from trying to develop and mold the system to suit one's individual needs. This latter gave rise to the development of the Addon system but this too seems to have a flaw being that's very limited. It seems that weblog might be on a gluttonous course yet fear not; I believe we might have a solution.
Here is how I propose we can accomplish this but as with everything much feed back is needed:
A) What is necessary for implementation phpweblog side
1) T_HookRegistry
This table is the backbone of the plugin system that I suggest. It works very much like other registries
keeping a tally of all hooks registered by plugins through the '/plugins.html' setup utility (below).
The table is in development phase and has exaggerated values
+--------------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+---------------+------+-----+---------+----------------+
| Rid | int(14) | | PRI | NULL | auto_increment |
| Name | varchar(255) | YES | | NULL | |
| OrderID | int(14) | | | 0 | |
| HookLocation | varchar(255) | YES | | NULL | |
| CodeLocation | varchar(255) | YES | | NULL | |
| Status | int(1) | YES | | 1 | |
| DateAdded | int(14) | YES | | NULL | |
| LastModified | timestamp(14) | YES | | NULL | |
+--------------+---------------+------+-----+---------+----------------+
2) Code that will need to be added to common.inc.php
Here two variables are created, these will be used by '/plugins.html' (below) and facilitate
dynamic plugin directory placement.
The later code retrieves the HookLocations and CodeLocation of all hooks in T_HookRegistry organized
by HookLocation and OrderId. For every new HookLocation an array will be created. The number of
values in each array is limited only by memory reserves. The array itself is index numerically
and associated to the corresponding CodeLocation. The CodeLocation is the absolute path to the
code fragment to be executed.
3) plugins.php
The '/plugins.html' page handles the registration of plugins and consequently their hooks.
This is the real work horse of this proposed plugin system and given the concept was inspired by that
of SquirrelMail.
# Make KWrite behave in highlight mode
4) phpweblog hook
# If the hook array exists then step through array including '$CodeLocation' where ever one exists
Reviewing the Addons dummy I was impressed with the simple layout and quickness that one could setup a simple Addon. Yet a problem arises when trying to change fundamentals of the environment it lives in. For instance, you have a block created by an authentication Addon and it has a change password link and maybe a logout link. What is the need to create the block if there is only going to be 2 entries in it? Where would you place the links otherwise? Would it be beneficial for a plugin to be able to reference another plugins block and use it? If a mechanism was created to allow plugins to share resources with one another this could be solved. By creating hooks that can then be picked by other plugins you can share resources and code .
As for the Addon layout itself, it's almost exactly what I was envisioning when I was first giving this problem thought and should be maintained with only a few alterations.
B) What is necessary for implementation plugin side
1) Control Structure (index.php)
The rest can stay the way it currently is, like i said it is better then my original structure even though mine
was very similar.
Even though all of this that I have just presented is in it's infant stage it offers the ability to strip all of the non-essentials out of weblog and reintegrated them as plugins (ie polls, topics, etc.). This also allows for easy code management and development. The replacement of the file io with arrays seems to allow for faster load times and overall improved proformace.
Sorry the spelling may be lacking but I am very interested to see everyone's comments on the proposed system. Thankyou.
Reposted on Monday October 29 2001 @ 08:30PM EST
|
jason writes on Friday October 19 2001 @ 12:04PM EDT: [ reply | parent ]
Hey thanks Michael. I'll be looking at this more extensively when I have the time.
Romarin, thoughts?
|
romarin writes on Tuesday October 23 2001 @ 12:27PM EDT: [ reply | parent ]
I have to try this, But it seems good and can be useful to improve easily some functions of phpWebLog.
Has anyone the files ?
|
Micheal Wigley writes on Tuesday October 23 2001 @ 02:29PM EDT: [ reply | parent ]
I have my versions of the files. If you would like I can tar.gz it and send (via email?) it your way. Would that be helpful?
|
Dylan writes on Tuesday October 30 2001 @ 07:48AM EST: [ reply | parent ]
I will have a better look at this when I am more awake (it's 1:40am here).
Overall it looks good, and reasonably managable. I would like to play with it in CVS, however if we add it now, it will delay the next verson (0.5.3, 0.6.0 or Sera-Marie, which ever you prefer) for even longer, and there are some features in there that I think should really see the light of day sometime soon.
How to proceed?
|
|
jason writes on Tuesday October 30 2001 @ 07:59PM EST: [ reply | parent ]
Well actually, the above modification was intended for 0.5.2. With the introduction of "addons" in 0.5.3, we already have a plug-in structure very similar to this one.
The reason for this long delay.. I _KNOW_ there have to be some major bugs in 0.5.3's addons. It was scripted in 3 hours on a caffine buzz. Romarin has sent in a bug fix or two for it, but I'm hoping someone will attempt to develop an addon for it and find a huge bug.
But maybe I'm wrong, are we ready for a release?
Perhaps it will be released as 0.5.3, then if/when any bugs are found/fixed, I will re-release it as 0.6.0. Then we can start on a new wave of features.
|
|
Steen Broelling writes on Tuesday October 30 2001 @ 01:21PM EST: [ reply | parent ]
I think it'll be better to release Sera-Marie (I prefer that name :) now (soon) instead of waiting another round for something new.
That can be added later...
|
dvd rentals writes on Saturday November 06 2004 @ 09:17AM EST: [ reply | parent ]
You are invited to visit the sites dedicated to asset based financing | asset based financing | http://www.asset-based-financing-advisor.info/ | snowboard shop | snowboard shop | http://www.snowboard-shop-e-mall.info/ | online credit card | online credit card | http://www.online-credit-card-e-site.info/ | camera equipment | camera equipment | http://www.camera-equipment-esite.info/ | debt tips | debt tips | http://www.debt-tips-consultant.info/ | snowboards | snowboards | http://www.snowboards-e-mall.info/ | debt counseling | debt counseling | http://www.debt-counseling-consultant.info/ | ameriquest mortgage | ameriquest mortgage | http://www.ameriquest-mortgage-e-bank.info/ | debt management solution | debt management solution | http://www.debt-management-solution-advisor.info/ | car insurance | car insurance | http://www.car-insurancedeals-4u.info/ | construction loan | construction loan | http://www.construction-loan-4u.info/ | ...
|
|
|
PHP.net
|
|
PHPBuilder
|
|
Bordom
|
|
|