miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
FAQ miniBB Support Forums / FAQ /  
 

difference between $main_url $pathToFiles

 
Author Rindert
Partaker
#1 | Posted: 22 Jan 2005 22:36 
Hello,

I've now installed v 2.0RC1g on my site and was wondering what is ecaxtly the difference between $main_url and $pathToFiles?
For testing miniBB I used version 2.0RC1f and then i could get everhing working.
But now i'm a little stuck.

When I change my $main_url to the real url (http://www.jewelgallery.nu/forum) the files for including can't be found :S (with $pathToFiles set to ./)
And when I set $main_url to just http://www.jewelgallery.nu and $pathToFiles to ./forum/ the forum can't find all images and stuff :S

Has someone got it working installing mini BB in a folder other then root?

Author Guran
Partaker
#2 | Posted: 23 Jan 2005 14:47 
I've just struggled with the exact problem, and I ended up modifying miniBB because I didn't agree with how those variables was used. And also because I want to integrate miniBB in existing sites.

Here's how I think they should be used, and how I rewrote miniBB:

$main_url - Main URL with trailing "/". Points to the sites main URL, ie "http://www.site.com/" where the sites main index.php is at. OR if I choose to use miniBB's index.php in a subdirecory: "http://www.site.com/forum/".

$pathToFiles - Relative path to files, "forum/". Points to where the files are, the root of the minBB-system. For the miniBB to be able to find its graphics and other files. The problem with the original miniBB are that graphics are pointed to by only the $main_url + "/img....". In my version its made up by $main_url + $pathToFiles + "img..." So if i use the full path in $main_url I leave this one blank.

I had to rewrite all links in minBB to, they are (usually, not all) made up with $pathToFiles + $indexphp. I had to make sure that all links are generated by: $main_url + $indexphp. I found that the code for miniBB had some inconsistencies in generating links, which got to the surface when wantnig to place miniBB in a subfolder and still having your own parcercode in the root.

By making these modifications I got a versatile miniBB, to place anywhere I choose. It took a couple of hours rewriting, but its worth the effort, miniBB is an excellent piece of work!!

If you choose to use your own index.php in the root you have to handle setcookie, or else you got problems logging in/out. Cookies must be sent before all other code, since they are sent with the headers. I recommend you use miniBB index.php, and use the $includeHeader/$includeFooter settings to point to your own code.

Author Rindert
Partaker
#3 | Posted: 23 Jan 2005 23:11 
I've now choosen to not install the forum in a ./forum/ folder.
I now placed all the files under the main url of the site and then it works good, using $includeHeader/$includeFooter settings. For the overview of site management it would be nice to have all forum files in one suberfolder.
Maybe in 2.0 Final, I will make the same modification as you did. or maybe it's wont be nessecary... ;)

Yeah is also sure like the way miniBB works and everithing, it is just the installing in a subfolder that needs some attention I think.

Author Team
8-)
#4 | Posted: 24 Jan 2005 10:41 
Everything should work fine either in a root directory or subdirectory. There is BIG difference between $main_url and $pathToFiles; in a time $main_url stores full URL path to your forums files incl. index (RTFM for more - no trailing slash else nothing will work!), $pathToFiles is a physical path to forum files. You are cycling on something with dotted slash ("./"), but in true, you should use FULL PATH like /usr/home/public_html/forum/ on Linux, to get it working. No need to rewrite something - we have tens of working examples, if you understand what's going on, everything must be set up easily.

Author Guran
Partaker
#5 | Posted: 24 Jan 2005 11:19 
In the manual you say:
$pathToFiles='./'; General path to your miniBB files. Must have SLASH at the end. You may use one copy of general miniBB core, but having just different index and options file, create many communities based on this core. This option also could solve some file including problems on systems like Novell. You can set the full path to the scripts, or leave default if the board is working normally. This option also is necessary if you include your own php header and footer (see below).

It can, and will be, misinterpreted. If you actually mean full file system path, then you must write so...
With this new information at hand I will make a new shot with the unmodified version.

Thanks for your answer, and may the force be with you...

Author Team
8-)
#6 | Posted: 24 Jan 2005 11:26 
Agree to you and have fixed that.

Author Guran
Partaker
#7 | Posted: 24 Jan 2005 11:33 
Thanks for the fast response!!
Did I mention that I think the miniBB is the best? Well, then I do it now. MiniBB IS the best!

Author end80
Partaker
#8 | Posted: 11 May 2011 06:15 
you should use FULL PATH like /usr/home/public_html/forum/ on Linux

Please excuse my ignorance.. My server is Unix, but I'm unsure on how to determine my FULL PATH...

I tried" /home/myname/public_html/forum, as that is the path my servers online file manager seems to indicate, but then everything quit working

How do I determine the correct full path?

Author Paul
Lead Developer 
#9 | Posted: 11 May 2011 08:54 
How do I determine the correct full path?

You may try to create a test.php file and put it under forums folder.

Contents of this file:

<?php
echo getcwd();
?>
it should display the full server path to your forums folder.

If you have shell privileges to your server, via shell, go to your forums folder, and when you are in, you may type:

# pwd
It should display the same result as the script above.

FAQ miniBB Support Forums / FAQ /
 difference between $main_url $pathToFiles
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑