定制 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

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固