MAS:Set up new site server side

From Mansion Productions WIKI
Jump to: navigation, search

These are the basic instruction how to create a new site in MAS, especially the things required on the server-side.


1. Create the sites in MAS > Sites

1.1. Create the members area first (URL/path), checking (o) This site is a standalone members area

1.2. Create the tour area, check (o) This is a tour area linked to... then select the members site you've just created


2. Create and upload the auxiliary php files to the members/tour directories. You can use the code suggested in MAS > Sites > (last action button) To make it faster, you can also create just index.php and show.php - as they are the only two which differ per site. The remaining ones (showgal.php, refstat.php, view.php, search.php, favorites.php, comments.php) have the same contents for all sites in one MAS installation and you can simply copy them as files from a site that is already created. Remember that the tour areas must not have a copy of view.php, favorites.php and comments.php as these are members-only features.


3. Create the content directory for the new site. If each site has its own exclusive content, then you should have a subfolder in <mas_content> for each, usually with an uppercase abbreviation after the sitename (that is a common practice but not a hard rule). For example <mas_content>/ABC/. All the content for this site should go in subfolders under ABC/


4. Create a symbolic link, using a Terminal (SSH) session, so that the MAS system can access the new content. The commands are as follows:

cd <MAS_DIR>/content

ln -s <MAS_CONTENT_DIR>/<SITE_ABBREV>

For example (and this is only an example, please check your exact server installation)

<MAS_DIR> = /home/httpd/html/mas.my_mas_domain.com/httpdocs/

<MAS_CONTENT_DIR> = /home/httpd/html/mas.my_mas_domain.com/mas_content/

and with the ABC example above the should be:

cd /home/httpd/html/mas.my_mas_domain.com/httpdocs/content
ln -s /home/httpd/html/mas.my_mas_domain.com/mas_content/ABC


5. Create the symlinks in the site directories:

cd <PATH_TO_NEW_SITE>
ln -s <MAS_DIR>/faceimages
ln -s <MAS_DIR>/groups
ln -s <MAS_DIR>/preview
mkdir content; cd content
ln -s <MAS_CONTENT_DIR>/<SITE_ABBREV>

Those symlinks are the same for all sites, both tour and members area.

The link to preview/ is only needed if you would be using additional preview images through the Preview Manager feature.

The link to content (last two commands) are only needed in a tour area, if the tour would be showing thumbnails and trailers from the content directories (as in the so called transparent tours). If however the tour is only about to list the titles and face images of latest/most popular etc. updates without going to the gallery template pages, then they are not required and you should not have them, as an additional security precaution. In that case, the aux files refstat.php and showgal.php are not needed in this tour too.


6. Make sure to protect the tour content directory by placing a .htaccess with restrictive clauses, similar to the one that was installed in your first site - which would allow only access to files from certain directories (e.g. thumbs/) and files with certain name patterns (e.g. video trailers etc.). Without such a .htaccess anyone would be able to access the supposedly protected members only content from a non-protected tour area. If you have any concerns or questions about the exact setup and contents of this .htaccess file, do not hesitate to ask through a support ticket.


7. Back to MAS admin, start creating your new sections and adding new content.

Personal tools
Namespaces

Variants
Actions
Products
Navigation
Toolbox