PHPackages                             undefinedoffset/silverstripe-codebank - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. undefinedoffset/silverstripe-codebank

ActiveSilverstripe-module

undefinedoffset/silverstripe-codebank
=====================================

Code Bank is a code snippet manager with syntax highlighting for multiple languages including C++, ActionScript, Flex, HTML and SQL to name a few. Code Bank also has a simple revision history with a compare viewer so you can see the changes side-by-side between two revisions.

3.1.2(9y ago)4613414[5 issues](https://github.com/UndefinedOffset/silverstripe-codebank/issues)[1 PRs](https://github.com/UndefinedOffset/silverstripe-codebank/pulls)1BSD-3-ClausePHP

Since Mar 2Pushed 9y ago7 watchersCompare

[ Source](https://github.com/UndefinedOffset/silverstripe-codebank)[ Packagist](https://packagist.org/packages/undefinedoffset/silverstripe-codebank)[ RSS](/packages/undefinedoffset-silverstripe-codebank/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (2)Versions (9)Used By (1)

Code Bank (Server)
==================

[](#code-bank-server)

[![Latest Stable Version](https://camo.githubusercontent.com/779ec7656b5eba86269fa7d49f1d707c2801d3a35dcdee64ca891a795412eed1/68747470733a2f2f706f7365722e707567782e6f72672f756e646566696e65646f66667365742f73696c7665727374726970652d636f646562616e6b2f762f737461626c652e706e67)](https://packagist.org/packages/undefinedoffset/silverstripe-codebank) [![Total Downloads](https://camo.githubusercontent.com/e51d7a9f0974c40d0e6fa8553595bb9de263ad0a5dd422df16ac3c93c623fa0a/68747470733a2f2f706f7365722e707567782e6f72672f756e646566696e65646f66667365742f73696c7665727374726970652d636f646562616e6b2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/undefinedoffset/silverstripe-codebank) [![Latest Unstable Version](https://camo.githubusercontent.com/f2b8e424d452913a8342118955e0ba8f604f4571f359c4f6a70993010e576ca2/68747470733a2f2f706f7365722e707567782e6f72672f756e646566696e65646f66667365742f73696c7665727374726970652d636f646562616e6b2f762f756e737461626c652e706e67)](https://packagist.org/packages/undefinedoffset/silverstripe-codebank) [![License](https://camo.githubusercontent.com/1d3fe496aef01cf2209f510bda0cf411e3060ee19770d0ac34107bda71ea52e0/68747470733a2f2f706f7365722e707567782e6f72672f756e646566696e65646f66667365742f73696c7665727374726970652d636f646562616e6b2f6c6963656e73652e706e67)](https://packagist.org/packages/undefinedoffset/silverstripe-codebank) [![Build Status](https://camo.githubusercontent.com/42f768a534ebf79fdebfb3f5db09fcf6a114a6e733868fb0a33b4d6dde6096a4/68747470733a2f2f7472617669732d63692e6f72672f556e646566696e65644f66667365742f73696c7665727374726970652d636f646562616e6b2e706e67)](https://travis-ci.org/UndefinedOffset/silverstripe-codebank)

Code Bank is a code snippet manager with syntax highlighting for multiple languages including C++, ActionScript, Flex, HTML and SQL to name a few. Code Bank also has a simple revision history with a compare viewer so you can see the changes side-by-side between two revisions.

### Requirements:

[](#requirements)

- SilverStripe Framework 3.1.x (See  for SilverStripe requirements)
- PHP Zip extension (See  for installation instructions)

### Installation (Module)

[](#installation-module)

```
composer require undefinedoffset/silverstripe-codebank 3.*@stable

```

#### Manual Install (Module only)

[](#manual-install-module-only)

1. Download and extract the latest Code Bank module release from here
2. Extract the module archive to the root of your SilverStripe installation, opening the extracted folder should contain \_config.php in the root along with other files/folders
3. Hit http://{your domain}/{path to root of code bank server folder}/dev/build?flush=all in your browser
4. You will now see a Code Bank option in the CMS Menu

### Installation (Standalone)

[](#installation-standalone)

1. Download and extract the latest Code Bank release from here
2. Extract the Code Bank to a location on your SilverStripe compatible web server, you should now see a Code Bank folder and a framework folder among others
3. Follow the installation instructions at
4. If the installer completes successfully you will now be able to use the remote server in Code Bank's desktop client. Just set the server path to be http://{your domain}/{path to root of code bank server folder}
5. You should make sure that the SilverStripe installer removed the install files install.php, and install-frameworkmissing.html

### Upgrading to new versions:

[](#upgrading-to-new-versions)

#### Module Only (with composer, recommended):

[](#module-only-with-composer-recommended)

```
composer update --no-dev undefinedoffset/silverstripe-codebank

```

##### Module Only (without composer)

[](#module-only-without-composer)

1. Download the latest Code Bank release here
2. Extract the archive to into the same folder as your SilverStripe Framework
3. Hit http://{your domain}/{path to root of code bank server folder}/dev/build?flush=all in your browser

#### Stand Alone (with composer, recommended)

[](#stand-alone-with-composer-recommended)

```
composer update --no-dev

```

##### Stand Alone (without composer)

[](#stand-alone-without-composer)

1. Download and extract the latest Code Bank release from  overwriting the Code Bank and themes folders
2. Download and extact just the CodeBank, framework and themes folders replacing only those folders and their children
3. Hit http://{your domain}/{path to root of code bank server folder}/dev/build?flush=all in your browser, then you may use Code Bank normally

### Custom Languages with Brushes

[](#custom-languages-with-brushes)

Code Bank uses [SyntaxHighlighter](https://github.com/alexgorbatchev/SyntaxHighlighter) to highlight code snippets, to provide a language with syntax highlighting you must add to your [yml configs](http://doc.silverstripe.org/framework/en/topics/configuration#setting-configuration-via-yaml-files) the following then run dev/build?flush=all.

```
CodeBank:
    extra_languages:
        - Name: "Example Language" #Name of the language
          HighlightCode: "example" #Highlighter code
          FileName: "ex" #File extension
          Brush: "mysite/javascript/shBrushEx.js" #Relative Path to the snippet highlighter brush
```

### Switching the search engine

[](#switching-the-search-engine)

By default Code Bank uses MySQL's fulltext searching and on databases like Postgres it uses a partial match filtering for searching both from the client and in the web interface. Code Bank provides support for switching the engine to Solr if you have the [silverstripe/fulltextsearch](https://github.com/silverstripe-labs/silverstripe-fulltextsearch) installed and a Solr server available. You may switch the search engine by adding the following to your mysite/\_config/config.yml after add flush=1 to the url to update the config cache.

```
CodeBank:
    snippet_search_engine: "SolrCodeBankSearchEngine"
```

#### Writing your own engine

[](#writing-your-own-engine)

Code Bank provides an api for you to hook in your own engine, you simply need to implement the [ICodeBankSearchEngine](https://github.com/UndefinedOffset/silverstripe-codebank/blob/master/code/search/ICodeBankSearchEngine.php) interface and define the methods in the interface. The key thing to remember is that the doSnippetSearch() method takes 3 parameters the first $keyword, is the term/keyword the user is searching for (this maybe empty), the second ($langugeID) is the database ID of the language the user is filtering to. The last parameter ($folderID) is the ID of the folder the system is requesting matches for. The method itself should always return a SS\_List subclass typically it should be DataList containing or pointing to only snippets. To enable your custom engine follow the [steps above](#switching-the-search-engine).

### Attribution:

[](#attribution)

- Some Icons are from the Fudge Icon Set
- Code Bank Logo is derived from the Tango Desktop Project
- Other icons are from the noun project
- Code Bank is powered by the SilverStripe framework
- Code Bank uses portions of the Zend Framework
- Syntax highlighting provided by SyntaxHighlighter

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 99.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~127 days

Recently: every ~205 days

Total

8

Last Release

3561d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/60d2d4134f2e196b585f3320d1d7245c03df87a521bc3e17184d16e7ba02f0ee?d=identicon)[UndefinedOffset](/maintainers/UndefinedOffset)

---

Top Contributors

[![UndefinedOffset](https://avatars.githubusercontent.com/u/1391558?v=4)](https://github.com/UndefinedOffset "UndefinedOffset (178 commits)")[![sbrl](https://avatars.githubusercontent.com/u/9929737?v=4)](https://github.com/sbrl "sbrl (1 commits)")

---

Tags

silverstripedevelopmentsnippetsnippet manager

### Embed Badge

![Health badge](/badges/undefinedoffset-silverstripe-codebank/health.svg)

```
[![Health](https://phpackages.com/badges/undefinedoffset-silverstripe-codebank/health.svg)](https://phpackages.com/packages/undefinedoffset-silverstripe-codebank)
```

###  Alternatives

[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[silverstripe/cms

The SilverStripe Content Management System

5163.4M1.3k](/packages/silverstripe-cms)[silverstripe-themes/simple

The SilverStripe simple theme (default SilverStripe 3 theme)

411.3M8](/packages/silverstripe-themes-simple)[silverstripe/admin

SilverStripe admin interface

262.6M325](/packages/silverstripe-admin)[silverstripe/silverstripe-omnipay

SilverStripe Omnipay Payment Module

38106.0k15](/packages/silverstripe-silverstripe-omnipay)[silverleague/ideannotator

Generate PHP DocBlock annotations for DataObject and DataExtension databasefields and relation methods

4768.0k43](/packages/silverleague-ideannotator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
