How do I allow login from page outside of ee
Posted: 29 August 2004 04:57 PM   [ Ignore ]  
Summer Student
Total Posts:  25
Joined  04-27-2003

My home page is outside of the ee template system. I have previously successfully pulled in content from my ee weblog to diplay on my home page. However, now I would like to allow users to login to my blog from my home page. I have tried the following :

My home page content:
  <?php @include(“http://<home page>/engine/index.php?/home/login”); ?>

My ee ‘home/login’ template:
  {if logged_in}>
      You are logged in.
  {/if}

  {if logged_out}
      You are logged out.
  {/if}
 
It always shows that I am logged in even when I am logged out. The login status from my blog page is correct.

Is it possible to allow users to login from a non ee template? If so, am I going about this the right way? Please advise. Thanks!

 Signature 

“I’m going on a Toe Quest!”

Profile
 
 
Posted: 30 August 2004 10:16 AM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

Well,  to grab the page the include is using a URL fopen wrapper, which is not sending your cookie information to the system so you will always seem to be logged off according to it.

Try something like this, and change the system path variable if you have changed the name of your system directory:

<?php
$system_path = “./system/”;
$ext = ‘.php’;
$uri = ‘’;

$template_group = “home”;
$template = “login”;

if ( ! ereg(”/$”, $system_path)) $system_path .= ‘/’;
require $system_path.‘core/core.system’.$ext;
?>

 Signature 
Profile
 
 
Posted: 30 August 2004 01:28 PM   [ Ignore ]   [ # 2 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  12256
Joined  04-29-2002

Ohh.. thanks, Paul. I got this working for an about me page. Before I wasn’t logged in. It was the missing require core.system.php code.

 Signature 

Quick Reference - EE Trial Options - EE Wiki - Docs for updating a build

Profile
MSG
 
 
Posted: 30 August 2004 07:16 PM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  25
Joined  04-27-2003

I tried your recommendation, but now I get the following error message when I access my home page:

Fatal error: Call to undefined function: mark() in   /home/arob42/public_html/engine/ee_system/core/core.system.php on line 37

I used $system_path = “engine/ee_system/”  since my home page is one level up from my expression engine code.

 Signature 

“I’m going on a Toe Quest!”

Profile
 
 
Posted: 30 August 2004 07:19 PM   [ Ignore ]   [ # 4 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

Try using $system_path = “./engine/ee_system/”;

What is odd is that the mark function is actually in the core.system.php file right at the bottom.

 Signature 
Profile
 
 
Posted: 30 August 2004 07:34 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  25
Joined  04-27-2003

I tried it but I still get the same error message :(

 Signature 

“I’m going on a Toe Quest!”

Profile
 
 
Posted: 30 August 2004 07:36 PM   [ Ignore ]   [ # 6 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

Hm, send me an email, please.  I think I want to see this one for myself, since the only thing I can think of is that the Benchmark class was removed from the bottom of core.system.php.

 Signature 
Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 64493 Total Logged-in Users: 67
Total Topics: 81039 Total Anonymous Users: 39
Total Replies: 436093 Total Guests: 273
Total Posts: 517132    
Members ( View Memberlist )