Duplicating Adtool Types

From TMM Wiki
Revision as of 16:58, 18 December 2008 by Trinidadr (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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
Adtools Admin
The Adtools Admin
Duplicating Adtool Types
Add New Adtools
Add New Adtool Type
Bulk Import Adtools
Downloadable Content Adtool Type
Get Hosted Galleries
Adtool Templates
Content of the Day
Linkcodes and Tools Admin
Setting Rules

These instructions help you duplicate an adtool type. Do not customize the duplicated adtool type in the Adtools Admin before you complete these instructions.

Go to the Adtools Admin, find the adtool type you want to duplicate, and click its Duplicate Adtool Type icon. Enter a shortname that identifies your duplicated adtool type. NATS sends you to a page so you can edit your duplicated adtool type. Change its Description and click Save Changes -- you can make other changes later. Click the View Adtools tab and upload your duplicated adtool type's initial adtool.

I'll use the name, original adtool type, to describe the adtool type that existed before you clicked the Duplicate Adtool Type icon. I'll use the name, duplicated adtool type, to describe the new adtool type NATS created after you clicked the icon.

Go to the Skins & Templates Admin and edit the default skin. You need to find templates related to your original adtool type. The template names you need contain three parts: "function_display_adtool", a shortname, and a view type. Find template names starting with "function_display_adtool" and containing the original adtool type's shortname. For example, to duplicate the Content adtool type, find the following two templates:

  • function_display_adtools_content_min
  • function_display_adtools_content_max

For each template you find, make your web browser open the template's edit page in a new tab or window. Usually you can do this by holding your keyboard's Ctrl key while clicking the edit icon in NATS. Without closing the new tabs or windows, go back to the template listing and scroll to the top of the screen. In the create template box, enter a name with the following form:

  • function_display_adtools_<shortname>_<view type>

Replace <shortname> with your duplicated adtool type's shortname. Replace <view type> with the view type of the first template you found earlier. For example, the first Content adtool type template gets the following name:

  • function_display_adtools_mytool_min

In the Header drop-down, choose No Header; in the Footer drop-down, choose No Footer. Enter a description and click Add. Go to the first template you found earlier, copy the entire contents of the template's Template Body, and paste it into the new template's Template Body.

In the new template, you need to update the variables that reference the original adtool type's fields so that they reference the duplicated adtool type's fields. When changing the field names in the template, prefix "ign_" to each field name.

After duplicating each template you found earlier, return to the Ad Tools Admin and edit your duplicated adtool type. In the Display Template field, click the drop-down box, select the option with your adtool's shortname, and click Save Changes.

From the Main Program Page, go to Affiliate Adtools, find your duplicated adtool type, and try getting the initial adtool you uploaded earlier. If it doesn't work, please submit a ticket and we'll help you out.


You can find specific instructions for duplicating a downloadable content adtool type in the New Downloadable Content Adtool Type article.