just started to test drupal commerce solution evaluating to migrate from actual D7+UC3.
But before, after having created my own custom sub-theme (Omega 3 based), I really would like to learn how to use it to change (almost) everything on positioning elements customizing css either on (pre)processing pages.
I have overriden the blockValidate function to check some of the values of the block configuration as follows:
/**
* Overrides \Drupal\block\BlockBase::blockValidate().
*/
public function blockValidate($form, &$form_state) {
// Facebook display settings validation.
$fb_url = $form_state['values']['fb_likebox_display_settings']['fb_likebox_url'];
if (!valid_url($fb_url, TRUE)) {
form_set_error('fb_likebox_url', t('Please enter a valid url'));
}
// Facebook theming settings validation.
$fb_width = $form_state['values']['fb_likebox_theming_settings']['fb_likebox_width'];
if (!is_numeric($fb_width) || intval($fb_width) <= 0) {
form_set_error('fb_likebox_width', t('Width should be a number bigger than 0'));
}
$fb_height = $form_state['values']['fb_likebox_theming_settings']['fb_likebox_height'];
if (!is_numeric($fb_height) || intval($fb_height) <= 0) {
form_set_error('fb_likebox_height', t('Height should be a number bigger than 0'));
}
}
I've just switched my home server to Drupal from TikiWiki, and disabled public posting unless someone wants to make a small subscription payment. My old sites had been completly taken over by spammers.
I'm using the drupal book module to document some code I have done, e.g. an online bible.
I started with 4, then 5 then 6. Now I am working with 7.x. I could not update some old 6.15 sites to 7.x and had to start ALL over. Before I get overly committed to to 7.x, I wonder if starting with 8 would be a better idea.
Mainly concerned about updating database - that was the problem with upgrading before.