MyBB Community Forums

Full Version: MyBB Directory
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

Assuming my domain is: example.com

MyBB is installed in www.example.com/main

I created a custom page which is sitting in www.example.com/loggedin/index.php - it loads fine but doesn't show me being logged in.

If I go to www.example.com/main it will show me logged in.


<?php 

define('IN_MYBB', 1);
require_once '../global.php';

add_breadcrumb("Logged In", "index.php"); 

eval("\$html = \"".$templates->get("member_loggedin")."\";"); 

output_page($html);

?>

My cookies are set as the following:

Domain: .example.com
Cookie Path: /main/

Please can someone tell me where I'm going wrong?
Bump if I may. Smile

Thank you in advance.
Welcome to MyBB Community.

for above requirement,
can you try using cookie path as /
(you may have to clear browser cookies & cache)

if you use a subdomain then below should work without any issue
Quote:cookie domain subdomain.domain.ext [no dot prefix]
cookie path /

Also it might be better to not use www for the board url
(redirect www URLs to non-www)
(2020-08-25, 06:37 AM).m. Wrote: [ -> ]Welcome to MyBB Community.

for above requirement,
can you try using cookie path as /
(you may have to clear browser cookies & cache)

if you use a subdomain then below should work without any issue
Quote:cookie domain subdomain.domain.ext [no dot prefix]
cookie path /

Also it might be better to not use www for the board url
(redirect www URLs to non-www)

Thank you for the welcome. Sadly I lost my old email account and cannot use my old MyBB community username as I can't access my old email.

Also thanks for resolving this issue, it now works. I'm very happy.

*kudos*