Error when using <?=cn_title(); ?>

Report bugs and errors in this forum.

Error when using <?=cn_title(); ?>

Postby Goberg » Fri Jun 18, 2010 6:04 am

Code: Select all
Catchable fatal error: Object of class template could not be converted to string in /home/meditcom/public_html/boss/inc/functions.inc.php  on line 769


I get this code when I try to use the <?=cn_title(); ?> tag anywhere on my site. I have of course activated the CN Functions plugin and included the head.php file at the top of my file.

Around line 769 I find this function:
Code: Select all
////////////////////////////////////////////////////////
// Function:   cute_lang
// Description: ????? ????????? ??????

function cute_lang($module = ''){
global $mod, $config_lang;

   if (!file_exists($global = rootpath.'/inc/lang/'.$config_lang.'/global.ini')){
      $global = rootpath.'/inc/lang/en/global.ini';
   }

   if (!file_exists($local = rootpath.'/inc/lang/'.$config_lang.'/'.($module ? $module : $mod).'.ini')){
      $local = rootpath.'/inc/lang/en/'.($module ? $module : $mod).'.ini';
   }

   if (file_exists($global)){
      $lang = parse_ini_file($global, true);
   }

   if (file_exists($local)){
      $lang = array_merge($lang, parse_ini_file($local, true));
   }

return $lang;
}


Any ideas on how to fix this? It would be bad for my site if I can't use the <?=cn_title(); ?> tag :(
Goberg
 
Posts: 79
Joined: Thu Jan 18, 2007 2:31 pm

Postby mark99 » Sun Jun 20, 2010 9:29 am

Try:

<?=cn_title(' &minus; ', true); ?>
mark99
 
Posts: 123
Joined: Mon Feb 09, 2009 6:01 pm

Postby Goberg » Mon Jun 21, 2010 4:12 am

Same error. I think it is because I include phpBB3 session into that same page with this code:

Code: Select all
<?php include 'cnru/head.php'; ?>
<?php
define('IN_PHPBB', true);
$phpbb_root_path = 'forums/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
?>


There is a confliction with the $template array or something. Any ideas on how to fix that?
Goberg
 
Posts: 79
Joined: Thu Jan 18, 2007 2:31 pm

Postby DarkSlim » Sun Jul 18, 2010 7:24 pm

I'm using this code to show the posts title:

Code: Select all
<?php
   echo cn_title('' , true , $id);
?>


User avatar
DarkSlim
 
Posts: 296
Joined: Thu Aug 06, 2009 4:18 pm
Location: IL


Return to Bugs and errors



Who is online

Users browsing this forum: No registered users and 0 guests