承接 restruct/silverstripe-login-branding 相关项目开发

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

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

restruct/silverstripe-login-branding

Composer 安装命令:

composer require restruct/silverstripe-login-branding

包简介

Admin login form (de-)branding module

关键字:

README 文档

README

Reduces the Silverstripe branding of the login forms module and makes it easily configurable:

Screenshot 2025-10-01 at 09 36 01

The branding above- and credits below the form are configurable via Yaml, options:

Restruct\SilverStripe\AdminBranding\SecurityBrandingExtension:
  include_icon: true # default: true
  app_brand: 'Cycle App' # default: null (= just an icon/logo)
  built_by: 'Built by <a href="...">CoolCompany™</a>' # default: unconfigured-warning
  powered_by: 'Powered by <a href="https://silverstripe.org" target="_blank">Silverstripe</a>' # = default

Custom icon/logo/branding

Screenshot 2025-10-01 at 09 43 48

Place a LoginIcon.ss template somewhere in [app]/templates/[Includes/] or themes/[client-theme]/templates/[Includes/], eg:

<!-- LoginIcon.ss - bike icon -->
<svg width="16" height="16" fill="var(--color-link-primary)" class="bi bi-bicycle" viewBox="0 0 16 16">
    <path d="M4 4.5a.5.5 0 0 1 .5-.5H6a.5.5 0 0 1 0 1v.5h4.14l.386-1.158A.5.5 0 0 1 11 4h1a.5.5 0 0 1 0 
    1h-.64l-.311.935.807 1.29a3 3 0 1 1-.848.53l-.508-.812-2.076 3.322A.5.5 0 0 1 8 10.5H5.959a3 3 0 1 
    1-1.815-3.274L5 5.856V5h-.5a.5.5 0 0 1-.5-.5m1.5 2.443-.508.814c.5.444.85 1.054.967 1.743h1.139zM8 
    9.057 9.598 6.5H6.402zM4.937 9.5a2 2 0 0 0-.487-.877l-.548.877zM3.603 8.092A2 2 0 1 0 4.937 
    10.5H3a.5.5 0 0 1-.424-.765zm7.947.53a2 2 0 1 0 .848-.53l1.026 1.643a.5.5 0 1 1-.848.53z"/>
</svg>
<!-- Optionally add some inline <style> while at it... -->

And configure:

# config.yml
Restruct\SilverStripe\AdminBranding\SecurityBrandingExtension:
  app_brand: 'Cycle App' # leave empty/unconfigured to show just the SVG (eg client's company logo)
  built_by: 'Built by <a href="https://restruct.nl" target="_blank">Restruct web & apps</a>'

(Legacy:) Replace header using custom AppBrand.ss template

Configure extension to use AppBrand.ss template instead:

Restruct\SilverStripe\AdminBranding\SecurityBrandingExtension:
  use_app_brand_template: true

Add an AppBrand.ss template file somewhere, eg [app]/templates/[Includes/] or themes/[client-theme]/templates/[Includes/]:

<a class="login-icon" href="$AbsoluteBaseURL">
    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-shield-lock" viewBox="0 0 16 16">
        <path d="M5.338 1.59a61.44 61.44 0 0 0-2.837.856.481.481 0 0 0-.328.39c-.554 4.157.726 7.19 2.253 9.188a10.725 10.725 0 0 0 2.287 2.233c.346.244.652.42.893.533.12.057.218.095.293.118a.55.55 0 0 0 .101.025.615.615 0 0 0 .1-.025c.076-.023.174-.061.294-.118.24-.113.547-.29.893-.533a10.726 10.726 0 0 0 2.287-2.233c1.527-1.997 2.807-5.031 2.253-9.188a.48.48 0 0 0-.328-.39c-.651-.213-1.75-.56-2.837-.855C9.552 1.29 8.531 1.067 8 1.067c-.53 0-1.552.223-2.662.524zM5.072.56C6.157.265 7.31 0 8 0s1.843.265 2.928.56c1.11.3 2.229.655 2.887.87a1.54 1.54 0 0 1 1.044 1.262c.596 4.477-.787 7.795-2.465 9.99a11.775 11.775 0 0 1-2.517 2.453 7.159 7.159 0 0 1-1.048.625c-.28.132-.581.24-.829.24s-.548-.108-.829-.24a7.158 7.158 0 0 1-1.048-.625 11.777 11.777 0 0 1-2.517-2.453C1.928 10.487.545 7.169 1.141 2.692A1.54 1.54 0 0 1 2.185 1.43 62.456 62.456 0 0 1 5.072.56z"/>
        <path d="M9.5 6.5a1.5 1.5 0 0 1-1 1.415l.385 1.99a.5.5 0 0 1-.491.595h-.788a.5.5 0 0 1-.49-.595l.384-1.99a1.5 1.5 0 1 1 2-1.415z"/>
    </svg>
    <h1 class="app-brand__logo">AppBrand</h1>
</a>

And set the theme as highest prio on SilverStripe\LoginForms\EnablerExtension (before #admin-branding):

---
Before:
  - '#admin-branding'
---
SilverStripe\LoginForms\EnablerExtension:
  login_themes:
    - 'client-theme'

Optionally set Restruct\SilverStripe\AdminBranding\SecurityBrandingExtension.include_icon to false to remove the icon.

Shield-lock + bicycle icons kindly provided by Bootstrap Icons.

SiteConfig Title Override

By default, the admin panel shows SiteConfig.Title (editable under Settings) in the left nav and browser tab. If you set LeftAndMain.application_name in config, it gets ignored when SiteConfig is installed.

This module can make application_name the authoritative source, overriding SiteConfig.Title in-memory and optionally removing the now-redundant fields from Settings.

# Set the application name
SilverStripe\Admin\LeftAndMain:
  application_name: 'My App'

# Enable the override
SilverStripe\SiteConfig\SiteConfig:
  application_name_overrides_title: true
  application_name_clear_fields: 'tab'  # see options below

application_name_clear_fields options

Value Behavior
false Override title but leave Title/Tagline fields in Settings
true (default) Remove Title + Tagline fields from Settings
'tab' Remove fields + remove the empty Main tab (if other tabs remain)

restruct/silverstripe-login-branding 适用场景与选型建议

restruct/silverstripe-login-branding 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 615 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 06 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「silverstripe」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

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

围绕 restruct/silverstripe-login-branding 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-06-26