Version: , by Viper220
Developer Last Online: Jun 2004
Version: Unknown
Rating:
Released: 12-04-2001
Last Update: Never
Installs: 0
No support by the author.
Hi, my question is in regard to RobAC's hack that allows me to place a login box on a non-VB page.
In order to use a hack that allows me to place a log-in form box on a non-VB page, I need to use the REQUIRE function to call to global.php. Presumably that checks to see if the VB cookie is in place. If the cookie is found, then it displays the "hello [username.] If it's not, then it displays the log-in fields.
My proble mis this: no matter if the user is logged in it still shows the login field, meaning it isn't checking to see if the cookie works.
There are two things associated with this that may be causing it. (1) the REQUIRE statement inside the hack that calls to global.php. Should I be using absolute server path to call to this? I'm not sure, I tried to still doesn't work or I get an error.
(2) The INCLUDE statement in my non-VB page that calls to the hack. Can someone give me a sample what it should be? I've tried absolute server path and the regular URL path and if it does call to it correctly, it still doesn't check for the cookie.
I'm just not sure what the problem is and why it won't check to see if the cookie is there. Can anyone give me some solutions? Thanks in advance.
Best,
Brian
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
First off, let me just say I appreciate the help that everyone has given me. If people can bear with me just a tad longer I'd appreciate it.
To update: I have configured the cookies in control panel to go to all of my domain (.slushfactory.com). Unfortunately, this hasn't resolved the problem.
To get back to the basics I am using the original loginfile.php file that RobAC included with his hack. I made two websites, my regular index (indextest.php) that also has a regular header and HTML code in it, and then a 2nd page (test.php) that only contains the INCLUDE file that calls to loginfile.php. I don't get the warning header error on the test.php page, but I still get it on the indextest.php one.
Because the test.php works, it's obvious that the problem exists in my indextest.php page. However, I'm not sure where. The include file that calls to loginfile.php is after the header information and is someways down the page. The exact line I use is:
<?php
include("/home/slush/public_html/forum/loginfile.php");
?>
Aside from that, all the rest of the page is written in regular 'ol HTML. Could this be the problem? I assumed all I had to do was throw in the php include statement.
Am I missing something? I'm willing to post whatever code someone needs if they're willing to look at it.
[QUOTE]Originally posted by Goldfinger The problem is .. is that you are including the global.php and the config.php twice and that is causing the headers to go wild.
isn't there in php 4 a includeonce or requireonce statement.. that would solve the problem...
the heather problem usually comes if you insert a html statement before the include global.php
try to put in on top of the page..
[QUOTE]Originally posted by derfelix isn't there in php 4 a includeonce or requireonce statement.. that would solve the problem...
the heather problem usually comes if you insert a html statement before the include global.php
try to put in on top of the page..