- Viestejä: 68
- Vastaanotettu kiitos 0
JSN ImageShow/Jcomments fatal error [RATKAISTU]
- ANKKA32
- Aiheen kirjoittaja
- Poissa
- Täysjäsen
Fatal error: Call to undefined method JAccess::getActionsFromFile() in administrator/components/com_imageshow/helpers/imageshow.php on line 337
Moi. En pysty tehdä mitään tuolla JSN vaikka latasin netistä joomla 2.5 versioon sopiva.
Line 337:
$actions = JAccess::getActionsFromFile(JPATH_ADMINISTRATOR . '/components/' . $componentName . '/access.xml');
<?php
/**
* @version $Id$
* @package JSN.ImageShow
* @author JoomlaShine Team <Tämä sähköpostiosoite on suojattu spamboteilta. Tarvitset JavaScript-tuen nähdäksesi sen.>
* @copyright Copyright (C) 2012 JoomlaShine.com. All Rights Reserved.
* @license GNU/GPL v2 or later www.gnu.org/licenses/gpl-2.0.html
*
* Websites: www.joomlashine.com
* Technical Support: Feedback - www.joomlashine.com/contact-us/get-support.html
*
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
include_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'classes' . DS . 'jsn_is_showlist.php';
include_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'classes' . DS . 'jsn_is_showcase.php';
/**
* ImageShow component helper.
*
* @package JSN.ImageShow
*
* @since 2.5
*/
class JSNISImageShowHelper
{
/**
* Add toolbar button.
*
* @return void
*/
public static function addToolbarMenu()
{
$tmpl = JRequest::getVar('tmpl');
if ($tmpl == 'component') return '';
$edit = JRequest::getVar('edit');
$document = JFactory::getDocument();
$strAlert = '';
if (!is_null($edit))
{
$strAlert = 'var objISOneImageShow = new $.JQJSNISImageShow();
objISOneImageShow.comfirmBox("' . JText::_('JSN_MENU_CONFIRM_BOX_ALERT', true) . '");';
}
$document->addScriptDeclaration("
(function($){
$(document).ready(function () {
" . $strAlert . "
});
})(jQuery);");
// Get 5 most-recent items
//$items = self::getItems(5);
// Declare 1st-level menu items
JSNMenuHelper::addEntry(
'launchpad',
'JSN_MENU_LAUNCH_PAD',
'index.php?option=com_imageshow',
false,
'administrator/components/com_imageshow/assets/images/icons-16/icon-off.png',
'toolbar-menu'
);
JSNMenuHelper::addEntry(
'showlist',
'JSN_MENU_SHOWLISTS',
'index.php?option=com_imageshow&view=showlist',
false,
'administrator/components/com_imageshow/assets/images/icons-16/icon-file.png',
'toolbar-menu'
);
JSNMenuHelper::addEntry(
'showcase',
'JSN_MENU_SHOWCASES',
'index.php?option=com_imageshow&view=showcase',
false,
'administrator/components/com_imageshow/assets/images/icons-16/icon-monitor.png',
'toolbar-menu'
);
JSNMenuHelper::addEntry(
'configuration',
'JSN_MENU_CONFIGURATION_AND_MAINTENANCE',
'index.php?option=com_imageshow&view=configuration',
false,
'administrator/components/com_imageshow/assets/images/icons-16/icon-cog.png',
'toolbar-menu'
);
JSNMenuHelper::addEntry(
'about',
'JSN_MENU_ABOUT',
'index.php?option=com_imageshow&view=about',
false,
'administrator/components/com_imageshow/assets/images/icons-16/icon-star.png',
'toolbar-menu'
);
// Declare 2nd-level menu items for 'items' entry
JSNMenuHelper::addEntry(
'all-showlists', 'All Showlists', 'index.php?option=com_imageshow&view=showlist', false, '', 'toolbar-menu.showlist'
);
JSNMenuHelper::addEntry(
'all-showcases', 'All Showcases', 'index.php?option=com_imageshow&view=showcase', false, '', 'toolbar-menu.showcase'
);
$objJSNShowlist = new JSNISShowlist;
$objJSNShowcase = new JSNISShowcase;
$showlist = $objJSNShowlist->getLastestShowlist(5);
$showcase = $objJSNShowcase->getLastestShowcase(5);
if ($showlist)
{
JSNMenuHelper::addEntry(
'recent-showlist', 'Recent Showlists', '', false, '', 'toolbar-menu.showlist'
);
foreach ($showlist AS $item)
{
JSNMenuHelper::addEntry(
'showlist-' . $item->item_id,
$item->item_title,
'index.php?option=com_imageshow&controller=showlist&task=edit&cid[]=' . $item->item_id,
false,
'',
'toolbar-menu.showlist.recent-showlist'
);
}
}
if ($showcase)
{
JSNMenuHelper::addEntry(
'recent-showcase', 'Recent Showcases', '', false, '', 'toolbar-menu.showcase'
);
foreach ($showcase AS $item)
{
JSNMenuHelper::addEntry(
'showcase-' . $item->item_id,
$item->item_title,
'index.php?option=com_imageshow&controller=showcase&task=edit&cid[]=' . $item->item_id,
false,
'',
'toolbar-menu.showcase.recent-showcase'
);
}
}
JSNMenuHelper::addSeparator('toolbar-menu.showlist');
JSNMenuHelper::addSeparator('toolbar-menu.showcase');
JSNMenuHelper::addEntry(
'showlist-new', 'Create new showlist', 'index.php?option=com_imageshow&controller=showlist&task=add', false, '', 'toolbar-menu.showlist'
);
JSNMenuHelper::addEntry(
'showcase-new', 'Create new showcase', 'index.php?option=com_imageshow&controller=showcase&task=add', false, '', 'toolbar-menu.showcase'
);
}
/**
* Configure the linkbar
*
* @param string $controller The name of the active controller
*
* @return void
*/
public static function addSubmenu($vName)
{
// Create a toolbar button that drop-down a sub-menu when clicked
JSNMenuHelper::addEntry(
'toolbar-menu', 'Menu', '', false, 'jsn-icon32 jsn-icon-menu', 'toolbar'
);
// Declare 1st-level menu items
JSNMenuHelper::addEntry(
'launchpad',
'JSN_IMAGESHOW_MENU_LAUNCHPAD',
'index.php?option=com_imageshow',
$vName == '' OR $vName == 'cpanel',
'administrator/components/com_imageshow/assets/images/icons-16/icon-off.png',
'sub-menu'
);
if (self::getAccesses('showlist'))
{
JSNMenuHelper::addEntry(
'showlists',
'JSN_MENU_SHOWLISTS',
'index.php?option=com_imageshow&view=showlist',
$vName == 'showlists',
'administrator/components/com_imageshow/assets/images/icons-16/icon-file.png',
'sub-menu'
);
}
if (self::getAccesses('showcase'))
{
JSNMenuHelper::addEntry(
'showcases',
'JSN_MENU_SHOWCASES',
'index.php?option=com_imageshow&view=showcase',
$vName == 'showcases',
'administrator/components/com_imageshow/assets/images/icons-16/icon-monitor.png',
'sub-menu'
);
}
if (self::getAccesses('configuration'))
{
JSNMenuHelper::addEntry(
'configuration',
'JSN_MENU_CONFIGURATION_AND_MAINTENANCE',
'index.php?option=com_imageshow&view=configuration',
$vName == 'configuration' || $vName == 'maintenance',
'administrator/components/com_imageshow/assets/images/icons-16/icon-cog.png',
'sub-menu'
);
}
JSNMenuHelper::addEntry(
'about',
'JSN_MENU_ABOUT',
'index.php?option=com_imageshow&view=about',
$vName == 'about',
'administrator/components/com_imageshow/assets/images/icons-16/icon-star.png',
'sub-menu'
);
// Declare 2nd-level menu items for 'items' entry
JSNMenuHelper::addEntry(
'all-showlists', JText::_('JSN_IMAGESHOW_SUB_MENU_ALL_SHOWLISTS', true), 'index.php?option=com_imageshow&view=showlist', false, '', 'sub-menu.showlists'
);
JSNMenuHelper::addEntry(
'all-showcases', JText::_('JSN_IMAGESHOW_SUB_MENU_ALL_SHOWCASES', true), 'index.php?option=com_imageshow&view=showcase', false, '', 'sub-menu.showcases'
);
$objJSNShowlist = new JSNISShowlist;
$objJSNShowcase = new JSNISShowcase;
$showlist = $objJSNShowlist->getLastestShowlist(5);
$showcase = $objJSNShowcase->getLastestShowcase(5);
if ($showlist)
{
JSNMenuHelper::addEntry(
'recent-showlist', JText::_('JSN_IMAGESHOW_SUB_MENU_RECENT_SHOWLISTS', true), '', false, '', 'sub-menu.showlists'
);
foreach ($showlist AS $item)
{
JSNMenuHelper::addEntry(
'showlist-' . $item->item_id,
$item->item_title,
'index.php?option=com_imageshow&controller=showlist&task=edit&cid[]=' . $item->item_id,
false,
'',
'sub-menu.showlists.recent-showlist'
);
}
}
if ($showcase)
{
JSNMenuHelper::addEntry(
'recent-showcase', JText::_('JSN_IMAGESHOW_SUB_MENU_RECENT_SHOWCASES', true), '', false, '', 'sub-menu.showcases'
);
foreach ($showcase AS $item)
{
JSNMenuHelper::addEntry(
'showcase-' . $item->item_id,
$item->item_title,
'index.php?option=com_imageshow&controller=showcase&task=edit&cid[]=' . $item->item_id,
false,
'',
'sub-menu.showcases.recent-showcase'
);
}
}
JSNMenuHelper::addSeparator('sub-menu.showlists');
JSNMenuHelper::addSeparator('sub-menu.showcases');
JSNMenuHelper::addEntry(
'showlist-new', JText::_('JSN_IMAGESHOW_SUB_MENU_CREATE_NEW_SHOWLIST', true), 'index.php?option=com_imageshow&controller=showlist&task=add', false, '', 'sub-menu.showlists'
);
JSNMenuHelper::addEntry(
'showcase-new', JText::_('JSN_IMAGESHOW_SUB_MENU_CREATE_NEW_SHOWCASE', true), 'index.php?option=com_imageshow&controller=showcase&task=add', false, '', 'sub-menu.showcases'
);
// Render the sub-menu
if (JFactory::getApplication()->input->getCmd('tmpl', '') == '') {
JSNMenuHelper::render('sub-menu');
}
}
public static function getAccesses($view)
{
jimport('joomla.access.access');
$componentName = 'com_imageshow';
$prefix = 'imageshow.manage';
$user = JFactory::getUser();
$result = new JObject();
switch($view)
{
case 'showcase':
$assetName = $prefix.'.showcase';
break;
case 'showlist':
$assetName = $prefix.'.showlist';
break;
case 'configuration':
$assetName = $prefix.'.configuration';
break;
default:
$assetName = 'core.manage';
break;
}
return $user->authorise($assetName, $componentName);
}
public static function getActions($type = 'component',$id = 0)
{
jimport('joomla.access.access');
$componentName = 'com_imageshow';
$user = JFactory::getUser();
$result = new JObject();
$actions = JAccess::getActionsFromFile(JPATH_ADMINISTRATOR . '/components/' . $componentName . '/access.xml');
if ($type != 'component')
{
$assetName = $componentName . '.' . $type . '.' . $id;
}
else
{
$assetName = $componentName;
}
foreach ($actions as $action)
{
$result->set($action->name,$user->authorise($action->name,$assetName));
}
return $result;
}
}
Kirjaudu tai Rekisteröidy liittyäksesi keskusteluun.
- ANKKA32
- Aiheen kirjoittaja
- Poissa
- Täysjäsen
- Viestejä: 68
- Vastaanotettu kiitos 0
Fatal error: Class 'JControllerLegacy' not found in administrator/components/com_jcomments/jcomments.php on line 37
Line 37:
$controller = JControllerLegacy::getInstance('JComments');
<?php
/**
* JComments - Joomla Comment System
*
* @version 3.0
* @package JComments
* @author Sergey M. Litvinov (Tämä sähköpostiosoite on suojattu spamboteilta. Tarvitset JavaScript-tuen nähdäksesi sen.)
* @copyright (C) 2006-2013 by Sergey M. Litvinov ( www.joomlatune.ru )
* @license GNU/GPL: www.gnu.org/copyleft/gpl.html
*/
defined('_JEXEC') or die;
if (!JFactory::getUser()->authorise('core.manage', 'com_jcomments')) {
return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}
if (!defined('JPATH_COMPONENT')) {
define('JPATH_COMPONENT', dirname(__FILE__));
}
$language = JFactory::getLanguage();
$language->load('com_jcomments', JPATH_ROOT . '/administrator', 'en-GB', true);
$language->load('com_jcomments', JPATH_ROOT . '/administrator', null, true);
require_once(JPATH_ROOT . '/components/com_jcomments/jcomments.legacy.php');
require_once(JPATH_ROOT . '/components/com_jcomments/jcomments.class.php');
JLoader::register('JCommentsControllerLegacy', JPATH_COMPONENT . '/controllers/controller.php');
JLoader::register('JCommentsControllerForm', JPATH_COMPONENT . '/controllers/controllerform.php');
JLoader::register('JCommentsControllerList', JPATH_COMPONENT . '/controllers/controllerlist.php');
JLoader::register('JCommentsModelLegacy', JPATH_COMPONENT . '/models/model.php');
JLoader::register('JCommentsModelForm', JPATH_COMPONENT . '/models/modelform.php');
JLoader::register('JCommentsModelList', JPATH_COMPONENT . '/models/modellist.php');
JLoader::register('JCommentsViewLegacy', JPATH_COMPONENT . '/views/view.php');
$controller = JControllerLegacy::getInstance('JComments');
$controller->execute(JFactory::getApplication()->input->get('task'));
$controller->redirect();
Kirjaudu tai Rekisteröidy liittyäksesi keskusteluun.
- ANKKA32
- Aiheen kirjoittaja
- Poissa
- Täysjäsen
- Viestejä: 68
- Vastaanotettu kiitos 0
Eli päivitin kunena 2.5.3 -> 2.5.11 versioon sekä asensin 3.x kunena versio niin lähti toimimaan kummatkin.
Kirjaudu tai Rekisteröidy liittyäksesi keskusteluun.