Advertisement:

Author Topic: Use your forum in a different directory.  (Read 24229 times)

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Use your forum in a different directory.
« on: September 05, 2004, 07:31:34 PM »
I thought this up the other day and now I realized more may find it useful, so here it is.

I wanted to have a forum in the webroot dir but not the files. The thing is there's other stuff, files and folders, there that I don't want mixed with the SMF ones, I wanted those in their own dir. So I fixed it in a way that the SMF files are in their own dir and the forum is shown in the webroot one. You can use this in any dir you want.

It's very simple to do this. Just install your SMF normally in a dir for it and after that's done, make a copy index.php and Settings.php. Open Settings.php with you text editor of choice and point $boardurl to the dir where you want the forum. Save the changes and put these copies in the new dir.

Let me know if you found this useful and how it went for you, if everything's fine or you found a flaw. (~_^)
« Last Edit: September 06, 2004, 01:31:49 AM by Anguz »
Cristián Lávaque http://cristianlavaque.com

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Use your forum in a different directory.
« Reply #1 on: September 05, 2004, 08:12:44 PM »
Make sure $boarddir includes, ie. smf/, but $boardurl does not.

-[Unknown]

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Re: Use your forum in a different directory.
« Reply #2 on: September 05, 2004, 09:00:54 PM »
Make sure $boarddir includes, ie. smf/, but $boardurl does not.

-[Unknown]

Oh, SMF's dir has to be there in $boarddir? Then they don't need to touch it cause that'd be what it is after the installation. The funny thing is that I did remove it and the test seems to be working fine. What URL could I try to see if it breaks whithout it?
« Last Edit: September 05, 2004, 09:03:11 PM by Anguz »
Cristián Lávaque http://cristianlavaque.com

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Use your forum in a different directory.
« Reply #3 on: September 05, 2004, 09:16:23 PM »
Well, the agreement for example is found with the $boarddir so it should point to where the agreement is, etc.

-[Unknown]

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Re: Use your forum in a different directory.
« Reply #4 on: September 06, 2004, 01:26:33 AM »
Gotcha, fixed. Gonna update the first post.
Cristián Lávaque http://cristianlavaque.com

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Re: Use your forum in a different directory.
« Reply #5 on: October 31, 2004, 02:39:46 AM »
Someone asked me about something related to this, so I decided to expand my explanation of what you can do.

What I said so far, is that you can have SMF in one dir and actually use it in another one. What I'll say now is that you can do this from several places.

In other words, you can have your SMF files in one dir and use them from several other places, but not just the same forum, also different ones powered by the same files.

The difference would be in content, so what you need is a new set of tables in your database for each extra forum. You can create these using your install.php file. Use different databases or the same one, with different table prefixes in the latter case.

Since the databases are different, you can, for example, have different default themes for each, everything is stored separately from the other forums, even if they run off the same files.

Another advantage is that you only need update one set of files, like when you make modifications, and they'll show in every forum running off it.

You could exploit this even further, sharing some tables in your database between the forums, like explained in this topic by Spaceman-Spiff. I wrote a mod that could help you with it too: Share DB Tables.

I hope you find this information helpful. :)
« Last Edit: October 31, 2004, 02:46:26 AM by Anguz »
Cristián Lávaque http://cristianlavaque.com

Offline TLM

  • Full Member
  • ***
  • Posts: 420
  • Gender: Male
    • MindlessTux
Re: Use your forum in a different directory.
« Reply #6 on: March 09, 2005, 03:23:59 PM »
Just out of curiosity, does this work cross-subdomains, and could it be possible to set a subdomain to a certain theme on the forum?  If not on the latter, no big deal.

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Re: Use your forum in a different directory.
« Reply #7 on: March 09, 2005, 05:00:08 PM »
Just out of curiosity, does this work cross-subdomains, and could it be possible to set a subdomain to a certain theme on the forum? If not on the latter, no big deal.

I haven't done it, so I don't know, but you can give it a try and see if it works. :)
Cristián Lávaque http://cristianlavaque.com

Offline TLM

  • Full Member
  • ***
  • Posts: 420
  • Gender: Male
    • MindlessTux
Re: Use your forum in a different directory.
« Reply #8 on: March 09, 2005, 08:32:49 PM »
I haven't done it, so I don't know, but you can give it a try and see if it works. :)

It appears so.
http://forums.teamplayfirst.com/ - Source (.../public_html/forums/)
http://www.teamplayfirst.com/forum/ - Copy (.../public_html/forum/)

It seems I can logout and login, and go thru the forum perfectly fine.

Guess next thing would be to tackle getting diffrent themes to show based on the url/subdomain.
*edit*Just thought, what about maintaince mode, might not work but really, how often does a forum go into that.*/edit*

*edit 2*
Force a theme by editing line 136 with the theme ID #,
Code: [Select]
// Load the current theme.  (note that ?theme=1 will also work, may be used for guest theming.)
loadTheme(1);
*/edit 2*
« Last Edit: March 15, 2005, 04:51:23 PM by TLM »

Offline Anguz

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,430
  • Gender: Male
    • cristianlavaque.com
Re: Use your forum in a different directory.
« Reply #9 on: March 10, 2005, 12:44:00 AM »
Cool. :)
Cristián Lávaque http://cristianlavaque.com

Offline Quinn

  • Semi-Newbie
  • *
  • Posts: 50
    • BStreet"s Net
Re: Use your forum in a different directory.
« Reply #10 on: September 23, 2005, 12:37:42 AM »
I haven't done it, so I don't know, but you can give it a try and see if it works. :)

It appears so.
http://forums.teamplayfirst.com/ - Source (.../public_html/forums/)
http://www.teamplayfirst.com/forum/ - Copy (.../public_html/forum/)

It seems I can logout and login, and go thru the forum perfectly fine.

Guess next thing would be to tackle getting diffrent themes to show based on the url/subdomain.
*edit*Just thought, what about maintaince mode, might not work but really, how often does a forum go into that.*/edit*

*edit 2*
Force a theme by editing line 136 with the theme ID #,
Code: [Select]
// Load the current theme.  (note that ?theme=1 will also work, may be used for guest theming.)
loadTheme(1);
*/edit 2*

This is a great idea! It works well unless you have ssi.php includes. If you do the ssi.php pathings need to be abosulte paths not relative (ie: coppermine display_randompics) on index.php

www.bs-raven.net/html
forums.bs-raven.net/backlot

This does add another concept too while using the
Code: [Select]
loadTheme(1); and setting to a non default theme for visitors
« Last Edit: September 23, 2005, 12:44:16 AM by Quinn »

Offline Gwydion Frost

  • Jr. Member
  • **
  • Posts: 172
  • Gender: Male
  • Third World Network
    • Third World Network
Re: Use your forum in a different directory.
« Reply #11 on: November 07, 2005, 03:55:47 AM »
OK, here's a different variation on this idea I would like to implement on my boards.

Creating a plethora of RolePlaying Game Boards, with many different Genres represented.

Would love to have the ability to have the member register on the MAIN site with an "Out-Of-Character" identity as a MASTER PROFILE. Ex: Bob from Ohio.

Now, when the member would click on the link to the subdomains (each separate board for each game), they would be prompted to create a CHARACTER PROFILE specific to that game.

In the Fantasy game, "Bob from Ohio" would name his character "Elohas", the rest of the CHARACTER profile indicating that he's an Elf from Arcansbane.

Bob decides that he wants to play the superhero RPG...and clicking over to THAT board, Bob is prompted to create his CHARACTER PROFILE for THAT game.

Each Character Profile would post as the Character on the board it is designated to post on, but ADMINISTRATIVELY, I would be able to tell that Bob from Ohio was Elohas, Texas Pete, and SuperVulcan, etc etc.

Because of the size of each of these boards (each templated to it's own theme), and the amount of players that will be jumping on to play, you can see my hesitation to place them ALL on one single database...

The server would go nuts with the amount of queries.

The side effect would be to slow my site down to a crawl, even just to refresh the page.

Is there a way to SEPARATE the member data (along with all the usergroup permissions, etc) into a separate DB, and still have all the separate boards access the info?

Mind you, I have NOT installed SMF yet, as I am inquiring on how I can get it to do the things I want it to beforehand?

I haven't even approached the next half of this question...

ROUND #2: Is it possible to make the character profiles like a check list...pick a race, pick a region, etc etc, and have usergroups automatically assigned by doing so...(purpose for this? The Compendium is designed to be USER specific...an Elf from Country A has certain beliefs that an Elf from Country B doesn't...due to different cultures, etc...and therefore, the Compendium will be designed to show the player what his character would believe, versus revealing the whole TRUTH (which is only shown for the character's own species).

Make sense?