Archive by Author

PostgreSQL: How to insert random BOOLEAN

This is just a quick tip, I did some searches and couldn’t find a solution to insert random Boolean values into postgres table.

Leave a comment Continue Reading →

Posting links to Facebook from PHP – not from localhost

While working on an update for one of my SilverStripe modules, I came upon a problem which held me back for some time, changing configurations and doing all kinds of tests. The thing is – Facebook engine verifies the link you’re trying to post, so the post from localhost fails with “Unknown error”. You need […]

Leave a comment Continue Reading →

Silverstripe 3.0 Grid Fields with Thumbnails

Silverstripe 3 has been out for a few months now, and most the big bugs have been fixed… This tutorial describes the code required to set up a grid feild to manage ‘Has Many’ relations. Eg – a staff page that lists many staff members. Also, we’ll add in some code that will make the […]

Leave a comment Continue Reading →

Silverstripe 3 – Per user page access tutorial

Most of the times group access in SilverStripe is sufficient for controlling user access, but for this project I had a specific situation where every user needs to have a dedicated page. In order to avoid unnecessary editing and creating groups for each individual user, I decided to extend SiteTree and create a page with […]

2 Comments Continue Reading →

Install Tidy on Ubuntu

Not something big or important, but I just tried several ways to get tidy library on my Ubuntu box, and none other then this worked. Might save some searching to others. sudo apt-get install php5-tidy Tidy is recommended for running SilverStripe (not required). php5 comes with Tidy library preinstalled but it has to be compiled –with-tidy […]

2 Comments Continue Reading →

Silverstripe 3 Grid Field Config Options

The grid field system in Silverstripe 3 has a number of preset config options – here’s what they do, and what they look like: No Config If we don’t add any config options, the grid field just displays a list of items…  We can’t view the record details, or edit anything though…

$gridfield = […]

Leave a comment Continue Reading →

One Div – Pure CSS3 icons

I ran into this website for the first time today and I liked the project. The aim of One div is to create a library of single element logos/icons. All the icons presented there are realized in pure css with only one html <div> element. This is great as alternative for svg/images, as all the […]

Leave a comment Continue Reading →

Pitch & Tone • Silverstripe caching

In this post we’re going to cover how silverstripe’s caching works. There are two ways to cache, both have pros and cons. Static caching Quite simply static caching saves the HTML output via php to a static HTML file. Silverstripe then monitors (via some functions you create/edit) when content is updated so that if an […]

Leave a comment Continue Reading →

Map Module

One of the HotelCMS modules is the map module, enabling hotels to showcase nearby places of interest. All the places are displayed on the map, with distance from hotel shown, using custom icon set and customized info window. Both front and back end use the latest Google Maps API – V3. You can check out […]

Leave a comment Continue Reading →

Extending SilverStripe 3 Site Settings

When you first install your SilverStripe site, the ‘Settings’ menu is pretty limited, offering just Title, Tagline, and a choice of templates. This is fine, but it’s often useful to add other options, such as logo upload, links to facebook, uploading a banner image that appears on every page. MySiteConfig.php In your ‘mysite/code/’ folder, create […]

3 Comments Continue Reading →