开发者

joomla template error

开发者 https://www.devze.com 2023-03-19 23:53 出处:网络
I installed a joomla template but the following error comes up every time: Notice: Undefined variable: my in

I installed a joomla template but the following error comes up every time:


Notice: Undefined variable: my in C:\xampp\htdocs\Joomla16\templates\cartion\index.php on line 36

Notice: Trying to get property of non-object in C:\xampp\htdocs\Joomla16\templates\cartion\index.php on line 36



FATAL ERROR: CALL TO A MEMBER FUNCTION GETCFG() ON A NON-OBJECT IN C:\XAMPP\HTDOCS\JOOMLA16\TEMPLATES\CARTION\SUCKERFISH.PHP ON LINE 763


How should I go about resolving this?

I am sharing the code as well:

<jdoc:include type="head" />
<?php if($my->id) initEditor(); ?> #lin36

 if ($mainframe->getCfg('shownoauth')) {



  $sql = ("SELECT m.*, 开发者_运维知识库count(p.parent) as cnt" .



"\nFROM #__menu AS m" .#763


//global $mainframe was deprecated in Joomla 1.5 and completely removed from Joomla 1.6. 
//global $mainframe;
$app =& JFactory::getApplication('site');
$app->initialise();
//$access   = !$mainframe->getCfg( 'shownoauth' );
$access = $app->getCfg( 'shownoauth' );


I would suspect it's because $mainframe is not defined,

$mainframe = new some_classname(); ?

also looks like this template missing the required classes which defines $mainframe

0

精彩评论

暂无评论...
验证码 换一张
取 消