New custom pages.

Discussion forum for MOD Writers regarding MOD Development.
AussieFishKeeping
Registered User
Posts: 60
Joined: Tue Apr 12, 2011 6:47 am

Re: New custom pages.

Post by AussieFishKeeping »

Brf wrote:As I said:
Brf wrote:Your root_path needs to be the relative path to your phpbb's root folder.
You need to adjust the root_path variable, so it points to your phpBB's root folder. If you told us what folder your phpBB is in, and what folder your custom page is in, we could tell you what to use.
Well my forum is in,
home/afk/public_html

My the php file is in this folder,
home/afk/public_html/profiles

hope this helps

User avatar
Lumpy Burgertushie
Registered User
Posts: 67227
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Moving .php files into folders?

Post by Lumpy Burgertushie »

AusraliaFfishKeeping wrote:Ok so i was playing around with my file directory and copied my whole root folders + .php an placed it in the folder i want and it worked. What is in the root that makes it work?
have no idea what that means.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?

manic2
Registered User
Posts: 435
Joined: Thu Jun 12, 2008 9:16 pm

Re: Moving .php files into folders?

Post by manic2 »

AusraliaFfishKeeping wrote:Ok so i was playing around with my file directory and copied my whole root folders + .php an placed it in the folder i want and it worked. What is in the root that makes it work?
The problem is that as your new .php file is in a subdirectory it is not providing the correct path to ./common.php. By putting all the standard files into your subdirectory as well then your new .php file can find the duplicates & this is why it works.

You are however making a big mistake in copying the files over. You are duplicating files & updates will become a nightmare & rather than adopt that approach you would be better off putting your new .php files (yes all 300 of them!) in your root directory. I believe that you will also experience problems with your cache as you effectively have two folders.

Alternatively why not try the solution I've proposed in your other thread?
manic

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51081
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Moving .php files into folders?

Post by stevemaury »

I am going to lock this before the dual topics get any more confusing. I can move this to MOD Writer's discussion but I cannot then merge it. I will ask a Moderator to do this.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

marian0810
Former Team Member
Posts: 3011
Joined: Mon May 21, 2007 9:17 pm
Location: The Netherlands
Name: Marian
Contact:

Re: New custom pages.

Post by marian0810 »

Topics merged.
You and me, time and space. You watch us run!

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51931
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: New custom pages.

Post by Brf »

AusraliaFfishKeeping wrote:Well my forum is in,
home/afk/public_html

My the php file is in this folder,
home/afk/public_html/profiles
This is the correct root_path then:
manic2 wrote: In your .php file try replacing:-

Code: Select all

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
with:-

Code: Select all

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';

AussieFishKeeping
Registered User
Posts: 60
Joined: Tue Apr 12, 2011 6:47 am

Re: New custom pages.

Post by AussieFishKeeping »

Brf wrote:
AusraliaFfishKeeping wrote:Well my forum is in,
home/afk/public_html

My the php file is in this folder,
home/afk/public_html/profiles
This is the correct root_path then:
manic2 wrote: In your .php file try replacing:-

Code: Select all

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
with:-

Code: Select all

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';

Thank you, Thank you, Thank you so much. It worked :) case closed!!!!!

Locked

Return to “[3.0.x] MOD Writers Discussion”