Edit Core field in the frontend editor [publish up/down]

More
13 years 3 months ago #17377 by rjo
Hello, I want to add a date field to the frontend view of an item edit form to allow the users to specify a "Finish Publishing" date.

To do so, I have created a new core field in the flexicontent_fields database because I could not find any other way of creating core fields. My Finish Publishing field is actually just a copy of the "modified" core field with some modifications:
Code:
INSERT INTO `jml_flexicontent_fields` (`field_type`, `name`, `label`, `description`, `isfilter`, `iscore`, `issearch`, `isadvsearch`, `positions`, `published`, `attribs`, `checked_out`, `checked_out_time`, `access`, `ordering`) VALUES ('publish_down', 'publish_down', 'Finish publishing', 'Publish until date', 0, 1, 0, 0, '', 1, 'display_label=1', 0, '0000-00-00 00:00:00', 0, 5)
The "modified" field appears correctly, so we can assume that the associations to a content type, etc. are correct. The main modification is the reference to the existing publish_down column of the default Joomla content item table.

Now I can see the field in the backend template editor, but I fail to have it show up in the front editor. I have also tried to use field_type = date, but to no avail.

Anyone has an idea what I am missing? Thanks!

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #17384 by ggppdk
It must be added to the template file of the submit/edit form view, and to a helper file and to the core plugin.

But why it must be 'core' ? Please don't do such modifications when not necessary, it will make it difficult to upgrade. Tomorrow you will have an issue/feature that can be fixed with upgrading and it will be difficult to do.

Again why core?

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #17403 by rjo
Thanks for your fast reply. The core attributes publish_up and publish_down do exactly what I need and they are already accessible in the backend in the item edit form. There the user can specify on which day an item should be unpublished automatically.
I could not figure out yet how to make these fields available in the content template for the frontend too.
In the content template I can specify which fields to use, but by default there are no fields for publish_up and publish_down, so I thought once these fields exist, I can simply place them in the layout.
(Which indeed seems to work in the backend template editor: the fiels show up and I can place them in the content type form, but they do not show up in the front end, when editing a content item.)

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #17407 by ggppdk
I will look into how to implement this as the fields publish up / publish down already exist in ..._content table (and are useful), maybe today, maybe next days. So, i will not post a hack now ... sorry

I will post a soon as i implement it ...

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #17409 by rjo
Thanks a lot, I can wait 8-)
a+

Please Log in or Create an account to join the conversation.

More
13 years 3 months ago #17433 by ggppdk
I put this in the bug tracker a possible enhancement ... not to forget

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.726 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline