cotonti.com : Can I use structure for a plugin? https://www.cotonti.com Последние сообщения в теме Cotonti en Tue, 15 Sep 2026 11:43:20 -0000 GHengeveld If you want to streamline development and PHP 5.3 is available, you could consider using cot-factory with CotORM.

]]>
ср, 05 сен 2012 20:45:32 -0000
Klaestrup OK, I will give it a try!

]]>
ср, 05 сен 2012 18:54:03 -0000
Trustmaster Then I'd go for a custom module. Comments have the API to be connected to anything, so not a big problem.

]]>
ср, 05 сен 2012 16:32:56 -0000
Klaestrup Yes, the log shall be categorized. Actually I don't think the entries will have a title at all (so no unique page title), but a ID, a repair/problem description and action taken, and to choose status (Not fixed / Fixed etc.).

No markup, just plain text fields.

The ability to write comments would be good, so others can help with a unfixed problem.

]]>
ср, 05 сен 2012 14:03:27 -0000
Trustmaster Are log entries categorized?

If you need to decide whether to use pages or custom database tables, here are helper questions:

  • Is there a free-form text with markup?
  • Does each entry have a unique title?
  • Are the entries categorized as a tree?
  • Do you want to connect comments or other page-specific plugins to each entry?

If all 4 answers were yes, then you should better use pages + extra fields. If you answered no to most questions, especially the first two, then you'd better create your own data model.

]]>
ср, 05 сен 2012 13:49:49 -0000
Klaestrup I will make a repair log, where the technician can create a observasation or a repair. I don't know exactly what info I need in the registrations, but I think it will include some checkboxes, dropdowns and textarea, maybe the possibility for others to post comments. I'm not sure if I can use pages for this type of task, or what will you prefer???

]]>
ср, 05 сен 2012 13:36:23 -0000
Trustmaster Structure is where we can draw the line between modules and plugins: modules can define their own structure, plugins use the structure of existing modules. Technically this limitation is not so strict and you might be able to do that in a plugin, but still it is recommended to make a module instead.

As an example, see how Forums module tells the system that it wants its own structure: forums.structure.php. That file registers it in Administration / Structure section. To use structure of your module in the module's code, just use the global:

$structure['module_code']['category_code']

 

]]>
ср, 05 сен 2012 09:03:05 -0000
diablo what exactly are you gonna do with this plugin? you can use the page structure for almost anything.

]]>
вт, 04 сен 2012 22:05:08 -0000
Klaestrup First I have to say, that Cotonti is so awesome, nice, clean and flexible...! smiley

I want to use structure/categories in a plugin. Is this possible, or do I have to make a module to use the structure function?

]]>
вт, 04 сен 2012 20:03:32 -0000