NATS4 Skins and Templates Admin

From TMM Wiki
Revision as of 11:03, 20 July 2011 by Tmmrobc (talk | contribs)
Jump to navigationJump to search
NATS 4
Members Admin
The Members Admin
View Member Details
Add Member
MySQL Auth
Mod Authn DB
Multisite Access
Member Logging
Member Password Retrieval
OpenID Connect
Mod Auth OpenIDC
ID Numbers
Skins and Templates Admin
The Skins and Templates Admin
Skins
Templates
Site Templates
Language Skins
Language Files
custom_errors.php
Join Page Variables
Skipping NATS Join Form
Post URL Variables
Member Usernames & Passwords
Form Validation
Username Recommendations
Password Retrieval
Post-Biller Templates
Geo-Target Join Options
Random Usernames and Passwords
Smarty
Smarty print array
Smarty Plugins
Available Smarty Functions
Affiliate Support Template
Adding a Verification Image
Custom Program and Campaign Selection Pages
Output An Affiliate's Last Paid Date
Affiliate Signup Email
Affiliate Join Page Linkcodes
Approval/Upgrade/Denial Variables
Approval/Upgrade/Denial Template Variables
CSS Theme Builder

The Skins and Templates Admin allows you to edit and manage the look and feel of your sites, as well as the appearance of your NATS system.

The NATS4 Skins and Templates Admin

The Default Skin section consists of three drop-down menus, which allow you to choose the default skin that Affiliates, Account Reps, and Admins will see respectively. If an affiliate, account rep, or admin choose their own skin, NATS will not change their settings.

To the right of the Manage Skins section header is a Flush Template Cache link. Click this link if your templates are not displaying correctly; if the problem persists, please submit a ticket. NATS indents each skin to show its relationship to the surrounding skins; a skin inherits the properties of the skin above it -- the parent skin -- and each template in the skin retains its parent's properties until you customize the child's template the first time. To the right of each skin are several action icons:

  • The Edit icon lets you change this skin's description and user types
  • The Duplicate Skin icon copies the selected skin
  • The View Templates icon lets you create or edit the skin's templates; for more information, see the Templates section below
  • The Delete Skin icon deletes a skin. You cannot recover a skin after you delete it

The two tabs at the top of the screen let you Export or Import a skin.

Switching Skins

On the Skins & Templates Admin, the Default Skins drop-down lets you to select the skin that each type of user sees by default. Selecting the skin automatically sets it. Affiliates will keep the default skin they had when they created an account; only affiliates that sign up after you change the default skin will see the new default skin.

You can add a new skin to the drop-down box by creating it and then marking it as active. To activate or deactivate a skin later, click on skin's edit icon and change the setting.

On the Affiliate My Accounts page, affiliates may choose their own skin.

Editing the Base Skin

We recommend you don't edit the base skin. All sites and sections in NATS use the base skin, and the system allows you to revert to this skin's templates when you make a mistake. However, you will not be able to revert to your base template if it is changed. If you want to edit your templates, remember to duplicate the base templates and then edit the duplicates.

Creating Skins

To create a new skin, go to the Skins & Templates Admin and find the Default Skin in the Current Skins section. The default skin cannot be edited, but you can make a copy of it by clicking the duplicate icon. You will then be prompted by NATS to name your skin and fill out a description of it. Once you have done this, you can choose which users will be able to use this skin.

You can also duplicate copies of skins in the same manner, and these duplicates will inherit the original skin's design.

Templates

You can view the template manager by clicking the Edit Templates icon next to the skin you would like to edit. The template manager lists each template that is available for your site, as well as several action icons in the right-hand column:

  • The Customize icon lets you edit a template for the first time; clicking this icon creates a duplicate of the selected template that you will be able to edit and customize
  • The Revert icon throws away your changes and restores your edited template to its default configuration
  • The Edit icon lets you edit a template after you customize it
  • The Duplicate icon lets you duplicate a template
  • The View icon previews the template for you. Note: the preview won't contain any dynamic information required by the template, such as smarty functions, so a correctly coded template may display incorrectly
  • The Delete icon deletes the template. You cannot recover a template after you delete it

Note: NATS automatically greys out or hides unavailable action icons.

Editing Templates

To edit templates, go to the Skins & Templates Admin and click the Edit Templates icon next to the skin you wish to edit. Once you have found the template you want to edit in the template manager, click the customize icon to edit a skin that has never been changed, or the edit icon to change a previously edited skin. If you make a mistake, you can go back to the template manager and click the revert icon, which will get rid of any changes you have made and revert the template back to its default.

After saving the template you can view a preview of what it will look like by clicking the View Template icon to the right.

Cached Templates

Smarty caches templates so it doesn't have to render them each time someone visits a page. If you change a template and don't see the changes immediately, it is possible you are looking at a cached template.

To re-render the template and have changes immediately take place, find the skin you edited and click the Flush Template Cache link on the Skins & Templates Admin main page.

Affiliate Sign-up Templates

Required Checkboxes

To force affiliates to accept your terms of service, you can require affiliates mark a checkbox on your join form. To do so, add the following code to the form part of the the external_signup template:

<input name="signup[nostore_agree_to_terms:1]" value="0" type="hidden">
<input name="signup[nostore_agree_to_terms:1]" value="1" type="checkbox">

NATS will then verify that this checkbox has been marked before allowing the affiliate to complete their signup process.

Note: you may also want to add a link or a copy of your terms of services to your template and add some explanatory text next to the checkbox.

Advanced Sign-up

If you setup more than one PayVia (payment type) for affiliates, you can let new affiliates use the advanced affiliate signup form. The advanced affiliate signup form gives affiliates a choice between payment types when they signup to an affiliate program. To use this feature, enable or add the following configuration file option:

$config['ADVANCED_SIGNUP'] = TRUE;

NATS will now use the advanced sign up and edit forms.