承接 zzdjk6/silverstripe-imagelinkupgrade 相关项目开发

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

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

zzdjk6/silverstripe-imagelinkupgrade

Composer 安装命令:

composer require zzdjk6/silverstripe-imagelinkupgrade

包简介

Upgrade Image Links Used In HTMLText and HTMLVar Fields

README 文档

README

Overview

So, you have already run MigrateFileTask but find that you still need to do a lot of manual work for updating the broken image links in HTMLText and HTMLVarchar fields. Afraid ignoring some places while manual checking? Feel frustrated when trying to find the correct image link after upgrading? Tired of repeating yourself in such a machine-ish task? Your assistant is here!

Explain

Then, how will this tool help you?

In a nutshell, it will find all the places where a broken image link could be replaced with a correct link in all the HTMLText and HTMLVarchar fields of DataObject.

How it does the job? Take a look at ImageLinkUpgradeTask.php, the overall process is:

  1. Retrieve all DataObject classes contains HTMLText or HTMLVarchar field
  2. Retrieve all image records in DB, get the mapping relation of ID, Filename and the accessible URL
  3. Gather upgrade info by each class: which class, which field, what are the old links and their replacement for that field
  4. Apply changes to the database

More details could be found in the code.

How to use

Add dependency via composer:

composer require zzdjk6/silverstripe-imagelinkupgrade

Then just run it like other tasks: /dev/tasks/ImageLinkUpgradeTask

Caveats

  1. Make sure you backup your database before using this tool (it will modify your database).
  2. Currently, some DataObject will be updated several times due to class inherit (e.g., subclasses of SiteTree). This issue won't affect the final result (just a version jump compare to the original one)
  3. This tool keeps the Status of versioned DataObject in mind, which means if the Live version is not the same as the Stage version, only Stage version will be changed.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-10-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固