Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Log on page for intranet

Asked Modified Viewed 1,992 times
C
Chris NZ
C
  • Newbie, joined since
  • Contributed 6 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
asked
Newbie

Hi Folks,

I would like to use PHPFusion for an intranet and I'm having difficulties configuring what I need so I'm hoping that someone knows the answers ;)
If i do a new install, I can set the home page up just perfectly with the discussion forum threads and news showing in the center panel.

On accessing the site, the first thing I need the user to do is log in before anything is shown. If I make Site opening page: login.php this works but this setting subsequently upsets the home page and index.php no longer works.

I would like to display only the login facility on accessing the site with everything else hidden (or disabled) and similarly, when the user logs out, the login page should be displayed again ... but how to achieve this please.

Any assistance hugely appreciated!

Chris
0 replies

2 posts

J
JoiNNN
J
JoiNNN 10
  • Veteran Member, joined since
  • Contributed 850 posts on the community forums.
  • Started 100 threads in the forums
answered
Veteran Member

Go to Admin Panel and create a new panel, add this code to its content. Also check "Display on all pages" for this panel.
if (!iMEMBER && FUSION_SELF != "login.php") {
redirect(BASEDIR."login.php");
}

You wont be able to access anything unless you log in.
0 replies
C
Chris NZ
C
  • Newbie, joined since
  • Contributed 6 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions
answered
Newbie

Hi JoiNNN,

Sorry for the late response but the forum appeared to be down yesterday.

Your code was just what was required - thank you!

I created a new "home.php" file and used the following code:

<?php

/*--------------------------------------------+
| PHPFusion - Content Management System |
|---------------------------------------------|
| author: Nick Jones (Digitanium) Ôø&#937; 2002-2005 |
| web: http://www.php-fusion.co.uk |
| email: nick@php-fusion.co.uk |
|---------------------------------------------|
| Released under the terms and conditions of |
| the GNU General Public License (Version 2) |
+--------------------------------------------*/

require_once "maincore.php";
require_once THEMES."templates/header.php";
add_to_title(" - Home"wink;
if (!iMEMBER && FUSION_SELF != "login.php"wink
{
redirect(BASEDIR."login.php"wink;
}
if (iMEMBER) {
include BASEDIR."news_cats.php";
}
require_once THEMES."templates/footer.php";
?>

This gave me a login page before the user got to see anything - perfect.

Thanks again for your assistance.

Best regards

Chris
0 replies

Labels

None yet

Statistics

  • Views 0 views
  • Posts 2 posts
  • Votes 0 votes
  • Topic users 2 members

2 participants

J
J
JoiNNN 10
  • Veteran Member, joined since
  • Contributed 850 posts on the community forums.
  • Started 100 threads in the forums
C
C
  • Newbie, joined since
  • Contributed 6 posts on the community forums.
  • Started 2 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet