Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Joomla Bridge Support => Topic started by: Kursk on August 27, 2007, 02:55:57 PM

Title: SMF Recent posts in UNbridged Joomla
Post by: Kursk on August 27, 2007, 02:55:57 PM
Has anyone done this, show recent posts from stand-alone SMF on the Joomla frontpage?

Used to have a bridged Joomla-SMF, now it's unbridged.  Can't get the modules for recent posts and recent topics to work correctly with a stand-alone SMF.  I got the links working correctly with some manual coding but I keep getting an error referencing SSI.php.  The error disappears if I visit the forum and go back to Joomla frontpage, I have some guesses about it.

Does anyone know of a working solution?
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: Kindred on August 27, 2007, 03:11:27 PM
you will have to modify the module to point to the correct location of SSI.php. The bridge module reads SMF information from the bridge configuration... (which no longer exists in an unbridged site)
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: Kindred on August 27, 2007, 04:11:21 PM

Find:


// Get the configuration.  This will tell Mambo where SMF is, and some integration settings
$database->setQuery("
SELECT `variable`, `value1`
FROM #__smf_config
");
$variables = $database->loadAssocList();

foreach ($variables as $variable){
$variable_name = $variable['variable'];
$$variable_name = $variable['value1'];
}


replace with


$smf_path='PATH/TO/YOUR/SMF/INSTALLATION';


find:

mysql_select_db($mosConfig_db);
$sql = "SELECT id FROM ".$mosConfig_dbprefix."menu WHERE link='index.php?option=com_smf'";

$result = mysql_query ($sql);

$row = mysql_fetch_array($result);

$myurl = $mosConfig_live_site."/".basename($_SERVER['PHP_SELF']) . "?option=com_smf&Itemid=" . $row[0]."&";

$scripturl = $myurl;


and delete it.
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: Kursk on August 28, 2007, 01:45:01 PM
Thank you, Kindred, that what helpful in terms of fixing the links, your method is more efficient.

I got it pointed in the right direction. However, I do get the same error:

QuoteNotice: SSI.php was unable to load a session! This may cause problems with logout and other functions - please make sure SSI.php is included before *anything* else in all your scripts! in /home/.../..../..../forum/SSI.php on line 160

Otherwise the module works fine, all the links to the recent posts are correct.  It's only this annoying message above them.

Line 160 is the last one below, telling to put out the session error in SSI.php:
// Make sure they didn't muss around with the settings... but only if it's not cli.
if (isset($_SERVER['REMOTE_ADDR']) && !isset($_SERVER['is_cli']) && session_id() == '')
trigger_error($txt['ssi_session_broken'], E_USER_NOTICE);
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: Kindred on August 30, 2007, 10:20:08 AM
messing with session checks is a good way to open your site to hackers.

Alternatively, You could add the SSI call to the top of your joomla template. That might take care of the function error.
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: Kursk on August 30, 2007, 10:42:48 AM
I tried that before, calling SSI before anything else on the joomla template, doesn't work.  If there is any other solution, I'd appreciate hearing about it.
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: joejackson on January 09, 2008, 08:01:14 AM
Has any answer to this been uncovered?
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: sadochinero on January 12, 2008, 02:29:54 AM
i ve simply made an iframe with the SSI.php recenttopics...

How can i modify the style of the shown iframe? (color, font etc)
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: Kindred on January 13, 2008, 08:12:18 AM
look at the generated page using DOM explorer or firebug. This will give you the CSS tags for each section, which you can then stylize.

Alternatively, you can modify the output directly in the function.
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: joejackson on January 15, 2008, 10:01:12 AM
I can't get this to work.
I have an iframe but can't seem to format the output.
I have used firebug and it tells me class= ssi_table is responsible but I can't find that
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: Kindred on January 15, 2008, 01:25:47 PM
just out of curiosity... why are you using an iframe?  The purpose of the SSI stuff is to include it within a page... not in an iframe.
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: joejackson on January 15, 2008, 04:05:45 PM
Hi Kindred, my Joomla/SMF is not bridged, never has been, and I'm unsure how to proceed otherwise.
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: Kindred on January 15, 2008, 05:26:26 PM
but why are you using an iframe?   Just use the standard module template/format.
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: joejackson on January 15, 2008, 06:53:44 PM
The answer to that is easy -
I know how to use an iframe, I do not know how to "use the standard module template/format."
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: Kindred on January 15, 2008, 07:54:17 PM
ah... well, I suspect that is part of your problem.  Iframes are not good coding practice and they don't belong on a joomla page.   You need to build a joomla module.

Take the mod_smf_recentPosts as a baseline and work from there.
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: joejackson on January 16, 2008, 03:53:36 AM
Two questions

1/ Why are iframes not good coding practice ?
2/ Where would I find mod_smf_recentPosts ?
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: Kindred on January 16, 2008, 08:16:17 AM
Iframes mess up session variables and they are unnecessary in most cases (like tables in modern CSS)

There is a copy of the module attached to the combined readme sticky post.
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: joejackson on February 21, 2008, 05:11:03 AM
I installed the module, published it, but all I see is the title SMF Recent Posts

When I turn on Joomla debugging I get a lot of this...

/var/www/etc etc etc/includes/database.php:442
/var/www/etc etc etc/modules/mod_smfRecentPosts.php:10
/var/www/etc etc etc/includes/frontend.html.php:397
/var/www/etc etc etc/includes/frontend.html.php:107
/var/www/etc etc etc/includes/frontend.php:166
/var/www/etc etc etc/index.php:266
Title: Re: SMF Recent posts in UNbridged Joomla
Post by: joejackson on February 21, 2008, 05:23:46 AM
Quote from: joejackson on February 21, 2008, 05:11:03 AM
I installed the module, published it, but all I see is the title SMF Recent Posts

When I turn on Joomla debugging I get a lot of this...

/var/www/etc etc etc/includes/database.php:442
/var/www/etc etc etc/modules/mod_smfRecentPosts.php:10
/var/www/etc etc etc/includes/frontend.html.php:397
/var/www/etc etc etc/includes/frontend.html.php:107
/var/www/etc etc etc/includes/frontend.php:166
/var/www/etc etc etc/index.php:266


The above error has been solved by removing a leading slash in the
$smf_path='PATH/TO/YOUR/SMF/INSTALLATION';

Thanks for the assistance.