FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-cambridge-profile
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Information Services
DevOps
Drupal team
drupal-cambridge-profile
Commits
ec821b01
Commit
ec821b01
authored
11 years ago
by
thewilkybarkid
Browse files
Options
Downloads
Patches
Plain Diff
Replacing automatic cropping with the Image javascript crop module
parent
3962418f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cambridge.info
+1
-0
1 addition, 0 deletions
cambridge.info
cambridge.install
+86
-0
86 additions, 0 deletions
cambridge.install
cambridge.make
+1
-0
1 addition, 0 deletions
cambridge.make
with
88 additions
and
0 deletions
cambridge.info
+
1
−
0
View file @
ec821b01
...
...
@@ -34,6 +34,7 @@ dependencies[] = admin_menu
dependencies[] = admin_menu_toolbar
dependencies[] = advanced_help
dependencies[] = date
dependencies[] = imagecrop
dependencies[] = link
dependencies[] = pathauto
dependencies[] = php
...
...
This diff is collapsed.
Click to expand it.
cambridge.install
+
86
−
0
View file @
ec821b01
...
...
@@ -16,4 +16,90 @@ function cambridge_install() {
require_once
'cambridge_lite.install'
;
cambridge_lite_install
();
// Set some sensible defaults for the Image javascript crop module.
variable_set
(
'imagecrop_popup'
,
'imagecrop_iframe'
);
variable_set
(
'imagecrop_scale_default'
,
1
);
variable_set
(
'imagecrop_show_cancel_button'
,
1
);
variable_set
(
'imagecrop_ui_controls'
,
1
);
// Replace standard scaling/cropping image style effects and replace them with a Javascript crop effect.
$carousel
=
image_style_load
(
'carousel'
);
foreach
(
$carousel
[
'effects'
]
as
$effect
)
{
image_effect_delete
(
$effect
);
}
image_effect_save
(
array
(
'name'
=>
'imagecrop_javascript'
,
'data'
=>
array
(
'width'
=>
885
,
'height'
=>
432
,
'xoffset'
=>
'center'
,
'yoffset'
=>
'center'
,
'resizable'
=>
0
,
'downscaling'
=>
0
,
'aspect_ratio'
=>
'CROP'
,
'disable_if_no_data'
=>
0
,
),
'isid'
=>
$carousel
[
'isid'
],
'weight'
=>
0
,
)
);
$instance
=
field_info_instance
(
'node'
,
'field_carousel_image'
,
'carousel_item'
);
$instance
[
'settings'
][
'imagecrop'
]
=
array
(
'carousel'
=>
'carousel'
,
'leading'
=>
0
,
'inline'
=>
0
);
field_update_instance
(
$instance
);
$leading
=
image_style_load
(
'leading'
);
foreach
(
$leading
[
'effects'
]
as
$effect
)
{
image_effect_delete
(
$effect
);
}
image_effect_save
(
array
(
'name'
=>
'imagecrop_javascript'
,
'data'
=>
array
(
'width'
=>
590
,
'height'
=>
288
,
'xoffset'
=>
'center'
,
'yoffset'
=>
'center'
,
'resizable'
=>
0
,
'downscaling'
=>
0
,
'aspect_ratio'
=>
'CROP'
,
'disable_if_no_data'
=>
0
,
),
'isid'
=>
$leading
[
'isid'
],
'weight'
=>
0
,
)
);
$instance
=
field_info_instance
(
'node'
,
'field_leading_image'
,
'page'
);
$instance
[
'settings'
][
'imagecrop'
]
=
array
(
'leading'
=>
'leading'
,
'carousel'
=>
0
,
'inline'
=>
0
);
field_update_instance
(
$instance
);
$inline
=
image_style_load
(
'inline'
);
foreach
(
$inline
[
'effects'
]
as
$effect
)
{
image_effect_delete
(
$effect
);
}
image_effect_save
(
array
(
'name'
=>
'imagecrop_javascript'
,
'data'
=>
array
(
'width'
=>
250
,
'height'
=>
250
,
'xoffset'
=>
'center'
,
'yoffset'
=>
'center'
,
'resizable'
=>
0
,
'downscaling'
=>
0
,
'aspect_ratio'
=>
'CROP'
,
'disable_if_no_data'
=>
0
,
),
'isid'
=>
$inline
[
'isid'
],
'weight'
=>
0
,
)
);
}
This diff is collapsed.
Click to expand it.
cambridge.make
+
1
−
0
View file @
ec821b01
...
...
@@ -11,3 +11,4 @@ projects[context] = "3.0-beta7"
projects[date]
=
"2.6"
projects[easy_breadcrumb]
=
"2.7"
projects[google_analytics]
=
"1.3"
projects[imagecrop]
=
"1.0-rc3"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment