In Rotation > Settings > Import Replacements, you can create auto-replacement rules for imported data. This is useful for automatically modifying embed sizes, URL components, or other fields during import.
Example 1: Adjusting embed size
Suppose xVideo embeds have width=400, but you need width=500:
If this field = URL Contains this value = xvideo Then Search For - width=400 in This Field - embed code And Replace it With - width=500
Example 2: Changing URL parameters
An RSS feed provides URLs like http://somesponsor/gallery/xxxx.html?id=25, but you need id=30:
If this field = URL Contains this value = somesponsor Then Search For - id=25 in This Field - URL And Replace it With - id=30
Replacements support special meta tags for conditional field operations. For SEO purposes, you often need multiple descriptions for a single gallery. Instead of manually entering duplicate content, you can use meta tags to automatically copy and populate fields.
Available meta tags:
<!--EMPTY_VALUE--> - the field is empty
{DESCRIPTION}, {ALT}, {URL}, etc. - gallery field variables
Example: Populate empty Title from Description
If this field = Title
Contains this value = <!--EMPTY_VALUE-->
Then Search For - * (entire field)
in This Field - Title
And Replace it With - {DESCRIPTION}
This rule copies the gallery description into any empty Title field, automatically generating a second description for SEO purposes. You can adapt this to copy to other fields like URL or custom fields as needed.
<!--SPECIAL_CHARS_ONLY-->
special variable to indicate that the field contains only “-,.'#? and space (so it doesn't look like a normal description)
Like EMPTY_VALUE, but indicates the field contains something (the opposite condition).
This feature was originally designed for translations but works for any external processing of field values. You can call an external URL to modify imported data.
Example: Randomly add punctuation to descriptions
Create a PHP script at http://domain.com/replace.php:
<?php $rand_char = (rand(0, 100) > 50) ? '!' : '..'; echo $_GET['text'] . $rand_char; ?>
Then add this replacement rule:
If this field = URL
Contains this value = http
Then Search For - * (entire field)
in This Field - Alt (Title)
And Replace it With - external::http://domain/replace.php?text={ALT}
For each imported gallery, the script requests the URL with the actual ALT value. The script receives the response (description with added punctuation) and saves it to the Alt field.
Example 2: Save processed data to a different field
Use the same logic but save the result elsewhere:
If this field = URL
Contains this value = http
Then Search For - * (entire field)
in This Field - Description
And Replace it With - external::http://domain/replace.php?text={ALT}
Now the modified text is saved to the Description field instead of Alt. This flexibility lets you transform data in unlimited ways using custom scripts on your server.