定制 justinholtweb/craft-puppy 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

justinholtweb/craft-puppy

Composer 安装命令:

composer require justinholtweb/craft-puppy

包简介

A lightweight Craft CMS 5 control panel companion that follows editors through their session, tracking visited pages, edits, and providing quick links back.

README 文档

README

A lightweight control panel companion that follows editors through their session. Puppy displays a draggable, collapsible overlay with a live trail of visited pages, edited elements, and quick links back to recently worked-on locations.

Requirements

  • Craft CMS 5.0 or later
  • PHP 8.2 or later

Installation

Open your terminal and run:

composer require justinholtweb/craft-puppy
php craft plugin/install puppy

Or install via the Craft control panel under Settings > Plugins.

Features

Session Trail

Puppy records where you go in the control panel and normalizes routes into readable labels:

  • /admin/dashboard → Dashboard
  • /admin/entries/blog → Entries: Blog
  • /admin/entries/blog/123-spring-launch → Spring Launch
  • /admin/assets/images → Assets: Images
  • /admin/globals/footerSettings → Global: Footer Settings

Edit Tracking

Puppy listens for element save events on the backend and records them separately from page visits. Each edit captures the element type, title, action (saved or created), and section/volume context.

Floating Panel

The overlay sits on top of the control panel and includes:

  • Trail tab — the last 25 pages visited, with clickable links back
  • Edits tab — elements you saved or created during the session
  • Stats tab — pages visited, items edited, and session duration

Collapse and Drag

  • Collapse to a small badge showing the paw icon and item count
  • Drag the panel anywhere on screen
  • Position and state are remembered across page loads via localStorage

Pause and Clear

  • Pause tracking at any time without hiding the panel
  • Clear the session trail to start fresh

How It Works

Frontend: A JavaScript module loads on every CP page. It detects the current route, normalizes it into a human-readable label, and sends it to the plugin backend. The panel polls for updates every 10 seconds to pick up backend-recorded edits.

Backend: The plugin stores trail and edit data in the PHP session. Element save events are captured via Craft's Element::EVENT_AFTER_SAVE and recorded automatically. No database tables are created.

Storage

All data is stored in the PHP session and disappears when the session ends. UI preferences (panel position, collapsed state, active tab, paused state) are stored in the browser's localStorage.

Configuration

Puppy works out of the box with no configuration. Install and go.

Plugin Structure

src/
├── Plugin.php                          # Registers asset bundle and event listeners
├── assetbundles/puppy/PuppyAsset.php   # Injects JS and CSS into the CP
├── controllers/SessionController.php   # Endpoints: get-trail, record-visit, clear
├── models/TrailItem.php                # Data model for trail and edit items
├── services/Trail.php                  # Session-based trail storage and normalization
└── resources/
    ├── js/puppy.js                     # Floating panel, drag, tabs, route parsing
    └── css/puppy.css                   # Panel styles

Roadmap

Phase 2:

  • Pin favorite items during a session
  • Search within the session trail
  • Filter by viewed vs. edited
  • Auto-group related pages

Phase 3:

  • Team mode for admins to see active editors
  • Handoff mode for sharing what you worked on
  • Optional daily activity digest

License

See LICENSE.md.

justinholtweb/craft-puppy 适用场景与选型建议

justinholtweb/craft-puppy 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 justinholtweb/craft-puppy 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 justinholtweb/craft-puppy 我们能提供哪些服务?
定制开发 / 二次开发

基于 justinholtweb/craft-puppy 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: proprietary
  • 更新时间: 2026-04-05