View previous topic :: View next topic |
Author |
Message |
nessahead
Joined: 12 Mar 2002 Posts: 312 Location: Los Angeles, CA
|
Posted: Tue Jul 02, 2002 9:24 pm Post subject: How to have b2 in its own directory |
|
|
This is how I did it.
When installing, I unzipped everything into a subdir called 'b2' and set up my blog-calling page (index.php) in the root dir (http://mydomain.com).
Then, there were some errors. So, I (finally) wrote down what I did to fix them and there's not a whole lot you need to do. Thought I'd post them here for future reference.
b2config.php - Line 35
Change Code: | $pathserver = 'http://mydomain.com/'; | to Code: | $pathserver = 'http://mydomain.com/b2'; |
b2config.php - Line 172
Change Code: | $smilies_directory = 'http://mydomain.com/b2-img/smilies'; | to Code: | $smilies_directory = 'http://mydomain.com/b2/b2-img/smilies'; |
b2archives.php - Line 5
Change Code: | include_once("./b2config.php"); | to Code: | include_once("b2config.php"); |
b2comments.php - Line 49
Change Code: | <form action="b2comments.post.php" method="post"> | to Code: | <form action="b2/b2comments.post.php" method="post"> |
index.php (or whatever your blog thingy is) - Wherever the b2 loop is
Change Code: | <?php include ("b2comments.php"); ?> | to Code: | <?php include ("b2/b2comments.php"); ?> |
index.php (or wherever you want it) - Wherever you include archives
Change Code: | <?php include("b2archives.php") ?> | to Code: | <?php include("b2/b2archives.php") ?> |
I think that's it At least, it's working for me  _________________ raar! |
|
Back to top |
|
 |
bigmoose
Joined: 25 Jun 2002 Posts: 5
|
Posted: Fri Oct 04, 2002 4:01 pm Post subject: |
|
|
thanks!
that seems to have worked for me! |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 1075 Location: Oregon
|
Posted: Fri Oct 04, 2002 6:30 pm Post subject: |
|
|
One simple way to do the same thing would be to "embed" the main b2 file, index.php, in an inline frame, although I haven't tried it myself. _________________ Michael P. |
|
Back to top |
|
 |
Fiona
Joined: 05 Oct 2002 Posts: 7
|
Posted: Sun Oct 06, 2002 4:57 pm Post subject: |
|
|
Didn't work for me... Trying to fix it up by going through each and every page. |
|
Back to top |
|
 |
Jigzaw
Joined: 26 Apr 2002 Posts: 21 Location: In Bill Gates' closet, waiting fer him to fall asleep... *bwahahaha*
|
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 1075 Location: Oregon
|
Posted: Wed Nov 13, 2002 10:19 pm Post subject: |
|
|
You have to change the value for $pathserver as well as the variable for smilies in b2config.php. Other than those, I don't think you have to change anything else. _________________ Michael P. |
|
Back to top |
|
 |
Feral Dragon
Joined: 06 Nov 2002 Posts: 13
|
Posted: Sat Nov 23, 2002 12:21 am Post subject: |
|
|
Hey Nessa,
I installed my b2 today and tried what you said and it didn't work. Will I have any problems if I just make the index page in the root directory auto-redirect to the index page in the b2's folder? I will have to also put any pages in that folder that will have the b2 code in it as well right? For example, if I have a different layout for a blog page I would call it blog.php and have to put it in the b2 folder.
Thanks for your help!  |
|
Back to top |
|
 |
Joshua Clinard
Joined: 02 Dec 2002 Posts: 77
|
Posted: Sat Dec 21, 2002 12:36 am Post subject: |
|
|
I have done all of the above, and so far everything works, except for the archives.php file.
Fatal error: Failed opening required '.b2config.php' (include_path='') in /home/public_html/news/b2archives.php on line 5
How to fix? |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 1075 Location: Oregon
|
Posted: Sat Dec 21, 2002 10:06 pm Post subject: |
|
|
If you look at that line 5, it will probably have something like ". . . include . . ." Insert the directory name that b2 is stored in front of the inclusion. _________________ Michael P. |
|
Back to top |
|
 |
GthicFury
Joined: 13 Dec 2002 Posts: 13 Location: Miami, FL
|
Posted: Mon Dec 23, 2002 5:44 am Post subject: |
|
|
Cyberian75 wrote: | One simple way to do the same thing would be to "embed" the main b2 file, index.php, in an inline frame, although I haven't tried it myself. |
No no no! Do try to keep frames to an absolute minimal, only use them if you absolutely must. They're bad form and have many draw backs. _________________ -= Eric |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 1075 Location: Oregon
|
Posted: Mon Dec 23, 2002 6:35 pm Post subject: |
|
|
Uhh, to your standards, Eric. Some people love i/frames and some don't. It's a matter of preferences. _________________ Michael P. |
|
Back to top |
|
 |
Joshua Clinard
Joined: 02 Dec 2002 Posts: 77
|
Posted: Mon Dec 30, 2002 8:56 pm Post subject: |
|
|
More problems. Now there is an error on line 6.
Fatal error: Failed opening required './b2-includenews/b2functions.php' (include_path='') in /home/joshuasp/public_html/news/b2archives.php on line 6.
I don't think these instructions are at all compatible with the newest version of b2. Would someone mind installing a fresh b2, latest version, and re-working this hack to be compatible with it? |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 1075 Location: Oregon
|
Posted: Mon Dec 30, 2002 9:02 pm Post subject: |
|
|
"/b2-includenews/" should be "b2-include/news/". Check your path. _________________ Michael P. |
|
Back to top |
|
 |
Joshua Clinard
Joined: 02 Dec 2002 Posts: 77
|
Posted: Tue Dec 31, 2002 7:42 pm Post subject: |
|
|
There aren't any files with that path in it. That is most likely a function of the program, because I didn't modify that line. |
|
Back to top |
|
 |
Cyberian75
Joined: 26 Sep 2002 Posts: 1075 Location: Oregon
|
Posted: Tue Dec 31, 2002 7:50 pm Post subject: |
|
|
If you read the error carefully, it says the error occurred at line 6 in b2archives.php file.
Copy line 1 to about 10 and paste them here, so we can see what's wrong. _________________ Michael P. |
|
Back to top |
|
 |
|