Hey, first of all thanks for the great module. I'm glad I found it through the Mustardmedia podcast (my nick is not against Bob Christenson by the way ;) ).
When we tried to implement the rotator in our site, we had some issues that could be solved and the rotator looks great on modern browsers. However on Internet Explorer 7 (and also 6) it does not. It kinda looks as if our ie.css file is ineffective on that particular site that uses the rotator. Look here: http://www.nintendo-power.de/ this is our startpage with the rotator and here is a random page without: http://www.nintendo-power.de/sonstiges.
If you compare them side by side, you'll notice that there is some strange margin on the top of the page and also that the search bar under the ebay ads has a different size. We made the search button even smaller than we need it through the ie.css file which unfortunately had no effect on the frontpage.
Now, what is the difference? The only thing that is different (well, besides the content of course) is the rotator or to be exact the views css-file and this one here /sites/all/modules/views_rotator/views-rotator.min.js
Here is how we themed the view (maybe it has something to do with that?): I created a view (front_rotator) with the needed fields and inserted the following into the template.php:
function phptemplate_views_rotator_item_front_rotator($view, $nodes, $type) {
// Edit these options to change settings
$options['interval_time'] = 5;
$options['transition_time'] = .5;
$options['mouseover_pause'] = 1;
$options['back_next_buttons'] = 1;
$options['area_height'] = 'auto';
$options['auto_height'] = 1; // When this is set to 1 views rotator will attempt to detect and set the region height
// End editable options
drupal_add_css(drupal_get_path('module', 'views_rotator') .'/views-rotator.css');
drupal_add_js(drupal_get_path('module', 'views_rotator') .'/views-rotator.min.js');
$options['id'] = $views_rotator_id = 'views-rotator-'. $view->name .'-'. $view->build_type;
$options['interval_time'] = $options['interval_time'] * 1000;
$options['transition_time'] = $options['transition_time'] * 1000;
drupal_add_js(array('views_rotator' => array($views_rotator_id => $options)), 'setting');
$fields = _views_get_fields();
$taken = array();
// Set up the fields in nicely named chunks.
foreach ($view->field as $id => $field) {
$field_name = $field['field'];
if (isset($taken[$field_name])) {
$field_name = $field['queryname'];
}
$taken[$field_name] = true;
$field_names[$id] = $field_name;
}
// Set up some variables that won't change.
$base_vars = array(
'view' => $view,
'view_type' => $type,
);
foreach ($nodes as $i => $node) {
$vars = $base_vars;
$vars['node'] = $node;
$vars['count'] = $i;
$vars['stripe'] = $i % 2 ? 'even' : 'odd';
foreach ($view->field as $id => $field) {
$name = $field_names[$id];
$vars[$name] = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view);
if (isset($field['label'])) {
$vars[$name . '_label'] = $field['label'];
}
}
$output .= '<li';
if (views_rotator_display_item($views_rotator_id)) $output .= ' style="display:none;"';
$output .= '>'. _phptemplate_callback('views_list_front_rotator', $vars, array('views-list-front_rotator')) ."</li>\n";
}
if (!empty($output)) {
$output = '<div class="item-list views-rotator '. $views_rotator_id .' clear-block"><ul id="'. $views_rotator_id .'">'. $output;
$output .= '</ul></div>';
return $output;
}
else return $output;
}
Note: since we use Zen_phptemplate_callback('views_list_front_rotator', $vars, array('views-list-front_rotator')) had to be used.
After that I took the stuff that views theme wizard gave me and created the views-list-front_rotator.tpl.php file. Now all that had to be done was to style output and it looked great on Firefox.
But not in IE.
So, is there something in the Javascript that borks the ie.css file? Is our themeing wrong?
Best regards
Comments
Comment #1
mfer commentedAre you talking about the extra white space at the very top? If so, that's part of the header id and the rotator shouldn't be affecting it. Is it something else?
Also, the format for the arguments on _phptemplate_callback are _phptemplate_callback($hook, $variables = array(), $suggestions = array())
Where you added array('views-list-front_rotator') means you are suggesting to, also check for views-list-front_rotator.tpl.php. If this is working I'm guessing there is an issue with the naming conventions where - and _ are getting confused.
Comment #2
antibob commentedWeird, the problem seems to have fixed itself...
The only thing I did in the meantime was to test out the Javascript_aggregation module. Two days later i checked the page in IE7 again and everything looks now how it's supposed to be o_O