cotonti.com : Core functions pluggable https://www.cotonti.com Останні повідомлення в темі Cotonti en Mon, 02 Feb 2026 18:47:30 -0000 Brock Thu, 18 Гру 2008 07:46:16 -0000 esclkm Thu, 18 Гру 2008 03:53:43 -0000 Trustmaster
Hmm, is the pagination thing already in Trac? My vbulletin-style would do, but it needs figuring out and fixing some weird bug, or probably using some third-party code.]]>
Thu, 18 Гру 2008 03:48:53 -0000
Lombi # esclkm : and i think that in new CMS pagination method must be replaced from sedplus plugin

Yeah, either that one or the one that Trustmaster did (vbulletin pagination), this one is horrible.]]>
Thu, 18 Гру 2008 03:23:37 -0000
esclkm and I think that rating, comments, parser, pagination must be pluggable
but I think that they must be not look like plugins or replaceble files - they must be something between them.
For example:
folder "functions" in default there are files:
parser.default.php
pagination.default.php
comments.default.php
ratings.default.php etc.

user download and insert in this folder new parser "parser.new.php". And then in admin area he choose parser.

So in this way:
1. this functions are not plugins
2. standart functions we don't need to replace they are only not in functions.php
3. easy to install. easy to choose
4. if user update CMS, custom functions will be not replaced by standart files

what do you think about this?
and i think that in new CMS pagination method must be replaced from sedplus plugin]]>
Thu, 18 Гру 2008 00:31:34 -0000
Trustmaster xBB.]]> Пт, 22 Сер 2008 09:59:29 -0000 Orkan but the question is what they really want? a custom parser or ability to add custom bbcodes?
I would like to hear some arguments here]]>
Пт, 22 Сер 2008 07:19:59 -0000
Trustmaster Пт, 22 Сер 2008 06:11:19 -0000 Orkan
Im not sure why you would replace the internal parser?]]>
Thu, 21 Сер 2008 22:07:35 -0000
Trustmaster Thu, 21 Сер 2008 18:20:14 -0000 Kilandor
I didn't say what I meant though clearly, I meant say, if your testing changes to BBcode, not always new bbcode. But overall I think we can do it so it can be config and on demand re-parsing.]]>
Сб, 16 Сер 2008 13:40:24 -0000
Trustmaster Kilandor:
*trying to test new bbcode, means re-parsing each time Not really. Old messages cannot contain this new bbcode, so you don't need to reparse them. New bbcodes automatically apply to new messages and that is not a problem.

Kilandor:
Alt Solution, make a option to enable, pre-parsed message storing.
I think the only true option would be to clear the stored messages, and only have them re-parsed when they are loaded, but you could have an option as well to re-parse all.
Sounds good. Really worth implementing.]]>
Сб, 16 Сер 2008 12:51:45 -0000
Kilandor
Pro
*Quicker Execution
*No need to parse bbcode every single page load.

Cons
*Making changes, to bbcode require every single page/post to be reparsed - this could create major issues on sites with large date - solution could be to only reparse it when that page/post is loaded
*trying to test new bbcode, means re-parsing each time

Alt Solution, make a option to enable, pre-parsed message storing.

I think the only true option would be to clear the stored messages, and only have them re-parsed when they are loaded, but you could have an option as well to re-parse all.]]>
Сб, 16 Сер 2008 09:56:37 -0000
Trustmaster
Pros/cons?]]>
Сб, 16 Сер 2008 05:48:11 -0000
Trustmaster
What about the rest pluggable functions Tefra mentioned?]]>
Сб, 16 Сер 2008 05:39:14 -0000
Orkan
I still think this is too much essential feature to have it out of the box.
It'll present in all installations and we will use it a lot in the core.
We should have a control over it and provide an API to extend it - but not to have it pluggable - its too much waste of resources, IMO]]>
Сб, 16 Сер 2008 05:27:57 -0000
Trustmaster
As far as I see it would be better to combine the efforts to have a powerful bbcode parser out of the box with bbcode editor and API to add/remove bbcodes in plugins, with all PCRE and "remove extra <br>" patches applied, and completely reworked HTML parsing mode.]]>
Пт, 15 Сер 2008 19:51:31 -0000
Orkan Пт, 15 Сер 2008 16:40:52 -0000 Kilandor
As the parser functions pull from that data, and its cached. Mysql usage like this is very very minimal, as it uses a cache.

I don't see any other options unless you created a painful file creating structure to add and store it all in a php file, that had api access, which would be a bit more difficult, not to mention more chances for problems

And maybe some similar creation can be done for the others.]]>
Пт, 15 Сер 2008 16:27:32 -0000
Trustmaster
But, of course, if we could put all the parsers in one powerful parser, I would be all for it. The problem I encountered with parser_v2 is that those 2 arrays for str_replace() and preg_replace() (yeah, forget eregi, it's much slower) are not enough and for some sophisticated parsing you need preg_replace_callback() and custom functions. At that, some parser functions conflict with each other (e.g. nl2br).

I can't say I'm all for many parser mods, but are you sure it is possible to have superior one?]]>
Пт, 15 Сер 2008 15:14:00 -0000
Orkan
Lets say you have installed a new gallery plugin which adds new bbcode [photoid=123]
Then, you have yet another plugin ie. for flash movies, with new bbcode [movie]...[/movie]

How this will work with modules? You cant replace one parser with another b/c that way you lose the other one.

I would like to see one, internal Parser() function which will operate on two arrays.
PS. These 2 arrays are now "closed" in sed_bbcode() - one for str_replace() and one for eregi_replace()

Both arrays should be stored in DB and therefore be accessible to any plugin.
Each time you install new plugin, it can add new bbcodes to DB.

What I mean is that we need only one powerful Parser() function with its basic functionality.
With modules we can only destroy Seditio's clarity and code integrity.

I would suggest - instead of modules - creating flexible functions that plugins can use with their own data. There is no point in copying Sed's functions to modules, IMO :)]]>
Пт, 15 Сер 2008 13:33:29 -0000
Trustmaster http://www.neocrome.net/plug.php?e=tracker&m=bview&pr=1&id=404
http://www.neocrome.net/forums.php?m=posts&p=123836#123836

Well, I think we don't really need them as plugins, because you are not likely to install more than 1 parsers at once (otherwise they will conflict).

What I would suggest right now is to have some of core functions you would like to replace grouped in "modules" like:
system/mods/parser.inc.php
system/mods/pagination.inc.php

So, once you need another parser, you just download third-party parser.inc.php and replace the default one. Yes, that will add a few more require's in common.php, but that's still faster than having them as plugins. And I made includes work slightly faster, see Ticket #39 on Trac.

Alternatively, could pick up all includes in system/mods folder, but that will be more disk operations.]]>
Пт, 15 Сер 2008 08:20:50 -0000