Home arrow Forum
How to make members use the Mambo front page?
  Welcome, Guest. Please login or register.
January 08, 2009, 11:01:45 PM
Home New Posts Search Calendar


Login with username, password and session length
Forum  |  Techies Zone  |  How-To's  |  Topic: How to make members use the Mambo front page? « previous next »
Pages: [1] Go Down Print
Author Topic: How to make members use the Mambo front page?  (Read 8795 times)
firewired
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 5


View Profile
How to make members use the Mambo front page?
« 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?
Logged
cowboy
Administrator
Hero Member
*****

Karma: +30/-0
Offline Offline

Posts: 663



View Profile WWW
Re: How to make members use the Mambo front page?
« Reply #1 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"); 
}
?>

Logged
firewired
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 5


View Profile
Re: How to make members use the Mambo front page?
« Reply #2 on: April 01, 2005, 10:04:52 PM »

Thanks!
Logged
Gandalf
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 80



View Profile WWW
Re: How to make members use the Mambo front page?
« Reply #3 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");
}
?>
Logged
cowboy
Administrator
Hero Member
*****

Karma: +30/-0
Offline Offline

Posts: 663



View Profile WWW
Re: How to make members use the Mambo front page?
« Reply #4 on: April 08, 2005, 03:41:00 PM »

well, it did not kill the links here.
Logged
Gandalf
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 80



View Profile WWW
Re: How to make members use the Mambo front page?
« Reply #5 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
Logged
cowboy
Administrator
Hero Member
*****

Karma: +30/-0
Offline Offline

Posts: 663



View Profile WWW
Re: How to make members use the Mambo front page?
« Reply #6 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.
« Last Edit: April 09, 2005, 04:11:26 AM by admin » Logged
Gandalf
Jr. Member
**

Karma: +0/-0
Offline Offline

Posts: 80



View Profile WWW
Re: How to make members use the Mambo front page?
« Reply #7 on: May 29, 2005, 07:29:32 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.
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,

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
« Last Edit: May 29, 2005, 07:32:56 AM by Gandalf » Logged
Pages: [1] Go Up Print 
Forum  |  Techies Zone  |  How-To's  |  Topic: How to make members use the Mambo front page? « previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Forum | Powered by SMF 1.0.5 & Mambo-SMF.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!
None of the text or images in this public website may be copied without the expressed written consent of the authors.
Copyright 2005 by MamboHacks.com. Powered by Mambo. All rights reserved.
TERMS OF USE