govtnz/silverstripe-externallinks
Composer 安装命令:
composer require govtnz/silverstripe-externallinks
包简介
Adds tracking of external broken links to the SilverStripe CMS without revising content in the database
关键字:
README 文档
README
Introduction
Core module
The external links module is a task and ModelAdmin to track and to report on broken external links. It is maintained by Kirk Mayo at Silverstripe.
This fork
This is a fork which removes a core piece of the module's functionality. With this fork installed, the module will no
longer write the ss-broken css class to broken URLs. The reason for this change is that saving the modified record
to the database changes the publication date of versioned content, pushing it back to the top of RSS feeds and Recently
Edited Pages.
The new config.yml file contains a boolean value that can be used to turn the "add class" functionality on and off.
Apart from the Maintainer contact in the next section, the remainder of this README is the original document by Kirk Mayo.
Maintainer Contact
* Leigh Harrison: leigh (dot) harrison (at) dia (dot) govt (dot) nz
Requirements
* SilverStripe 3.1 +
Features
- Add external links to broken links reports
- Add a task to track external broken links
Installation
- If you have composer you can use
composer require silverstripe/externallinks:*. Otherwise, download the module from GitHub and extract to the 'externallinks' folder. Place this directory in your sites root directory. This is the one with framework and cms in it. - Run in your browser -
/dev/buildto rebuild the database. - Run the following task http://path.to.silverstripe/dev/tasks/CheckExternalLinks to check for broken external links
Report
A new report is added called 'External Broken links report'. When viewing this report, a user may press the "Create new report" button which will trigger an ajax request to initiate a report run.
In this initial ajax request this module will do one of two things, depending on which modules are included:
- If the queuedjobs module is installed, a new queued job will be initiated. The queuedjobs module will then manage the progress of the task.
- If the queuedjobs module is absent, then the controller will fallback to running a buildtask in the background. This is less robust, as a failure or error during this process will abort the run.
In either case, the background task will loop over every page in the system, inspecting all external urls and
checking the status code returned by requesting each one. If a URL returns a response code that is considered
"broken" (defined as < 200 or > 302) then the ss-broken css class will be assigned to that url, and
a line item will be added to the report. If a previously broken link has been corrected or fixed, then
this class is removed.
In the actual report generated the user can click on any broken link item to either view the link in their browser, or edit the containing page in the CMS.
While a report is running the current status of this report will be displayed on the report details page, along with the status. The user may leave this page and return to it later to view the ongoing status of this report.
Any subsequent report may not be generated until a prior report has completed.
Dev task
Run the following task http://path.to.silverstripe/dev/tasks/CheckExternalLinks to check your site for external broken links.
Queued job
If you have the queuedjobs module installed you can set the task to be run every so ofter Add the following yml config to config.yml in mysite/_config have the the task run once every day (86400 seconds)
CheckExternalLinks:
Delay: 86400
Whitelisting codes
If you want to ignore or whitelist certain http codes this can be setup via IgnoreCodes in the config.yml file in mysite/_config
CheckExternalLinks:
Delay: 60
IgnoreCodes:
- 401
- 403
- 501
govtnz/silverstripe-externallinks 适用场景与选型建议
govtnz/silverstripe-externallinks 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.86k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2015 年 02 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「silverstripe」 「links」 「href」 「broken」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 govtnz/silverstripe-externallinks 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 govtnz/silverstripe-externallinks 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 govtnz/silverstripe-externallinks 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Adds tracking of broken external links to the SilverStripe CMS
This Magento 2 multi store extension adds the alternate hreflang tag for: Pages, Product and Category.
Link Field Type for Craft CMS
Set Links with a specific language parameter
Links element Silverstripe
统计信息
- 总下载量: 7.86k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 32
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-02-23