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
$ContentFutter1 = new HTMLEditorField('ContentFutter1', 'Spalte 1'); | |
$ContentFutter2 = new HTMLEditorField('ContentFutter2', 'Spalte 2'); | |
$ContentFutter3 = new HTMLEditorField('ContentFutter3', 'Spalte 3'); | |
// transform the fields if we're not in the default locale | |
if(Translatable::default_locale() != Translatable::get_current_locale()) { | |
$translation = $this->getTranslation(Translatable::default_locale()); | |
$transformation = new Translatable_Transformation($translation); | |
$ContentFutter1 = $transformation->transformFormField($ContentFutter1); | |
$ContentFutter2 = $transformation->transformFormField($ContentFutter2); |
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
<!-- Make it fullscreen / hide the browser URL bar --> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> |
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
#Spider Websites with Wget – 20 Practical Examples | |
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute. | |
1. Download a single file from the Internet | |
wget http://example.com/file.iso | |
2. Download a file but save it locally under a different name | |
wget ‐‐output-document=filename.html example.com |
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
function getColourNice(){ | |
$obj= HTMLText::create(); | |
$obj->setValue('<div style="background-color: '.$this->Colour.'; width: 100px; height: 100px;"> </div>'); | |
return $obj; | |
} | |
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
public function show(SS_HTTPRequest $request) { | |
$page = DataObject::get_by_id('SiteTree', $this->URLParams['ID'] ); | |
if(!$page) { | |
return $this->httpError(404,'That page could not be found'); | |
} | |
$controller = new ObjektPage_Controller($page); | |
$controller->init(); |
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
$('#TermsModal').on('shown.bs.modal', function () { | |
$('#MyModal').css('z-index', 1040); | |
}); | |
$('#TermsModal').on('hidden.bs.modal', function () { | |
$('#MyModal').css('z-index', 1050); | |
}); |
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
//http://stackoverflow.com/questions/19888110/silverstripe-convert-twitter-json-string-to-dataobject-to-loop-though-in-templa | |
public static function getTwitterFeed(){ | |
$settings = array( | |
'oauth_access_token' => "xxx", | |
'oauth_access_token_secret' => "xxx", | |
'consumer_key' => "xxx", | |
'consumer_secret' => "xxx" | |
); |
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
--- | |
Name: customi18n | |
Before: 'defaulti18n' | |
--- | |
i18n: | |
module_priority: | |
- mysite | |
- othermodule |