Instructions for Setup

Note: These instructions are intended for those knowledgeable in PHP and HTML.

  1. FTP into http://custom.webedcafe.com/
  2. Create a new folder and name it the exact same name as the domain.
    Example: To customize dnamededcafe.com, the new folder must be located at
    /home/customwe/public_html/dnamededcafe.com/

    This folder will be called the "Working Directory".
  3. Within the Working Directory you can create as many directories and files as needed. The PHP Constant "DIR_CUSTOM_PATH" will be defined as the path to this directory. For this site, the constant refers to:
    /home/customwe/public_html/demo.mededcafe.com/
    The PHP function custom_absolute_url_from_local($local) can be used to return the absolute URL of the Working Directory.
  4. Headers and footers may be used by creating files named main_header.php and main_footer.php. These files can be placed anywhere within the Working Directory. The Cafe System will look for files with these names and apply the appropriate code. If you need to have a different header and footer for the pages within each activity, you can do so by creating files and naming them activity_header.php and activity_footer.php.
    Note that the use of headers and footers is optional. If the Cafe system cannot find an activity header it will use the main header, if it exists. If no header is found, the following code will be automatically inserted:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    </head>
    <body>
    Similarly, if the Cafe system cannot find a footer, this code will be used:
    </body>
    </html>
  5. The home page of the site must be named home_page.php. The home page may also be unique in the sense that it can exclude the header and footer. To do this, simply include the words DISINCLUDE_HEADER and/or DISINCLUDE_FOOTER anywhere in the file home_page.php.
    Note: Once a home_page.php is included, this page will be replaced with your custom page. Click the following link and bookmark the page that opens so that you can view these instructions after a home page has been created: Instructions for Setup.
  6. Custom pages may be added that also include the header and footer. These files must be placed in the Working Directory and can be named anything except:
    404.php
    activity-listing.php
    activity-path.php
    activity-summary.php
    activity-track.php
    activity.php
    ascls-remote-cert.php
    ascls-remote-eval.php
    auto_advance.php
    create-checkout-session - Copy.php
    create-checkout-session.php
    create.php
    dashboard-certificate.php
    data-entry.php
    data-tables.php
    decision.php
    download.php
    downloads.php
    e.php
    email-invitation.php
    evaluation.php
    exit-page.php
    form.php
    form_processor.php
    frontmatter.php
    gcharts.php
    gchartsdata.php
    hardcoded-redirects.php
    icons-for-todd.php
    index.php
    move_rationale.php
    page.php
    passcode.php
    path - Copy.php
    path-processor.php
    path-processor_ORIG.php
    path-summary.php
    path-top.php
    path.php
    payment-intent.php
    payment.php
    payment_checkout__.php
    phpinfo.php
    post-test-summary.php
    post-test.php
    pre-test-summary.php
    pre-test.php
    preview.php
    process-sortable.php
    quicklinks.php
    registration-confirmation.php
    registration.php
    resizetest.php
    router.php
    secret.php
    site-under-maintenance.php
    site_builder.php
    stago-hardcoded-activities-4.3.14.php
    stago-hardcoded-activities.php
    stripe.php
    track-processor.php
    track-summary.php
    track.php
    trackit.php
    video.php
    video_exit.php
    video_set.php
    x.php

The following section describes PHP variables that may be used.

Navigation variables

All the system pages are available in the array $_CUSTOM_NAVIGATION. Each element of the array is a separate array containing a title and a link. Click here to view the array.

Activity variables

All the activities that are linked to the site are available in the array $_CUSTOM_ACTIVITIES. Each element of the array is a separate array containing a title and a link. Click here to view the array.