Home - Your one stop SilverStripe learning resource
- Show all
- Site Tree
- Site of the Month
- Model Admin
- SilverStripe 3
SnippetsCreate and use a Permission code
18 April 2009 | | | Supports v2.4, v2.3Tweet
Have you wanted to add an extra permission code that you can add to groups and then use that to test whether a particular user has that permission? Here's how it's done. The permission code it self is added via the Controller class, then you use a permission check anywhere in your site code to check the current user. Like so:Continue reading...
SnippetsResizing and Manipulating Images
22 March 2009 | | | Supports v2.4, v2.3Tweet
You can resize images from within the template very easily. But sometimes you need to resize it and just use the URL value, something you can't do by calling the resize on the variable directly (e.g. $Image.CroppedImage(200,200)). This is how we would create a cropped resize of it and still be able to use just the URL, allowing a custom <img> tag.Continue reading...
TutorialsEmbed flash content using SWFObject
3 December 2009 | | | Supports v2.4, v2.3Tweet
There are numerous ways to embed flash content into your SilverStripe Website. A commonly used and very flexible method to embed flash is provided by the SWFObject script. In this snippet I'll show you how to create a custom FlashPage that will contain flash content, embedded using SWFObject.Continue reading...
TutorialsUsing jQuery for form validation
13 November 2009 | |Tweet
21 September 2009 | |Tweet
Something that has been bothering me when building larger sites with SilverStripe is that I often find myself creating new classes not to add functionality, but to just get a new template.
You can set separate templates for different actions manually but that's not what I want in this case, I want different templates for the same action on the same class.
After thinking about this for awhile I came up with a two part solution and the first part is to make the template choosing aware of the Sitetree hierarchy.Continue reading...
11 September 2009 | | | Supports v2.3Tweet
2 June 2011 | |Tweet
The Votes are in! And the winner of June's SSbits Site Of The Month is.....Continue reading...
25 October 2011 | |Tweet
The Votes are in! And the winner of October's SSbits Site Of The Month is.....Continue reading...
2 February 2012 | |Tweet
The Votes are in! And the winner of January's SSbits Site Of The Month is.....Continue reading...
1 June 2012 | |Tweet
The Votes are in! And the winner of May 2012 SSbits Site Of The Month is.....Continue reading...
27 April 2012 | |Tweet
It's been a while but SOTM if finally back. Enter your site for a chance to be in the final 5 vote off! Voting will begin on the 10th of May.Continue reading...
17 February 2010 | | | Supports v2.4, v2.3Tweet
Wouldn't it be easy to have a single environment configuration for all your SilverStripe sites without having to reconfigure each one individually? Wouldn't it be great not to have to change environment settings when you push your site from development to live servers? This is easy to achieve using the SilverStripe "ConfigureFromEnv" script.Continue reading...
22 August 2009 | |Tweet I managed to forget my admin password and found quite a few ways to unlock an SS install. I originally thought about poking around the database and changing the hashes myself. After reviewing the Security and password encryption code, I would recommend against doing that. SilverStripe uses salted SHA1 encryption which is no fun to try and create yourself. Also you'd have to update multiple tables to get the password changed. Luckily the SS Core team has included multiple features for accomplishing this. The options below assume you have access to your webserver to use some PHP code. Continue reading...
5 August 2009 | |Tweet
TutorialsWeb 2.0 Mirrored Images
2 November 2009 | |Tweet
Ever wanted to create the so-called 'web 2.0' mirrored images as you can see on http://www.dio5.com/portfolio/, without having to manually rotate and proces the image? Then this one is for you.
I have attached a fully working zip-package, but let's run through some of the code nonetheless.Continue reading...