Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Mambo Bridge Support => Topic started by: Hengis on January 01, 2005, 08:53:55 PM

Title: Recent Posts is messing up my Front page :(
Post by: Hengis on January 01, 2005, 08:53:55 PM
Hi.

I am really desperate!! :)

My Site: www.pchelpforum.com

I have integrated SMF into my Mambo installation and all is working really well  --  thanks to this Forum etc!!

My problem is that when a user clicks on a link in the Recent Forum Posts module in the front page everything goes really screwy. I would like it if there was a way that the forum could open up in its own window, like it does if you click  on my "Help Froums" link on the Main Menu.

I look forward to your help on this....thanks.
Title: Re: Recent Posts is messing up my Front page :(
Post by: Orstio on January 01, 2005, 09:22:55 PM
Remove these lines from the module:

$sql = "SELECT id FROM ".$mos_prefix."menu WHERE link='index.php?option=com_smf'";
$result = mysql_query ($sql);
$row = mysql_fetch_array($result);
$myurl = $mosConfig_live_site ."/". basename($PHP_SELF)."?option=com_smf&Itemid=" . $row[0]."&";
$scripturl = $myurl;
Title: Re: Recent Posts is messing up my Front page :(
Post by: Hengis on January 02, 2005, 05:35:37 AM
Thanks - unfortunately it didn't work  :-\

Here is the code for the module before removal of anything :) :
<?php

global $context, $txt, $scripturl, $mos_prefix;

$sql = "SELECT id FROM ".$mos_prefix."menu WHERE link='index.php?option=com_smf'";

$result = mysql_query ($sql);

$row = mysql_fetch_array($result);

$myurl = $PHP_SELF . "?option=com_smf&Itemid=" . $row[0]."&";

$scripturl = $myurl;

$num_recent = 8;

ssi_recentPosts($num_recent);



?>


and after:
<?php

global $context, $txt, $scripturl, $mos_prefix;



$num_recent = 8;

ssi_recentPosts($num_recent);



?>



I have left the "after" version on my site so that you can see it hasn't changed...

Title: Re: Recent Posts is messing up my Front page :(
Post by: Orstio on January 02, 2005, 08:02:09 AM
Check for other modules you have on the same page that have that same code in it.  You'll want to delete it from all of them.
Title: Re: Recent Posts is messing up my Front page :(
Post by: Hengis on January 02, 2005, 08:22:22 AM
Sorry to sound stoopid  :-\ but I don't know where else this code would be on my index/main page.
Title: Re: Recent Posts is messing up my Front page :(
Post by: Orstio on January 02, 2005, 08:46:02 AM
Well for starters, your "In the forums" module, and pssibly even the login module.
Title: Re: Recent Posts is messing up my Front page :(
Post by: Hengis on January 02, 2005, 09:38:01 AM
That's great Orstio!! Thanks.

I removed the code from the "In the Forums" module and also the Login module. It didn't quite work when I took the code out of the login module (it just took you to the main forum page when i logged in) SO I removed the login boxes and pointed the "Register", "Login", "Missed your Activation Email?" to the relevant parts of the Forum.

I am a happy man!

Thanks for your help. :)
Title: Re: Recent Posts is messing up my Front page :(
Post by: Slack on January 02, 2005, 01:20:58 PM
Hengis,

Could you give me some pointers on how to get the Recent Posts Module to appear on the Front Page?  I can get it to appear on the side columns but see no "New" entry for the frontpage (obviously a new Mambo user here - thanks for your patience.)

cheers,
slack

Title: Re: Recent Posts is messing up my Front page :(
Post by: Hengis on January 02, 2005, 01:28:30 PM
sure, I use a great template that is easy to edit. :) All I did was go into the index.php and look to see what modules are displayed where on the main page. That way I knew that I could put the "Recent Forum Posts" module in (what is for me) the "Top" space.

I have struggled before but I must say that the template I am currently using has been the easiest to edit :)

I'm sure that the PHP doods 'round these parts will give you a far better....more detailed explanation to my ramblings ;)