Import FC outside/notoutside Joomla

More
13 years 7 months ago - 13 years 7 months ago #27084 by igcorreia
I have created a new view and it is clean from start no PHP what so ever.

I have started my php with:
Code:
<?php / defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); require_once("/var/www/MYSITE/libraries/dompdf/dompdf_config.inc.php"); JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_flexicontent'.DS.'tables'); require_once(JPATH_SITE.DS."components".DS."com_flexicontent".DS."classes".DS."flexicontent.fields.php"); require_once(JPATH_SITE.DS."components".DS."com_flexicontent".DS."classes".DS."flexicontent.helper.php"); require_once(JPATH_SITE.DS."components".DS."com_flexicontent".DS."models".DS.FLEXI_ITEMVIEW.".php");

but I dont think this is correct. Could anyone help me CALL THE FC FRAMWORK?
Last edit: 13 years 7 months ago by igcorreia.

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

More
13 years 7 months ago #27086 by igcorreia
I tried this tutorial: www.flexicontent.org/documentati ... -code.html

But I am having this error:
Fatal error: Class 'JString' not found in /MYSITE/administrator/components/com_flexicontent/models/parentclassitem.php on line 522

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

More
13 years 7 months ago #27087 by igcorreia
I have COMMENTED that line than I have an error on the

compoent/com_flexicontent/models/item.php on line
106 I have commented it and the I have one in line
160 I have commented it and
after that it works.

Could someone help me figure Why I have the 3 errors?

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

More
13 years 7 months ago #27088 by igcorreia
Solved I had to add:

require_once("/var/www/mysiste/libraries/joomla/utilities/string.php");

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

More
13 years 7 months ago #27091 by igcorreia
I have also added:
require_once("/var/www/MYSITE/administrator/components/com_flexicontent/models/parentclassitem.php");

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

More
13 years 7 months ago #27093 by micker
lol
your are your solver

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

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

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

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

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

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