merged features sudmodule
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* materio_bookmarks.features.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_flag_default_flags().
|
||||
*/
|
||||
function materio_bookmarks_flag_default_flags() {
|
||||
$flags = array();
|
||||
// Exported flag: "Bookmarks".
|
||||
$flags['bookmarks'] = array(
|
||||
'entity_type' => 'node',
|
||||
'title' => 'Bookmarks',
|
||||
'global' => 0,
|
||||
'types' => array(
|
||||
0 => 'breve',
|
||||
1 => 'materiau',
|
||||
),
|
||||
'flag_short' => 'Bookmark this',
|
||||
'flag_long' => 'Add this post to your bookmarks',
|
||||
'flag_message' => 'This post has been added to your bookmarks',
|
||||
'unflag_short' => 'Unbookmark this',
|
||||
'unflag_long' => 'Remove this post from your bookmarks',
|
||||
'unflag_message' => 'This post has been removed from your bookmarks',
|
||||
'unflag_denied_text' => '',
|
||||
'link_type' => 'toggle',
|
||||
'weight' => 0,
|
||||
'show_in_links' => array(
|
||||
'full' => 'full',
|
||||
'bookmark' => 'bookmark',
|
||||
'cardsmall' => 'cardsmall',
|
||||
'cardmedium' => 'cardmedium',
|
||||
'cardbig' => 'cardbig',
|
||||
'cardfull' => 'cardfull',
|
||||
'teaser' => 0,
|
||||
'rss' => 0,
|
||||
'diff_standard' => 0,
|
||||
'print' => 0,
|
||||
'email_plain' => 0,
|
||||
'email_html' => 0,
|
||||
'email_textalt' => 0,
|
||||
'token' => 0,
|
||||
),
|
||||
'show_as_field' => 0,
|
||||
'show_on_form' => 0,
|
||||
'access_author' => '',
|
||||
'show_contextual_link' => FALSE,
|
||||
'i18n' => 0,
|
||||
'module' => 'materio_bookmarks',
|
||||
'locked' => array(
|
||||
0 => 'name',
|
||||
),
|
||||
'api_version' => 3,
|
||||
);
|
||||
return $flags;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_image_default_styles().
|
||||
*/
|
||||
function materio_bookmarks_image_default_styles() {
|
||||
$styles = array();
|
||||
|
||||
// Exported image style: card-bookmark.
|
||||
$styles['card-bookmark'] = array(
|
||||
'name' => 'card-bookmark',
|
||||
'effects' => array(
|
||||
5 => array(
|
||||
'label' => 'Mise à l\'échelle et recadrage',
|
||||
'help' => 'La mise à l\'échelle et le recadrage maintiendront les proportions originales de l\'image puis recadreront la dimension la plus large. C\'est très utile pour créer des vignettes carrées sans étirer les images.',
|
||||
'effect callback' => 'image_scale_and_crop_effect',
|
||||
'dimensions callback' => 'image_resize_dimensions',
|
||||
'form callback' => 'image_resize_form',
|
||||
'summary theme' => 'image_resize_summary',
|
||||
'module' => 'image',
|
||||
'name' => 'image_scale_and_crop',
|
||||
'data' => array(
|
||||
'width' => 50,
|
||||
'height' => 70,
|
||||
),
|
||||
'weight' => 1,
|
||||
),
|
||||
),
|
||||
'label' => 'card-bookmark',
|
||||
);
|
||||
|
||||
return $styles;
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* materio_bookmarks.features.user_permission.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_user_default_permissions().
|
||||
*/
|
||||
function materio_bookmarks_user_default_permissions() {
|
||||
$permissions = array();
|
||||
|
||||
// Exported permission: 'flag bookmarks'.
|
||||
$permissions['flag bookmarks'] = array(
|
||||
'name' => 'flag bookmarks',
|
||||
'roles' => array(
|
||||
'Student' => 'Student',
|
||||
'Utilisateur' => 'Utilisateur',
|
||||
'Utilisateur Alpha Tester' => 'Utilisateur Alpha Tester',
|
||||
'administrator' => 'administrator',
|
||||
'root' => 'root',
|
||||
),
|
||||
'module' => 'flag',
|
||||
);
|
||||
|
||||
// Exported permission: 'unflag bookmarks'.
|
||||
$permissions['unflag bookmarks'] = array(
|
||||
'name' => 'unflag bookmarks',
|
||||
'roles' => array(
|
||||
'Student' => 'Student',
|
||||
'Utilisateur' => 'Utilisateur',
|
||||
'Utilisateur Alpha Tester' => 'Utilisateur Alpha Tester',
|
||||
'administrator' => 'administrator',
|
||||
'root' => 'root',
|
||||
),
|
||||
'module' => 'flag',
|
||||
);
|
||||
|
||||
return $permissions;
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
name = Materio bookmarks
|
||||
core = 7.x
|
||||
package = Materio
|
||||
dependencies[] = features
|
||||
dependencies[] = flag
|
||||
dependencies[] = image
|
||||
dependencies[] = materio_flag
|
||||
features[features_api][] = api:2
|
||||
features[flag][] = bookmarks
|
||||
features[image][] = card-bookmark
|
||||
features[user_permission][] = flag bookmarks
|
||||
features[user_permission][] = unflag bookmarks
|
||||
project path = sites/all/modules/features
|
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Code for the Materio bookmarks feature.
|
||||
*/
|
||||
|
||||
include_once 'materio_bookmarks.features.inc';
|
Reference in New Issue
Block a user