developer documentation r17362

fm:FileInfo

The fm:FileInfo allows you to important all information from a specific file in your template engine..

Example

<fm:FileInfo mid="12345"> Title: <b>{$$media.title</b><br /> Rating <b>{$$media.rating</b><br /> </fm:FileInfo>

Supported attributes

NameRequiredDefaultDescription
dateFormatOptional%Y-%m-%d %H:%i:%sThis attribute allows you to change the way dates are displayed within the list. By default it will be YYYY-MM-DD HH:MM:SS. The format which should be used is the same as PHP's date() function.
midRequiredN/A

Template variables

NameDescription
media.approvedcommentsThe total number of approved comments for this file.
media.notdeniedcommentsThe number of comments that have not been denied for this file.
media.channelThe channel-id if the file was associated to a channel.
media.channel_nameThe name of the channel if the file was associated to a channel.
media.channel_shortnameThe 'shortname' of the channel if the file was associated to a channel.
media.contenttypeThe mimetype of the file, for example: audio/mp3.
media.conversiontimeThe time needed to transcode the file, in seconds.
media.converttimeThe date and time when the transcoding was completed for this file.
media.commentcountThe total number of comments to this file.
media.dateThe original creation date of the file. If we cannot detect this, this will be the same as the upload date.
media.durationThe duration of the file in a human-readable format (example: 00:01:07).
media.extensionThe original file extension, for example 'mp4'
media.filetypeThe filetype. This is specified as a number between 1 and 4. Read below for more information.
media.filenameThe original filename
media.filesizeThe size of the file, in bytes.
media.heightThe height of the original file in pixels.
media.hitsThe number of views the file got.
media.idThe unique id of the file.
media.injectorA string describing the application that created the file, for example Uploader or Recorder.
media.lengthThe duration of the file in as a floating point number in seconds. (example: 187.33, for 3 minutes, 7 seconds)
media.messageThe description of the file.
media.metadataUser or developer defined meta-data, read below for more information.
media.ofilesizeThe total size of all transcoded versions of this file, including thumbnails in bytes.
media.publicUrlThe base-url associated with the file. See below for more information.
media.ratingThe average rating. This is a floating point number between 0 and 10. 2 decimals are provided.
media.statusThe status of the file. Generally this is always 3, meaning 'succesfully converted'.
media.titleThe title of the file.
media.tagsA space delimited list of tags associated with the file. For example "amsterdam holiday".
media.uidThe id of the user who uploaded the file.
media.updownratingThis template variable will give you the "thumbs up/down" rating. The actual formula is actually based on the votecount and average rating, and assumes people rate 0 for down, and 10 for up.
media.uploadThe date and time the file was added to the Media Factory.
media.uploadageThe time that has passed since the file was uploaded. The format will be for example 5 seconds, 20 minutes or 12 days.
media.user_cityThe submitter's city.
media.user_countryThe submitter's 2-letter country code.
media.user_firstnameThe submitter's first name.
media.user_lastnameThe submitter's last name.
media.user_nameThe username of the person uploading the file.
media.user_nicknameThe submitter's nickname.
media.user_stateThe 2-letter state or province code of the submitter.
media.votecountThe total number of votes cast.
media.widthThe width of the original file in pixels.
media.geo_latitudeThe latitude of the file if available, otherwise empty.
media.geo_longitudeThe longitude of the file if available, otherwise empty.
media.authorThis field is used to retrieve the name entered by an anonymous user. Often used when users can comment without registering, by a captcha.

See also

<< 7.3.8 fm:EventInfo 7.3.10 fm:Friends >>