|
Title: How to make members use the Mambo front page? Post by: firewired on April 01, 2005, 08:55:15 PM My site started out as a forum so all members have that URL bookmarked. Now that I have Mambo installed, I want users to pass through the CMS instead of jumping directly to the forum. Is their a way I can "force" SMF to redirect them to the front page?
Title: Re: How to make members use the Mambo front page? Post by: cowboy on April 01, 2005, 09:38:02 PM yes, put this code in the first line of your SMF's index.php.
Code: <?php if (strpos($_SERVER['QUERY_STRING'], 'dlattach') === false) { defined('_VALID_MOS') or header("Location: http://www.yoursite.com"); } ?> Title: Re: How to make members use the Mambo front page? Post by: firewired on April 01, 2005, 10:04:52 PM Thanks!
Title: Re: How to make members use the Mambo front page? Post by: Gandalf on April 08, 2005, 03:10:04 AM yes but this will actually kill al the links, i mean a link like index.php?topic=XXX wl not be forwarded to the topic so you need also to include the whole $_GET inside the header function, but of course by doing a foreach to make it one string
like Code: <? $string = "" foreach ($_GET as $key => $value) $string .= "$key=$value&" if (strpos($_SERVER['QUERY_STRING'], 'dlattach') === false) { defined('_VALID_MOS') or header("Location: http://www.yoursite.com/index.php?option=com_smf&Itemid=XX&$string"); } ?> Title: Re: How to make members use the Mambo front page? Post by: cowboy on April 08, 2005, 03:41:00 PM well, it did not kill the links here.
Title: Re: How to make members use the Mambo front page? Post by: Gandalf on April 08, 2005, 10:42:46 PM how that???
heaser("Location : http://www.yoursite.com"); will never redirect to somewhere else than the frontpage ... that's what i meant... you need to explicity include all get requests to be able to be forwarded correctly, because index.php?action=mm (member map) must not go to the mambo frontpage but to Wraped (or unwraped like it is set) member map Title: Re: How to make members use the Mambo front page? Post by: cowboy on April 09, 2005, 03:01:58 AM Gandalf,
My code snippet is for the wrapped mode which is the code being used in this forum. I don't know if your code is for unwrapped mode in which I haven't tried. Title: Re: How to make members use the Mambo front page? Post by: Gandalf on May 29, 2005, 07:29:32 AM Quote from: cowboy on April 09, 2005, 03:01:58 AM Gandalf, yes but you didn't understand me, if (for example) another site have a link to a post on the old unwrapped forum ( http://www.yoursite.com/forum/index.php?topic=1500.0 ) if he used your method, he will be reirected to Mambo Frontpage instead of the topic, means broken link,My code snippet is for the wrapped mode which is the code being used in this forum. I don't know if your code is for unwrapped mode in which I haven't tried. i used it in diffrent way this way, the above URL (http://www.yoursite.com/forum/index.php?topic=1500.0) will redirect the visitor to ( http://www.yoursite.com/index.php?option=com_smf&ItemId=28&topic=1500.0 ) so admin will not suffer from broken links
Forum | Powered by SMF 1.0.5 & Mambo-SMF.
© 2001-2005, Lewis Media. All Rights Reserved. |