FYI: How to change maximum allowed dimensions for spaces logo

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
vegardjo's picture

Struggled a bit today to find out how I could increase the maximum allowed dimensions for the spaces logo, this as I wanted to use the logo as a banner, and it needed to be around 900px wide. Whichever setting I changed in Drupal all I got was:

"The image was resized to fit within the maximum allowed dimensions of 600x600 pixels."

..turns out this is not a setting, but a part of Spaces. To change it find /sites/all/modules/spaces/spaces_design.spaces.inc

..and edit function found at around line 122

<?php
function spaces_design_upload_validate($element, &$form_state) {
 
// If required, validate the uploaded picture.
 
$validators = array(
   
'file_validate_is_image' => array(),
   
'file_validate_image_resolution' => array('600x600'),
   
'file_validate_size' => array(1000 * 1024), 
?>

Comments

It might be a cleaner option

wmostrey's picture

It might be a cleaner option to put this in a new _validate() function and to use hook_form_alter() to change the validation call. Your change might otherwise get lost when you upgrade the spaces module.

Or better yet...

mthart's picture

have it as a setting in the admin interface.

:)

Anyone care to make it happen?

beta4 - there is another way

kevster's picture

Just installed beta4 - this may be the same for earlier versions - I switched on imagecache UI under modules which then allowed me to go in and edit the imagecache settings for the logo...

Just needed to then tweak the style.css and voila..

Open Atrium

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week