SMF messages all turn into 0's

Started by Krusty^, February 10, 2006, 10:17:35 AM

Previous topic - Next topic

Krusty^

Hey. I have a very annoying problem i hope someone can help me sort out.

I have installed mambo 4.5 and intagrated with SMF 1.1RC2 following this guide by Kindred.
I have the bridge installed, and everything is working fine exept for one thing.

When users without admin rights try to post they all turn into 0's.. The admin's posts don't though.

The problem only occurs when i access SMF from mambo's component link, the problem dissapears if i direct access the forum (www.mysite/forum) and try to post.

I figure it's got something to do with the code i had to enter into my theme index.php when integrating smf:
<?php
global $sc, $context, $settings;

if (!
defined('SMF')){
require (
"administrator/components/com_smf/config.smf.php");
require (
$smf_path."/SSI.php");
}

$sc = &$context['session_id'];
$_SESSION['USER_AGENT'] = $_SERVER['HTTP_USER_AGENT'];

mysql_select_db($mosConfig_db);

if(!empty(
$context['page_title']))
   
$mainframe->setPageTitle($context['page_title']);

echo
'
<script language="JavaScript" type="text/javascript" src="'
, $settings['default_theme_url'], '/script.js?rc2"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "'
, $settings['theme_url'], '";
var smf_images_url = "'
, $settings['images_url'], '";
var smf_scripturl = "'
, $scripturl, '";
// ]]></script>'
;

echo
'
<link rel="stylesheet" type="text/css" href="'
, $settings['theme_url'], '/style.css?rc2" />
<link rel="stylesheet" type="text/css" href="'
, $settings['default_theme_url'], '/print.css?beta4" media="print" />
<link rel="help" href="'
, $scripturl, '?action=help" target="_blank" />
<link rel="search" href="'
. $scripturl . '?action=search" />
<link rel="contents" href="'
, $scripturl, '" />';
?>


and:

<?php mysql_select_db($GLOBALS['db_name']); ?>

whoa.. that was a lot of text. i hope someone will read all of it :-[

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Krusty^

Quote from: Kindred on February 10, 2006, 01:10:45 PM
Read the FAQ!
http://www.simplemachines.org/community/index.php?topic=63187.msg437152#msg437152

lol. Man do i feel stupid. i spent the entire day scanning the forums and there it was all the time :P

Thanks dude!

Advertisement: