Closed (fixed)
Project:
Rotor Banner
Version:
6.x-2.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Dec 2009 at 03:01 UTC
Updated:
27 Dec 2009 at 09:00 UTC
Hi. You can see my site using rotor for the banners at http://dev.healingthresholds.net. Rotor works great, but it doesn't include height and width attributes in the img src, even though I've told it under rotor settings in the view.
You could add an option for these attributes, but I can't really think of a reason why they shouldn't always be there.
I noticed this by running Google Page Speed in Firebug: "A width and height should be specified for all images in order to speed up page display. Specifying image dimensions prevents the browser from having to re-position the contents of the page. The following image(s) are missing a width and/or height:"
Thanks.
Comments
Comment #1
dankohn commentedI forgot to include the view:
$view = new view;
$view->name = 'rotor';
$view->description = 'Default view for the Botor Banner module - A block that rotates through all Rotor Items';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'body' => array(
'label' => 'Body',
'exclude' => 0,
'id' => 'body',
'table' => 'node_revisions',
'field' => 'body',
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'random' => array(
'order' => 'ASC',
'id' => 'random',
'table' => 'views',
'field' => 'random',
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => 1,
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'rotor_item' => 'rotor_item',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
),
'promote' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'promote',
'table' => 'node',
'field' => 'promote',
'relationship' => 'none',
),
'sticky' => array(
'operator' => '=',
'value' => '0',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'sticky',
'table' => 'node',
'field' => 'sticky',
'relationship' => 'none',
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('use_ajax', TRUE);
$handler->override_option('style_plugin', 'rotor');
$handler->override_option('style_options', array(
'width' => '948',
'height' => '180',
'seconds' => '30',
'speed' => '3',
'effect' => 'fade',
'pause' => 0,
'tabs' => array(
'show_tabs' => 0,
'group_tabs' => '',
'position' => '0',
),
));
$handler->override_option('row_plugin', 'unformatted');
$handler->override_option('row_options', NULL);
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
Comment #2
mrfelton commentedFixed in CVS.