NATS4 Skins and Templates Admin

From TMM Wiki
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 Manage Affiliate Skins section consists of three groups: Advanced Skins, Basic Skins, and Custom Skins. From these groups you can choose the default skins that Affiliates, Account Reps, and Admins will see, respectively. If an affiliate, account rep, or admin chooses his own skin, NATS will not change his settings.

The three skin types provide different levels of customization. The Basic Skins allow you to only edit the header/footer, CSS, and language files, while Advanced Skins allow you to edit every template in the base skin to achieve your own appearance and functionality. Custom skins are essentially a blank skin in which you can create your own from scratch.

A base skin cannot be edited directly. In order to edit the base skins (Standard, Default, Retro v3), a new skin must be created, which will create a copy of the base skin. 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. NATS indents each skin to show its relationship to the surrounding skins. To the right of each skin are several action icons:

  • The Edit icon lets you change this skin's description and user types
  • The three Set Default icons allow you to set the skin as default for Affiliates, Account Reps, or Admins
  • The Add New Skin icon will create a new skin that will inherit the current skin's properties
  • The Edit Templates icon allows you to edit the available templates in the skin and/or create new ones
  • The Edit CSS Colors icon allows you to create/edit color themes and change the header/background logo of the skin
  • The View Templates icon (only on base skins) lets you view 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

To the right of the Manage Affiliate 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.

The Import/Export tabs on the top of the admin allow you to import or export your custom skins in and out of NATS.

Switching Skins

On the Skins & Templates Admin, the green, blue, and orange-shirted figures next to the skin let you 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.

Clicking the Edit Skin Settings icon next to a skin will open the option to edit the skin's name, description, and whether or not the skin is available for use on Affiliates, Account Reps, or Admins. On the Affiliate My Accounts page, affiliates may choose their own skin, but access to the Admin Control Panel allows you to switch between skins easily by selecting one from the drop-down menu in the top right-hand corner of the screen.

The Base Skin Cannot Be Edited

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 cannot edit the base templates. Instead, you will create a new skin, which will use the base templates unless you customize them.

Creating Skins

To create a new skin, go to the Skins & Templates Admin and choose the base skin in the Manage Affiliate Skins section which you want to edit. The default skin cannot be edited, but you can make a copy of it by clicking the Add New Skin 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 your 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 function_signup_advanced 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.