Version: 1.00, by mcahill
Developer Last Online: Dec 2012
Version: 3.0.0
Rating:
Released: 02-02-2004
Last Update: Never
Installs: 74
No support by the author.
This is a simple modification to do, and adds a lot of value to your homepage.
Notes:
1. This script can occassionally have conflicts with other javascripts. Test before you deploy.
2. If you use and include to put the file on your page, be sure that the chdir and the require for global.php is in the head of the main document.
3. It is assumed that you are using a php page, and that you have already got connectivity with your database.
The code:
At the top of the document, before the <html> or <head> tags (edit to provide the path for your particular installation):
Before requesting support, please check the following:
1. Make sure you have the path to your forum in the chdir. If you haven't done this, you will get a "can't include" error.
2. Make sure you have the chdir in the main document. If it isn't you will get a "can't modify header" error.
3. If those don't resolve the issue, try putting the login in a separate file, with no other code. If it works there, then you will know that you have a conflict with one of the scripts on the page you are trying to add the login to. I can't help you if you've got a conflict with another script.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
' Warning: main(): open_basedir restriction in effect. File(/forums/global.php) is not within the allowed path(s): (/home/indeathw:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/indeathw/public_html/indextest.php on line 2
Warning: main(/forums/global.php): failed to open stream: Operation not permitted in /home/indeathw/public_html/indextest.php on line 2
Fatal error: main(): Failed opening required '/forums/global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/indeathw/public_html/indextest.php on line 2'
I downloaded this hack, work great! I only need some more stuff when the member is logged in. Like the avatar image, new pms, last visited? I know there are codes for this, but can someone help me get these?
hmmm I put the code on my index.htm on IIS 6 and it is just working fine, no need to rename it to .php (the .htm file is XHTML 1.1 compliant, but I don't think this affects the php code to working or non-working).... do I need to have index.php on Apache or it won't work?!?
Okay, I finally got this hack to work with my PHPnuke 7.1. There's still 1 problem remaining. It logs in and returns to the main page, however the message does not change to "Welcome username", it always shows the login form....I made it into a phpnuke block, so it is in its' own file. The login is successful, but there is no welcome page.
PHP Code:
if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
1. This script can occassionally have conflicts with other javascripts. Test before you deploy.
That's the exact problem I'm having with the javascript. The script works, but I always get an error when the page loads (before I login). I tried this hack without the javascript and it still works fine.
So, why is this line of javascript needed to login?
<script type='text/javascript' src='/forum/clientscript/vbulletin_md5.js'></script>