Recent Posts is messing up my Front page :(

Started by Hengis, January 01, 2005, 08:53:55 PM

Previous topic - Next topic

Hengis

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.
Visit www.pchelpforum.com for all your PC support needs

Orstio

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;

Hengis

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

Visit www.pchelpforum.com for all your PC support needs

Orstio

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.

Hengis

Sorry to sound stoopid  :-\ but I don't know where else this code would be on my index/main page.
Visit www.pchelpforum.com for all your PC support needs

Orstio

Well for starters, your "In the forums" module, and pssibly even the login module.

Hengis

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. :)
Visit www.pchelpforum.com for all your PC support needs

Slack

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


Hengis

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 ;)
Visit www.pchelpforum.com for all your PC support needs

Advertisement: