75
materio_bookmarks/materio_bookmarks.features.inc
Normal file
75
materio_bookmarks/materio_bookmarks.features.inc
Normal file
@@ -0,0 +1,75 @@
|
||||
<?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_on_form' => 0,
|
||||
'access_author' => '',
|
||||
'show_contextual_link' => FALSE,
|
||||
'show_on_page' => 1,
|
||||
'show_on_teaser' => 0,
|
||||
'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',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
return $styles;
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
<?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(
|
||||
0 => 'Utilisateur',
|
||||
1 => 'administrator',
|
||||
2 => 'root',
|
||||
),
|
||||
'module' => 'flag',
|
||||
);
|
||||
|
||||
// Exported permission: unflag bookmarks.
|
||||
$permissions['unflag bookmarks'] = array(
|
||||
'name' => 'unflag bookmarks',
|
||||
'roles' => array(
|
||||
0 => 'Utilisateur',
|
||||
1 => 'administrator',
|
||||
2 => 'root',
|
||||
),
|
||||
'module' => 'flag',
|
||||
);
|
||||
|
||||
return $permissions;
|
||||
}
|
13
materio_bookmarks/materio_bookmarks.info
Normal file
13
materio_bookmarks/materio_bookmarks.info
Normal file
@@ -0,0 +1,13 @@
|
||||
name = Materio bookmarks
|
||||
core = 7.x
|
||||
package = Materio
|
||||
php = 5.2.4
|
||||
dependencies[] = features
|
||||
dependencies[] = flag
|
||||
dependencies[] = image
|
||||
dependencies[] = materio_flag
|
||||
features[features_api][] = api:1
|
||||
features[flag][] = bookmarks
|
||||
features[image][] = card-bookmark
|
||||
features[user_permission][] = flag bookmarks
|
||||
features[user_permission][] = unflag bookmarks
|
7
materio_bookmarks/materio_bookmarks.module
Normal file
7
materio_bookmarks/materio_bookmarks.module
Normal file
@@ -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