Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: communitytools/Community-Tools-Profile
base: 297aaa3da7
...
head fork: communitytools/Community-Tools-Profile
compare: 5ae34f7167
  • 14 commits
  • 4 files changed
  • 0 commit comments
  • 1 contributor
View
9 cmtls_profile.info
@@ -25,6 +25,13 @@ dependencies[] = "delta_blocks"
dependencies[] = "features_tools"
dependencies[] = "transliteration"
dependencies[] = "redirect"
+dependencies[] = "media_youtube"
+dependencies[] = "media_vimeo"
+dependencies[] = "wysiwyg"
+dependencies[] = "i18n_field"
+dependencies[] = "variable"
+dependencies[] = "locale"
+dependencies[] = "color"
// CT modules
dependencies[] = cmtls
@@ -35,4 +42,4 @@ dependencies[] = cmtls_post
files[] = cmtls_profile.profile
-version = "7.x-2.0-alpha2"
+version = "7.x-2.0-alpha3"
View
246 cmtls_profile.install
@@ -11,27 +11,40 @@ function cmtls_profile_install() {
$filtered_html_format = array(
'format' => 'filtered_html',
'name' => 'Filtered HTML',
- 'weight' => 0,
+ 'cache' => '1',
+ 'status' => '1',
+ 'weight' => '0',
'filters' => array(
- // URL filter.
'filter_url' => array(
- 'weight' => 0,
- 'status' => 1,
+ 'weight' => '0',
+ 'status' => '1',
+ 'settings' => array(
+ 'filter_url_length' => '72',
+ ),
),
- // HTML filter.
'filter_html' => array(
- 'weight' => 1,
- 'status' => 1,
+ 'weight' => '1',
+ 'status' => '1',
+ 'settings' => array(
+ 'allowed_html' => '<a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <pre> <object> <embed> <iframe> <param>',
+ 'filter_html_help' => 1,
+ 'filter_html_nofollow' => 0,
+ ),
),
- // Line break filter.
'filter_autop' => array(
- 'weight' => 2,
- 'status' => 1,
+ 'weight' => '2',
+ 'status' => '1',
+ 'settings' => array(),
),
- // HTML corrector filter.
'filter_htmlcorrector' => array(
- 'weight' => 10,
- 'status' => 1,
+ 'weight' => '10',
+ 'status' => '1',
+ 'settings' => array(),
+ ),
+ 'media_filter' => array(
+ 'weight' => '10',
+ 'status' => '1',
+ 'settings' => array(),
),
),
);
@@ -41,27 +54,38 @@ function cmtls_profile_install() {
$full_html_format = array(
'format' => 'full_html',
'name' => 'Full HTML',
- 'weight' => 1,
+ 'cache' => '1',
+ 'status' => '1',
+ 'weight' => '1',
'filters' => array(
- // URL filter.
'filter_url' => array(
- 'weight' => 0,
- 'status' => 1,
+ 'weight' => '0',
+ 'status' => '1',
+ 'settings' => array(
+ 'filter_url_length' => '72',
+ ),
),
- // Line break filter.
'filter_autop' => array(
- 'weight' => 1,
- 'status' => 1,
+ 'weight' => '1',
+ 'status' => '1',
+ 'settings' => array(),
),
- // HTML corrector filter.
'filter_htmlcorrector' => array(
- 'weight' => 10,
- 'status' => 1,
+ 'weight' => '10',
+ 'status' => '1',
+ 'settings' => array(),
+ ),
+ 'media_filter' => array(
+ 'weight' => '10',
+ 'status' => '1',
+ 'settings' => array(),
),
),
);
$full_html_format = (object) $full_html_format;
filter_format_save($full_html_format);
+
+ cmtls_wysiwyg_profiles();
$default_theme = 'cmtls_base';
variable_set('theme_default', $default_theme);
@@ -69,9 +93,22 @@ function cmtls_profile_install() {
$admin_theme = 'seven';
variable_set('admin_theme', $admin_theme);
+ variable_set('delta_blocks_toggle', array(
+ 'logo' => 'logo',
+ 'site-name' => 'site-name',
+ 'site-slogan' => 'site-slogan',
+ 'page-title' => 'page-title',
+ 'messages' => 'messages',
+ 'branding' => 0,
+ 'breadcrumb' => 0,
+ 'tabs' => 0,
+ 'action-links' => 0,
+ 'feed-icons' => 0,
+ ));
cmtls_base_blocks($default_theme);
cmtls_admin_blocks($admin_theme);
-
+
+ cmtls_add_custom_block();
// Insert default pre-defined node types into the database. For a complete
// list of available node type attributes, refer to the node type API
@@ -177,6 +214,7 @@ function cmtls_profile_install() {
'view own unpublished content',
'administer media',
'cancel account',
+ 'access draggableviews',
));
// Create a default role for site administrators, with all available permissions assigned.
@@ -198,8 +236,19 @@ function cmtls_profile_install() {
'link_title' => st('Home'),
'link_path' => '<front>',
'menu_name' => 'main-menu',
+ 'weight' => -10,
);
menu_link_save($item);
+
+ // disable the media_galleries menu item
+ db_merge('menu_links')
+ ->key(array(
+ 'link_path' => 'taxonomy/term/1',
+ ))
+ ->fields(array(
+ 'hidden' => 1,
+ ))
+ ->execute();
// Update the menu router information.
menu_rebuild();
@@ -301,8 +350,8 @@ function cmtls_profile_install() {
),
));
variable_set('gmap_default', array (
- 'width' => '300px',
- 'height' => '200px',
+ 'width' => '100%',
+ 'height' => '400px',
'latlong' => '40,0',
'zoom' => '3',
'maxzoom' => '14',
@@ -343,7 +392,7 @@ function cmtls_profile_install() {
'nokeyboard' => 1,
'nomousezoom' => 0,
'nocontzoom' => 0,
- 'autozoom' => 0,
+ 'autozoom' => 1,
'dynmarkers' => 0,
'overview' => 0,
'collapsehack' => 0,
@@ -494,8 +543,8 @@ function cmtls_base_blocks($theme) {
'title' => '<none>',
),
array(
- 'module' => 'delta_blocks',
- 'delta' => 'site-name',
+ 'module' => 'cmtls',
+ 'delta' => 'cmtls_site_title',
'theme' => $theme,
'status' => 1,
'weight' => -24,
@@ -505,8 +554,8 @@ function cmtls_base_blocks($theme) {
'title' => '<none>',
),
array(
- 'module' => 'delta_blocks',
- 'delta' => 'site-slogan',
+ 'module' => 'cmtls',
+ 'delta' => 'cmtls_site_slogan',
'theme' => $theme,
'status' => 1,
'weight' => -23,
@@ -561,18 +610,6 @@ function cmtls_base_blocks($theme) {
'cache' => -1,
'title' => '<none>',
),
- // preface first
- array(
- 'module' => 'delta_blocks',
- 'delta' => 'page-title',
- 'theme' => $theme,
- 'status' => 1,
- 'weight' => -31,
- 'region' => 'preface_first',
- 'pages' => '',
- 'cache' => -1,
- 'title' => '<none>',
- ),
array(
'module' => 'views',
'delta' => 'cmtls_common_elements-block_3',
@@ -691,3 +728,126 @@ function cmtls_admin_blocks($theme) {
}
$query->execute();
}
+
+function cmtls_add_custom_block() {
+ $delta = db_insert('block_custom')
+ ->fields(array(
+ 'body' => st('Custom block body'),
+ 'info' => st('Custom block description'),
+ 'format' => 'full_html',
+ ))
+ ->execute();
+
+ $query = db_insert('block')->fields(array('visibility', 'pages', 'custom', 'title', 'module', 'theme', 'status', 'weight', 'delta', 'cache', 'region'));
+ $query->values(array(
+ 'visibility' => 0,
+ 'pages' => '',
+ 'custom' => 0,
+ 'title' => st('Custom block title'),
+ 'module' => 'block',
+ 'theme' => 'cmtls_base',
+ 'status' => 1,
+ 'weight' => 0,
+ 'delta' => $delta,
+ 'cache' => DRUPAL_NO_CACHE,
+ 'region' => 'footer_first',
+ ));
+ $query->execute();
+}
+
+function cmtls_wysiwyg_profiles() {
+ $full_html = array(
+ 'default' => 1,
+ 'user_choose' => 0,
+ 'show_toggle' => 1,
+ 'theme' => 'advanced',
+ 'language' => NULL,
+ 'buttons' => array(
+ 'default' => array(
+ 'Bold' => 1,
+ 'Italic' => 1,
+ 'BulletedList' => 1,
+ 'NumberedList' => 1,
+ 'Link' => 1,
+ 'Anchor' => 1,
+ 'Source' => 1,
+ 'Format' => 1,
+ 'Table' => 1,
+ ),
+ 'drupal' => array(
+ 'media' => 1,
+ ),
+ ),
+ 'toolbar_loc' => 'top',
+ 'toolbar_align' => 'left',
+ 'path_loc' => 'bottom',
+ 'resizing' => 1,
+ 'verify_html' => 1,
+ 'preformatted' => 0,
+ 'convert_fonts_to_spans' => 1,
+ 'remove_linebreaks' => 1,
+ 'apply_source_formatting' => 0,
+ 'paste_auto_cleanup_on_paste' => 1,
+ 'block_formats' => 'p,address,pre,h2,h3,h4,h5,h6,div',
+ 'css_setting' => 'theme',
+ 'css_path' => '',
+ 'css_classes' => '',
+ );
+
+ $fields = array(
+ 'format' => 'full_html',
+ 'editor' => 'ckeditor',
+ 'settings' => serialize($full_html),
+ );
+
+ db_insert('wysiwyg')->fields($fields)->execute();
+
+ $filtered_html = array(
+ 'default' => 1,
+ 'user_choose' => 0,
+ 'show_toggle' => 1,
+ 'theme' => 'advanced',
+ 'language' => NULL,
+ 'buttons' => array(
+ 'default' => array(
+ 'Bold' => 1,
+ 'Italic' => 1,
+ 'BulletedList' => 1,
+ 'NumberedList' => 1,
+ 'Link' => 1,
+ 'Anchor' => 1,
+ 'Source' => 1,
+ 'Format' => 1,
+ 'Table' => 1,
+ ),
+ 'drupal' => array(
+ 'media' => 1,
+ ),
+ ),
+ 'toolbar_loc' => 'top',
+ 'toolbar_align' => 'left',
+ 'path_loc' => 'bottom',
+ 'resizing' => 1,
+ 'verify_html' => 1,
+ 'preformatted' => 0,
+ 'convert_fonts_to_spans' => 1,
+ 'remove_linebreaks' => 1,
+ 'apply_source_formatting' => 0,
+ 'paste_auto_cleanup_on_paste' => 1,
+ 'block_formats' => 'p,address,pre,h2,h3,h4,h5,h6,div',
+ 'css_setting' => 'theme',
+ 'css_path' => '',
+ 'css_classes' => '',
+ );
+
+ $fields = array(
+ 'format' => 'filtered_html',
+ 'editor' => 'ckeditor',
+ 'settings' => serialize($filtered_html),
+ );
+
+ db_insert('wysiwyg')->fields($fields)->execute();
+}
+
+
+
View
54 cmtls_profile.profile
@@ -28,6 +28,19 @@ function cmtls_profile_form_install_configure_form_alter(&$form, $form_state) {
'#maxlength' => 255,
);
+ // ID, apikey and secret are shown on facebook. User copies and pastes values.
+ $form['site_information']['fb_apikey'] = array(
+ '#type' => 'textfield',
+ '#title' => st('Facebook App ID'),
+ '#description' => st('Facebook will generate this value when you create the application.'),
+ );
+
+ $form['site_information']['fb_secret'] = array(
+ '#type' => 'textfield',
+ '#title' => st('Facebook APP Secret'),
+ '#description' => st('Facebook will generate this value when you create the application.'),
+ );
+
$form['#submit'][] = '_cmtls_profile_install_save';
if($_GET['locale'] == 'et') {
@@ -46,8 +59,47 @@ function _cmtls_profile_install_save($form, &$form_state) {
variable_set('googlemap_api_key', $form_state['values']['googlemap_api_key']);
variable_set('location_usegmap', 1);
}
+
+ $fb_app = array(
+ 'status' => ($form_state['values']['fb_secret'] && $form_state['values']['fb_apikey'] ? 1 : 0),
+ 'label' => 'cmtls_fb',
+ 'title' => 'cmtls_fb',
+ 'apikey' => $form_state['values']['fb_apikey'],
+ 'id' => $form_state['values']['fb_apikey'],
+ 'secret' => $form_state['values']['fb_secret'],
+ 'data' => serialize(array(
+ 'fb_app' => array(
+ 'set_app_props' => 1,
+ ),
+ 'fb_connect' => array(
+ 'primary' => 1,
+ ),
+ 'fb_user' => array(
+ 'create_account' => '2',
+ 'map_account' => array(
+ 2 => 0,
+ 3 => 0,
+ ),
+ 'new_user_rid' => '0',
+ 'connected_user_rid' => '0',
+ ),
+ )),
+ );
+
+ // facebook app
+ $fb_app['fba_id'] = db_insert('fb_app')
+ ->fields($fb_app)
+ ->execute();
+ // facebook configs
+ variable_set('fb_connect_primary_label', 'cmtls_fb');
+ variable_set('fb_user_username_style', 1);
+
+ if($form_state['values']['fb_secret'] && $form_state['values']['fb_apikey']) {
+ module_load_include('inc', 'fb_app', 'fb_app.admin');
+ fb_app_set_app_properties((object)$fb_app);
+ }
+
variable_set('site_slogan', $form_state['values']['site_slogan']);
}
-
View
11,559 translations/et.po
11,559 additions, 0 deletions not shown

No commit comments for this range

Something went wrong with that request. Please try again.