disable plugin in category view

More
13 years 11 months ago #7424 by micker
hello it's doesn't works
my link to view in production
www.maia31.gouv.fr/newmaia/administrations

the page charge this in header
Code:
<!--[if IE]><style type="text/css">.floattext {zoom:1;}</style><![endif]--> <script src="http://maps.google.fr/maps?file=api&amp;v=2.x&amp;oe=utf-8&amp;hl=fr&amp;key=ABQIAAAAyZgfcx47U96QegUmJk58tBQyQpLZO1KVpdhZ9fKd5r9kAKM5ChSYaqlp0ndhBVPJ818D22qrWlTlnQ&amp;sensor=false&amp;indexing=true" type="text/javascript"></script> <script src="http://maps.google.fr/maps?file=api&amp;v=2.x&amp;oe=utf-8&amp;hl=fr&amp;key=ABQIAAAAyZgfcx47U96QegUmJk58tBQyQpLZO1KVpdhZ9fKd5r9kAKM5ChSYaqlp0ndhBVPJ818D22qrWlTlnQ&amp;sensor=false&amp;indexing=true" type="text/javascript"></script> <script src="http://maps.google.fr/maps?file=api&amp;v=2.x&amp;oe=utf-8&amp;hl=fr&amp;key=ABQIAAAAyZgfcx47U96QegUmJk58tBQyQpLZO1KVpdhZ9fKd5r9kAKM5ChSYaqlp0ndhBVPJ818D22qrWlTlnQ&amp;sensor=false&amp;indexing=true" type="text/javascript"></script> <script src="http://maps.google.fr/maps?file=api&amp;v=2.x&amp;oe=utf-8&amp;hl=fr&amp;key=ABQIAAAAyZgfcx47U96QegUmJk58tBQyQpLZO1KVpdhZ9fKd5r9kAKM5ChSYaqlp0ndhBVPJ818D22qrWlTlnQ&amp;sensor=false&amp;indexing=true" type="text/javascript"></script> <script src="http://maps.google.fr/maps?file=api&amp;v=2.x&amp;oe=utf-8&amp;hl=fr&amp;key=ABQIAAAAyZgfcx47U96QegUmJk58tBQyQpLZO1KVpdhZ9fKd5r9kAKM5ChSYaqlp0ndhBVPJ818D22qrWlTlnQ&amp;sensor=false&amp;indexing=true" type="text/javascript"></script> <script src="http://maps.google.fr/maps?file=api&amp;v=2.x&amp;oe=utf-8&amp;hl=fr&amp;key=ABQIAAAAyZgfcx47U96QegUmJk58tBQyQpLZO1KVpdhZ9fKd5r9kAKM5ChSYaqlp0ndhBVPJ818D22qrWlTlnQ&amp;sensor=false&amp;indexing=true" type="text/javascript"></script> <script src='http://www.google.com/uds/api?file=uds.js&amp;v=1.0&amp;key=ABQIAAAAyZgfcx47U96QegUmJk58tBQyQpLZO1KVpdhZ9fKd5r9kAKM5ChSYaqlp0ndhBVPJ818D22qrWlTlnQ' type='text/javascript'></script> <script src='http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js' type='text/javascript'></script> <style type='text/css'> @import url('http://www.google.com/uds/css/gsearch.css'); @import url('http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css'); </style> <script src="http://maps.google.fr/maps?file=api&amp;v=2.x&amp;oe=utf-8&amp;hl=fr&amp;key=ABQIAAAAyZgfcx47U96QegUmJk58tBQyQpLZO1KVpdhZ9fKd5r9kAKM5ChSYaqlp0ndhBVPJ818D22qrWlTlnQ&amp;sensor=false&amp;indexing=true" type="text/javascript"></script> <script src='http://www.google.com/uds/api?file=uds.js&amp;v=1.0&amp;key=ABQIAAAAyZgfcx47U96QegUmJk58tBQyQpLZO1KVpdhZ9fKd5r9kAKM5ChSYaqlp0ndhBVPJ818D22qrWlTlnQ' type='text/javascript'></script> <script src='http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js' type='text/javascript'></script> <style type='text/css'> @import url('http://www.google.com/uds/css/gsearch.css'); @import url('http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css'); </style> <script src="http://maps.google.fr/maps?file=api&amp;v=2.x&amp;oe=utf-8&amp;hl=fr&amp;key=ABQIAAAAyZgfcx47U96QegUmJk58tBQyQpLZO1KVpdhZ9fKd5r9kAKM5ChSYaqlp0ndhBVPJ818D22qrWlTlnQ&amp;sensor=false&amp;indexing=true" type="text/javascript"></script> <script src='http://www.google.com/uds/api?file=uds.js&amp;v=1.0&amp;key=ABQIAAAAyZgfcx47U96QegUmJk58tBQyQpLZO1KVpdhZ9fKd5r9kAKM5ChSYaqlp0ndhBVPJ818D22qrWlTlnQ' type='text/javascript'></script> <script src='http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js' type='text/javascript'></script> <style type='text/css'> @import url('http://www.google.com/uds/css/gsearch.css'); @import url('http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css'); </style> <script src="http://maps.google.fr/maps?file=api&amp;v=2.x&amp;oe=utf-8&amp;hl=fr&amp;key=ABQIAAAAyZgfcx47U96QegUmJk58tBQyQpLZO1KVpdhZ9fKd5r9kAKM5ChSYaqlp0ndhBVPJ818D22qrWlTlnQ&amp;sensor=false&amp;indexing=true" type="text/javascript"></script> <script src='http://www.google.com/uds/api?file=uds.js&amp;v=1.0&amp;key=ABQIAAAAyZgfcx47U96QegUmJk58tBQyQpLZO1KVpdhZ9fKd5r9kAKM5ChSYaqlp0ndhBVPJ818D22qrWlTlnQ' type='text/javascript'></script> <script src='http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js' type='text/javascript'></script> <style type='text/css'> @import url('http://www.google.com/uds/css/gsearch.css'); @import url('http://www.google.com/uds/solutions/localsearch/gmlocalsearch.css'); </style> <script src="http://maps.google.fr/maps?file=api&amp;v=2.x&amp;oe=utf-8&amp;hl=fr&amp;key=ABQIAAAAyZgfcx47U96QegUmJk58tBQyQpLZO1KVpdhZ9fKd5r9kAKM5ChSYaqlp0ndhBVPJ818D22qrWlTlnQ&amp;sensor=false&amp;indexing=true" type="text/javascript"></script>
but the field it's isn't in my category view
Thanks for your help !

ps i do build on svn the file seem be ok but on administration it display FLEXIcontent version 1.5.2 svn r237

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 11 months ago #7425 by enjoyman
In file components/com_flexicontent/views/items/view.html.php after these lines:
Code:
if ($params->get('add_item_pathway', 1)) { $pathway->addItem( $this->escape($item->title), JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug)) ); }

I added these lines:
Code:
JPluginHelper::importPlugin('content'); $item->event = new stdClass(); $results = $dispatcher->trigger('onPrepareContent', array (&$item, &$params, $limitstart)); $item->event->afterDisplayTitle = trim(implode("\n", $results));

and don't forgot remove $item->event = new stdClass(); from old code around these lines:
Code:
/* * Handle display events * No need for it currently */ //$item->event = new stdClass();//<------ remove here $results = $dispatcher->trigger('onAfterDisplayTitle', array (&$item, &$params, $limitstart)); $item->event->afterDisplayTitle = trim(implode("\n", $results));

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

More
13 years 11 months ago #7428 by micker
hello i didn't find the old line ???
This is my code
Code:
<?php /** * @version 1.5 stable $Id: view.html.php 242 2010-06-07 08:17:26Z enjoyman $ * @package Joomla * @subpackage FLEXIcontent * @copyright (C) 2009 Emmanuel Danan - www.vistamedia.fr * @license GNU/GPL v2 * * FLEXIcontent is a derivative work of the excellent QuickFAQ component * @copyright (C) 2008 Christoph Lukes * see www.schlu.net for more information * * FLEXIcontent is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); /** * HTML View class for the Items View * * @package Joomla * @subpackage FLEXIcontent * @since 1.0 */ class FlexicontentViewItems extends JView { /** * Creates the item page * * @since 1.0 */ function display( $tpl = null ) { global $mainframe; //initialize variables $document = & JFactory::getDocument(); $user = & JFactory::getUser(); $menus = & JSite::getMenu(); $menu = $menus->getActive(); $dispatcher = & JDispatcher::getInstance(); $params = & $mainframe->getParams('com_flexicontent'); $aid = (int) $user->get('aid'); $limitstart = JRequest::getVar('limitstart', 0, '', 'int'); $cid = JRequest::getInt('cid', 0); if($this->getLayout() == 'form') { $this->_displayForm($tpl); return; } //Set layout $this->setLayout('item'); //add css file if (!$params->get('disablecss', '')) { $document->addStyleSheet($this->baseurl.'/components/com_flexicontent/assets/css/flexicontent.css'); $document->addCustomTag('<!--[if IE]><style type="text/css">.floattext {zoom:1;}</style><![endif]-->'); } //allow css override if (file_exists(JPATH_SITE.DS.'templates'.DS.$mainframe->getTemplate().DS.'css'.DS.'flexicontent.css')) { $document->addStyleSheet($this->baseurl.'/templates/'.$mainframe->getTemplate().'/css/flexicontent.css'); } //special to hide the joomfish language selector on item views $css = '#jflanguageselection { visibility:hidden; }'; if ($params->get('disable_lang_select', 1)) { $document->addStyleDeclaration($css); } //get item data $item = & $this->get('Item'); $iparams =& $item->parameters; $params->merge($iparams); // Bind Fields $item = FlexicontentFields::getFields($item, 'items', $params, $aid); $item = $item[0]; // Note : This parameter doesn't exist yet but it will be used by the future gallery template if ($params->get('use_panes', 1)) { jimport('joomla.html.pane'); $pane = & JPane::getInstance('Tabs'); $this->assignRef('pane', $pane); } if ($item->id == 0) { $id = JRequest::getInt('id', 0); return JError::raiseError( 404, JText::sprintf( 'MANU ITEM #%d NOT FOUND', $id ) ); } $fields =& $item->fields; // Add html to field object trought plugins /* foreach ($fields as $field) { $results = $dispatcher->trigger('onDisplayField', array( &$field, $row )); } */ // Pathway need to be improved $cats = new flexicontent_cats($cid); $parents = $cats->getParentlist(); $pathway =& $mainframe->getPathWay(); $depth = $params->get('item_depth', 0); for($p = $depth; $p<count($parents); $p++) { $pathway->addItem( $this->escape($parents[$p]->title), JRoute::_( FlexicontentHelperRoute::getCategoryRoute($parents[$p]->categoryslug) ) ); } if ($params->get('add_item_pathway', 1)) { $pathway->addItem( $this->escape($item->title), JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug)) ); } JPluginHelper::importPlugin('content'); $item->event = new stdClass(); $results = $dispatcher->trigger('onPrepareContent', array (&$item, &$params, $limitstart)); $item->event->afterDisplayTitle = trim(implode("\n", $results)); /* * Handle the metadata * * Because the application sets a default page title, * we need to get it right from the menu item itself */ if ($params->get('override_title', 0)) { if ($params->get('custom_ititle', '')) { $params->set('page_title', $params->get('custom_ititle')); } else { $params->set('page_title', $item->title); } } else { // Get the menu item object if (is_object($menu)) { $menu_params = new JParameter( $menu->params ); if (!$menu_params->get( 'page_title')) { $params->set('page_title', $item->title); } } else { $params->set('page_title', $item->title); } } /* * Create the document title * * First is to check if we have a category id, if yes add it. * If we haven't one than we accessed this screen direct via the menu and don't add the parent category */ if($cid && $params->get('addcat_title', 1)) { $parentcat = array_pop($parents); $doc_title = $parentcat->title.' - '.$params->get( 'page_title' ); } else { $doc_title = $params->get( 'page_title' ); } $document->setTitle($doc_title); if ($item->metadesc) { $document->setDescription( $item->metadesc ); } if ($item->metakey) { $document->setMetadata('keywords', $item->metakey); } if ($mainframe->getCfg('MetaTitle') == '1') { $mainframe->addMetaTag('title', $item->title); } if ($mainframe->getCfg('MetaAuthor') == '1') { $mainframe->addMetaTag('author', $item->author); } $mdata = new JParameter($item->metadata); $mdata = $mdata->toArray(); foreach ($mdata as $k => $v) { if ($v) { $document->setMetadata($k, $v); } } $limitstart = JRequest::getVar('limitstart', 0, '', 'int'); // increment the hit counter if ($limitstart == 0) { $model =& $this->getModel(); $model->hit(); } $themes = flexicontent_tmpl::getTemplates(); $tmplvar = $themes->items->{$params->get('ilayout', 'default')}->tmplvar; if ($params->get('ilayout')) { // Add the templates css files if availables if (isset($themes->items->{$params->get('ilayout')}->css)) { foreach ($themes->items->{$params->get('ilayout')}->css as $css) { $document->addStyleSheet($this->baseurl.'/'.$css); } } // Add the templates js files if availables if (isset($themes->items->{$params->get('ilayout')}->js)) { foreach ($themes->items->{$params->get('ilayout')}->js as $js) { $document->addScript($this->baseurl.'/'.$js); } } // Set the template var $tmpl = $themes->items->{$params->get('ilayout')}->tmplvar; } else { $tmpl = '.items.default'; } /* * Handle display events * No need for it currently */ $results = $dispatcher->trigger('onAfterDisplayTitle', array (&$item, &$params, $limitstart)); $item->event->afterDisplayTitle = trim(implode("\n", $results)); $results = $dispatcher->trigger('onBeforeDisplayContent', array (& $item, & $params, $limitstart)); $item->event->beforeDisplayContent = trim(implode("\n", $results)); $results = $dispatcher->trigger('onAfterDisplayContent', array (& $item, & $params, $limitstart)); $item->event->afterDisplayContent = trim(implode("\n", $results)); $print_link = JRoute::_('index.php?view=items&cid='.$item->categoryslug.'&id='.$item->slug.'&pop=1&tmpl=component'); $this->assignRef('item' , $item); $this->assignRef('user' , $user); $this->assignRef('params' , $params); $this->assignRef('iparams' , $iparams); $this->assignRef('menu_params' , $menu_params); $this->assignRef('print_link' , $print_link); $this->assignRef('parentcat', $parentcat); $this->assignRef('fields', $item->fields); $this->assignRef('tmpl' , $tmpl); /* * Set template paths : this procedure is issued from K2 component * * "K2" Component by JoomlaWorks for Joomla! 1.5.x - Version 2.1 * Copyright (c) 2006 - 2009 JoomlaWorks Ltd. All rights reserved. * Released under the GNU/GPL license: http://www.gnu.org/copyleft/gpl.html * More info at http://www.joomlaworks.gr and http://k2.joomlaworks.gr * Designed and developed by the JoomlaWorks team */ $this->addTemplatePath(JPATH_COMPONENT.DS.'templates'); $this->addTemplatePath(JPATH_SITE.DS.'templates'.DS.$mainframe->getTemplate().DS.'html'.DS.'com_flexicontent'.DS.'templates'); $this->addTemplatePath(JPATH_COMPONENT.DS.'templates'.DS.'default'); $this->addTemplatePath(JPATH_SITE.DS.'templates'.DS.$mainframe->getTemplate().DS.'html'.DS.'com_flexicontent'.DS.'templates'.DS.'default'); if ($params->get('ilayout')) { $this->addTemplatePath(JPATH_COMPONENT.DS.'templates'.DS.$params->get('ilayout')); $this->addTemplatePath(JPATH_SITE.DS.'templates'.DS.$mainframe->getTemplate().DS.'html'.DS.'com_flexicontent'.DS.'templates'.DS.$params->get('ilayout')); } parent::display($tpl); } /** * Creates the item submit form * * @since 1.0 */ function _displayForm($tpl) { global $mainframe; //Initialize variables $dispatcher = & JDispatcher::getInstance(); $document =& JFactory::getDocument(); $user =& JFactory::getUser(); $menus = & JSite::getMenu(); $menu = $menus->getActive(); $uri =& JFactory::getURI(); $item =& $this->get('Item'); $tags =& $this->get('Alltags'); $used =& $this->get('Usedtags'); $params =& $mainframe->getParams('com_flexicontent'); $tparams =& $this->get( 'Typeparams' ); $fields = & $this->get( 'Extrafields' ); // Add html to field object trought plugins foreach ($fields as $field) { $results = $dispatcher->trigger('onDisplayField', array( &$field, $item )); } // if it's an edit action, redirect it if ($item->id) { $mainframe->redirect('index.php', JText::_( 'ALERTNOTAUTH' )); } if (!$user->get('id')) { $mainframe->redirect('index.php', JText::_( 'ALERTNOTAUTH' )); } $perms = array(); if (FLEXI_ACCESS) { $perms['multicat'] = ($user->gid < 25) ? FAccess::checkComponentAccess('com_flexicontent', 'multicat', 'users', $user->gmid) : 1; $perms['cantags'] = ($user->gid < 25) ? FAccess::checkComponentAccess('com_flexicontent', 'usetags', 'users', $user->gmid) : 1; $perms['canparams'] = ($user->gid < 25) ? FAccess::checkComponentAccess('com_flexicontent', 'paramsitems', 'users', $user->gmid) : 1; $perms['cansubmit'] = ($user->gid < 20) ? ((FAccess::checkComponentAccess('com_content', 'submit', 'users', $user->gmid)) || (FAccess::checkAllContentAccess('com_content','add','users',$user->gmid,'content','all'))) : 1; $perms['canpublish'] = ($user->gid < 22) ? ( (FAccess::checkComponentAccess('com_content', 'publish', 'users', $user->gmid)) || (FAccess::checkComponentAccess('com_content', 'publishown', 'users', $user->gmid)) || (FAccess::checkAllContentAccess('com_content','publish','users',$user->gmid,'content','all')) || (FAccess::checkAllContentAccess('com_content','publishown','users',$user->gmid,'content','all')) ) : 1; } else { $perms['multicat'] = 1; $perms['cantags'] = 1; $perms['canparams'] = 1; $perms['cansubmit'] = ($user->gid >= 18); $perms['canpublish'] = ($user->gid >= 21); } if (!$perms['cansubmit']) { $mainframe->redirect('index.php', JText::_( 'ALERTNOTAUTH' )); } //Add the js includes to the document <head> section JHTML::_('behavior.formvalidation'); JHTML::_('behavior.tooltip'); // Create the type parameters $tparams = new JParameter($tparams); //ensure $used is an array if(!is_array($used)){ $used = array(); } //add css file $document->addStyleSheet($this->baseurl.'/components/com_flexicontent/assets/css/flexicontent.css'); $document->addCustomTag('<!--[if IE]><style type="text/css">.floattext{zoom:1;}, * html #flexicontent dd { height: 1%; }</style><![endif]-->'); //Get the lists $lists = $this->_buildEditLists($perms['multicat']); //Load the JEditor object $editor =& JFactory::getEditor(); //Build the page title string $title = $item->id ? JText::_( 'FLEXI_EDIT' ) : JText::_( 'FLEXI_NEW' ); //Set page title $document->setTitle($title); // Get the menu item object if (is_object($menu)) { $menu_params = new JParameter( $menu->params ); if (!$menu_params->get( 'page_title')) { $params->set('page_title', $title); } } else { $params->set('page_title', $title); } //get pathway $pathway =& $mainframe->getPathWay(); $pathway->addItem($title, ''); // Unify the introtext and fulltext fields and separated the fields by the readmore tag if (JString::strlen($item->fulltext) > 1) { $item->text = $item->introtext."<hr id=\"system-readmore\" />".$item->fulltext; } else { $item->text = $item->introtext; } //Ensure the row data is safe html JFilterOutput::objectHTMLSafe( $item ); $this->assign('action', $uri->toString()); $this->assignRef('item', $item); $this->assignRef('params',$params); $this->assignRef('lists', $lists); $this->assignRef('editor', $editor); $this->assignRef('user', $user); $this->assignRef('tags', $tags); $this->assignRef('used', $used); $this->assignRef('fields', $fields); $this->assignRef('tparams', $tparams); $this->assignRef('perms', $perms); $this->assignRef('document', $document); parent::display($tpl); } /** * Creates the item submit form * * @since 1.0 */ function _buildEditLists($multicat = 1) { global $globalcats; //Get the item from the model $item = & $this->get('Item'); //get the categories tree $categories = $globalcats; //get ids of selected categories (edit action) $selectedcats = & $this->get( 'Catsselected' ); $user =& JFactory::getUser(); $multiple = $multicat ? ' multiple="multiple" size="8"' : ''; //build selectlist $lists = array(); $lists['cid'] = flexicontent_cats::buildcatselect($categories, 'cid[]', $selectedcats, false, 'class="inputbox required validate-cid"'.$multiple, true); $state = array(); $state[] = JHTML::_('select.option', 1, JText::_( 'FLEXI_PUBLISHED' ) ); $state[] = JHTML::_('select.option', 0, JText::_( 'FLEXI_UNPUBLISHED' ) ); $state[] = JHTML::_('select.option', -3, JText::_( 'FLEXI_PENDING' ) ); $state[] = JHTML::_('select.option', -4, JText::_( 'FLEXI_TO_WRITE' ) ); $state[] = JHTML::_('select.option', -5, JText::_( 'FLEXI_IN_PROGRESS' ) ); $lists['state'] = JHTML::_('select.genericlist', $state, 'state', '', 'value', 'text', $item->state ); return $lists; } } ?>
But nothing change
8-)

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 11 months ago #7458 by enjoyman
micker,
that code is latest revision from svn?If yes it's my latest change that I fixed this problem.But I not sure this plugin will work or not, please test it for me again.

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

More
13 years 11 months ago #7459 by micker
hello
i copy the lastest version on svn and replace on my code but nothinh the plugin it load
this the version how i do a copy
Code:
<?php /** * @version 1.5 stable $Id$ * @package Joomla * @subpackage FLEXIcontent * @copyright (C) 2009 Emmanuel Danan - www.vistamedia.fr * @license GNU/GPL v2 * * FLEXIcontent is a derivative work of the excellent QuickFAQ component * @copyright (C) 2008 Christoph Lukes * see www.schlu.net for more information * * FLEXIcontent is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ defined( '_JEXEC' ) or die( 'Restricted access' ); jimport( 'joomla.application.component.view'); /** * HTML View class for the Items View * * @package Joomla * @subpackage FLEXIcontent * @since 1.0 */ class FlexicontentViewItems extends JView { /** * Creates the item page * * @since 1.0 */ function display( $tpl = null ) { global $mainframe; //initialize variables $document = & JFactory::getDocument(); $user = & JFactory::getUser(); $menus = & JSite::getMenu(); $menu = $menus->getActive(); $dispatcher = & JDispatcher::getInstance(); $params = & $mainframe->getParams('com_flexicontent'); $aid = (int) $user->get('aid'); $limitstart = JRequest::getVar('limitstart', 0, '', 'int'); $cid = JRequest::getInt('cid', 0); if($this->getLayout() == 'form') { $this->_displayForm($tpl); return; } //Set layout $this->setLayout('item'); //add css file if (!$params->get('disablecss', '')) { $document->addStyleSheet($this->baseurl.'/components/com_flexicontent/assets/css/flexicontent.css'); $document->addCustomTag('<!--[if IE]><style type="text/css">.floattext {zoom:1;}</style><![endif]-->'); } //allow css override if (file_exists(JPATH_SITE.DS.'templates'.DS.$mainframe->getTemplate().DS.'css'.DS.'flexicontent.css')) { $document->addStyleSheet($this->baseurl.'/templates/'.$mainframe->getTemplate().'/css/flexicontent.css'); } //special to hide the joomfish language selector on item views $css = '#jflanguageselection { visibility:hidden; }'; if ($params->get('disable_lang_select', 1)) { $document->addStyleDeclaration($css); } //get item data $item = & $this->get('Item'); $iparams =& $item->parameters; $params->merge($iparams); // Bind Fields $item = FlexicontentFields::getFields($item, 'items', $params, $aid); $item = $item[0]; // Note : This parameter doesn't exist yet but it will be used by the future gallery template if ($params->get('use_panes', 1)) { jimport('joomla.html.pane'); $pane = & JPane::getInstance('Tabs'); $this->assignRef('pane', $pane); } if ($item->id == 0) { $id = JRequest::getInt('id', 0); return JError::raiseError( 404, JText::sprintf( 'MANU ITEM #%d NOT FOUND', $id ) ); } $fields =& $item->fields; // Add html to field object trought plugins /* foreach ($fields as $field) { $results = $dispatcher->trigger('onDisplayField', array( &$field, $row )); } */ // Pathway need to be improved $cats = new flexicontent_cats($cid); $parents = $cats->getParentlist(); $pathway =& $mainframe->getPathWay(); $depth = $params->get('item_depth', 0); for($p = $depth; $p<count($parents); $p++) { $pathway->addItem( $this->escape($parents[$p]->title), JRoute::_( FlexicontentHelperRoute::getCategoryRoute($parents[$p]->categoryslug) ) ); } if ($params->get('add_item_pathway', 1)) { $pathway->addItem( $this->escape($item->title), JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug)) ); } JPluginHelper::importPlugin('content'); $item->event = new stdClass(); $results = $dispatcher->trigger('onPrepareContent', array (&$item, &$params, $limitstart)); $item->event->afterDisplayTitle = trim(implode("\n", $results)); /* * Handle the metadata * * Because the application sets a default page title, * we need to get it right from the menu item itself */ if ($params->get('override_title', 0)) { if ($params->get('custom_ititle', '')) { $params->set('page_title', $params->get('custom_ititle')); } else { $params->set('page_title', $item->title); } } else { // Get the menu item object if (is_object($menu)) { $menu_params = new JParameter( $menu->params ); if (!$menu_params->get( 'page_title')) { $params->set('page_title', $item->title); } } else { $params->set('page_title', $item->title); } } /* * Create the document title * * First is to check if we have a category id, if yes add it. * If we haven't one than we accessed this screen direct via the menu and don't add the parent category */ if($cid && $params->get('addcat_title', 1)) { $parentcat = array_pop($parents); $doc_title = $parentcat->title.' - '.$params->get( 'page_title' ); } else { $doc_title = $params->get( 'page_title' ); } $document->setTitle($doc_title); if ($item->metadesc) { $document->setDescription( $item->metadesc ); } if ($item->metakey) { $document->setMetadata('keywords', $item->metakey); } if ($mainframe->getCfg('MetaTitle') == '1') { $mainframe->addMetaTag('title', $item->title); } if ($mainframe->getCfg('MetaAuthor') == '1') { $mainframe->addMetaTag('author', $item->author); } $mdata = new JParameter($item->metadata); $mdata = $mdata->toArray(); foreach ($mdata as $k => $v) { if ($v) { $document->setMetadata($k, $v); } } $limitstart = JRequest::getVar('limitstart', 0, '', 'int'); // increment the hit counter if ($limitstart == 0) { $model =& $this->getModel(); $model->hit(); } $themes = flexicontent_tmpl::getTemplates(); $tmplvar = $themes->items->{$params->get('ilayout', 'default')}->tmplvar; if ($params->get('ilayout')) { // Add the templates css files if availables if (isset($themes->items->{$params->get('ilayout')}->css)) { foreach ($themes->items->{$params->get('ilayout')}->css as $css) { $document->addStyleSheet($this->baseurl.'/'.$css); } } // Add the templates js files if availables if (isset($themes->items->{$params->get('ilayout')}->js)) { foreach ($themes->items->{$params->get('ilayout')}->js as $js) { $document->addScript($this->baseurl.'/'.$js); } } // Set the template var $tmpl = $themes->items->{$params->get('ilayout')}->tmplvar; } else { $tmpl = '.items.default'; } /* * Handle display events * No need for it currently */ $results = $dispatcher->trigger('onAfterDisplayTitle', array (&$item, &$params, $limitstart)); $item->event->afterDisplayTitle = trim(implode("\n", $results)); $results = $dispatcher->trigger('onBeforeDisplayContent', array (& $item, & $params, $limitstart)); $item->event->beforeDisplayContent = trim(implode("\n", $results)); $results = $dispatcher->trigger('onAfterDisplayContent', array (& $item, & $params, $limitstart)); $item->event->afterDisplayContent = trim(implode("\n", $results)); $print_link = JRoute::_('index.php?view=items&cid='.$item->categoryslug.'&id='.$item->slug.'&pop=1&tmpl=component'); $this->assignRef('item' , $item); $this->assignRef('user' , $user); $this->assignRef('params' , $params); $this->assignRef('iparams' , $iparams); $this->assignRef('menu_params' , $menu_params); $this->assignRef('print_link' , $print_link); $this->assignRef('parentcat', $parentcat); $this->assignRef('fields', $item->fields); $this->assignRef('tmpl' , $tmpl); /* * Set template paths : this procedure is issued from K2 component * * "K2" Component by JoomlaWorks for Joomla! 1.5.x - Version 2.1 * Copyright (c) 2006 - 2009 JoomlaWorks Ltd. All rights reserved. * Released under the GNU/GPL license: http://www.gnu.org/copyleft/gpl.html * More info at http://www.joomlaworks.gr and http://k2.joomlaworks.gr * Designed and developed by the JoomlaWorks team */ $this->addTemplatePath(JPATH_COMPONENT.DS.'templates'); $this->addTemplatePath(JPATH_SITE.DS.'templates'.DS.$mainframe->getTemplate().DS.'html'.DS.'com_flexicontent'.DS.'templates'); $this->addTemplatePath(JPATH_COMPONENT.DS.'templates'.DS.'default'); $this->addTemplatePath(JPATH_SITE.DS.'templates'.DS.$mainframe->getTemplate().DS.'html'.DS.'com_flexicontent'.DS.'templates'.DS.'default'); if ($params->get('ilayout')) { $this->addTemplatePath(JPATH_COMPONENT.DS.'templates'.DS.$params->get('ilayout')); $this->addTemplatePath(JPATH_SITE.DS.'templates'.DS.$mainframe->getTemplate().DS.'html'.DS.'com_flexicontent'.DS.'templates'.DS.$params->get('ilayout')); } parent::display($tpl); } /** * Creates the item submit form * * @since 1.0 */ function _displayForm($tpl) { global $mainframe; //Initialize variables $dispatcher = & JDispatcher::getInstance(); $document =& JFactory::getDocument(); $user =& JFactory::getUser(); $menus = & JSite::getMenu(); $menu = $menus->getActive(); $uri =& JFactory::getURI(); $item =& $this->get('Item'); $tags =& $this->get('Alltags'); $used =& $this->get('Usedtags'); $params =& $mainframe->getParams('com_flexicontent'); $tparams =& $this->get( 'Typeparams' ); $fields = & $this->get( 'Extrafields' ); // Add html to field object trought plugins foreach ($fields as $field) { $results = $dispatcher->trigger('onDisplayField', array( &$field, $item )); } // if it's an edit action, redirect it if ($item->id) { $mainframe->redirect('index.php', JText::_( 'ALERTNOTAUTH' )); } if (!$user->get('id')) { $mainframe->redirect('index.php', JText::_( 'ALERTNOTAUTH' )); } $perms = array(); if (FLEXI_ACCESS) { $perms['multicat'] = ($user->gid < 25) ? FAccess::checkComponentAccess('com_flexicontent', 'multicat', 'users', $user->gmid) : 1; $perms['cantags'] = ($user->gid < 25) ? FAccess::checkComponentAccess('com_flexicontent', 'usetags', 'users', $user->gmid) : 1; $perms['canparams'] = ($user->gid < 25) ? FAccess::checkComponentAccess('com_flexicontent', 'paramsitems', 'users', $user->gmid) : 1; $perms['cansubmit'] = ($user->gid < 20) ? ((FAccess::checkComponentAccess('com_content', 'submit', 'users', $user->gmid)) || (FAccess::checkAllContentAccess('com_content','add','users',$user->gmid,'content','all'))) : 1; $perms['canpublish'] = ($user->gid < 22) ? ( (FAccess::checkComponentAccess('com_content', 'publish', 'users', $user->gmid)) || (FAccess::checkComponentAccess('com_content', 'publishown', 'users', $user->gmid)) || (FAccess::checkAllContentAccess('com_content','publish','users',$user->gmid,'content','all')) || (FAccess::checkAllContentAccess('com_content','publishown','users',$user->gmid,'content','all')) ) : 1; } else { $perms['multicat'] = 1; $perms['cantags'] = 1; $perms['canparams'] = 1; $perms['cansubmit'] = ($user->gid >= 18); $perms['canpublish'] = ($user->gid >= 21); } if (!$perms['cansubmit']) { $mainframe->redirect('index.php', JText::_( 'ALERTNOTAUTH' )); } //Add the js includes to the document <head> section JHTML::_('behavior.formvalidation'); JHTML::_('behavior.tooltip'); // Create the type parameters $tparams = new JParameter($tparams); //ensure $used is an array if(!is_array($used)){ $used = array(); } //add css file $document->addStyleSheet($this->baseurl.'/components/com_flexicontent/assets/css/flexicontent.css'); $document->addCustomTag('<!--[if IE]><style type="text/css">.floattext{zoom:1;}, * html #flexicontent dd { height: 1%; }</style><![endif]-->'); //Get the lists $lists = $this->_buildEditLists($perms['multicat']); //Load the JEditor object $editor =& JFactory::getEditor(); //Build the page title string $title = $item->id ? JText::_( 'FLEXI_EDIT' ) : JText::_( 'FLEXI_NEW' ); //Set page title $document->setTitle($title); // Get the menu item object if (is_object($menu)) { $menu_params = new JParameter( $menu->params ); if (!$menu_params->get( 'page_title')) { $params->set('page_title', $title); } } else { $params->set('page_title', $title); } //get pathway $pathway =& $mainframe->getPathWay(); $pathway->addItem($title, ''); // Unify the introtext and fulltext fields and separated the fields by the readmore tag if (JString::strlen($item->fulltext) > 1) { $item->text = $item->introtext."<hr id=\"system-readmore\" />".$item->fulltext; } else { $item->text = $item->introtext; } //Ensure the row data is safe html JFilterOutput::objectHTMLSafe( $item ); $this->assign('action', $uri->toString()); $this->assignRef('item', $item); $this->assignRef('params',$params); $this->assignRef('lists', $lists); $this->assignRef('editor', $editor); $this->assignRef('user', $user); $this->assignRef('tags', $tags); $this->assignRef('used', $used); $this->assignRef('fields', $fields); $this->assignRef('tparams', $tparams); $this->assignRef('perms', $perms); $this->assignRef('document', $document); parent::display($tpl); } /** * Creates the item submit form * * @since 1.0 */ function _buildEditLists($multicat = 1) { global $globalcats; //Get the item from the model $item = & $this->get('Item'); //get the categories tree $categories = $globalcats; //get ids of selected categories (edit action) $selectedcats = & $this->get( 'Catsselected' ); $user =& JFactory::getUser(); $multiple = $multicat ? ' multiple="multiple" size="8"' : ''; //build selectlist $lists = array(); $lists['cid'] = flexicontent_cats::buildcatselect($categories, 'cid[]', $selectedcats, false, 'class="inputbox required validate-cid"'.$multiple, true); $state = array(); $state[] = JHTML::_('select.option', 1, JText::_( 'FLEXI_PUBLISHED' ) ); $state[] = JHTML::_('select.option', 0, JText::_( 'FLEXI_UNPUBLISHED' ) ); $state[] = JHTML::_('select.option', -3, JText::_( 'FLEXI_PENDING' ) ); $state[] = JHTML::_('select.option', -4, JText::_( 'FLEXI_TO_WRITE' ) ); $state[] = JHTML::_('select.option', -5, JText::_( 'FLEXI_IN_PROGRESS' ) ); $lists['state'] = JHTML::_('select.genericlist', $state, 'state', '', 'value', 'text', $item->state ); return $lists; } } ?>
thanks for your help

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 11 months ago #7475 by HillWoody
Hello Micker,

I finally found a workaround - a simple hack.
You can deactivate the "injectCustomHeadTags" function in /plugins/content/plugin_googlemap2.php.

Just wrap the function code like this:

Before the "// Get buffer"-comment at line 188, insert:

$view = JRequest::getVar('view', ''); //start deactivate
if (!($view=='category'))
{

[ // Get buffer ...]


} // end deactivate at end of function, new line 234 or 235

Of course this affects _every_ category view - so be sure you really want that...

Greetings

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

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