[Answered] Lien com_content/com_flexicontent article

More
13 years 11 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 review. Thanks!

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

More
13 years 11 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.

More
13 years 11 months ago #22901 by ggppdk
I have not tested it for multiple this code for FC v2.0
also you have this code inside a loop? if so if you print $row->id is it different?


-- 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 review. Thanks!

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

More
13 years 11 months ago #22903 by Nodel
Yes it's inside a loop, it is different.
Actually I'm using this "$row->id" for the link to the article (first question I asked you), and it's working good.

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

More
13 years 11 months ago #22908 by ggppdk
I never had time to test it for multiple items in FC v2.0

Try replacing:
Code:
$item = $itemmodel->getItem();
with:
Code:
$item = $itemmodel->getItem($row->id);


-- 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 review. Thanks!

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

More
13 years 11 months ago #22918 by Nodel
It's not working ...

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

More
13 years 11 months ago #23077 by Nodel
If you got an other idea, or if anyone have one, please help me ! I really need to get the data from that fields. It only return the data of the first item for all items.
I have the 2.0 RC2a version with Joomla 2.5.

Si quelqu'un a une idée, aidez moi s'il vous plait ! J'ai vraiment besoin de pouvoir récupérer les donnés des champs de flexicontent. Pour l'instant ça ne retourne que les données du premier item pour tout les items.
J'utilise la version 2.0 RC2a sur Joomla 2.5.

Merci.

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

More
13 years 11 months ago #23086 by ggppdk
mmm, sorry cannot find time to test this now, now i will only look at bugs for final versions


-- 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 review. Thanks!

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

More
13 years 9 months ago #24977 by refacil
I have the same problem, I do not understand because it links to another site

Original file seems to have been deleted, cannot find image file:
/home/unintern/public_html/web7.0 /http://uninternet.org/pruebas /templates/kerllese/images/logo.png

You can see it here
www.uninternet.org/web7.0/index . ... -del-mundo

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

More
13 years 9 months ago #25047 by refacil
This is bug of joomla or of flexicontent or my error?

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

Moderators: vistamediajoomlacornerggppdk
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
Save