Rename admin menu items in SilverStripe

SilverStripe 3.0.x cheap trick of the week:

If you want to rename a menu item in the SilverStripe Admin Area, because f.e. you find “Security” or “Sicherheit”(since we are german ;)) a too harsh wording and you prefer “Members” or “Benutzer”:
simply override the translation!

Add a lang folder in your project folder and add the language file:
de.yml or en.yml and place your wording:

de:
  SecurityAdmin:
    MENUTITLE: Benutzer

Continue reading “Rename admin menu items in SilverStripe”

SilverStripe speed up Portfolio Sites with Static Publisher

A common site type that we build are portfolio pages
which mostly get filled once in the beginning and then only periodically, rather rarely.
They also have almost never User interaction from the Frontend.

So we consider them as almost “readonly” sites.

These sites you can easily speed up “dramatically” with the SilverStripe builtin StaticPublisher.
The tweaks you need for this are moderate to easy.

You can read the Docs to get a glimpse of what is possible.
I will just describe the basic setup to make a site static.
Continue reading “SilverStripe speed up Portfolio Sites with Static Publisher”

mashcloud.net – mashup soundcloud audio tracks

mashcloud.net is an experiment on collaborative realtime audio editing and music creation.
I did the project within the frame of  my BA thesis in audio production last year.

As I moved the code to github this week, I wanted to give a quick overview of the project and its technical underlyings, just in case someone might be interested :)

Continue reading “mashcloud.net – mashup soundcloud audio tracks”

Silverstripe remove CustomScript

Silverstripe Tip of the week:

Sometimes you have to remove a customScript of a module, because you want to script it differently.

If the module author was so wise to give his customScript a ID (UserFormsValidation in this case) like they did in UserForms:

Requirements::customScript(<<<JS
    (function($) {...})(jQuery);
JS
, 'UserFormsValidation');

then you can do the following in the init function of your subclass controller:

Requirements::block('UserFormsValidation');

Easy, isnt it?

Silverstripe RedirectorPage open external Link in new window

Silverstripe Tip of the Week:

If you want to open a “Other website URL” Link of a RedirectorPage in a new window with target=_blank, you can use the following snippet:

<% if ExternalURL %>
   <a href="$ExternalURL" class="external" target="_blank">$MenuTitle.XML</a>
<% else %>
   <a href="$Link">$MenuTitle.XML</a>
<% end_if %>

Edit:
Or this one:

<% if is_a(RedirectorPage) %><% if RedirectionType = External %>target="_blank"<% end_if %><% end_if %>

found here: http://www.silverstripe.org/general-questions/show/9600

Hope it Helps!

[Symfony 2][Assetic] Sass, CompassFilter + Foundation Responsive Front-end Framework

Did you ever wonder how to enable 3rd party plugins (or so called “frameworks“) within the great compass toolset managed by assetic in your edgy symfony 2.1 project?

(If there is more extensive documentation available concerning assetic + CompassFilter, please stop reading on and let me know!)

If you take a look at the filter class itself (it is CompassFilter in the generic Assetic\Filter namespace), you should recognise several option values that you can use in your application wide config.yml file.

But first you have to install the framework plugin following these instructions.

Continue reading “[Symfony 2][Assetic] Sass, CompassFilter + Foundation Responsive Front-end Framework”

Symfony2 from YAML to XML configuration

Actually i was a fan of YAML regarding the configuration files of Symfony2.
This was probably because i was used to it since symfony 1.4 and i also thought its better readable.
Its partly still true, but my Netbeans Editor has some problems with using @ in YAML and this breaks my highlighting.
So the better readability vanished to nirvana.

So i checked out XML configuration. Its also widely used by the community.
Pros and Cons (mostly Pros) you can read in this post by Fabien.

Continue reading “Symfony2 from YAML to XML configuration”