1
pmcnamara
Two URL's, Two Themes, One Database... Is it possible ?
  • 2005/11/13 13:14

  • pmcnamara

  • Friend of XOOPS

  • Posts: 147

  • Since: 2004/12/3


Alright Folks.. i think this is a new question, at least I have never seen it asked before.

I operate one website, http://www.lansingsportsrage.com

I own another domain, http://www.detroitsportsrage.com

I want to combine them in a fashion where when a person types http://www.detroitsportsrage.com in as the URL, the DetroitSportsRage.com theme opens up and a word filter activates converting all the text which says "LansingSportsRage" to "DetroitSportsRage".

I want them to share the same database.. so all forum posts, articles, userlist are together.

Is that possible ????

2
m0nty
Re: Two URLs, Two Themes, One Database... Is it possible ?
  • 2005/11/13 13:18

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


try searching for multi-site hack or multisites

3
pmcnamara
Re: Two URLs, Two Themes, One Database... Is it possible ?
  • 2005/11/13 13:42

  • pmcnamara

  • Friend of XOOPS

  • Posts: 147

  • Since: 2004/12/3


Monty.. I read through all the FAQ's and Threads on Multi-Site.

From what I can gather... since I am running 2.0.13, I can not use the Multi-Sites Module (which by the way.. if you go to the module repository, click on M, it doesn't show up).

The other information I see.. seems to be geared towards one XOOPS installation, 2+ databases..

I am hoping for 1 XOOPS installation, 1 database, and a theme determined by which URL the person enters the site from.

As I read on the banned word filter, I'm quite sure now this won't work, as the change is a permenant change to the database made on submission. I don't want it changed in the database, I only want it switched on display.

4
JMorris
Re: Two URLs, Two Themes, One Database... Is it possible ?
  • 2005/11/13 14:24

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Quote:

pmcnamara wrote:
Monty.. I read through all the FAQ's and Threads on Multi-Site.

From what I can gather... since I am running 2.0.13, I can not use the Multi-Sites Module (which by the way.. if you go to the module repository, click on M, it doesn't show up).

The other information I see.. seems to be geared towards one XOOPS installation, 2+ databases..

I am hoping for 1 XOOPS installation, 1 database, and a theme determined by which URL the person enters the site from.

As I read on the banned word filter, I'm quite sure now this won't work, as the change is a permenant change to the database made on submission. I don't want it changed in the database, I only want it switched on display.


The reason the Multi-site hack doesn't show up in the module repository is because it is a "hack". Mind you, a very good hack, but it's still a hack.

The last time I tested the Multi-sites hack, it did exactly what it is you're wanting to do. When setting up your sub-site, you could choose which database tables to share with the main site. You could choose to only share user authentication all the way up to sharing everything. This would definately give you the ability to share everything *but* the theme config.

As m0nty stated. Do a search for multi-sites and try it out. It's an awesome hack.

Best Regards,

James
Insanity can be defined as "doing the same thing over and over and expecting different results."

Stupidity is not a crime. Therefore, you are free to go.

5
dickinsd
Re: Two URL's, Two Themes, One Database... Is it possible ?
  • 2005/11/13 15:59

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


Quote:

pmcnamara wrote:

I want to combine them in a fashion where when a person types http://www.detroitsportsrage.com in as the URL, the DetroitSportsRage.com theme opens up and a word filter activates converting all the text which says "LansingSportsRage" to "DetroitSportsRage".



Sorry can't help with the multi site hack, but once you have it working, you could maybe call a php file from your theme at detroitsportsrange.com OR maybe add code to the theme.

Check out this link:

preg_replace

This can change words 'dynamically' as the page loads.

Something along the lines of:

$string 'LansingSportsRage';
$replacement 'DetroitSportsRage';
echo 
preg_replace($replacement$string);
?>


Or


$search 
= array ('LansingSportsRage',
                 
'LansingSportsRage.com');                    

$replace = array ('DetroitSportsRage',
                  
'DetroitSportsRage.com');

$text preg_replace($search$replace);
?>


Code is not complete, check out the link and do a google search on preg_replace, this might be one option available to you.

Dave

6
pmcnamara
Re: Two URL's, Two Themes, One Database... Is it possible ?
  • 2005/11/13 19:13

  • pmcnamara

  • Friend of XOOPS

  • Posts: 147

  • Since: 2004/12/3


That is an excellent idea.. I will try to use that.

I have searched for the hacks and can't find them.

7
TottoBG
Re: Two URL's, Two Themes, One Database... Is it possible ?
  • 2005/11/13 20:08

  • TottoBG

  • Not too shy to talk

  • Posts: 111

  • Since: 2005/8/18


Here's the thread Mith opened for his multi-site hack:
https://xoops.org/modules/newbb/viewtopic.php?topic_id=42937&forum=14
And there's also download link you'll find there. And guess what - the place you find it is in the 'XOOPS Core Hacks' forum

8
pmcnamara
Re: Two URL's, Two Themes, One Database... Is it possible ?
  • 2005/11/13 23:34

  • pmcnamara

  • Friend of XOOPS

  • Posts: 147

  • Since: 2004/12/3


thank you for showing me the thread for XOOPS 2.2.3, it was the same link the other gentlemen provided.

However, as I stated in my first post, I'm running 2.0.13.1 and the comments in both threads would seem to indicate that multi-stie doesn't work with that version.

Is that correct or has it been fixed ??

9
dickinsd
Re: Two URL's, Two Themes, One Database... Is it possible ?
  • 2005/11/14 0:18

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


Out of interest, have you looked at this thread:

Multisite hack 2092

I have not read the entire thread, but it looks like this hack was designed for XOOPS 2.0.9.2, like I say I have not read the whole thread so I don't know if it will work with XOOPS 2.0.13.2, however XOOPS 2.0.9.2 is closer to 2.0.13.2 than 2.2.3 is. If that makes sense......

I notice that your original post says you have read all the info you could find on multisite hacking, so you may well have stumbled across this thread already.

Out of interest, would it not be easier for you to go for a 2.2.3 installation?

Does anyone know why XOOPS do not showcase their latest relase on this site?
(I am right in thinking this is still a XOOPS 2.0.x based site right?)

Dave

10
pmcnamara
Re: Two URL's, Two Themes, One Database... Is it possible ?
  • 2005/11/14 8:18

  • pmcnamara

  • Friend of XOOPS

  • Posts: 147

  • Since: 2004/12/3


Dave..

Most of the modules I use aren't 2.2 compatiable.. that's why I don't upgrade.

P.

Login

Who's Online

353 user(s) are online (283 user(s) are browsing Support Forums)


Members: 0


Guests: 353


more...

Donat-O-Meter

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

Latest GitHub Commits