[Answered] Lien com_content/com_flexicontent article

More
12 years 2 months ago #22855 by Nodel
That's it.
I got the custom properties composant that give a layout of a search with thumbnails of pictures found on the content of the article.
I need that custom properties use a picture of some image field of flexicontent instead.

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

More
12 years 2 months ago #22859 by Nodel
Actually I need to acces fields data from outside of the template.

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

More
12 years 2 months ago #22868 by ggppdk
Read this fo get raw values to use in an form:

www.flexicontent.org/documentati ... forms.html

and this for getting HTML DISPLAY of fields:

www.flexicontent.org/documentati ... -code.html

NOTE these articles are meant for developers

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
12 years 2 months ago #22873 by Nodel
Thank you.
Notice: Use of undefined constant COM_FLEXICONTENT_FILEPATH - assumed 'COM_FLEXICONTENT_FILEPATH' in /homez.424/dlpgdela/www/newbelleplateforme/plugins/flexicontent_fields/image/image.php on line 665
Original file seems to have been deleted, cannot find image file: COM_FLEXICONTENT_FILEPATH/imazelia.jpg

And a picture is displayed, but it the same for all the item. I don't know why.

And there are some errors is the code :
It seems that it's :
require_once("components/com_flexicontent/models/item.php");
And not :
require_once("components/com_flexicontent/models/items.php");

Same thing for :
$itemmodel = new FlexicontentModelItem();
And not :
$itemmodel = new FlexicontentModelItems();

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

More
12 years 2 months ago #22886 by ggppdk
mmm, yes, code is for v1.5.6 (for J1.5),

the model name for frontent item view has change in v2.0 (for J1.7/J2.5) it is no longer "items", but "item"

I have updated the article to check for FLEXIcontent v2.0

but the strange thing is the notice undefined constant COM_FLEXICONTENT_FILEPATH, it is defined in :

JPATH_ADMINISTRATOR.DS.'components'.DS.'com_flexicontent'.DS.'defineconstants.php'

which is included by flexicontent.helper.php

NOTE i have not yet completed tests for J2.5

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
12 years 2 months ago #22897 by Nodel
Maybe the constant is defined else where in the new version.
I foud that in the com_flexicontent/flexicontent.php :
define('COM_FLEXICONTENT_FILEPATH', JPATH_ROOT.DS.$params->get('file_path', 'components/com_flexicontent/uploads'));

I added it to my files, and I don't get the notice anymore.
But, the picture displayed is always the same as the first one. It's look like it only get the picture of the first item.
Here is my code :
Code:
echo "<div class=\"cp_imageflexi\">\n"; error_reporting(E_ALL); // OUTPUT ERRORS JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_flexicontent'.DS.'tables'); require_once("components/com_flexicontent/classes/flexicontent.fields.php"); require_once("components/com_flexicontent/classes/flexicontent.helper.php"); require_once("components/com_flexicontent/models/item.php"); $field_names_arr = array('image1'); $item_id = $row->id; $saved_id = JRequest::getVar('id'); JRequest::setVar('id', $item_id); $itemmodel = new FlexicontentModelItem(); $item = $itemmodel->getItem(); FlexicontentFields::getFields(array(&$item)); $image_display = FlexicontentFields::getFieldDisplay($item, 'image1'); if (!$item->onDemandFields['image1']->noaccess) { // Check if retrieval failed because of Access Level echo $image_display; } echo "</div>\n";

$row->id return the current item id.

And I got an other notice :
Notice: Array to string conversion in /homez.424/dlpgdela/www/newbelleplateforme/libraries/joomla/html/parameter.php on line 68

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

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