[title sub="Written by Chris Graham (ocProducts)"]Composr Tutorial: Basic configuration and getting started[/title]

Once Composr is installed, there is some basic configuration to do before your website is ready to open.

During basic configuration, you will be familiarising yourself with Composr for the first time. Please be patient: there is a lot to Composr, but once you have a mental image of how things work, you will find it a very powerful and malleable system.

[contents]decimal,lower-alpha[/contents]

[title="2"]Immediately after installing[/title]

[surround]
[media width="150" description="Reaching the Admin Zone from the main website" float="right"]data_custom/images/docs/tut_configuration/reaching_adminzone.png[/media]
When the installer finishes, you have a choice to either:
[list="a"]
[*] view your website
[*] run the Admin Zone's Setup Wizard (recommended)
[/list]

In either case you will be required to log in. Log in using an administration username. If you installed using Conversr (Composr's own forum system), the username and password will have been specified during installation (with the username being 'admin' by default).

If you choose to view your website, you are presented with a screen saying that the site is closed, with a login link. Once logged in, there is a link to the Admin Zone in your 'login block' (alternatively, you can always access your 'Admin Zone' directly by appending [tt]/adminzone[/tt] to your website's URL).
You will see that the Admin Zone keeps reminding you to run the Setup Wizard, so do so when you are ready.
[/surround]

[title="2"]The Setup Wizard[/title]

[surround]
[media width="150" description="The Setup Wizard" float="right"]data_custom/images/docs/tut_configuration/setup_wizard.png[/media]
The Setup Wizard you help you configure the name of your website and other key details in a few easy guided steps.

If you run the Setup Wizard, you may wonder later what it actually did, especially if you want to undo it.
The Setup Wizard can perform the following behind-the-scenes functions:
 - Generating a "Theme Wizard" [b]theme[/b]. You can access the Theme Wizard from Admin Zone > Style > Themes, Theme Wizard link (under Add Theme).
 - Generating a "Logo Generator" [b]logo[/b]. You can access the Logo Generator separately, from Admin Zone > Style > Logo Wizard.
 - Setting site [b]options[/b]. You can access these from Admin Zone > Setup > Configuration.
 - [b]Removing predefined content[/b]. Predefined content can be removed (e.g. default banners). Once this is removed you'd need to put it back manually, by adding it as you would any other content.
 - Placing [b]blocks[/b]. Blocks are dynamic features embedded directly into your pages/design (other software may use the term 'widgets'). You can place/change blocks via the Zone Editor at Admin Zone > Structure > Block/panel layout (Zone Editor).
 - [b]Copying rules[/b]. You can edit the rules page manually from Content Management > Pages (Comcode pages).
[/surround]

[box="Important -- the Setup Wizard is usually a one-off process"]
[media float="right" thumb="0" framed="0"]data_custom/images/docs/dont.png[/media]
A very common mistake is to think of the Setup Wizard as a core part of Composr that you re-run whenever you want to make certain changes. This is not the case: it is a tool to help you get started, and not the main method for configuring Composr. Anything in the Setup Wizard is configurable elsewhere within Composr. Anything you see pre-set in there does not necessarily represent the current configuration of your site, just the default outcome of running the wizard.

For these reasons, we actually give out a warning if you re-run the Setup Wizard.
[/box]

[title="2"]Notifications[/title]

Chances are that you'll want e-mailing whenever things happen on your site. You can do this through your personal notification settings. Go to your profile, choose the Edit tab, and choose the Notifications sub-tab.

In particular you'll probably want to know about content needing validation, various kinds of messaging activity (e.g. support ticket posting), and eCommerce activity.

This is described in more detail in the [page="_SEARCH:tut_notifications"]Notifications tutorial[/page].

[title="2"]Editing configuration[/title]

[surround]
[media width="150" description="The list of configuration sections" float="left"]data_custom/images/docs/tut_configuration/configuration.png[/media]
[media width="150" description="The most important area of the configuration are the General options in Site options" float="right"]data_custom/images/docs/tut_configuration/configuration_actual.png[/media]
You'll want to configure your configuration, at Admin Zone > Setup > Configuration.

If you didn't use the Setup Wizard you will probably have noticed by now that many options are initially set to derivatives of '(Unnamed)'. Don't worry, all these can all be changed as suits your website.

When you visit the full configuration page to fine tune your configuration, you will see that configuration options are split into a number of sections and subsections.

The most important options are in 'Site options', choose that and scroll down your browser window until you find the subsection entitled, 'General'. Once done, scroll to the bottom of the page and click the 'Save' button.

There are many more options in the main configuration, and the actual options available depend on which addons are installed.

Repeat for all other sections you may want to edit.

We don't list all the options in the documentation because they are often either obvious/self-describing, or too specialist to mention -- so it's a good idea to browse through to see what interests you.
[/surround]

[title="2"]Editing default Comcode pages[/title]

There are a number of default pages on your site. Standalone editable pages within Composr are called "Comcode pages".

For details on how Comcode pages work and what the default ones are, see the [page="_SEARCH:tut_comcode_pages"]Adding standalone pages of content (via Comcode) tutorial[/page].

[title="2"]Default banners[/title]

If you are not running a community site, you will almost certainly want to delete the default banners. Three banners are added into the system by default, to give websites a 'leg up' and a working view of the banner rotation: but they may not be appropriate. If you ran the Setup Wizard then you have already been given a choice to remove these banners automatically.

[title="2"]Editing logo theme images[/title]

[surround]
[media width="150" description="Editing a logo theme image" float="right"]data_custom/images/docs/tut_configuration/logo_2.png[/media]
[media width="150" description="Choosing theme images to edit" float="right"]data_custom/images/docs/tut_configuration/logo_1.png[/media]
You will want to change your logo to give your site an individual identity. You may either do this manually, or by using the Logo Wizard; the rest of this section will assume that you are doing it manually.

When you change images, styling, or low-level HTML structure (defined in templates), you are editing the theme of the site. Therefore to do it, you should go to Admin Zone > Style > Themes.
When you choose to manage images in the default theme, you will be warned against editing the default theme; for this simple task, the warning is irrelevant, and we therefore recommend you click 'ok'. If you are feeling adventurous, you could add a new theme, and continue sculpting your theme as you go.

Choose [tt]logo/-logo[/tt] (the logo for the Welcome Zone, and the logo for any zone that does not have its own) from the drop-down list presented. After clicking the button you will see the current image; all you need to do is create your own replacement on your computer (as a [tt].jpeg[/tt]/[tt].jpg[/tt], [tt].gif[/tt] or [tt].png[/tt] file) and choose to browse for it to upload. You do not need to erase the current URL, as your upload will replace it, and you definitely should leave the 'Name' field unchanged.

Your choice of image file formats:
 - Use either [tt].png[/tt], [tt].jpg[/tt], or [tt].gif[/tt] files:
  - [tt].jpg[/tt] is usually the best choice for a logo, because the file size can be very low. Be aware though that the JPEG format is a 'lossy' format, i.e. the higher the compression, the lower the quality of the image. JPEG does not support transparency.
  - [tt].png[/tt] never loses quality, and also supports transparency -- but the sizes are a bit larger.
  - [tt].gif[/tt] is only really a good idea if you need animation, which is unlikely for a logo. Soon will be able to do animation with [tt].png[/tt] via [url="APNG"]http://caniuse.com/#feat=apng[/url].
 - Do not ever try and use [tt].bmp[/tt] files with Composr, as they do not have proper compression, and are designed for Windows only.
[/surround]

[title="2"]Editing menus[/title]

[surround]
[media width="150" description="The menu editor" float="right"]data_custom/images/docs/tut_configuration/menu_editor.png[/media]
[media width="150" description="The default menu" float="right"]data_custom/images/docs/tut_configuration/menu_edit_link.png[/media]
You may wish to remove some of the links from the default menus on your installation. To do this, log in as an administrator and click the 'Edit menu' link.

The menu editor is covered in the [page="_SEARCH:tut_menus"]Customising what's on the menus tutorial[/page].
[/surround]

[title="2"]Scheduling[/title]

In order for aspects of Composr that support scheduling to work it is necessary to set up a system level scheduling task to run the [tt]data/cron_bridge.php[/tt] file on an every-minute basis. By doing this, you tie in the CRON bridge scheduler with the server's scheduler.

Examples of scheduling tasks:
 - Sending out calendar event notifications
 - Sending out regular notification digest e-mails
 - Sending out birthday notifications
 - Running automated backups
 - Sending automated welcome e-mails to new members
 - Sending catalogue view reports and handling classified ad expirations
 - Sending out reminders for registration confirmation mails that were not ever actioned by the joining member
 - Sending out automatic newsletters
 - Sending newsletters (dripping out e-mails over a period of time, to stop resource spiking)

The [tt]data/cron_bridge.php[/tt] file can either be run by passing the PHP file through the PHP interpreter (common), or by calling the URL (see "Help -- my webhost does not support CRON!"). More details are in the following sections. Don't call up the URL by hand because if you do then Composr will start assuming the CRON bridge scheduler is working from then on which can make testing it a bit harder (once it is called once it is marked 'working' by the system -- applicable features will become available, and the todo item will be removed from the checklist on the front page of the Admin Zone).

[title="3"]Specific advice for Linux[/title]

[media width="150" description="Setting up CRON in the cPanel webhosting control panel (different control panels vary in their UI)" float="right"]data_custom/images/docs/tut_configuration/cron.png[/media]
On Linux, the system level scheduler is 'Cron', and the process of adding a task is known as 'setting up a Cronjob'. Many webhosting control panels allow you to do this.

The following command might work for a Composr installation in the [tt]/home/examplesite/htdocs[/tt] directory:
[code="Bash"]
php /home/examplesite/htdocs/data/cron_bridge.php
[/code]
The above command is just an example. Your real path will obviously be different, but also the PHP program may have a different name. Composr may be able to detect the correct command to use for you. Try opening up [tt]http://yourbaseurl/data/cron_bridge.php?querymode=1[/tt]. The script should output the Cron command for you to use.

A good test is to try running the command you end up choosing manually in a command prompt, to check it is correct.

You should schedule Composr's [tt]cron_bridge.php[/tt] script to be loaded at least every 10 minutes.

[title="4"]Sandboxed Cron[/title]

Some webhosts only allow you to execute Cron commands directly under your home directory. This means you cannot call up the PHP command directory like above.
A workaround is to use [tt]data/cron_bridge.sh[/tt] instead, which just asks as a wrapper around the regular [tt]cron_bridge.php[/tt]. Tell CRON to execute [tt]/home/examplesite/htdocs/data/cron_bridge.sh[/tt].
[tt]u+x[/tt] permissions should be set on [tt]data/cron_bridge.sh[/tt] ([tt]744[/tt] permissions).

[title="3"]Specific advice for Windows[/title]

On Windows the following command might work for a Composr installation in the [tt]c:\sites\examplesite\www[/tt] directory:
[code="BAT"]
c:\php\php.exe c:\sites\examplesite\www\data\cron_bridge.php
[/code]
On Windows, either the hosting control panel will provide a similar scheduler to Cron, or you can use the Windows' 'Scheduled Tasks' feature as described below (assuming you have access).

The following is a Windows Vista scheduler step by step process for scheduling the running of [tt]cron_bridge.php[/tt] every 5 minutes to enable the scheduler:
1) Open up Windows Task scheduler
2) Click 'Create Basic Task'
3) Give it a name and a description
4) Click 'Daily'
5) Set the Time and to reoccur every 1 Day
6) Click 'Start a Program'
7) Under program/script add the location of [tt]php.exe[/tt] on your system something like [tt]"C:\php\php.exe"[/tt] -- also include the double Quote Marks ("") surrounding the file location
8) Under 'Arguments' add the location to the [tt]cron_bridge.php[/tt] file which for the example above would be [tt]"c:\sites\examplesite\www"[/tt] (note how the PHP command is split across two parameters -- step 7 having the [tt]php.exe[/tt] path and step 8 having the PHP file path) -- again surround in quote marks.
9) Click 'Next'
10) Tick (check) "Open the properties dialog for this task when I finish"
11) Click 'Finish'
12) Click 'Triggers' (top of window)
13) Double click the trigger from the list
14) Tick (check) 'repeat task every' box
15) Change the "1 Hour to 5 Minutes" for the duration of "Indefinitely"
16) Click 'OK'
17) Click 'OK'
This should have now added a schedule within Windows scheduler to run the [tt]cron_bridge.php[/tt] file every 5 minutes. This step by step was created using Windows Vista, the process may change slightly in other versions of Windows.

[title="3"]Help -- my webhost does not support CRON![/title]

In the event your hosting platform does not allow you access to CRON, there are a number of options available to you. These options work to call the [tt]data/cron_bridge.php[/tt] script by URL, rather than via a direct command on the server.

 - EasyCron provide direct instructions for Composr, and free and paid plans: https://www.easycron.com/cron-job-tutorials/how-to-set-up-cron-job-for-composr
 - Other free options are http://www.mywebcron.com/ (up to every 5 minutes), http://www.setcronjob.com/ (up to every 5 minutes but the schedule needs to be re-set every week) and http://www.onlinecronjobs.com/ (up to 5 jobs twice a day).

Simply sign up and  add the URL i.e. [tt]http://yourbaseurl/data/cron_bridge.php[/tt] to the scheduler and set how often you want it to run.
[staff_note]We have since optimised things so this is commented out
[title="3"]Caveats[/title]

If you enable the mail queue (recommended for performance), then e-mail will be sent in the background via the scheduler. However, if the scheduler stops running for a period, e-mails could queue up. We have had a report of this happening to a user and then the webhost deciding to block the scheduler from running, compounding the problem. If such an event happens it is best to discuss it with the webhost, then perhaps deciding to ease CRON back in on a lower execution interval (e.g. once per hour, then back to normal after the queue is emptied).
[/staff_note]
[title="2"]Closed site, and opening[/title]

[surround]
[media width="150" description="Your site is initially closed" float="right"]data_custom/images/docs/tut_configuration/closed.png[/media]
Once you feel your site is ready for the general public, you will want to 'open the doors' so to speak. You can do this from:
Admin Zone > Setup > Configuration > Site Options > Closed Site.

It's not advertised in the interface, but it is possible for a user to join a closed Conversr-powered site if they have been given the URL to the [tt]join[/tt] module (they can't see any panels in this event). Once they have joined they can't log in though unless they have subsequently been put in a usergroup with 'Access closed site' permission. The reasoning here is that the staff may give out the join URL and ask someone to use it, and then give special access because they want them to be able to get in early. If you do not like this behaviour, you can alter the join-module's permissions so that the Guest usergroup cannot access it.
[/surround]

[concepts
 1_key=".htaccess"                         1_value="A file used by the Apache web server to set configuration options that apply to the directory (and sub-directories thereof-) that the file is contained in"
 2_key="Main Admin Zone Configuration"     2_value="The 'Configuration' module of the Admin Zone"
 3_key="Installation Options"              3_value="The Installation Options for low-level settings such as database settings, available from config_editor.php"
 4_key="CRON bridge scheduler"             4_value="Composr's scheduler system, tying CRON to Composr's scheduled tasks so that they may be launched"
]Concepts[/concepts]

[title="2"]See also[/title]

 - [page="_SEARCH:tut_install"]Basic installation[/page]
 - [page="_SEARCH:tut_security"]Security[/page]
 - [page="_SEARCH:tut_themes"]Themeing your website[/page]
 - [page="_SEARCH:tut_staff_advice"]Advice for choosing and managing staff[/page]
 - [page="_SEARCH:tut_legal"]Legal and social responsibilities[/page]
 - [page="_SEARCH:tut_comcode"]Comcode and the attachment system[/page]
 - [page="_SEARCH:tut_comcode_pages"]Adding standalone pages of content (via Comcode)[/page]
 - [page="_SEARCH:tut_menus"]Customising what's on the menus[/page]
 - [page="_SEARCH:tut_adv_configuration"]Advanced Configuration[/page]
 - [page="_SEARCH:tut_notifications"]Notifications[/page]

{$SET,tutorial_tags,zone_logos,setupwizard,help_page,core_configuration,Configuration,Installation,novice}{$SET,tutorial_add_date,Aug 2008}{$SET,tutorial_summary,Once Composr is installed, there is some basic configuration to do before your website is ready to open. We discuss it here.}[block]main_tutorial_rating[/block]
