(Solved) 10 domains ( site's) with one cms made simple system

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
hadion
Forum Members
Forum Members
Posts: 17
Joined: Thu Apr 26, 2007 10:02 am

(Solved) 10 domains ( site's) with one cms made simple system

Post by hadion »

Hi all,

This request is a bit advanced, this is the reason i post it in this forum.
I bought 10 domainnames lately.

I want to connect every domainname to an parent menu item, so i can load all submenu items from there parent.
But everything i try goes wrong. The content must also load an default homepage for each domainname.

Please help me out here, thanks in advance for your help!
Last edited by hadion on Sat May 12, 2007 4:41 pm, edited 1 time in total.
Pierre M.

Re: 10 domains ( site's) with one cms made simple system

Post by Pierre M. »

Hello Hadion,

I'm slow understanding today. Please explain which domain has which menu, which submenus, which items (and content) and to which domain belongs the "parent menu item". Sampling/examples welcome.
A "default homepage for each domainname" : I have understood this one ;)

Pierre M.
hadion
Forum Members
Forum Members
Posts: 17
Joined: Thu Apr 26, 2007 10:02 am

Re: 10 domains ( site's) with one cms made simple system

Post by hadion »

Hi,

To make clear what I mean I will give an example.
I have 3 domains:
cars.com
motors.com
boats.com

The CMS have to recognise the domainname and fits it's template to that domain. So when request www.cars.com, cms made simple  has to recognise that the user requested the 'cars' domain. With that fact, it could load the submenu and content of cars.

In the backend of CMS made simple I want to make ( in this example ) 3 pages ( which all have an parent ID ). Those 3 pages named cars, motors and boats, all have their own submenu.

I tried to make active content like this:

Code: Select all

$url = $_SERVER["HTTP_HOST"];
if(eregi('cars',$url)) {
echo ('{menu template='cssmenu.tpl'}');
}
With this code it just places {menu template='cssmenu.tpl'} as text in the browser. ???

When it is possible to strip the requested URL and echo an {menu}, I could manage 3 domains in 1 adminpanel. ( and save much webspace and time, because I don't have to update all my changes 10 times instead of 1. )

Sorry for my bad english, but i hope u understand it a bit.

Thanks in advance,

Hadion
Last edited by hadion on Thu May 03, 2007 9:27 pm, edited 1 time in total.
savagekabbage
Forum Members
Forum Members
Posts: 75
Joined: Mon Apr 23, 2007 3:51 pm
Location: Northern Virginia, United States

Re: 10 domains ( site's) with one cms made simple system

Post by savagekabbage »

Well one solution would be to just create a parent page for each site, and have those pages only show it's children on the menu.  You could then just forward your domains to the appropriate parent pages.
hadion
Forum Members
Forum Members
Posts: 17
Joined: Thu Apr 26, 2007 10:02 am

Re: 10 domains ( site's) with one cms made simple system

Post by hadion »

Sorry, but that is not really the solution I was looking for.

I was thinking about a solution that calls a specific config.php. With that solution u could make 10 databases, but that solution is not suitable with the backend.

The best solution is to echo a menu for each domainname in the template. But I can't do that job... Maybe something with the events handler?
rtkd
Forum Members
Forum Members
Posts: 126
Joined: Tue Dec 12, 2006 3:57 pm

Re: 10 domains ( site's) with one cms made simple system (not solved)

Post by rtkd »

{menu items='boats, cars'}
{menu items='planes, ships'}

this u looking for?
Pierre M.

Re: 10 domains ( site's) with one cms made simple system

Post by Pierre M. »

Hello hadion,
hadion wrote: I was thinking about a solution that calls a specific config.php.
If I understand well, you would like a single CMSms code install respond to several webserver virtualdomains and switch early in index.php (or whatever.php) to the appropriate config.php to answer (front end and back end) according to the requested domain. This way, adding a domain would only require some webserver setting, some db space (using a cms_domain_ prefix) and adding a config-domain.php.

This is very interesting. I like it but I'm not a PHP dev. But as you seem to read and write PHP code may be your are close to invent this nice patch ?

Pierre M.
hadion
Forum Members
Forum Members
Posts: 17
Joined: Thu Apr 26, 2007 10:02 am

Re: 10 domains ( site's) with one cms made simple system (not solved)

Post by hadion »

anybody knows how to send some text to the template before the template is loaded. In a piece of active content I want to give output like this

Code: Select all

{menu exapmle code}
, but when i load the website, the cms only shows text ( {menu exapmle code} ) instead of using the active content.

I tought it was something with the event handler. Anybody knows to which event handler item I have to add the active content to?

edit:
my active content:

Code: Select all

$url = $_SERVER['REQUEST_URI'];
if(eregi('domein',$url)) {
  echo "{menu template='cssmenu.tpl'}";
}
Last edited by hadion on Wed May 09, 2007 8:25 pm, edited 1 time in total.
hadion
Forum Members
Forum Members
Posts: 17
Joined: Thu Apr 26, 2007 10:02 am

Re: (Solved) 10 domains ( site's) with one cms made simple system

Post by hadion »

Solved:

look in the Wiki for more information

Will post an userguide to make our whole cms compatible for unlimited domains with seperate RSS, News, Content, breadcrumbs etc.
great solution!  ;D (lots of work to write the tutorial so i will add it later on  :P
Last edited by hadion on Sat May 12, 2007 4:45 pm, edited 1 time in total.
taufikp
Forum Members
Forum Members
Posts: 27
Joined: Tue May 01, 2007 2:52 am

Re: (Solved) 10 domains ( site's) with one cms made simple system

Post by taufikp »

Wiki? Which page? I wanna do the same thing for my sites.
KO
Power Poster
Power Poster
Posts: 562
Joined: Mon Nov 06, 2006 7:55 pm
Location: Helsinki, Finland

Re: (Solved) 10 domains ( site's) with one cms made simple system

Post by KO »

I was also looking this earlier and could not find it.
Post Reply

Return to “Developers Discussion”