Home arrow Forum Hide Forum
  Welcome, Guest. Please login or register.
Did you miss your activation email?
August 30, 2008, 12:24:36 PM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  Joomla Hacks
| |-+  Joomla-SMF Forum Support
| | |-+  Joomla-SMF 2.0.x (Moderators: -Wolverine, kai920)
| | | |-+  Hide Forum
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Hide Forum  (Read 1566 times)
Rolf Timmerman
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8


View Profile
Hide Forum
« on: September 11, 2006, 11:39:09 AM »

Is there a way of hiding the forum for unregistered users? I have a site with SMF and JSMF 2.0 but when I go to the location (http://www.domain.com/forum) then it is shown fullscreen (no joomla) although you have to login to see anything. Could this be solved?
Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +374/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Hide Forum
« Reply #1 on: September 11, 2006, 12:26:31 PM »

you should not be accessing the forum directly.  Only through joomla.  You can add a rewrite rule to your .htaccess file to prevent users from accessing the forum directly

Code:
Redirect /forum http://www.yoursite.com/index.php?option=com_smf&Itemid=XX&
Make sure to use the correct link including Itemid.
« Last Edit: September 11, 2006, 12:28:29 PM by -Wolverine » Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
Rolf Timmerman
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8


View Profile
Re: Hide Forum
« Reply #2 on: September 11, 2006, 12:36:38 PM »

you should not be accessing the forum directly.  Only through joomla.  You can add a rewrite rule to your .htaccess file to prevent users from accessing the forum directly

Code:
Redirect /forum http://www.yoursite.com/index.php?option=com_smf&Itemid=XX&
Make sure to use the correct link including Itemid.
It is just for security that no one knows that there is a forum Wink I will try the above solution, thanks in advance!
Logged
brutebmw
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8


View Profile
Re: Hide Forum
« Reply #3 on: September 11, 2006, 03:21:09 PM »

It is just for security that no one knows that there is a forum Wink I will try the above solution, thanks in advance!

I tried the solution given. Unfortunately, it prevented the SMF Stylesheet from being read. I'm not sure why.

In the mean time, I have used the following workaround. In the /smf/index.php, i have added the following lines at the top.
Code:
/*
 * Get the URI path that was typed in the Address bar
 * and strip the filename so we're left with the path
 */
$URI = $_SERVER["REQUEST_URI"];
$URI = substr( $URI, 0, strrpos( $URI, "/" ));

/*
 * If the path does not match the path for the Joomla
 * installation, redirect to the correct location
 * for the Forum under Joomla.
 * NOTE: Itemid may be different on some installations.
 */
if ( $URI != "/go/portal" ) {
header ("Location: http://www.domain.com/go/portal/index.php?option=com_smf&Itemid=51");
}
« Last Edit: September 11, 2006, 03:22:52 PM by brutebmw » Logged
-Wolverine
Moderator
Joomla Guru
*****

Karma: +374/-34
Offline Offline

Posts: 3393


Lead Developer


View Profile WWW
Re: Hide Forum
« Reply #4 on: September 11, 2006, 03:24:13 PM »

be careful, that file is loaded by the component... you could get multiple refreshes when loading the page.  Another option may be to use the joomla page restriction, add

Code:
defined( '_VALID_MOS' ) or die( 'Restricted access.' );


at the top of SMF's index.php.  Just a thought, lemme know how it works out.  Grin
Logged

Need help?  Check Here First!
Get the JSMF User Guide
SEARCH this forum.
brutebmw
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8


View Profile
Re: Hide Forum
« Reply #5 on: September 11, 2006, 05:58:23 PM »

be careful, that file is loaded by the component... you could get multiple refreshes when loading the page.  Another option may be to use the joomla page restriction, add

Code:
defined( '_VALID_MOS' ) or die( 'Restricted access.' );


at the top of SMF's index.php.  Just a thought, lemme know how it works out.  Grin

Hey that's so true! Now why didn't I think of that one?  Huh Roll Eyes
Logged
Garis Gemilang
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 4


View Profile
Re: Hide Forum
« Reply #6 on: September 13, 2006, 11:31:30 AM »

i have the same problems to, but i solved the problem by actually moving the forum from /forum to /forum123

and then all i need to do is change the configuration file in smf's config.php so the server settings will look the forum from /forum to /forum123, and after that i change the jsmf module to find the forum at /forum123, after that the problem is solved... no one knows the right address for my forum since it's wrapped in joomla, and every body should find the forum by entering the main joomla screen first...

i don't know if this method has a weakness yet, is it possible for members to actually see the forum's direct url by looking at the joomla link ??

thanks in advance.

ps : please forgive my bad english.
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal.
None of the text or images in this public website may be copied without the expressed written consent of the authors.
Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use