Carma list videos

From TMM Wiki
Revision as of 15:05, 31 October 2008 by Tmmdan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to 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

carma_list_videos

  • Purpose: Display a list of video galleries on any template.
  • Usage: {carma_list_videos count=20 start=0 section=1}
  • Required: none
  • Optional: count, start, section, order, tpl, easy_keys, data_only, assign_prefix, assign, display_on_assign, actors, locations, categories, groups
  • Default Templates Used: show_videos
  • Variables created: $carma_content, $carma_content_count, $params

Parameters

  • count: how many items to display. (Default: 20)
  • start: start at this item. (Default: 0)
  • section: which section the items belong to. It can be a comma-delimited list of section ids or a specific section id. If it is not specified, CARMA uses the current section.
  • order: what order to sort the videos in. Possible values: active, caption (Default: active)
  • tpl: what template to use (Default: show_videos)
  • easy_keys: set to 1 to use continuous keys instead of keys based on the gallery's id for the $carma_content array.
  • data_only: set to 1 to only store the data for later use. (Default: 0/false)
  • assign_prefix: string to use infront of created variables for their names, including assign below.
  • assign: name of the variable holding the output of the function. Leave blank to not store the output.
  • display_on_assign: set to 1 to display the template even when using assign.
  • actors, locations, categories, groups: Set any of these to 1 to make CARMA fetch the respective information for each gallery.
  • full_metadata: set to 1 to put the following information in variables: total length, total size, name, clip_count, files, files size, and files length.

full_metadata Variables

By default, the following Smarty variables are created when you enable the full_metadata parameter

  • {$entry.type_data.wmv.total_length}
  • {$entry.type_data.wmv.total_size}
  • {$entry.type_data.wmv.name}
  • {$entry.type_data.wmv.clip_count}
  • {$entry.type_data.wmv.files} an array of clips
  • {$entry.type_data.wmv.files_size} an array of clips sizes
  • {$entry.type_data.wmv.files_length}


Description

Displays the count video content sets starting at start for the current or a given (set of) section(s). It uses the show_videos template to display this information.

Examples

Paging

This function has built in paging. You just need to set start to be the start of output and it will go to 'count'. On the next call it has to be start+count and the go backward it would be start-count. Out default list_videos template takes care of the math for you, but you need to add the start value to the function call like this:

{carma_list_videos count=20 section=1 start=$smarty.request.start }

$smarty.request.start will always contain the page's start value.