Simple Machines Community Forum

Customizing SMF => Bridges and Integrations => Topic started by: legolas on July 01, 2005, 10:31:00 PM

Title: "SMF Recent Post" Module Error
Post by: legolas on July 01, 2005, 10:31:00 PM
I am getting an error when the "SMF Recent Post" module is placed in the same page of "Gallery Random Picture" module which can be found here (http://www.gallery-addons.com/). There is another random pic module for gallery but this is much better. BTW this is the error I am getting (The error appears in the place of the "SMF Recent Post" Module. Other than that everything seems to be working.

QuoteDatabase Error: Table 'mywebsite_mambo.smf_messages' doesn't exist
File: /home/mywebsite/public_html/forum/SSI.php
Line: 219Database Error: Table 'mywebsite_mambo.smf_sessions' doesn't exist
File: /home/mywebsite/public_html/forum/Sources/Load.php
Line: 1193
Title: Re: "SMF Recent Post" Module Error
Post by: Orstio on July 01, 2005, 10:41:30 PM
Do you have a link to the page that causes the error?
Title: Re: "SMF Recent Post" Module Error
Post by: legolas on July 02, 2005, 05:52:07 AM
here is the link[/url. Its a live website, so can someone pls have a quick look at it so that I can fix it. Thank you. (http://www.mykereta.net/myvi2/index.php)
Title: Re: "SMF Recent Post" Module Error
Post by: Orstio on July 02, 2005, 06:03:32 AM
What happens if you move the module to just above the random picture module? (just an experiment)
Title: Re: "SMF Recent Post" Module Error
Post by: legolas on July 02, 2005, 06:08:06 AM
Thats did it. Its working now!! Thanks Orstio!!
Title: Re: "SMF Recent Post" Module Error
Post by: legolas on July 02, 2005, 06:12:45 AM
Spoke to soon!! There is still an error!! Check out the bottom of the page,

I am getting this message

QuoteDatabase Error: Table 'mykereta_myvimambo.smf_sessions' doesn't exist
File: /home/mykereta/public_html/myviforum/Sources/Load.php
Line: 1193
Title: Re: "SMF Recent Post" Module Error
Post by: Orstio on July 02, 2005, 06:13:36 AM
Yeah, except that isn't really a fix, just a work-around....

I'm thinking that Gallery probably also uses the variable name $db_name for the database.   >:(
Title: Re: "SMF Recent Post" Module Error
Post by: legolas on July 02, 2005, 06:18:44 AM
Is there any other way to fix the problem??
I really like this module  :'(
Title: Re: "SMF Recent Post" Module Error
Post by: Orstio on July 02, 2005, 06:30:19 AM
What happens if you move the modules back the way you had them, and then add this bit of code to the beginning of the recent posts module:

  require ("administrator/components/com_smf/config.smf.php");
  require ($smf_path."/SSI.php");
Title: Re: "SMF Recent Post" Module Error
Post by: legolas on July 02, 2005, 06:41:56 AM
I get this error message:-

QuoteDatabase Error: Table 'mykereta_myvimambo.smf_messages' doesn't exist
File: /home/mykereta/public_html/myviforum/SSI.php
Line: 219Database Error: Table 'mykereta_myvimambo.smf_sessions' doesn't exist
File: /home/mykereta/public_html/myviforum/Sources/Load.php
Line: 1193
Title: Re: "SMF Recent Post" Module Error
Post by: legolas on July 02, 2005, 06:43:40 AM
BTW this is how I added the code in the Recen post file. Does it look right?

Quote<?php
require ("administrator/components/com_smf/config.smf.php");
  require ($smf_path."/SSI.php");
global $context, $txt, $scripturl, $mosConfig_dbprefix, $settings, $mosConfig_db, $db_name;
$moduleclass_sfx = $params->get( 'moduleclass_sfx' );
$numposts = $params->get( 'numposts' );
$showboard = $params->get( 'showboard' );
$showdate = $params->get( 'showdate' );
$display = $params->get( 'display' );
$postline = $params->get( 'postline' );
$sublength = $params->get( 'sublength' );
$exclude = $params->get( 'exclude' );
if ($exclude=="") $exclude="0";
Title: Re: "SMF Recent Post" Module Error
Post by: Orstio on July 02, 2005, 06:55:54 AM
Well, that sucks.   :(

Instead of calling SSI again, you'll probably have to redefine the variable:

$db_name = 'mykereta_myvismf';

...or whatever you've named the SMF database. 
Title: Re: "SMF Recent Post" Module Error
Post by: legolas on July 02, 2005, 07:15:35 AM
Hi orstio,
I added this to the file:-

Quoterequire ("administrator/components/com_smf/config.smf.php");
  require ($$db_name = 'mykereta_myviforum';);

Now the Recent Post is being displayed, but in the place of random image module, I am getting this error message:-
QuoteDatabase Error: Table 'mykereta_myvimambo.smf_sessions' doesn't exist
File: /home/mykereta/public_html/myviforum/Sources/Load.php
Line: 1193
Title: Re: "SMF Recent Post" Module Error
Post by: Orstio on July 02, 2005, 08:10:10 AM
  require ($$db_name = 'mykereta_myviforum';);


That's not correct.  It should be just:

  $db_name = 'mykereta_myviforum';
Title: Re: "SMF Recent Post" Module Error
Post by: legolas on July 02, 2005, 03:31:41 PM
This error is being displayed at the bottom of the page, :'(

QuoteDatabase Error: Table 'mykereta_myvimambo.smf_sessions' doesn't exist
File: /home/mykereta/public_html/myviforum/Sources/Load.php
Line: 1193