2006-11-26, 11:24 PM
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
2006-11-27, 09:30 PM
I found a bit of a problem that's important for my new site that I'm working on. I logged in onto my forum that's installed on my computer and went into phpMyadmin and set my usergroup value to 7 which is for banned. I put the login form into my site and I get the "You are banned you do not have permission to view this page" etc. how do I prevent that from coming through?
2006-12-18, 01:19 PM
I get this error. Any help??
Direct initialization of this file is not allowed.
Please make sure IN_MYBB is defined.
Direct initialization of this file is not allowed.
Please make sure IN_MYBB is defined.
Marc O' Connor Wrote:Hmmm... Let me guess.
You need to integrate your forum within your website?
Well, you came to the right place.
What you need
1. Basic Knowledge In HTML.
2. Basic Knowledge In PHP.
3. MyBB (Duh).
4. A website to integrate it with.
How To
First, Before ANYTHING, even the "<HTML>" or "<?" Tag, place this.
Then, place this where you want the login form/welcome message to appear.<?php chdir('forums'); // path to MyBB require './global.php'; ?>
<?php if($mybb->user['uid']) { ��// The user is logged in, say Hi echo "Hey, $mybbuser[username].<br> Thanks for logging in."; } else { ��// The user is not logged in, Display the form echo "<form action='forums/member.php' method='post'> Username: <input type='text' name='username' size='25' maxlength='30' /><br /> Password: <input type='password' name='password' size='25' /> <input type='hidden' name='action' value='do_login'> <input type='hidden' name='url' value='index.php' /> <input type='submit' class='submit' name='submit' value='Login' /></form><br>"; } ?>
Where 'index.php' from line 17 (or close):
Should be replaced with where you want to redirect after the login.<input type='hidden' name='url' value='index.php' />
And Where 'forums/member.php' from line 12 (or close):
Is the Path to your forum's member.php. Generally "forums/member.php".<form action='forums/member.php' method='post'>
If you need to add anything under on line 7 (or close):
echo "Hey, $mybbuser[username].<br> Thanks for logging in.";
Make it like:
echo "Hey, $mybbuser[username].<br> Thanks for logging in.<br>Your text here.";
To Add a link, do not use.
But<a title="link Description" href="http://link/link.php">Link</a>
<a title='link Description' href='http://link/link.php'>Link</a>
In other words, Do NOT use double quotes inside.echo ""
Use 's instead of "s.
Also, save the file (Which has the login form) as "something.php" and not "something.html" or "something.htm".
If this helped you, please join my forum at http://gamezrule.org/forums.
Regards,
Marc
2006-12-18, 03:39 PM
put define('IN_MYBB', 1); right after <?php
2007-01-28, 04:18 AM
D-Man Wrote:no, not on same domain, but i figured it out...
Oh dude! Please tell me how, I'm dying to know how to do it using 2 different domains.
2007-02-02, 11:24 PM
This thread might be a little old, but I need this really bad! It logs me in just fine, but right underneath the form I get this:
Direct initialization of this file is not allowed.
Please make sure IN_MYBB is defined.
I have tried everything but it wont go away without getting a "Cannot modify header information error"...
Any ideas?
Direct initialization of this file is not allowed.
Please make sure IN_MYBB is defined.
I have tried everything but it wont go away without getting a "Cannot modify header information error"...
Any ideas?
2007-02-25, 06:49 AM
Fatal error: Cannot redeclare class session in /home/_______/public_html/efforums/inc/class_session.php on line 13
I get that error! I have version 1.2.3 and this is my code:
<?php
define('IN_MYBB', 1);
chdir('/home/_______/public_html/efforums/'); // path to MyBB
require './global.php';
?>
I get that error! I have version 1.2.3 and this is my code:
<?php
define('IN_MYBB', 1);
chdir('/home/_______/public_html/efforums/'); // path to MyBB
require './global.php';
?>
2007-02-25, 10:04 AM
try this
<?php
define("IN_MYBB", 1);
chdir("efforums"); // path to MyBB
require "global.php";
?>
2007-02-25, 07:38 PM
I have tried that and I still get this error:
Fatal error: Cannot redeclare class session in /home/emerald/public_html/efforums/inc/class_session.php on line 13
Fatal error: Cannot redeclare class session in /home/emerald/public_html/efforums/inc/class_session.php on line 13
2007-02-25, 08:59 PM
What does your file have other than those lines you have provided in your previous post?