Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: hhy89 on October 22, 2011, 12:07:04 PM

Title: [BETA]Multidomain SMF 2.0 [with Admin Panel]
Post by: hhy89 on October 22, 2011, 12:07:04 PM
i have upgrade this (http://www.simplemachines.org/community/index.php?topic=171340.0) and i add admin panel


REMEMBER TO BACKUP!

I needed modification of a forum to allow me to run several separate forums on top of the one instalation of SMF forum, with regeuest that whole database should be shared too.

The whole idea was that I can run several virtual forums under different domains but also run one general forum that offers contents fo all virtual forums and some more.

I've done some modifications that do what I needed so here it is:


SMF MULTIDOMAIN MOD
Description:

This mod allows you to have several forums on single board instalation. Each forum is located on separate

domain, and all forums share the same databse od messages, users and setings. You can customize look of each

forum and also choose which categories and boards should be visible in each domain.

Features:

- supports unlimited number of forums
- each forum uses separate domain. Domains can be unrelated or subdomains of the same top domain
- each forum can show configurable categories or boards of the main forum. This means you may have lots of boards on forum but show just one category, or just one board for specific forum.
- each board can be shown or hidden on any forum
- each category can be shown or hidden on any forum
- each forum can use different template, so you can independently customize each forum look
- each forum can use different logo if you do not need to change complete look
- each forum can have different forum name
- each forum can have different HTML description
- each forum can have different HTML keywords
- last unread posts, new replies, search andother forum functions that should be affected by domain filter, are affected
- mod does not change SMF tables, just adds one independent table for it's configuration
- mod is implemented on SMF 2.0.1 but it should be aplicable to any 2.0.x version


How to do modification:


replace your domain in install.php
yourdomain.com
and then execute install.php


and then install this package : Multidomain_SMF2.zip
Title: Re: [BETA]Multidomain SMF 2.0
Post by: zapiy on November 05, 2011, 10:44:55 PM
Hi does this work on the full SMF 2.0 release?
Title: Re: [BETA]Multidomain SMF 2.0
Post by: danielwmoore on November 12, 2011, 12:00:39 PM
Quote from: zapiy on November 05, 2011, 10:44:55 PM
Hi does this work on the full SMF 2.0 release?

If you read the opening post, you will see it is made FOR the SMF 2.0 release.  Therefore, it should work fine.


@hhy89:  I have a situation where I would like to have multiple forums, but in different directories instead of domains.  Is there a way to adapt this to that function?
Title: Re: [BETA]Multidomain SMF 2.0
Post by: Adrek on November 12, 2011, 12:20:24 PM
Installed mod, but when try to run install.php:
Notice: Undefined index: custom_domain in /home/phantom/domains/phantom.unixstorm.org/public_html/smf/Sources/Load.php on line 551

Clean SMF 2.0.1
Title: Re: [BETA]Multidomain SMF 2.0
Post by: hhy89 on November 13, 2011, 10:02:40 AM
Quote from: danielwmoore on November 12, 2011, 12:00:39 PM
@hhy89:  I have a situation where I would like to have multiple forums, but in different directories instead of domains.  Is there a way to adapt this to that function?
i only upgrade this mod: http://www.simplemachines.org/community/index.php?topic=171340.0
and i dont do anything. i will upgrade, but now i study my exams. sorry about that.
tell me after 28 november
Quote from: phantomm on November 12, 2011, 12:20:24 PM
Installed mod, but when try to run install.php:
Notice: Undefined index: custom_domain in /home/phantom/domains/phantom.unixstorm.org/public_html/smf/Sources/Load.php on line 551

Clean SMF 2.0.1
what code in Load.php line 551?
Title: Re: [BETA]Multidomain SMF 2.0
Post by: Adrek on November 13, 2011, 10:35:01 AM
$row_forumList = $context['custom_domain'];
Title: Re: [BETA]Multidomain SMF 2.0
Post by: gggggggg on November 29, 2011, 04:05:18 PM
Hi  hhy89, I have installed this on a brand new 2.0.1 and it seems to be working perfect.  But I have a couple of questions please.

1) I have multi domains working perfect.  But I do not see in the menu anywhere on how to change sessions per domain.  For example, how do I change Hearder_logo_url or Forum Name in the SMF Admin per domain?

2) Is it possible to expand on your module to include Mail Settings per domain?  Otherwise all the domains get their alerts from the same email address

thanks
greg
Title: Re: [BETA]Multidomain SMF 2.0
Post by: hhy89 on December 02, 2011, 12:29:19 PM
categories_show
categories_show
boards_show
boards_hide
theme_id
header_logo_url
forum_name
keywords
description
these are in mod but in sql :)
i dont have any time for upgrading this mod. but i'll upgrade this mod for admin panel

now u can open sql(mysql or anyone)
change this row: header_logo_url in smf_domains
Title: Re: [BETA]Multidomain SMF 2.0
Post by: divecall on December 22, 2011, 07:49:52 PM
Something new here?

An upgrade for the ACP would be a nice christmas present... ;)
Title: Re: [BETA]Multidomain SMF 2.0
Post by: aislin on January 17, 2012, 01:20:44 AM
Ok, I'm completely stumped. I had the previous version for 1.1.x installed and working fine. I've upgraded to 2.0.2 and installed this to no avail. The only thing it seems to do is rename the forum in the heading, but it won't make any of the other changes like what categories to show/hide or what theme to use. For those of you that got it working, did you have to make any modifications to get it going or did it work fine right from the install?

Thanks!
aislin
Title: Re: [BETA]Multidomain SMF 2.0
Post by: hhy89 on January 18, 2012, 03:32:22 PM
Quote from: hhy89 on December 02, 2011, 12:29:19 PM
categories_show
categories_show
boards_show
boards_hide
theme_id
header_logo_url
forum_name
keywords
description
these are in mod but in sql :)
i dont have any time for upgrading this mod. but i'll upgrade this mod for admin panel

now u can open sql(mysql or anyone)
change this row: header_logo_url in smf_domains
Title: Re: [BETA]Multidomain SMF 2.0
Post by: aislin on January 19, 2012, 09:23:38 PM
Yep, I've done all that. I had the previous version of the mod up and working for a couple of years, so the table already existed and was populated when I installed the multidomain package. It's obviously picking up some of it as it's changing the title in the header of the default theme, it's just not picking up any thing else in the table. It was a brand new upgrade so I haven't made any changes to the program or installed any other packages that could be interfering with this.

aislin
Title: Re: [BETA]Multidomain SMF 2.0
Post by: hhy89 on January 22, 2012, 12:30:34 PM
ok whats the problem
Title: Re: [BETA]Multidomain SMF 2.0 [with Admin Panel]
Post by: hhy89 on January 22, 2012, 07:05:02 PM
i added admin panel and new install.php
drop "smf_domains" in sql
and execute new install.php
Title: Re: [BETA]Multidomain SMF 2.0 [with Admin Panel]
Post by: aislin on January 24, 2012, 12:17:54 AM
hhy89,

Ah HA! Ok, so my main problem was having the prepopulated domain table in the first place. You HAVE to drop the table before you run install.php or this won't work. Important to note if, like me, you had it running in 1.1.x. Phantom, that was also why you were seeing that error I believe as that was the same error that was popping up in my error log every time the site was visited.

Of course, having now installed the new version, I've found a new problem for ya. When I go into Multi Domain in the control panel I get this:
Fatal error: Call to undefined function MultiDomain() in public_html/forum/Sources/Admin.php on line 518

I think what it's talking about is on 214 which says: 'function' => 'MultiDomain',

I'm ok using phpMyAdmin, so it's not a huge deal, just thought I'd let you know.

aislin

Edited to add: Thank you SO MUCH for updating this mod and making it install via package manager. I really appreciate it!
Title: Re: [BETA]Multidomain SMF 2.0 [with Admin Panel]
Post by: Adrek on January 25, 2012, 12:44:56 PM
How this can work if MultiDomain.php and MultiDomain.template.php are empty ?
Title: Re: [BETA]Multidomain SMF 2.0 [with Admin Panel]
Post by: hhy89 on January 27, 2012, 04:51:33 AM
sorry about that :S
i will do it today
Title: Re: [BETA]Multidomain SMF 2.0 [with Admin Panel]
Post by: GQCritic on February 07, 2012, 06:48:05 PM
Any updates on this?
Title: Re: [BETA]Multidomain SMF 2.0 [with Admin Panel]
Post by: AnyWay87 on January 15, 2013, 04:41:35 PM
Can you update this mod for the last smf version? To me it says I have an old db version and it's not working.

Thank you.
Title: Re: [BETA]Multidomain SMF 2.0 [with Admin Panel]
Post by: canada123456789 on August 20, 2013, 01:03:09 PM
doesnt work for me ...
there are two files in the zip that are 0 in size.

can someone share where i can download the full version
Title: Re: [BETA]Multidomain SMF 2.0 [with Admin Panel]
Post by: ParaWiz on August 22, 2013, 08:49:16 AM
Quote from: canada123456789 on August 20, 2013, 01:03:09 PM
there are two files in the zip that are 0 in size.

can someone share where i can download the full version
+ me too really need this files