News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Integrating forum into site - Question 1

Started by Vuron00, December 20, 2004, 10:27:51 AM

Previous topic - Next topic

Vuron00

I've taken over administration for a site and have upgraded to SMF from YABBSE and am in the process of redesigning the entire site.  I read the great link at http://www.simplemachines.org/community/index.php?topic=19638.0

I am doing the development on an XP machines running IIS, PHP, and MySQL.  The directory structure to my theme is inetpub > wwwroot > mytestweb > smf > themes > mytheme.

I added a simple 'include' for my header without removing any of the other header info in the index template and everything worked fine.  I only removed the 2 lines with the forum name and SMFLOGO.

When I copied the template, header logo, and other graphics from my XP machine to the mytheme directory on the *nix server running apache, the header does not show.

What is the default path that is used if I don't use any path information in the include?

Oldiesmann

If you don't include any path info, it tries to include the file from the current directory.
Michael Eshom
Christian Metal Fans

Vuron00

That is what I thought... The current directory being my new theme directory, correct?

Jerry

I think the current directory would be the directory the file is being loaded in. . . like the file could be in /x/y/z but being loaded in /x so if it was loaded in x and only had a include with the file name the file would need to be in /x. .  not quite sure though.


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Oldiesmann

It shouldn't matter what directory the script is loaded in. It will always look for the file in the same directory as the script that is being told to include that file...
Michael Eshom
Christian Metal Fans

Vuron00

I might not have explained completely what is happening...

It looks to me like the 'include' is not working, at all, after I copied the template from my XP to the *nix machine.

While I was testing, I had to play with the path to the graphics.  When the path wasn't right,  I got the standard red X where the graphics are supposed to be, but you could still see the space reserved for the header.  Now, it's like the 'include' is being ignored because there is nothing at the top of the page, at all.  This is why I thought the path may be wrong to the actual .php that I'm trying to include.

You can view what I'm talking about at hxxp:www.mdbass.com/smf [nonactive]

[Unknown]

Include will use the forum's directory in most cases.  Don't depend on it, it isn't reliable.  Instead, use:

include_once($settings['actual_theme_dir'] . '/filename.php');

If you want a file in the theme's directory.

-[Unknown]

Vuron00


Advertisement: