×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: new custom field developing

new custom field developing 7 years 6 months ago #35855

  • Maik Grunitz
  • Maik Grunitz's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 0
Hello compojoom,

I am actually investigating the possibility to develop a plugin which adds a new customfield-type to index.php?option=com_matukio&view=customfield&layout=edit.

I digged a little bit into the code and found libraries/compojoom/form/customfields where they are globally (?) built.
Is it possible to built a plugin that extends the available customfield options for the admin while creating new fields?

Otherwise I would have to hardcode it - is this lib-folder used by all of your extensions?
Could you point me into the right direction where to start at all, please?
I need a flexible customfield which does a sql query, where should it be built? Is there a class which could be extended - the available plugin events (via compojoom.com/documentation/matukio-new?...e=91:Plugin%20Events ) are not appropriatably usable for this type of task ;)

Best regards, and thx in advance,
Pierre.

new custom field developing 7 years 6 months ago #35857

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Hey Pierre,
I think that you should be able to create a new custom field and place it in the templates/your_template/html/com_matukio/fields/customfields

and it should be picked up in the backend.

The code that does this is in:
/lib_compojoom/source/libraries/compojoom/form/custom.php

Regards,
Daniel

new custom field developing 7 years 6 months ago #35858

  • Maik Grunitz
  • Maik Grunitz's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 0
Thank you, Daniel,

I already found that, too, at the customfields.php comment :D
/*16:: Looks in the library, component itself and in the template/html/com_componentName/fields/customfields */

I'll have a look into it, we definitely would need params in there for a flexible sql query structure like
SELECT $PARAM_id FROM $PARAM-table WHERE $PARAM_other_customField = 'StrTextinput';
//where $PARAMs should be triggered, besides existing chosen values inside the eventform

Do you see restrictions for it on the available method?
Optimally we (ie. Joomla! devs) never should do queries directly inside the template, shouldn't we?

Regards,
Pierre.

new custom field developing 7 years 6 months ago #35867

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Away
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
What is the field going to look like exactly? Is it a single input textarea where you input the query, or would you provide several input fields?

new custom field developing 7 years 6 months ago #35873

  • Maik Grunitz
  • Maik Grunitz's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 9
  • Thank you received: 0
Hello Daniel,

I suggest a customfield type 'sql' with 3 depending param options for the following ones, marked with $, plus the StrOption as textfield.
SELECT $PARAM_id FROM $PARAM-table WHERE $PARAM_other_customField = 'StrTextinput';
where $PARAM_id is saved to database, could be extended with 'as'
and $PARAM_other_customField wants to be query in behind (LEFT JOIN) which queries the results of #__matukio_customfields (or similar, I did not check the exact name by now). That would result in more complex statements for the frontend views, too.
So for now, I would like to focus the quoted statement which should meet most needs and would be a base query I maybe would like to extend later || on the fly.

I need such 'clean query' inside Matukio because I do develop a site these days with Seblod CCK plus Matukio while both frontend views and types (lists, detailviews) should be 'linked' to each other.
I am thinking about developing such a sql-customfield by myself - would you be interested in it for core-implementation? But firstly, please also review the last entry to compojoom.com/forum/107-wishlist/20924-c...ultiple-select#35625 (i was asking about the status which Yves set up) - because if you will change the models to work with the J!3.7 customfield types and remove the compojoom ones, that would change a lot, of course.

By the way, your Kunenas Code modal popup has errors ;)

Kind regards,
Pierre.
  • Page:
  • 1
Time to create page: 0.135 seconds