Difference between revisions of "NATS4 Skins and Templates Admin"

From TMM Wiki
Jump to navigationJump to search
 
(30 intermediate revisions by 4 users not shown)
Line 3: Line 3:
 
}}
 
}}
  
The Skins and Templates Admin lets you manage your sites.  
+
The [[ct#Skin|Skins]] and [[ct#Template|Templates]] Admin allows you to edit and manage the look and feel of your sites, as well as the appearance of your [[NATS]] system.
  
[[File:Templates-admin.png|450px|The NATS4 Skins and Templates Admin]]
+
[[File:Templates-admin-41.png|450px|The NATS4 Skins and Templates Admin]]
  
Three drop-downs in the Default Skin section let you choose the default skin for Affiliates, Sales Representatives, and Administrators. NATS won't switch anyone to the new skin if they chose their own skin.
+
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.  
  
Next to the Manage Skins section header is a Flush Template Cache link.  Click this button if your templates are not displaying correctly; if the problem persists, please [http://clients.toomuchmedia.com submit a ticket.]  NATS indents each skin to show its relationship to the surround skins; a skin inherits the properties of the skin above it with less indenting -- the parent skin -- and each template in the skin retains its parent's properties until you customize the child's template the first time.   Right of each skin are several action icons:
+
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.
* The Edit icon lets you change this skin's description and user types
 
* The Duplicate Skin icon creates a new child 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
 
  
Two tabs at the top of the screen let you Export or Import a skin.
+
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 [http://clients.toomuchmedia.com 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 ===
 
=== Switching Skins ===
On the [[Skins & Templates Admin]], the Default Skins drop-down lets you to
+
On the [[Skins & Templates Admin]], the green, blue, and orange-shirted figures next to the skin let you select the [[ct#Skin|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.
select the [[ct#Skin|skin]] that each type of user sees by default. Selecting the
 
skin automatically sets it. Affiliates keep the default skin they had when they created an account; only affiliates that sign up after you change the default skin get 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.
+
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.
  
=== Editing the Base Skin ===
+
=== The Base Skin Cannot Be Edited ===
We recommend you don't edit the base skin. All sites and sections
+
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.
use the base skin, and the system lets you revert to this skin's  
 
templates when you make a mistake. But you can't revert to the base
 
template if you change it.  Please duplicate the base templates and
 
change the duplicate.
 
  
 
=== Creating Skins ===
 
=== Creating Skins ===
Go to the [[Skins & Templates Admin]].  Find the [[Default Skin]] in the
+
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 [[ct#Skin|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.
Current Skins section. The default [[ct#Skin|skin]] cannot be edited, but you can
 
make a copy of it by clicking the duplicate icon. [[NATS]] asks you to name
 
and describe the new skin. You can also choose which [[NATS Users|users]] can use this
 
skin.
 
  
You can duplicate copies the same way. These duplicates inherit the
+
You can also duplicate copies of your skins in the same manner, and these duplicates will inherit the original skin's design.
original skin's design.
 
  
 
== Templates ==
 
== Templates ==
Click the View Templates icon, described above, to go to the template manager. The template manager lists each template; right of each template are several action icons:
+
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 separates the child template from its parent
+
 
* The Revert icon throws away your changes and restores the child template to a duplicate of its parent
+
* 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 Edit icon lets you edit a template after you customize it
+
* The ''Revert'' icon throws away your changes and restores your edited template to its default configuration
* The Duplicate icon lets you duplicate a template
+
* The ''Edit'' icon lets you edit a template after you customize it
* The View icon previews the template for you.  Note: the preview won't contain any dynamic information the template expects, so a correctly coded template may display incorrectly
+
* The ''Duplicate'' icon lets you duplicate a template
* The Delete icon deletes the template. You cannot recover a template after you delete it
+
* The ''View'' icon previews the template for you.  Note: the preview won't contain any dynamic information required by the template, such as [[Smarty|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 greys out or hides unavailable action icons.
+
Note: [[NATS]] automatically greys out or hides unavailable action icons.
  
 
=== Editing Templates ===
 
=== Editing Templates ===
In the [[Skins & Templates Admin]], click the Template List Icon of the
+
To edit templates, go to the [[Skins & Templates Admin]] and click the ''Edit Templates'' icon next to the [[ct#Skin|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.
[[ct#Skin|skin]] you want to edit. Find the [[ct#Template|template]] you want
 
to edit, click the customize button, and click the edit button.
 
If you make a mistake, you can go back to the template list and click
 
the revert button; this gets rid of all changes made to the template
 
after you clicked the customize button.
 
  
After saving the template, change to the skin you
+
After saving the template you can view a preview of what it will look like by clicking the View Template icon to the right.
edited and view the template.
 
  
 
== Cached Templates ==
 
== Cached Templates ==
Smarty caches [[ct#Template|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, you're probably looking at a cached template.  
+
Smarty caches [[ct#Template|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.  
  
Re-render the template by going to the [[Skins & Templates Admin]], find
+
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.
the [[ct#Skin|skin]] you edited, and click the flush template cache link.
 
  
 
== Affiliate Sign-up Templates ==
 
== Affiliate Sign-up Templates ==
 
=== Required Checkboxes ===
 
=== Required Checkboxes ===
To force affiliates to accept your terms of service, you can require affiliates mark a checkbox on your join form. Add the following code to the form part of the the ''external_signup'' template:
+
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:
  
 
<pre>
 
<pre>
Line 82: Line 68:
 
</pre>
 
</pre>
  
NATS ensures this checkbox is marked before allowing the affiliate to sign-up.
+
NATS will then verify that this checkbox has been marked before allowing the affiliate to complete their signup process.  
  
Note: you also want to add a link or a copy of your terms of services to template and add some text next to the checkbox.
+
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 ===
 
=== Advanced Sign-up ===
 
If you setup more than one [[PayVia]] (payment type) for affiliates, you can let new
 
If you setup more than one [[PayVia]] (payment type) for affiliates, you can let new
affiliates use the advanced affiliate signup form. The advanced
+
affiliates use the advanced affiliate signup form. The advanced
 
affiliate signup form gives affiliates a choice between payment types
 
affiliate signup form gives affiliates a choice between payment types
when they signup to an affiliate program. Enable or add the following
+
when they signup to an affiliate program. To use this feature, enable or add the following configuration file option:
configuration file option:
 
  
 
<pre>
 
<pre>
Line 97: Line 82:
 
</pre>
 
</pre>
  
Now NATS will use the advanced sign up and edit forms.
+
NATS will now use the advanced sign up and edit forms.
  
 
[[Category:NATS4 Administrator Guide]]
 
[[Category:NATS4 Administrator Guide]]
 +
[[Category:NATS4 Skins and Templates]]

Latest revision as of 14:10, 15 August 2014

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.