Import FC outside/notoutside Joomla

More
11 years 9 months ago #27095 by igcorreia
Now I have this error:

Fatal error: Class 'FlexicontentHelperPerm' not found in /var/www/quintadolago/administrator/components/com_flexicontent/models/parentclassitem.php on line 886

WHERE THE HELL AM I GOING!!!!!!!!!!!!!

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

More
11 years 9 months ago #27096 by igcorreia
Micker I am lathing my ass off I thought the same.

I am posting because I don't know if I am going the right way.

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

More
11 years 9 months ago #27097 by ggppdk
If you open the entry-point file of FLEXIcontent frontend, you will see the command needed to load FLEXIcontent framework, this is file:

components/com_flexicontent/flexicontent.php

Then you replace:
JPATH_COMPONENT_ADMINISTRATOR
with
JPATH_ADMINISTRATOR.DS.'components'.DS.'com_flexicontent'

and
JPATH_COMPONENT
with
JPATH_SITE.DS.'components'.DS.'com_flexicontent'

and you get FOR CALLING flexicontent FROM INSIDE JOOMLA FRAMEWORK:
Code:
// load english language file for 'com_flexicontent' component then override with current language file JFactory::getLanguage()->load('com_flexicontent', JPATH_SITE, 'en-GB', true); JFactory::getLanguage()->load('com_flexicontent', JPATH_SITE, null, true); // Get component parameters and add tooltips css and js code $params =& JComponentHelper::getParams('com_flexicontent'); if ($params->get('add_tooltips', 1)) JHTML::_('behavior.tooltip'); //include constants file require_once (JPATH_ADMINISTRATOR.DS.'components'.DS.'com_flexicontent'.DS.'defineconstants.php'); //include the route helper require_once (JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'helpers'.DS.'route.php'); //include the needed classes and helpers require_once (JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'classes'.DS.'flexicontent.helper.php'); if (FLEXI_J16GE) require_once (JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'helpers'.DS.'permission.php'); else require_once (JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'classes'.DS.'flexicontent.acl.php'); require_once (JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'classes'.DS.'flexicontent.categories.php'); require_once (JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'classes'.DS.'flexicontent.fields.php'); // Set the table directory JTable::addIncludePath(JPATH_SITE.DS.'components'.DS_ADMINISTRATOR.DS.'tables'); // Import the flexicontent_fields plugins and flexicontent plugins if (!FLEXI_ONDEMAND) JPluginHelper::importPlugin('flexicontent_fields'); JPluginHelper::importPlugin('flexicontent');


-- 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
11 years 9 months ago #27103 by igcorreia
Not that I defined FC how do I call the extra fields from the current item.

And how to I defined and call the current item?

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

More
11 years 9 months ago #27104 by igcorreia
Now that we can call the item fields we are using this code:
Code:
$item->fields['img_geral'];

or:
Code:
FlexicontentFields::getFieldDisplay($item, 'img_geral');

but none of the GIVES us the VALUES.

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

More
11 years 9 months ago #27105 by igcorreia
I have everything set, the only problem is:

FlexicontentFields::getFields(array(&$item));

giver error:

Cannot pass parameter 1 by reference in ...

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

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