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?

2 different home pages?

Asked Modified Viewed 1,787 times
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
asked
Senior Member

Don't know if this is where it belongs, BUT is there a way (easy) to have 2 separate home-pages, One for visitors and one for members?
0 replies

11 posts

D
douwe_yntema
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
answered
Senior Member

Cost me some search, but here should be info to do it:
https://www.php-fusion.co.uk/forum/vi...ost_157571
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Douwe, wonder if it'll work in 9, seeing as it's for 6 or 7???
0 replies
D
douwe_yntema
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
answered
Senior Member

I tested for V9, procedure is as follows:
Assume your homepage is home.php, set in yous settings.

Make a new folder under your infusions folder, name it homepage_panel

Make a file in these folder called homepage_panel.php and place the following code in it:

<?php
if (!defined("IN_FUSION")) {
    die("Access Denied");
}
if (iMEMBER) { redirect(BASEDIR."messages.php"); }


Add a new center panel, with this file, but be sure exclude it in on messages.php.
With this example logged in users go to messages.php, but guests to your default homepage
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Thank You douwe for all your help....
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Douwe, couldn't get it to work, may be how I editied out items on messgaes.php

<?php
/*-------------------------------------------------------+
| PHPFusion Content Management System
| Copyright (C) PHPFusion Inc
| https://www.php-fusion.co.uk/
+--------------------------------------------------------+
| Filename: messages.php
| Author: PHPFusion Development Team
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at www.gnu.org/licenses/agpl.html. Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "maincore.php";
if (!iMEMBER) {
    redirect("index.php");
}
require_once THEMES."templates/header.php";
//include LOCALE.LOCALESET."messages.php";
//include THEMES."templates/global/messages.php";
$message = new \PHPFusion\PrivateMessages();
$message->display_inbox();
display_inbox($message->getInfo());
require_once THEMES."templates/footer.php";
0 replies
D
douwe_yntema
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
answered
Senior Member

Yeah if you comment out, you got an error message on your page and the messaging page is not showing up

Why did you comment the two lines out?
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

Tried each one then both without success, no errors reported either??? Now I'm not using the generated home page, I'm set using http://www.intothenebula.info/viewpage.php?page_id=2 for everyone and mot what's set up in the settings page.
0 replies
D
douwe_yntema
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
answered
Senior Member

Are you sure you have enabled the panel on your site? And excluded on the page you are redirecting to. It is working on my testsite under V9 http://demo.webrain.nl
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

I know the panel was enabled.

Now it's being redirected to messages.php correct?

Didn't I cut that out above?

Sorry, but php and I don't mix all the time :o

Just remembered, those three panels your calling are turned off on my site. could that be the problem?
Edited by daimonbok1 on 06-08-2017 01:55,
0 replies
D
douwe_yntema
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
answered
Senior Member

Maybe you can put an echo statement in the code for the homepage_panel and echo some text to see if the panel is there on your homepage I think the params after the viewpage.php is ruin it. I do not think the three panels are the problem
0 replies
D
daimonbok1
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions
answered
Senior Member

That's the problem, it's not reading the panel...
0 replies

Labels

None yet

Statistics

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

2 participants

D
D
  • Senior Member, joined since
  • Contributed 667 posts on the community forums.
  • Started 57 threads in the forums
  • Answered 1 question
D
D
Into The Nebula! Is it Science or Science Fiction?
  • Senior Member, joined since
  • Contributed 626 posts on the community forums.
  • Started 141 threads in the forums
  • Started this discussions

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet