peterbenke/pb-fileinfo 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

peterbenke/pb-fileinfo

Composer 安装命令:

composer require peterbenke/pb-fileinfo

包简介

Adds infos to linked files in your website (filetype and -size).

README 文档

README

Introduction

This extension adds infos to linked files in your website (filetype and -size). For example: document.pdf (Pdf-file, 2.1 MB)

Administration

Installation

Install this extension via composer

composer req peterbenke/pb-fileinfo

=> Then include the static Typoscript in your template

Configuration

You can change the following values by the Constant-Editor:

  • Wrap
  • Write the fileinfo outside or within the a-tag

By default, the following file-extensions are considered:

  • pdf
  • doc
  • xls
  • zip
  • mp3
  • mp4

You can expand this list by typoscript. Here you see the whole typoscript, which comes from the extension:

tx_pb_fileinfo {

    enable = 1
    wrap = {$tx_pb_fileinfo.wrap}
    # inner: within the a-tag
    # outer: outside the a-tag
    mode = {$tx_pb_fileinfo.mode}
    fileInfos{
        # on the left-side: file-extension
        # %s is the placeholder for the filesize
        pdf = (Pdf-file, %s)
        doc = (Word-file, %s)
        xls = (Excel-file, %s)
        zip = (Zip-file, %s)
        mp3 = (MP3-file, %s)
        mp4 = (MP4-file, %s)
    }

}
[globalVar = GP:L=0]
    tx_pb_fileinfo {

        fileInfos{
            pdf = (Pdf-Datei, %s)
            doc = (Word-Datei, %s)
            xls = (Excel-Datei, %s)
            zip = (Zip-Datei, %s)
            mp3 = (MP3-Datei, %s)
            mp4 = (MP4-Datei, %s)
        }

    }
[global]
[globalVar = GP:L=1]
    tx_pb_fileinfo {

        fileInfos{
            pdf = (Pdf-file, %s)
            doc = (Word-file, %s)
            xls = (Excel-file, %s)
            zip = (Zip-file, %s)
            mp3 = (MP3-file, %s)
            mp4 = (MP4-file, %s)
        }

    }
[global]

%s is the placeholder for the calculated filesize.

Note: This is not the most beautiful way to distinguish between the languages, but there is more flexibility to add new file-extensions. You just have to adjust your ids from your sys-language-records.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2017-10-30

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固