RYO Membership Directory Plugin Administrator Manual
Back to Index
16 Templates
Sixteen templates are provided in Settings, Templates to design Directory Views, Search Views and Detail Views.
Nine list templates are provided for Directory Views and Search Views. Three templates are provided for Detail Views. Two templates are provided for Featured Member and two for Featured History. This is to provide flexibility in creating various directories and displays.
Technically, the templates are interchangeable. That means that if you like how Search Results look, you could use that template to display all the membership listings. That's basically what we did to create the 'Yearbook Directory.' Or, if you don't want to show promo text, you could use a Directory template to display Search Results, even without editing the actual templates.
Codes
Templates can also be edited to suit. And, if you experiment but don't like the result, you can just check the box under the template, then click Save, and the template will be restored to the original supplied version, ready for you to edit again or use as is.
The templates are HTML code with these codes for substitutions that will insert the indicated values into the templates. If you're not comfortable with HTML have a qualified webmaster assist with this.
These codes are used in the templates in Settings, Templates to format information.
[id] = User ID
[login] = User Login
[profilelink] = URL to member detail page
[membertype] = Member Type/Status
[levels] = Wishlist Member Levels for this member, each on a new line*
[levels,] = Wishlist Member Levels for this member, separated by commas*
[fname] = First Name
[lname] = Last Name
[flname] = First and Last Name
[lfname] = Name, last name first
[designation] = Designation field
[,designation] = If there is a designation field, a comma, a space, and the designation
[name2] = Contact 2 Name
[company] = Company Name
[companyname] = Company Name, or, if that's blank, the person's name
[addr1] = Address line 1
[addr2] = Address line 2
[city] = City
[state] = State
[zip] = Zip/Mailing Code
[country] = Country
[addrline] = Full address on one line
[mapaddress] = Google Maps popup link to the address
[location] = Location field, used for directions or a Company Address
[maplocation] = Google Maps popup link to the location
[phones] = Phone numbers
[email] = Email, a complete link, encoded to resist harvesting by webbots.
[office] = Office held
[1office] = Office held, offset to ignore the first character (a sorting character)
[cf1], [cf2] ... [cf7] = Custom fields #1 through #7
[profile] = General Profile Text
[promo] = Promo Copy
[ts1], [ts2] ... [ts7] = Text-Select Fields #1 through #7
[tstrim:nn] = Trim Text-Select Fields to a certain word count. Normally, in member lists data in Profile text, Promo text, and Text-Select fields is trimmed to the number of words you've selected in Settings, usually 35. While you can make a change in Settings, that affects all templates. You can override this value with this template code, replacing nn with the maximum number of words allowed in this template only.
[rss:q:f:t:w] = RSS feed, where q is the number of stories to show, f is the format code, t is the main title code, and w is the maximum number of words to show in the summary/description. The format code is1
for headline only,2
for headline and description/summary, and3
for headline, date, and description/summary. The main title code is0
for no main website title,1
to display main website title, and2
to display main website title and description. RSS Feeds may be used in Detail View and Featured Member displays only.
[photo] = URL to Image #1. If no file present, points to "no image" grey block. (Not enclosed in <img> tag.)
[photo1] = URL to Image #1. (Also available for images 2 - 5 if allowed.) If no image, it's blank.
[gravatar] = avatar image from Gravitar.com. (Enclosed in <img> tag.) Default 80 pixel size.
[gravatar100] = avatar image, as above, 100 pixels square. Typical avatar replacement for photos in search results templates.
[gravatar200] = avatar image, as above, 200 pixels square. Typical avatar replacement for photos in main profile templates.
[gravatarw] = avatar image, as above, but styled to fill the div. You can also use [gravatar200w] and get a larger image to start with.
[adminnotes] = Admin Notes, usually alternate promo copy
[logoimg] = On certain systems where special logos are installed, use this code to insert that image in the layout
[fmdate] = The date a member was featured. Valid only on Featured Member History pages.*Wishlist Member level displays include only levels that apply to a particular directory
Be sure to end your template lines with <br> if you want the next template line/value to start on a new line. (This does not apply for Member List: line 1 values; they automatically stay in line 1.)
Logic
Template lines may be written with a minimum amount of logic using IF, IFNOT, ==, and ELSE at the beginning of a line. Spacing is critical as in these examples:
Example 1. To display a line with addr2 only if there is such a value, write the line as:
IF [addr2] [addr2]<br>
Example 2. To display a member type only if the member type is not "Publisher":
IFNOT [membertype]==Publisher [membertype]<br>
Example 3. To display a Gravitar in search results if no photo has been uploaded:
The original line in the template read:
Insert an IF clause at the beginning, and add an ELSE on the following line along with the Gravatar code:
This tells the system that if there is a [photo1] to go ahead and display it, else display the Gravatar.
See the supplied templates for further examples.