This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Visit http://substack.neocities.org/video.html and paste this into the text box. | |
var t = 0; | |
var t = 0; | |
return function (r, w) { | |
t += 0.2; | |
var gRad = Math.sin(t/5) * 50; | |
var bRad = Math.sin(t/7) * 90; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew tap homebrew/dupes | |
brew tap homebrew/versions | |
brew tap homebrew/homebrew-php | |
brew install php54 --with-apache --without-snmp --with-tidy | |
# Follow the instructions for enabling php54 on Apache | |
brew install mysql | |
# Now edit the Apache config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CRMAdmin extends ModelAdmin { | |
private static $url_segment = "crm"; | |
private static $menu_title = "CRM"; | |
private static $managed_models = array( | |
"Client", | |
"Contact", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add an OptionSetField of sort options | |
*/ | |
class GridFieldSortOptionSet implements GridField_HTMLProvider, GridField_DataManipulator, GridField_ActionProvider { | |
/** | |
* Returns the optionset in the header | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add an OptionSetField of sort options | |
*/ | |
class GridFieldSortOptionSet implements GridField_HTMLProvider, GridField_DataManipulator, | |
GridField_ActionProvider, GridField_ColumnProvider { | |
protected $suppressOnSort = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Mysite\Test\Behaviour; | |
use SilverStripe\BehatExtension\Context\SilverStripeContext, | |
SilverStripe\BehatExtension\Context\BasicContext, | |
SilverStripe\BehatExtension\Context\LoginContext, | |
SilverStripe\BehatExtension\Context\FixtureContext, | |
SilverStripe\BehatExtension\Context\EmailContext; | |
//SilverStripe\Framework\Test\Behaviour\CmsFormsContext, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class StaffHolder extends Page | |
{ | |
//... | |
public function getCMSFields() { | |
$fields = parent::getCMSFields(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -8,4 +8,8 @@ After: | |
# See http://doc.silverstripe.org/framework/en/topics/configuration | |
# Caution: Indentation through two spaces, not tabs | |
SSViewer: | |
- theme: 'sam' | |
\ No newline at end of file | |
+ theme: 'sam' | |
+ | |
+SiteConfig: | |
+ extensions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add the following lines to the bottom of updateCMSFields(); | |
<?php | |
$fields->addFieldToTab('Root.Quotes', | |
GridField::create('Quotes', 'Quotes', | |
InspirationalQuote::get(), | |
GridFieldConfig_RecordEditor::create()) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$blob = new DropdownField( | |
'EmployeeOfTheMonthID', | |
'Employee of the month', | |
$this | |
->Children() | |
->filter('ClassName', 'StaffPage') | |
->sort('Title') | |
->map('ID', 'Title') |
OlderNewer