NATS4 Gallery Builder Module

From TMM Wiki
Revision as of 15:26, 28 June 2009 by Tmmdavid (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
NATS Extras
TMMid
Gallery Builder Module
CAPTCHA
Remote Affiliate Authentication
Build Your Own Anything Module
Shopping Cart Sales
Moving Tours, Members' Area, and Galleries
Admin Areas
Extended Sales
NATS Code Wordpress Plugin
Error_message_display
ATVOD Verification Process

Note: the Gallery Builder module is a NATS4 add-on. Please submit a ticket asking us to enable it on your program.

Set up Gallery Builder Content

Create a new directory on your web directory on your server. (It doesn't have to be your NATS server) Inside the directory, create a folder for each content set and inside each content set folder, add content using a naming convention. For example: both content1 and content2 will have a thumb1.jpg, a 1.jpg, a thumb2.jpg, a 2.jpg, etc.

Set up Gallery Builder Templates

On the server, create a template. This template must be PHP parsable and web accessible. In the template, reference your images using the full path to the content set and replacing the name of the content set with the following PHP code: <?=$_GET['content']?>.

For example:

  • your content folder is: /mycontent
  • your content sets are Set1 and Set2
  • your naming convention is thumb1.jpg, 1.jpg, thumb2.jpg, 2.jpg, etc.
  • your picture reference becomes <img src="/mycontnet/<?=$_GET['content']?>/1.jpg">

When affiliates select between Set1 and Set2, <?=$_GET['content']?> is replaced by the content set they picked. The picture reference would then be <img src="/mycontent/Set1/1.jpg">.


Set a default content directory

To ensure the page displays correctly to surfers with a missing or bad content field set, you can set a default. Continuing our previous example, we will make Set1 our default content set. This will be used if the content set is unspecified or does not exist in /mycontent/.

if(!$_GET['content'] || !is_dir('/mycontent/'.$_GET['content'])){
$_GET['content']='Set1';
}

This will be at the top of the page, and your picture reference would remain unchanged.

Use the Gallery Builder in NATS's Ad Tools Admin

After you setup Gallery Builder, a new Gallery Builder Types section appears in Adtools Admin. Two default types come with Gallery Builder: Gallery Builder Templates (gbtemplate) and Gallery Builder Content Sets (gbcontent).

Create a template using the instructions above, view the gbtemplate adtools, and enter the URL to the template in the URL field. You may also fill in the optional fields that describe the template. Click Add Template.

Upload a content set using the instructions above, click the View Adtools button next to gbcontent, enter information about the content set, and click Add Content.

Affiliate Gallery Access

Affiliates can now access the galleries in the Gallery Builder tab on the Affiliate Ad Tools page. you want and click Get Linking Codes. The link codes are then displayed in a textbox.

Gallery Builder Template Groups

Gallery Builder's content and template grouping lets you restrict which content can be used on particular templates. After adding an gbtemplate adtool, you can place it in particular groups. Only content from the same group as the template shows up in the NATS Ad Tools Admin.

On the Gallery Builder configuration page, click ADTOOLS_GB_TEMPLATE_UNFILTERED to disable grouping.