Help: Collections |
What are Collections? A Collection in TNG refers to a type of media. TNG's standard collections are Photos, Documents, Headstones, Histories, Videos and Recordings, but TNG also allows you to create your own collections. A collection is not restricted to a single file type. For example, .jpg images can be part of any collection, not just Photos or Documents, and the Photos collection does not have to contain only image files. |
Adding Collections To add a new collection, click on the "Add Collection" button wherever it is visible (for example, on the Media, Add Media and Edit Media screens). When the small popup appears, fill out the form. Take note of the following: Collection IDA very short string of characters to be an identifier for this collection. It should not contain spaces or any characters that are not alphanumeric, and ideally it should be 10 characters or less. For example, if you were creating a collection for military records, you might put "military" in this field. This value will not be displayed anywhere, so what you name it doesn't really matter, just as long as it is unique. Export asWhen you export a GEDCOM file that includes media, the file will contain a line for each item indicating what type of media it is. This should be a single word in uppercase. For example, a photo will be exported with the type "PHOTO". If you are creating a new Collection called "Newspapers", you may want to put "NEWSPAPER" in this field. Display titleThis is the name that will be displayed wherever collections are listed, and whenever items of this collection are shown. The Display Title can be slightly longer than the Collection ID, but it should still be relatively short. Using the same example, you might put "Military Records" in this field. By default, the name you pick will be used in all languages. If you support multiple languages and want your Display Title to be translated into the languages you support, you will need to create an entry in the "cust_text.php" file in each language folder. The key of the $text message should be the collection ID, and the value is the Display Title. In this example, your entry would look like this: $text['military'] = "Military Records"; Duplicate that line in the cust_text.php file for each language you support, translating only the "Military Records" portion. The key or ID ("military") should not be translated. Folder nameThe name of the physical folder or directory on your web site where items in this collection will be stored. It should be relatively short, with no spaces and only alphanumeric characters (e.g., "military"). After entering a value, you can click on the "Make Folder" button to try and create it. You should see a message indicating whether the creation was successful or not. If your server did not allow the operation, you will have to use an FTP program or an online file manager to create the folder. It should be created in the same parent folder as the "photos", "documents", "histories" and other collection folder. Make sure the actual name matches the name you put here exactly ("Military" does not match "military"). Local path(s)This field helps you determine how much of your local media path names need to be stored on your site during a GEDCOM import by removing the parts that are unique to your home computer. Enter the base path or paths (separate multiple entries with commas) where files from this collection are located on your home computer. In other words, if the files on your computer are located in "C:\MyGenealogy\MyCollectionFiles", that is what you should enter here. TNG will then strip that part from each incoming path name, leaving you with just the file name and any additional subfolder names. If the files for this collection are in more than one place on your local computer, or if your GEDCOM file refers to them without the full path name (ie, just "MyCollectionFiles"), include those paths as a multiple entries. If some of your files reside in subfolders of this location and you want to preserve that structure on your web site, do not include the subfolders in this path. If you want all files to go into the same folder on your site, leave this field blank. If the field is blank, TNG will automatically strip everything but the file names. Icon fileYou must create your own icon, or use one of the existing ones, and enter the name of the icon file here. The icon file can located in the main TNG folder, or you can put it in the "img" folder along with the other standard media icons (like "tng_photo.gif" or "tng_doc.gif"). If you put it in the "img" folder, you must prefix the icon file name with "img/". Thumbnail fileThis is the name of the default thumbnail image for this collection. In other words, if you create a media item in this collection and do not supply a thumbnail for that specific item, the image designated here will be used as the thumbnail. The thumbnail must be placed in the "img" folder. Display orderEnter a whole number here to indicate the order in which your custom Collection types will be displayed in the public dropdown menus. Lower numbers appear first. Same setup asYou may have noticed that the Add Media and Edit Media screens change slightly depending on which Collection you choose. This "same setup as" field allows you to indicate which of the standard Collection types your new Collection should resemble most, with regard to the layout of those screens. Editing/Deleting Collections To edit an existing custom Collection (the standard ones cannot be edited, except in the General Settings), select that Collection from the dropdown list and click on the Edit button. The fields will be as described above. To delete an existing custom Collection, select that Collection from the dropdown list and click on the Delete button. Neither the physical folder you created, nor any of the items in it, should be deleted. |