Weibo support for ambassador user profiles
Add weibo support to user profiles: - groups_user_profile module - add weibo url to user profile - update of user profile's profile teaser settings Change-Id: I98d220ada8f74e4fe72005b13a6f13aab8ed3881
This commit is contained in:
parent
59baa41584
commit
f9de076005
@ -346,6 +346,17 @@ function groups_update_7118() {
|
|||||||
drupal_flush_all_caches();
|
drupal_flush_all_caches();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable groups user profile module.
|
||||||
|
*/
|
||||||
|
function groups_update_7119() {
|
||||||
|
if (!module_exists('groups_user_profile')) {
|
||||||
|
module_enable(array('groups_user_profile'));
|
||||||
|
}
|
||||||
|
drupal_flush_all_caches();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set language negotiation to URL based.
|
* Set language negotiation to URL based.
|
||||||
*/
|
*/
|
||||||
|
@ -57,12 +57,14 @@ function groups_ambassador_ds_layout_settings_info() {
|
|||||||
0 => 'ds_user_picture',
|
0 => 'ds_user_picture',
|
||||||
1 => 'name',
|
1 => 'name',
|
||||||
2 => 'field_twitter_url',
|
2 => 'field_twitter_url',
|
||||||
|
3 => 'field_weibo_url',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'fields' => array(
|
'fields' => array(
|
||||||
'ds_user_picture' => 'ds_content',
|
'ds_user_picture' => 'ds_content',
|
||||||
'name' => 'ds_content',
|
'name' => 'ds_content',
|
||||||
'field_twitter_url' => 'ds_content',
|
'field_twitter_url' => 'ds_content',
|
||||||
|
'field_weibo_url' => 'ds_content',
|
||||||
),
|
),
|
||||||
'classes' => array(),
|
'classes' => array(),
|
||||||
'wrappers' => array(
|
'wrappers' => array(
|
||||||
|
@ -7,6 +7,7 @@ project = groups_ambassador
|
|||||||
dependencies[] = ds
|
dependencies[] = ds
|
||||||
dependencies[] = strongarm
|
dependencies[] = strongarm
|
||||||
dependencies[] = views
|
dependencies[] = views
|
||||||
|
dependencies[] = groups_user_profile
|
||||||
features[ctools][] = ds:ds:1
|
features[ctools][] = ds:ds:1
|
||||||
features[ctools][] = strongarm:strongarm:1
|
features[ctools][] = strongarm:strongarm:1
|
||||||
features[ctools][] = views:views_default:3.0
|
features[ctools][] = views:views_default:3.0
|
||||||
|
@ -41,7 +41,7 @@ function groups_ambassador_strongarm() {
|
|||||||
'visible' => TRUE,
|
'visible' => TRUE,
|
||||||
),
|
),
|
||||||
'profile_teaser' => array(
|
'profile_teaser' => array(
|
||||||
'weight' => '11',
|
'weight' => '12',
|
||||||
'visible' => FALSE,
|
'visible' => FALSE,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -51,7 +51,7 @@ function groups_ambassador_strongarm() {
|
|||||||
'visible' => TRUE,
|
'visible' => TRUE,
|
||||||
),
|
),
|
||||||
'profile_teaser' => array(
|
'profile_teaser' => array(
|
||||||
'weight' => '10',
|
'weight' => '11',
|
||||||
'visible' => FALSE,
|
'visible' => FALSE,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* groups_user_profile.features.field_base.inc
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements hook_field_default_field_bases().
|
||||||
|
*/
|
||||||
|
function groups_user_profile_field_default_field_bases() {
|
||||||
|
$field_bases = array();
|
||||||
|
|
||||||
|
// Exported field_base: 'field_weibo_url'
|
||||||
|
$field_bases['field_weibo_url'] = array(
|
||||||
|
'active' => 1,
|
||||||
|
'cardinality' => 1,
|
||||||
|
'deleted' => 0,
|
||||||
|
'entity_types' => array(),
|
||||||
|
'field_name' => 'field_weibo_url',
|
||||||
|
'indexes' => array(),
|
||||||
|
'locked' => 0,
|
||||||
|
'module' => 'link',
|
||||||
|
'settings' => array(
|
||||||
|
'attributes' => array(
|
||||||
|
'class' => '',
|
||||||
|
'rel' => '',
|
||||||
|
'target' => 'default',
|
||||||
|
),
|
||||||
|
'display' => array(
|
||||||
|
'url_cutoff' => 80,
|
||||||
|
),
|
||||||
|
'enable_tokens' => 1,
|
||||||
|
'title' => 'optional',
|
||||||
|
'title_maxlength' => 128,
|
||||||
|
'title_value' => '',
|
||||||
|
'url' => 0,
|
||||||
|
),
|
||||||
|
'translatable' => 0,
|
||||||
|
'type' => 'link_field',
|
||||||
|
);
|
||||||
|
|
||||||
|
return $field_bases;
|
||||||
|
}
|
@ -0,0 +1,79 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* groups_user_profile.features.field_instance.inc
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements hook_field_default_field_instances().
|
||||||
|
*/
|
||||||
|
function groups_user_profile_field_default_field_instances() {
|
||||||
|
$field_instances = array();
|
||||||
|
|
||||||
|
// Exported field_instance: 'user-user-field_weibo_url'
|
||||||
|
$field_instances['user-user-field_weibo_url'] = array(
|
||||||
|
'bundle' => 'user',
|
||||||
|
'default_value' => NULL,
|
||||||
|
'deleted' => 0,
|
||||||
|
'description' => '',
|
||||||
|
'display' => array(
|
||||||
|
'default' => array(
|
||||||
|
'label' => 'above',
|
||||||
|
'module' => 'link',
|
||||||
|
'settings' => array(),
|
||||||
|
'type' => 'link_default',
|
||||||
|
'weight' => 10,
|
||||||
|
),
|
||||||
|
'profile_teaser' => array(
|
||||||
|
'label' => 'hidden',
|
||||||
|
'module' => 'groups_social_link',
|
||||||
|
'settings' => array(
|
||||||
|
'provider' => 'weibo',
|
||||||
|
),
|
||||||
|
'type' => 'groups_social_link_formatter',
|
||||||
|
'weight' => 3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'display_in_partial_form' => 0,
|
||||||
|
'entity_type' => 'user',
|
||||||
|
'field_name' => 'field_weibo_url',
|
||||||
|
'label' => 'Weibo URL',
|
||||||
|
'required' => 0,
|
||||||
|
'settings' => array(
|
||||||
|
'absolute_url' => 1,
|
||||||
|
'attributes' => array(
|
||||||
|
'class' => 'weibo-url',
|
||||||
|
'configurable_class' => 0,
|
||||||
|
'configurable_title' => 0,
|
||||||
|
'rel' => '',
|
||||||
|
'target' => 'default',
|
||||||
|
'title' => '',
|
||||||
|
),
|
||||||
|
'display' => array(
|
||||||
|
'url_cutoff' => 80,
|
||||||
|
),
|
||||||
|
'enable_tokens' => 1,
|
||||||
|
'rel_remove' => 'default',
|
||||||
|
'title' => 'none',
|
||||||
|
'title_label_use_field_label' => 0,
|
||||||
|
'title_maxlength' => 128,
|
||||||
|
'title_value' => '',
|
||||||
|
'url' => 0,
|
||||||
|
'user_register_form' => 0,
|
||||||
|
'validate_url' => 1,
|
||||||
|
),
|
||||||
|
'widget' => array(
|
||||||
|
'active' => 0,
|
||||||
|
'module' => 'link',
|
||||||
|
'settings' => array(),
|
||||||
|
'type' => 'link_field',
|
||||||
|
'weight' => 7,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
// Translatables
|
||||||
|
// Included for use with string extractors like potx.
|
||||||
|
t('Weibo URL');
|
||||||
|
|
||||||
|
return $field_instances;
|
||||||
|
}
|
12
modules/groups/groups_user_profile/groups_user_profile.info
Normal file
12
modules/groups/groups_user_profile/groups_user_profile.info
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
name = Groups User Profile
|
||||||
|
description = Groups user profile extensions
|
||||||
|
core = 7.x
|
||||||
|
package = Groups - Building Blocks
|
||||||
|
project = groups
|
||||||
|
dependencies[] = ctools
|
||||||
|
dependencies[] = features
|
||||||
|
dependencies[] = groups_social_link
|
||||||
|
dependencies[] = link
|
||||||
|
features[features_api][] = api:2
|
||||||
|
features[field_base][] = field_weibo_url
|
||||||
|
features[field_instance][] = user-user-field_weibo_url
|
@ -0,0 +1,6 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Code for the Groups User Profile feature.
|
||||||
|
*/
|
@ -55,7 +55,7 @@
|
|||||||
}
|
}
|
||||||
h3 {
|
h3 {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-bottom: 0px;
|
margin-bottom: 5px;
|
||||||
a {
|
a {
|
||||||
color: #2A4E68;
|
color: #2A4E68;
|
||||||
font-family: "Open Sans",Helvetica,Arial,sans-serif;
|
font-family: "Open Sans",Helvetica,Arial,sans-serif;
|
||||||
@ -65,13 +65,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.social-link {
|
.social-link {
|
||||||
font-size: 12px;
|
|
||||||
i {
|
i {
|
||||||
color: #888;
|
background: #29ABE2;
|
||||||
padding-right: 0.2em;
|
color: #FFFFFF;
|
||||||
|
font-size: 14px;
|
||||||
|
padding: 2px;
|
||||||
|
padding-left: 4px;
|
||||||
|
padding-right: 4px;
|
||||||
|
margin-right: 0.5em;
|
||||||
}
|
}
|
||||||
a {
|
a {
|
||||||
color: #888;
|
color: #000000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user