DisplayAnything3
DisplayAnything3 is a file and image gallery module for SilverStripe 3.0 with a big list of features. I'm looking forward to trying the module on a future project.
DisplayAnything3 is a file and image gallery module for SilverStripe 3.0 with a big list of features. I'm looking forward to trying the module on a future project.
The best way to write a clear blog post is to paste your draft into a text-to-speech engine such as tts-api.com and listen to the output. If you can't easily understand what is said then that will most likely indicate problems with your sentence structure.
When writing a Powershell script that checks for changes to Active Directory users, you may find that all users change every time you run the script. One explanation for seeing this behaviour is because Get-ADUser does not return all the fields. A field that is not returned can never be equal to a string value.
For example, let's consider the following code:
$csv_file = "users.csv"
Import-Csv $csv_file | ForEach-Object {
$username = $_.USERNAME
$ad_user = (Get-ADUser -filter {sAMAccountName -eq $username})
if (!$ad_user) {
# create account, it does not exist
}
else {
$filter_accountchanged = { $ad_user.DisplayName -cne $displayname }
if ($ad_user | Where $filter_accountchanged) {
# update existing accounts with changes
}
else {
# account exists and has not changed
}
}
}
You will find that all existing accounts come up as having changed. This is because $user.DisplayName is not returned by Get-ADUser.
The issue is resolved by asking Get-ADUser to return all properties:
$ad_user = (Get-ADUser -filter {sAMAccountName -eq $username} -Properties * )
Now all properties are returned, and the "account change" filter works as expected.
I've released the following data extensions (might pack them up as modules):
$hidden_fields and hides them from edit form. View code$db_descriptions array to DataObjects to attach formfield descriptions. View codeInteresting article by Tom Phillips interviewing developers about Windows 8 and it's closed Windows Store, with this gem of a quote from Introversions' Chris Delay:
"I really don't want to see the PC becoming a closed platform. Microsoft is not a company that's able to benignly oversee that process. They will f*** it up. We'll all be doing Kinect support and 16 language versions, we'll all be supporting a Microsoft Office plug-in. It's my own worst nightmare.
[...] “The PC continues to be as relevant as it was ten years ago, despite consoles coming and going, because it is an open platform. If that changed it would be terrible.”
It's interesting times for the gaming industry, indeed.
Some of you might be interested in my first ss module: silverstripe-optimisticlocking
This is a very simple module that prevents your site users from losing data. It works by by blocking the save process if the record changed since it was retrieved, preventing accidental overwrites. (user1 starts editing, user 2 starts editing, user1 saves, now user2 can't overwrite user1's changes). By default, Silverstripe lets you lose data by overwriting the record on save.
You might know that Pages benefit from versioning (so you can restore to a previous version), however by default DataObjects don't have versioning enabled so this module will come in handy then (AFAIK it's not trivial to enable either).
If feedback is good, I will try to add it to the SilverStripe modules list.
I have been working with Carbon over the last weeks and one thing I noticed was that having to navigate through the admin menu repeatedly was getting a bit long in the tooth. Sure, for the occasional admin task it's useful to have the admin close to the site itself.
After adding deployment through powershell it became clear that switching between admin and commandline is not ideal either. So I decided to implement all administration throughu the powershell script.
With 0.2.3 you can add the following parameters to the script:
The script will also tell you the correct syntax if you get it wrong. Happy carbonating!
I've released another version of Carbon, the framework powering this website. It's really a refinement and bugfix release, with the following changes:
Releases are available via github by clicking on tags.
To celebrate the new release, I've also recorded another screencast (list of screencasts). In Screencast #4, we create a new post using the admin interface; use the generate site feature to create a full static cache; and finally run the powershell deployment script to deploy to my host over sftp.
All in under 2 minutes!
PHP 5.5 will no longer support Windows XP and 2003. Those systems are around a decade old, so PHP is pulling the plug on them.
It was already mentioned on the PHP 5.4 release changelog. It makes sense, but I’m sure it will cause some issues with organisations who have not been paying attention. I would encourage all developers to sign up for the PHP Announcements mailinglist. #link #php
Today’s experience of trying to watch the formula 1 race at Silverstone was a frustration of modern technology and drm issues:
Does it have to be this hard, Virgin, BBC, Acer, Toshiba, Apple?