Carma gal custom

From TMMwiki
Jump to: navigation, search
CARMA
  Template Functions
CARMA Template Functions
carma_actor_photo_name
carma_comments_display
carma_comments_form
carma_count
carma_favorite
carma_gal_custom
carma_get_extended
carma_list
carma_list_favorites
carma_list_gals
carma_list_third_party_content
carma_list_videos
carma_login_log
carma_most_viewed
carma_newest
carma_news
carma_poll
carma_retrieve_sections
carma_search
carma_actors_search
carma_show_gal
carma_show_video
carma_top_actors
carma_top_rated
carma_upcoming
print_page_numbers
Template Function Aliases
carma_comment_display
carma_display_comment
carma_display_comments
carma_extended
carma_extended_data
carma_get_extended_data
carma_list_all
Common Parameters
assign
assign_prefix
count
data_only
display_on_assign
start
tpl

  • Purpose: display custom data for gallery and video content
  • Usage: {carma_gal_custom galid=1}
  • Required parameters: galid
  • Optional parameters: tpl, site, name, assign_prefix, data_only, assign, display_on_assign
  • Default Templates Used: gal_custom_fields
  • Variables created: {$carma_custom_data}

Parameters

(Required parameters in bold)

Parameter Description Possible Values Default Value Example
galid Display this gallery's extended data Any valid gallery number None. You must provide a valid gallery number galid="123"
tpl Template to be used other than gal_custom_fields The name of the template used to display this. gal_custom_fields. tpl="template_name"
siteid Overrides the default siteid Any valid Site ID number None. siteid="123"
name Sets the name of the custom field Any valid name accepted by NATS None. name="custom_field_name"
assign_prefix Sets the prefix of the variable returned Any text you want to use as a prefix None. assign_prefix="prefix_text"
data_only Loads up data for the template. 1 or 0, true or false 0 data_only="0"
assign Assigns the custom output to a different variable Any text you want to define the variable. None assign="variable"
display_on_assign Displays the custom template only if the assign variable is used. 1 or 0, true or false 0 display_on_assign="0"

You must set the galid in order to use this template function.

Description

Retrieve Custom Data from a content set, a single picture, or an actor. The custom data can be accessed using the following variable created:

  • $carma_custom_data

The variable being created will be an array setup like the following:

{$carma_custom_data.name} => This will set the custom field data.

Examples

{$carma_gal_custom galid=1} - Calls the carma_gal_custom function only using galid {$carma_gal_custom galid=1&tpl="template_name"&siteid=4} - Calls the carma_gal_custom function using a galid of 1, a template named "template_name", and a siteid of 4.