News:

Wondering if this will always be free?  See why free is better.

Main Menu

Two domains, two themes, one content

Started by Yojin_Spajin, September 18, 2014, 02:38:08 PM

Previous topic - Next topic

Yojin_Spajin

Hello there,
I have a difficult problem to expose you and I hope someone with more experience on SMF than me can help.

I have two domains. I would the same forum contents on each : same messages, same members list, etc, acting like they were the same forum (that they must be).

But I also would that change some elements independent of the content. In fact : each of these two domains must have its own theme.

So, the forum, consulted on domainA.com [nofollow] should have the same content that the forum consulted on domainB.com [nofollow], but not the same design.

I'm asking the best way to do that. I've already try some bad iframe tricks, which does not satisfy me. So I see two other solutions but I need your advice.

1. Can I install two SMF linked to the same data base, is this have a chance of working ? I'm not the owner of the forum, so I want to avoid crushing all the data base.
OR
2. What do you think about doing it with the same DNS redirection and with php conditions directly on the template using $_SERVER['SERVER_NAME'] ?
OR
3. Maybe you have a better or different solution.

Many thanks for your help.

Arantor

Bad idea. Google will penalise at least one of them for duplicate content.

mashby

Always be a little kinder than necessary.
- James M. Barrie

Arantor

Then there would be no point in two domains...

Burke ♞ Knight

If you are not the owner of the forum, then why are you undertaking this course of action?

Why would there need to be 2 domains, both with different themes?

Why not just have the redirect, and theme selector?

To me, the first question is more vital, as I sometimes see multi-domain use on sites as a way to basically take over someone's site, or to go Phishing for info that belongs to someone else's website.

Yojin_Spajin

Hi, I understand your doubts, but if I wanted to make phishing, I would not want a different style, it does not make sense. Then, I don't own the forum contents as I'm just member of the technical staff (but I have full access on it). Please be assured of my good faith !

The situation is quite complicated and I'm not sure it will bring something ; but I will try, if you want. Excuse me if the explanation sound a bit strange, I'm not a english native speaker (about what you're already aware, I guess :)).

The original forum is a large-scaled RPG forum about erotic stuff, with evocative title, domain, and design. This theme brings us a really good affluence of users, and we are really satisfied about it. But on the other side, a significant portion of the community write story which are not focused on eroticism. We don't want to split the content, because each of these trends works well for a long time. But many people ask for a more safe for work design and domain, for obvious reasons. That's why.

Theme selector sounds to be an awesome idea, but make sense only if each domain can have it own by default theme. Do you think is it possible ?

Thank you all.

Burke ♞ Knight

Like stated above, there are issues, like for one, a forum can only have one domain.
Multi-domain support is not possible, the way it is set up.
Not to mention, that it really is not necessary to use a 2nd domain for just another look.

You would be better off, setting up another theme, and letting the members choose which they would like to use.
If they do not like the one you have now, then they can switch to the other theme.

It would be less hassle for them, than to force them to have to deal with a different domain, which means having to refill the username and password in their browsers, re-bookmarking the site under the new domain, etc.

Less complicated is better. :)

Yojin_Spajin

Hello, thank you. Domain is a real problem (maybe THE real problem), cause the forum's domain is evocative and not SFW. Not the kind of thing you want in your internet history on your job, mh, see ?

If this is not possible natively, I will try to tinker myself. I always take clues about how I could do that if someone have ideas. I will report here if I find a nice way eventually.

Thank again.

Burke ♞ Knight

Well, have you thought of changing the forum to the new domain, then redirecting the old domain to the new one?

BxK

#9
Are they on the same server?

EDIT:

BC, I actually do this, I have two sites on the same server. In that case you CAN. It allows me to test things on one side and not affect the other, additionally if you are trying to change the themes you will have to go into the original site and change to another theme then that would be up to the user to switch back and forth, it can get pretty confusing but YES it is possible . atleast in a themes sense. beyond that I'm not to sure.

Yojin_Spajin

They are ! Please, can you explain how you are doing this ?

Night09

Just edit settings on the second site to access the database on the first site. (settings.php in root folder)

If theyre on the same server they can be cross linked via the database but you will have the issue of any URLs saved on the original will be the same on the second meaning that if anyone clicks URLs they may be directed back to the first site. Users would need to know to not click the wrong things depending what is on the forums that lead them back to the first site.

If you do that both can be different but share the DB. This will ONLY work if they are both on the same server though. I do it for testing then just edit in the database settings to suit what DB I want to use.

BxK

Well to accomplish what you want your going to have to:

- MAKE A BACK UP OF THE DATABASE AND YOUR FILES BEFORE YOU TRY ANY OF THIS IS VERY EASY TO SEND YOUR FORUM INTO A BLACKHOLE
- Upload both SMF Boards
- Change all the default info in the NEW settings.php to reflect the new paths on the second site (keep the database info the same)

Im gonna break in here REMEMBER EVERYTHING DATABASE WISE WILL REFLECT ON BOTH SITES So to make it work you need to...

- Go into the MAIN BOARD and change the path to what ever theme your trying to use to the SECOND sites path but ONLY THAT THEME.

- Now the second site is completely separate except the database now THE USER must select the second theme and if they switch back and forth they must select overtime UNLESS... You do this...

To both boards go into index.php

REPLACE:
// Load the current theme.  (note that ?theme=1 will also work, may be used for guest theming.)
else
loadTheme();


WITH:
// Load the current theme.  (note that ?theme=1 will also work, may be used for guest theming.)
else
// loadTheme();

$host = $_SERVER['SERVER_NAME'];
if ($host == 'YOURWEBSITE.com')
{
loadTheme('YOURTHEMEID');
}


and heres an example for what its worth
http://projektmesmo.com/support/
http://iammattcox.com/test/

Yojin_Spajin

Hi ! It takes me a moment to try, but it works perfect ! Thank you a lot ! :D

Kindred

you do realize that
a) all links for all sorts of things will point to only one domain - since SMF only installs on a single domain.
b) as pointed out, google WILL penalize you because you have an EXACT duplicate on two different domains
c) there are two mods pmx-subforums and split forums
http://custom.simplemachines.org/mods/index.php?mod=3148
http://custom.simplemachines.org/mods/index.php?mod=3730

which do this sort of thing the RIGHT way...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Dejv

Well its possible and wasnt so hard to do. Dont have to install any mods for this. I have found some good tips here as well. You just need to copy three lines in the settings table in the database (theme url, images url and theme dir) for each set of forum (where each forum has its onw ID_Theme) and then change the ID_Theme in load.php to this number. Thats all. This way you can even use different themes, modifications, etc. for each forum.

Tested only with smf 1.1.x
SMF 1.1.20

Kindred

Well, you really need to update your 1.1.18 installation...   You also really should consider updating to 2.0.x, since 1.1.x is nearly at end of life and has stopped receiving even security updates.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

I didn't think it had stopped receiving any security issues - just that it hasn't *had* any issues...

I know it isn't getting patched for PHP 5.5 compatibility though, nor would I begin to suggest this was a good idea, because it isn't.

Advertisement: