th23 Domain

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
Son of a Beach
Registered User
Posts: 294
Joined: Fri Sep 07, 2007 1:36 am
Location: Tasmania
Contact:

Re: th23 Domain

Post by Son of a Beach »

Now that I seem to have the ACP part working correctly, I now have another problem...

I can no longer log in on the original domain name. I can log in on the alternative domain name, but this does not log me in on the alternative domain name, and if I try to log in on the alternative name, it says (on the temporary screen) that I'm logged in, but then when it reloads the index page, I'm logged out again.

I've double checked all my th23 domain settings and they appear to be correct (both cookie domains start with a '.').

What might be causing this problem?

(NB: The problem occurs on a variety of browsers, operating systems and machines.)
Son of a Beach
Registered User
Posts: 294
Joined: Fri Sep 07, 2007 1:36 am
Location: Tasmania
Contact:

Re: th23 Domain

Post by Son of a Beach »

hmmm... OK, clearing the browser cookies seems to have fixed it. Is there anything I can do to avoid this happening to the hundreds of members at my site who would suddenly not be able to log in at all, if this happens when I install it on the production system?
User avatar
th23
Registered User
Posts: 233
Joined: Sat Jul 03, 2004 7:36 am
Location: Germany
Contact:

Re: th23 Domain

Post by th23 »

Son of a Beach wrote:hmmm... OK, clearing the browser cookies seems to have fixed it. Is there anything I can do to avoid this happening to the hundreds of members at my site who would suddenly not be able to log in at all, if this happens when I install it on the production system?
Yeah, clearing the browser cache should fix it...how to fix it for your users? Without having tried it, it might work to simply end all sessions by clearing the phpBB sessions table, but no warranty. In case you try it out, please give me some feedack about success!? Thanks :)
Life is what happens...while you're busy making other plans!
Son of a Beach
Registered User
Posts: 294
Joined: Fri Sep 07, 2007 1:36 am
Location: Tasmania
Contact:

Re: th23 Domain

Post by Son of a Beach »

OK, one more question (for now ;-) )...

My site logo includes the site URL in it, so I need two logos (one for each URL). What is the best way to display a different logo depending on the domain? I don't want a completely different style, just the logo. Is this possible?
Son of a Beach
Registered User
Posts: 294
Joined: Fri Sep 07, 2007 1:36 am
Location: Tasmania
Contact:

Re: th23 Domain

Post by Son of a Beach »

Son of a Beach wrote:OK, one more question (for now ;-) )...

My site logo includes the site URL in it, so I need two logos (one for each URL). What is the best way to display a different logo depending on the domain? I don't want a completely different style, just the logo. Is this possible?
Well, you guys are going to hate how I did this (all those hard coded values! yikes!), but this works fine for me for now, to achieve a different logo depending on the URL.

Additions/changes to '.../includes/functions.php':

Code: Select all

	//  Set site logo by URL host
        if ( strpos($_SERVER['HTTP_HOST'], "site1") )
        {
                $site_logo_img = '<img src="/images/logo_site1.png" width="5
54" height="100" alt="" title="" />';
        }
        else if ( strpos($_SERVER['HTTP_HOST'], "site2") )
        {
                $site_logo_img = '<img src="/images/logo_site2.png" width="5
54" height="100" alt="" title="" />';
        }
...
...
...
//              'SITE_LOGO_IMG'                 => $user->img('site_logo'),
                'SITE_LOGO_IMG'                 => $site_logo_img,
If something cleaner and neater could be included in th23 domain, I'd be happier, but the hack above works nicely for now.
User avatar
th23
Registered User
Posts: 233
Joined: Sat Jul 03, 2004 7:36 am
Location: Germany
Contact:

Re: th23 Domain

Post by th23 »

Well, I am not sure if this is already included in the last published version of my MOD, but when editing the domains, there might be a field "template vars" where you can define values to be assigned according to the domain used...exactly what you want, I guess.

Simply use

Code: Select all

"S_SITE_LOGO" => "logo_site1.png",
And include the variable in the html template files

Code: Select all

<img src="/images/{S_SITE_LOGO}" alt="" title="" />;
That should do the trick... in case it's not yet in the published version, now you have a clue, what might be in the next one ;-)
Life is what happens...while you're busy making other plans!
Son of a Beach
Registered User
Posts: 294
Joined: Fri Sep 07, 2007 1:36 am
Location: Tasmania
Contact:

Re: th23 Domain

Post by Son of a Beach »

hey, th23, that's an excellent way to make your MOD very flexible for a variety of different needs for different people. It should suit me perfectly, and will certainly be a lot neater than my hacked way of doing it. :-)

If this was in the current version, where would I find it? Will this be in the ACP GUI (where you set the cookie domain, etc)? It ain't there now, so I'll be anxiously awaiting your next release. :-)

Thanks for letting us know that this is coming. I suspect many others will be pleased with this news also. Well done!
network23
Registered User
Posts: 127
Joined: Tue Jun 11, 2002 5:26 pm

Re: th23 Domain

Post by network23 »

Please let me know if your mod might solve my problem.

I have an existing site (mysite.com) and I want to move an existing phpbb3 forum to a subdomain (forum.mysite.com). My host has my account set up like this:

Code: Select all

myaccount directory
  /mysite.com
    index.htm
    /includes
      script.php
  /forum.mysite.com
    index.htm
    /path
      /to
        /styles
          overall_header.htm
I have a script (script.php) I want to run in the header of the forum (which also runs from mysite.com...I want to embed the forum inside my site design) but it looks like phpbb won't let me run includes from a directory outside /forum.mysite.com.

This is also frustrating because I don't want to duplicate all the design work so I'm updating 2 sets of files whenever the design changes.

Would this mod make all this possible?
User avatar
th23
Registered User
Posts: 233
Joined: Sat Jul 03, 2004 7:36 am
Location: Germany
Contact:

Re: th23 Domain

Post by th23 »

network23 wrote:Please let me know if your mod might solve my problem.
...
Would this mod make all this possible?
Sorry, but I can't tell...this sounds like a *very* customized setup. You might need to try it out, but right upfront...support won't be able as the setup seems to be unique to your very own server.
Life is what happens...while you're busy making other plans!
User avatar
th23
Registered User
Posts: 233
Joined: Sat Jul 03, 2004 7:36 am
Location: Germany
Contact:

Re: th23 Domain

Post by th23 »

Son of a Beach wrote:Will this be in the ACP GUI (where you set the cookie domain, etc)?
Yes, right next to the settings you do per domain...simply an additional field for template vars. If it's not there, then it's yet only on my development server. You might need to wait a little bit though for the next release - and validation over here at phpbb.com
Life is what happens...while you're busy making other plans!
repman
Registered User
Posts: 2
Joined: Sun Jan 25, 2009 3:55 pm

Re: th23 Domain

Post by repman »

at first, sorry for my bad english.

i have some domains and want to use only one phpbb3 installation for all of them where every domain can have his own style. for that this mod seems to be the right.

but is it possible that every domain have his own standard usergroup for new users? what i mean is:

all users from domain 1 are in the group users1
all users from domain 2 are in the group users2
all users from domain 3 are in the group users3

or is there an other way that every domain has its own forums so that the users from domain 1 didnt see the forums from domain 2?

hope you understand what i mean :)
User avatar
th23
Registered User
Posts: 233
Joined: Sat Jul 03, 2004 7:36 am
Location: Germany
Contact:

Re: th23 Domain

Post by th23 »

repman wrote:...every domain can have his own style. for that this mod seems to be the right.
No, this is not a default feature.
repman wrote:...every domain have his own standard usergroup for new users?
...
or is there an other way that every domain has its own forums so that the users from domain 1 didnt see the forums from domain 2?
No, this neither is an implemented feature - why to have combined forums? You wanna separate everything - you should use separate datebases / forum installations.
Life is what happens...while you're busy making other plans!
WuTang
Registered User
Posts: 10
Joined: Sat Oct 25, 2008 11:32 pm

Re: th23 Domain

Post by WuTang »

Hey th23,

I'd like to see this feature in your mod too. I've got one forum with the same content (threads, posts, users, ...) but different domains. I'd like to be able to set its own default style for each domain.
Easy example why I need this here. I created a communication platform for boys and girls with different domains so I can directly approach the right group by the domain name. Having it own colours, forum title (even subtitles) etc. would help the forums in its flair.

Please integrate such a function or open an ability for this. Trying to solve it via mod-rewrite doesn't help, because this only works after login.

Thanks and best regards from Germany,
Alex.
repman
Registered User
Posts: 2
Joined: Sun Jan 25, 2009 3:55 pm

Re: th23 Domain

Post by repman »

th23 wrote:why to have combined forums? You wanna separate everything - you should use separate datebases / forum installations.
think it is a good way to have one core installation. so i must install all (eg. forum updates, mods) only one time. and phpbb3 comes up with a very complex rights management so it seems easy to handle this with groups.
strictly
Registered User
Posts: 45
Joined: Tue Jul 08, 2008 7:34 pm

Re: th23 Domain

Post by strictly »

Hey there,

I installed and configured the plugin according to documentation, no errors or anything BUT.. yeah.. it's not doing the job it should.. not working. When I login into any of the two domains we have, it doesn't get logged into the other one too. It does log you out of the two when you log out of the one ure in.
Before going thru all the code/modifications again to see if there's any wrong line/character anywhere, which I'm pretty sure it's not the case, what could you suggest that could be causing this?
Cookies were already cleared in browser.

Thanks.
Locked

Return to “[3.0.x] MOD Database Releases”