Closed (fixed)
Project:
Vote Up/Down
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jan 2007 at 17:58 UTC
Updated:
14 Jan 2009 at 17:08 UTC
When using IE 7, the alternate vote up widget does not work. I am using the following code in node-storylink.tpl.php:
<!-- start node -->
<div id="node-<?php print $node->nid; ?>" class="node storylink clear-block<?php print ($sticky) ? ' sticky' : ''; print (!$status) ? ' node-unpublished' : ''; ?>">
<?php print $picture ?>
<h2 class="title"><a href="<?php print $storylink_url ?>" target="_blank"><?php print ($seqid) ? $seqid .'. ' : '' ?><?php print $title ?></a></h2>
<img src="/themes/foliage/postimg.png">
<?php print $vote_storylink_via ?>
<?php print $vote_up_down_widget ?>
<div class="content"><?php print $content ?><a href="<?php print $storylink_url ?>">[View Original Story]</a></div>
<div class="submitted"><?php print $submitted ?>
<?php if ($terms): ?>
<span class="terms"> | <?php print t('Tags') ?>: <?php print $terms ?></span>
<?php endif; ?>
</div>
<?php if ($links): ?>
<div class="links">» <?php print $links ?></div>
<?php endif; ?>
<br class="clear" />
</div>
A screenshot is attached displaying the issue.
| Comment | File | Size | Author |
|---|---|---|---|
| no-vote.PNG | 8.66 KB | ron williams |
Comments
Comment #1
mstef commentedI am having the same exact problem and desperately need a patch or solution. Thanks..
Comment #2
frjo commentedThe problem is that IE 7, just like IE 6, doesn't understand the width: auto part in vote_up_down.css:
For IE 6 I have used the star html hack to set a fixed width, the "* html" make other browsers ignore it. Look for this at the bottom of vote_up_down.css:
Simply removing the three "*html" above will fix the problem for IE 7 but will also make the voting widget 55 pixel wide in all browsers. Making it look less nice in my opinion.
Any good suggestions?
Comment #3
ron williams commentedThis might not make sense, but maybe it would be possible to do a user agent string detection and use/display different code based on the useragent? This could work, though it may not be implementable in this setup.
Comment #4
frjo commentedThe proper way of doing it is to use something Microsoft call "Conditional Comments". If you include a CSS file like this:
Only IE 7 will make use of it. Firefox, Safari, Opera etc. only sees a normal comment that they ignore. Read more on http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp .
The thing is that this is most easily (and best) done in the theme, not in a module. THe new Garland theme has a "fix-ie.css" file already. Paste e.g. in this at the bottom of that file and all is well :-).
I would like a solution that does not force users to manually add code to there theme, it's not neet.
Comment #5
ron williams commentedWhat file would I use for this then? I use the foliage theme.
Comment #6
frjo commentedAdd a empty "fix-ie.css" in the same way as Garland does it and add the code above to that file.
Comment #7
xman commentedAnd for IE7 place this in css:
FF, Opera and IE6 ignore this.
Comment #8
alexandreracine commentedStill valid?
Comment #9
lut4rp commented