Hi,

I'm posting here as a last resort, and in a cry for help!! I'm trying to insert the vote up down widget in my node templates, and I can't place them anywhere on they page, they always drop directly to the botton of the content.

I tried created a div just for the widget, with no luck at all...

What would cause this, with plenty of themes you simply have to insert the code where you want it and it works, but with this theme, no matter where I pub the widget in the template file, it's always dropped on the bottom of the page.

If you have any idea what causes this and how I could insert something near the top of the node (digg-like, for example), please please let me know!

Thanks in advance,

Patchak

Comments

paddy_deburca’s picture

Hi,

Can you please give an example of the html code you are adding and the accompaning css?

Paddy.

patchak’s picture

Hi,

here is the code if my custom type, please not that it's an exact copy of node.tpl.php with the exception than I actually call the widget.

<div class="node storylink<?php print ($sticky) ? " sticky" : ""; ?>">
 <?php if ($page == 0): ?>
  <h2><a href="<?php print $node_url ?>" title="<?php print $title ?>"><?php print $title ?></a></h2>
  <?php endif; ?>
  <?php /*print $picture*/ ?>


  <div class="info"><?php print $submitted .'<span class="taxonomy">'. ($submitted ? ' :: ' : '') . $terms .'</span>' ?>
<br>
<br>
<?php print $vote_up_down_widget ?>
</div>


<div class="content">
  <?php print $content ?>
  </div>

  <?php if ($links): ?>
  <?php if ($picture): ?>
  <br class="clear" />
  <?php endif; ?>
  <div class="links"><?php print $links ?></div>
  <?php endif; ?>
</div>

Also I did not try to load any related css... but here is the css file for the vote up down module...


.vote-up-down-widget {
  float: left;
  clear: left;
  padding: 2px;
  margin: 2px 5px 2px 0;
  border: 1px solid #ccc;
}
.vote-up-down-via {
  float: right;
  color: #999;
  padding-left: 3px;
}
.vote-up-act, .vote-up-inact, .vote-down-act, .vote-down-inact, .up-inact, .down-inact {
  display: block;
  text-decoration: none;
  width: 15px;
  height: 16px;
}
a.vote-up-inact, a.vote-down-inact, span.vote-up-inact, span.vote-down-inact {
  cursor: pointer;
}
a.vote-up-act, a.vote-down-act, span.vote-up-act, span.vote-down-act {
  cursor: default;
}
.vote-up-act, .vote-up-inact:hover {
  background: url(a_up_act.png) no-repeat 0px 0px;
}
.vote-up-inact, .up-inact {
  background: url(a_up_inact.png) no-repeat 0px 0px;
}
.vote-down-act, .vote-down-inact:hover {
  background: url(a_down_act.png) no-repeat 0px 0px;
}
.vote-down-inact, .down-inact {
  background: url(a_down_inact.png) no-repeat 0px 0px;
}
.vote-points {
  font-weight: bold;
}

.vote-up-down-widget-alt {
  float: left;
  clear: left;
  padding: 0;
  margin: 2px 5px 2px 0;
  border: 0;
}
.vote-up-down-widget-alt .vote-points {
  background: #FDC75A;
  font-weight: normal;
  font-size: 1.5em;
  text-align: center;
  padding: 3px;
  margin-bottom: 3px;
}
.vote-up-down-widget-alt .vote-points .vote-points {
  background: transparent;
  font-weight: normal;
  font-size: 1em;
  padding: 0;
  margin-bottom: 0;
}
.vote-up-down-widget-alt .vote-points-label {
  font-size: 0.5em;
  background: transparent;
}
.vote-up-down-widget-alt .vote-up-act,
.vote-up-down-widget-alt .vote-up-inact,
.vote-up-down-widget-alt .up-inact {
  display: block;
  width: auto;
  height: 22px;
}
.vote-up-down-widget-alt span.vote-up-act,
.vote-up-down-widget-alt span.vote-up-inact,
.vote-up-down-widget-alt span.up-inact {
  border: 1px solid #ccc;
}
.vote-up-down-widget-alt .vote-up-act,
.vote-up-down-widget-alt .vote-up-inact:hover {
  background: url(plus_act.png) no-repeat center 3px;
}
.vote-up-down-widget-alt .vote-up-inact,
.vote-up-down-widget-alt .up-inact {
  background: url(plus_inact.png) no-repeat center 3px;
}

.storylink .picture img {
  float: left !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0.3em 0 0.3em 2px !important;
  max-width: 18px !important;
  max-height: 18px !important;
}
.storylink h2.title, 
.storylink .content, 
.storylink .submitted, 
.storylink .links {
  padding-left: 26px;
}

.storylink-alt .picture {
  display: inline;
}
.storylink-alt .picture img {
  float: none !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0.3em 0.3em 0 0 !important;
  max-width: 18px !important;
  max-height: 18px !important;
}
.storylink-alt h2.title, 
.storylink-alt .content, 
.storylink-alt .submitted, 
.storylink-alt .links {
  padding-left: 42px;
}

/* Fixing IE6 bug, the "* html" make other browsers ignore it */

/* Hides from IE-mac \*/
* html .storylink .picture img {
  width: 18px !important;
  height: 18px !important;
}
* html .storylink-alt .picture img {
  width: 18px !important;
  height: 18px !important;
}
* html .vote-up-down-widget-alt .vote-up-act,
* html .vote-up-down-widget-alt .vote-up-inact,
* html .vote-up-down-widget-alt .up-inact {
  width: 55px;
}
* html .content {
  height: 1%;
}
/* End hide from IE-mac */



HUmmm apart from that, I tried with the custom node type that comes with the module...

Here is the code from the tpl.php file that comes with the module:

<!-- start node -->
<div class="node storylink<?php print ($sticky) ? ' sticky' : ''; ?>">
<?php print $picture ?>
<h2><a href="<?php print $storylink_url ?>"><?php print ($seqid) ? $seqid .'. ' : '' ?><?php print $title ?></a></h2>
<?php print $vote_storylink_via ?>
<?php print $vote_up_down_widget ?>
<div class="content">
<?php print $content ?>
</div>
<div class="info"><?php print $submitted ?>
<?php if ($terms): ?>
<span class="terms"> | <?php print t('Category') ?>: <?php print $terms ?></span>
<?php endif; ?>
</div>
<?php if ($links): ?>
<div class="links">&raquo; <?php print $links ?></div>
<?php endif; ?>
<br class="clear" />
</div>

Humm...I guess that's it..

Thanks for your help!

Patchak

Mad Maks’s picture

Status: Active » Closed (fixed)
sammyman’s picture

I am also trying to call this widget in my custom sub theme of zen, but nothing is working. Can anyone give me a tip on how to call this widget? Thanks