News:

Wondering if this will always be free?  See why free is better.

Main Menu

"SMF Recent Post" Module Error

Started by legolas, July 01, 2005, 10:31:00 PM

Previous topic - Next topic

legolas

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. 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

Orstio

Do you have a link to the page that causes the error?


Orstio

What happens if you move the module to just above the random picture module? (just an experiment)

legolas

Thats did it. Its working now!! Thanks Orstio!!

legolas

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

Orstio

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.   >:(

legolas

Is there any other way to fix the problem??
I really like this module  :'(

Orstio

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");

legolas

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

legolas

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";

Orstio

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. 

legolas

#12
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

Orstio

  require ($$db_name = 'mykereta_myviforum';);


That's not correct.  It should be just:

  $db_name = 'mykereta_myviforum';

legolas

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

Advertisement: