Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I’m in the midst of creating a page that allows users to vote for one of two competing images. I’ve used the GD Star Rating plug-in for WordPress in the past, but am struggling with altering the output in accordance to my specifications. Ideally I would like to eliminate the thumbs down option, so users will only be presented with the thumbs up option for both of the images. It appears that the CSS style code is created dynamically through PHP. Assuming that this is what it is called. Typically I would merely alter the CSS code and comment out the section that outputs the thumbs down image, but I’m not entirely sure what to do in this case. I’ve tried to comment out the lines that deal with the thumbs down CSS (i.e., gdthumb.gddw), but it doesn’t appear to have an effect. Ideas?

<?php
if (count($thumb_sets) > 0 && count($thumb_sizes)) {
foreach ($thumb_sizes as $size) {
   echo sprintf(".gdt-size-%s.gdthumbtext { line-height: %spx; }\r\n", $size, $size);
   echo sprintf(".gdt-size-%s.gdthumb, .gdt-size-%s.gdthumb a, .gdt-size-%s.gdthumb div { width: %spx; height: %spx; }\r\n", $size, $size, $size, $size, $size);
   echo sprintf(".gdt-size-%s.gdthumb.gddw a, .gdt-size-%s.gdthumb.gddw div { background-position: 0px -%spx !important; }\r\n", $size, $size, $size);
   echo sprintf(".gdt-size-%s.gdthumb.gdup a:hover { background-position: 0px -%spx; }\r\n", $size, 2 * $size);
   echo sprintf(".gdt-size-%s.gdthumb.gddw a:hover { background-position: 0px -%spx !important; }\r\n", $size, 3 * $size);
foreach ($thumb_sets as $set) {
   $url = ($set["location"] == 1 ? $base_url_local : $base_url_extra)."thumbs/".$set["folder"]."/thumbs".$size.".".$set["type"];
   echo sprintf(".gdt-size-%s.gdthumb a.gdt-%s, .gdt-size-%s.gdthumb div.gdt-%s { background: url('%s') no-repeat; }\r\n", $size, $set["folder"], $size, $set["folder"], $url);
}
}
}

?>
share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.