English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?

Create slave site via single front-end form field
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Create slave site via single front-end form field
#8620
Create slave site via single front-end form field 12 Years, 5 Months ago Karma: 0
Hi Edwin,

I'd like a customer to create a new slave sites automatically by submitting just 1 field being their sitename (i.e. the Alias field) from a public form on the front-end.

The customer should just enter their sitename and then click 'submit'. All the other slave site fields will be pre-defined or populated via a variable and hidden from view in the front-end.

As far as I can see from the template and admin settings, I need to setup the template as follows:

a) List of domain names: www.mysite.com/{site_id}

b) To Site ID: {site_alias}

c) Deploy folder: /chroot/home/mysite.com/html/{site_id}

d) All other fields are then hidden in the menu item configuration except for 'Alias'

Please can you confirm the following:

1) Are my fields correct above in a) b) c) and d) ?

2) I am assuming that the field 'Alias' (point d) above) will then be used as the {site_id}, is this correct?

3) Do I need to populate any data into the 'Alias link:' field in the template?

4) Currently, I need to login to see the form, is there a way for the form to be public? (I've selected the field 'anonymous' in the menu item config however this doesn't seem to help)

5) Does 'Prefix' in the menu item config relate to the database prefix in the template (or is this something else)?

6) What field do I use to automatically set the new site Title (Site Name) to be the {site_id}?

Thanks for your assistance with these questions.

Best regards.
TonyGee
Expert Boarder
Posts: 113
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2011/11/29 06:42 By TonyGee.
The administrator has disabled public write access.
 
#8631
Re: Create slave site via single front-end form field 12 Years, 5 Months ago Karma: 54
1) Yes this seems correct.
I just think it would be better to use the site_prefix instead of the alias.

2) Yes.

3) NO. Theorically the {site_alias} was reserved for the "alias" field but as you already used it to create the other rule, you don't need it.

4) Yes you can set the "anonymous" user when you defined the menu item for the website creation. You may perhaps have to modify the JMS layout to accept anonymous.

5) This is theorically a site prefix and not a DB prefix but the meaning of the field depends on the usage that you are doing in the JMS Template rule.

6) In the front-end, you have a field for the site title that correspond to the "site name" in joomla.
Avoid to use a site ID with site name that may have spaces present.
In addition, the site ID should be a short name and not a full name like a site title (or site name)
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#8654
Re: Create slave site via single front-end form field 12 Years, 5 Months ago Karma: 0
Thanks for those details Edwin.

I've decided to have the user enter in their email address in the form field to create the slave site (so that they can then receive an email with a link to complete their registration - this is also a protection against spammers).

Assuming I make the 'Alias' or 'Site Prefix' field the only field available to create the slave then the email address will be used to populate the {site_id} and all the other required data in the template.

The problems are:

1) I want the {site_id} to be populated with ONLY the domain part of the email AFTER the @. E.g. if the email is hello@mydomain.com the {site_id} will become 'mydomain.com'. Is this possible with current functionality?

2) I need JMS to check if a slave has already been created with the domain (i.e does another {site_id} exist with the same domain) and if it already exists then the user should receive an email with a message saying it already exists and the link to visit that slave site.

3) When I create the new database I don't think I can use the full domain as a database name (I'm just assuming this for now - I still need to double check). So I may need to remove the .com.x part after the domain i.e. if the email is hello@mydomain.com the part used to create the database would be 'mydomain'.

Can you please let me know if this is possible with current JMS variables and/or do we need to create a small plugin to achieve these points?

Thanks and regards.
TonyGee
Expert Boarder
Posts: 113
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#8658
Re: Create slave site via single front-end form field 12 Years, 5 Months ago Karma: 54
1) I am not sure concerning the "@" but you can test the {site_id-n} keyword processing that allow extracting peace of a domain. It is not perfect as you can not predict the number of peace of element in a domain name.
I think it should be better to use the email address as "administrator email" address where should be send automatically the password to access the websites.
Normally the site prefix is a "pseudo" or "mnemonic" to identify a website and that is also use to compute a table prefix.

2) JMS report an error when a slave site or an alias is already present.
Verify that the joomla template that you are using display the joomla error messages. (Some template does not display the messages).
This is already reported by JMS.

3)As we explained in (1) in general the site prefix should be a short name and not an email.
If you want to use email, I think that you have to develop a specific thing for that.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla