MyBB Community Forums

Full Version: Integrating MyBB into your website. (Login Form)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
blubox Wrote:Ya. That is the code that I am using.
Ah i just thought because you said you are using miib code. Anyway i have tested this code several times, so i donno it should work.
Can you try with different cookie settings and then stick on the one that work on both the forums and this page. I can't really find any other reason.

Animal24 Wrote:@zaher1988

What do you mean? Do you want me to post all the code that is located in that file here?

Yes pls, attach the files in case they were big.
zaher1988 Wrote:Can you try with the last code i have supplied please?

Alright, I just copied and pasted the code from the header onto notepad and saved it as a txt file.

Thanks for looking into this by the way Smile

Edit: Also, just so you know, the :

<?php
chdir('forum'); // path to MyBB
define("IN_MYBB", 1);
require 'global.php';
?>

Is not in there right now. I removed it as it wasn't working on my site. So the header code attached is basically just my header code without that. With that at the top my site doesn't work.
You have many functions.. i should know their codes also..

can you tell me where you have get_attachment_icon() in your files?
I really don't know where I'd find that....

Hmm.....well if you want to know, I'm using WordPress as a homepage.

http://wordpress.org/

I'll try looking for that later on tonight, or if you want to look for it yourself just download the package. Smile

Thank you for your help Smile
Is this not working because the cookie is set to /forum/ and the file is not located there? Am I restricting the cookie too much?
blubox Wrote:Is this not working because the cookie is set to /forum/ and the file is not located there? Am I restricting the cookie too much?

As i have mentioned before.. try with different settings and see which suits both. (trial and error method)
MiNT fixed the error I was having, the cookie path was set to "/forum/" and it needed to be set to "/" so it could be accessed from the homepage.
How do i integrate "last posts" thing to my website? i tried the one at the other guide but this is not work.
MrDoom Wrote:MiNT fixed the error I was having, the cookie path was set to "/forum/" and it needed to be set to "/" so it could be accessed from the homepage.
This was annoying for me as well since my homepages have a lot of includes in them to keep the layout structure across the site...
It works! Yay! I am so happy! THank you so much zaher1988!

The only problem is that I get this error:
Fatal error: Cannot redeclare class session in /home/emerald/public_html/forums/inc/class_session.php on line 13

When I include() the file into my homepage.

I tried to just add the info to my homepage instead of including it, but then I get other errors saying the file cant connect to a database that my homepage uses..
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