Flexicontent Image field updated to Joomla Article Image

More
7 years 5 months ago #67967 by Devcon
Dear all,

I'm using this fantastic component for my project currently, but I have met a problem which I couldn't get any solution after searching this forum or the website documentation, hence appreciate if kind souls in this forum could assist.

I can't use Joomla's Article Image with Joomla's media manager, due to security reason where users' upload should be contained in designated folder, just as Flexicontent works with its Image Upload field.

However, I need the Joomla's Article Image to be updated according to Flexicontent's Image Upload field, when frontend form is submitted by the user. This is needed because I'm using Widgetkit with "Joomla" as its content provider source, so Widgetkit could work if the Joomla's Article Image is updated accordingly.

There is no event hook API in Flexicontent that I could use, appreciate if anyone could point out any feasible solution. Thank you!

Regards,
Devcon

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

More
7 years 5 months ago #67972 by ggppdk
Hello

inside our plugins methods onBeforeSaveField,
we can add an event hook and that live in Joomla sytem plugin

passing to it the field / item data

e.g. call the new event
onBeforeSaveFieldFC

----

About updating Joomla's Full / Intro Article Images automatically from a FLEXIContent field
yes this make sense and sounds like something people will find usefull
and seems very easy to add, so please open a new issue here about :
github.com/FLEXIcontent/flexicontent-cck/

But please describe how this will work
e.g. The first image added will become "intro" and the 2nd image added will become "full"

will have it


-- 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
7 years 5 months ago #67973 by ggppdk
Also maybe you do not need a specific field
you can use the general event
(for example .., see plugin
plugins/flexicontent/flexinotify.php
)
Code:
/** * This method is executed just after an item stored (including custom fields) * * Method is called by the model * * @param object The item object. * @param object The complete $_POST data */ function onAfterSaveItem( &$item, &$post ) { }

Just in case of image field there is some more complex manipulation
-- like the small / medium / large thumbnail generation
and it is best not to "reverse engineer" / guess their paths

so please answer me what the Intro / Full image should be ?
i think my above comment to use 1st image for intro and 2nd image for Full was wrong !!!

Instead this is more proper
For both Intro and Full images will would use the 1st image !!
- we just need 2 new parameters

Use 1st image (thumbnail) as Intro:
- No
- small
- medium
- large
- original

Use 1st image (thumbnail) as Full:
- No
- small
- medium
- large
- original

right ??


-- 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
7 years 5 months ago - 7 years 5 months ago #67978 by Devcon
Dear Georgios,

Thank you for your response!

Yes, you are right, this will be useful for people who wish to use other Joomla components, which works with Joomla's com_content.

The idea is to have Flexicontent (FC) runs its Image or Gallery plugin, to upload the user's selected image to the folder, hence "onAfterSaveItem" could call Joomla com_content API to store this uploaded image (back in the database as JSON) just as how com_content will store it.

I think it will be better to have an option with FC Image or Gallery plugin, for the administrator to choose, when under the tab "Values", option "Acts as gallery" is "No", this image will be for:
1) Intro article image
2) Full article image
3) Both intro and full article image will use this image

Does this make sense? If yes, I shall open a new issue at Github, as you suggested. Thank you.
Last edit: 7 years 5 months ago by Devcon.

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

More
7 years 5 months ago #67979 by ggppdk
Hello

i think for consistence and less complicated UX , we should always the first image
in category views we already use the 1st image of the field

so i would stick to my initial suggestion in fields configuration :

Use 1st image (thumbnail) as Intro:
- No
- small
- medium
- large
- original

Use 1st image (thumbnail) as Full:
- No
- small
- medium
- large
- original


About

Could call Joomla com_content API to store this uploaded image (back in the database as JSON) just as how com_content will store it.


we already have code that updates these in image field, so we will just re-use it


-- 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
7 years 5 months ago #67983 by Devcon
I suppose this will be releasing for v3.2

Has opened an issue in Github. github.com/FLEXIcontent/flexicontent-cck/issues/742

Thanks for your response, Georgios!

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.664 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