get_videos
{get_videos} is used to include your desired videos into the array. You have handful of parameters at your disposal.
Usage
1
{get_videos parameters}
Copied!
It can use following parameters
Parameter Name
Options
assign
Store the result(Array) to this variable
active
Get active videos:
  • yes
  • no
broadcast
Type of video:
  • public
  • private
category
Specific category videos. Multiple categories should be separated with comma ‘,’:
  • Category ID.
count_only
Set to true if you only want to count result:
  • true
  • false
date_span
Get videos for specific time frame:
  • all_time
  • today
  • yesterday
  • this_week
  • last_week
  • this_month
  • last_month
  • this_year
  • last_year
exclude
Exclude video from result:
  • Video ID
featured
Get featured video:
  • yes
  • no
limit
Number of results you want:
  • Numercial Figure
nouser
It will exclude provided userid’s videos from result:
  • User ID
order
Sort your result. You also need to tell how to order your result. asc OR desc, e.g ‘videoid desc’
  • videoid
  • title
  • date_added
  • views
  • rating
  • last_viewed
  • featured_date
  • RAND()
show_related
Set to if you want to show related videos. For this to work properly, also provide title & tags:
  • true
  • false
status
Video Status:
  • Successful
  • Processing
  • Failed
tags
Video Tags. Multiple tags should be separated with comma ‘,’:
  • Tags
title
Video Title:
  • Title
user
User specific videos:
  • User ID
videoid
Specific video with video id:
  • Video ID
videokey
Specific video with video key:
  • Video Key

Examples

Example 1
1
{get_videos assign=custom_videos limit=10 featured="yes"}
Copied!
Above code will get first 10 featured videos and stores the array in {$custom_videos} varible. Now we will loop through the variable to display the videos.
1
{section name=cv_list from=$custom_videos}
2
{include file="$style_dir/blocks/video.html" video=$custom_videos[cv_list]}
3
{/section}
Copied!
[post_link id=”199″] and [post_link id=”237″]
Example 2
1
{get_videos assign=usr_feats active="yes" featured="yes" limit=5 order=" featured_date desc" user=1}
Copied!
This will get first 5 active featured videos of user with ID “1” and will sort them according to their featured_date from lasted to oldest. {$usr_feats} contains loop. Time to display.
1
{section name=u_feat from=$usr_feats}
2
{include file="$style_dir/blocks/video.html" video=$usr_feats[u_feat]}
3
{/section}
Copied!
Loading...
Last modified 12d ago
Copy link