Note that there are some explanatory texts on larger screens.

plurals
  1. POGD Star Rating plug-in: Altering Dynamic Cascading Style Sheet
    primarykey
    data
    text
    <p>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?</p> <pre><code>&lt;?php if (count($thumb_sets) &gt; 0 &amp;&amp; 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); } } } ?&gt; </code></pre> <p>Related HTML </p> <pre><code>&lt;div id = "rateA" style="width:285px; float:left"&gt; &lt;div style="display: none"&gt;VA:F [1.9.22_1171]&lt;/div&gt; &lt;div class="thumblock "&gt;&lt;div id="gdsr_thumb_288_a_up" class="gdt-size-40 gdthumb gdup"&gt; &lt;a id="gdsrX288XupXaX25X40XY" class="gdt-starrating" rel="nofollow"&gt;&lt;/a&gt;&lt;/div&gt; &lt;div id="gdsr_thumb_288_a_loader_up" style="display: none; width: 40px " class="ratingloader loadup"&gt; &lt;div class="loader flower thumb" style="width: 40px; height: 40px;"&gt;&lt;/div&gt;&lt;/div&gt; &lt;div id="gdsr_thumb_288_a_dw" class="gdt-size-40 gdthumb gddw"&gt; &lt;a id="gdsrX288XdwXaX25X40XY" class="gdt-starrating" rel="nofollow"&gt;&lt;/a&gt;&lt;/div&gt; &lt;div id="gdsr_thumb_288_a_loader_dw" style="display: none; width: 40px " class="ratingloader loaddw"&gt; &lt;div class="loader flower thumb" style="width: 40px; height: 40px;"&gt;&lt;/div&gt;&lt;/div&gt; &lt;div class="ratingtext "&gt; &lt;div id="gdsr_thumb_text_288_a" class="gdt-size-40 gdthumbtext"&gt;Rating: &lt;strong&gt;0&lt;/strong&gt; (from 0 votes)&lt;/div&gt;&lt;/div&gt;&lt;div class="raterclear"&gt;&lt;/div&gt;&lt;/div&gt; </code></pre> <p></p> <p>Generated CSS</p> <pre><code>.gdt-size-40.gdthumb, .gdt-size-40.gdthumb a, .gdt-size-40.gdthumb div { height: 40px; width: 40px; } .gdthumb { float: left; position: relative; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload