承接 appmanschap/craft-playlister 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

appmanschap/craft-playlister

最新稳定版本:1.0.9

Composer 安装命令:

composer require appmanschap/craft-playlister

包简介

Import Playlists directly into CraftCMS

README 文档

README

Playlister Craft plugin icon

Playlister for Craft CMS

Playlister is a CraftCMS plugin for importing YouTube playlists into Craft. Retrieve the playlists and the corresponding videos.

Requirements

This plugin requires CraftCMS 5.0.0 or later.

Installation

To install the plugin, either install it from the plugin store, or follow these instructions:

  1. Install with composer
composer require appmanschap/craft-playlister
  1. Install the plugin
craft plugin/install craft-playlister
  1. Add your YouTube API token in the settings.

Usage

You can retrieve playlists & videos either by using Fields the Template variables. Both scenarios will return a Playlist element or Video element

Fields

Create a new Playlist Field or Video Field and add it to your entry type.

Template variables

craft.playlister.playlists()

Returns a PlaylistQuery. Query as you like to retrieve the playlists. Example (retrieve enabled playlists):

craft.playlister.playlists.enabled(true).all()

Retrieve a single playlist by the playlist id

craft.playlister.playlists.playlistId(YOUR-PLAYLIST-ID).one()

craft.playlister.videos()

Returns a VideoQuery. Query as you like to retrieve the videos.

Retrieve embeddable videos example

craft.playlister.videos.embeddable(true).all()

Retrieve videos from a playlist

craft.playlister.videos.playlistId(YOUR-PLAYLIST-ID).all()

Retrieve videos with tags example

craft.playlister.videos.tags[('awesome', 'video']).all()

Playlist element

Method: getVideos(?bool embeddable)

Retrieve the videos of the playlist. The embeddable parameter will filter the query by it's value when it's available.

Video element

Method: getThumbnail(string size)

The method will return the first possible thumbnail url by it's given size. If no parameter is passed then it will retrieve it's known largest thumbnail url.

Possible sizes:

  • default
  • medium
  • high
  • standard
  • maxres

Support

Get in touch by creating a Github issue

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2024-09-17