diff --git a/commons_site_homepage.features.inc b/commons_site_homepage.features.inc index 426323e..45b1ef5 100644 --- a/commons_site_homepage.features.inc +++ b/commons_site_homepage.features.inc @@ -22,5 +22,5 @@ function commons_site_homepage_ctools_plugin_api() { * Implements hook_views_api(). */ function commons_site_homepage_views_api() { - return array("version" => "3.0"); + return array("api" => "3.0"); } diff --git a/commons_site_homepage.info b/commons_site_homepage.info index c457aba..7fc9062 100644 --- a/commons_site_homepage.info +++ b/commons_site_homepage.info @@ -14,6 +14,7 @@ dependencies[] = ctools dependencies[] = entity dependencies[] = page_manager dependencies[] = strongarm +dependencies[] = views dependencies[] = views_content dependencies[] = views_load_more features[ctools][] = page_manager:pages_default:1 diff --git a/commons_site_homepage.module b/commons_site_homepage.module index 0df46e3..e4def61 100644 --- a/commons_site_homepage.module +++ b/commons_site_homepage.module @@ -5,3 +5,33 @@ */ include_once 'commons_site_homepage.features.inc'; + +/** + * Implements hook_block_info(). + */ +function commons_block_info() { + $blocks['commons_anonymous_front_text'] = array( + 'info' => t('Commons Anonymous Front Page Text') + ); + + return $blocks; +} + +/** + * Implements hook_block_view(). + * + * Display a custom welcome text for anonymous users + */ +function commons_block_view($delta = '') { + $block = array(); + + switch ($delta) { + case 'commons_anonymous_front_text': + $block['subject'] = variable_get('commons_anonymous_welcome_title', 'The open-source alternative for enterprise-scale social business software'); + + $block['content'] = 'Big social media picture' . variable_get('commons_anonymous_welcome_body','Enable social networking to create productive interactions. Whether your community is public or private, Commons does it!'); + break; + } + + return $block; +} diff --git a/commons_site_homepage.pages_default.inc b/commons_site_homepage.pages_default.inc index bc427b9..c1bf2ce 100644 --- a/commons_site_homepage.pages_default.inc +++ b/commons_site_homepage.pages_default.inc @@ -321,21 +321,13 @@ function commons_site_homepage_default_page_manager_pages() { $pane = new stdClass(); $pane->pid = 'new-10'; $pane->panel = 'three_33_top'; - $pane->type = 'custom'; - $pane->subtype = 'custom'; + $pane->type = 'block'; + $pane->subtype = 'commons-commons_anonymous_front_text'; $pane->shown = TRUE; $pane->access = array(); $pane->configuration = array( - 'admin_title' => 'Anonymous Front Page Text', - 'title' => '', - 'body' => 'Big social media picture - -

The open-source alternative for enterprise-scale social business software

- -

Enable social networking to create productive interactions. Whether your community is public or private, Commons does it!

-', - 'format' => 'full_html', - 'substitute' => TRUE, + 'override_title' => 0, + 'override_title_text' => '', ); $pane->cache = array(); $pane->style = array( diff --git a/commons_site_homepage.views_default.inc b/commons_site_homepage.views_default.inc index 4d7af1a..0d8cabf 100644 --- a/commons_site_homepage.views_default.inc +++ b/commons_site_homepage.views_default.inc @@ -33,7 +33,6 @@ function commons_site_homepage_views_default_views() { $handler->display->display_options['pager']['options']['offset'] = '0'; $handler->display->display_options['pager']['options']['id'] = '0'; $handler->display->display_options['pager']['options']['quantity'] = '9'; - $handler->display->display_options['pager']['options']['more_button_text'] = 'Show more'; $handler->display->display_options['style_plugin'] = 'default'; $handler->display->display_options['row_plugin'] = 'entity'; $handler->display->display_options['row_options']['view_mode'] = 'teaser';