11
banned
Re: Multi-sites - help me test it properly?
  • 2005/3/5 17:54

  • banned

  • Not too shy to talk

  • Posts: 159

  • Since: 2004/5/16


Quote:
I have this hack - based on bd_csmc's work - working fine on a couple of sites, but want to both share it with you and also make it as easy to use as possible.


1. Are the bd_csmc's works gone away like the owner?
2. Will this hack eventually be supported on dev.xoops.org? I mean tricks and task for the future versions of XOOPS

This is a good one, keep up the good work!

12
Mithrandir
Re: Multi-sites - help me test it properly?

1. bd_csmc has done most of the work, I just added an interface and a more dynamic approach (you can set shared tables per site and not just for all sites and all the work is done through the administration interface and configuring the webserver)

2. No. Future versions of XOOPS will have a better way of doing this. I needed this now and used bd_csmc's work to accomplish it until we get it worked out for real.

13
banned
Re: Multi-sites - help me test it properly?
  • 2005/3/5 18:40

  • banned

  • Not too shy to talk

  • Posts: 159

  • Since: 2004/5/16


Quote:
2. No. Future versions of XOOPS will have a better way of doing this. I needed this now and used bd_csmc's work to accomplish it until we get it worked out for real.


You mean in v2.1/2.2? If yes, can you give a dateline for a beta release?
.. I'm little interested in this 'cause I have to set up an 'guild hosting' service in the next months..

14
Mithrandir
Re: Multi-sites - help me test it properly?

It won't be long before the first developer version (no, I cannot say when as it depends on Skalpa's availability) but it'll still take a while before we have it in production quality.

15
Speed
Re: Multi-sites - help me test it properly?
  • 2005/3/6 4:06

  • Speed

  • Quite a regular

  • Posts: 310

  • Since: 2004/5/18


It must be Christmas week. Another modification that I needed that appeared as if on cue. I'll be playing with this over the next week or three and will let you know my experiences. Seems my main site just split into two projects so this will allow them to function as seperate entities with common access to the things the two projects have in common.

I'll report back about mid-month (or sooner if life permits).

16
tom
Re: Multi-sites - help me test it properly?
  • 2005/3/10 2:26

  • tom

  • Friend of XOOPS

  • Posts: 1359

  • Since: 2002/9/21


Hey, if this hack is used, would it be easy enough when newer versions of XOOPS with a multi site feature, to upgrade as more than one site may already be joined?

17
m0nty
Re: Multi-sites - help me test it properly?
  • 2005/3/10 4:08

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


For those that want to use the sub-directory method and don't have access to httpd.conf on their servers (like me who is on a hosted server)

you can't use Alias in .htaccess files..

but you can still do it using .htaccess by following these instructions..

follow Miths instructions for installation.. then once you have created the sub directory.. place a .htaccess file in the sub directory with the following

RewriteEngine on
RewriteBase /<sub-dir>/
RewriteRule ^(.*)$http://www.domain.com/$1

replace <sub-dir> with the folder name and your domain for your domain name (note. in my example i presume the main installation is in the root directory and each seperate site is in a sub directory)

so for my site i have the following:

RewriteEngine on
RewriteBase /wwcn_uk/
RewriteRule ^(.*)$http://www.my-domain.com/$1

hope this helps :)


@mithrandir, this is a great hack :) but i have 1 issue at the moment regarding the date function..

as you know, this is configured in global.php. but the reason i need multisite is for doing international versions, i want to split my site into uk content, us content and canadian content with certain modules shared.. but with the UK the date format is dd/mm/yy and usa/canada use format mm/dd/yy is there anyway i can set this independantly on each site?

18
Mithrandir
Re: Multi-sites - help me test it properly?

Quote:

tom wrote:
Hey, if this hack is used, would it be easy enough when newer versions of XOOPS with a multi site feature, to upgrade as more than one site may already be joined?

When upgrading, you should take extra care as this is NOT a core feature and will not become it ... let me rephrase that: We WILL have a multisite feature in the future, but it will not be as simple as this one.

Therefore, when upgrading XOOPS, you should take care not to overwrite hacked files - so for instance when we release a new patch with a new uploader class, you can just pop it in the class dir and it is updated on all sites. However if we were to change the files in the class/database dir, it will take a little merging of changes and the hack.

Quote:

m0nty wrote:
but i have 1 issue at the moment regarding the date function..

as you know, this is configured in global.php. but the reason i need multisite is for doing international versions, i want to split my site into uk content, us content and canadian content with certain modules shared.

Thank you for your .htaccess rules for how to use on subdomains. Really appreciated, although I don't follow it completely (am a .htaccess n00b) if you say it's working, I trust you

Now, to your question: Unless you have a way to distinguish between the languages, it is very hard. On the other hand, you could do this in global.php:
if (XOOPS_SITE_ID == 1) { //UK site, replace with site ID for this site
    
define(_DATESTRING"f-o-r-ma-t");
    
// etc
}
else {
   
define(_DATESTRING"format");
   
// etc.
}

19
m0nty
Re: Multi-sites - help me test it properly?
  • 2005/3/10 8:51

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


thanks mith :) i'll give that a try as soon as my site works lol.. damn server is p**sing me off.. it either works, but ftp don't so can't update.. or ftp works great but then the MySQL server ges offline.. i wouldn't recommend this host to nobody.. i only use it because i was given the account for testing purposes..

*edit*

ok the datestring works but i had to do it like >

if (XOOPS_SITE_ID == 1) {
define("_DATESTRING", "j/n/Y H:i");
define("_MEDIUMDATESTRING","j/n/Y H:i");
define("_SHORTDATESTRING","j/n/Y");
}
else {
define("_DATESTRING", "n/j/Y H:i");
define("_MEDIUMDATESTRING","n/j/Y H:i");
define("_SHORTDATESTRING","n/j/Y");
}

with the double quotes round _DATESTRING

now i have to figure out y i have problems with the url

when i goto the url domain.com/wwcn/wwcn_uk i get a 404 page not found

but if i goto domain.com/wwcn/wwcn_uk/ then it works ok using the rewrite.. i can't figure out y i have to add the / to the end of the url

altho the error message looks strange (could be the cause)

ie.

The requested URL /~monty/wwcn//home2/monty/public_html/wwcn/wwcn_uk was not found on this server

notice the // then it starts at the full path so i kinda figure without the / at the end then for some reason it's adding the absolute path to the end of the virtual path.. strange :S

20
javier
Re: Multi-sites - help me test it properly?
  • 2005/3/10 17:37

  • javier

  • Not too shy to talk

  • Posts: 184

  • Since: 2002/8/6 1


Mithrandir, master of xoops.

I have the idea to setup a little network of 5 sites since some months ago,
my first idea was install 5 independent sites in 5 diferents db´s.
But its a little hard and too much work set up 5 diferents sites, with 5 diferents custom templates, themes,hacks, modules ,etc since the 5 sites will have almost identical contents.

Now i saw this post and im in a big trouble, because this hack would solve my problem,
I only want share the user database between all the sites,
and i want every site has his unique donwloads categorys and contents, his unique forums, and his uniques gallerys.

But im scare about future updates,
Let me explain better,

I like have XOOPS always up to date with the latest XOOPS versions,
Since i installed koudanshi x-phpbb in one of my sites, the update of these site become a real nightmare, and return to newbb is really hard (no exist a converter yet)

Im scare about have the same problem in a network using this multisite-hack.

Them my question is:

you recomended me make a little network with this hack? the future updates to XOOPS core will be a big problem?

You planned release new hacked files when a new XOOPS core update touch any hacked file or we (the users/visitors) will have to hack every new file?


thanks in advance for your reply,
have a nice day
Javier

Login

Who's Online

151 user(s) are online (95 user(s) are browsing Support Forums)


Members: 0


Guests: 151


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits